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/2020-11-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	// ProvisioningState - READ-ONLY; The provisioning state of the trusted client certificate resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
4129	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4130}
4131
4132// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedClientCertificatePropertiesFormat.
4133func (agtccpf ApplicationGatewayTrustedClientCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
4134	objectMap := make(map[string]interface{})
4135	if agtccpf.Data != nil {
4136		objectMap["data"] = agtccpf.Data
4137	}
4138	return json.Marshal(objectMap)
4139}
4140
4141// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway.
4142type ApplicationGatewayTrustedRootCertificate struct {
4143	// ApplicationGatewayTrustedRootCertificatePropertiesFormat - Properties of the application gateway trusted root certificate.
4144	*ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"`
4145	// Name - Name of the trusted root certificate that is unique within an Application Gateway.
4146	Name *string `json:"name,omitempty"`
4147	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4148	Etag *string `json:"etag,omitempty"`
4149	// Type - READ-ONLY; Type of the resource.
4150	Type *string `json:"type,omitempty"`
4151	// ID - Resource ID.
4152	ID *string `json:"id,omitempty"`
4153}
4154
4155// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificate.
4156func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) {
4157	objectMap := make(map[string]interface{})
4158	if agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat != nil {
4159		objectMap["properties"] = agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat
4160	}
4161	if agtrc.Name != nil {
4162		objectMap["name"] = agtrc.Name
4163	}
4164	if agtrc.ID != nil {
4165		objectMap["id"] = agtrc.ID
4166	}
4167	return json.Marshal(objectMap)
4168}
4169
4170// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedRootCertificate struct.
4171func (agtrc *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(body []byte) error {
4172	var m map[string]*json.RawMessage
4173	err := json.Unmarshal(body, &m)
4174	if err != nil {
4175		return err
4176	}
4177	for k, v := range m {
4178		switch k {
4179		case "properties":
4180			if v != nil {
4181				var applicationGatewayTrustedRootCertificatePropertiesFormat ApplicationGatewayTrustedRootCertificatePropertiesFormat
4182				err = json.Unmarshal(*v, &applicationGatewayTrustedRootCertificatePropertiesFormat)
4183				if err != nil {
4184					return err
4185				}
4186				agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat = &applicationGatewayTrustedRootCertificatePropertiesFormat
4187			}
4188		case "name":
4189			if v != nil {
4190				var name string
4191				err = json.Unmarshal(*v, &name)
4192				if err != nil {
4193					return err
4194				}
4195				agtrc.Name = &name
4196			}
4197		case "etag":
4198			if v != nil {
4199				var etag string
4200				err = json.Unmarshal(*v, &etag)
4201				if err != nil {
4202					return err
4203				}
4204				agtrc.Etag = &etag
4205			}
4206		case "type":
4207			if v != nil {
4208				var typeVar string
4209				err = json.Unmarshal(*v, &typeVar)
4210				if err != nil {
4211					return err
4212				}
4213				agtrc.Type = &typeVar
4214			}
4215		case "id":
4216			if v != nil {
4217				var ID string
4218				err = json.Unmarshal(*v, &ID)
4219				if err != nil {
4220					return err
4221				}
4222				agtrc.ID = &ID
4223			}
4224		}
4225	}
4226
4227	return nil
4228}
4229
4230// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an
4231// application gateway.
4232type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct {
4233	// Data - Certificate public data.
4234	Data *string `json:"data,omitempty"`
4235	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
4236	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
4237	// ProvisioningState - READ-ONLY; The provisioning state of the trusted root certificate resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
4238	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4239}
4240
4241// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificatePropertiesFormat.
4242func (agtrcpf ApplicationGatewayTrustedRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
4243	objectMap := make(map[string]interface{})
4244	if agtrcpf.Data != nil {
4245		objectMap["data"] = agtrcpf.Data
4246	}
4247	if agtrcpf.KeyVaultSecretID != nil {
4248		objectMap["keyVaultSecretId"] = agtrcpf.KeyVaultSecretID
4249	}
4250	return json.Marshal(objectMap)
4251}
4252
4253// ApplicationGatewayURLConfiguration url configuration of the Actions set in Application Gateway.
4254type ApplicationGatewayURLConfiguration struct {
4255	// ModifiedPath - Url path which user has provided for url rewrite. Null means no path will be updated. Default value is null.
4256	ModifiedPath *string `json:"modifiedPath,omitempty"`
4257	// ModifiedQueryString - Query string which user has provided for url rewrite. Null means no query string will be updated. Default value is null.
4258	ModifiedQueryString *string `json:"modifiedQueryString,omitempty"`
4259	// 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.
4260	Reroute *bool `json:"reroute,omitempty"`
4261}
4262
4263// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
4264// PathBasedRouting.
4265type ApplicationGatewayURLPathMap struct {
4266	// ApplicationGatewayURLPathMapPropertiesFormat - Properties of the application gateway URL path map.
4267	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
4268	// Name - Name of the URL path map that is unique within an Application Gateway.
4269	Name *string `json:"name,omitempty"`
4270	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4271	Etag *string `json:"etag,omitempty"`
4272	// Type - READ-ONLY; Type of the resource.
4273	Type *string `json:"type,omitempty"`
4274	// ID - Resource ID.
4275	ID *string `json:"id,omitempty"`
4276}
4277
4278// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
4279func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
4280	objectMap := make(map[string]interface{})
4281	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
4282		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
4283	}
4284	if agupm.Name != nil {
4285		objectMap["name"] = agupm.Name
4286	}
4287	if agupm.ID != nil {
4288		objectMap["id"] = agupm.ID
4289	}
4290	return json.Marshal(objectMap)
4291}
4292
4293// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
4294func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
4295	var m map[string]*json.RawMessage
4296	err := json.Unmarshal(body, &m)
4297	if err != nil {
4298		return err
4299	}
4300	for k, v := range m {
4301		switch k {
4302		case "properties":
4303			if v != nil {
4304				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
4305				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
4306				if err != nil {
4307					return err
4308				}
4309				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
4310			}
4311		case "name":
4312			if v != nil {
4313				var name string
4314				err = json.Unmarshal(*v, &name)
4315				if err != nil {
4316					return err
4317				}
4318				agupm.Name = &name
4319			}
4320		case "etag":
4321			if v != nil {
4322				var etag string
4323				err = json.Unmarshal(*v, &etag)
4324				if err != nil {
4325					return err
4326				}
4327				agupm.Etag = &etag
4328			}
4329		case "type":
4330			if v != nil {
4331				var typeVar string
4332				err = json.Unmarshal(*v, &typeVar)
4333				if err != nil {
4334					return err
4335				}
4336				agupm.Type = &typeVar
4337			}
4338		case "id":
4339			if v != nil {
4340				var ID string
4341				err = json.Unmarshal(*v, &ID)
4342				if err != nil {
4343					return err
4344				}
4345				agupm.ID = &ID
4346			}
4347		}
4348	}
4349
4350	return nil
4351}
4352
4353// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
4354type ApplicationGatewayURLPathMapPropertiesFormat struct {
4355	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
4356	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
4357	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
4358	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
4359	// DefaultRewriteRuleSet - Default Rewrite rule set resource of URL path map.
4360	DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"`
4361	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
4362	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
4363	// PathRules - Path rule of URL path map resource.
4364	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
4365	// ProvisioningState - READ-ONLY; The provisioning state of the URL path map resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
4366	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4367}
4368
4369// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMapPropertiesFormat.
4370func (agupmpf ApplicationGatewayURLPathMapPropertiesFormat) MarshalJSON() ([]byte, error) {
4371	objectMap := make(map[string]interface{})
4372	if agupmpf.DefaultBackendAddressPool != nil {
4373		objectMap["defaultBackendAddressPool"] = agupmpf.DefaultBackendAddressPool
4374	}
4375	if agupmpf.DefaultBackendHTTPSettings != nil {
4376		objectMap["defaultBackendHttpSettings"] = agupmpf.DefaultBackendHTTPSettings
4377	}
4378	if agupmpf.DefaultRewriteRuleSet != nil {
4379		objectMap["defaultRewriteRuleSet"] = agupmpf.DefaultRewriteRuleSet
4380	}
4381	if agupmpf.DefaultRedirectConfiguration != nil {
4382		objectMap["defaultRedirectConfiguration"] = agupmpf.DefaultRedirectConfiguration
4383	}
4384	if agupmpf.PathRules != nil {
4385		objectMap["pathRules"] = agupmpf.PathRules
4386	}
4387	return json.Marshal(objectMap)
4388}
4389
4390// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
4391// configuration.
4392type ApplicationGatewayWebApplicationFirewallConfiguration struct {
4393	// Enabled - Whether the web application firewall is enabled or not.
4394	Enabled *bool `json:"enabled,omitempty"`
4395	// FirewallMode - Web application firewall mode. Possible values include: 'ApplicationGatewayFirewallModeDetection', 'ApplicationGatewayFirewallModePrevention'
4396	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
4397	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
4398	RuleSetType *string `json:"ruleSetType,omitempty"`
4399	// RuleSetVersion - The version of the rule set type.
4400	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
4401	// DisabledRuleGroups - The disabled rule groups.
4402	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
4403	// RequestBodyCheck - Whether allow WAF to check request Body.
4404	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
4405	// MaxRequestBodySize - Maximum request body size for WAF.
4406	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
4407	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
4408	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
4409	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
4410	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
4411	// Exclusions - The exclusion list.
4412	Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"`
4413}
4414
4415// ApplicationRule rule of type application.
4416type ApplicationRule struct {
4417	// SourceAddresses - List of source IP addresses for this rule.
4418	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4419	// DestinationAddresses - List of destination IP addresses or Service Tags.
4420	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
4421	// Protocols - Array of Application Protocols.
4422	Protocols *[]FirewallPolicyRuleApplicationProtocol `json:"protocols,omitempty"`
4423	// TargetFqdns - List of FQDNs for this rule.
4424	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
4425	// TargetUrls - List of Urls for this rule condition.
4426	TargetUrls *[]string `json:"targetUrls,omitempty"`
4427	// FqdnTags - List of FQDN Tags for this rule.
4428	FqdnTags *[]string `json:"fqdnTags,omitempty"`
4429	// SourceIPGroups - List of source IpGroups for this rule.
4430	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
4431	// TerminateTLS - Terminate TLS connections for this rule.
4432	TerminateTLS *bool `json:"terminateTLS,omitempty"`
4433	// WebCategories - List of destination azure web categories.
4434	WebCategories *[]string `json:"webCategories,omitempty"`
4435	// Name - Name of the rule.
4436	Name *string `json:"name,omitempty"`
4437	// Description - Description of the rule.
4438	Description *string `json:"description,omitempty"`
4439	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule'
4440	RuleType RuleType `json:"ruleType,omitempty"`
4441}
4442
4443// MarshalJSON is the custom marshaler for ApplicationRule.
4444func (ar ApplicationRule) MarshalJSON() ([]byte, error) {
4445	ar.RuleType = RuleTypeApplicationRule
4446	objectMap := make(map[string]interface{})
4447	if ar.SourceAddresses != nil {
4448		objectMap["sourceAddresses"] = ar.SourceAddresses
4449	}
4450	if ar.DestinationAddresses != nil {
4451		objectMap["destinationAddresses"] = ar.DestinationAddresses
4452	}
4453	if ar.Protocols != nil {
4454		objectMap["protocols"] = ar.Protocols
4455	}
4456	if ar.TargetFqdns != nil {
4457		objectMap["targetFqdns"] = ar.TargetFqdns
4458	}
4459	if ar.TargetUrls != nil {
4460		objectMap["targetUrls"] = ar.TargetUrls
4461	}
4462	if ar.FqdnTags != nil {
4463		objectMap["fqdnTags"] = ar.FqdnTags
4464	}
4465	if ar.SourceIPGroups != nil {
4466		objectMap["sourceIpGroups"] = ar.SourceIPGroups
4467	}
4468	if ar.TerminateTLS != nil {
4469		objectMap["terminateTLS"] = ar.TerminateTLS
4470	}
4471	if ar.WebCategories != nil {
4472		objectMap["webCategories"] = ar.WebCategories
4473	}
4474	if ar.Name != nil {
4475		objectMap["name"] = ar.Name
4476	}
4477	if ar.Description != nil {
4478		objectMap["description"] = ar.Description
4479	}
4480	if ar.RuleType != "" {
4481		objectMap["ruleType"] = ar.RuleType
4482	}
4483	return json.Marshal(objectMap)
4484}
4485
4486// AsApplicationRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
4487func (ar ApplicationRule) AsApplicationRule() (*ApplicationRule, bool) {
4488	return &ar, true
4489}
4490
4491// AsNatRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
4492func (ar ApplicationRule) AsNatRule() (*NatRule, bool) {
4493	return nil, false
4494}
4495
4496// AsRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
4497func (ar ApplicationRule) AsRule() (*Rule, bool) {
4498	return nil, false
4499}
4500
4501// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
4502func (ar ApplicationRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
4503	return nil, false
4504}
4505
4506// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
4507func (ar ApplicationRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
4508	return &ar, true
4509}
4510
4511// ApplicationSecurityGroup an application security group in a resource group.
4512type ApplicationSecurityGroup struct {
4513	autorest.Response `json:"-"`
4514	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
4515	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
4516	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4517	Etag *string `json:"etag,omitempty"`
4518	// ID - Resource ID.
4519	ID *string `json:"id,omitempty"`
4520	// Name - READ-ONLY; Resource name.
4521	Name *string `json:"name,omitempty"`
4522	// Type - READ-ONLY; Resource type.
4523	Type *string `json:"type,omitempty"`
4524	// Location - Resource location.
4525	Location *string `json:"location,omitempty"`
4526	// Tags - Resource tags.
4527	Tags map[string]*string `json:"tags"`
4528}
4529
4530// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
4531func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
4532	objectMap := make(map[string]interface{})
4533	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
4534		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
4535	}
4536	if asg.ID != nil {
4537		objectMap["id"] = asg.ID
4538	}
4539	if asg.Location != nil {
4540		objectMap["location"] = asg.Location
4541	}
4542	if asg.Tags != nil {
4543		objectMap["tags"] = asg.Tags
4544	}
4545	return json.Marshal(objectMap)
4546}
4547
4548// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
4549func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
4550	var m map[string]*json.RawMessage
4551	err := json.Unmarshal(body, &m)
4552	if err != nil {
4553		return err
4554	}
4555	for k, v := range m {
4556		switch k {
4557		case "properties":
4558			if v != nil {
4559				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
4560				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
4561				if err != nil {
4562					return err
4563				}
4564				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
4565			}
4566		case "etag":
4567			if v != nil {
4568				var etag string
4569				err = json.Unmarshal(*v, &etag)
4570				if err != nil {
4571					return err
4572				}
4573				asg.Etag = &etag
4574			}
4575		case "id":
4576			if v != nil {
4577				var ID string
4578				err = json.Unmarshal(*v, &ID)
4579				if err != nil {
4580					return err
4581				}
4582				asg.ID = &ID
4583			}
4584		case "name":
4585			if v != nil {
4586				var name string
4587				err = json.Unmarshal(*v, &name)
4588				if err != nil {
4589					return err
4590				}
4591				asg.Name = &name
4592			}
4593		case "type":
4594			if v != nil {
4595				var typeVar string
4596				err = json.Unmarshal(*v, &typeVar)
4597				if err != nil {
4598					return err
4599				}
4600				asg.Type = &typeVar
4601			}
4602		case "location":
4603			if v != nil {
4604				var location string
4605				err = json.Unmarshal(*v, &location)
4606				if err != nil {
4607					return err
4608				}
4609				asg.Location = &location
4610			}
4611		case "tags":
4612			if v != nil {
4613				var tags map[string]*string
4614				err = json.Unmarshal(*v, &tags)
4615				if err != nil {
4616					return err
4617				}
4618				asg.Tags = tags
4619			}
4620		}
4621	}
4622
4623	return nil
4624}
4625
4626// ApplicationSecurityGroupListResult a list of application security groups.
4627type ApplicationSecurityGroupListResult struct {
4628	autorest.Response `json:"-"`
4629	// Value - A list of application security groups.
4630	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
4631	// NextLink - READ-ONLY; The URL to get the next set of results.
4632	NextLink *string `json:"nextLink,omitempty"`
4633}
4634
4635// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
4636func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
4637	objectMap := make(map[string]interface{})
4638	if asglr.Value != nil {
4639		objectMap["value"] = asglr.Value
4640	}
4641	return json.Marshal(objectMap)
4642}
4643
4644// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
4645// ApplicationSecurityGroup values.
4646type ApplicationSecurityGroupListResultIterator struct {
4647	i    int
4648	page ApplicationSecurityGroupListResultPage
4649}
4650
4651// NextWithContext advances to the next value.  If there was an error making
4652// the request the iterator does not advance and the error is returned.
4653func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
4654	if tracing.IsEnabled() {
4655		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
4656		defer func() {
4657			sc := -1
4658			if iter.Response().Response.Response != nil {
4659				sc = iter.Response().Response.Response.StatusCode
4660			}
4661			tracing.EndSpan(ctx, sc, err)
4662		}()
4663	}
4664	iter.i++
4665	if iter.i < len(iter.page.Values()) {
4666		return nil
4667	}
4668	err = iter.page.NextWithContext(ctx)
4669	if err != nil {
4670		iter.i--
4671		return err
4672	}
4673	iter.i = 0
4674	return nil
4675}
4676
4677// Next advances to the next value.  If there was an error making
4678// the request the iterator does not advance and the error is returned.
4679// Deprecated: Use NextWithContext() instead.
4680func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
4681	return iter.NextWithContext(context.Background())
4682}
4683
4684// NotDone returns true if the enumeration should be started or is not yet complete.
4685func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
4686	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4687}
4688
4689// Response returns the raw server response from the last page request.
4690func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
4691	return iter.page.Response()
4692}
4693
4694// Value returns the current value or a zero-initialized value if the
4695// iterator has advanced beyond the end of the collection.
4696func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
4697	if !iter.page.NotDone() {
4698		return ApplicationSecurityGroup{}
4699	}
4700	return iter.page.Values()[iter.i]
4701}
4702
4703// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
4704func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
4705	return ApplicationSecurityGroupListResultIterator{page: page}
4706}
4707
4708// IsEmpty returns true if the ListResult contains no values.
4709func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
4710	return asglr.Value == nil || len(*asglr.Value) == 0
4711}
4712
4713// hasNextLink returns true if the NextLink is not empty.
4714func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
4715	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
4716}
4717
4718// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
4719// It returns nil if no more results exist.
4720func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
4721	if !asglr.hasNextLink() {
4722		return nil, nil
4723	}
4724	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4725		autorest.AsJSON(),
4726		autorest.AsGet(),
4727		autorest.WithBaseURL(to.String(asglr.NextLink)))
4728}
4729
4730// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
4731type ApplicationSecurityGroupListResultPage struct {
4732	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
4733	asglr ApplicationSecurityGroupListResult
4734}
4735
4736// NextWithContext advances to the next page of values.  If there was an error making
4737// the request the page does not advance and the error is returned.
4738func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
4739	if tracing.IsEnabled() {
4740		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
4741		defer func() {
4742			sc := -1
4743			if page.Response().Response.Response != nil {
4744				sc = page.Response().Response.Response.StatusCode
4745			}
4746			tracing.EndSpan(ctx, sc, err)
4747		}()
4748	}
4749	for {
4750		next, err := page.fn(ctx, page.asglr)
4751		if err != nil {
4752			return err
4753		}
4754		page.asglr = next
4755		if !next.hasNextLink() || !next.IsEmpty() {
4756			break
4757		}
4758	}
4759	return nil
4760}
4761
4762// Next advances to the next page of values.  If there was an error making
4763// the request the page does not advance and the error is returned.
4764// Deprecated: Use NextWithContext() instead.
4765func (page *ApplicationSecurityGroupListResultPage) Next() error {
4766	return page.NextWithContext(context.Background())
4767}
4768
4769// NotDone returns true if the page enumeration should be started or is not yet complete.
4770func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
4771	return !page.asglr.IsEmpty()
4772}
4773
4774// Response returns the raw server response from the last page request.
4775func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
4776	return page.asglr
4777}
4778
4779// Values returns the slice of values for the current page or nil if there are no values.
4780func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
4781	if page.asglr.IsEmpty() {
4782		return nil
4783	}
4784	return *page.asglr.Value
4785}
4786
4787// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
4788func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
4789	return ApplicationSecurityGroupListResultPage{
4790		fn:    getNextPage,
4791		asglr: cur,
4792	}
4793}
4794
4795// ApplicationSecurityGroupPropertiesFormat application security group properties.
4796type ApplicationSecurityGroupPropertiesFormat struct {
4797	// 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.
4798	ResourceGUID *string `json:"resourceGuid,omitempty"`
4799	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
4800	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4801}
4802
4803// MarshalJSON is the custom marshaler for ApplicationSecurityGroupPropertiesFormat.
4804func (asgpf ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
4805	objectMap := make(map[string]interface{})
4806	return json.Marshal(objectMap)
4807}
4808
4809// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
4810// of a long-running operation.
4811type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
4812	azure.FutureAPI
4813	// Result returns the result of the asynchronous operation.
4814	// If the operation has not completed it will return an error.
4815	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
4816}
4817
4818// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4819func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4820	var azFuture azure.Future
4821	if err := json.Unmarshal(body, &azFuture); err != nil {
4822		return err
4823	}
4824	future.FutureAPI = &azFuture
4825	future.Result = future.result
4826	return nil
4827}
4828
4829// result is the default implementation for ApplicationSecurityGroupsCreateOrUpdateFuture.Result.
4830func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
4831	var done bool
4832	done, err = future.DoneWithContext(context.Background(), client)
4833	if err != nil {
4834		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4835		return
4836	}
4837	if !done {
4838		asg.Response.Response = future.Response()
4839		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
4840		return
4841	}
4842	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4843	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
4844		asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
4845		if err != nil {
4846			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
4847		}
4848	}
4849	return
4850}
4851
4852// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
4853// long-running operation.
4854type ApplicationSecurityGroupsDeleteFuture struct {
4855	azure.FutureAPI
4856	// Result returns the result of the asynchronous operation.
4857	// If the operation has not completed it will return an error.
4858	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
4859}
4860
4861// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4862func (future *ApplicationSecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
4863	var azFuture azure.Future
4864	if err := json.Unmarshal(body, &azFuture); err != nil {
4865		return err
4866	}
4867	future.FutureAPI = &azFuture
4868	future.Result = future.result
4869	return nil
4870}
4871
4872// result is the default implementation for ApplicationSecurityGroupsDeleteFuture.Result.
4873func (future *ApplicationSecurityGroupsDeleteFuture) result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
4874	var done bool
4875	done, err = future.DoneWithContext(context.Background(), client)
4876	if err != nil {
4877		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
4878		return
4879	}
4880	if !done {
4881		ar.Response = future.Response()
4882		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
4883		return
4884	}
4885	ar.Response = future.Response()
4886	return
4887}
4888
4889// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
4890// that belongs to an ExpressRouteCircuit.
4891type AuthorizationListResult struct {
4892	autorest.Response `json:"-"`
4893	// Value - The authorizations in an ExpressRoute Circuit.
4894	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
4895	// NextLink - The URL to get the next set of results.
4896	NextLink *string `json:"nextLink,omitempty"`
4897}
4898
4899// AuthorizationListResultIterator provides access to a complete listing of
4900// ExpressRouteCircuitAuthorization values.
4901type AuthorizationListResultIterator struct {
4902	i    int
4903	page AuthorizationListResultPage
4904}
4905
4906// NextWithContext advances to the next value.  If there was an error making
4907// the request the iterator does not advance and the error is returned.
4908func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
4909	if tracing.IsEnabled() {
4910		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
4911		defer func() {
4912			sc := -1
4913			if iter.Response().Response.Response != nil {
4914				sc = iter.Response().Response.Response.StatusCode
4915			}
4916			tracing.EndSpan(ctx, sc, err)
4917		}()
4918	}
4919	iter.i++
4920	if iter.i < len(iter.page.Values()) {
4921		return nil
4922	}
4923	err = iter.page.NextWithContext(ctx)
4924	if err != nil {
4925		iter.i--
4926		return err
4927	}
4928	iter.i = 0
4929	return nil
4930}
4931
4932// Next advances to the next value.  If there was an error making
4933// the request the iterator does not advance and the error is returned.
4934// Deprecated: Use NextWithContext() instead.
4935func (iter *AuthorizationListResultIterator) Next() error {
4936	return iter.NextWithContext(context.Background())
4937}
4938
4939// NotDone returns true if the enumeration should be started or is not yet complete.
4940func (iter AuthorizationListResultIterator) NotDone() bool {
4941	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4942}
4943
4944// Response returns the raw server response from the last page request.
4945func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
4946	return iter.page.Response()
4947}
4948
4949// Value returns the current value or a zero-initialized value if the
4950// iterator has advanced beyond the end of the collection.
4951func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
4952	if !iter.page.NotDone() {
4953		return ExpressRouteCircuitAuthorization{}
4954	}
4955	return iter.page.Values()[iter.i]
4956}
4957
4958// Creates a new instance of the AuthorizationListResultIterator type.
4959func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
4960	return AuthorizationListResultIterator{page: page}
4961}
4962
4963// IsEmpty returns true if the ListResult contains no values.
4964func (alr AuthorizationListResult) IsEmpty() bool {
4965	return alr.Value == nil || len(*alr.Value) == 0
4966}
4967
4968// hasNextLink returns true if the NextLink is not empty.
4969func (alr AuthorizationListResult) hasNextLink() bool {
4970	return alr.NextLink != nil && len(*alr.NextLink) != 0
4971}
4972
4973// authorizationListResultPreparer prepares a request to retrieve the next set of results.
4974// It returns nil if no more results exist.
4975func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
4976	if !alr.hasNextLink() {
4977		return nil, nil
4978	}
4979	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4980		autorest.AsJSON(),
4981		autorest.AsGet(),
4982		autorest.WithBaseURL(to.String(alr.NextLink)))
4983}
4984
4985// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
4986type AuthorizationListResultPage struct {
4987	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
4988	alr AuthorizationListResult
4989}
4990
4991// NextWithContext advances to the next page of values.  If there was an error making
4992// the request the page does not advance and the error is returned.
4993func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
4994	if tracing.IsEnabled() {
4995		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
4996		defer func() {
4997			sc := -1
4998			if page.Response().Response.Response != nil {
4999				sc = page.Response().Response.Response.StatusCode
5000			}
5001			tracing.EndSpan(ctx, sc, err)
5002		}()
5003	}
5004	for {
5005		next, err := page.fn(ctx, page.alr)
5006		if err != nil {
5007			return err
5008		}
5009		page.alr = next
5010		if !next.hasNextLink() || !next.IsEmpty() {
5011			break
5012		}
5013	}
5014	return nil
5015}
5016
5017// Next advances to the next page of values.  If there was an error making
5018// the request the page does not advance and the error is returned.
5019// Deprecated: Use NextWithContext() instead.
5020func (page *AuthorizationListResultPage) Next() error {
5021	return page.NextWithContext(context.Background())
5022}
5023
5024// NotDone returns true if the page enumeration should be started or is not yet complete.
5025func (page AuthorizationListResultPage) NotDone() bool {
5026	return !page.alr.IsEmpty()
5027}
5028
5029// Response returns the raw server response from the last page request.
5030func (page AuthorizationListResultPage) Response() AuthorizationListResult {
5031	return page.alr
5032}
5033
5034// Values returns the slice of values for the current page or nil if there are no values.
5035func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
5036	if page.alr.IsEmpty() {
5037		return nil
5038	}
5039	return *page.alr.Value
5040}
5041
5042// Creates a new instance of the AuthorizationListResultPage type.
5043func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
5044	return AuthorizationListResultPage{
5045		fn:  getNextPage,
5046		alr: cur,
5047	}
5048}
5049
5050// AuthorizationPropertiesFormat properties of ExpressRouteCircuitAuthorization.
5051type AuthorizationPropertiesFormat struct {
5052	// AuthorizationKey - The authorization key.
5053	AuthorizationKey *string `json:"authorizationKey,omitempty"`
5054	// AuthorizationUseStatus - The authorization use status. Possible values include: 'AuthorizationUseStatusAvailable', 'AuthorizationUseStatusInUse'
5055	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
5056	// ProvisioningState - READ-ONLY; The provisioning state of the authorization resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
5057	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5058}
5059
5060// MarshalJSON is the custom marshaler for AuthorizationPropertiesFormat.
5061func (apf AuthorizationPropertiesFormat) MarshalJSON() ([]byte, error) {
5062	objectMap := make(map[string]interface{})
5063	if apf.AuthorizationKey != nil {
5064		objectMap["authorizationKey"] = apf.AuthorizationKey
5065	}
5066	if apf.AuthorizationUseStatus != "" {
5067		objectMap["authorizationUseStatus"] = apf.AuthorizationUseStatus
5068	}
5069	return json.Marshal(objectMap)
5070}
5071
5072// AutoApprovedPrivateLinkService the information of an AutoApprovedPrivateLinkService.
5073type AutoApprovedPrivateLinkService struct {
5074	// PrivateLinkService - The id of the private link service resource.
5075	PrivateLinkService *string `json:"privateLinkService,omitempty"`
5076}
5077
5078// AutoApprovedPrivateLinkServicesResult an array of private link service id that can be linked to a
5079// private end point with auto approved.
5080type AutoApprovedPrivateLinkServicesResult struct {
5081	autorest.Response `json:"-"`
5082	// Value - An array of auto approved private link service.
5083	Value *[]AutoApprovedPrivateLinkService `json:"value,omitempty"`
5084	// NextLink - READ-ONLY; The URL to get the next set of results.
5085	NextLink *string `json:"nextLink,omitempty"`
5086}
5087
5088// MarshalJSON is the custom marshaler for AutoApprovedPrivateLinkServicesResult.
5089func (aaplsr AutoApprovedPrivateLinkServicesResult) MarshalJSON() ([]byte, error) {
5090	objectMap := make(map[string]interface{})
5091	if aaplsr.Value != nil {
5092		objectMap["value"] = aaplsr.Value
5093	}
5094	return json.Marshal(objectMap)
5095}
5096
5097// AutoApprovedPrivateLinkServicesResultIterator provides access to a complete listing of
5098// AutoApprovedPrivateLinkService values.
5099type AutoApprovedPrivateLinkServicesResultIterator struct {
5100	i    int
5101	page AutoApprovedPrivateLinkServicesResultPage
5102}
5103
5104// NextWithContext advances to the next value.  If there was an error making
5105// the request the iterator does not advance and the error is returned.
5106func (iter *AutoApprovedPrivateLinkServicesResultIterator) NextWithContext(ctx context.Context) (err error) {
5107	if tracing.IsEnabled() {
5108		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultIterator.NextWithContext")
5109		defer func() {
5110			sc := -1
5111			if iter.Response().Response.Response != nil {
5112				sc = iter.Response().Response.Response.StatusCode
5113			}
5114			tracing.EndSpan(ctx, sc, err)
5115		}()
5116	}
5117	iter.i++
5118	if iter.i < len(iter.page.Values()) {
5119		return nil
5120	}
5121	err = iter.page.NextWithContext(ctx)
5122	if err != nil {
5123		iter.i--
5124		return err
5125	}
5126	iter.i = 0
5127	return nil
5128}
5129
5130// Next advances to the next value.  If there was an error making
5131// the request the iterator does not advance and the error is returned.
5132// Deprecated: Use NextWithContext() instead.
5133func (iter *AutoApprovedPrivateLinkServicesResultIterator) Next() error {
5134	return iter.NextWithContext(context.Background())
5135}
5136
5137// NotDone returns true if the enumeration should be started or is not yet complete.
5138func (iter AutoApprovedPrivateLinkServicesResultIterator) NotDone() bool {
5139	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5140}
5141
5142// Response returns the raw server response from the last page request.
5143func (iter AutoApprovedPrivateLinkServicesResultIterator) Response() AutoApprovedPrivateLinkServicesResult {
5144	return iter.page.Response()
5145}
5146
5147// Value returns the current value or a zero-initialized value if the
5148// iterator has advanced beyond the end of the collection.
5149func (iter AutoApprovedPrivateLinkServicesResultIterator) Value() AutoApprovedPrivateLinkService {
5150	if !iter.page.NotDone() {
5151		return AutoApprovedPrivateLinkService{}
5152	}
5153	return iter.page.Values()[iter.i]
5154}
5155
5156// Creates a new instance of the AutoApprovedPrivateLinkServicesResultIterator type.
5157func NewAutoApprovedPrivateLinkServicesResultIterator(page AutoApprovedPrivateLinkServicesResultPage) AutoApprovedPrivateLinkServicesResultIterator {
5158	return AutoApprovedPrivateLinkServicesResultIterator{page: page}
5159}
5160
5161// IsEmpty returns true if the ListResult contains no values.
5162func (aaplsr AutoApprovedPrivateLinkServicesResult) IsEmpty() bool {
5163	return aaplsr.Value == nil || len(*aaplsr.Value) == 0
5164}
5165
5166// hasNextLink returns true if the NextLink is not empty.
5167func (aaplsr AutoApprovedPrivateLinkServicesResult) hasNextLink() bool {
5168	return aaplsr.NextLink != nil && len(*aaplsr.NextLink) != 0
5169}
5170
5171// autoApprovedPrivateLinkServicesResultPreparer prepares a request to retrieve the next set of results.
5172// It returns nil if no more results exist.
5173func (aaplsr AutoApprovedPrivateLinkServicesResult) autoApprovedPrivateLinkServicesResultPreparer(ctx context.Context) (*http.Request, error) {
5174	if !aaplsr.hasNextLink() {
5175		return nil, nil
5176	}
5177	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5178		autorest.AsJSON(),
5179		autorest.AsGet(),
5180		autorest.WithBaseURL(to.String(aaplsr.NextLink)))
5181}
5182
5183// AutoApprovedPrivateLinkServicesResultPage contains a page of AutoApprovedPrivateLinkService values.
5184type AutoApprovedPrivateLinkServicesResultPage struct {
5185	fn     func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)
5186	aaplsr AutoApprovedPrivateLinkServicesResult
5187}
5188
5189// NextWithContext advances to the next page of values.  If there was an error making
5190// the request the page does not advance and the error is returned.
5191func (page *AutoApprovedPrivateLinkServicesResultPage) NextWithContext(ctx context.Context) (err error) {
5192	if tracing.IsEnabled() {
5193		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultPage.NextWithContext")
5194		defer func() {
5195			sc := -1
5196			if page.Response().Response.Response != nil {
5197				sc = page.Response().Response.Response.StatusCode
5198			}
5199			tracing.EndSpan(ctx, sc, err)
5200		}()
5201	}
5202	for {
5203		next, err := page.fn(ctx, page.aaplsr)
5204		if err != nil {
5205			return err
5206		}
5207		page.aaplsr = next
5208		if !next.hasNextLink() || !next.IsEmpty() {
5209			break
5210		}
5211	}
5212	return nil
5213}
5214
5215// Next advances to the next page of values.  If there was an error making
5216// the request the page does not advance and the error is returned.
5217// Deprecated: Use NextWithContext() instead.
5218func (page *AutoApprovedPrivateLinkServicesResultPage) Next() error {
5219	return page.NextWithContext(context.Background())
5220}
5221
5222// NotDone returns true if the page enumeration should be started or is not yet complete.
5223func (page AutoApprovedPrivateLinkServicesResultPage) NotDone() bool {
5224	return !page.aaplsr.IsEmpty()
5225}
5226
5227// Response returns the raw server response from the last page request.
5228func (page AutoApprovedPrivateLinkServicesResultPage) Response() AutoApprovedPrivateLinkServicesResult {
5229	return page.aaplsr
5230}
5231
5232// Values returns the slice of values for the current page or nil if there are no values.
5233func (page AutoApprovedPrivateLinkServicesResultPage) Values() []AutoApprovedPrivateLinkService {
5234	if page.aaplsr.IsEmpty() {
5235		return nil
5236	}
5237	return *page.aaplsr.Value
5238}
5239
5240// Creates a new instance of the AutoApprovedPrivateLinkServicesResultPage type.
5241func NewAutoApprovedPrivateLinkServicesResultPage(cur AutoApprovedPrivateLinkServicesResult, getNextPage func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)) AutoApprovedPrivateLinkServicesResultPage {
5242	return AutoApprovedPrivateLinkServicesResultPage{
5243		fn:     getNextPage,
5244		aaplsr: cur,
5245	}
5246}
5247
5248// Availability availability of the metric.
5249type Availability struct {
5250	// TimeGrain - The time grain of the availability.
5251	TimeGrain *string `json:"timeGrain,omitempty"`
5252	// Retention - The retention of the availability.
5253	Retention *string `json:"retention,omitempty"`
5254	// BlobDuration - Duration of the availability blob.
5255	BlobDuration *string `json:"blobDuration,omitempty"`
5256}
5257
5258// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a
5259// subnet.
5260type AvailableDelegation struct {
5261	// Name - The name of the AvailableDelegation resource.
5262	Name *string `json:"name,omitempty"`
5263	// ID - A unique identifier of the AvailableDelegation resource.
5264	ID *string `json:"id,omitempty"`
5265	// Type - Resource type.
5266	Type *string `json:"type,omitempty"`
5267	// ServiceName - The name of the service and resource.
5268	ServiceName *string `json:"serviceName,omitempty"`
5269	// Actions - The actions permitted to the service upon delegation.
5270	Actions *[]string `json:"actions,omitempty"`
5271}
5272
5273// AvailableDelegationsResult an array of available delegations.
5274type AvailableDelegationsResult struct {
5275	autorest.Response `json:"-"`
5276	// Value - An array of available delegations.
5277	Value *[]AvailableDelegation `json:"value,omitempty"`
5278	// NextLink - READ-ONLY; The URL to get the next set of results.
5279	NextLink *string `json:"nextLink,omitempty"`
5280}
5281
5282// MarshalJSON is the custom marshaler for AvailableDelegationsResult.
5283func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) {
5284	objectMap := make(map[string]interface{})
5285	if adr.Value != nil {
5286		objectMap["value"] = adr.Value
5287	}
5288	return json.Marshal(objectMap)
5289}
5290
5291// AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values.
5292type AvailableDelegationsResultIterator struct {
5293	i    int
5294	page AvailableDelegationsResultPage
5295}
5296
5297// NextWithContext advances to the next value.  If there was an error making
5298// the request the iterator does not advance and the error is returned.
5299func (iter *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) {
5300	if tracing.IsEnabled() {
5301		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.NextWithContext")
5302		defer func() {
5303			sc := -1
5304			if iter.Response().Response.Response != nil {
5305				sc = iter.Response().Response.Response.StatusCode
5306			}
5307			tracing.EndSpan(ctx, sc, err)
5308		}()
5309	}
5310	iter.i++
5311	if iter.i < len(iter.page.Values()) {
5312		return nil
5313	}
5314	err = iter.page.NextWithContext(ctx)
5315	if err != nil {
5316		iter.i--
5317		return err
5318	}
5319	iter.i = 0
5320	return nil
5321}
5322
5323// Next advances to the next value.  If there was an error making
5324// the request the iterator does not advance and the error is returned.
5325// Deprecated: Use NextWithContext() instead.
5326func (iter *AvailableDelegationsResultIterator) Next() error {
5327	return iter.NextWithContext(context.Background())
5328}
5329
5330// NotDone returns true if the enumeration should be started or is not yet complete.
5331func (iter AvailableDelegationsResultIterator) NotDone() bool {
5332	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5333}
5334
5335// Response returns the raw server response from the last page request.
5336func (iter AvailableDelegationsResultIterator) Response() AvailableDelegationsResult {
5337	return iter.page.Response()
5338}
5339
5340// Value returns the current value or a zero-initialized value if the
5341// iterator has advanced beyond the end of the collection.
5342func (iter AvailableDelegationsResultIterator) Value() AvailableDelegation {
5343	if !iter.page.NotDone() {
5344		return AvailableDelegation{}
5345	}
5346	return iter.page.Values()[iter.i]
5347}
5348
5349// Creates a new instance of the AvailableDelegationsResultIterator type.
5350func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator {
5351	return AvailableDelegationsResultIterator{page: page}
5352}
5353
5354// IsEmpty returns true if the ListResult contains no values.
5355func (adr AvailableDelegationsResult) IsEmpty() bool {
5356	return adr.Value == nil || len(*adr.Value) == 0
5357}
5358
5359// hasNextLink returns true if the NextLink is not empty.
5360func (adr AvailableDelegationsResult) hasNextLink() bool {
5361	return adr.NextLink != nil && len(*adr.NextLink) != 0
5362}
5363
5364// availableDelegationsResultPreparer prepares a request to retrieve the next set of results.
5365// It returns nil if no more results exist.
5366func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) {
5367	if !adr.hasNextLink() {
5368		return nil, nil
5369	}
5370	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5371		autorest.AsJSON(),
5372		autorest.AsGet(),
5373		autorest.WithBaseURL(to.String(adr.NextLink)))
5374}
5375
5376// AvailableDelegationsResultPage contains a page of AvailableDelegation values.
5377type AvailableDelegationsResultPage struct {
5378	fn  func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)
5379	adr AvailableDelegationsResult
5380}
5381
5382// NextWithContext advances to the next page of values.  If there was an error making
5383// the request the page does not advance and the error is returned.
5384func (page *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) {
5385	if tracing.IsEnabled() {
5386		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.NextWithContext")
5387		defer func() {
5388			sc := -1
5389			if page.Response().Response.Response != nil {
5390				sc = page.Response().Response.Response.StatusCode
5391			}
5392			tracing.EndSpan(ctx, sc, err)
5393		}()
5394	}
5395	for {
5396		next, err := page.fn(ctx, page.adr)
5397		if err != nil {
5398			return err
5399		}
5400		page.adr = next
5401		if !next.hasNextLink() || !next.IsEmpty() {
5402			break
5403		}
5404	}
5405	return nil
5406}
5407
5408// Next advances to the next page of values.  If there was an error making
5409// the request the page does not advance and the error is returned.
5410// Deprecated: Use NextWithContext() instead.
5411func (page *AvailableDelegationsResultPage) Next() error {
5412	return page.NextWithContext(context.Background())
5413}
5414
5415// NotDone returns true if the page enumeration should be started or is not yet complete.
5416func (page AvailableDelegationsResultPage) NotDone() bool {
5417	return !page.adr.IsEmpty()
5418}
5419
5420// Response returns the raw server response from the last page request.
5421func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult {
5422	return page.adr
5423}
5424
5425// Values returns the slice of values for the current page or nil if there are no values.
5426func (page AvailableDelegationsResultPage) Values() []AvailableDelegation {
5427	if page.adr.IsEmpty() {
5428		return nil
5429	}
5430	return *page.adr.Value
5431}
5432
5433// Creates a new instance of the AvailableDelegationsResultPage type.
5434func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage {
5435	return AvailableDelegationsResultPage{
5436		fn:  getNextPage,
5437		adr: cur,
5438	}
5439}
5440
5441// AvailablePrivateEndpointType the information of an AvailablePrivateEndpointType.
5442type AvailablePrivateEndpointType struct {
5443	// Name - The name of the service and resource.
5444	Name *string `json:"name,omitempty"`
5445	// ID - A unique identifier of the AvailablePrivateEndpoint Type resource.
5446	ID *string `json:"id,omitempty"`
5447	// Type - Resource type.
5448	Type *string `json:"type,omitempty"`
5449	// ResourceName - The name of the service and resource.
5450	ResourceName *string `json:"resourceName,omitempty"`
5451	// DisplayName - Display name of the resource.
5452	DisplayName *string `json:"displayName,omitempty"`
5453}
5454
5455// AvailablePrivateEndpointTypesResult an array of available PrivateEndpoint types.
5456type AvailablePrivateEndpointTypesResult struct {
5457	autorest.Response `json:"-"`
5458	// Value - An array of available privateEndpoint type.
5459	Value *[]AvailablePrivateEndpointType `json:"value,omitempty"`
5460	// NextLink - READ-ONLY; The URL to get the next set of results.
5461	NextLink *string `json:"nextLink,omitempty"`
5462}
5463
5464// MarshalJSON is the custom marshaler for AvailablePrivateEndpointTypesResult.
5465func (apetr AvailablePrivateEndpointTypesResult) MarshalJSON() ([]byte, error) {
5466	objectMap := make(map[string]interface{})
5467	if apetr.Value != nil {
5468		objectMap["value"] = apetr.Value
5469	}
5470	return json.Marshal(objectMap)
5471}
5472
5473// AvailablePrivateEndpointTypesResultIterator provides access to a complete listing of
5474// AvailablePrivateEndpointType values.
5475type AvailablePrivateEndpointTypesResultIterator struct {
5476	i    int
5477	page AvailablePrivateEndpointTypesResultPage
5478}
5479
5480// NextWithContext advances to the next value.  If there was an error making
5481// the request the iterator does not advance and the error is returned.
5482func (iter *AvailablePrivateEndpointTypesResultIterator) NextWithContext(ctx context.Context) (err error) {
5483	if tracing.IsEnabled() {
5484		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultIterator.NextWithContext")
5485		defer func() {
5486			sc := -1
5487			if iter.Response().Response.Response != nil {
5488				sc = iter.Response().Response.Response.StatusCode
5489			}
5490			tracing.EndSpan(ctx, sc, err)
5491		}()
5492	}
5493	iter.i++
5494	if iter.i < len(iter.page.Values()) {
5495		return nil
5496	}
5497	err = iter.page.NextWithContext(ctx)
5498	if err != nil {
5499		iter.i--
5500		return err
5501	}
5502	iter.i = 0
5503	return nil
5504}
5505
5506// Next advances to the next value.  If there was an error making
5507// the request the iterator does not advance and the error is returned.
5508// Deprecated: Use NextWithContext() instead.
5509func (iter *AvailablePrivateEndpointTypesResultIterator) Next() error {
5510	return iter.NextWithContext(context.Background())
5511}
5512
5513// NotDone returns true if the enumeration should be started or is not yet complete.
5514func (iter AvailablePrivateEndpointTypesResultIterator) NotDone() bool {
5515	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5516}
5517
5518// Response returns the raw server response from the last page request.
5519func (iter AvailablePrivateEndpointTypesResultIterator) Response() AvailablePrivateEndpointTypesResult {
5520	return iter.page.Response()
5521}
5522
5523// Value returns the current value or a zero-initialized value if the
5524// iterator has advanced beyond the end of the collection.
5525func (iter AvailablePrivateEndpointTypesResultIterator) Value() AvailablePrivateEndpointType {
5526	if !iter.page.NotDone() {
5527		return AvailablePrivateEndpointType{}
5528	}
5529	return iter.page.Values()[iter.i]
5530}
5531
5532// Creates a new instance of the AvailablePrivateEndpointTypesResultIterator type.
5533func NewAvailablePrivateEndpointTypesResultIterator(page AvailablePrivateEndpointTypesResultPage) AvailablePrivateEndpointTypesResultIterator {
5534	return AvailablePrivateEndpointTypesResultIterator{page: page}
5535}
5536
5537// IsEmpty returns true if the ListResult contains no values.
5538func (apetr AvailablePrivateEndpointTypesResult) IsEmpty() bool {
5539	return apetr.Value == nil || len(*apetr.Value) == 0
5540}
5541
5542// hasNextLink returns true if the NextLink is not empty.
5543func (apetr AvailablePrivateEndpointTypesResult) hasNextLink() bool {
5544	return apetr.NextLink != nil && len(*apetr.NextLink) != 0
5545}
5546
5547// availablePrivateEndpointTypesResultPreparer prepares a request to retrieve the next set of results.
5548// It returns nil if no more results exist.
5549func (apetr AvailablePrivateEndpointTypesResult) availablePrivateEndpointTypesResultPreparer(ctx context.Context) (*http.Request, error) {
5550	if !apetr.hasNextLink() {
5551		return nil, nil
5552	}
5553	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5554		autorest.AsJSON(),
5555		autorest.AsGet(),
5556		autorest.WithBaseURL(to.String(apetr.NextLink)))
5557}
5558
5559// AvailablePrivateEndpointTypesResultPage contains a page of AvailablePrivateEndpointType values.
5560type AvailablePrivateEndpointTypesResultPage struct {
5561	fn    func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)
5562	apetr AvailablePrivateEndpointTypesResult
5563}
5564
5565// NextWithContext advances to the next page of values.  If there was an error making
5566// the request the page does not advance and the error is returned.
5567func (page *AvailablePrivateEndpointTypesResultPage) NextWithContext(ctx context.Context) (err error) {
5568	if tracing.IsEnabled() {
5569		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultPage.NextWithContext")
5570		defer func() {
5571			sc := -1
5572			if page.Response().Response.Response != nil {
5573				sc = page.Response().Response.Response.StatusCode
5574			}
5575			tracing.EndSpan(ctx, sc, err)
5576		}()
5577	}
5578	for {
5579		next, err := page.fn(ctx, page.apetr)
5580		if err != nil {
5581			return err
5582		}
5583		page.apetr = next
5584		if !next.hasNextLink() || !next.IsEmpty() {
5585			break
5586		}
5587	}
5588	return nil
5589}
5590
5591// Next advances to the next page of values.  If there was an error making
5592// the request the page does not advance and the error is returned.
5593// Deprecated: Use NextWithContext() instead.
5594func (page *AvailablePrivateEndpointTypesResultPage) Next() error {
5595	return page.NextWithContext(context.Background())
5596}
5597
5598// NotDone returns true if the page enumeration should be started or is not yet complete.
5599func (page AvailablePrivateEndpointTypesResultPage) NotDone() bool {
5600	return !page.apetr.IsEmpty()
5601}
5602
5603// Response returns the raw server response from the last page request.
5604func (page AvailablePrivateEndpointTypesResultPage) Response() AvailablePrivateEndpointTypesResult {
5605	return page.apetr
5606}
5607
5608// Values returns the slice of values for the current page or nil if there are no values.
5609func (page AvailablePrivateEndpointTypesResultPage) Values() []AvailablePrivateEndpointType {
5610	if page.apetr.IsEmpty() {
5611		return nil
5612	}
5613	return *page.apetr.Value
5614}
5615
5616// Creates a new instance of the AvailablePrivateEndpointTypesResultPage type.
5617func NewAvailablePrivateEndpointTypesResultPage(cur AvailablePrivateEndpointTypesResult, getNextPage func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)) AvailablePrivateEndpointTypesResultPage {
5618	return AvailablePrivateEndpointTypesResultPage{
5619		fn:    getNextPage,
5620		apetr: cur,
5621	}
5622}
5623
5624// AvailableProvidersList list of available countries with details.
5625type AvailableProvidersList struct {
5626	autorest.Response `json:"-"`
5627	// Countries - List of available countries.
5628	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
5629}
5630
5631// AvailableProvidersListCity city or town details.
5632type AvailableProvidersListCity struct {
5633	// CityName - The city or town name.
5634	CityName *string `json:"cityName,omitempty"`
5635	// Providers - A list of Internet service providers.
5636	Providers *[]string `json:"providers,omitempty"`
5637}
5638
5639// AvailableProvidersListCountry country details.
5640type AvailableProvidersListCountry struct {
5641	// CountryName - The country name.
5642	CountryName *string `json:"countryName,omitempty"`
5643	// Providers - A list of Internet service providers.
5644	Providers *[]string `json:"providers,omitempty"`
5645	// States - List of available states in the country.
5646	States *[]AvailableProvidersListState `json:"states,omitempty"`
5647}
5648
5649// AvailableProvidersListParameters constraints that determine the list of available Internet service
5650// providers.
5651type AvailableProvidersListParameters struct {
5652	// AzureLocations - A list of Azure regions.
5653	AzureLocations *[]string `json:"azureLocations,omitempty"`
5654	// Country - The country for available providers list.
5655	Country *string `json:"country,omitempty"`
5656	// State - The state for available providers list.
5657	State *string `json:"state,omitempty"`
5658	// City - The city or town for available providers list.
5659	City *string `json:"city,omitempty"`
5660}
5661
5662// AvailableProvidersListState state details.
5663type AvailableProvidersListState struct {
5664	// StateName - The state name.
5665	StateName *string `json:"stateName,omitempty"`
5666	// Providers - A list of Internet service providers.
5667	Providers *[]string `json:"providers,omitempty"`
5668	// Cities - List of available cities or towns in the state.
5669	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
5670}
5671
5672// AvailableServiceAlias the available service alias.
5673type AvailableServiceAlias struct {
5674	// Name - The name of the service alias.
5675	Name *string `json:"name,omitempty"`
5676	// ID - The ID of the service alias.
5677	ID *string `json:"id,omitempty"`
5678	// Type - The type of the resource.
5679	Type *string `json:"type,omitempty"`
5680	// ResourceName - The resource name of the service alias.
5681	ResourceName *string `json:"resourceName,omitempty"`
5682}
5683
5684// AvailableServiceAliasesResult an array of available service aliases.
5685type AvailableServiceAliasesResult struct {
5686	autorest.Response `json:"-"`
5687	// Value - An array of available service aliases.
5688	Value *[]AvailableServiceAlias `json:"value,omitempty"`
5689	// NextLink - READ-ONLY; The URL to get the next set of results.
5690	NextLink *string `json:"nextLink,omitempty"`
5691}
5692
5693// MarshalJSON is the custom marshaler for AvailableServiceAliasesResult.
5694func (asar AvailableServiceAliasesResult) MarshalJSON() ([]byte, error) {
5695	objectMap := make(map[string]interface{})
5696	if asar.Value != nil {
5697		objectMap["value"] = asar.Value
5698	}
5699	return json.Marshal(objectMap)
5700}
5701
5702// AvailableServiceAliasesResultIterator provides access to a complete listing of AvailableServiceAlias
5703// values.
5704type AvailableServiceAliasesResultIterator struct {
5705	i    int
5706	page AvailableServiceAliasesResultPage
5707}
5708
5709// NextWithContext advances to the next value.  If there was an error making
5710// the request the iterator does not advance and the error is returned.
5711func (iter *AvailableServiceAliasesResultIterator) NextWithContext(ctx context.Context) (err error) {
5712	if tracing.IsEnabled() {
5713		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesResultIterator.NextWithContext")
5714		defer func() {
5715			sc := -1
5716			if iter.Response().Response.Response != nil {
5717				sc = iter.Response().Response.Response.StatusCode
5718			}
5719			tracing.EndSpan(ctx, sc, err)
5720		}()
5721	}
5722	iter.i++
5723	if iter.i < len(iter.page.Values()) {
5724		return nil
5725	}
5726	err = iter.page.NextWithContext(ctx)
5727	if err != nil {
5728		iter.i--
5729		return err
5730	}
5731	iter.i = 0
5732	return nil
5733}
5734
5735// Next advances to the next value.  If there was an error making
5736// the request the iterator does not advance and the error is returned.
5737// Deprecated: Use NextWithContext() instead.
5738func (iter *AvailableServiceAliasesResultIterator) Next() error {
5739	return iter.NextWithContext(context.Background())
5740}
5741
5742// NotDone returns true if the enumeration should be started or is not yet complete.
5743func (iter AvailableServiceAliasesResultIterator) NotDone() bool {
5744	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5745}
5746
5747// Response returns the raw server response from the last page request.
5748func (iter AvailableServiceAliasesResultIterator) Response() AvailableServiceAliasesResult {
5749	return iter.page.Response()
5750}
5751
5752// Value returns the current value or a zero-initialized value if the
5753// iterator has advanced beyond the end of the collection.
5754func (iter AvailableServiceAliasesResultIterator) Value() AvailableServiceAlias {
5755	if !iter.page.NotDone() {
5756		return AvailableServiceAlias{}
5757	}
5758	return iter.page.Values()[iter.i]
5759}
5760
5761// Creates a new instance of the AvailableServiceAliasesResultIterator type.
5762func NewAvailableServiceAliasesResultIterator(page AvailableServiceAliasesResultPage) AvailableServiceAliasesResultIterator {
5763	return AvailableServiceAliasesResultIterator{page: page}
5764}
5765
5766// IsEmpty returns true if the ListResult contains no values.
5767func (asar AvailableServiceAliasesResult) IsEmpty() bool {
5768	return asar.Value == nil || len(*asar.Value) == 0
5769}
5770
5771// hasNextLink returns true if the NextLink is not empty.
5772func (asar AvailableServiceAliasesResult) hasNextLink() bool {
5773	return asar.NextLink != nil && len(*asar.NextLink) != 0
5774}
5775
5776// availableServiceAliasesResultPreparer prepares a request to retrieve the next set of results.
5777// It returns nil if no more results exist.
5778func (asar AvailableServiceAliasesResult) availableServiceAliasesResultPreparer(ctx context.Context) (*http.Request, error) {
5779	if !asar.hasNextLink() {
5780		return nil, nil
5781	}
5782	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5783		autorest.AsJSON(),
5784		autorest.AsGet(),
5785		autorest.WithBaseURL(to.String(asar.NextLink)))
5786}
5787
5788// AvailableServiceAliasesResultPage contains a page of AvailableServiceAlias values.
5789type AvailableServiceAliasesResultPage struct {
5790	fn   func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error)
5791	asar AvailableServiceAliasesResult
5792}
5793
5794// NextWithContext advances to the next page of values.  If there was an error making
5795// the request the page does not advance and the error is returned.
5796func (page *AvailableServiceAliasesResultPage) NextWithContext(ctx context.Context) (err error) {
5797	if tracing.IsEnabled() {
5798		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesResultPage.NextWithContext")
5799		defer func() {
5800			sc := -1
5801			if page.Response().Response.Response != nil {
5802				sc = page.Response().Response.Response.StatusCode
5803			}
5804			tracing.EndSpan(ctx, sc, err)
5805		}()
5806	}
5807	for {
5808		next, err := page.fn(ctx, page.asar)
5809		if err != nil {
5810			return err
5811		}
5812		page.asar = next
5813		if !next.hasNextLink() || !next.IsEmpty() {
5814			break
5815		}
5816	}
5817	return nil
5818}
5819
5820// Next advances to the next page of values.  If there was an error making
5821// the request the page does not advance and the error is returned.
5822// Deprecated: Use NextWithContext() instead.
5823func (page *AvailableServiceAliasesResultPage) Next() error {
5824	return page.NextWithContext(context.Background())
5825}
5826
5827// NotDone returns true if the page enumeration should be started or is not yet complete.
5828func (page AvailableServiceAliasesResultPage) NotDone() bool {
5829	return !page.asar.IsEmpty()
5830}
5831
5832// Response returns the raw server response from the last page request.
5833func (page AvailableServiceAliasesResultPage) Response() AvailableServiceAliasesResult {
5834	return page.asar
5835}
5836
5837// Values returns the slice of values for the current page or nil if there are no values.
5838func (page AvailableServiceAliasesResultPage) Values() []AvailableServiceAlias {
5839	if page.asar.IsEmpty() {
5840		return nil
5841	}
5842	return *page.asar.Value
5843}
5844
5845// Creates a new instance of the AvailableServiceAliasesResultPage type.
5846func NewAvailableServiceAliasesResultPage(cur AvailableServiceAliasesResult, getNextPage func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error)) AvailableServiceAliasesResultPage {
5847	return AvailableServiceAliasesResultPage{
5848		fn:   getNextPage,
5849		asar: cur,
5850	}
5851}
5852
5853// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
5854// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
5855// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
5856// operation succeeded, the response body includes the HTTP status code for the successful request. If the
5857// asynchronous operation failed, the response body includes the HTTP status code for the failed request
5858// and error information regarding the failure.
5859type AzureAsyncOperationResult struct {
5860	// Status - Status of the Azure async operation. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
5861	Status OperationStatus `json:"status,omitempty"`
5862	// Error - Details of the error occurred during specified asynchronous operation.
5863	Error *Error `json:"error,omitempty"`
5864}
5865
5866// AzureFirewall azure Firewall resource.
5867type AzureFirewall struct {
5868	autorest.Response `json:"-"`
5869	// AzureFirewallPropertiesFormat - Properties of the azure firewall.
5870	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
5871	// Zones - A list of availability zones denoting where the resource needs to come from.
5872	Zones *[]string `json:"zones,omitempty"`
5873	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5874	Etag *string `json:"etag,omitempty"`
5875	// ID - Resource ID.
5876	ID *string `json:"id,omitempty"`
5877	// Name - READ-ONLY; Resource name.
5878	Name *string `json:"name,omitempty"`
5879	// Type - READ-ONLY; Resource type.
5880	Type *string `json:"type,omitempty"`
5881	// Location - Resource location.
5882	Location *string `json:"location,omitempty"`
5883	// Tags - Resource tags.
5884	Tags map[string]*string `json:"tags"`
5885}
5886
5887// MarshalJSON is the custom marshaler for AzureFirewall.
5888func (af AzureFirewall) MarshalJSON() ([]byte, error) {
5889	objectMap := make(map[string]interface{})
5890	if af.AzureFirewallPropertiesFormat != nil {
5891		objectMap["properties"] = af.AzureFirewallPropertiesFormat
5892	}
5893	if af.Zones != nil {
5894		objectMap["zones"] = af.Zones
5895	}
5896	if af.ID != nil {
5897		objectMap["id"] = af.ID
5898	}
5899	if af.Location != nil {
5900		objectMap["location"] = af.Location
5901	}
5902	if af.Tags != nil {
5903		objectMap["tags"] = af.Tags
5904	}
5905	return json.Marshal(objectMap)
5906}
5907
5908// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
5909func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
5910	var m map[string]*json.RawMessage
5911	err := json.Unmarshal(body, &m)
5912	if err != nil {
5913		return err
5914	}
5915	for k, v := range m {
5916		switch k {
5917		case "properties":
5918			if v != nil {
5919				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
5920				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
5921				if err != nil {
5922					return err
5923				}
5924				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
5925			}
5926		case "zones":
5927			if v != nil {
5928				var zones []string
5929				err = json.Unmarshal(*v, &zones)
5930				if err != nil {
5931					return err
5932				}
5933				af.Zones = &zones
5934			}
5935		case "etag":
5936			if v != nil {
5937				var etag string
5938				err = json.Unmarshal(*v, &etag)
5939				if err != nil {
5940					return err
5941				}
5942				af.Etag = &etag
5943			}
5944		case "id":
5945			if v != nil {
5946				var ID string
5947				err = json.Unmarshal(*v, &ID)
5948				if err != nil {
5949					return err
5950				}
5951				af.ID = &ID
5952			}
5953		case "name":
5954			if v != nil {
5955				var name string
5956				err = json.Unmarshal(*v, &name)
5957				if err != nil {
5958					return err
5959				}
5960				af.Name = &name
5961			}
5962		case "type":
5963			if v != nil {
5964				var typeVar string
5965				err = json.Unmarshal(*v, &typeVar)
5966				if err != nil {
5967					return err
5968				}
5969				af.Type = &typeVar
5970			}
5971		case "location":
5972			if v != nil {
5973				var location string
5974				err = json.Unmarshal(*v, &location)
5975				if err != nil {
5976					return err
5977				}
5978				af.Location = &location
5979			}
5980		case "tags":
5981			if v != nil {
5982				var tags map[string]*string
5983				err = json.Unmarshal(*v, &tags)
5984				if err != nil {
5985					return err
5986				}
5987				af.Tags = tags
5988			}
5989		}
5990	}
5991
5992	return nil
5993}
5994
5995// AzureFirewallApplicationRule properties of an application rule.
5996type AzureFirewallApplicationRule struct {
5997	// Name - Name of the application rule.
5998	Name *string `json:"name,omitempty"`
5999	// Description - Description of the rule.
6000	Description *string `json:"description,omitempty"`
6001	// SourceAddresses - List of source IP addresses for this rule.
6002	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
6003	// Protocols - Array of ApplicationRuleProtocols.
6004	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
6005	// TargetFqdns - List of FQDNs for this rule.
6006	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
6007	// FqdnTags - List of FQDN Tags for this rule.
6008	FqdnTags *[]string `json:"fqdnTags,omitempty"`
6009	// SourceIPGroups - List of source IpGroups for this rule.
6010	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
6011}
6012
6013// AzureFirewallApplicationRuleCollection application rule collection resource.
6014type AzureFirewallApplicationRuleCollection struct {
6015	// AzureFirewallApplicationRuleCollectionPropertiesFormat - Properties of the azure firewall application rule collection.
6016	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
6017	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
6018	Name *string `json:"name,omitempty"`
6019	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6020	Etag *string `json:"etag,omitempty"`
6021	// ID - Resource ID.
6022	ID *string `json:"id,omitempty"`
6023}
6024
6025// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
6026func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
6027	objectMap := make(map[string]interface{})
6028	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
6029		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
6030	}
6031	if afarc.Name != nil {
6032		objectMap["name"] = afarc.Name
6033	}
6034	if afarc.ID != nil {
6035		objectMap["id"] = afarc.ID
6036	}
6037	return json.Marshal(objectMap)
6038}
6039
6040// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
6041func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
6042	var m map[string]*json.RawMessage
6043	err := json.Unmarshal(body, &m)
6044	if err != nil {
6045		return err
6046	}
6047	for k, v := range m {
6048		switch k {
6049		case "properties":
6050			if v != nil {
6051				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
6052				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
6053				if err != nil {
6054					return err
6055				}
6056				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
6057			}
6058		case "name":
6059			if v != nil {
6060				var name string
6061				err = json.Unmarshal(*v, &name)
6062				if err != nil {
6063					return err
6064				}
6065				afarc.Name = &name
6066			}
6067		case "etag":
6068			if v != nil {
6069				var etag string
6070				err = json.Unmarshal(*v, &etag)
6071				if err != nil {
6072					return err
6073				}
6074				afarc.Etag = &etag
6075			}
6076		case "id":
6077			if v != nil {
6078				var ID string
6079				err = json.Unmarshal(*v, &ID)
6080				if err != nil {
6081					return err
6082				}
6083				afarc.ID = &ID
6084			}
6085		}
6086	}
6087
6088	return nil
6089}
6090
6091// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
6092type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
6093	// Priority - Priority of the application rule collection resource.
6094	Priority *int32 `json:"priority,omitempty"`
6095	// Action - The action type of a rule collection.
6096	Action *AzureFirewallRCAction `json:"action,omitempty"`
6097	// Rules - Collection of rules used by a application rule collection.
6098	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
6099	// ProvisioningState - READ-ONLY; The provisioning state of the application rule collection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
6100	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6101}
6102
6103// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollectionPropertiesFormat.
6104func (afarcpf AzureFirewallApplicationRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) {
6105	objectMap := make(map[string]interface{})
6106	if afarcpf.Priority != nil {
6107		objectMap["priority"] = afarcpf.Priority
6108	}
6109	if afarcpf.Action != nil {
6110		objectMap["action"] = afarcpf.Action
6111	}
6112	if afarcpf.Rules != nil {
6113		objectMap["rules"] = afarcpf.Rules
6114	}
6115	return json.Marshal(objectMap)
6116}
6117
6118// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
6119type AzureFirewallApplicationRuleProtocol struct {
6120	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS', 'AzureFirewallApplicationRuleProtocolTypeMssql'
6121	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
6122	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
6123	Port *int32 `json:"port,omitempty"`
6124}
6125
6126// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource.
6127type AzureFirewallFqdnTag struct {
6128	// AzureFirewallFqdnTagPropertiesFormat - Properties of the azure firewall FQDN tag.
6129	*AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"`
6130	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6131	Etag *string `json:"etag,omitempty"`
6132	// ID - Resource ID.
6133	ID *string `json:"id,omitempty"`
6134	// Name - READ-ONLY; Resource name.
6135	Name *string `json:"name,omitempty"`
6136	// Type - READ-ONLY; Resource type.
6137	Type *string `json:"type,omitempty"`
6138	// Location - Resource location.
6139	Location *string `json:"location,omitempty"`
6140	// Tags - Resource tags.
6141	Tags map[string]*string `json:"tags"`
6142}
6143
6144// MarshalJSON is the custom marshaler for AzureFirewallFqdnTag.
6145func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) {
6146	objectMap := make(map[string]interface{})
6147	if afft.AzureFirewallFqdnTagPropertiesFormat != nil {
6148		objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat
6149	}
6150	if afft.ID != nil {
6151		objectMap["id"] = afft.ID
6152	}
6153	if afft.Location != nil {
6154		objectMap["location"] = afft.Location
6155	}
6156	if afft.Tags != nil {
6157		objectMap["tags"] = afft.Tags
6158	}
6159	return json.Marshal(objectMap)
6160}
6161
6162// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct.
6163func (afft *AzureFirewallFqdnTag) UnmarshalJSON(body []byte) error {
6164	var m map[string]*json.RawMessage
6165	err := json.Unmarshal(body, &m)
6166	if err != nil {
6167		return err
6168	}
6169	for k, v := range m {
6170		switch k {
6171		case "properties":
6172			if v != nil {
6173				var azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat
6174				err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat)
6175				if err != nil {
6176					return err
6177				}
6178				afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat
6179			}
6180		case "etag":
6181			if v != nil {
6182				var etag string
6183				err = json.Unmarshal(*v, &etag)
6184				if err != nil {
6185					return err
6186				}
6187				afft.Etag = &etag
6188			}
6189		case "id":
6190			if v != nil {
6191				var ID string
6192				err = json.Unmarshal(*v, &ID)
6193				if err != nil {
6194					return err
6195				}
6196				afft.ID = &ID
6197			}
6198		case "name":
6199			if v != nil {
6200				var name string
6201				err = json.Unmarshal(*v, &name)
6202				if err != nil {
6203					return err
6204				}
6205				afft.Name = &name
6206			}
6207		case "type":
6208			if v != nil {
6209				var typeVar string
6210				err = json.Unmarshal(*v, &typeVar)
6211				if err != nil {
6212					return err
6213				}
6214				afft.Type = &typeVar
6215			}
6216		case "location":
6217			if v != nil {
6218				var location string
6219				err = json.Unmarshal(*v, &location)
6220				if err != nil {
6221					return err
6222				}
6223				afft.Location = &location
6224			}
6225		case "tags":
6226			if v != nil {
6227				var tags map[string]*string
6228				err = json.Unmarshal(*v, &tags)
6229				if err != nil {
6230					return err
6231				}
6232				afft.Tags = tags
6233			}
6234		}
6235	}
6236
6237	return nil
6238}
6239
6240// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call.
6241type AzureFirewallFqdnTagListResult struct {
6242	autorest.Response `json:"-"`
6243	// Value - List of Azure Firewall FQDN Tags in a resource group.
6244	Value *[]AzureFirewallFqdnTag `json:"value,omitempty"`
6245	// NextLink - URL to get the next set of results.
6246	NextLink *string `json:"nextLink,omitempty"`
6247}
6248
6249// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag
6250// values.
6251type AzureFirewallFqdnTagListResultIterator struct {
6252	i    int
6253	page AzureFirewallFqdnTagListResultPage
6254}
6255
6256// NextWithContext advances to the next value.  If there was an error making
6257// the request the iterator does not advance and the error is returned.
6258func (iter *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) {
6259	if tracing.IsEnabled() {
6260		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.NextWithContext")
6261		defer func() {
6262			sc := -1
6263			if iter.Response().Response.Response != nil {
6264				sc = iter.Response().Response.Response.StatusCode
6265			}
6266			tracing.EndSpan(ctx, sc, err)
6267		}()
6268	}
6269	iter.i++
6270	if iter.i < len(iter.page.Values()) {
6271		return nil
6272	}
6273	err = iter.page.NextWithContext(ctx)
6274	if err != nil {
6275		iter.i--
6276		return err
6277	}
6278	iter.i = 0
6279	return nil
6280}
6281
6282// Next advances to the next value.  If there was an error making
6283// the request the iterator does not advance and the error is returned.
6284// Deprecated: Use NextWithContext() instead.
6285func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
6286	return iter.NextWithContext(context.Background())
6287}
6288
6289// NotDone returns true if the enumeration should be started or is not yet complete.
6290func (iter AzureFirewallFqdnTagListResultIterator) NotDone() bool {
6291	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6292}
6293
6294// Response returns the raw server response from the last page request.
6295func (iter AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult {
6296	return iter.page.Response()
6297}
6298
6299// Value returns the current value or a zero-initialized value if the
6300// iterator has advanced beyond the end of the collection.
6301func (iter AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag {
6302	if !iter.page.NotDone() {
6303		return AzureFirewallFqdnTag{}
6304	}
6305	return iter.page.Values()[iter.i]
6306}
6307
6308// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type.
6309func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator {
6310	return AzureFirewallFqdnTagListResultIterator{page: page}
6311}
6312
6313// IsEmpty returns true if the ListResult contains no values.
6314func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
6315	return afftlr.Value == nil || len(*afftlr.Value) == 0
6316}
6317
6318// hasNextLink returns true if the NextLink is not empty.
6319func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool {
6320	return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0
6321}
6322
6323// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results.
6324// It returns nil if no more results exist.
6325func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) {
6326	if !afftlr.hasNextLink() {
6327		return nil, nil
6328	}
6329	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6330		autorest.AsJSON(),
6331		autorest.AsGet(),
6332		autorest.WithBaseURL(to.String(afftlr.NextLink)))
6333}
6334
6335// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values.
6336type AzureFirewallFqdnTagListResultPage struct {
6337	fn     func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
6338	afftlr AzureFirewallFqdnTagListResult
6339}
6340
6341// NextWithContext advances to the next page of values.  If there was an error making
6342// the request the page does not advance and the error is returned.
6343func (page *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) {
6344	if tracing.IsEnabled() {
6345		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.NextWithContext")
6346		defer func() {
6347			sc := -1
6348			if page.Response().Response.Response != nil {
6349				sc = page.Response().Response.Response.StatusCode
6350			}
6351			tracing.EndSpan(ctx, sc, err)
6352		}()
6353	}
6354	for {
6355		next, err := page.fn(ctx, page.afftlr)
6356		if err != nil {
6357			return err
6358		}
6359		page.afftlr = next
6360		if !next.hasNextLink() || !next.IsEmpty() {
6361			break
6362		}
6363	}
6364	return nil
6365}
6366
6367// Next advances to the next page of values.  If there was an error making
6368// the request the page does not advance and the error is returned.
6369// Deprecated: Use NextWithContext() instead.
6370func (page *AzureFirewallFqdnTagListResultPage) Next() error {
6371	return page.NextWithContext(context.Background())
6372}
6373
6374// NotDone returns true if the page enumeration should be started or is not yet complete.
6375func (page AzureFirewallFqdnTagListResultPage) NotDone() bool {
6376	return !page.afftlr.IsEmpty()
6377}
6378
6379// Response returns the raw server response from the last page request.
6380func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult {
6381	return page.afftlr
6382}
6383
6384// Values returns the slice of values for the current page or nil if there are no values.
6385func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag {
6386	if page.afftlr.IsEmpty() {
6387		return nil
6388	}
6389	return *page.afftlr.Value
6390}
6391
6392// Creates a new instance of the AzureFirewallFqdnTagListResultPage type.
6393func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage {
6394	return AzureFirewallFqdnTagListResultPage{
6395		fn:     getNextPage,
6396		afftlr: cur,
6397	}
6398}
6399
6400// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties.
6401type AzureFirewallFqdnTagPropertiesFormat struct {
6402	// ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall FQDN tag resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
6403	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6404	// FqdnTagName - READ-ONLY; The name of this FQDN Tag.
6405	FqdnTagName *string `json:"fqdnTagName,omitempty"`
6406}
6407
6408// MarshalJSON is the custom marshaler for AzureFirewallFqdnTagPropertiesFormat.
6409func (afftpf AzureFirewallFqdnTagPropertiesFormat) MarshalJSON() ([]byte, error) {
6410	objectMap := make(map[string]interface{})
6411	return json.Marshal(objectMap)
6412}
6413
6414// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
6415type AzureFirewallIPConfiguration struct {
6416	// AzureFirewallIPConfigurationPropertiesFormat - Properties of the azure firewall IP configuration.
6417	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
6418	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
6419	Name *string `json:"name,omitempty"`
6420	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6421	Etag *string `json:"etag,omitempty"`
6422	// Type - READ-ONLY; Type of the resource.
6423	Type *string `json:"type,omitempty"`
6424	// ID - Resource ID.
6425	ID *string `json:"id,omitempty"`
6426}
6427
6428// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
6429func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
6430	objectMap := make(map[string]interface{})
6431	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
6432		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
6433	}
6434	if afic.Name != nil {
6435		objectMap["name"] = afic.Name
6436	}
6437	if afic.ID != nil {
6438		objectMap["id"] = afic.ID
6439	}
6440	return json.Marshal(objectMap)
6441}
6442
6443// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
6444func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
6445	var m map[string]*json.RawMessage
6446	err := json.Unmarshal(body, &m)
6447	if err != nil {
6448		return err
6449	}
6450	for k, v := range m {
6451		switch k {
6452		case "properties":
6453			if v != nil {
6454				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
6455				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
6456				if err != nil {
6457					return err
6458				}
6459				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
6460			}
6461		case "name":
6462			if v != nil {
6463				var name string
6464				err = json.Unmarshal(*v, &name)
6465				if err != nil {
6466					return err
6467				}
6468				afic.Name = &name
6469			}
6470		case "etag":
6471			if v != nil {
6472				var etag string
6473				err = json.Unmarshal(*v, &etag)
6474				if err != nil {
6475					return err
6476				}
6477				afic.Etag = &etag
6478			}
6479		case "type":
6480			if v != nil {
6481				var typeVar string
6482				err = json.Unmarshal(*v, &typeVar)
6483				if err != nil {
6484					return err
6485				}
6486				afic.Type = &typeVar
6487			}
6488		case "id":
6489			if v != nil {
6490				var ID string
6491				err = json.Unmarshal(*v, &ID)
6492				if err != nil {
6493					return err
6494				}
6495				afic.ID = &ID
6496			}
6497		}
6498	}
6499
6500	return nil
6501}
6502
6503// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
6504type AzureFirewallIPConfigurationPropertiesFormat struct {
6505	// PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
6506	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
6507	// Subnet - Reference to the subnet resource. This resource must be named 'AzureFirewallSubnet' or 'AzureFirewallManagementSubnet'.
6508	Subnet *SubResource `json:"subnet,omitempty"`
6509	// PublicIPAddress - Reference to the PublicIP resource. This field is a mandatory input if subnet is not null.
6510	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
6511	// ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
6512	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6513}
6514
6515// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat.
6516func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
6517	objectMap := make(map[string]interface{})
6518	if aficpf.Subnet != nil {
6519		objectMap["subnet"] = aficpf.Subnet
6520	}
6521	if aficpf.PublicIPAddress != nil {
6522		objectMap["publicIPAddress"] = aficpf.PublicIPAddress
6523	}
6524	return json.Marshal(objectMap)
6525}
6526
6527// AzureFirewallIPGroups ipGroups associated with azure firewall.
6528type AzureFirewallIPGroups struct {
6529	// ID - READ-ONLY; Resource ID.
6530	ID *string `json:"id,omitempty"`
6531	// ChangeNumber - READ-ONLY; The iteration number.
6532	ChangeNumber *string `json:"changeNumber,omitempty"`
6533}
6534
6535// MarshalJSON is the custom marshaler for AzureFirewallIPGroups.
6536func (afig AzureFirewallIPGroups) MarshalJSON() ([]byte, error) {
6537	objectMap := make(map[string]interface{})
6538	return json.Marshal(objectMap)
6539}
6540
6541// AzureFirewallListResult response for ListAzureFirewalls API service call.
6542type AzureFirewallListResult struct {
6543	autorest.Response `json:"-"`
6544	// Value - List of Azure Firewalls in a resource group.
6545	Value *[]AzureFirewall `json:"value,omitempty"`
6546	// NextLink - URL to get the next set of results.
6547	NextLink *string `json:"nextLink,omitempty"`
6548}
6549
6550// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
6551type AzureFirewallListResultIterator struct {
6552	i    int
6553	page AzureFirewallListResultPage
6554}
6555
6556// NextWithContext advances to the next value.  If there was an error making
6557// the request the iterator does not advance and the error is returned.
6558func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
6559	if tracing.IsEnabled() {
6560		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
6561		defer func() {
6562			sc := -1
6563			if iter.Response().Response.Response != nil {
6564				sc = iter.Response().Response.Response.StatusCode
6565			}
6566			tracing.EndSpan(ctx, sc, err)
6567		}()
6568	}
6569	iter.i++
6570	if iter.i < len(iter.page.Values()) {
6571		return nil
6572	}
6573	err = iter.page.NextWithContext(ctx)
6574	if err != nil {
6575		iter.i--
6576		return err
6577	}
6578	iter.i = 0
6579	return nil
6580}
6581
6582// Next advances to the next value.  If there was an error making
6583// the request the iterator does not advance and the error is returned.
6584// Deprecated: Use NextWithContext() instead.
6585func (iter *AzureFirewallListResultIterator) Next() error {
6586	return iter.NextWithContext(context.Background())
6587}
6588
6589// NotDone returns true if the enumeration should be started or is not yet complete.
6590func (iter AzureFirewallListResultIterator) NotDone() bool {
6591	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6592}
6593
6594// Response returns the raw server response from the last page request.
6595func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
6596	return iter.page.Response()
6597}
6598
6599// Value returns the current value or a zero-initialized value if the
6600// iterator has advanced beyond the end of the collection.
6601func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
6602	if !iter.page.NotDone() {
6603		return AzureFirewall{}
6604	}
6605	return iter.page.Values()[iter.i]
6606}
6607
6608// Creates a new instance of the AzureFirewallListResultIterator type.
6609func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
6610	return AzureFirewallListResultIterator{page: page}
6611}
6612
6613// IsEmpty returns true if the ListResult contains no values.
6614func (aflr AzureFirewallListResult) IsEmpty() bool {
6615	return aflr.Value == nil || len(*aflr.Value) == 0
6616}
6617
6618// hasNextLink returns true if the NextLink is not empty.
6619func (aflr AzureFirewallListResult) hasNextLink() bool {
6620	return aflr.NextLink != nil && len(*aflr.NextLink) != 0
6621}
6622
6623// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
6624// It returns nil if no more results exist.
6625func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
6626	if !aflr.hasNextLink() {
6627		return nil, nil
6628	}
6629	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6630		autorest.AsJSON(),
6631		autorest.AsGet(),
6632		autorest.WithBaseURL(to.String(aflr.NextLink)))
6633}
6634
6635// AzureFirewallListResultPage contains a page of AzureFirewall values.
6636type AzureFirewallListResultPage struct {
6637	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
6638	aflr AzureFirewallListResult
6639}
6640
6641// NextWithContext advances to the next page of values.  If there was an error making
6642// the request the page does not advance and the error is returned.
6643func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
6644	if tracing.IsEnabled() {
6645		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
6646		defer func() {
6647			sc := -1
6648			if page.Response().Response.Response != nil {
6649				sc = page.Response().Response.Response.StatusCode
6650			}
6651			tracing.EndSpan(ctx, sc, err)
6652		}()
6653	}
6654	for {
6655		next, err := page.fn(ctx, page.aflr)
6656		if err != nil {
6657			return err
6658		}
6659		page.aflr = next
6660		if !next.hasNextLink() || !next.IsEmpty() {
6661			break
6662		}
6663	}
6664	return nil
6665}
6666
6667// Next advances to the next page of values.  If there was an error making
6668// the request the page does not advance and the error is returned.
6669// Deprecated: Use NextWithContext() instead.
6670func (page *AzureFirewallListResultPage) Next() error {
6671	return page.NextWithContext(context.Background())
6672}
6673
6674// NotDone returns true if the page enumeration should be started or is not yet complete.
6675func (page AzureFirewallListResultPage) NotDone() bool {
6676	return !page.aflr.IsEmpty()
6677}
6678
6679// Response returns the raw server response from the last page request.
6680func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
6681	return page.aflr
6682}
6683
6684// Values returns the slice of values for the current page or nil if there are no values.
6685func (page AzureFirewallListResultPage) Values() []AzureFirewall {
6686	if page.aflr.IsEmpty() {
6687		return nil
6688	}
6689	return *page.aflr.Value
6690}
6691
6692// Creates a new instance of the AzureFirewallListResultPage type.
6693func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
6694	return AzureFirewallListResultPage{
6695		fn:   getNextPage,
6696		aflr: cur,
6697	}
6698}
6699
6700// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action.
6701type AzureFirewallNatRCAction struct {
6702	// Type - The type of action. Possible values include: 'AzureFirewallNatRCActionTypeSnat', 'AzureFirewallNatRCActionTypeDnat'
6703	Type AzureFirewallNatRCActionType `json:"type,omitempty"`
6704}
6705
6706// AzureFirewallNatRule properties of a NAT rule.
6707type AzureFirewallNatRule struct {
6708	// Name - Name of the NAT rule.
6709	Name *string `json:"name,omitempty"`
6710	// Description - Description of the rule.
6711	Description *string `json:"description,omitempty"`
6712	// SourceAddresses - List of source IP addresses for this rule.
6713	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
6714	// DestinationAddresses - List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags.
6715	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
6716	// DestinationPorts - List of destination ports.
6717	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
6718	// Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule.
6719	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
6720	// TranslatedAddress - The translated address for this NAT rule.
6721	TranslatedAddress *string `json:"translatedAddress,omitempty"`
6722	// TranslatedPort - The translated port for this NAT rule.
6723	TranslatedPort *string `json:"translatedPort,omitempty"`
6724	// TranslatedFqdn - The translated FQDN for this NAT rule.
6725	TranslatedFqdn *string `json:"translatedFqdn,omitempty"`
6726	// SourceIPGroups - List of source IpGroups for this rule.
6727	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
6728}
6729
6730// AzureFirewallNatRuleCollection NAT rule collection resource.
6731type AzureFirewallNatRuleCollection struct {
6732	// AzureFirewallNatRuleCollectionProperties - Properties of the azure firewall NAT rule collection.
6733	*AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"`
6734	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
6735	Name *string `json:"name,omitempty"`
6736	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6737	Etag *string `json:"etag,omitempty"`
6738	// ID - Resource ID.
6739	ID *string `json:"id,omitempty"`
6740}
6741
6742// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection.
6743func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) {
6744	objectMap := make(map[string]interface{})
6745	if afnrc.AzureFirewallNatRuleCollectionProperties != nil {
6746		objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties
6747	}
6748	if afnrc.Name != nil {
6749		objectMap["name"] = afnrc.Name
6750	}
6751	if afnrc.ID != nil {
6752		objectMap["id"] = afnrc.ID
6753	}
6754	return json.Marshal(objectMap)
6755}
6756
6757// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct.
6758func (afnrc *AzureFirewallNatRuleCollection) UnmarshalJSON(body []byte) error {
6759	var m map[string]*json.RawMessage
6760	err := json.Unmarshal(body, &m)
6761	if err != nil {
6762		return err
6763	}
6764	for k, v := range m {
6765		switch k {
6766		case "properties":
6767			if v != nil {
6768				var azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties
6769				err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties)
6770				if err != nil {
6771					return err
6772				}
6773				afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties
6774			}
6775		case "name":
6776			if v != nil {
6777				var name string
6778				err = json.Unmarshal(*v, &name)
6779				if err != nil {
6780					return err
6781				}
6782				afnrc.Name = &name
6783			}
6784		case "etag":
6785			if v != nil {
6786				var etag string
6787				err = json.Unmarshal(*v, &etag)
6788				if err != nil {
6789					return err
6790				}
6791				afnrc.Etag = &etag
6792			}
6793		case "id":
6794			if v != nil {
6795				var ID string
6796				err = json.Unmarshal(*v, &ID)
6797				if err != nil {
6798					return err
6799				}
6800				afnrc.ID = &ID
6801			}
6802		}
6803	}
6804
6805	return nil
6806}
6807
6808// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection.
6809type AzureFirewallNatRuleCollectionProperties struct {
6810	// Priority - Priority of the NAT rule collection resource.
6811	Priority *int32 `json:"priority,omitempty"`
6812	// Action - The action type of a NAT rule collection.
6813	Action *AzureFirewallNatRCAction `json:"action,omitempty"`
6814	// Rules - Collection of rules used by a NAT rule collection.
6815	Rules *[]AzureFirewallNatRule `json:"rules,omitempty"`
6816	// ProvisioningState - READ-ONLY; The provisioning state of the NAT rule collection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
6817	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6818}
6819
6820// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollectionProperties.
6821func (afnrcp AzureFirewallNatRuleCollectionProperties) MarshalJSON() ([]byte, error) {
6822	objectMap := make(map[string]interface{})
6823	if afnrcp.Priority != nil {
6824		objectMap["priority"] = afnrcp.Priority
6825	}
6826	if afnrcp.Action != nil {
6827		objectMap["action"] = afnrcp.Action
6828	}
6829	if afnrcp.Rules != nil {
6830		objectMap["rules"] = afnrcp.Rules
6831	}
6832	return json.Marshal(objectMap)
6833}
6834
6835// AzureFirewallNetworkRule properties of the network rule.
6836type AzureFirewallNetworkRule struct {
6837	// Name - Name of the network rule.
6838	Name *string `json:"name,omitempty"`
6839	// Description - Description of the rule.
6840	Description *string `json:"description,omitempty"`
6841	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
6842	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
6843	// SourceAddresses - List of source IP addresses for this rule.
6844	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
6845	// DestinationAddresses - List of destination IP addresses.
6846	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
6847	// DestinationPorts - List of destination ports.
6848	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
6849	// DestinationFqdns - List of destination FQDNs.
6850	DestinationFqdns *[]string `json:"destinationFqdns,omitempty"`
6851	// SourceIPGroups - List of source IpGroups for this rule.
6852	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
6853	// DestinationIPGroups - List of destination IpGroups for this rule.
6854	DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"`
6855}
6856
6857// AzureFirewallNetworkRuleCollection network rule collection resource.
6858type AzureFirewallNetworkRuleCollection struct {
6859	// AzureFirewallNetworkRuleCollectionPropertiesFormat - Properties of the azure firewall network rule collection.
6860	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
6861	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
6862	Name *string `json:"name,omitempty"`
6863	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6864	Etag *string `json:"etag,omitempty"`
6865	// ID - Resource ID.
6866	ID *string `json:"id,omitempty"`
6867}
6868
6869// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
6870func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
6871	objectMap := make(map[string]interface{})
6872	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
6873		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
6874	}
6875	if afnrc.Name != nil {
6876		objectMap["name"] = afnrc.Name
6877	}
6878	if afnrc.ID != nil {
6879		objectMap["id"] = afnrc.ID
6880	}
6881	return json.Marshal(objectMap)
6882}
6883
6884// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
6885func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
6886	var m map[string]*json.RawMessage
6887	err := json.Unmarshal(body, &m)
6888	if err != nil {
6889		return err
6890	}
6891	for k, v := range m {
6892		switch k {
6893		case "properties":
6894			if v != nil {
6895				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
6896				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
6897				if err != nil {
6898					return err
6899				}
6900				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
6901			}
6902		case "name":
6903			if v != nil {
6904				var name string
6905				err = json.Unmarshal(*v, &name)
6906				if err != nil {
6907					return err
6908				}
6909				afnrc.Name = &name
6910			}
6911		case "etag":
6912			if v != nil {
6913				var etag string
6914				err = json.Unmarshal(*v, &etag)
6915				if err != nil {
6916					return err
6917				}
6918				afnrc.Etag = &etag
6919			}
6920		case "id":
6921			if v != nil {
6922				var ID string
6923				err = json.Unmarshal(*v, &ID)
6924				if err != nil {
6925					return err
6926				}
6927				afnrc.ID = &ID
6928			}
6929		}
6930	}
6931
6932	return nil
6933}
6934
6935// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
6936type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
6937	// Priority - Priority of the network rule collection resource.
6938	Priority *int32 `json:"priority,omitempty"`
6939	// Action - The action type of a rule collection.
6940	Action *AzureFirewallRCAction `json:"action,omitempty"`
6941	// Rules - Collection of rules used by a network rule collection.
6942	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
6943	// ProvisioningState - READ-ONLY; The provisioning state of the network rule collection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
6944	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6945}
6946
6947// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollectionPropertiesFormat.
6948func (afnrcpf AzureFirewallNetworkRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) {
6949	objectMap := make(map[string]interface{})
6950	if afnrcpf.Priority != nil {
6951		objectMap["priority"] = afnrcpf.Priority
6952	}
6953	if afnrcpf.Action != nil {
6954		objectMap["action"] = afnrcpf.Action
6955	}
6956	if afnrcpf.Rules != nil {
6957		objectMap["rules"] = afnrcpf.Rules
6958	}
6959	return json.Marshal(objectMap)
6960}
6961
6962// AzureFirewallPropertiesFormat properties of the Azure Firewall.
6963type AzureFirewallPropertiesFormat struct {
6964	// ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall.
6965	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
6966	// NatRuleCollections - Collection of NAT rule collections used by Azure Firewall.
6967	NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"`
6968	// NetworkRuleCollections - Collection of network rule collections used by Azure Firewall.
6969	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
6970	// IPConfigurations - IP configuration of the Azure Firewall resource.
6971	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
6972	// ManagementIPConfiguration - IP configuration of the Azure Firewall used for management traffic.
6973	ManagementIPConfiguration *AzureFirewallIPConfiguration `json:"managementIpConfiguration,omitempty"`
6974	// ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
6975	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6976	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
6977	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
6978	// VirtualHub - The virtualHub to which the firewall belongs.
6979	VirtualHub *SubResource `json:"virtualHub,omitempty"`
6980	// FirewallPolicy - The firewallPolicy associated with this azure firewall.
6981	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
6982	// HubIPAddresses - IP addresses associated with AzureFirewall.
6983	HubIPAddresses *HubIPAddresses `json:"hubIPAddresses,omitempty"`
6984	// IPGroups - READ-ONLY; IpGroups associated with AzureFirewall.
6985	IPGroups *[]AzureFirewallIPGroups `json:"ipGroups,omitempty"`
6986	// Sku - The Azure Firewall Resource SKU.
6987	Sku *AzureFirewallSku `json:"sku,omitempty"`
6988	// AdditionalProperties - The additional properties used to further config this azure firewall.
6989	AdditionalProperties map[string]*string `json:"additionalProperties"`
6990}
6991
6992// MarshalJSON is the custom marshaler for AzureFirewallPropertiesFormat.
6993func (afpf AzureFirewallPropertiesFormat) MarshalJSON() ([]byte, error) {
6994	objectMap := make(map[string]interface{})
6995	if afpf.ApplicationRuleCollections != nil {
6996		objectMap["applicationRuleCollections"] = afpf.ApplicationRuleCollections
6997	}
6998	if afpf.NatRuleCollections != nil {
6999		objectMap["natRuleCollections"] = afpf.NatRuleCollections
7000	}
7001	if afpf.NetworkRuleCollections != nil {
7002		objectMap["networkRuleCollections"] = afpf.NetworkRuleCollections
7003	}
7004	if afpf.IPConfigurations != nil {
7005		objectMap["ipConfigurations"] = afpf.IPConfigurations
7006	}
7007	if afpf.ManagementIPConfiguration != nil {
7008		objectMap["managementIpConfiguration"] = afpf.ManagementIPConfiguration
7009	}
7010	if afpf.ThreatIntelMode != "" {
7011		objectMap["threatIntelMode"] = afpf.ThreatIntelMode
7012	}
7013	if afpf.VirtualHub != nil {
7014		objectMap["virtualHub"] = afpf.VirtualHub
7015	}
7016	if afpf.FirewallPolicy != nil {
7017		objectMap["firewallPolicy"] = afpf.FirewallPolicy
7018	}
7019	if afpf.HubIPAddresses != nil {
7020		objectMap["hubIPAddresses"] = afpf.HubIPAddresses
7021	}
7022	if afpf.Sku != nil {
7023		objectMap["sku"] = afpf.Sku
7024	}
7025	if afpf.AdditionalProperties != nil {
7026		objectMap["additionalProperties"] = afpf.AdditionalProperties
7027	}
7028	return json.Marshal(objectMap)
7029}
7030
7031// AzureFirewallPublicIPAddress public IP Address associated with azure firewall.
7032type AzureFirewallPublicIPAddress struct {
7033	// Address - Public IP Address value.
7034	Address *string `json:"address,omitempty"`
7035}
7036
7037// AzureFirewallRCAction properties of the AzureFirewallRCAction.
7038type AzureFirewallRCAction struct {
7039	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
7040	Type AzureFirewallRCActionType `json:"type,omitempty"`
7041}
7042
7043// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7044// long-running operation.
7045type AzureFirewallsCreateOrUpdateFuture struct {
7046	azure.FutureAPI
7047	// Result returns the result of the asynchronous operation.
7048	// If the operation has not completed it will return an error.
7049	Result func(AzureFirewallsClient) (AzureFirewall, error)
7050}
7051
7052// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7053func (future *AzureFirewallsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7054	var azFuture azure.Future
7055	if err := json.Unmarshal(body, &azFuture); err != nil {
7056		return err
7057	}
7058	future.FutureAPI = &azFuture
7059	future.Result = future.result
7060	return nil
7061}
7062
7063// result is the default implementation for AzureFirewallsCreateOrUpdateFuture.Result.
7064func (future *AzureFirewallsCreateOrUpdateFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) {
7065	var done bool
7066	done, err = future.DoneWithContext(context.Background(), client)
7067	if err != nil {
7068		err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7069		return
7070	}
7071	if !done {
7072		af.Response.Response = future.Response()
7073		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture")
7074		return
7075	}
7076	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7077	if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
7078		af, err = client.CreateOrUpdateResponder(af.Response.Response)
7079		if err != nil {
7080			err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request")
7081		}
7082	}
7083	return
7084}
7085
7086// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
7087// operation.
7088type AzureFirewallsDeleteFuture struct {
7089	azure.FutureAPI
7090	// Result returns the result of the asynchronous operation.
7091	// If the operation has not completed it will return an error.
7092	Result func(AzureFirewallsClient) (autorest.Response, error)
7093}
7094
7095// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7096func (future *AzureFirewallsDeleteFuture) UnmarshalJSON(body []byte) error {
7097	var azFuture azure.Future
7098	if err := json.Unmarshal(body, &azFuture); err != nil {
7099		return err
7100	}
7101	future.FutureAPI = &azFuture
7102	future.Result = future.result
7103	return nil
7104}
7105
7106// result is the default implementation for AzureFirewallsDeleteFuture.Result.
7107func (future *AzureFirewallsDeleteFuture) result(client AzureFirewallsClient) (ar autorest.Response, err error) {
7108	var done bool
7109	done, err = future.DoneWithContext(context.Background(), client)
7110	if err != nil {
7111		err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure")
7112		return
7113	}
7114	if !done {
7115		ar.Response = future.Response()
7116		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture")
7117		return
7118	}
7119	ar.Response = future.Response()
7120	return
7121}
7122
7123// AzureFirewallSku SKU of an Azure Firewall.
7124type AzureFirewallSku struct {
7125	// Name - Name of an Azure Firewall SKU. Possible values include: 'AzureFirewallSkuNameAZFWVNet', 'AzureFirewallSkuNameAZFWHub'
7126	Name AzureFirewallSkuName `json:"name,omitempty"`
7127	// Tier - Tier of an Azure Firewall. Possible values include: 'AzureFirewallSkuTierStandard', 'AzureFirewallSkuTierPremium'
7128	Tier AzureFirewallSkuTier `json:"tier,omitempty"`
7129}
7130
7131// AzureFirewallsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
7132// long-running operation.
7133type AzureFirewallsUpdateTagsFuture struct {
7134	azure.FutureAPI
7135	// Result returns the result of the asynchronous operation.
7136	// If the operation has not completed it will return an error.
7137	Result func(AzureFirewallsClient) (AzureFirewall, error)
7138}
7139
7140// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7141func (future *AzureFirewallsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
7142	var azFuture azure.Future
7143	if err := json.Unmarshal(body, &azFuture); err != nil {
7144		return err
7145	}
7146	future.FutureAPI = &azFuture
7147	future.Result = future.result
7148	return nil
7149}
7150
7151// result is the default implementation for AzureFirewallsUpdateTagsFuture.Result.
7152func (future *AzureFirewallsUpdateTagsFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) {
7153	var done bool
7154	done, err = future.DoneWithContext(context.Background(), client)
7155	if err != nil {
7156		err = autorest.NewErrorWithError(err, "network.AzureFirewallsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
7157		return
7158	}
7159	if !done {
7160		af.Response.Response = future.Response()
7161		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsUpdateTagsFuture")
7162		return
7163	}
7164	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7165	if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
7166		af, err = client.UpdateTagsResponder(af.Response.Response)
7167		if err != nil {
7168			err = autorest.NewErrorWithError(err, "network.AzureFirewallsUpdateTagsFuture", "Result", af.Response.Response, "Failure responding to request")
7169		}
7170	}
7171	return
7172}
7173
7174// AzureReachabilityReport azure reachability report details.
7175type AzureReachabilityReport struct {
7176	autorest.Response `json:"-"`
7177	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
7178	AggregationLevel *string `json:"aggregationLevel,omitempty"`
7179	// ProviderLocation - Parameters that define a geographic location.
7180	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
7181	// ReachabilityReport - List of Azure reachability report items.
7182	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
7183}
7184
7185// AzureReachabilityReportItem azure reachability report details for a given provider location.
7186type AzureReachabilityReportItem struct {
7187	// Provider - The Internet service provider.
7188	Provider *string `json:"provider,omitempty"`
7189	// AzureLocation - The Azure region.
7190	AzureLocation *string `json:"azureLocation,omitempty"`
7191	// Latencies - List of latency details for each of the time series.
7192	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
7193}
7194
7195// AzureReachabilityReportLatencyInfo details on latency for a time series.
7196type AzureReachabilityReportLatencyInfo struct {
7197	// TimeStamp - The time stamp.
7198	TimeStamp *date.Time `json:"timeStamp,omitempty"`
7199	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
7200	Score *int32 `json:"score,omitempty"`
7201}
7202
7203// AzureReachabilityReportLocation parameters that define a geographic location.
7204type AzureReachabilityReportLocation struct {
7205	// Country - The name of the country.
7206	Country *string `json:"country,omitempty"`
7207	// State - The name of the state.
7208	State *string `json:"state,omitempty"`
7209	// City - The name of the city or town.
7210	City *string `json:"city,omitempty"`
7211}
7212
7213// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
7214type AzureReachabilityReportParameters struct {
7215	// ProviderLocation - Parameters that define a geographic location.
7216	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
7217	// Providers - List of Internet service providers.
7218	Providers *[]string `json:"providers,omitempty"`
7219	// AzureLocations - Optional Azure regions to scope the query to.
7220	AzureLocations *[]string `json:"azureLocations,omitempty"`
7221	// StartTime - The start time for the Azure reachability report.
7222	StartTime *date.Time `json:"startTime,omitempty"`
7223	// EndTime - The end time for the Azure reachability report.
7224	EndTime *date.Time `json:"endTime,omitempty"`
7225}
7226
7227// AzureWebCategory azure Web Category Resource.
7228type AzureWebCategory struct {
7229	autorest.Response `json:"-"`
7230	// AzureWebCategoryPropertiesFormat - Properties of the Azure Web Category.
7231	*AzureWebCategoryPropertiesFormat `json:"properties,omitempty"`
7232	// ID - Resource ID.
7233	ID *string `json:"id,omitempty"`
7234	// Name - READ-ONLY; Resource name.
7235	Name *string `json:"name,omitempty"`
7236	// Type - READ-ONLY; Resource type.
7237	Type *string `json:"type,omitempty"`
7238	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7239	Etag *string `json:"etag,omitempty"`
7240}
7241
7242// MarshalJSON is the custom marshaler for AzureWebCategory.
7243func (awc AzureWebCategory) MarshalJSON() ([]byte, error) {
7244	objectMap := make(map[string]interface{})
7245	if awc.AzureWebCategoryPropertiesFormat != nil {
7246		objectMap["properties"] = awc.AzureWebCategoryPropertiesFormat
7247	}
7248	if awc.ID != nil {
7249		objectMap["id"] = awc.ID
7250	}
7251	return json.Marshal(objectMap)
7252}
7253
7254// UnmarshalJSON is the custom unmarshaler for AzureWebCategory struct.
7255func (awc *AzureWebCategory) UnmarshalJSON(body []byte) error {
7256	var m map[string]*json.RawMessage
7257	err := json.Unmarshal(body, &m)
7258	if err != nil {
7259		return err
7260	}
7261	for k, v := range m {
7262		switch k {
7263		case "properties":
7264			if v != nil {
7265				var azureWebCategoryPropertiesFormat AzureWebCategoryPropertiesFormat
7266				err = json.Unmarshal(*v, &azureWebCategoryPropertiesFormat)
7267				if err != nil {
7268					return err
7269				}
7270				awc.AzureWebCategoryPropertiesFormat = &azureWebCategoryPropertiesFormat
7271			}
7272		case "id":
7273			if v != nil {
7274				var ID string
7275				err = json.Unmarshal(*v, &ID)
7276				if err != nil {
7277					return err
7278				}
7279				awc.ID = &ID
7280			}
7281		case "name":
7282			if v != nil {
7283				var name string
7284				err = json.Unmarshal(*v, &name)
7285				if err != nil {
7286					return err
7287				}
7288				awc.Name = &name
7289			}
7290		case "type":
7291			if v != nil {
7292				var typeVar string
7293				err = json.Unmarshal(*v, &typeVar)
7294				if err != nil {
7295					return err
7296				}
7297				awc.Type = &typeVar
7298			}
7299		case "etag":
7300			if v != nil {
7301				var etag string
7302				err = json.Unmarshal(*v, &etag)
7303				if err != nil {
7304					return err
7305				}
7306				awc.Etag = &etag
7307			}
7308		}
7309	}
7310
7311	return nil
7312}
7313
7314// AzureWebCategoryListResult response for ListAzureWebCategories API service call.
7315type AzureWebCategoryListResult struct {
7316	autorest.Response `json:"-"`
7317	// Value - List of Azure Web Categories for a given Subscription.
7318	Value *[]AzureWebCategory `json:"value,omitempty"`
7319	// NextLink - URL to get the next set of results.
7320	NextLink *string `json:"nextLink,omitempty"`
7321}
7322
7323// AzureWebCategoryListResultIterator provides access to a complete listing of AzureWebCategory values.
7324type AzureWebCategoryListResultIterator struct {
7325	i    int
7326	page AzureWebCategoryListResultPage
7327}
7328
7329// NextWithContext advances to the next value.  If there was an error making
7330// the request the iterator does not advance and the error is returned.
7331func (iter *AzureWebCategoryListResultIterator) NextWithContext(ctx context.Context) (err error) {
7332	if tracing.IsEnabled() {
7333		ctx = tracing.StartSpan(ctx, fqdn+"/AzureWebCategoryListResultIterator.NextWithContext")
7334		defer func() {
7335			sc := -1
7336			if iter.Response().Response.Response != nil {
7337				sc = iter.Response().Response.Response.StatusCode
7338			}
7339			tracing.EndSpan(ctx, sc, err)
7340		}()
7341	}
7342	iter.i++
7343	if iter.i < len(iter.page.Values()) {
7344		return nil
7345	}
7346	err = iter.page.NextWithContext(ctx)
7347	if err != nil {
7348		iter.i--
7349		return err
7350	}
7351	iter.i = 0
7352	return nil
7353}
7354
7355// Next advances to the next value.  If there was an error making
7356// the request the iterator does not advance and the error is returned.
7357// Deprecated: Use NextWithContext() instead.
7358func (iter *AzureWebCategoryListResultIterator) Next() error {
7359	return iter.NextWithContext(context.Background())
7360}
7361
7362// NotDone returns true if the enumeration should be started or is not yet complete.
7363func (iter AzureWebCategoryListResultIterator) NotDone() bool {
7364	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7365}
7366
7367// Response returns the raw server response from the last page request.
7368func (iter AzureWebCategoryListResultIterator) Response() AzureWebCategoryListResult {
7369	return iter.page.Response()
7370}
7371
7372// Value returns the current value or a zero-initialized value if the
7373// iterator has advanced beyond the end of the collection.
7374func (iter AzureWebCategoryListResultIterator) Value() AzureWebCategory {
7375	if !iter.page.NotDone() {
7376		return AzureWebCategory{}
7377	}
7378	return iter.page.Values()[iter.i]
7379}
7380
7381// Creates a new instance of the AzureWebCategoryListResultIterator type.
7382func NewAzureWebCategoryListResultIterator(page AzureWebCategoryListResultPage) AzureWebCategoryListResultIterator {
7383	return AzureWebCategoryListResultIterator{page: page}
7384}
7385
7386// IsEmpty returns true if the ListResult contains no values.
7387func (awclr AzureWebCategoryListResult) IsEmpty() bool {
7388	return awclr.Value == nil || len(*awclr.Value) == 0
7389}
7390
7391// hasNextLink returns true if the NextLink is not empty.
7392func (awclr AzureWebCategoryListResult) hasNextLink() bool {
7393	return awclr.NextLink != nil && len(*awclr.NextLink) != 0
7394}
7395
7396// azureWebCategoryListResultPreparer prepares a request to retrieve the next set of results.
7397// It returns nil if no more results exist.
7398func (awclr AzureWebCategoryListResult) azureWebCategoryListResultPreparer(ctx context.Context) (*http.Request, error) {
7399	if !awclr.hasNextLink() {
7400		return nil, nil
7401	}
7402	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7403		autorest.AsJSON(),
7404		autorest.AsGet(),
7405		autorest.WithBaseURL(to.String(awclr.NextLink)))
7406}
7407
7408// AzureWebCategoryListResultPage contains a page of AzureWebCategory values.
7409type AzureWebCategoryListResultPage struct {
7410	fn    func(context.Context, AzureWebCategoryListResult) (AzureWebCategoryListResult, error)
7411	awclr AzureWebCategoryListResult
7412}
7413
7414// NextWithContext advances to the next page of values.  If there was an error making
7415// the request the page does not advance and the error is returned.
7416func (page *AzureWebCategoryListResultPage) NextWithContext(ctx context.Context) (err error) {
7417	if tracing.IsEnabled() {
7418		ctx = tracing.StartSpan(ctx, fqdn+"/AzureWebCategoryListResultPage.NextWithContext")
7419		defer func() {
7420			sc := -1
7421			if page.Response().Response.Response != nil {
7422				sc = page.Response().Response.Response.StatusCode
7423			}
7424			tracing.EndSpan(ctx, sc, err)
7425		}()
7426	}
7427	for {
7428		next, err := page.fn(ctx, page.awclr)
7429		if err != nil {
7430			return err
7431		}
7432		page.awclr = next
7433		if !next.hasNextLink() || !next.IsEmpty() {
7434			break
7435		}
7436	}
7437	return nil
7438}
7439
7440// Next advances to the next page of values.  If there was an error making
7441// the request the page does not advance and the error is returned.
7442// Deprecated: Use NextWithContext() instead.
7443func (page *AzureWebCategoryListResultPage) Next() error {
7444	return page.NextWithContext(context.Background())
7445}
7446
7447// NotDone returns true if the page enumeration should be started or is not yet complete.
7448func (page AzureWebCategoryListResultPage) NotDone() bool {
7449	return !page.awclr.IsEmpty()
7450}
7451
7452// Response returns the raw server response from the last page request.
7453func (page AzureWebCategoryListResultPage) Response() AzureWebCategoryListResult {
7454	return page.awclr
7455}
7456
7457// Values returns the slice of values for the current page or nil if there are no values.
7458func (page AzureWebCategoryListResultPage) Values() []AzureWebCategory {
7459	if page.awclr.IsEmpty() {
7460		return nil
7461	}
7462	return *page.awclr.Value
7463}
7464
7465// Creates a new instance of the AzureWebCategoryListResultPage type.
7466func NewAzureWebCategoryListResultPage(cur AzureWebCategoryListResult, getNextPage func(context.Context, AzureWebCategoryListResult) (AzureWebCategoryListResult, error)) AzureWebCategoryListResultPage {
7467	return AzureWebCategoryListResultPage{
7468		fn:    getNextPage,
7469		awclr: cur,
7470	}
7471}
7472
7473// AzureWebCategoryPropertiesFormat azure Web Category Properties.
7474type AzureWebCategoryPropertiesFormat struct {
7475	// Group - READ-ONLY; The name of the group that the category belongs to.
7476	Group *string `json:"group,omitempty"`
7477}
7478
7479// MarshalJSON is the custom marshaler for AzureWebCategoryPropertiesFormat.
7480func (awcpf AzureWebCategoryPropertiesFormat) MarshalJSON() ([]byte, error) {
7481	objectMap := make(map[string]interface{})
7482	return json.Marshal(objectMap)
7483}
7484
7485// BackendAddressPool pool of backend IP addresses.
7486type BackendAddressPool struct {
7487	autorest.Response `json:"-"`
7488	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
7489	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
7490	// 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.
7491	Name *string `json:"name,omitempty"`
7492	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7493	Etag *string `json:"etag,omitempty"`
7494	// Type - READ-ONLY; Type of the resource.
7495	Type *string `json:"type,omitempty"`
7496	// ID - Resource ID.
7497	ID *string `json:"id,omitempty"`
7498}
7499
7500// MarshalJSON is the custom marshaler for BackendAddressPool.
7501func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
7502	objectMap := make(map[string]interface{})
7503	if bap.BackendAddressPoolPropertiesFormat != nil {
7504		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
7505	}
7506	if bap.Name != nil {
7507		objectMap["name"] = bap.Name
7508	}
7509	if bap.ID != nil {
7510		objectMap["id"] = bap.ID
7511	}
7512	return json.Marshal(objectMap)
7513}
7514
7515// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
7516func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
7517	var m map[string]*json.RawMessage
7518	err := json.Unmarshal(body, &m)
7519	if err != nil {
7520		return err
7521	}
7522	for k, v := range m {
7523		switch k {
7524		case "properties":
7525			if v != nil {
7526				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
7527				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
7528				if err != nil {
7529					return err
7530				}
7531				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
7532			}
7533		case "name":
7534			if v != nil {
7535				var name string
7536				err = json.Unmarshal(*v, &name)
7537				if err != nil {
7538					return err
7539				}
7540				bap.Name = &name
7541			}
7542		case "etag":
7543			if v != nil {
7544				var etag string
7545				err = json.Unmarshal(*v, &etag)
7546				if err != nil {
7547					return err
7548				}
7549				bap.Etag = &etag
7550			}
7551		case "type":
7552			if v != nil {
7553				var typeVar string
7554				err = json.Unmarshal(*v, &typeVar)
7555				if err != nil {
7556					return err
7557				}
7558				bap.Type = &typeVar
7559			}
7560		case "id":
7561			if v != nil {
7562				var ID string
7563				err = json.Unmarshal(*v, &ID)
7564				if err != nil {
7565					return err
7566				}
7567				bap.ID = &ID
7568			}
7569		}
7570	}
7571
7572	return nil
7573}
7574
7575// BackendAddressPoolPropertiesFormat properties of the backend address pool.
7576type BackendAddressPoolPropertiesFormat struct {
7577	// Location - The location of the backend address pool.
7578	Location *string `json:"location,omitempty"`
7579	// LoadBalancerBackendAddresses - An array of backend addresses.
7580	LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"`
7581	// BackendIPConfigurations - READ-ONLY; An array of references to IP addresses defined in network interfaces.
7582	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
7583	// LoadBalancingRules - READ-ONLY; An array of references to load balancing rules that use this backend address pool.
7584	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
7585	// OutboundRule - READ-ONLY; A reference to an outbound rule that uses this backend address pool.
7586	OutboundRule *SubResource `json:"outboundRule,omitempty"`
7587	// OutboundRules - READ-ONLY; An array of references to outbound rules that use this backend address pool.
7588	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
7589	// ProvisioningState - READ-ONLY; The provisioning state of the backend address pool resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
7590	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
7591}
7592
7593// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
7594func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
7595	objectMap := make(map[string]interface{})
7596	if bappf.Location != nil {
7597		objectMap["location"] = bappf.Location
7598	}
7599	if bappf.LoadBalancerBackendAddresses != nil {
7600		objectMap["loadBalancerBackendAddresses"] = bappf.LoadBalancerBackendAddresses
7601	}
7602	return json.Marshal(objectMap)
7603}
7604
7605// BastionActiveSession the session detail for a target.
7606type BastionActiveSession struct {
7607	// SessionID - READ-ONLY; A unique id for the session.
7608	SessionID *string `json:"sessionId,omitempty"`
7609	// StartTime - READ-ONLY; The time when the session started.
7610	StartTime interface{} `json:"startTime,omitempty"`
7611	// TargetSubscriptionID - READ-ONLY; The subscription id for the target virtual machine.
7612	TargetSubscriptionID *string `json:"targetSubscriptionId,omitempty"`
7613	// ResourceType - READ-ONLY; The type of the resource.
7614	ResourceType *string `json:"resourceType,omitempty"`
7615	// TargetHostName - READ-ONLY; The host name of the target.
7616	TargetHostName *string `json:"targetHostName,omitempty"`
7617	// TargetResourceGroup - READ-ONLY; The resource group of the target.
7618	TargetResourceGroup *string `json:"targetResourceGroup,omitempty"`
7619	// UserName - READ-ONLY; The user name who is active on this session.
7620	UserName *string `json:"userName,omitempty"`
7621	// TargetIPAddress - READ-ONLY; The IP Address of the target.
7622	TargetIPAddress *string `json:"targetIpAddress,omitempty"`
7623	// Protocol - READ-ONLY; The protocol used to connect to the target. Possible values include: 'BastionConnectProtocolSSH', 'BastionConnectProtocolRDP'
7624	Protocol BastionConnectProtocol `json:"protocol,omitempty"`
7625	// TargetResourceID - READ-ONLY; The resource id of the target.
7626	TargetResourceID *string `json:"targetResourceId,omitempty"`
7627	// SessionDurationInMins - READ-ONLY; Duration in mins the session has been active.
7628	SessionDurationInMins *float64 `json:"sessionDurationInMins,omitempty"`
7629}
7630
7631// MarshalJSON is the custom marshaler for BastionActiveSession.
7632func (bas BastionActiveSession) MarshalJSON() ([]byte, error) {
7633	objectMap := make(map[string]interface{})
7634	return json.Marshal(objectMap)
7635}
7636
7637// BastionActiveSessionListResult response for GetActiveSessions.
7638type BastionActiveSessionListResult struct {
7639	autorest.Response `json:"-"`
7640	// Value - List of active sessions on the bastion.
7641	Value *[]BastionActiveSession `json:"value,omitempty"`
7642	// NextLink - The URL to get the next set of results.
7643	NextLink *string `json:"nextLink,omitempty"`
7644}
7645
7646// BastionActiveSessionListResultIterator provides access to a complete listing of BastionActiveSession
7647// values.
7648type BastionActiveSessionListResultIterator struct {
7649	i    int
7650	page BastionActiveSessionListResultPage
7651}
7652
7653// NextWithContext advances to the next value.  If there was an error making
7654// the request the iterator does not advance and the error is returned.
7655func (iter *BastionActiveSessionListResultIterator) NextWithContext(ctx context.Context) (err error) {
7656	if tracing.IsEnabled() {
7657		ctx = tracing.StartSpan(ctx, fqdn+"/BastionActiveSessionListResultIterator.NextWithContext")
7658		defer func() {
7659			sc := -1
7660			if iter.Response().Response.Response != nil {
7661				sc = iter.Response().Response.Response.StatusCode
7662			}
7663			tracing.EndSpan(ctx, sc, err)
7664		}()
7665	}
7666	iter.i++
7667	if iter.i < len(iter.page.Values()) {
7668		return nil
7669	}
7670	err = iter.page.NextWithContext(ctx)
7671	if err != nil {
7672		iter.i--
7673		return err
7674	}
7675	iter.i = 0
7676	return nil
7677}
7678
7679// Next advances to the next value.  If there was an error making
7680// the request the iterator does not advance and the error is returned.
7681// Deprecated: Use NextWithContext() instead.
7682func (iter *BastionActiveSessionListResultIterator) Next() error {
7683	return iter.NextWithContext(context.Background())
7684}
7685
7686// NotDone returns true if the enumeration should be started or is not yet complete.
7687func (iter BastionActiveSessionListResultIterator) NotDone() bool {
7688	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7689}
7690
7691// Response returns the raw server response from the last page request.
7692func (iter BastionActiveSessionListResultIterator) Response() BastionActiveSessionListResult {
7693	return iter.page.Response()
7694}
7695
7696// Value returns the current value or a zero-initialized value if the
7697// iterator has advanced beyond the end of the collection.
7698func (iter BastionActiveSessionListResultIterator) Value() BastionActiveSession {
7699	if !iter.page.NotDone() {
7700		return BastionActiveSession{}
7701	}
7702	return iter.page.Values()[iter.i]
7703}
7704
7705// Creates a new instance of the BastionActiveSessionListResultIterator type.
7706func NewBastionActiveSessionListResultIterator(page BastionActiveSessionListResultPage) BastionActiveSessionListResultIterator {
7707	return BastionActiveSessionListResultIterator{page: page}
7708}
7709
7710// IsEmpty returns true if the ListResult contains no values.
7711func (baslr BastionActiveSessionListResult) IsEmpty() bool {
7712	return baslr.Value == nil || len(*baslr.Value) == 0
7713}
7714
7715// hasNextLink returns true if the NextLink is not empty.
7716func (baslr BastionActiveSessionListResult) hasNextLink() bool {
7717	return baslr.NextLink != nil && len(*baslr.NextLink) != 0
7718}
7719
7720// bastionActiveSessionListResultPreparer prepares a request to retrieve the next set of results.
7721// It returns nil if no more results exist.
7722func (baslr BastionActiveSessionListResult) bastionActiveSessionListResultPreparer(ctx context.Context) (*http.Request, error) {
7723	if !baslr.hasNextLink() {
7724		return nil, nil
7725	}
7726	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7727		autorest.AsJSON(),
7728		autorest.AsGet(),
7729		autorest.WithBaseURL(to.String(baslr.NextLink)))
7730}
7731
7732// BastionActiveSessionListResultPage contains a page of BastionActiveSession values.
7733type BastionActiveSessionListResultPage struct {
7734	fn    func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error)
7735	baslr BastionActiveSessionListResult
7736}
7737
7738// NextWithContext advances to the next page of values.  If there was an error making
7739// the request the page does not advance and the error is returned.
7740func (page *BastionActiveSessionListResultPage) NextWithContext(ctx context.Context) (err error) {
7741	if tracing.IsEnabled() {
7742		ctx = tracing.StartSpan(ctx, fqdn+"/BastionActiveSessionListResultPage.NextWithContext")
7743		defer func() {
7744			sc := -1
7745			if page.Response().Response.Response != nil {
7746				sc = page.Response().Response.Response.StatusCode
7747			}
7748			tracing.EndSpan(ctx, sc, err)
7749		}()
7750	}
7751	for {
7752		next, err := page.fn(ctx, page.baslr)
7753		if err != nil {
7754			return err
7755		}
7756		page.baslr = next
7757		if !next.hasNextLink() || !next.IsEmpty() {
7758			break
7759		}
7760	}
7761	return nil
7762}
7763
7764// Next advances to the next page of values.  If there was an error making
7765// the request the page does not advance and the error is returned.
7766// Deprecated: Use NextWithContext() instead.
7767func (page *BastionActiveSessionListResultPage) Next() error {
7768	return page.NextWithContext(context.Background())
7769}
7770
7771// NotDone returns true if the page enumeration should be started or is not yet complete.
7772func (page BastionActiveSessionListResultPage) NotDone() bool {
7773	return !page.baslr.IsEmpty()
7774}
7775
7776// Response returns the raw server response from the last page request.
7777func (page BastionActiveSessionListResultPage) Response() BastionActiveSessionListResult {
7778	return page.baslr
7779}
7780
7781// Values returns the slice of values for the current page or nil if there are no values.
7782func (page BastionActiveSessionListResultPage) Values() []BastionActiveSession {
7783	if page.baslr.IsEmpty() {
7784		return nil
7785	}
7786	return *page.baslr.Value
7787}
7788
7789// Creates a new instance of the BastionActiveSessionListResultPage type.
7790func NewBastionActiveSessionListResultPage(cur BastionActiveSessionListResult, getNextPage func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error)) BastionActiveSessionListResultPage {
7791	return BastionActiveSessionListResultPage{
7792		fn:    getNextPage,
7793		baslr: cur,
7794	}
7795}
7796
7797// BastionHost bastion Host resource.
7798type BastionHost struct {
7799	autorest.Response `json:"-"`
7800	// BastionHostPropertiesFormat - Represents the bastion host resource.
7801	*BastionHostPropertiesFormat `json:"properties,omitempty"`
7802	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7803	Etag *string `json:"etag,omitempty"`
7804	// ID - Resource ID.
7805	ID *string `json:"id,omitempty"`
7806	// Name - READ-ONLY; Resource name.
7807	Name *string `json:"name,omitempty"`
7808	// Type - READ-ONLY; Resource type.
7809	Type *string `json:"type,omitempty"`
7810	// Location - Resource location.
7811	Location *string `json:"location,omitempty"`
7812	// Tags - Resource tags.
7813	Tags map[string]*string `json:"tags"`
7814}
7815
7816// MarshalJSON is the custom marshaler for BastionHost.
7817func (bh BastionHost) MarshalJSON() ([]byte, error) {
7818	objectMap := make(map[string]interface{})
7819	if bh.BastionHostPropertiesFormat != nil {
7820		objectMap["properties"] = bh.BastionHostPropertiesFormat
7821	}
7822	if bh.ID != nil {
7823		objectMap["id"] = bh.ID
7824	}
7825	if bh.Location != nil {
7826		objectMap["location"] = bh.Location
7827	}
7828	if bh.Tags != nil {
7829		objectMap["tags"] = bh.Tags
7830	}
7831	return json.Marshal(objectMap)
7832}
7833
7834// UnmarshalJSON is the custom unmarshaler for BastionHost struct.
7835func (bh *BastionHost) UnmarshalJSON(body []byte) error {
7836	var m map[string]*json.RawMessage
7837	err := json.Unmarshal(body, &m)
7838	if err != nil {
7839		return err
7840	}
7841	for k, v := range m {
7842		switch k {
7843		case "properties":
7844			if v != nil {
7845				var bastionHostPropertiesFormat BastionHostPropertiesFormat
7846				err = json.Unmarshal(*v, &bastionHostPropertiesFormat)
7847				if err != nil {
7848					return err
7849				}
7850				bh.BastionHostPropertiesFormat = &bastionHostPropertiesFormat
7851			}
7852		case "etag":
7853			if v != nil {
7854				var etag string
7855				err = json.Unmarshal(*v, &etag)
7856				if err != nil {
7857					return err
7858				}
7859				bh.Etag = &etag
7860			}
7861		case "id":
7862			if v != nil {
7863				var ID string
7864				err = json.Unmarshal(*v, &ID)
7865				if err != nil {
7866					return err
7867				}
7868				bh.ID = &ID
7869			}
7870		case "name":
7871			if v != nil {
7872				var name string
7873				err = json.Unmarshal(*v, &name)
7874				if err != nil {
7875					return err
7876				}
7877				bh.Name = &name
7878			}
7879		case "type":
7880			if v != nil {
7881				var typeVar string
7882				err = json.Unmarshal(*v, &typeVar)
7883				if err != nil {
7884					return err
7885				}
7886				bh.Type = &typeVar
7887			}
7888		case "location":
7889			if v != nil {
7890				var location string
7891				err = json.Unmarshal(*v, &location)
7892				if err != nil {
7893					return err
7894				}
7895				bh.Location = &location
7896			}
7897		case "tags":
7898			if v != nil {
7899				var tags map[string]*string
7900				err = json.Unmarshal(*v, &tags)
7901				if err != nil {
7902					return err
7903				}
7904				bh.Tags = tags
7905			}
7906		}
7907	}
7908
7909	return nil
7910}
7911
7912// BastionHostIPConfiguration IP configuration of an Bastion Host.
7913type BastionHostIPConfiguration struct {
7914	// BastionHostIPConfigurationPropertiesFormat - Represents the ip configuration associated with the resource.
7915	*BastionHostIPConfigurationPropertiesFormat `json:"properties,omitempty"`
7916	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
7917	Name *string `json:"name,omitempty"`
7918	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7919	Etag *string `json:"etag,omitempty"`
7920	// Type - READ-ONLY; Ip configuration type.
7921	Type *string `json:"type,omitempty"`
7922	// ID - Resource ID.
7923	ID *string `json:"id,omitempty"`
7924}
7925
7926// MarshalJSON is the custom marshaler for BastionHostIPConfiguration.
7927func (bhic BastionHostIPConfiguration) MarshalJSON() ([]byte, error) {
7928	objectMap := make(map[string]interface{})
7929	if bhic.BastionHostIPConfigurationPropertiesFormat != nil {
7930		objectMap["properties"] = bhic.BastionHostIPConfigurationPropertiesFormat
7931	}
7932	if bhic.Name != nil {
7933		objectMap["name"] = bhic.Name
7934	}
7935	if bhic.ID != nil {
7936		objectMap["id"] = bhic.ID
7937	}
7938	return json.Marshal(objectMap)
7939}
7940
7941// UnmarshalJSON is the custom unmarshaler for BastionHostIPConfiguration struct.
7942func (bhic *BastionHostIPConfiguration) UnmarshalJSON(body []byte) error {
7943	var m map[string]*json.RawMessage
7944	err := json.Unmarshal(body, &m)
7945	if err != nil {
7946		return err
7947	}
7948	for k, v := range m {
7949		switch k {
7950		case "properties":
7951			if v != nil {
7952				var bastionHostIPConfigurationPropertiesFormat BastionHostIPConfigurationPropertiesFormat
7953				err = json.Unmarshal(*v, &bastionHostIPConfigurationPropertiesFormat)
7954				if err != nil {
7955					return err
7956				}
7957				bhic.BastionHostIPConfigurationPropertiesFormat = &bastionHostIPConfigurationPropertiesFormat
7958			}
7959		case "name":
7960			if v != nil {
7961				var name string
7962				err = json.Unmarshal(*v, &name)
7963				if err != nil {
7964					return err
7965				}
7966				bhic.Name = &name
7967			}
7968		case "etag":
7969			if v != nil {
7970				var etag string
7971				err = json.Unmarshal(*v, &etag)
7972				if err != nil {
7973					return err
7974				}
7975				bhic.Etag = &etag
7976			}
7977		case "type":
7978			if v != nil {
7979				var typeVar string
7980				err = json.Unmarshal(*v, &typeVar)
7981				if err != nil {
7982					return err
7983				}
7984				bhic.Type = &typeVar
7985			}
7986		case "id":
7987			if v != nil {
7988				var ID string
7989				err = json.Unmarshal(*v, &ID)
7990				if err != nil {
7991					return err
7992				}
7993				bhic.ID = &ID
7994			}
7995		}
7996	}
7997
7998	return nil
7999}
8000
8001// BastionHostIPConfigurationPropertiesFormat properties of IP configuration of an Bastion Host.
8002type BastionHostIPConfigurationPropertiesFormat struct {
8003	// Subnet - Reference of the subnet resource.
8004	Subnet *SubResource `json:"subnet,omitempty"`
8005	// PublicIPAddress - Reference of the PublicIP resource.
8006	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
8007	// ProvisioningState - READ-ONLY; The provisioning state of the bastion host IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
8008	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8009	// PrivateIPAllocationMethod - Private IP allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic'
8010	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
8011}
8012
8013// MarshalJSON is the custom marshaler for BastionHostIPConfigurationPropertiesFormat.
8014func (bhicpf BastionHostIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
8015	objectMap := make(map[string]interface{})
8016	if bhicpf.Subnet != nil {
8017		objectMap["subnet"] = bhicpf.Subnet
8018	}
8019	if bhicpf.PublicIPAddress != nil {
8020		objectMap["publicIPAddress"] = bhicpf.PublicIPAddress
8021	}
8022	if bhicpf.PrivateIPAllocationMethod != "" {
8023		objectMap["privateIPAllocationMethod"] = bhicpf.PrivateIPAllocationMethod
8024	}
8025	return json.Marshal(objectMap)
8026}
8027
8028// BastionHostListResult response for ListBastionHosts API service call.
8029type BastionHostListResult struct {
8030	autorest.Response `json:"-"`
8031	// Value - List of Bastion Hosts in a resource group.
8032	Value *[]BastionHost `json:"value,omitempty"`
8033	// NextLink - URL to get the next set of results.
8034	NextLink *string `json:"nextLink,omitempty"`
8035}
8036
8037// BastionHostListResultIterator provides access to a complete listing of BastionHost values.
8038type BastionHostListResultIterator struct {
8039	i    int
8040	page BastionHostListResultPage
8041}
8042
8043// NextWithContext advances to the next value.  If there was an error making
8044// the request the iterator does not advance and the error is returned.
8045func (iter *BastionHostListResultIterator) NextWithContext(ctx context.Context) (err error) {
8046	if tracing.IsEnabled() {
8047		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultIterator.NextWithContext")
8048		defer func() {
8049			sc := -1
8050			if iter.Response().Response.Response != nil {
8051				sc = iter.Response().Response.Response.StatusCode
8052			}
8053			tracing.EndSpan(ctx, sc, err)
8054		}()
8055	}
8056	iter.i++
8057	if iter.i < len(iter.page.Values()) {
8058		return nil
8059	}
8060	err = iter.page.NextWithContext(ctx)
8061	if err != nil {
8062		iter.i--
8063		return err
8064	}
8065	iter.i = 0
8066	return nil
8067}
8068
8069// Next advances to the next value.  If there was an error making
8070// the request the iterator does not advance and the error is returned.
8071// Deprecated: Use NextWithContext() instead.
8072func (iter *BastionHostListResultIterator) Next() error {
8073	return iter.NextWithContext(context.Background())
8074}
8075
8076// NotDone returns true if the enumeration should be started or is not yet complete.
8077func (iter BastionHostListResultIterator) NotDone() bool {
8078	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8079}
8080
8081// Response returns the raw server response from the last page request.
8082func (iter BastionHostListResultIterator) Response() BastionHostListResult {
8083	return iter.page.Response()
8084}
8085
8086// Value returns the current value or a zero-initialized value if the
8087// iterator has advanced beyond the end of the collection.
8088func (iter BastionHostListResultIterator) Value() BastionHost {
8089	if !iter.page.NotDone() {
8090		return BastionHost{}
8091	}
8092	return iter.page.Values()[iter.i]
8093}
8094
8095// Creates a new instance of the BastionHostListResultIterator type.
8096func NewBastionHostListResultIterator(page BastionHostListResultPage) BastionHostListResultIterator {
8097	return BastionHostListResultIterator{page: page}
8098}
8099
8100// IsEmpty returns true if the ListResult contains no values.
8101func (bhlr BastionHostListResult) IsEmpty() bool {
8102	return bhlr.Value == nil || len(*bhlr.Value) == 0
8103}
8104
8105// hasNextLink returns true if the NextLink is not empty.
8106func (bhlr BastionHostListResult) hasNextLink() bool {
8107	return bhlr.NextLink != nil && len(*bhlr.NextLink) != 0
8108}
8109
8110// bastionHostListResultPreparer prepares a request to retrieve the next set of results.
8111// It returns nil if no more results exist.
8112func (bhlr BastionHostListResult) bastionHostListResultPreparer(ctx context.Context) (*http.Request, error) {
8113	if !bhlr.hasNextLink() {
8114		return nil, nil
8115	}
8116	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8117		autorest.AsJSON(),
8118		autorest.AsGet(),
8119		autorest.WithBaseURL(to.String(bhlr.NextLink)))
8120}
8121
8122// BastionHostListResultPage contains a page of BastionHost values.
8123type BastionHostListResultPage struct {
8124	fn   func(context.Context, BastionHostListResult) (BastionHostListResult, error)
8125	bhlr BastionHostListResult
8126}
8127
8128// NextWithContext advances to the next page of values.  If there was an error making
8129// the request the page does not advance and the error is returned.
8130func (page *BastionHostListResultPage) NextWithContext(ctx context.Context) (err error) {
8131	if tracing.IsEnabled() {
8132		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultPage.NextWithContext")
8133		defer func() {
8134			sc := -1
8135			if page.Response().Response.Response != nil {
8136				sc = page.Response().Response.Response.StatusCode
8137			}
8138			tracing.EndSpan(ctx, sc, err)
8139		}()
8140	}
8141	for {
8142		next, err := page.fn(ctx, page.bhlr)
8143		if err != nil {
8144			return err
8145		}
8146		page.bhlr = next
8147		if !next.hasNextLink() || !next.IsEmpty() {
8148			break
8149		}
8150	}
8151	return nil
8152}
8153
8154// Next advances to the next page of values.  If there was an error making
8155// the request the page does not advance and the error is returned.
8156// Deprecated: Use NextWithContext() instead.
8157func (page *BastionHostListResultPage) Next() error {
8158	return page.NextWithContext(context.Background())
8159}
8160
8161// NotDone returns true if the page enumeration should be started or is not yet complete.
8162func (page BastionHostListResultPage) NotDone() bool {
8163	return !page.bhlr.IsEmpty()
8164}
8165
8166// Response returns the raw server response from the last page request.
8167func (page BastionHostListResultPage) Response() BastionHostListResult {
8168	return page.bhlr
8169}
8170
8171// Values returns the slice of values for the current page or nil if there are no values.
8172func (page BastionHostListResultPage) Values() []BastionHost {
8173	if page.bhlr.IsEmpty() {
8174		return nil
8175	}
8176	return *page.bhlr.Value
8177}
8178
8179// Creates a new instance of the BastionHostListResultPage type.
8180func NewBastionHostListResultPage(cur BastionHostListResult, getNextPage func(context.Context, BastionHostListResult) (BastionHostListResult, error)) BastionHostListResultPage {
8181	return BastionHostListResultPage{
8182		fn:   getNextPage,
8183		bhlr: cur,
8184	}
8185}
8186
8187// BastionHostPropertiesFormat properties of the Bastion Host.
8188type BastionHostPropertiesFormat struct {
8189	// IPConfigurations - IP configuration of the Bastion Host resource.
8190	IPConfigurations *[]BastionHostIPConfiguration `json:"ipConfigurations,omitempty"`
8191	// DNSName - FQDN for the endpoint on which bastion host is accessible.
8192	DNSName *string `json:"dnsName,omitempty"`
8193	// ProvisioningState - READ-ONLY; The provisioning state of the bastion host resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
8194	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8195}
8196
8197// MarshalJSON is the custom marshaler for BastionHostPropertiesFormat.
8198func (bhpf BastionHostPropertiesFormat) MarshalJSON() ([]byte, error) {
8199	objectMap := make(map[string]interface{})
8200	if bhpf.IPConfigurations != nil {
8201		objectMap["ipConfigurations"] = bhpf.IPConfigurations
8202	}
8203	if bhpf.DNSName != nil {
8204		objectMap["dnsName"] = bhpf.DNSName
8205	}
8206	return json.Marshal(objectMap)
8207}
8208
8209// BastionHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8210// long-running operation.
8211type BastionHostsCreateOrUpdateFuture struct {
8212	azure.FutureAPI
8213	// Result returns the result of the asynchronous operation.
8214	// If the operation has not completed it will return an error.
8215	Result func(BastionHostsClient) (BastionHost, error)
8216}
8217
8218// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8219func (future *BastionHostsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8220	var azFuture azure.Future
8221	if err := json.Unmarshal(body, &azFuture); err != nil {
8222		return err
8223	}
8224	future.FutureAPI = &azFuture
8225	future.Result = future.result
8226	return nil
8227}
8228
8229// result is the default implementation for BastionHostsCreateOrUpdateFuture.Result.
8230func (future *BastionHostsCreateOrUpdateFuture) result(client BastionHostsClient) (bh BastionHost, err error) {
8231	var done bool
8232	done, err = future.DoneWithContext(context.Background(), client)
8233	if err != nil {
8234		err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8235		return
8236	}
8237	if !done {
8238		bh.Response.Response = future.Response()
8239		err = azure.NewAsyncOpIncompleteError("network.BastionHostsCreateOrUpdateFuture")
8240		return
8241	}
8242	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8243	if bh.Response.Response, err = future.GetResult(sender); err == nil && bh.Response.Response.StatusCode != http.StatusNoContent {
8244		bh, err = client.CreateOrUpdateResponder(bh.Response.Response)
8245		if err != nil {
8246			err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", bh.Response.Response, "Failure responding to request")
8247		}
8248	}
8249	return
8250}
8251
8252// BastionHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
8253// operation.
8254type BastionHostsDeleteFuture struct {
8255	azure.FutureAPI
8256	// Result returns the result of the asynchronous operation.
8257	// If the operation has not completed it will return an error.
8258	Result func(BastionHostsClient) (autorest.Response, error)
8259}
8260
8261// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8262func (future *BastionHostsDeleteFuture) UnmarshalJSON(body []byte) error {
8263	var azFuture azure.Future
8264	if err := json.Unmarshal(body, &azFuture); err != nil {
8265		return err
8266	}
8267	future.FutureAPI = &azFuture
8268	future.Result = future.result
8269	return nil
8270}
8271
8272// result is the default implementation for BastionHostsDeleteFuture.Result.
8273func (future *BastionHostsDeleteFuture) result(client BastionHostsClient) (ar autorest.Response, err error) {
8274	var done bool
8275	done, err = future.DoneWithContext(context.Background(), client)
8276	if err != nil {
8277		err = autorest.NewErrorWithError(err, "network.BastionHostsDeleteFuture", "Result", future.Response(), "Polling failure")
8278		return
8279	}
8280	if !done {
8281		ar.Response = future.Response()
8282		err = azure.NewAsyncOpIncompleteError("network.BastionHostsDeleteFuture")
8283		return
8284	}
8285	ar.Response = future.Response()
8286	return
8287}
8288
8289// BastionSessionDeleteResult response for DisconnectActiveSessions.
8290type BastionSessionDeleteResult struct {
8291	autorest.Response `json:"-"`
8292	// Value - List of sessions with their corresponding state.
8293	Value *[]BastionSessionState `json:"value,omitempty"`
8294	// NextLink - The URL to get the next set of results.
8295	NextLink *string `json:"nextLink,omitempty"`
8296}
8297
8298// BastionSessionDeleteResultIterator provides access to a complete listing of BastionSessionState values.
8299type BastionSessionDeleteResultIterator struct {
8300	i    int
8301	page BastionSessionDeleteResultPage
8302}
8303
8304// NextWithContext advances to the next value.  If there was an error making
8305// the request the iterator does not advance and the error is returned.
8306func (iter *BastionSessionDeleteResultIterator) NextWithContext(ctx context.Context) (err error) {
8307	if tracing.IsEnabled() {
8308		ctx = tracing.StartSpan(ctx, fqdn+"/BastionSessionDeleteResultIterator.NextWithContext")
8309		defer func() {
8310			sc := -1
8311			if iter.Response().Response.Response != nil {
8312				sc = iter.Response().Response.Response.StatusCode
8313			}
8314			tracing.EndSpan(ctx, sc, err)
8315		}()
8316	}
8317	iter.i++
8318	if iter.i < len(iter.page.Values()) {
8319		return nil
8320	}
8321	err = iter.page.NextWithContext(ctx)
8322	if err != nil {
8323		iter.i--
8324		return err
8325	}
8326	iter.i = 0
8327	return nil
8328}
8329
8330// Next advances to the next value.  If there was an error making
8331// the request the iterator does not advance and the error is returned.
8332// Deprecated: Use NextWithContext() instead.
8333func (iter *BastionSessionDeleteResultIterator) Next() error {
8334	return iter.NextWithContext(context.Background())
8335}
8336
8337// NotDone returns true if the enumeration should be started or is not yet complete.
8338func (iter BastionSessionDeleteResultIterator) NotDone() bool {
8339	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8340}
8341
8342// Response returns the raw server response from the last page request.
8343func (iter BastionSessionDeleteResultIterator) Response() BastionSessionDeleteResult {
8344	return iter.page.Response()
8345}
8346
8347// Value returns the current value or a zero-initialized value if the
8348// iterator has advanced beyond the end of the collection.
8349func (iter BastionSessionDeleteResultIterator) Value() BastionSessionState {
8350	if !iter.page.NotDone() {
8351		return BastionSessionState{}
8352	}
8353	return iter.page.Values()[iter.i]
8354}
8355
8356// Creates a new instance of the BastionSessionDeleteResultIterator type.
8357func NewBastionSessionDeleteResultIterator(page BastionSessionDeleteResultPage) BastionSessionDeleteResultIterator {
8358	return BastionSessionDeleteResultIterator{page: page}
8359}
8360
8361// IsEmpty returns true if the ListResult contains no values.
8362func (bsdr BastionSessionDeleteResult) IsEmpty() bool {
8363	return bsdr.Value == nil || len(*bsdr.Value) == 0
8364}
8365
8366// hasNextLink returns true if the NextLink is not empty.
8367func (bsdr BastionSessionDeleteResult) hasNextLink() bool {
8368	return bsdr.NextLink != nil && len(*bsdr.NextLink) != 0
8369}
8370
8371// bastionSessionDeleteResultPreparer prepares a request to retrieve the next set of results.
8372// It returns nil if no more results exist.
8373func (bsdr BastionSessionDeleteResult) bastionSessionDeleteResultPreparer(ctx context.Context) (*http.Request, error) {
8374	if !bsdr.hasNextLink() {
8375		return nil, nil
8376	}
8377	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8378		autorest.AsJSON(),
8379		autorest.AsGet(),
8380		autorest.WithBaseURL(to.String(bsdr.NextLink)))
8381}
8382
8383// BastionSessionDeleteResultPage contains a page of BastionSessionState values.
8384type BastionSessionDeleteResultPage struct {
8385	fn   func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error)
8386	bsdr BastionSessionDeleteResult
8387}
8388
8389// NextWithContext advances to the next page of values.  If there was an error making
8390// the request the page does not advance and the error is returned.
8391func (page *BastionSessionDeleteResultPage) NextWithContext(ctx context.Context) (err error) {
8392	if tracing.IsEnabled() {
8393		ctx = tracing.StartSpan(ctx, fqdn+"/BastionSessionDeleteResultPage.NextWithContext")
8394		defer func() {
8395			sc := -1
8396			if page.Response().Response.Response != nil {
8397				sc = page.Response().Response.Response.StatusCode
8398			}
8399			tracing.EndSpan(ctx, sc, err)
8400		}()
8401	}
8402	for {
8403		next, err := page.fn(ctx, page.bsdr)
8404		if err != nil {
8405			return err
8406		}
8407		page.bsdr = next
8408		if !next.hasNextLink() || !next.IsEmpty() {
8409			break
8410		}
8411	}
8412	return nil
8413}
8414
8415// Next advances to the next page of values.  If there was an error making
8416// the request the page does not advance and the error is returned.
8417// Deprecated: Use NextWithContext() instead.
8418func (page *BastionSessionDeleteResultPage) Next() error {
8419	return page.NextWithContext(context.Background())
8420}
8421
8422// NotDone returns true if the page enumeration should be started or is not yet complete.
8423func (page BastionSessionDeleteResultPage) NotDone() bool {
8424	return !page.bsdr.IsEmpty()
8425}
8426
8427// Response returns the raw server response from the last page request.
8428func (page BastionSessionDeleteResultPage) Response() BastionSessionDeleteResult {
8429	return page.bsdr
8430}
8431
8432// Values returns the slice of values for the current page or nil if there are no values.
8433func (page BastionSessionDeleteResultPage) Values() []BastionSessionState {
8434	if page.bsdr.IsEmpty() {
8435		return nil
8436	}
8437	return *page.bsdr.Value
8438}
8439
8440// Creates a new instance of the BastionSessionDeleteResultPage type.
8441func NewBastionSessionDeleteResultPage(cur BastionSessionDeleteResult, getNextPage func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error)) BastionSessionDeleteResultPage {
8442	return BastionSessionDeleteResultPage{
8443		fn:   getNextPage,
8444		bsdr: cur,
8445	}
8446}
8447
8448// BastionSessionState the session state detail for a target.
8449type BastionSessionState struct {
8450	// SessionID - READ-ONLY; A unique id for the session.
8451	SessionID *string `json:"sessionId,omitempty"`
8452	// Message - READ-ONLY; Used for extra information.
8453	Message *string `json:"message,omitempty"`
8454	// State - READ-ONLY; The state of the session. Disconnected/Failed/NotFound.
8455	State *string `json:"state,omitempty"`
8456}
8457
8458// MarshalJSON is the custom marshaler for BastionSessionState.
8459func (bss BastionSessionState) MarshalJSON() ([]byte, error) {
8460	objectMap := make(map[string]interface{})
8461	return json.Marshal(objectMap)
8462}
8463
8464// BastionShareableLink bastion Shareable Link.
8465type BastionShareableLink struct {
8466	// VM - Reference of the virtual machine resource.
8467	VM *VM `json:"vm,omitempty"`
8468	// Bsl - READ-ONLY; The unique Bastion Shareable Link to the virtual machine.
8469	Bsl *string `json:"bsl,omitempty"`
8470	// CreatedAt - READ-ONLY; The time when the link was created.
8471	CreatedAt *string `json:"createdAt,omitempty"`
8472	// Message - READ-ONLY; Optional field indicating the warning or error message related to the vm in case of partial failure.
8473	Message *string `json:"message,omitempty"`
8474}
8475
8476// MarshalJSON is the custom marshaler for BastionShareableLink.
8477func (bsl BastionShareableLink) MarshalJSON() ([]byte, error) {
8478	objectMap := make(map[string]interface{})
8479	if bsl.VM != nil {
8480		objectMap["vm"] = bsl.VM
8481	}
8482	return json.Marshal(objectMap)
8483}
8484
8485// BastionShareableLinkListRequest post request for all the Bastion Shareable Link endpoints.
8486type BastionShareableLinkListRequest struct {
8487	// Vms - List of VM references.
8488	Vms *[]BastionShareableLink `json:"vms,omitempty"`
8489}
8490
8491// BastionShareableLinkListResult response for all the Bastion Shareable Link endpoints.
8492type BastionShareableLinkListResult struct {
8493	autorest.Response `json:"-"`
8494	// Value - List of Bastion Shareable Links for the request.
8495	Value *[]BastionShareableLink `json:"value,omitempty"`
8496	// NextLink - The URL to get the next set of results.
8497	NextLink *string `json:"nextLink,omitempty"`
8498}
8499
8500// BastionShareableLinkListResultIterator provides access to a complete listing of BastionShareableLink
8501// values.
8502type BastionShareableLinkListResultIterator struct {
8503	i    int
8504	page BastionShareableLinkListResultPage
8505}
8506
8507// NextWithContext advances to the next value.  If there was an error making
8508// the request the iterator does not advance and the error is returned.
8509func (iter *BastionShareableLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
8510	if tracing.IsEnabled() {
8511		ctx = tracing.StartSpan(ctx, fqdn+"/BastionShareableLinkListResultIterator.NextWithContext")
8512		defer func() {
8513			sc := -1
8514			if iter.Response().Response.Response != nil {
8515				sc = iter.Response().Response.Response.StatusCode
8516			}
8517			tracing.EndSpan(ctx, sc, err)
8518		}()
8519	}
8520	iter.i++
8521	if iter.i < len(iter.page.Values()) {
8522		return nil
8523	}
8524	err = iter.page.NextWithContext(ctx)
8525	if err != nil {
8526		iter.i--
8527		return err
8528	}
8529	iter.i = 0
8530	return nil
8531}
8532
8533// Next advances to the next value.  If there was an error making
8534// the request the iterator does not advance and the error is returned.
8535// Deprecated: Use NextWithContext() instead.
8536func (iter *BastionShareableLinkListResultIterator) Next() error {
8537	return iter.NextWithContext(context.Background())
8538}
8539
8540// NotDone returns true if the enumeration should be started or is not yet complete.
8541func (iter BastionShareableLinkListResultIterator) NotDone() bool {
8542	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8543}
8544
8545// Response returns the raw server response from the last page request.
8546func (iter BastionShareableLinkListResultIterator) Response() BastionShareableLinkListResult {
8547	return iter.page.Response()
8548}
8549
8550// Value returns the current value or a zero-initialized value if the
8551// iterator has advanced beyond the end of the collection.
8552func (iter BastionShareableLinkListResultIterator) Value() BastionShareableLink {
8553	if !iter.page.NotDone() {
8554		return BastionShareableLink{}
8555	}
8556	return iter.page.Values()[iter.i]
8557}
8558
8559// Creates a new instance of the BastionShareableLinkListResultIterator type.
8560func NewBastionShareableLinkListResultIterator(page BastionShareableLinkListResultPage) BastionShareableLinkListResultIterator {
8561	return BastionShareableLinkListResultIterator{page: page}
8562}
8563
8564// IsEmpty returns true if the ListResult contains no values.
8565func (bsllr BastionShareableLinkListResult) IsEmpty() bool {
8566	return bsllr.Value == nil || len(*bsllr.Value) == 0
8567}
8568
8569// hasNextLink returns true if the NextLink is not empty.
8570func (bsllr BastionShareableLinkListResult) hasNextLink() bool {
8571	return bsllr.NextLink != nil && len(*bsllr.NextLink) != 0
8572}
8573
8574// bastionShareableLinkListResultPreparer prepares a request to retrieve the next set of results.
8575// It returns nil if no more results exist.
8576func (bsllr BastionShareableLinkListResult) bastionShareableLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
8577	if !bsllr.hasNextLink() {
8578		return nil, nil
8579	}
8580	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8581		autorest.AsJSON(),
8582		autorest.AsGet(),
8583		autorest.WithBaseURL(to.String(bsllr.NextLink)))
8584}
8585
8586// BastionShareableLinkListResultPage contains a page of BastionShareableLink values.
8587type BastionShareableLinkListResultPage struct {
8588	fn    func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error)
8589	bsllr BastionShareableLinkListResult
8590}
8591
8592// NextWithContext advances to the next page of values.  If there was an error making
8593// the request the page does not advance and the error is returned.
8594func (page *BastionShareableLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
8595	if tracing.IsEnabled() {
8596		ctx = tracing.StartSpan(ctx, fqdn+"/BastionShareableLinkListResultPage.NextWithContext")
8597		defer func() {
8598			sc := -1
8599			if page.Response().Response.Response != nil {
8600				sc = page.Response().Response.Response.StatusCode
8601			}
8602			tracing.EndSpan(ctx, sc, err)
8603		}()
8604	}
8605	for {
8606		next, err := page.fn(ctx, page.bsllr)
8607		if err != nil {
8608			return err
8609		}
8610		page.bsllr = next
8611		if !next.hasNextLink() || !next.IsEmpty() {
8612			break
8613		}
8614	}
8615	return nil
8616}
8617
8618// Next advances to the next page of values.  If there was an error making
8619// the request the page does not advance and the error is returned.
8620// Deprecated: Use NextWithContext() instead.
8621func (page *BastionShareableLinkListResultPage) Next() error {
8622	return page.NextWithContext(context.Background())
8623}
8624
8625// NotDone returns true if the page enumeration should be started or is not yet complete.
8626func (page BastionShareableLinkListResultPage) NotDone() bool {
8627	return !page.bsllr.IsEmpty()
8628}
8629
8630// Response returns the raw server response from the last page request.
8631func (page BastionShareableLinkListResultPage) Response() BastionShareableLinkListResult {
8632	return page.bsllr
8633}
8634
8635// Values returns the slice of values for the current page or nil if there are no values.
8636func (page BastionShareableLinkListResultPage) Values() []BastionShareableLink {
8637	if page.bsllr.IsEmpty() {
8638		return nil
8639	}
8640	return *page.bsllr.Value
8641}
8642
8643// Creates a new instance of the BastionShareableLinkListResultPage type.
8644func NewBastionShareableLinkListResultPage(cur BastionShareableLinkListResult, getNextPage func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error)) BastionShareableLinkListResultPage {
8645	return BastionShareableLinkListResultPage{
8646		fn:    getNextPage,
8647		bsllr: cur,
8648	}
8649}
8650
8651// BGPCommunity contains bgp community information offered in Service Community resources.
8652type BGPCommunity struct {
8653	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
8654	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
8655	// CommunityName - The name of the bgp community. e.g. Skype.
8656	CommunityName *string `json:"communityName,omitempty"`
8657	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
8658	CommunityValue *string `json:"communityValue,omitempty"`
8659	// CommunityPrefixes - The prefixes that the bgp community contains.
8660	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
8661	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
8662	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
8663	// ServiceGroup - The service group of the bgp community contains.
8664	ServiceGroup *string `json:"serviceGroup,omitempty"`
8665}
8666
8667// BgpConnection virtual Appliance Site resource.
8668type BgpConnection struct {
8669	autorest.Response `json:"-"`
8670	// BgpConnectionProperties - The properties of the Bgp connections.
8671	*BgpConnectionProperties `json:"properties,omitempty"`
8672	// Name - Name of the connection.
8673	Name *string `json:"name,omitempty"`
8674	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8675	Etag *string `json:"etag,omitempty"`
8676	// Type - READ-ONLY; Connection type.
8677	Type *string `json:"type,omitempty"`
8678	// ID - Resource ID.
8679	ID *string `json:"id,omitempty"`
8680}
8681
8682// MarshalJSON is the custom marshaler for BgpConnection.
8683func (bc BgpConnection) MarshalJSON() ([]byte, error) {
8684	objectMap := make(map[string]interface{})
8685	if bc.BgpConnectionProperties != nil {
8686		objectMap["properties"] = bc.BgpConnectionProperties
8687	}
8688	if bc.Name != nil {
8689		objectMap["name"] = bc.Name
8690	}
8691	if bc.ID != nil {
8692		objectMap["id"] = bc.ID
8693	}
8694	return json.Marshal(objectMap)
8695}
8696
8697// UnmarshalJSON is the custom unmarshaler for BgpConnection struct.
8698func (bc *BgpConnection) UnmarshalJSON(body []byte) error {
8699	var m map[string]*json.RawMessage
8700	err := json.Unmarshal(body, &m)
8701	if err != nil {
8702		return err
8703	}
8704	for k, v := range m {
8705		switch k {
8706		case "properties":
8707			if v != nil {
8708				var bgpConnectionProperties BgpConnectionProperties
8709				err = json.Unmarshal(*v, &bgpConnectionProperties)
8710				if err != nil {
8711					return err
8712				}
8713				bc.BgpConnectionProperties = &bgpConnectionProperties
8714			}
8715		case "name":
8716			if v != nil {
8717				var name string
8718				err = json.Unmarshal(*v, &name)
8719				if err != nil {
8720					return err
8721				}
8722				bc.Name = &name
8723			}
8724		case "etag":
8725			if v != nil {
8726				var etag string
8727				err = json.Unmarshal(*v, &etag)
8728				if err != nil {
8729					return err
8730				}
8731				bc.Etag = &etag
8732			}
8733		case "type":
8734			if v != nil {
8735				var typeVar string
8736				err = json.Unmarshal(*v, &typeVar)
8737				if err != nil {
8738					return err
8739				}
8740				bc.Type = &typeVar
8741			}
8742		case "id":
8743			if v != nil {
8744				var ID string
8745				err = json.Unmarshal(*v, &ID)
8746				if err != nil {
8747					return err
8748				}
8749				bc.ID = &ID
8750			}
8751		}
8752	}
8753
8754	return nil
8755}
8756
8757// BgpConnectionProperties properties of the bgp connection.
8758type BgpConnectionProperties struct {
8759	// PeerAsn - Peer ASN.
8760	PeerAsn *int64 `json:"peerAsn,omitempty"`
8761	// PeerIP - Peer IP.
8762	PeerIP *string `json:"peerIp,omitempty"`
8763	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
8764	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8765	// ConnectionState - READ-ONLY; The current state of the VirtualHub to Peer. Possible values include: 'HubBgpConnectionStatusUnknown', 'HubBgpConnectionStatusConnecting', 'HubBgpConnectionStatusConnected', 'HubBgpConnectionStatusNotConnected'
8766	ConnectionState HubBgpConnectionStatus `json:"connectionState,omitempty"`
8767}
8768
8769// MarshalJSON is the custom marshaler for BgpConnectionProperties.
8770func (bcp BgpConnectionProperties) MarshalJSON() ([]byte, error) {
8771	objectMap := make(map[string]interface{})
8772	if bcp.PeerAsn != nil {
8773		objectMap["peerAsn"] = bcp.PeerAsn
8774	}
8775	if bcp.PeerIP != nil {
8776		objectMap["peerIp"] = bcp.PeerIP
8777	}
8778	return json.Marshal(objectMap)
8779}
8780
8781// BgpPeerStatus BGP peer status details.
8782type BgpPeerStatus struct {
8783	// LocalAddress - READ-ONLY; The virtual network gateway's local address.
8784	LocalAddress *string `json:"localAddress,omitempty"`
8785	// Neighbor - READ-ONLY; The remote BGP peer.
8786	Neighbor *string `json:"neighbor,omitempty"`
8787	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer.
8788	Asn *int64 `json:"asn,omitempty"`
8789	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
8790	State BgpPeerState `json:"state,omitempty"`
8791	// ConnectedDuration - READ-ONLY; For how long the peering has been up.
8792	ConnectedDuration *string `json:"connectedDuration,omitempty"`
8793	// RoutesReceived - READ-ONLY; The number of routes learned from this peer.
8794	RoutesReceived *int64 `json:"routesReceived,omitempty"`
8795	// MessagesSent - READ-ONLY; The number of BGP messages sent.
8796	MessagesSent *int64 `json:"messagesSent,omitempty"`
8797	// MessagesReceived - READ-ONLY; The number of BGP messages received.
8798	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
8799}
8800
8801// MarshalJSON is the custom marshaler for BgpPeerStatus.
8802func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) {
8803	objectMap := make(map[string]interface{})
8804	return json.Marshal(objectMap)
8805}
8806
8807// BgpPeerStatusListResult response for list BGP peer status API service call.
8808type BgpPeerStatusListResult struct {
8809	autorest.Response `json:"-"`
8810	// Value - List of BGP peers.
8811	Value *[]BgpPeerStatus `json:"value,omitempty"`
8812}
8813
8814// BgpServiceCommunity service Community Properties.
8815type BgpServiceCommunity struct {
8816	// BgpServiceCommunityPropertiesFormat - Properties of the BGP service community.
8817	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
8818	// ID - Resource ID.
8819	ID *string `json:"id,omitempty"`
8820	// Name - READ-ONLY; Resource name.
8821	Name *string `json:"name,omitempty"`
8822	// Type - READ-ONLY; Resource type.
8823	Type *string `json:"type,omitempty"`
8824	// Location - Resource location.
8825	Location *string `json:"location,omitempty"`
8826	// Tags - Resource tags.
8827	Tags map[string]*string `json:"tags"`
8828}
8829
8830// MarshalJSON is the custom marshaler for BgpServiceCommunity.
8831func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
8832	objectMap := make(map[string]interface{})
8833	if bsc.BgpServiceCommunityPropertiesFormat != nil {
8834		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
8835	}
8836	if bsc.ID != nil {
8837		objectMap["id"] = bsc.ID
8838	}
8839	if bsc.Location != nil {
8840		objectMap["location"] = bsc.Location
8841	}
8842	if bsc.Tags != nil {
8843		objectMap["tags"] = bsc.Tags
8844	}
8845	return json.Marshal(objectMap)
8846}
8847
8848// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
8849func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
8850	var m map[string]*json.RawMessage
8851	err := json.Unmarshal(body, &m)
8852	if err != nil {
8853		return err
8854	}
8855	for k, v := range m {
8856		switch k {
8857		case "properties":
8858			if v != nil {
8859				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
8860				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
8861				if err != nil {
8862					return err
8863				}
8864				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
8865			}
8866		case "id":
8867			if v != nil {
8868				var ID string
8869				err = json.Unmarshal(*v, &ID)
8870				if err != nil {
8871					return err
8872				}
8873				bsc.ID = &ID
8874			}
8875		case "name":
8876			if v != nil {
8877				var name string
8878				err = json.Unmarshal(*v, &name)
8879				if err != nil {
8880					return err
8881				}
8882				bsc.Name = &name
8883			}
8884		case "type":
8885			if v != nil {
8886				var typeVar string
8887				err = json.Unmarshal(*v, &typeVar)
8888				if err != nil {
8889					return err
8890				}
8891				bsc.Type = &typeVar
8892			}
8893		case "location":
8894			if v != nil {
8895				var location string
8896				err = json.Unmarshal(*v, &location)
8897				if err != nil {
8898					return err
8899				}
8900				bsc.Location = &location
8901			}
8902		case "tags":
8903			if v != nil {
8904				var tags map[string]*string
8905				err = json.Unmarshal(*v, &tags)
8906				if err != nil {
8907					return err
8908				}
8909				bsc.Tags = tags
8910			}
8911		}
8912	}
8913
8914	return nil
8915}
8916
8917// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
8918type BgpServiceCommunityListResult struct {
8919	autorest.Response `json:"-"`
8920	// Value - A list of service community resources.
8921	Value *[]BgpServiceCommunity `json:"value,omitempty"`
8922	// NextLink - The URL to get the next set of results.
8923	NextLink *string `json:"nextLink,omitempty"`
8924}
8925
8926// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
8927// values.
8928type BgpServiceCommunityListResultIterator struct {
8929	i    int
8930	page BgpServiceCommunityListResultPage
8931}
8932
8933// NextWithContext advances to the next value.  If there was an error making
8934// the request the iterator does not advance and the error is returned.
8935func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
8936	if tracing.IsEnabled() {
8937		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
8938		defer func() {
8939			sc := -1
8940			if iter.Response().Response.Response != nil {
8941				sc = iter.Response().Response.Response.StatusCode
8942			}
8943			tracing.EndSpan(ctx, sc, err)
8944		}()
8945	}
8946	iter.i++
8947	if iter.i < len(iter.page.Values()) {
8948		return nil
8949	}
8950	err = iter.page.NextWithContext(ctx)
8951	if err != nil {
8952		iter.i--
8953		return err
8954	}
8955	iter.i = 0
8956	return nil
8957}
8958
8959// Next advances to the next value.  If there was an error making
8960// the request the iterator does not advance and the error is returned.
8961// Deprecated: Use NextWithContext() instead.
8962func (iter *BgpServiceCommunityListResultIterator) Next() error {
8963	return iter.NextWithContext(context.Background())
8964}
8965
8966// NotDone returns true if the enumeration should be started or is not yet complete.
8967func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
8968	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8969}
8970
8971// Response returns the raw server response from the last page request.
8972func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
8973	return iter.page.Response()
8974}
8975
8976// Value returns the current value or a zero-initialized value if the
8977// iterator has advanced beyond the end of the collection.
8978func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
8979	if !iter.page.NotDone() {
8980		return BgpServiceCommunity{}
8981	}
8982	return iter.page.Values()[iter.i]
8983}
8984
8985// Creates a new instance of the BgpServiceCommunityListResultIterator type.
8986func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
8987	return BgpServiceCommunityListResultIterator{page: page}
8988}
8989
8990// IsEmpty returns true if the ListResult contains no values.
8991func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
8992	return bsclr.Value == nil || len(*bsclr.Value) == 0
8993}
8994
8995// hasNextLink returns true if the NextLink is not empty.
8996func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
8997	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
8998}
8999
9000// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
9001// It returns nil if no more results exist.
9002func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
9003	if !bsclr.hasNextLink() {
9004		return nil, nil
9005	}
9006	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9007		autorest.AsJSON(),
9008		autorest.AsGet(),
9009		autorest.WithBaseURL(to.String(bsclr.NextLink)))
9010}
9011
9012// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
9013type BgpServiceCommunityListResultPage struct {
9014	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
9015	bsclr BgpServiceCommunityListResult
9016}
9017
9018// NextWithContext advances to the next page of values.  If there was an error making
9019// the request the page does not advance and the error is returned.
9020func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
9021	if tracing.IsEnabled() {
9022		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
9023		defer func() {
9024			sc := -1
9025			if page.Response().Response.Response != nil {
9026				sc = page.Response().Response.Response.StatusCode
9027			}
9028			tracing.EndSpan(ctx, sc, err)
9029		}()
9030	}
9031	for {
9032		next, err := page.fn(ctx, page.bsclr)
9033		if err != nil {
9034			return err
9035		}
9036		page.bsclr = next
9037		if !next.hasNextLink() || !next.IsEmpty() {
9038			break
9039		}
9040	}
9041	return nil
9042}
9043
9044// Next advances to the next page of values.  If there was an error making
9045// the request the page does not advance and the error is returned.
9046// Deprecated: Use NextWithContext() instead.
9047func (page *BgpServiceCommunityListResultPage) Next() error {
9048	return page.NextWithContext(context.Background())
9049}
9050
9051// NotDone returns true if the page enumeration should be started or is not yet complete.
9052func (page BgpServiceCommunityListResultPage) NotDone() bool {
9053	return !page.bsclr.IsEmpty()
9054}
9055
9056// Response returns the raw server response from the last page request.
9057func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
9058	return page.bsclr
9059}
9060
9061// Values returns the slice of values for the current page or nil if there are no values.
9062func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
9063	if page.bsclr.IsEmpty() {
9064		return nil
9065	}
9066	return *page.bsclr.Value
9067}
9068
9069// Creates a new instance of the BgpServiceCommunityListResultPage type.
9070func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
9071	return BgpServiceCommunityListResultPage{
9072		fn:    getNextPage,
9073		bsclr: cur,
9074	}
9075}
9076
9077// BgpServiceCommunityPropertiesFormat properties of Service Community.
9078type BgpServiceCommunityPropertiesFormat struct {
9079	// ServiceName - The name of the bgp community. e.g. Skype.
9080	ServiceName *string `json:"serviceName,omitempty"`
9081	// BgpCommunities - A list of bgp communities.
9082	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
9083}
9084
9085// BgpSettings BGP settings details.
9086type BgpSettings struct {
9087	// Asn - The BGP speaker's ASN.
9088	Asn *int64 `json:"asn,omitempty"`
9089	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
9090	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
9091	// PeerWeight - The weight added to routes learned from this BGP speaker.
9092	PeerWeight *int32 `json:"peerWeight,omitempty"`
9093	// BgpPeeringAddresses - BGP peering address with IP configuration ID for virtual network gateway.
9094	BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"`
9095}
9096
9097// BreakOutCategoryPolicies network Virtual Appliance Sku Properties.
9098type BreakOutCategoryPolicies struct {
9099	// Allow - Flag to control breakout of o365 allow category.
9100	Allow *bool `json:"allow,omitempty"`
9101	// Optimize - Flag to control breakout of o365 optimize category.
9102	Optimize *bool `json:"optimize,omitempty"`
9103	// Default - Flag to control breakout of o365 default category.
9104	Default *bool `json:"default,omitempty"`
9105}
9106
9107// CheckPrivateLinkServiceVisibilityRequest request body of the CheckPrivateLinkServiceVisibility API
9108// service call.
9109type CheckPrivateLinkServiceVisibilityRequest struct {
9110	// PrivateLinkServiceAlias - The alias of the private link service.
9111	PrivateLinkServiceAlias *string `json:"privateLinkServiceAlias,omitempty"`
9112}
9113
9114// CloudError an error response from the service.
9115type CloudError struct {
9116	// Error - Cloud error body.
9117	Error *CloudErrorBody `json:"error,omitempty"`
9118}
9119
9120// CloudErrorBody an error response from the service.
9121type CloudErrorBody struct {
9122	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
9123	Code *string `json:"code,omitempty"`
9124	// Message - A message describing the error, intended to be suitable for display in a user interface.
9125	Message *string `json:"message,omitempty"`
9126	// Target - The target of the particular error. For example, the name of the property in error.
9127	Target *string `json:"target,omitempty"`
9128	// Details - A list of additional details about the error.
9129	Details *[]CloudErrorBody `json:"details,omitempty"`
9130}
9131
9132// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
9133type ConfigurationDiagnosticParameters struct {
9134	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
9135	TargetResourceID *string `json:"targetResourceId,omitempty"`
9136	// VerbosityLevel - Verbosity level. Possible values include: 'VerbosityLevelNormal', 'VerbosityLevelMinimum', 'VerbosityLevelFull'
9137	VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"`
9138	// Profiles - List of network configuration diagnostic profiles.
9139	Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"`
9140}
9141
9142// ConfigurationDiagnosticProfile parameters to compare with network configuration.
9143type ConfigurationDiagnosticProfile struct {
9144	// Direction - The direction of the traffic. Possible values include: 'DirectionInbound', 'DirectionOutbound'
9145	Direction Direction `json:"direction,omitempty"`
9146	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
9147	Protocol *string `json:"protocol,omitempty"`
9148	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
9149	Source *string `json:"source,omitempty"`
9150	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
9151	Destination *string `json:"destination,omitempty"`
9152	// DestinationPort - Traffic destination port. Accepted values are '*' and a single port in the range (0 - 65535).
9153	DestinationPort *string `json:"destinationPort,omitempty"`
9154}
9155
9156// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
9157type ConfigurationDiagnosticResponse struct {
9158	autorest.Response `json:"-"`
9159	// Results - READ-ONLY; List of network configuration diagnostic results.
9160	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
9161}
9162
9163// MarshalJSON is the custom marshaler for ConfigurationDiagnosticResponse.
9164func (cdr ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) {
9165	objectMap := make(map[string]interface{})
9166	return json.Marshal(objectMap)
9167}
9168
9169// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
9170// query.
9171type ConfigurationDiagnosticResult struct {
9172	// Profile - Network configuration diagnostic profile.
9173	Profile *ConfigurationDiagnosticProfile `json:"profile,omitempty"`
9174	// NetworkSecurityGroupResult - Network security group result.
9175	NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"`
9176}
9177
9178// ConnectionMonitor parameters that define the operation to create a connection monitor.
9179type ConnectionMonitor struct {
9180	// Location - Connection monitor location.
9181	Location *string `json:"location,omitempty"`
9182	// Tags - Connection monitor tags.
9183	Tags map[string]*string `json:"tags"`
9184	// ConnectionMonitorParameters - Properties of the connection monitor.
9185	*ConnectionMonitorParameters `json:"properties,omitempty"`
9186}
9187
9188// MarshalJSON is the custom marshaler for ConnectionMonitor.
9189func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
9190	objectMap := make(map[string]interface{})
9191	if cm.Location != nil {
9192		objectMap["location"] = cm.Location
9193	}
9194	if cm.Tags != nil {
9195		objectMap["tags"] = cm.Tags
9196	}
9197	if cm.ConnectionMonitorParameters != nil {
9198		objectMap["properties"] = cm.ConnectionMonitorParameters
9199	}
9200	return json.Marshal(objectMap)
9201}
9202
9203// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
9204func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
9205	var m map[string]*json.RawMessage
9206	err := json.Unmarshal(body, &m)
9207	if err != nil {
9208		return err
9209	}
9210	for k, v := range m {
9211		switch k {
9212		case "location":
9213			if v != nil {
9214				var location string
9215				err = json.Unmarshal(*v, &location)
9216				if err != nil {
9217					return err
9218				}
9219				cm.Location = &location
9220			}
9221		case "tags":
9222			if v != nil {
9223				var tags map[string]*string
9224				err = json.Unmarshal(*v, &tags)
9225				if err != nil {
9226					return err
9227				}
9228				cm.Tags = tags
9229			}
9230		case "properties":
9231			if v != nil {
9232				var connectionMonitorParameters ConnectionMonitorParameters
9233				err = json.Unmarshal(*v, &connectionMonitorParameters)
9234				if err != nil {
9235					return err
9236				}
9237				cm.ConnectionMonitorParameters = &connectionMonitorParameters
9238			}
9239		}
9240	}
9241
9242	return nil
9243}
9244
9245// ConnectionMonitorDestination describes the destination of connection monitor.
9246type ConnectionMonitorDestination struct {
9247	// ResourceID - The ID of the resource used as the destination by connection monitor.
9248	ResourceID *string `json:"resourceId,omitempty"`
9249	// Address - Address of the connection monitor destination (IP or domain name).
9250	Address *string `json:"address,omitempty"`
9251	// Port - The destination port used by connection monitor.
9252	Port *int32 `json:"port,omitempty"`
9253}
9254
9255// ConnectionMonitorEndpoint describes the connection monitor endpoint.
9256type ConnectionMonitorEndpoint struct {
9257	// Name - The name of the connection monitor endpoint.
9258	Name *string `json:"name,omitempty"`
9259	// Type - The endpoint type. Possible values include: 'EndpointTypeAzureVM', 'EndpointTypeAzureVNet', 'EndpointTypeAzureSubnet', 'EndpointTypeExternalAddress', 'EndpointTypeMMAWorkspaceMachine', 'EndpointTypeMMAWorkspaceNetwork'
9260	Type EndpointType `json:"type,omitempty"`
9261	// ResourceID - Resource ID of the connection monitor endpoint.
9262	ResourceID *string `json:"resourceId,omitempty"`
9263	// Address - Address of the connection monitor endpoint (IP or domain name).
9264	Address *string `json:"address,omitempty"`
9265	// Filter - Filter for sub-items within the endpoint.
9266	Filter *ConnectionMonitorEndpointFilter `json:"filter,omitempty"`
9267	// Scope - Endpoint scope.
9268	Scope *ConnectionMonitorEndpointScope `json:"scope,omitempty"`
9269	// CoverageLevel - Test coverage for the endpoint. Possible values include: 'CoverageLevelDefault', 'CoverageLevelLow', 'CoverageLevelBelowAverage', 'CoverageLevelAverage', 'CoverageLevelAboveAverage', 'CoverageLevelFull'
9270	CoverageLevel CoverageLevel `json:"coverageLevel,omitempty"`
9271}
9272
9273// ConnectionMonitorEndpointFilter describes the connection monitor endpoint filter.
9274type ConnectionMonitorEndpointFilter struct {
9275	// Type - The behavior of the endpoint filter. Currently only 'Include' is supported. Possible values include: 'ConnectionMonitorEndpointFilterTypeInclude'
9276	Type ConnectionMonitorEndpointFilterType `json:"type,omitempty"`
9277	// Items - List of items in the filter.
9278	Items *[]ConnectionMonitorEndpointFilterItem `json:"items,omitempty"`
9279}
9280
9281// ConnectionMonitorEndpointFilterItem describes the connection monitor endpoint filter item.
9282type ConnectionMonitorEndpointFilterItem struct {
9283	// Type - The type of item included in the filter. Currently only 'AgentAddress' is supported. Possible values include: 'ConnectionMonitorEndpointFilterItemTypeAgentAddress'
9284	Type ConnectionMonitorEndpointFilterItemType `json:"type,omitempty"`
9285	// Address - The address of the filter item.
9286	Address *string `json:"address,omitempty"`
9287}
9288
9289// ConnectionMonitorEndpointScope describes the connection monitor endpoint scope.
9290type ConnectionMonitorEndpointScope struct {
9291	// Include - List of items which needs to be included to the endpoint scope.
9292	Include *[]ConnectionMonitorEndpointScopeItem `json:"include,omitempty"`
9293	// Exclude - List of items which needs to be excluded from the endpoint scope.
9294	Exclude *[]ConnectionMonitorEndpointScopeItem `json:"exclude,omitempty"`
9295}
9296
9297// ConnectionMonitorEndpointScopeItem describes the connection monitor endpoint scope item.
9298type ConnectionMonitorEndpointScopeItem struct {
9299	// Address - The address of the endpoint item. Supported types are IPv4/IPv6 subnet mask or IPv4/IPv6 IP address.
9300	Address *string `json:"address,omitempty"`
9301}
9302
9303// ConnectionMonitorHTTPConfiguration describes the HTTP configuration.
9304type ConnectionMonitorHTTPConfiguration struct {
9305	// Port - The port to connect to.
9306	Port *int32 `json:"port,omitempty"`
9307	// Method - The HTTP method to use. Possible values include: 'HTTPConfigurationMethodGet', 'HTTPConfigurationMethodPost'
9308	Method HTTPConfigurationMethod `json:"method,omitempty"`
9309	// Path - The path component of the URI. For instance, "/dir1/dir2".
9310	Path *string `json:"path,omitempty"`
9311	// RequestHeaders - The HTTP headers to transmit with the request.
9312	RequestHeaders *[]HTTPHeader `json:"requestHeaders,omitempty"`
9313	// ValidStatusCodeRanges - HTTP status codes to consider successful. For instance, "2xx,301-304,418".
9314	ValidStatusCodeRanges *[]string `json:"validStatusCodeRanges,omitempty"`
9315	// PreferHTTPS - Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit.
9316	PreferHTTPS *bool `json:"preferHTTPS,omitempty"`
9317}
9318
9319// ConnectionMonitorIcmpConfiguration describes the ICMP configuration.
9320type ConnectionMonitorIcmpConfiguration struct {
9321	// DisableTraceRoute - Value indicating whether path evaluation with trace route should be disabled.
9322	DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"`
9323}
9324
9325// ConnectionMonitorListResult list of connection monitors.
9326type ConnectionMonitorListResult struct {
9327	autorest.Response `json:"-"`
9328	// Value - Information about connection monitors.
9329	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
9330}
9331
9332// ConnectionMonitorOutput describes a connection monitor output destination.
9333type ConnectionMonitorOutput struct {
9334	// Type - Connection monitor output destination type. Currently, only "Workspace" is supported. Possible values include: 'OutputTypeWorkspace'
9335	Type OutputType `json:"type,omitempty"`
9336	// WorkspaceSettings - Describes the settings for producing output into a log analytics workspace.
9337	WorkspaceSettings *ConnectionMonitorWorkspaceSettings `json:"workspaceSettings,omitempty"`
9338}
9339
9340// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
9341type ConnectionMonitorParameters struct {
9342	// Source - Describes the source of connection monitor.
9343	Source *ConnectionMonitorSource `json:"source,omitempty"`
9344	// Destination - Describes the destination of connection monitor.
9345	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
9346	// AutoStart - Determines if the connection monitor will start automatically once created.
9347	AutoStart *bool `json:"autoStart,omitempty"`
9348	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
9349	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
9350	// Endpoints - List of connection monitor endpoints.
9351	Endpoints *[]ConnectionMonitorEndpoint `json:"endpoints,omitempty"`
9352	// TestConfigurations - List of connection monitor test configurations.
9353	TestConfigurations *[]ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"`
9354	// TestGroups - List of connection monitor test groups.
9355	TestGroups *[]ConnectionMonitorTestGroup `json:"testGroups,omitempty"`
9356	// Outputs - List of connection monitor outputs.
9357	Outputs *[]ConnectionMonitorOutput `json:"outputs,omitempty"`
9358	// Notes - Optional notes to be associated with the connection monitor.
9359	Notes *string `json:"notes,omitempty"`
9360}
9361
9362// ConnectionMonitorQueryResult list of connection states snapshots.
9363type ConnectionMonitorQueryResult struct {
9364	autorest.Response `json:"-"`
9365	// SourceStatus - Status of connection monitor source. Possible values include: 'ConnectionMonitorSourceStatusUnknown', 'ConnectionMonitorSourceStatusActive', 'ConnectionMonitorSourceStatusInactive'
9366	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
9367	// States - Information about connection states.
9368	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
9369}
9370
9371// ConnectionMonitorResult information about the connection monitor.
9372type ConnectionMonitorResult struct {
9373	autorest.Response `json:"-"`
9374	// Name - READ-ONLY; Name of the connection monitor.
9375	Name *string `json:"name,omitempty"`
9376	// ID - READ-ONLY; ID of the connection monitor.
9377	ID *string `json:"id,omitempty"`
9378	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9379	Etag *string `json:"etag,omitempty"`
9380	// Type - READ-ONLY; Connection monitor type.
9381	Type *string `json:"type,omitempty"`
9382	// Location - Connection monitor location.
9383	Location *string `json:"location,omitempty"`
9384	// Tags - Connection monitor tags.
9385	Tags map[string]*string `json:"tags"`
9386	// ConnectionMonitorResultProperties - Properties of the connection monitor result.
9387	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
9388}
9389
9390// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
9391func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
9392	objectMap := make(map[string]interface{})
9393	if cmr.Location != nil {
9394		objectMap["location"] = cmr.Location
9395	}
9396	if cmr.Tags != nil {
9397		objectMap["tags"] = cmr.Tags
9398	}
9399	if cmr.ConnectionMonitorResultProperties != nil {
9400		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
9401	}
9402	return json.Marshal(objectMap)
9403}
9404
9405// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
9406func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
9407	var m map[string]*json.RawMessage
9408	err := json.Unmarshal(body, &m)
9409	if err != nil {
9410		return err
9411	}
9412	for k, v := range m {
9413		switch k {
9414		case "name":
9415			if v != nil {
9416				var name string
9417				err = json.Unmarshal(*v, &name)
9418				if err != nil {
9419					return err
9420				}
9421				cmr.Name = &name
9422			}
9423		case "id":
9424			if v != nil {
9425				var ID string
9426				err = json.Unmarshal(*v, &ID)
9427				if err != nil {
9428					return err
9429				}
9430				cmr.ID = &ID
9431			}
9432		case "etag":
9433			if v != nil {
9434				var etag string
9435				err = json.Unmarshal(*v, &etag)
9436				if err != nil {
9437					return err
9438				}
9439				cmr.Etag = &etag
9440			}
9441		case "type":
9442			if v != nil {
9443				var typeVar string
9444				err = json.Unmarshal(*v, &typeVar)
9445				if err != nil {
9446					return err
9447				}
9448				cmr.Type = &typeVar
9449			}
9450		case "location":
9451			if v != nil {
9452				var location string
9453				err = json.Unmarshal(*v, &location)
9454				if err != nil {
9455					return err
9456				}
9457				cmr.Location = &location
9458			}
9459		case "tags":
9460			if v != nil {
9461				var tags map[string]*string
9462				err = json.Unmarshal(*v, &tags)
9463				if err != nil {
9464					return err
9465				}
9466				cmr.Tags = tags
9467			}
9468		case "properties":
9469			if v != nil {
9470				var connectionMonitorResultProperties ConnectionMonitorResultProperties
9471				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
9472				if err != nil {
9473					return err
9474				}
9475				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
9476			}
9477		}
9478	}
9479
9480	return nil
9481}
9482
9483// ConnectionMonitorResultProperties describes the properties of a connection monitor.
9484type ConnectionMonitorResultProperties struct {
9485	// ProvisioningState - READ-ONLY; The provisioning state of the connection monitor. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
9486	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9487	// StartTime - READ-ONLY; The date and time when the connection monitor was started.
9488	StartTime *date.Time `json:"startTime,omitempty"`
9489	// MonitoringStatus - READ-ONLY; The monitoring status of the connection monitor.
9490	MonitoringStatus *string `json:"monitoringStatus,omitempty"`
9491	// ConnectionMonitorType - READ-ONLY; Type of connection monitor. Possible values include: 'ConnectionMonitorTypeMultiEndpoint', 'ConnectionMonitorTypeSingleSourceDestination'
9492	ConnectionMonitorType ConnectionMonitorType `json:"connectionMonitorType,omitempty"`
9493	// Source - Describes the source of connection monitor.
9494	Source *ConnectionMonitorSource `json:"source,omitempty"`
9495	// Destination - Describes the destination of connection monitor.
9496	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
9497	// AutoStart - Determines if the connection monitor will start automatically once created.
9498	AutoStart *bool `json:"autoStart,omitempty"`
9499	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
9500	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
9501	// Endpoints - List of connection monitor endpoints.
9502	Endpoints *[]ConnectionMonitorEndpoint `json:"endpoints,omitempty"`
9503	// TestConfigurations - List of connection monitor test configurations.
9504	TestConfigurations *[]ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"`
9505	// TestGroups - List of connection monitor test groups.
9506	TestGroups *[]ConnectionMonitorTestGroup `json:"testGroups,omitempty"`
9507	// Outputs - List of connection monitor outputs.
9508	Outputs *[]ConnectionMonitorOutput `json:"outputs,omitempty"`
9509	// Notes - Optional notes to be associated with the connection monitor.
9510	Notes *string `json:"notes,omitempty"`
9511}
9512
9513// MarshalJSON is the custom marshaler for ConnectionMonitorResultProperties.
9514func (cmrp ConnectionMonitorResultProperties) MarshalJSON() ([]byte, error) {
9515	objectMap := make(map[string]interface{})
9516	if cmrp.Source != nil {
9517		objectMap["source"] = cmrp.Source
9518	}
9519	if cmrp.Destination != nil {
9520		objectMap["destination"] = cmrp.Destination
9521	}
9522	if cmrp.AutoStart != nil {
9523		objectMap["autoStart"] = cmrp.AutoStart
9524	}
9525	if cmrp.MonitoringIntervalInSeconds != nil {
9526		objectMap["monitoringIntervalInSeconds"] = cmrp.MonitoringIntervalInSeconds
9527	}
9528	if cmrp.Endpoints != nil {
9529		objectMap["endpoints"] = cmrp.Endpoints
9530	}
9531	if cmrp.TestConfigurations != nil {
9532		objectMap["testConfigurations"] = cmrp.TestConfigurations
9533	}
9534	if cmrp.TestGroups != nil {
9535		objectMap["testGroups"] = cmrp.TestGroups
9536	}
9537	if cmrp.Outputs != nil {
9538		objectMap["outputs"] = cmrp.Outputs
9539	}
9540	if cmrp.Notes != nil {
9541		objectMap["notes"] = cmrp.Notes
9542	}
9543	return json.Marshal(objectMap)
9544}
9545
9546// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9547// long-running operation.
9548type ConnectionMonitorsCreateOrUpdateFuture struct {
9549	azure.FutureAPI
9550	// Result returns the result of the asynchronous operation.
9551	// If the operation has not completed it will return an error.
9552	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
9553}
9554
9555// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9556func (future *ConnectionMonitorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9557	var azFuture azure.Future
9558	if err := json.Unmarshal(body, &azFuture); err != nil {
9559		return err
9560	}
9561	future.FutureAPI = &azFuture
9562	future.Result = future.result
9563	return nil
9564}
9565
9566// result is the default implementation for ConnectionMonitorsCreateOrUpdateFuture.Result.
9567func (future *ConnectionMonitorsCreateOrUpdateFuture) result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
9568	var done bool
9569	done, err = future.DoneWithContext(context.Background(), client)
9570	if err != nil {
9571		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9572		return
9573	}
9574	if !done {
9575		cmr.Response.Response = future.Response()
9576		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
9577		return
9578	}
9579	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9580	if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
9581		cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
9582		if err != nil {
9583			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
9584		}
9585	}
9586	return
9587}
9588
9589// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
9590// long-running operation.
9591type ConnectionMonitorsDeleteFuture struct {
9592	azure.FutureAPI
9593	// Result returns the result of the asynchronous operation.
9594	// If the operation has not completed it will return an error.
9595	Result func(ConnectionMonitorsClient) (autorest.Response, error)
9596}
9597
9598// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9599func (future *ConnectionMonitorsDeleteFuture) UnmarshalJSON(body []byte) error {
9600	var azFuture azure.Future
9601	if err := json.Unmarshal(body, &azFuture); err != nil {
9602		return err
9603	}
9604	future.FutureAPI = &azFuture
9605	future.Result = future.result
9606	return nil
9607}
9608
9609// result is the default implementation for ConnectionMonitorsDeleteFuture.Result.
9610func (future *ConnectionMonitorsDeleteFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
9611	var done bool
9612	done, err = future.DoneWithContext(context.Background(), client)
9613	if err != nil {
9614		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
9615		return
9616	}
9617	if !done {
9618		ar.Response = future.Response()
9619		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
9620		return
9621	}
9622	ar.Response = future.Response()
9623	return
9624}
9625
9626// ConnectionMonitorSource describes the source of connection monitor.
9627type ConnectionMonitorSource struct {
9628	// ResourceID - The ID of the resource used as the source by connection monitor.
9629	ResourceID *string `json:"resourceId,omitempty"`
9630	// Port - The source port used by connection monitor.
9631	Port *int32 `json:"port,omitempty"`
9632}
9633
9634// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
9635// operation.
9636type ConnectionMonitorsQueryFuture struct {
9637	azure.FutureAPI
9638	// Result returns the result of the asynchronous operation.
9639	// If the operation has not completed it will return an error.
9640	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
9641}
9642
9643// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9644func (future *ConnectionMonitorsQueryFuture) UnmarshalJSON(body []byte) error {
9645	var azFuture azure.Future
9646	if err := json.Unmarshal(body, &azFuture); err != nil {
9647		return err
9648	}
9649	future.FutureAPI = &azFuture
9650	future.Result = future.result
9651	return nil
9652}
9653
9654// result is the default implementation for ConnectionMonitorsQueryFuture.Result.
9655func (future *ConnectionMonitorsQueryFuture) result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
9656	var done bool
9657	done, err = future.DoneWithContext(context.Background(), client)
9658	if err != nil {
9659		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
9660		return
9661	}
9662	if !done {
9663		cmqr.Response.Response = future.Response()
9664		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
9665		return
9666	}
9667	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9668	if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
9669		cmqr, err = client.QueryResponder(cmqr.Response.Response)
9670		if err != nil {
9671			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
9672		}
9673	}
9674	return
9675}
9676
9677// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
9678// operation.
9679type ConnectionMonitorsStartFuture struct {
9680	azure.FutureAPI
9681	// Result returns the result of the asynchronous operation.
9682	// If the operation has not completed it will return an error.
9683	Result func(ConnectionMonitorsClient) (autorest.Response, error)
9684}
9685
9686// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9687func (future *ConnectionMonitorsStartFuture) UnmarshalJSON(body []byte) error {
9688	var azFuture azure.Future
9689	if err := json.Unmarshal(body, &azFuture); err != nil {
9690		return err
9691	}
9692	future.FutureAPI = &azFuture
9693	future.Result = future.result
9694	return nil
9695}
9696
9697// result is the default implementation for ConnectionMonitorsStartFuture.Result.
9698func (future *ConnectionMonitorsStartFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
9699	var done bool
9700	done, err = future.DoneWithContext(context.Background(), client)
9701	if err != nil {
9702		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
9703		return
9704	}
9705	if !done {
9706		ar.Response = future.Response()
9707		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
9708		return
9709	}
9710	ar.Response = future.Response()
9711	return
9712}
9713
9714// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
9715// operation.
9716type ConnectionMonitorsStopFuture struct {
9717	azure.FutureAPI
9718	// Result returns the result of the asynchronous operation.
9719	// If the operation has not completed it will return an error.
9720	Result func(ConnectionMonitorsClient) (autorest.Response, error)
9721}
9722
9723// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9724func (future *ConnectionMonitorsStopFuture) UnmarshalJSON(body []byte) error {
9725	var azFuture azure.Future
9726	if err := json.Unmarshal(body, &azFuture); err != nil {
9727		return err
9728	}
9729	future.FutureAPI = &azFuture
9730	future.Result = future.result
9731	return nil
9732}
9733
9734// result is the default implementation for ConnectionMonitorsStopFuture.Result.
9735func (future *ConnectionMonitorsStopFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
9736	var done bool
9737	done, err = future.DoneWithContext(context.Background(), client)
9738	if err != nil {
9739		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
9740		return
9741	}
9742	if !done {
9743		ar.Response = future.Response()
9744		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
9745		return
9746	}
9747	ar.Response = future.Response()
9748	return
9749}
9750
9751// ConnectionMonitorSuccessThreshold describes the threshold for declaring a test successful.
9752type ConnectionMonitorSuccessThreshold struct {
9753	// ChecksFailedPercent - The maximum percentage of failed checks permitted for a test to evaluate as successful.
9754	ChecksFailedPercent *int32 `json:"checksFailedPercent,omitempty"`
9755	// RoundTripTimeMs - The maximum round-trip time in milliseconds permitted for a test to evaluate as successful.
9756	RoundTripTimeMs *float64 `json:"roundTripTimeMs,omitempty"`
9757}
9758
9759// ConnectionMonitorTCPConfiguration describes the TCP configuration.
9760type ConnectionMonitorTCPConfiguration struct {
9761	// Port - The port to connect to.
9762	Port *int32 `json:"port,omitempty"`
9763	// DisableTraceRoute - Value indicating whether path evaluation with trace route should be disabled.
9764	DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"`
9765	// DestinationPortBehavior - Destination port behavior. Possible values include: 'DestinationPortBehaviorNone', 'DestinationPortBehaviorListenIfAvailable'
9766	DestinationPortBehavior DestinationPortBehavior `json:"destinationPortBehavior,omitempty"`
9767}
9768
9769// ConnectionMonitorTestConfiguration describes a connection monitor test configuration.
9770type ConnectionMonitorTestConfiguration struct {
9771	// Name - The name of the connection monitor test configuration.
9772	Name *string `json:"name,omitempty"`
9773	// TestFrequencySec - The frequency of test evaluation, in seconds.
9774	TestFrequencySec *int32 `json:"testFrequencySec,omitempty"`
9775	// Protocol - The protocol to use in test evaluation. Possible values include: 'ConnectionMonitorTestConfigurationProtocolTCP', 'ConnectionMonitorTestConfigurationProtocolHTTP', 'ConnectionMonitorTestConfigurationProtocolIcmp'
9776	Protocol ConnectionMonitorTestConfigurationProtocol `json:"protocol,omitempty"`
9777	// 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'
9778	PreferredIPVersion PreferredIPVersion `json:"preferredIPVersion,omitempty"`
9779	// HTTPConfiguration - The parameters used to perform test evaluation over HTTP.
9780	HTTPConfiguration *ConnectionMonitorHTTPConfiguration `json:"httpConfiguration,omitempty"`
9781	// TCPConfiguration - The parameters used to perform test evaluation over TCP.
9782	TCPConfiguration *ConnectionMonitorTCPConfiguration `json:"tcpConfiguration,omitempty"`
9783	// IcmpConfiguration - The parameters used to perform test evaluation over ICMP.
9784	IcmpConfiguration *ConnectionMonitorIcmpConfiguration `json:"icmpConfiguration,omitempty"`
9785	// SuccessThreshold - The threshold for declaring a test successful.
9786	SuccessThreshold *ConnectionMonitorSuccessThreshold `json:"successThreshold,omitempty"`
9787}
9788
9789// ConnectionMonitorTestGroup describes the connection monitor test group.
9790type ConnectionMonitorTestGroup struct {
9791	// Name - The name of the connection monitor test group.
9792	Name *string `json:"name,omitempty"`
9793	// Disable - Value indicating whether test group is disabled.
9794	Disable *bool `json:"disable,omitempty"`
9795	// TestConfigurations - List of test configuration names.
9796	TestConfigurations *[]string `json:"testConfigurations,omitempty"`
9797	// Sources - List of source endpoint names.
9798	Sources *[]string `json:"sources,omitempty"`
9799	// Destinations - List of destination endpoint names.
9800	Destinations *[]string `json:"destinations,omitempty"`
9801}
9802
9803// ConnectionMonitorWorkspaceSettings describes the settings for producing output into a log analytics
9804// workspace.
9805type ConnectionMonitorWorkspaceSettings struct {
9806	// WorkspaceResourceID - Log analytics workspace resource ID.
9807	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
9808}
9809
9810// ConnectionResetSharedKey the virtual network connection reset shared key.
9811type ConnectionResetSharedKey struct {
9812	autorest.Response `json:"-"`
9813	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
9814	KeyLength *int32 `json:"keyLength,omitempty"`
9815}
9816
9817// ConnectionSharedKey response for GetConnectionSharedKey API service call.
9818type ConnectionSharedKey struct {
9819	autorest.Response `json:"-"`
9820	// Value - The virtual network connection shared key value.
9821	Value *string `json:"value,omitempty"`
9822	// ID - Resource ID.
9823	ID *string `json:"id,omitempty"`
9824}
9825
9826// ConnectionStateSnapshot connection state snapshot.
9827type ConnectionStateSnapshot struct {
9828	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
9829	ConnectionState ConnectionState `json:"connectionState,omitempty"`
9830	// StartTime - The start time of the connection snapshot.
9831	StartTime *date.Time `json:"startTime,omitempty"`
9832	// EndTime - The end time of the connection snapshot.
9833	EndTime *date.Time `json:"endTime,omitempty"`
9834	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'EvaluationStateNotStarted', 'EvaluationStateInProgress', 'EvaluationStateCompleted'
9835	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
9836	// AvgLatencyInMs - Average latency in ms.
9837	AvgLatencyInMs *int64 `json:"avgLatencyInMs,omitempty"`
9838	// MinLatencyInMs - Minimum latency in ms.
9839	MinLatencyInMs *int64 `json:"minLatencyInMs,omitempty"`
9840	// MaxLatencyInMs - Maximum latency in ms.
9841	MaxLatencyInMs *int64 `json:"maxLatencyInMs,omitempty"`
9842	// ProbesSent - The number of sent probes.
9843	ProbesSent *int64 `json:"probesSent,omitempty"`
9844	// ProbesFailed - The number of failed probes.
9845	ProbesFailed *int64 `json:"probesFailed,omitempty"`
9846	// Hops - READ-ONLY; List of hops between the source and the destination.
9847	Hops *[]ConnectivityHop `json:"hops,omitempty"`
9848}
9849
9850// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
9851func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
9852	objectMap := make(map[string]interface{})
9853	if CSS.ConnectionState != "" {
9854		objectMap["connectionState"] = CSS.ConnectionState
9855	}
9856	if CSS.StartTime != nil {
9857		objectMap["startTime"] = CSS.StartTime
9858	}
9859	if CSS.EndTime != nil {
9860		objectMap["endTime"] = CSS.EndTime
9861	}
9862	if CSS.EvaluationState != "" {
9863		objectMap["evaluationState"] = CSS.EvaluationState
9864	}
9865	if CSS.AvgLatencyInMs != nil {
9866		objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
9867	}
9868	if CSS.MinLatencyInMs != nil {
9869		objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
9870	}
9871	if CSS.MaxLatencyInMs != nil {
9872		objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
9873	}
9874	if CSS.ProbesSent != nil {
9875		objectMap["probesSent"] = CSS.ProbesSent
9876	}
9877	if CSS.ProbesFailed != nil {
9878		objectMap["probesFailed"] = CSS.ProbesFailed
9879	}
9880	return json.Marshal(objectMap)
9881}
9882
9883// ConnectivityDestination parameters that define destination of connection.
9884type ConnectivityDestination struct {
9885	// ResourceID - The ID of the resource to which a connection attempt will be made.
9886	ResourceID *string `json:"resourceId,omitempty"`
9887	// Address - The IP address or URI the resource to which a connection attempt will be made.
9888	Address *string `json:"address,omitempty"`
9889	// Port - Port on which check connectivity will be performed.
9890	Port *int32 `json:"port,omitempty"`
9891}
9892
9893// ConnectivityHop information about a hop between the source and the destination.
9894type ConnectivityHop struct {
9895	// Type - READ-ONLY; The type of the hop.
9896	Type *string `json:"type,omitempty"`
9897	// ID - READ-ONLY; The ID of the hop.
9898	ID *string `json:"id,omitempty"`
9899	// Address - READ-ONLY; The IP address of the hop.
9900	Address *string `json:"address,omitempty"`
9901	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
9902	ResourceID *string `json:"resourceId,omitempty"`
9903	// NextHopIds - READ-ONLY; List of next hop identifiers.
9904	NextHopIds *[]string `json:"nextHopIds,omitempty"`
9905	// PreviousHopIds - READ-ONLY; List of previous hop identifiers.
9906	PreviousHopIds *[]string `json:"previousHopIds,omitempty"`
9907	// Links - READ-ONLY; List of hop links.
9908	Links *[]HopLink `json:"links,omitempty"`
9909	// PreviousLinks - READ-ONLY; List of previous hop links.
9910	PreviousLinks *[]HopLink `json:"previousLinks,omitempty"`
9911	// Issues - READ-ONLY; List of issues.
9912	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
9913}
9914
9915// MarshalJSON is the custom marshaler for ConnectivityHop.
9916func (ch ConnectivityHop) MarshalJSON() ([]byte, error) {
9917	objectMap := make(map[string]interface{})
9918	return json.Marshal(objectMap)
9919}
9920
9921// ConnectivityInformation information on the connectivity status.
9922type ConnectivityInformation struct {
9923	autorest.Response `json:"-"`
9924	// Hops - READ-ONLY; List of hops between the source and the destination.
9925	Hops *[]ConnectivityHop `json:"hops,omitempty"`
9926	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
9927	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
9928	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
9929	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
9930	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
9931	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
9932	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
9933	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
9934	// ProbesSent - READ-ONLY; Total number of probes sent.
9935	ProbesSent *int32 `json:"probesSent,omitempty"`
9936	// ProbesFailed - READ-ONLY; Number of failed probes.
9937	ProbesFailed *int32 `json:"probesFailed,omitempty"`
9938}
9939
9940// MarshalJSON is the custom marshaler for ConnectivityInformation.
9941func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) {
9942	objectMap := make(map[string]interface{})
9943	return json.Marshal(objectMap)
9944}
9945
9946// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
9947type ConnectivityIssue struct {
9948	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
9949	Origin Origin `json:"origin,omitempty"`
9950	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
9951	Severity Severity `json:"severity,omitempty"`
9952	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
9953	Type IssueType `json:"type,omitempty"`
9954	// Context - READ-ONLY; Provides additional context on the issue.
9955	Context *[]map[string]*string `json:"context,omitempty"`
9956}
9957
9958// MarshalJSON is the custom marshaler for ConnectivityIssue.
9959func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) {
9960	objectMap := make(map[string]interface{})
9961	return json.Marshal(objectMap)
9962}
9963
9964// ConnectivityParameters parameters that determine how the connectivity check will be performed.
9965type ConnectivityParameters struct {
9966	// Source - The source of the connection.
9967	Source *ConnectivitySource `json:"source,omitempty"`
9968	// Destination - The destination of connection.
9969	Destination *ConnectivityDestination `json:"destination,omitempty"`
9970	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
9971	Protocol Protocol `json:"protocol,omitempty"`
9972	// ProtocolConfiguration - Configuration of the protocol.
9973	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
9974	// PreferredIPVersion - Preferred IP version of the connection. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
9975	PreferredIPVersion IPVersion `json:"preferredIPVersion,omitempty"`
9976}
9977
9978// ConnectivitySource parameters that define the source of the connection.
9979type ConnectivitySource struct {
9980	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
9981	ResourceID *string `json:"resourceId,omitempty"`
9982	// Port - The source port from which a connectivity check will be performed.
9983	Port *int32 `json:"port,omitempty"`
9984}
9985
9986// Container reference to container resource in remote resource provider.
9987type Container struct {
9988	// ID - Resource ID.
9989	ID *string `json:"id,omitempty"`
9990}
9991
9992// ContainerNetworkInterface container network interface child resource.
9993type ContainerNetworkInterface struct {
9994	// ContainerNetworkInterfacePropertiesFormat - Container network interface properties.
9995	*ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"`
9996	// Name - The name of the resource. This name can be used to access the resource.
9997	Name *string `json:"name,omitempty"`
9998	// Type - READ-ONLY; Sub Resource type.
9999	Type *string `json:"type,omitempty"`
10000	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10001	Etag *string `json:"etag,omitempty"`
10002	// ID - Resource ID.
10003	ID *string `json:"id,omitempty"`
10004}
10005
10006// MarshalJSON is the custom marshaler for ContainerNetworkInterface.
10007func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) {
10008	objectMap := make(map[string]interface{})
10009	if cni.ContainerNetworkInterfacePropertiesFormat != nil {
10010		objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat
10011	}
10012	if cni.Name != nil {
10013		objectMap["name"] = cni.Name
10014	}
10015	if cni.ID != nil {
10016		objectMap["id"] = cni.ID
10017	}
10018	return json.Marshal(objectMap)
10019}
10020
10021// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct.
10022func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error {
10023	var m map[string]*json.RawMessage
10024	err := json.Unmarshal(body, &m)
10025	if err != nil {
10026		return err
10027	}
10028	for k, v := range m {
10029		switch k {
10030		case "properties":
10031			if v != nil {
10032				var containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat
10033				err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat)
10034				if err != nil {
10035					return err
10036				}
10037				cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat
10038			}
10039		case "name":
10040			if v != nil {
10041				var name string
10042				err = json.Unmarshal(*v, &name)
10043				if err != nil {
10044					return err
10045				}
10046				cni.Name = &name
10047			}
10048		case "type":
10049			if v != nil {
10050				var typeVar string
10051				err = json.Unmarshal(*v, &typeVar)
10052				if err != nil {
10053					return err
10054				}
10055				cni.Type = &typeVar
10056			}
10057		case "etag":
10058			if v != nil {
10059				var etag string
10060				err = json.Unmarshal(*v, &etag)
10061				if err != nil {
10062					return err
10063				}
10064				cni.Etag = &etag
10065			}
10066		case "id":
10067			if v != nil {
10068				var ID string
10069				err = json.Unmarshal(*v, &ID)
10070				if err != nil {
10071					return err
10072				}
10073				cni.ID = &ID
10074			}
10075		}
10076	}
10077
10078	return nil
10079}
10080
10081// ContainerNetworkInterfaceConfiguration container network interface configuration child resource.
10082type ContainerNetworkInterfaceConfiguration struct {
10083	// ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties.
10084	*ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"`
10085	// Name - The name of the resource. This name can be used to access the resource.
10086	Name *string `json:"name,omitempty"`
10087	// Type - READ-ONLY; Sub Resource type.
10088	Type *string `json:"type,omitempty"`
10089	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10090	Etag *string `json:"etag,omitempty"`
10091	// ID - Resource ID.
10092	ID *string `json:"id,omitempty"`
10093}
10094
10095// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration.
10096func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
10097	objectMap := make(map[string]interface{})
10098	if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil {
10099		objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat
10100	}
10101	if cnic.Name != nil {
10102		objectMap["name"] = cnic.Name
10103	}
10104	if cnic.ID != nil {
10105		objectMap["id"] = cnic.ID
10106	}
10107	return json.Marshal(objectMap)
10108}
10109
10110// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct.
10111func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error {
10112	var m map[string]*json.RawMessage
10113	err := json.Unmarshal(body, &m)
10114	if err != nil {
10115		return err
10116	}
10117	for k, v := range m {
10118		switch k {
10119		case "properties":
10120			if v != nil {
10121				var containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat
10122				err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat)
10123				if err != nil {
10124					return err
10125				}
10126				cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat
10127			}
10128		case "name":
10129			if v != nil {
10130				var name string
10131				err = json.Unmarshal(*v, &name)
10132				if err != nil {
10133					return err
10134				}
10135				cnic.Name = &name
10136			}
10137		case "type":
10138			if v != nil {
10139				var typeVar string
10140				err = json.Unmarshal(*v, &typeVar)
10141				if err != nil {
10142					return err
10143				}
10144				cnic.Type = &typeVar
10145			}
10146		case "etag":
10147			if v != nil {
10148				var etag string
10149				err = json.Unmarshal(*v, &etag)
10150				if err != nil {
10151					return err
10152				}
10153				cnic.Etag = &etag
10154			}
10155		case "id":
10156			if v != nil {
10157				var ID string
10158				err = json.Unmarshal(*v, &ID)
10159				if err != nil {
10160					return err
10161				}
10162				cnic.ID = &ID
10163			}
10164		}
10165	}
10166
10167	return nil
10168}
10169
10170// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration
10171// properties.
10172type ContainerNetworkInterfaceConfigurationPropertiesFormat struct {
10173	// IPConfigurations - A list of ip configurations of the container network interface configuration.
10174	IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"`
10175	// ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration.
10176	ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"`
10177	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
10178	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10179}
10180
10181// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat.
10182func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
10183	objectMap := make(map[string]interface{})
10184	if cnicpf.IPConfigurations != nil {
10185		objectMap["ipConfigurations"] = cnicpf.IPConfigurations
10186	}
10187	if cnicpf.ContainerNetworkInterfaces != nil {
10188		objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces
10189	}
10190	return json.Marshal(objectMap)
10191}
10192
10193// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface.
10194type ContainerNetworkInterfaceIPConfiguration struct {
10195	// ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration.
10196	*ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
10197	// Name - The name of the resource. This name can be used to access the resource.
10198	Name *string `json:"name,omitempty"`
10199	// Type - READ-ONLY; Sub Resource type.
10200	Type *string `json:"type,omitempty"`
10201	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10202	Etag *string `json:"etag,omitempty"`
10203}
10204
10205// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration.
10206func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
10207	objectMap := make(map[string]interface{})
10208	if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil {
10209		objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat
10210	}
10211	if cniic.Name != nil {
10212		objectMap["name"] = cniic.Name
10213	}
10214	return json.Marshal(objectMap)
10215}
10216
10217// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct.
10218func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
10219	var m map[string]*json.RawMessage
10220	err := json.Unmarshal(body, &m)
10221	if err != nil {
10222		return err
10223	}
10224	for k, v := range m {
10225		switch k {
10226		case "properties":
10227			if v != nil {
10228				var containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat
10229				err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat)
10230				if err != nil {
10231					return err
10232				}
10233				cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat
10234			}
10235		case "name":
10236			if v != nil {
10237				var name string
10238				err = json.Unmarshal(*v, &name)
10239				if err != nil {
10240					return err
10241				}
10242				cniic.Name = &name
10243			}
10244		case "type":
10245			if v != nil {
10246				var typeVar string
10247				err = json.Unmarshal(*v, &typeVar)
10248				if err != nil {
10249					return err
10250				}
10251				cniic.Type = &typeVar
10252			}
10253		case "etag":
10254			if v != nil {
10255				var etag string
10256				err = json.Unmarshal(*v, &etag)
10257				if err != nil {
10258					return err
10259				}
10260				cniic.Etag = &etag
10261			}
10262		}
10263	}
10264
10265	return nil
10266}
10267
10268// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface
10269// IP configuration.
10270type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
10271	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
10272	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10273}
10274
10275// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfigurationPropertiesFormat.
10276func (cniicpf ContainerNetworkInterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
10277	objectMap := make(map[string]interface{})
10278	return json.Marshal(objectMap)
10279}
10280
10281// ContainerNetworkInterfacePropertiesFormat properties of container network interface.
10282type ContainerNetworkInterfacePropertiesFormat struct {
10283	// ContainerNetworkInterfaceConfiguration - READ-ONLY; Container network interface configuration from which this container network interface is created.
10284	ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"`
10285	// Container - Reference to the container to which this container network interface is attached.
10286	Container *Container `json:"container,omitempty"`
10287	// IPConfigurations - READ-ONLY; Reference to the ip configuration on this container nic.
10288	IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
10289	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
10290	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10291}
10292
10293// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat.
10294func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
10295	objectMap := make(map[string]interface{})
10296	if cnipf.Container != nil {
10297		objectMap["container"] = cnipf.Container
10298	}
10299	return json.Marshal(objectMap)
10300}
10301
10302// CustomDNSConfigPropertiesFormat contains custom Dns resolution configuration from customer.
10303type CustomDNSConfigPropertiesFormat struct {
10304	// Fqdn - Fqdn that resolves to private endpoint ip address.
10305	Fqdn *string `json:"fqdn,omitempty"`
10306	// IPAddresses - A list of private ip addresses of the private endpoint.
10307	IPAddresses *[]string `json:"ipAddresses,omitempty"`
10308}
10309
10310// CustomIPPrefix custom IP prefix resource.
10311type CustomIPPrefix struct {
10312	autorest.Response `json:"-"`
10313	// ExtendedLocation - The extended location of the custom IP prefix.
10314	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
10315	// CustomIPPrefixPropertiesFormat - Custom IP prefix properties.
10316	*CustomIPPrefixPropertiesFormat `json:"properties,omitempty"`
10317	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10318	Etag *string `json:"etag,omitempty"`
10319	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
10320	Zones *[]string `json:"zones,omitempty"`
10321	// ID - Resource ID.
10322	ID *string `json:"id,omitempty"`
10323	// Name - READ-ONLY; Resource name.
10324	Name *string `json:"name,omitempty"`
10325	// Type - READ-ONLY; Resource type.
10326	Type *string `json:"type,omitempty"`
10327	// Location - Resource location.
10328	Location *string `json:"location,omitempty"`
10329	// Tags - Resource tags.
10330	Tags map[string]*string `json:"tags"`
10331}
10332
10333// MarshalJSON is the custom marshaler for CustomIPPrefix.
10334func (cip CustomIPPrefix) MarshalJSON() ([]byte, error) {
10335	objectMap := make(map[string]interface{})
10336	if cip.ExtendedLocation != nil {
10337		objectMap["extendedLocation"] = cip.ExtendedLocation
10338	}
10339	if cip.CustomIPPrefixPropertiesFormat != nil {
10340		objectMap["properties"] = cip.CustomIPPrefixPropertiesFormat
10341	}
10342	if cip.Zones != nil {
10343		objectMap["zones"] = cip.Zones
10344	}
10345	if cip.ID != nil {
10346		objectMap["id"] = cip.ID
10347	}
10348	if cip.Location != nil {
10349		objectMap["location"] = cip.Location
10350	}
10351	if cip.Tags != nil {
10352		objectMap["tags"] = cip.Tags
10353	}
10354	return json.Marshal(objectMap)
10355}
10356
10357// UnmarshalJSON is the custom unmarshaler for CustomIPPrefix struct.
10358func (cip *CustomIPPrefix) UnmarshalJSON(body []byte) error {
10359	var m map[string]*json.RawMessage
10360	err := json.Unmarshal(body, &m)
10361	if err != nil {
10362		return err
10363	}
10364	for k, v := range m {
10365		switch k {
10366		case "extendedLocation":
10367			if v != nil {
10368				var extendedLocation ExtendedLocation
10369				err = json.Unmarshal(*v, &extendedLocation)
10370				if err != nil {
10371					return err
10372				}
10373				cip.ExtendedLocation = &extendedLocation
10374			}
10375		case "properties":
10376			if v != nil {
10377				var customIPPrefixPropertiesFormat CustomIPPrefixPropertiesFormat
10378				err = json.Unmarshal(*v, &customIPPrefixPropertiesFormat)
10379				if err != nil {
10380					return err
10381				}
10382				cip.CustomIPPrefixPropertiesFormat = &customIPPrefixPropertiesFormat
10383			}
10384		case "etag":
10385			if v != nil {
10386				var etag string
10387				err = json.Unmarshal(*v, &etag)
10388				if err != nil {
10389					return err
10390				}
10391				cip.Etag = &etag
10392			}
10393		case "zones":
10394			if v != nil {
10395				var zones []string
10396				err = json.Unmarshal(*v, &zones)
10397				if err != nil {
10398					return err
10399				}
10400				cip.Zones = &zones
10401			}
10402		case "id":
10403			if v != nil {
10404				var ID string
10405				err = json.Unmarshal(*v, &ID)
10406				if err != nil {
10407					return err
10408				}
10409				cip.ID = &ID
10410			}
10411		case "name":
10412			if v != nil {
10413				var name string
10414				err = json.Unmarshal(*v, &name)
10415				if err != nil {
10416					return err
10417				}
10418				cip.Name = &name
10419			}
10420		case "type":
10421			if v != nil {
10422				var typeVar string
10423				err = json.Unmarshal(*v, &typeVar)
10424				if err != nil {
10425					return err
10426				}
10427				cip.Type = &typeVar
10428			}
10429		case "location":
10430			if v != nil {
10431				var location string
10432				err = json.Unmarshal(*v, &location)
10433				if err != nil {
10434					return err
10435				}
10436				cip.Location = &location
10437			}
10438		case "tags":
10439			if v != nil {
10440				var tags map[string]*string
10441				err = json.Unmarshal(*v, &tags)
10442				if err != nil {
10443					return err
10444				}
10445				cip.Tags = tags
10446			}
10447		}
10448	}
10449
10450	return nil
10451}
10452
10453// CustomIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10454// long-running operation.
10455type CustomIPPrefixesCreateOrUpdateFuture struct {
10456	azure.FutureAPI
10457	// Result returns the result of the asynchronous operation.
10458	// If the operation has not completed it will return an error.
10459	Result func(CustomIPPrefixesClient) (CustomIPPrefix, error)
10460}
10461
10462// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10463func (future *CustomIPPrefixesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10464	var azFuture azure.Future
10465	if err := json.Unmarshal(body, &azFuture); err != nil {
10466		return err
10467	}
10468	future.FutureAPI = &azFuture
10469	future.Result = future.result
10470	return nil
10471}
10472
10473// result is the default implementation for CustomIPPrefixesCreateOrUpdateFuture.Result.
10474func (future *CustomIPPrefixesCreateOrUpdateFuture) result(client CustomIPPrefixesClient) (cip CustomIPPrefix, err error) {
10475	var done bool
10476	done, err = future.DoneWithContext(context.Background(), client)
10477	if err != nil {
10478		err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10479		return
10480	}
10481	if !done {
10482		cip.Response.Response = future.Response()
10483		err = azure.NewAsyncOpIncompleteError("network.CustomIPPrefixesCreateOrUpdateFuture")
10484		return
10485	}
10486	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10487	if cip.Response.Response, err = future.GetResult(sender); err == nil && cip.Response.Response.StatusCode != http.StatusNoContent {
10488		cip, err = client.CreateOrUpdateResponder(cip.Response.Response)
10489		if err != nil {
10490			err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesCreateOrUpdateFuture", "Result", cip.Response.Response, "Failure responding to request")
10491		}
10492	}
10493	return
10494}
10495
10496// CustomIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10497// operation.
10498type CustomIPPrefixesDeleteFuture struct {
10499	azure.FutureAPI
10500	// Result returns the result of the asynchronous operation.
10501	// If the operation has not completed it will return an error.
10502	Result func(CustomIPPrefixesClient) (autorest.Response, error)
10503}
10504
10505// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10506func (future *CustomIPPrefixesDeleteFuture) UnmarshalJSON(body []byte) error {
10507	var azFuture azure.Future
10508	if err := json.Unmarshal(body, &azFuture); err != nil {
10509		return err
10510	}
10511	future.FutureAPI = &azFuture
10512	future.Result = future.result
10513	return nil
10514}
10515
10516// result is the default implementation for CustomIPPrefixesDeleteFuture.Result.
10517func (future *CustomIPPrefixesDeleteFuture) result(client CustomIPPrefixesClient) (ar autorest.Response, err error) {
10518	var done bool
10519	done, err = future.DoneWithContext(context.Background(), client)
10520	if err != nil {
10521		err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure")
10522		return
10523	}
10524	if !done {
10525		ar.Response = future.Response()
10526		err = azure.NewAsyncOpIncompleteError("network.CustomIPPrefixesDeleteFuture")
10527		return
10528	}
10529	ar.Response = future.Response()
10530	return
10531}
10532
10533// CustomIPPrefixListResult response for ListCustomIpPrefixes API service call.
10534type CustomIPPrefixListResult struct {
10535	autorest.Response `json:"-"`
10536	// Value - A list of Custom IP prefixes that exists in a resource group.
10537	Value *[]CustomIPPrefix `json:"value,omitempty"`
10538	// NextLink - The URL to get the next set of results.
10539	NextLink *string `json:"nextLink,omitempty"`
10540}
10541
10542// CustomIPPrefixListResultIterator provides access to a complete listing of CustomIPPrefix values.
10543type CustomIPPrefixListResultIterator struct {
10544	i    int
10545	page CustomIPPrefixListResultPage
10546}
10547
10548// NextWithContext advances to the next value.  If there was an error making
10549// the request the iterator does not advance and the error is returned.
10550func (iter *CustomIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
10551	if tracing.IsEnabled() {
10552		ctx = tracing.StartSpan(ctx, fqdn+"/CustomIPPrefixListResultIterator.NextWithContext")
10553		defer func() {
10554			sc := -1
10555			if iter.Response().Response.Response != nil {
10556				sc = iter.Response().Response.Response.StatusCode
10557			}
10558			tracing.EndSpan(ctx, sc, err)
10559		}()
10560	}
10561	iter.i++
10562	if iter.i < len(iter.page.Values()) {
10563		return nil
10564	}
10565	err = iter.page.NextWithContext(ctx)
10566	if err != nil {
10567		iter.i--
10568		return err
10569	}
10570	iter.i = 0
10571	return nil
10572}
10573
10574// Next advances to the next value.  If there was an error making
10575// the request the iterator does not advance and the error is returned.
10576// Deprecated: Use NextWithContext() instead.
10577func (iter *CustomIPPrefixListResultIterator) Next() error {
10578	return iter.NextWithContext(context.Background())
10579}
10580
10581// NotDone returns true if the enumeration should be started or is not yet complete.
10582func (iter CustomIPPrefixListResultIterator) NotDone() bool {
10583	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10584}
10585
10586// Response returns the raw server response from the last page request.
10587func (iter CustomIPPrefixListResultIterator) Response() CustomIPPrefixListResult {
10588	return iter.page.Response()
10589}
10590
10591// Value returns the current value or a zero-initialized value if the
10592// iterator has advanced beyond the end of the collection.
10593func (iter CustomIPPrefixListResultIterator) Value() CustomIPPrefix {
10594	if !iter.page.NotDone() {
10595		return CustomIPPrefix{}
10596	}
10597	return iter.page.Values()[iter.i]
10598}
10599
10600// Creates a new instance of the CustomIPPrefixListResultIterator type.
10601func NewCustomIPPrefixListResultIterator(page CustomIPPrefixListResultPage) CustomIPPrefixListResultIterator {
10602	return CustomIPPrefixListResultIterator{page: page}
10603}
10604
10605// IsEmpty returns true if the ListResult contains no values.
10606func (ciplr CustomIPPrefixListResult) IsEmpty() bool {
10607	return ciplr.Value == nil || len(*ciplr.Value) == 0
10608}
10609
10610// hasNextLink returns true if the NextLink is not empty.
10611func (ciplr CustomIPPrefixListResult) hasNextLink() bool {
10612	return ciplr.NextLink != nil && len(*ciplr.NextLink) != 0
10613}
10614
10615// customIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
10616// It returns nil if no more results exist.
10617func (ciplr CustomIPPrefixListResult) customIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
10618	if !ciplr.hasNextLink() {
10619		return nil, nil
10620	}
10621	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10622		autorest.AsJSON(),
10623		autorest.AsGet(),
10624		autorest.WithBaseURL(to.String(ciplr.NextLink)))
10625}
10626
10627// CustomIPPrefixListResultPage contains a page of CustomIPPrefix values.
10628type CustomIPPrefixListResultPage struct {
10629	fn    func(context.Context, CustomIPPrefixListResult) (CustomIPPrefixListResult, error)
10630	ciplr CustomIPPrefixListResult
10631}
10632
10633// NextWithContext advances to the next page of values.  If there was an error making
10634// the request the page does not advance and the error is returned.
10635func (page *CustomIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
10636	if tracing.IsEnabled() {
10637		ctx = tracing.StartSpan(ctx, fqdn+"/CustomIPPrefixListResultPage.NextWithContext")
10638		defer func() {
10639			sc := -1
10640			if page.Response().Response.Response != nil {
10641				sc = page.Response().Response.Response.StatusCode
10642			}
10643			tracing.EndSpan(ctx, sc, err)
10644		}()
10645	}
10646	for {
10647		next, err := page.fn(ctx, page.ciplr)
10648		if err != nil {
10649			return err
10650		}
10651		page.ciplr = next
10652		if !next.hasNextLink() || !next.IsEmpty() {
10653			break
10654		}
10655	}
10656	return nil
10657}
10658
10659// Next advances to the next page of values.  If there was an error making
10660// the request the page does not advance and the error is returned.
10661// Deprecated: Use NextWithContext() instead.
10662func (page *CustomIPPrefixListResultPage) Next() error {
10663	return page.NextWithContext(context.Background())
10664}
10665
10666// NotDone returns true if the page enumeration should be started or is not yet complete.
10667func (page CustomIPPrefixListResultPage) NotDone() bool {
10668	return !page.ciplr.IsEmpty()
10669}
10670
10671// Response returns the raw server response from the last page request.
10672func (page CustomIPPrefixListResultPage) Response() CustomIPPrefixListResult {
10673	return page.ciplr
10674}
10675
10676// Values returns the slice of values for the current page or nil if there are no values.
10677func (page CustomIPPrefixListResultPage) Values() []CustomIPPrefix {
10678	if page.ciplr.IsEmpty() {
10679		return nil
10680	}
10681	return *page.ciplr.Value
10682}
10683
10684// Creates a new instance of the CustomIPPrefixListResultPage type.
10685func NewCustomIPPrefixListResultPage(cur CustomIPPrefixListResult, getNextPage func(context.Context, CustomIPPrefixListResult) (CustomIPPrefixListResult, error)) CustomIPPrefixListResultPage {
10686	return CustomIPPrefixListResultPage{
10687		fn:    getNextPage,
10688		ciplr: cur,
10689	}
10690}
10691
10692// CustomIPPrefixPropertiesFormat custom IP prefix properties.
10693type CustomIPPrefixPropertiesFormat struct {
10694	// Cidr - The prefix range in CIDR notation. Should include the start address and the prefix length.
10695	Cidr *string `json:"cidr,omitempty"`
10696	// CommissionedState - The commissioned state of the Custom IP Prefix. Possible values include: 'CommissionedStateProvisioning', 'CommissionedStateProvisioned', 'CommissionedStateCommissioning', 'CommissionedStateCommissioned', 'CommissionedStateDecommissioning', 'CommissionedStateDeprovisioning'
10697	CommissionedState CommissionedState `json:"commissionedState,omitempty"`
10698	// PublicIPPrefixes - READ-ONLY; The list of all referenced PublicIpPrefixes.
10699	PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"`
10700	// ResourceGUID - READ-ONLY; The resource GUID property of the custom IP prefix resource.
10701	ResourceGUID *string `json:"resourceGuid,omitempty"`
10702	// ProvisioningState - READ-ONLY; The provisioning state of the custom IP prefix resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
10703	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10704}
10705
10706// MarshalJSON is the custom marshaler for CustomIPPrefixPropertiesFormat.
10707func (cippf CustomIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
10708	objectMap := make(map[string]interface{})
10709	if cippf.Cidr != nil {
10710		objectMap["cidr"] = cippf.Cidr
10711	}
10712	if cippf.CommissionedState != "" {
10713		objectMap["commissionedState"] = cippf.CommissionedState
10714	}
10715	return json.Marshal(objectMap)
10716}
10717
10718// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10719// long-running operation.
10720type DdosCustomPoliciesCreateOrUpdateFuture struct {
10721	azure.FutureAPI
10722	// Result returns the result of the asynchronous operation.
10723	// If the operation has not completed it will return an error.
10724	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
10725}
10726
10727// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10728func (future *DdosCustomPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10729	var azFuture azure.Future
10730	if err := json.Unmarshal(body, &azFuture); err != nil {
10731		return err
10732	}
10733	future.FutureAPI = &azFuture
10734	future.Result = future.result
10735	return nil
10736}
10737
10738// result is the default implementation for DdosCustomPoliciesCreateOrUpdateFuture.Result.
10739func (future *DdosCustomPoliciesCreateOrUpdateFuture) result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) {
10740	var done bool
10741	done, err = future.DoneWithContext(context.Background(), client)
10742	if err != nil {
10743		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10744		return
10745	}
10746	if !done {
10747		dcp.Response.Response = future.Response()
10748		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesCreateOrUpdateFuture")
10749		return
10750	}
10751	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10752	if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent {
10753		dcp, err = client.CreateOrUpdateResponder(dcp.Response.Response)
10754		if err != nil {
10755			err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", dcp.Response.Response, "Failure responding to request")
10756		}
10757	}
10758	return
10759}
10760
10761// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
10762// long-running operation.
10763type DdosCustomPoliciesDeleteFuture struct {
10764	azure.FutureAPI
10765	// Result returns the result of the asynchronous operation.
10766	// If the operation has not completed it will return an error.
10767	Result func(DdosCustomPoliciesClient) (autorest.Response, error)
10768}
10769
10770// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10771func (future *DdosCustomPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
10772	var azFuture azure.Future
10773	if err := json.Unmarshal(body, &azFuture); err != nil {
10774		return err
10775	}
10776	future.FutureAPI = &azFuture
10777	future.Result = future.result
10778	return nil
10779}
10780
10781// result is the default implementation for DdosCustomPoliciesDeleteFuture.Result.
10782func (future *DdosCustomPoliciesDeleteFuture) result(client DdosCustomPoliciesClient) (ar autorest.Response, err error) {
10783	var done bool
10784	done, err = future.DoneWithContext(context.Background(), client)
10785	if err != nil {
10786		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
10787		return
10788	}
10789	if !done {
10790		ar.Response = future.Response()
10791		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesDeleteFuture")
10792		return
10793	}
10794	ar.Response = future.Response()
10795	return
10796}
10797
10798// DdosCustomPolicy a DDoS custom policy in a resource group.
10799type DdosCustomPolicy struct {
10800	autorest.Response `json:"-"`
10801	// DdosCustomPolicyPropertiesFormat - Properties of the DDoS custom policy.
10802	*DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"`
10803	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10804	Etag *string `json:"etag,omitempty"`
10805	// ID - Resource ID.
10806	ID *string `json:"id,omitempty"`
10807	// Name - READ-ONLY; Resource name.
10808	Name *string `json:"name,omitempty"`
10809	// Type - READ-ONLY; Resource type.
10810	Type *string `json:"type,omitempty"`
10811	// Location - Resource location.
10812	Location *string `json:"location,omitempty"`
10813	// Tags - Resource tags.
10814	Tags map[string]*string `json:"tags"`
10815}
10816
10817// MarshalJSON is the custom marshaler for DdosCustomPolicy.
10818func (dcp DdosCustomPolicy) MarshalJSON() ([]byte, error) {
10819	objectMap := make(map[string]interface{})
10820	if dcp.DdosCustomPolicyPropertiesFormat != nil {
10821		objectMap["properties"] = dcp.DdosCustomPolicyPropertiesFormat
10822	}
10823	if dcp.ID != nil {
10824		objectMap["id"] = dcp.ID
10825	}
10826	if dcp.Location != nil {
10827		objectMap["location"] = dcp.Location
10828	}
10829	if dcp.Tags != nil {
10830		objectMap["tags"] = dcp.Tags
10831	}
10832	return json.Marshal(objectMap)
10833}
10834
10835// UnmarshalJSON is the custom unmarshaler for DdosCustomPolicy struct.
10836func (dcp *DdosCustomPolicy) UnmarshalJSON(body []byte) error {
10837	var m map[string]*json.RawMessage
10838	err := json.Unmarshal(body, &m)
10839	if err != nil {
10840		return err
10841	}
10842	for k, v := range m {
10843		switch k {
10844		case "properties":
10845			if v != nil {
10846				var ddosCustomPolicyPropertiesFormat DdosCustomPolicyPropertiesFormat
10847				err = json.Unmarshal(*v, &ddosCustomPolicyPropertiesFormat)
10848				if err != nil {
10849					return err
10850				}
10851				dcp.DdosCustomPolicyPropertiesFormat = &ddosCustomPolicyPropertiesFormat
10852			}
10853		case "etag":
10854			if v != nil {
10855				var etag string
10856				err = json.Unmarshal(*v, &etag)
10857				if err != nil {
10858					return err
10859				}
10860				dcp.Etag = &etag
10861			}
10862		case "id":
10863			if v != nil {
10864				var ID string
10865				err = json.Unmarshal(*v, &ID)
10866				if err != nil {
10867					return err
10868				}
10869				dcp.ID = &ID
10870			}
10871		case "name":
10872			if v != nil {
10873				var name string
10874				err = json.Unmarshal(*v, &name)
10875				if err != nil {
10876					return err
10877				}
10878				dcp.Name = &name
10879			}
10880		case "type":
10881			if v != nil {
10882				var typeVar string
10883				err = json.Unmarshal(*v, &typeVar)
10884				if err != nil {
10885					return err
10886				}
10887				dcp.Type = &typeVar
10888			}
10889		case "location":
10890			if v != nil {
10891				var location string
10892				err = json.Unmarshal(*v, &location)
10893				if err != nil {
10894					return err
10895				}
10896				dcp.Location = &location
10897			}
10898		case "tags":
10899			if v != nil {
10900				var tags map[string]*string
10901				err = json.Unmarshal(*v, &tags)
10902				if err != nil {
10903					return err
10904				}
10905				dcp.Tags = tags
10906			}
10907		}
10908	}
10909
10910	return nil
10911}
10912
10913// DdosCustomPolicyPropertiesFormat dDoS custom policy properties.
10914type DdosCustomPolicyPropertiesFormat struct {
10915	// 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.
10916	ResourceGUID *string `json:"resourceGuid,omitempty"`
10917	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS custom policy resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
10918	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10919	// PublicIPAddresses - READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only.
10920	PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"`
10921	// ProtocolCustomSettings - The protocol-specific DDoS policy customization parameters.
10922	ProtocolCustomSettings *[]ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"`
10923}
10924
10925// MarshalJSON is the custom marshaler for DdosCustomPolicyPropertiesFormat.
10926func (dcppf DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
10927	objectMap := make(map[string]interface{})
10928	if dcppf.ProtocolCustomSettings != nil {
10929		objectMap["protocolCustomSettings"] = dcppf.ProtocolCustomSettings
10930	}
10931	return json.Marshal(objectMap)
10932}
10933
10934// DdosProtectionPlan a DDoS protection plan in a resource group.
10935type DdosProtectionPlan struct {
10936	autorest.Response `json:"-"`
10937	// ID - READ-ONLY; Resource ID.
10938	ID *string `json:"id,omitempty"`
10939	// Name - READ-ONLY; Resource name.
10940	Name *string `json:"name,omitempty"`
10941	// Type - READ-ONLY; Resource type.
10942	Type *string `json:"type,omitempty"`
10943	// Location - Resource location.
10944	Location *string `json:"location,omitempty"`
10945	// Tags - Resource tags.
10946	Tags map[string]*string `json:"tags"`
10947	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
10948	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
10949	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10950	Etag *string `json:"etag,omitempty"`
10951}
10952
10953// MarshalJSON is the custom marshaler for DdosProtectionPlan.
10954func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
10955	objectMap := make(map[string]interface{})
10956	if dpp.Location != nil {
10957		objectMap["location"] = dpp.Location
10958	}
10959	if dpp.Tags != nil {
10960		objectMap["tags"] = dpp.Tags
10961	}
10962	if dpp.DdosProtectionPlanPropertiesFormat != nil {
10963		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
10964	}
10965	return json.Marshal(objectMap)
10966}
10967
10968// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
10969func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
10970	var m map[string]*json.RawMessage
10971	err := json.Unmarshal(body, &m)
10972	if err != nil {
10973		return err
10974	}
10975	for k, v := range m {
10976		switch k {
10977		case "id":
10978			if v != nil {
10979				var ID string
10980				err = json.Unmarshal(*v, &ID)
10981				if err != nil {
10982					return err
10983				}
10984				dpp.ID = &ID
10985			}
10986		case "name":
10987			if v != nil {
10988				var name string
10989				err = json.Unmarshal(*v, &name)
10990				if err != nil {
10991					return err
10992				}
10993				dpp.Name = &name
10994			}
10995		case "type":
10996			if v != nil {
10997				var typeVar string
10998				err = json.Unmarshal(*v, &typeVar)
10999				if err != nil {
11000					return err
11001				}
11002				dpp.Type = &typeVar
11003			}
11004		case "location":
11005			if v != nil {
11006				var location string
11007				err = json.Unmarshal(*v, &location)
11008				if err != nil {
11009					return err
11010				}
11011				dpp.Location = &location
11012			}
11013		case "tags":
11014			if v != nil {
11015				var tags map[string]*string
11016				err = json.Unmarshal(*v, &tags)
11017				if err != nil {
11018					return err
11019				}
11020				dpp.Tags = tags
11021			}
11022		case "properties":
11023			if v != nil {
11024				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
11025				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
11026				if err != nil {
11027					return err
11028				}
11029				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
11030			}
11031		case "etag":
11032			if v != nil {
11033				var etag string
11034				err = json.Unmarshal(*v, &etag)
11035				if err != nil {
11036					return err
11037				}
11038				dpp.Etag = &etag
11039			}
11040		}
11041	}
11042
11043	return nil
11044}
11045
11046// DdosProtectionPlanListResult a list of DDoS protection plans.
11047type DdosProtectionPlanListResult struct {
11048	autorest.Response `json:"-"`
11049	// Value - A list of DDoS protection plans.
11050	Value *[]DdosProtectionPlan `json:"value,omitempty"`
11051	// NextLink - READ-ONLY; The URL to get the next set of results.
11052	NextLink *string `json:"nextLink,omitempty"`
11053}
11054
11055// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
11056func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
11057	objectMap := make(map[string]interface{})
11058	if dpplr.Value != nil {
11059		objectMap["value"] = dpplr.Value
11060	}
11061	return json.Marshal(objectMap)
11062}
11063
11064// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
11065type DdosProtectionPlanListResultIterator struct {
11066	i    int
11067	page DdosProtectionPlanListResultPage
11068}
11069
11070// NextWithContext advances to the next value.  If there was an error making
11071// the request the iterator does not advance and the error is returned.
11072func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
11073	if tracing.IsEnabled() {
11074		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
11075		defer func() {
11076			sc := -1
11077			if iter.Response().Response.Response != nil {
11078				sc = iter.Response().Response.Response.StatusCode
11079			}
11080			tracing.EndSpan(ctx, sc, err)
11081		}()
11082	}
11083	iter.i++
11084	if iter.i < len(iter.page.Values()) {
11085		return nil
11086	}
11087	err = iter.page.NextWithContext(ctx)
11088	if err != nil {
11089		iter.i--
11090		return err
11091	}
11092	iter.i = 0
11093	return nil
11094}
11095
11096// Next advances to the next value.  If there was an error making
11097// the request the iterator does not advance and the error is returned.
11098// Deprecated: Use NextWithContext() instead.
11099func (iter *DdosProtectionPlanListResultIterator) Next() error {
11100	return iter.NextWithContext(context.Background())
11101}
11102
11103// NotDone returns true if the enumeration should be started or is not yet complete.
11104func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
11105	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11106}
11107
11108// Response returns the raw server response from the last page request.
11109func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
11110	return iter.page.Response()
11111}
11112
11113// Value returns the current value or a zero-initialized value if the
11114// iterator has advanced beyond the end of the collection.
11115func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
11116	if !iter.page.NotDone() {
11117		return DdosProtectionPlan{}
11118	}
11119	return iter.page.Values()[iter.i]
11120}
11121
11122// Creates a new instance of the DdosProtectionPlanListResultIterator type.
11123func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
11124	return DdosProtectionPlanListResultIterator{page: page}
11125}
11126
11127// IsEmpty returns true if the ListResult contains no values.
11128func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
11129	return dpplr.Value == nil || len(*dpplr.Value) == 0
11130}
11131
11132// hasNextLink returns true if the NextLink is not empty.
11133func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
11134	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
11135}
11136
11137// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
11138// It returns nil if no more results exist.
11139func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
11140	if !dpplr.hasNextLink() {
11141		return nil, nil
11142	}
11143	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11144		autorest.AsJSON(),
11145		autorest.AsGet(),
11146		autorest.WithBaseURL(to.String(dpplr.NextLink)))
11147}
11148
11149// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
11150type DdosProtectionPlanListResultPage struct {
11151	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
11152	dpplr DdosProtectionPlanListResult
11153}
11154
11155// NextWithContext advances to the next page of values.  If there was an error making
11156// the request the page does not advance and the error is returned.
11157func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
11158	if tracing.IsEnabled() {
11159		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
11160		defer func() {
11161			sc := -1
11162			if page.Response().Response.Response != nil {
11163				sc = page.Response().Response.Response.StatusCode
11164			}
11165			tracing.EndSpan(ctx, sc, err)
11166		}()
11167	}
11168	for {
11169		next, err := page.fn(ctx, page.dpplr)
11170		if err != nil {
11171			return err
11172		}
11173		page.dpplr = next
11174		if !next.hasNextLink() || !next.IsEmpty() {
11175			break
11176		}
11177	}
11178	return nil
11179}
11180
11181// Next advances to the next page of values.  If there was an error making
11182// the request the page does not advance and the error is returned.
11183// Deprecated: Use NextWithContext() instead.
11184func (page *DdosProtectionPlanListResultPage) Next() error {
11185	return page.NextWithContext(context.Background())
11186}
11187
11188// NotDone returns true if the page enumeration should be started or is not yet complete.
11189func (page DdosProtectionPlanListResultPage) NotDone() bool {
11190	return !page.dpplr.IsEmpty()
11191}
11192
11193// Response returns the raw server response from the last page request.
11194func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
11195	return page.dpplr
11196}
11197
11198// Values returns the slice of values for the current page or nil if there are no values.
11199func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
11200	if page.dpplr.IsEmpty() {
11201		return nil
11202	}
11203	return *page.dpplr.Value
11204}
11205
11206// Creates a new instance of the DdosProtectionPlanListResultPage type.
11207func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
11208	return DdosProtectionPlanListResultPage{
11209		fn:    getNextPage,
11210		dpplr: cur,
11211	}
11212}
11213
11214// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
11215type DdosProtectionPlanPropertiesFormat struct {
11216	// 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.
11217	ResourceGUID *string `json:"resourceGuid,omitempty"`
11218	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
11219	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11220	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
11221	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
11222}
11223
11224// MarshalJSON is the custom marshaler for DdosProtectionPlanPropertiesFormat.
11225func (dpppf DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) {
11226	objectMap := make(map[string]interface{})
11227	return json.Marshal(objectMap)
11228}
11229
11230// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11231// long-running operation.
11232type DdosProtectionPlansCreateOrUpdateFuture struct {
11233	azure.FutureAPI
11234	// Result returns the result of the asynchronous operation.
11235	// If the operation has not completed it will return an error.
11236	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
11237}
11238
11239// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11240func (future *DdosProtectionPlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11241	var azFuture azure.Future
11242	if err := json.Unmarshal(body, &azFuture); err != nil {
11243		return err
11244	}
11245	future.FutureAPI = &azFuture
11246	future.Result = future.result
11247	return nil
11248}
11249
11250// result is the default implementation for DdosProtectionPlansCreateOrUpdateFuture.Result.
11251func (future *DdosProtectionPlansCreateOrUpdateFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
11252	var done bool
11253	done, err = future.DoneWithContext(context.Background(), client)
11254	if err != nil {
11255		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11256		return
11257	}
11258	if !done {
11259		dpp.Response.Response = future.Response()
11260		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
11261		return
11262	}
11263	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11264	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
11265		dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
11266		if err != nil {
11267			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
11268		}
11269	}
11270	return
11271}
11272
11273// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
11274// long-running operation.
11275type DdosProtectionPlansDeleteFuture struct {
11276	azure.FutureAPI
11277	// Result returns the result of the asynchronous operation.
11278	// If the operation has not completed it will return an error.
11279	Result func(DdosProtectionPlansClient) (autorest.Response, error)
11280}
11281
11282// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11283func (future *DdosProtectionPlansDeleteFuture) UnmarshalJSON(body []byte) error {
11284	var azFuture azure.Future
11285	if err := json.Unmarshal(body, &azFuture); err != nil {
11286		return err
11287	}
11288	future.FutureAPI = &azFuture
11289	future.Result = future.result
11290	return nil
11291}
11292
11293// result is the default implementation for DdosProtectionPlansDeleteFuture.Result.
11294func (future *DdosProtectionPlansDeleteFuture) result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
11295	var done bool
11296	done, err = future.DoneWithContext(context.Background(), client)
11297	if err != nil {
11298		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure")
11299		return
11300	}
11301	if !done {
11302		ar.Response = future.Response()
11303		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
11304		return
11305	}
11306	ar.Response = future.Response()
11307	return
11308}
11309
11310// DdosSettings contains the DDoS protection settings of the public IP.
11311type DdosSettings struct {
11312	// DdosCustomPolicy - The DDoS custom policy associated with the public IP.
11313	DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"`
11314	// 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'
11315	ProtectionCoverage DdosSettingsProtectionCoverage `json:"protectionCoverage,omitempty"`
11316	// ProtectedIP - Enables DDoS protection on the public IP.
11317	ProtectedIP *bool `json:"protectedIP,omitempty"`
11318}
11319
11320// Delegation details the service to which the subnet is delegated.
11321type Delegation struct {
11322	// ServiceDelegationPropertiesFormat - Properties of the subnet.
11323	*ServiceDelegationPropertiesFormat `json:"properties,omitempty"`
11324	// Name - The name of the resource that is unique within a subnet. This name can be used to access the resource.
11325	Name *string `json:"name,omitempty"`
11326	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11327	Etag *string `json:"etag,omitempty"`
11328	// Type - Resource type.
11329	Type *string `json:"type,omitempty"`
11330	// ID - Resource ID.
11331	ID *string `json:"id,omitempty"`
11332}
11333
11334// MarshalJSON is the custom marshaler for Delegation.
11335func (d Delegation) MarshalJSON() ([]byte, error) {
11336	objectMap := make(map[string]interface{})
11337	if d.ServiceDelegationPropertiesFormat != nil {
11338		objectMap["properties"] = d.ServiceDelegationPropertiesFormat
11339	}
11340	if d.Name != nil {
11341		objectMap["name"] = d.Name
11342	}
11343	if d.Type != nil {
11344		objectMap["type"] = d.Type
11345	}
11346	if d.ID != nil {
11347		objectMap["id"] = d.ID
11348	}
11349	return json.Marshal(objectMap)
11350}
11351
11352// UnmarshalJSON is the custom unmarshaler for Delegation struct.
11353func (d *Delegation) UnmarshalJSON(body []byte) error {
11354	var m map[string]*json.RawMessage
11355	err := json.Unmarshal(body, &m)
11356	if err != nil {
11357		return err
11358	}
11359	for k, v := range m {
11360		switch k {
11361		case "properties":
11362			if v != nil {
11363				var serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat
11364				err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat)
11365				if err != nil {
11366					return err
11367				}
11368				d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat
11369			}
11370		case "name":
11371			if v != nil {
11372				var name string
11373				err = json.Unmarshal(*v, &name)
11374				if err != nil {
11375					return err
11376				}
11377				d.Name = &name
11378			}
11379		case "etag":
11380			if v != nil {
11381				var etag string
11382				err = json.Unmarshal(*v, &etag)
11383				if err != nil {
11384					return err
11385				}
11386				d.Etag = &etag
11387			}
11388		case "type":
11389			if v != nil {
11390				var typeVar string
11391				err = json.Unmarshal(*v, &typeVar)
11392				if err != nil {
11393					return err
11394				}
11395				d.Type = &typeVar
11396			}
11397		case "id":
11398			if v != nil {
11399				var ID string
11400				err = json.Unmarshal(*v, &ID)
11401				if err != nil {
11402					return err
11403				}
11404				d.ID = &ID
11405			}
11406		}
11407	}
11408
11409	return nil
11410}
11411
11412// DeleteBastionShareableLinkFuture an abstraction for monitoring and retrieving the results of a
11413// long-running operation.
11414type DeleteBastionShareableLinkFuture struct {
11415	azure.FutureAPI
11416	// Result returns the result of the asynchronous operation.
11417	// If the operation has not completed it will return an error.
11418	Result func(BaseClient) (autorest.Response, error)
11419}
11420
11421// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11422func (future *DeleteBastionShareableLinkFuture) UnmarshalJSON(body []byte) error {
11423	var azFuture azure.Future
11424	if err := json.Unmarshal(body, &azFuture); err != nil {
11425		return err
11426	}
11427	future.FutureAPI = &azFuture
11428	future.Result = future.result
11429	return nil
11430}
11431
11432// result is the default implementation for DeleteBastionShareableLinkFuture.Result.
11433func (future *DeleteBastionShareableLinkFuture) result(client BaseClient) (ar autorest.Response, err error) {
11434	var done bool
11435	done, err = future.DoneWithContext(context.Background(), client)
11436	if err != nil {
11437		err = autorest.NewErrorWithError(err, "network.DeleteBastionShareableLinkFuture", "Result", future.Response(), "Polling failure")
11438		return
11439	}
11440	if !done {
11441		ar.Response = future.Response()
11442		err = azure.NewAsyncOpIncompleteError("network.DeleteBastionShareableLinkFuture")
11443		return
11444	}
11445	ar.Response = future.Response()
11446	return
11447}
11448
11449// DeviceProperties list of properties of the device.
11450type DeviceProperties struct {
11451	// DeviceVendor - Name of the device Vendor.
11452	DeviceVendor *string `json:"deviceVendor,omitempty"`
11453	// DeviceModel - Model of the device.
11454	DeviceModel *string `json:"deviceModel,omitempty"`
11455	// LinkSpeedInMbps - Link speed.
11456	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
11457}
11458
11459// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
11460// network. Standard DHCP option for a subnet overrides VNET DHCP options.
11461type DhcpOptions struct {
11462	// DNSServers - The list of DNS servers IP addresses.
11463	DNSServers *[]string `json:"dnsServers,omitempty"`
11464}
11465
11466// Dimension dimension of the metric.
11467type Dimension struct {
11468	// Name - The name of the dimension.
11469	Name *string `json:"name,omitempty"`
11470	// DisplayName - The display name of the dimension.
11471	DisplayName *string `json:"displayName,omitempty"`
11472	// InternalName - The internal name of the dimension.
11473	InternalName *string `json:"internalName,omitempty"`
11474}
11475
11476// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
11477type DNSNameAvailabilityResult struct {
11478	autorest.Response `json:"-"`
11479	// Available - Domain availability (True/False).
11480	Available *bool `json:"available,omitempty"`
11481}
11482
11483// DNSSettings DNS Proxy Settings in Firewall Policy.
11484type DNSSettings struct {
11485	// Servers - List of Custom DNS Servers.
11486	Servers *[]string `json:"servers,omitempty"`
11487	// EnableProxy - Enable DNS Proxy on Firewalls attached to the Firewall Policy.
11488	EnableProxy *bool `json:"enableProxy,omitempty"`
11489	// RequireProxyForNetworkRules - FQDNs in Network Rules are supported when set to true.
11490	RequireProxyForNetworkRules *bool `json:"requireProxyForNetworkRules,omitempty"`
11491}
11492
11493// DscpConfiguration DSCP Configuration in a resource group.
11494type DscpConfiguration struct {
11495	autorest.Response `json:"-"`
11496	// DscpConfigurationPropertiesFormat - Properties of the network interface.
11497	*DscpConfigurationPropertiesFormat `json:"properties,omitempty"`
11498	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11499	Etag *string `json:"etag,omitempty"`
11500	// ID - Resource ID.
11501	ID *string `json:"id,omitempty"`
11502	// Name - READ-ONLY; Resource name.
11503	Name *string `json:"name,omitempty"`
11504	// Type - READ-ONLY; Resource type.
11505	Type *string `json:"type,omitempty"`
11506	// Location - Resource location.
11507	Location *string `json:"location,omitempty"`
11508	// Tags - Resource tags.
11509	Tags map[string]*string `json:"tags"`
11510}
11511
11512// MarshalJSON is the custom marshaler for DscpConfiguration.
11513func (dc DscpConfiguration) MarshalJSON() ([]byte, error) {
11514	objectMap := make(map[string]interface{})
11515	if dc.DscpConfigurationPropertiesFormat != nil {
11516		objectMap["properties"] = dc.DscpConfigurationPropertiesFormat
11517	}
11518	if dc.ID != nil {
11519		objectMap["id"] = dc.ID
11520	}
11521	if dc.Location != nil {
11522		objectMap["location"] = dc.Location
11523	}
11524	if dc.Tags != nil {
11525		objectMap["tags"] = dc.Tags
11526	}
11527	return json.Marshal(objectMap)
11528}
11529
11530// UnmarshalJSON is the custom unmarshaler for DscpConfiguration struct.
11531func (dc *DscpConfiguration) UnmarshalJSON(body []byte) error {
11532	var m map[string]*json.RawMessage
11533	err := json.Unmarshal(body, &m)
11534	if err != nil {
11535		return err
11536	}
11537	for k, v := range m {
11538		switch k {
11539		case "properties":
11540			if v != nil {
11541				var dscpConfigurationPropertiesFormat DscpConfigurationPropertiesFormat
11542				err = json.Unmarshal(*v, &dscpConfigurationPropertiesFormat)
11543				if err != nil {
11544					return err
11545				}
11546				dc.DscpConfigurationPropertiesFormat = &dscpConfigurationPropertiesFormat
11547			}
11548		case "etag":
11549			if v != nil {
11550				var etag string
11551				err = json.Unmarshal(*v, &etag)
11552				if err != nil {
11553					return err
11554				}
11555				dc.Etag = &etag
11556			}
11557		case "id":
11558			if v != nil {
11559				var ID string
11560				err = json.Unmarshal(*v, &ID)
11561				if err != nil {
11562					return err
11563				}
11564				dc.ID = &ID
11565			}
11566		case "name":
11567			if v != nil {
11568				var name string
11569				err = json.Unmarshal(*v, &name)
11570				if err != nil {
11571					return err
11572				}
11573				dc.Name = &name
11574			}
11575		case "type":
11576			if v != nil {
11577				var typeVar string
11578				err = json.Unmarshal(*v, &typeVar)
11579				if err != nil {
11580					return err
11581				}
11582				dc.Type = &typeVar
11583			}
11584		case "location":
11585			if v != nil {
11586				var location string
11587				err = json.Unmarshal(*v, &location)
11588				if err != nil {
11589					return err
11590				}
11591				dc.Location = &location
11592			}
11593		case "tags":
11594			if v != nil {
11595				var tags map[string]*string
11596				err = json.Unmarshal(*v, &tags)
11597				if err != nil {
11598					return err
11599				}
11600				dc.Tags = tags
11601			}
11602		}
11603	}
11604
11605	return nil
11606}
11607
11608// DscpConfigurationCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11609// long-running operation.
11610type DscpConfigurationCreateOrUpdateFuture struct {
11611	azure.FutureAPI
11612	// Result returns the result of the asynchronous operation.
11613	// If the operation has not completed it will return an error.
11614	Result func(DscpConfigurationClient) (DscpConfiguration, error)
11615}
11616
11617// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11618func (future *DscpConfigurationCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11619	var azFuture azure.Future
11620	if err := json.Unmarshal(body, &azFuture); err != nil {
11621		return err
11622	}
11623	future.FutureAPI = &azFuture
11624	future.Result = future.result
11625	return nil
11626}
11627
11628// result is the default implementation for DscpConfigurationCreateOrUpdateFuture.Result.
11629func (future *DscpConfigurationCreateOrUpdateFuture) result(client DscpConfigurationClient) (dc DscpConfiguration, err error) {
11630	var done bool
11631	done, err = future.DoneWithContext(context.Background(), client)
11632	if err != nil {
11633		err = autorest.NewErrorWithError(err, "network.DscpConfigurationCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11634		return
11635	}
11636	if !done {
11637		dc.Response.Response = future.Response()
11638		err = azure.NewAsyncOpIncompleteError("network.DscpConfigurationCreateOrUpdateFuture")
11639		return
11640	}
11641	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11642	if dc.Response.Response, err = future.GetResult(sender); err == nil && dc.Response.Response.StatusCode != http.StatusNoContent {
11643		dc, err = client.CreateOrUpdateResponder(dc.Response.Response)
11644		if err != nil {
11645			err = autorest.NewErrorWithError(err, "network.DscpConfigurationCreateOrUpdateFuture", "Result", dc.Response.Response, "Failure responding to request")
11646		}
11647	}
11648	return
11649}
11650
11651// DscpConfigurationDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
11652// operation.
11653type DscpConfigurationDeleteFuture struct {
11654	azure.FutureAPI
11655	// Result returns the result of the asynchronous operation.
11656	// If the operation has not completed it will return an error.
11657	Result func(DscpConfigurationClient) (autorest.Response, error)
11658}
11659
11660// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11661func (future *DscpConfigurationDeleteFuture) UnmarshalJSON(body []byte) error {
11662	var azFuture azure.Future
11663	if err := json.Unmarshal(body, &azFuture); err != nil {
11664		return err
11665	}
11666	future.FutureAPI = &azFuture
11667	future.Result = future.result
11668	return nil
11669}
11670
11671// result is the default implementation for DscpConfigurationDeleteFuture.Result.
11672func (future *DscpConfigurationDeleteFuture) result(client DscpConfigurationClient) (ar autorest.Response, err error) {
11673	var done bool
11674	done, err = future.DoneWithContext(context.Background(), client)
11675	if err != nil {
11676		err = autorest.NewErrorWithError(err, "network.DscpConfigurationDeleteFuture", "Result", future.Response(), "Polling failure")
11677		return
11678	}
11679	if !done {
11680		ar.Response = future.Response()
11681		err = azure.NewAsyncOpIncompleteError("network.DscpConfigurationDeleteFuture")
11682		return
11683	}
11684	ar.Response = future.Response()
11685	return
11686}
11687
11688// DscpConfigurationListResult response for the DscpConfigurationList API service call.
11689type DscpConfigurationListResult struct {
11690	autorest.Response `json:"-"`
11691	// Value - A list of dscp configurations in a resource group.
11692	Value *[]DscpConfiguration `json:"value,omitempty"`
11693	// NextLink - READ-ONLY; The URL to get the next set of results.
11694	NextLink *string `json:"nextLink,omitempty"`
11695}
11696
11697// MarshalJSON is the custom marshaler for DscpConfigurationListResult.
11698func (dclr DscpConfigurationListResult) MarshalJSON() ([]byte, error) {
11699	objectMap := make(map[string]interface{})
11700	if dclr.Value != nil {
11701		objectMap["value"] = dclr.Value
11702	}
11703	return json.Marshal(objectMap)
11704}
11705
11706// DscpConfigurationListResultIterator provides access to a complete listing of DscpConfiguration values.
11707type DscpConfigurationListResultIterator struct {
11708	i    int
11709	page DscpConfigurationListResultPage
11710}
11711
11712// NextWithContext advances to the next value.  If there was an error making
11713// the request the iterator does not advance and the error is returned.
11714func (iter *DscpConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
11715	if tracing.IsEnabled() {
11716		ctx = tracing.StartSpan(ctx, fqdn+"/DscpConfigurationListResultIterator.NextWithContext")
11717		defer func() {
11718			sc := -1
11719			if iter.Response().Response.Response != nil {
11720				sc = iter.Response().Response.Response.StatusCode
11721			}
11722			tracing.EndSpan(ctx, sc, err)
11723		}()
11724	}
11725	iter.i++
11726	if iter.i < len(iter.page.Values()) {
11727		return nil
11728	}
11729	err = iter.page.NextWithContext(ctx)
11730	if err != nil {
11731		iter.i--
11732		return err
11733	}
11734	iter.i = 0
11735	return nil
11736}
11737
11738// Next advances to the next value.  If there was an error making
11739// the request the iterator does not advance and the error is returned.
11740// Deprecated: Use NextWithContext() instead.
11741func (iter *DscpConfigurationListResultIterator) Next() error {
11742	return iter.NextWithContext(context.Background())
11743}
11744
11745// NotDone returns true if the enumeration should be started or is not yet complete.
11746func (iter DscpConfigurationListResultIterator) NotDone() bool {
11747	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11748}
11749
11750// Response returns the raw server response from the last page request.
11751func (iter DscpConfigurationListResultIterator) Response() DscpConfigurationListResult {
11752	return iter.page.Response()
11753}
11754
11755// Value returns the current value or a zero-initialized value if the
11756// iterator has advanced beyond the end of the collection.
11757func (iter DscpConfigurationListResultIterator) Value() DscpConfiguration {
11758	if !iter.page.NotDone() {
11759		return DscpConfiguration{}
11760	}
11761	return iter.page.Values()[iter.i]
11762}
11763
11764// Creates a new instance of the DscpConfigurationListResultIterator type.
11765func NewDscpConfigurationListResultIterator(page DscpConfigurationListResultPage) DscpConfigurationListResultIterator {
11766	return DscpConfigurationListResultIterator{page: page}
11767}
11768
11769// IsEmpty returns true if the ListResult contains no values.
11770func (dclr DscpConfigurationListResult) IsEmpty() bool {
11771	return dclr.Value == nil || len(*dclr.Value) == 0
11772}
11773
11774// hasNextLink returns true if the NextLink is not empty.
11775func (dclr DscpConfigurationListResult) hasNextLink() bool {
11776	return dclr.NextLink != nil && len(*dclr.NextLink) != 0
11777}
11778
11779// dscpConfigurationListResultPreparer prepares a request to retrieve the next set of results.
11780// It returns nil if no more results exist.
11781func (dclr DscpConfigurationListResult) dscpConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
11782	if !dclr.hasNextLink() {
11783		return nil, nil
11784	}
11785	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11786		autorest.AsJSON(),
11787		autorest.AsGet(),
11788		autorest.WithBaseURL(to.String(dclr.NextLink)))
11789}
11790
11791// DscpConfigurationListResultPage contains a page of DscpConfiguration values.
11792type DscpConfigurationListResultPage struct {
11793	fn   func(context.Context, DscpConfigurationListResult) (DscpConfigurationListResult, error)
11794	dclr DscpConfigurationListResult
11795}
11796
11797// NextWithContext advances to the next page of values.  If there was an error making
11798// the request the page does not advance and the error is returned.
11799func (page *DscpConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
11800	if tracing.IsEnabled() {
11801		ctx = tracing.StartSpan(ctx, fqdn+"/DscpConfigurationListResultPage.NextWithContext")
11802		defer func() {
11803			sc := -1
11804			if page.Response().Response.Response != nil {
11805				sc = page.Response().Response.Response.StatusCode
11806			}
11807			tracing.EndSpan(ctx, sc, err)
11808		}()
11809	}
11810	for {
11811		next, err := page.fn(ctx, page.dclr)
11812		if err != nil {
11813			return err
11814		}
11815		page.dclr = next
11816		if !next.hasNextLink() || !next.IsEmpty() {
11817			break
11818		}
11819	}
11820	return nil
11821}
11822
11823// Next advances to the next page of values.  If there was an error making
11824// the request the page does not advance and the error is returned.
11825// Deprecated: Use NextWithContext() instead.
11826func (page *DscpConfigurationListResultPage) Next() error {
11827	return page.NextWithContext(context.Background())
11828}
11829
11830// NotDone returns true if the page enumeration should be started or is not yet complete.
11831func (page DscpConfigurationListResultPage) NotDone() bool {
11832	return !page.dclr.IsEmpty()
11833}
11834
11835// Response returns the raw server response from the last page request.
11836func (page DscpConfigurationListResultPage) Response() DscpConfigurationListResult {
11837	return page.dclr
11838}
11839
11840// Values returns the slice of values for the current page or nil if there are no values.
11841func (page DscpConfigurationListResultPage) Values() []DscpConfiguration {
11842	if page.dclr.IsEmpty() {
11843		return nil
11844	}
11845	return *page.dclr.Value
11846}
11847
11848// Creates a new instance of the DscpConfigurationListResultPage type.
11849func NewDscpConfigurationListResultPage(cur DscpConfigurationListResult, getNextPage func(context.Context, DscpConfigurationListResult) (DscpConfigurationListResult, error)) DscpConfigurationListResultPage {
11850	return DscpConfigurationListResultPage{
11851		fn:   getNextPage,
11852		dclr: cur,
11853	}
11854}
11855
11856// DscpConfigurationPropertiesFormat DSCP Configuration properties.
11857type DscpConfigurationPropertiesFormat struct {
11858	// Markings - List of markings to be used in the configuration.
11859	Markings *[]int32 `json:"markings,omitempty"`
11860	// SourceIPRanges - Source IP ranges.
11861	SourceIPRanges *[]QosIPRange `json:"sourceIpRanges,omitempty"`
11862	// DestinationIPRanges - Destination IP ranges.
11863	DestinationIPRanges *[]QosIPRange `json:"destinationIpRanges,omitempty"`
11864	// SourcePortRanges - Sources port ranges.
11865	SourcePortRanges *[]QosPortRange `json:"sourcePortRanges,omitempty"`
11866	// DestinationPortRanges - Destination port ranges.
11867	DestinationPortRanges *[]QosPortRange `json:"destinationPortRanges,omitempty"`
11868	// Protocol - RNM supported protocol types. Possible values include: 'ProtocolTypeDoNotUse', 'ProtocolTypeIcmp', 'ProtocolTypeTCP', 'ProtocolTypeUDP', 'ProtocolTypeGre', 'ProtocolTypeEsp', 'ProtocolTypeAh', 'ProtocolTypeVxlan', 'ProtocolTypeAll'
11869	Protocol ProtocolType `json:"protocol,omitempty"`
11870	// QosCollectionID - READ-ONLY; Qos Collection ID generated by RNM.
11871	QosCollectionID *string `json:"qosCollectionId,omitempty"`
11872	// AssociatedNetworkInterfaces - READ-ONLY; Associated Network Interfaces to the DSCP Configuration.
11873	AssociatedNetworkInterfaces *[]Interface `json:"associatedNetworkInterfaces,omitempty"`
11874	// ResourceGUID - READ-ONLY; The resource GUID property of the DSCP Configuration resource.
11875	ResourceGUID *string `json:"resourceGuid,omitempty"`
11876	// ProvisioningState - READ-ONLY; The provisioning state of the DSCP Configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
11877	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11878}
11879
11880// MarshalJSON is the custom marshaler for DscpConfigurationPropertiesFormat.
11881func (dcpf DscpConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
11882	objectMap := make(map[string]interface{})
11883	if dcpf.Markings != nil {
11884		objectMap["markings"] = dcpf.Markings
11885	}
11886	if dcpf.SourceIPRanges != nil {
11887		objectMap["sourceIpRanges"] = dcpf.SourceIPRanges
11888	}
11889	if dcpf.DestinationIPRanges != nil {
11890		objectMap["destinationIpRanges"] = dcpf.DestinationIPRanges
11891	}
11892	if dcpf.SourcePortRanges != nil {
11893		objectMap["sourcePortRanges"] = dcpf.SourcePortRanges
11894	}
11895	if dcpf.DestinationPortRanges != nil {
11896		objectMap["destinationPortRanges"] = dcpf.DestinationPortRanges
11897	}
11898	if dcpf.Protocol != "" {
11899		objectMap["protocol"] = dcpf.Protocol
11900	}
11901	return json.Marshal(objectMap)
11902}
11903
11904// EffectiveNetworkSecurityGroup effective network security group.
11905type EffectiveNetworkSecurityGroup struct {
11906	// NetworkSecurityGroup - The ID of network security group that is applied.
11907	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
11908	// Association - Associated resources.
11909	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
11910	// EffectiveSecurityRules - A collection of effective security rules.
11911	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
11912	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
11913	TagMap map[string][]string `json:"tagMap"`
11914}
11915
11916// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
11917func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
11918	objectMap := make(map[string]interface{})
11919	if ensg.NetworkSecurityGroup != nil {
11920		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
11921	}
11922	if ensg.Association != nil {
11923		objectMap["association"] = ensg.Association
11924	}
11925	if ensg.EffectiveSecurityRules != nil {
11926		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
11927	}
11928	if ensg.TagMap != nil {
11929		objectMap["tagMap"] = ensg.TagMap
11930	}
11931	return json.Marshal(objectMap)
11932}
11933
11934// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
11935type EffectiveNetworkSecurityGroupAssociation struct {
11936	// Subnet - The ID of the subnet if assigned.
11937	Subnet *SubResource `json:"subnet,omitempty"`
11938	// NetworkInterface - The ID of the network interface if assigned.
11939	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
11940}
11941
11942// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
11943// call.
11944type EffectiveNetworkSecurityGroupListResult struct {
11945	autorest.Response `json:"-"`
11946	// Value - A list of effective network security groups.
11947	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
11948	// NextLink - READ-ONLY; The URL to get the next set of results.
11949	NextLink *string `json:"nextLink,omitempty"`
11950}
11951
11952// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
11953func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
11954	objectMap := make(map[string]interface{})
11955	if ensglr.Value != nil {
11956		objectMap["value"] = ensglr.Value
11957	}
11958	return json.Marshal(objectMap)
11959}
11960
11961// EffectiveNetworkSecurityRule effective network security rules.
11962type EffectiveNetworkSecurityRule struct {
11963	// Name - The name of the security rule specified by the user (if created by the user).
11964	Name *string `json:"name,omitempty"`
11965	// Protocol - The network protocol this rule applies to. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
11966	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
11967	// SourcePortRange - The source port or range.
11968	SourcePortRange *string `json:"sourcePortRange,omitempty"`
11969	// DestinationPortRange - The destination port or range.
11970	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
11971	// 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 (*).
11972	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
11973	// 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 (*).
11974	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
11975	// SourceAddressPrefix - The source address prefix.
11976	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
11977	// DestinationAddressPrefix - The destination address prefix.
11978	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
11979	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
11980	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
11981	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
11982	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
11983	// ExpandedSourceAddressPrefix - The expanded source address prefix.
11984	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
11985	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
11986	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
11987	// Access - Whether network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
11988	Access SecurityRuleAccess `json:"access,omitempty"`
11989	// Priority - The priority of the rule.
11990	Priority *int32 `json:"priority,omitempty"`
11991	// Direction - The direction of the rule. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
11992	Direction SecurityRuleDirection `json:"direction,omitempty"`
11993}
11994
11995// EffectiveRoute effective Route.
11996type EffectiveRoute struct {
11997	// Name - The name of the user defined route. This is optional.
11998	Name *string `json:"name,omitempty"`
11999	// DisableBgpRoutePropagation - If true, on-premises routes are not propagated to the network interfaces in the subnet.
12000	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
12001	// Source - Who created the route. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
12002	Source EffectiveRouteSource `json:"source,omitempty"`
12003	// State - The value of effective route. Possible values include: 'EffectiveRouteStateActive', 'EffectiveRouteStateInvalid'
12004	State EffectiveRouteState `json:"state,omitempty"`
12005	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
12006	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
12007	// NextHopIPAddress - The IP address of the next hop of the effective route.
12008	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
12009	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
12010	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
12011}
12012
12013// EffectiveRouteListResult response for list effective route API service call.
12014type EffectiveRouteListResult struct {
12015	autorest.Response `json:"-"`
12016	// Value - A list of effective routes.
12017	Value *[]EffectiveRoute `json:"value,omitempty"`
12018	// NextLink - READ-ONLY; The URL to get the next set of results.
12019	NextLink *string `json:"nextLink,omitempty"`
12020}
12021
12022// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
12023func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
12024	objectMap := make(map[string]interface{})
12025	if erlr.Value != nil {
12026		objectMap["value"] = erlr.Value
12027	}
12028	return json.Marshal(objectMap)
12029}
12030
12031// EffectiveRoutesParameters the parameters specifying the resource whose effective routes are being
12032// requested.
12033type EffectiveRoutesParameters struct {
12034	// ResourceID - The resource whose effective routes are being requested.
12035	ResourceID *string `json:"resourceId,omitempty"`
12036	// VirtualWanResourceType - The type of the specified resource like RouteTable, ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection and P2SConnection.
12037	VirtualWanResourceType *string `json:"virtualWanResourceType,omitempty"`
12038}
12039
12040// EndpointServiceResult endpoint service.
12041type EndpointServiceResult struct {
12042	// Name - READ-ONLY; Name of the endpoint service.
12043	Name *string `json:"name,omitempty"`
12044	// Type - READ-ONLY; Type of the endpoint service.
12045	Type *string `json:"type,omitempty"`
12046	// ID - Resource ID.
12047	ID *string `json:"id,omitempty"`
12048}
12049
12050// MarshalJSON is the custom marshaler for EndpointServiceResult.
12051func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
12052	objectMap := make(map[string]interface{})
12053	if esr.ID != nil {
12054		objectMap["id"] = esr.ID
12055	}
12056	return json.Marshal(objectMap)
12057}
12058
12059// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
12060type EndpointServicesListResult struct {
12061	autorest.Response `json:"-"`
12062	// Value - List of available endpoint services in a region.
12063	Value *[]EndpointServiceResult `json:"value,omitempty"`
12064	// NextLink - The URL to get the next set of results.
12065	NextLink *string `json:"nextLink,omitempty"`
12066}
12067
12068// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
12069// values.
12070type EndpointServicesListResultIterator struct {
12071	i    int
12072	page EndpointServicesListResultPage
12073}
12074
12075// NextWithContext advances to the next value.  If there was an error making
12076// the request the iterator does not advance and the error is returned.
12077func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
12078	if tracing.IsEnabled() {
12079		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
12080		defer func() {
12081			sc := -1
12082			if iter.Response().Response.Response != nil {
12083				sc = iter.Response().Response.Response.StatusCode
12084			}
12085			tracing.EndSpan(ctx, sc, err)
12086		}()
12087	}
12088	iter.i++
12089	if iter.i < len(iter.page.Values()) {
12090		return nil
12091	}
12092	err = iter.page.NextWithContext(ctx)
12093	if err != nil {
12094		iter.i--
12095		return err
12096	}
12097	iter.i = 0
12098	return nil
12099}
12100
12101// Next advances to the next value.  If there was an error making
12102// the request the iterator does not advance and the error is returned.
12103// Deprecated: Use NextWithContext() instead.
12104func (iter *EndpointServicesListResultIterator) Next() error {
12105	return iter.NextWithContext(context.Background())
12106}
12107
12108// NotDone returns true if the enumeration should be started or is not yet complete.
12109func (iter EndpointServicesListResultIterator) NotDone() bool {
12110	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12111}
12112
12113// Response returns the raw server response from the last page request.
12114func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
12115	return iter.page.Response()
12116}
12117
12118// Value returns the current value or a zero-initialized value if the
12119// iterator has advanced beyond the end of the collection.
12120func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
12121	if !iter.page.NotDone() {
12122		return EndpointServiceResult{}
12123	}
12124	return iter.page.Values()[iter.i]
12125}
12126
12127// Creates a new instance of the EndpointServicesListResultIterator type.
12128func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
12129	return EndpointServicesListResultIterator{page: page}
12130}
12131
12132// IsEmpty returns true if the ListResult contains no values.
12133func (eslr EndpointServicesListResult) IsEmpty() bool {
12134	return eslr.Value == nil || len(*eslr.Value) == 0
12135}
12136
12137// hasNextLink returns true if the NextLink is not empty.
12138func (eslr EndpointServicesListResult) hasNextLink() bool {
12139	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
12140}
12141
12142// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
12143// It returns nil if no more results exist.
12144func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
12145	if !eslr.hasNextLink() {
12146		return nil, nil
12147	}
12148	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12149		autorest.AsJSON(),
12150		autorest.AsGet(),
12151		autorest.WithBaseURL(to.String(eslr.NextLink)))
12152}
12153
12154// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
12155type EndpointServicesListResultPage struct {
12156	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
12157	eslr EndpointServicesListResult
12158}
12159
12160// NextWithContext advances to the next page of values.  If there was an error making
12161// the request the page does not advance and the error is returned.
12162func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
12163	if tracing.IsEnabled() {
12164		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
12165		defer func() {
12166			sc := -1
12167			if page.Response().Response.Response != nil {
12168				sc = page.Response().Response.Response.StatusCode
12169			}
12170			tracing.EndSpan(ctx, sc, err)
12171		}()
12172	}
12173	for {
12174		next, err := page.fn(ctx, page.eslr)
12175		if err != nil {
12176			return err
12177		}
12178		page.eslr = next
12179		if !next.hasNextLink() || !next.IsEmpty() {
12180			break
12181		}
12182	}
12183	return nil
12184}
12185
12186// Next advances to the next page of values.  If there was an error making
12187// the request the page does not advance and the error is returned.
12188// Deprecated: Use NextWithContext() instead.
12189func (page *EndpointServicesListResultPage) Next() error {
12190	return page.NextWithContext(context.Background())
12191}
12192
12193// NotDone returns true if the page enumeration should be started or is not yet complete.
12194func (page EndpointServicesListResultPage) NotDone() bool {
12195	return !page.eslr.IsEmpty()
12196}
12197
12198// Response returns the raw server response from the last page request.
12199func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
12200	return page.eslr
12201}
12202
12203// Values returns the slice of values for the current page or nil if there are no values.
12204func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
12205	if page.eslr.IsEmpty() {
12206		return nil
12207	}
12208	return *page.eslr.Value
12209}
12210
12211// Creates a new instance of the EndpointServicesListResultPage type.
12212func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
12213	return EndpointServicesListResultPage{
12214		fn:   getNextPage,
12215		eslr: cur,
12216	}
12217}
12218
12219// Error common error representation.
12220type Error struct {
12221	// Code - Error code.
12222	Code *string `json:"code,omitempty"`
12223	// Message - Error message.
12224	Message *string `json:"message,omitempty"`
12225	// Target - Error target.
12226	Target *string `json:"target,omitempty"`
12227	// Details - Error details.
12228	Details *[]ErrorDetails `json:"details,omitempty"`
12229	// InnerError - Inner error message.
12230	InnerError *string `json:"innerError,omitempty"`
12231}
12232
12233// ErrorDetails common error details representation.
12234type ErrorDetails struct {
12235	// Code - Error code.
12236	Code *string `json:"code,omitempty"`
12237	// Target - Error target.
12238	Target *string `json:"target,omitempty"`
12239	// Message - Error message.
12240	Message *string `json:"message,omitempty"`
12241}
12242
12243// ErrorResponse the error object.
12244type ErrorResponse struct {
12245	// Error - The error details object.
12246	Error *ErrorDetails `json:"error,omitempty"`
12247}
12248
12249// EvaluatedNetworkSecurityGroup results of network security group evaluation.
12250type EvaluatedNetworkSecurityGroup struct {
12251	// NetworkSecurityGroupID - Network security group ID.
12252	NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
12253	// AppliedTo - Resource ID of nic or subnet to which network security group is applied.
12254	AppliedTo *string `json:"appliedTo,omitempty"`
12255	// MatchedRule - Matched network security rule.
12256	MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
12257	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
12258	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
12259}
12260
12261// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
12262func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
12263	objectMap := make(map[string]interface{})
12264	if ensg.NetworkSecurityGroupID != nil {
12265		objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
12266	}
12267	if ensg.AppliedTo != nil {
12268		objectMap["appliedTo"] = ensg.AppliedTo
12269	}
12270	if ensg.MatchedRule != nil {
12271		objectMap["matchedRule"] = ensg.MatchedRule
12272	}
12273	return json.Marshal(objectMap)
12274}
12275
12276// ExpressRouteCircuit expressRouteCircuit resource.
12277type ExpressRouteCircuit struct {
12278	autorest.Response `json:"-"`
12279	// Sku - The SKU.
12280	Sku *ExpressRouteCircuitSku `json:"sku,omitempty"`
12281	// ExpressRouteCircuitPropertiesFormat - Properties of the express route circuit.
12282	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
12283	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12284	Etag *string `json:"etag,omitempty"`
12285	// ID - Resource ID.
12286	ID *string `json:"id,omitempty"`
12287	// Name - READ-ONLY; Resource name.
12288	Name *string `json:"name,omitempty"`
12289	// Type - READ-ONLY; Resource type.
12290	Type *string `json:"type,omitempty"`
12291	// Location - Resource location.
12292	Location *string `json:"location,omitempty"`
12293	// Tags - Resource tags.
12294	Tags map[string]*string `json:"tags"`
12295}
12296
12297// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
12298func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
12299	objectMap := make(map[string]interface{})
12300	if erc.Sku != nil {
12301		objectMap["sku"] = erc.Sku
12302	}
12303	if erc.ExpressRouteCircuitPropertiesFormat != nil {
12304		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
12305	}
12306	if erc.ID != nil {
12307		objectMap["id"] = erc.ID
12308	}
12309	if erc.Location != nil {
12310		objectMap["location"] = erc.Location
12311	}
12312	if erc.Tags != nil {
12313		objectMap["tags"] = erc.Tags
12314	}
12315	return json.Marshal(objectMap)
12316}
12317
12318// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
12319func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
12320	var m map[string]*json.RawMessage
12321	err := json.Unmarshal(body, &m)
12322	if err != nil {
12323		return err
12324	}
12325	for k, v := range m {
12326		switch k {
12327		case "sku":
12328			if v != nil {
12329				var sku ExpressRouteCircuitSku
12330				err = json.Unmarshal(*v, &sku)
12331				if err != nil {
12332					return err
12333				}
12334				erc.Sku = &sku
12335			}
12336		case "properties":
12337			if v != nil {
12338				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
12339				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
12340				if err != nil {
12341					return err
12342				}
12343				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
12344			}
12345		case "etag":
12346			if v != nil {
12347				var etag string
12348				err = json.Unmarshal(*v, &etag)
12349				if err != nil {
12350					return err
12351				}
12352				erc.Etag = &etag
12353			}
12354		case "id":
12355			if v != nil {
12356				var ID string
12357				err = json.Unmarshal(*v, &ID)
12358				if err != nil {
12359					return err
12360				}
12361				erc.ID = &ID
12362			}
12363		case "name":
12364			if v != nil {
12365				var name string
12366				err = json.Unmarshal(*v, &name)
12367				if err != nil {
12368					return err
12369				}
12370				erc.Name = &name
12371			}
12372		case "type":
12373			if v != nil {
12374				var typeVar string
12375				err = json.Unmarshal(*v, &typeVar)
12376				if err != nil {
12377					return err
12378				}
12379				erc.Type = &typeVar
12380			}
12381		case "location":
12382			if v != nil {
12383				var location string
12384				err = json.Unmarshal(*v, &location)
12385				if err != nil {
12386					return err
12387				}
12388				erc.Location = &location
12389			}
12390		case "tags":
12391			if v != nil {
12392				var tags map[string]*string
12393				err = json.Unmarshal(*v, &tags)
12394				if err != nil {
12395					return err
12396				}
12397				erc.Tags = tags
12398			}
12399		}
12400	}
12401
12402	return nil
12403}
12404
12405// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
12406type ExpressRouteCircuitArpTable struct {
12407	// Age - Entry age in minutes.
12408	Age *int32 `json:"age,omitempty"`
12409	// Interface - Interface address.
12410	Interface *string `json:"interface,omitempty"`
12411	// IPAddress - The IP address.
12412	IPAddress *string `json:"ipAddress,omitempty"`
12413	// MacAddress - The MAC address.
12414	MacAddress *string `json:"macAddress,omitempty"`
12415}
12416
12417// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
12418type ExpressRouteCircuitAuthorization struct {
12419	autorest.Response `json:"-"`
12420	// AuthorizationPropertiesFormat - Properties of the express route circuit authorization.
12421	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
12422	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12423	Name *string `json:"name,omitempty"`
12424	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12425	Etag *string `json:"etag,omitempty"`
12426	// Type - READ-ONLY; Type of the resource.
12427	Type *string `json:"type,omitempty"`
12428	// ID - Resource ID.
12429	ID *string `json:"id,omitempty"`
12430}
12431
12432// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
12433func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
12434	objectMap := make(map[string]interface{})
12435	if erca.AuthorizationPropertiesFormat != nil {
12436		objectMap["properties"] = erca.AuthorizationPropertiesFormat
12437	}
12438	if erca.Name != nil {
12439		objectMap["name"] = erca.Name
12440	}
12441	if erca.ID != nil {
12442		objectMap["id"] = erca.ID
12443	}
12444	return json.Marshal(objectMap)
12445}
12446
12447// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
12448func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
12449	var m map[string]*json.RawMessage
12450	err := json.Unmarshal(body, &m)
12451	if err != nil {
12452		return err
12453	}
12454	for k, v := range m {
12455		switch k {
12456		case "properties":
12457			if v != nil {
12458				var authorizationPropertiesFormat AuthorizationPropertiesFormat
12459				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
12460				if err != nil {
12461					return err
12462				}
12463				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
12464			}
12465		case "name":
12466			if v != nil {
12467				var name string
12468				err = json.Unmarshal(*v, &name)
12469				if err != nil {
12470					return err
12471				}
12472				erca.Name = &name
12473			}
12474		case "etag":
12475			if v != nil {
12476				var etag string
12477				err = json.Unmarshal(*v, &etag)
12478				if err != nil {
12479					return err
12480				}
12481				erca.Etag = &etag
12482			}
12483		case "type":
12484			if v != nil {
12485				var typeVar string
12486				err = json.Unmarshal(*v, &typeVar)
12487				if err != nil {
12488					return err
12489				}
12490				erca.Type = &typeVar
12491			}
12492		case "id":
12493			if v != nil {
12494				var ID string
12495				err = json.Unmarshal(*v, &ID)
12496				if err != nil {
12497					return err
12498				}
12499				erca.ID = &ID
12500			}
12501		}
12502	}
12503
12504	return nil
12505}
12506
12507// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
12508// results of a long-running operation.
12509type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
12510	azure.FutureAPI
12511	// Result returns the result of the asynchronous operation.
12512	// If the operation has not completed it will return an error.
12513	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
12514}
12515
12516// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12517func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12518	var azFuture azure.Future
12519	if err := json.Unmarshal(body, &azFuture); err != nil {
12520		return err
12521	}
12522	future.FutureAPI = &azFuture
12523	future.Result = future.result
12524	return nil
12525}
12526
12527// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result.
12528func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
12529	var done bool
12530	done, err = future.DoneWithContext(context.Background(), client)
12531	if err != nil {
12532		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12533		return
12534	}
12535	if !done {
12536		erca.Response.Response = future.Response()
12537		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
12538		return
12539	}
12540	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12541	if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
12542		erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
12543		if err != nil {
12544			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
12545		}
12546	}
12547	return
12548}
12549
12550// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
12551// of a long-running operation.
12552type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
12553	azure.FutureAPI
12554	// Result returns the result of the asynchronous operation.
12555	// If the operation has not completed it will return an error.
12556	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
12557}
12558
12559// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12560func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error {
12561	var azFuture azure.Future
12562	if err := json.Unmarshal(body, &azFuture); err != nil {
12563		return err
12564	}
12565	future.FutureAPI = &azFuture
12566	future.Result = future.result
12567	return nil
12568}
12569
12570// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result.
12571func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
12572	var done bool
12573	done, err = future.DoneWithContext(context.Background(), client)
12574	if err != nil {
12575		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
12576		return
12577	}
12578	if !done {
12579		ar.Response = future.Response()
12580		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
12581		return
12582	}
12583	ar.Response = future.Response()
12584	return
12585}
12586
12587// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
12588// resource.
12589type ExpressRouteCircuitConnection struct {
12590	autorest.Response `json:"-"`
12591	// ExpressRouteCircuitConnectionPropertiesFormat - Properties of the express route circuit connection.
12592	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
12593	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12594	Name *string `json:"name,omitempty"`
12595	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12596	Etag *string `json:"etag,omitempty"`
12597	// Type - READ-ONLY; Type of the resource.
12598	Type *string `json:"type,omitempty"`
12599	// ID - Resource ID.
12600	ID *string `json:"id,omitempty"`
12601}
12602
12603// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
12604func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
12605	objectMap := make(map[string]interface{})
12606	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
12607		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
12608	}
12609	if ercc.Name != nil {
12610		objectMap["name"] = ercc.Name
12611	}
12612	if ercc.ID != nil {
12613		objectMap["id"] = ercc.ID
12614	}
12615	return json.Marshal(objectMap)
12616}
12617
12618// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
12619func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
12620	var m map[string]*json.RawMessage
12621	err := json.Unmarshal(body, &m)
12622	if err != nil {
12623		return err
12624	}
12625	for k, v := range m {
12626		switch k {
12627		case "properties":
12628			if v != nil {
12629				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
12630				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
12631				if err != nil {
12632					return err
12633				}
12634				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
12635			}
12636		case "name":
12637			if v != nil {
12638				var name string
12639				err = json.Unmarshal(*v, &name)
12640				if err != nil {
12641					return err
12642				}
12643				ercc.Name = &name
12644			}
12645		case "etag":
12646			if v != nil {
12647				var etag string
12648				err = json.Unmarshal(*v, &etag)
12649				if err != nil {
12650					return err
12651				}
12652				ercc.Etag = &etag
12653			}
12654		case "type":
12655			if v != nil {
12656				var typeVar string
12657				err = json.Unmarshal(*v, &typeVar)
12658				if err != nil {
12659					return err
12660				}
12661				ercc.Type = &typeVar
12662			}
12663		case "id":
12664			if v != nil {
12665				var ID string
12666				err = json.Unmarshal(*v, &ID)
12667				if err != nil {
12668					return err
12669				}
12670				ercc.ID = &ID
12671			}
12672		}
12673	}
12674
12675	return nil
12676}
12677
12678// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all
12679// global reach connections that belongs to a Private Peering for an ExpressRouteCircuit.
12680type ExpressRouteCircuitConnectionListResult struct {
12681	autorest.Response `json:"-"`
12682	// Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit.
12683	Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"`
12684	// NextLink - The URL to get the next set of results.
12685	NextLink *string `json:"nextLink,omitempty"`
12686}
12687
12688// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
12689// ExpressRouteCircuitConnection values.
12690type ExpressRouteCircuitConnectionListResultIterator struct {
12691	i    int
12692	page ExpressRouteCircuitConnectionListResultPage
12693}
12694
12695// NextWithContext advances to the next value.  If there was an error making
12696// the request the iterator does not advance and the error is returned.
12697func (iter *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
12698	if tracing.IsEnabled() {
12699		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.NextWithContext")
12700		defer func() {
12701			sc := -1
12702			if iter.Response().Response.Response != nil {
12703				sc = iter.Response().Response.Response.StatusCode
12704			}
12705			tracing.EndSpan(ctx, sc, err)
12706		}()
12707	}
12708	iter.i++
12709	if iter.i < len(iter.page.Values()) {
12710		return nil
12711	}
12712	err = iter.page.NextWithContext(ctx)
12713	if err != nil {
12714		iter.i--
12715		return err
12716	}
12717	iter.i = 0
12718	return nil
12719}
12720
12721// Next advances to the next value.  If there was an error making
12722// the request the iterator does not advance and the error is returned.
12723// Deprecated: Use NextWithContext() instead.
12724func (iter *ExpressRouteCircuitConnectionListResultIterator) Next() error {
12725	return iter.NextWithContext(context.Background())
12726}
12727
12728// NotDone returns true if the enumeration should be started or is not yet complete.
12729func (iter ExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
12730	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12731}
12732
12733// Response returns the raw server response from the last page request.
12734func (iter ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult {
12735	return iter.page.Response()
12736}
12737
12738// Value returns the current value or a zero-initialized value if the
12739// iterator has advanced beyond the end of the collection.
12740func (iter ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection {
12741	if !iter.page.NotDone() {
12742		return ExpressRouteCircuitConnection{}
12743	}
12744	return iter.page.Values()[iter.i]
12745}
12746
12747// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type.
12748func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator {
12749	return ExpressRouteCircuitConnectionListResultIterator{page: page}
12750}
12751
12752// IsEmpty returns true if the ListResult contains no values.
12753func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool {
12754	return ercclr.Value == nil || len(*ercclr.Value) == 0
12755}
12756
12757// hasNextLink returns true if the NextLink is not empty.
12758func (ercclr ExpressRouteCircuitConnectionListResult) hasNextLink() bool {
12759	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
12760}
12761
12762// expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
12763// It returns nil if no more results exist.
12764func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
12765	if !ercclr.hasNextLink() {
12766		return nil, nil
12767	}
12768	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12769		autorest.AsJSON(),
12770		autorest.AsGet(),
12771		autorest.WithBaseURL(to.String(ercclr.NextLink)))
12772}
12773
12774// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values.
12775type ExpressRouteCircuitConnectionListResultPage struct {
12776	fn     func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)
12777	ercclr ExpressRouteCircuitConnectionListResult
12778}
12779
12780// NextWithContext advances to the next page of values.  If there was an error making
12781// the request the page does not advance and the error is returned.
12782func (page *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
12783	if tracing.IsEnabled() {
12784		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.NextWithContext")
12785		defer func() {
12786			sc := -1
12787			if page.Response().Response.Response != nil {
12788				sc = page.Response().Response.Response.StatusCode
12789			}
12790			tracing.EndSpan(ctx, sc, err)
12791		}()
12792	}
12793	for {
12794		next, err := page.fn(ctx, page.ercclr)
12795		if err != nil {
12796			return err
12797		}
12798		page.ercclr = next
12799		if !next.hasNextLink() || !next.IsEmpty() {
12800			break
12801		}
12802	}
12803	return nil
12804}
12805
12806// Next advances to the next page of values.  If there was an error making
12807// the request the page does not advance and the error is returned.
12808// Deprecated: Use NextWithContext() instead.
12809func (page *ExpressRouteCircuitConnectionListResultPage) Next() error {
12810	return page.NextWithContext(context.Background())
12811}
12812
12813// NotDone returns true if the page enumeration should be started or is not yet complete.
12814func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool {
12815	return !page.ercclr.IsEmpty()
12816}
12817
12818// Response returns the raw server response from the last page request.
12819func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult {
12820	return page.ercclr
12821}
12822
12823// Values returns the slice of values for the current page or nil if there are no values.
12824func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection {
12825	if page.ercclr.IsEmpty() {
12826		return nil
12827	}
12828	return *page.ercclr.Value
12829}
12830
12831// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type.
12832func NewExpressRouteCircuitConnectionListResultPage(cur ExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage {
12833	return ExpressRouteCircuitConnectionListResultPage{
12834		fn:     getNextPage,
12835		ercclr: cur,
12836	}
12837}
12838
12839// ExpressRouteCircuitConnectionPropertiesFormat properties of the express route circuit connection.
12840type ExpressRouteCircuitConnectionPropertiesFormat struct {
12841	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
12842	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
12843	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
12844	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
12845	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
12846	AddressPrefix *string `json:"addressPrefix,omitempty"`
12847	// AuthorizationKey - The authorization key.
12848	AuthorizationKey *string `json:"authorizationKey,omitempty"`
12849	// Ipv6CircuitConnectionConfig - IPv6 Address PrefixProperties of the express route circuit connection.
12850	Ipv6CircuitConnectionConfig *Ipv6CircuitConnectionConfig `json:"ipv6CircuitConnectionConfig,omitempty"`
12851	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'CircuitConnectionStatusConnected', 'CircuitConnectionStatusConnecting', 'CircuitConnectionStatusDisconnected'
12852	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
12853	// ProvisioningState - READ-ONLY; The provisioning state of the express route circuit connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
12854	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12855}
12856
12857// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
12858func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
12859	objectMap := make(map[string]interface{})
12860	if erccpf.ExpressRouteCircuitPeering != nil {
12861		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
12862	}
12863	if erccpf.PeerExpressRouteCircuitPeering != nil {
12864		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
12865	}
12866	if erccpf.AddressPrefix != nil {
12867		objectMap["addressPrefix"] = erccpf.AddressPrefix
12868	}
12869	if erccpf.AuthorizationKey != nil {
12870		objectMap["authorizationKey"] = erccpf.AuthorizationKey
12871	}
12872	if erccpf.Ipv6CircuitConnectionConfig != nil {
12873		objectMap["ipv6CircuitConnectionConfig"] = erccpf.Ipv6CircuitConnectionConfig
12874	}
12875	if erccpf.CircuitConnectionStatus != "" {
12876		objectMap["circuitConnectionStatus"] = erccpf.CircuitConnectionStatus
12877	}
12878	return json.Marshal(objectMap)
12879}
12880
12881// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
12882// results of a long-running operation.
12883type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
12884	azure.FutureAPI
12885	// Result returns the result of the asynchronous operation.
12886	// If the operation has not completed it will return an error.
12887	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
12888}
12889
12890// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12891func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12892	var azFuture azure.Future
12893	if err := json.Unmarshal(body, &azFuture); err != nil {
12894		return err
12895	}
12896	future.FutureAPI = &azFuture
12897	future.Result = future.result
12898	return nil
12899}
12900
12901// result is the default implementation for ExpressRouteCircuitConnectionsCreateOrUpdateFuture.Result.
12902func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
12903	var done bool
12904	done, err = future.DoneWithContext(context.Background(), client)
12905	if err != nil {
12906		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12907		return
12908	}
12909	if !done {
12910		ercc.Response.Response = future.Response()
12911		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
12912		return
12913	}
12914	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12915	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
12916		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
12917		if err != nil {
12918			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
12919		}
12920	}
12921	return
12922}
12923
12924// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
12925// long-running operation.
12926type ExpressRouteCircuitConnectionsDeleteFuture struct {
12927	azure.FutureAPI
12928	// Result returns the result of the asynchronous operation.
12929	// If the operation has not completed it will return an error.
12930	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
12931}
12932
12933// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12934func (future *ExpressRouteCircuitConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
12935	var azFuture azure.Future
12936	if err := json.Unmarshal(body, &azFuture); err != nil {
12937		return err
12938	}
12939	future.FutureAPI = &azFuture
12940	future.Result = future.result
12941	return nil
12942}
12943
12944// result is the default implementation for ExpressRouteCircuitConnectionsDeleteFuture.Result.
12945func (future *ExpressRouteCircuitConnectionsDeleteFuture) result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
12946	var done bool
12947	done, err = future.DoneWithContext(context.Background(), client)
12948	if err != nil {
12949		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
12950		return
12951	}
12952	if !done {
12953		ar.Response = future.Response()
12954		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
12955		return
12956	}
12957	ar.Response = future.Response()
12958	return
12959}
12960
12961// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
12962type ExpressRouteCircuitListResult struct {
12963	autorest.Response `json:"-"`
12964	// Value - A list of ExpressRouteCircuits in a resource group.
12965	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
12966	// NextLink - The URL to get the next set of results.
12967	NextLink *string `json:"nextLink,omitempty"`
12968}
12969
12970// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
12971// values.
12972type ExpressRouteCircuitListResultIterator struct {
12973	i    int
12974	page ExpressRouteCircuitListResultPage
12975}
12976
12977// NextWithContext advances to the next value.  If there was an error making
12978// the request the iterator does not advance and the error is returned.
12979func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
12980	if tracing.IsEnabled() {
12981		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
12982		defer func() {
12983			sc := -1
12984			if iter.Response().Response.Response != nil {
12985				sc = iter.Response().Response.Response.StatusCode
12986			}
12987			tracing.EndSpan(ctx, sc, err)
12988		}()
12989	}
12990	iter.i++
12991	if iter.i < len(iter.page.Values()) {
12992		return nil
12993	}
12994	err = iter.page.NextWithContext(ctx)
12995	if err != nil {
12996		iter.i--
12997		return err
12998	}
12999	iter.i = 0
13000	return nil
13001}
13002
13003// Next advances to the next value.  If there was an error making
13004// the request the iterator does not advance and the error is returned.
13005// Deprecated: Use NextWithContext() instead.
13006func (iter *ExpressRouteCircuitListResultIterator) Next() error {
13007	return iter.NextWithContext(context.Background())
13008}
13009
13010// NotDone returns true if the enumeration should be started or is not yet complete.
13011func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
13012	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13013}
13014
13015// Response returns the raw server response from the last page request.
13016func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
13017	return iter.page.Response()
13018}
13019
13020// Value returns the current value or a zero-initialized value if the
13021// iterator has advanced beyond the end of the collection.
13022func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
13023	if !iter.page.NotDone() {
13024		return ExpressRouteCircuit{}
13025	}
13026	return iter.page.Values()[iter.i]
13027}
13028
13029// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
13030func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
13031	return ExpressRouteCircuitListResultIterator{page: page}
13032}
13033
13034// IsEmpty returns true if the ListResult contains no values.
13035func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
13036	return erclr.Value == nil || len(*erclr.Value) == 0
13037}
13038
13039// hasNextLink returns true if the NextLink is not empty.
13040func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
13041	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
13042}
13043
13044// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
13045// It returns nil if no more results exist.
13046func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
13047	if !erclr.hasNextLink() {
13048		return nil, nil
13049	}
13050	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13051		autorest.AsJSON(),
13052		autorest.AsGet(),
13053		autorest.WithBaseURL(to.String(erclr.NextLink)))
13054}
13055
13056// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
13057type ExpressRouteCircuitListResultPage struct {
13058	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
13059	erclr ExpressRouteCircuitListResult
13060}
13061
13062// NextWithContext advances to the next page of values.  If there was an error making
13063// the request the page does not advance and the error is returned.
13064func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
13065	if tracing.IsEnabled() {
13066		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
13067		defer func() {
13068			sc := -1
13069			if page.Response().Response.Response != nil {
13070				sc = page.Response().Response.Response.StatusCode
13071			}
13072			tracing.EndSpan(ctx, sc, err)
13073		}()
13074	}
13075	for {
13076		next, err := page.fn(ctx, page.erclr)
13077		if err != nil {
13078			return err
13079		}
13080		page.erclr = next
13081		if !next.hasNextLink() || !next.IsEmpty() {
13082			break
13083		}
13084	}
13085	return nil
13086}
13087
13088// Next advances to the next page of values.  If there was an error making
13089// the request the page does not advance and the error is returned.
13090// Deprecated: Use NextWithContext() instead.
13091func (page *ExpressRouteCircuitListResultPage) Next() error {
13092	return page.NextWithContext(context.Background())
13093}
13094
13095// NotDone returns true if the page enumeration should be started or is not yet complete.
13096func (page ExpressRouteCircuitListResultPage) NotDone() bool {
13097	return !page.erclr.IsEmpty()
13098}
13099
13100// Response returns the raw server response from the last page request.
13101func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
13102	return page.erclr
13103}
13104
13105// Values returns the slice of values for the current page or nil if there are no values.
13106func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
13107	if page.erclr.IsEmpty() {
13108		return nil
13109	}
13110	return *page.erclr.Value
13111}
13112
13113// Creates a new instance of the ExpressRouteCircuitListResultPage type.
13114func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
13115	return ExpressRouteCircuitListResultPage{
13116		fn:    getNextPage,
13117		erclr: cur,
13118	}
13119}
13120
13121// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
13122type ExpressRouteCircuitPeering struct {
13123	autorest.Response `json:"-"`
13124	// ExpressRouteCircuitPeeringPropertiesFormat - Properties of the express route circuit peering.
13125	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
13126	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13127	Name *string `json:"name,omitempty"`
13128	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
13129	Etag *string `json:"etag,omitempty"`
13130	// Type - READ-ONLY; Type of the resource.
13131	Type *string `json:"type,omitempty"`
13132	// ID - Resource ID.
13133	ID *string `json:"id,omitempty"`
13134}
13135
13136// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
13137func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
13138	objectMap := make(map[string]interface{})
13139	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
13140		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
13141	}
13142	if ercp.Name != nil {
13143		objectMap["name"] = ercp.Name
13144	}
13145	if ercp.ID != nil {
13146		objectMap["id"] = ercp.ID
13147	}
13148	return json.Marshal(objectMap)
13149}
13150
13151// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
13152func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
13153	var m map[string]*json.RawMessage
13154	err := json.Unmarshal(body, &m)
13155	if err != nil {
13156		return err
13157	}
13158	for k, v := range m {
13159		switch k {
13160		case "properties":
13161			if v != nil {
13162				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
13163				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
13164				if err != nil {
13165					return err
13166				}
13167				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
13168			}
13169		case "name":
13170			if v != nil {
13171				var name string
13172				err = json.Unmarshal(*v, &name)
13173				if err != nil {
13174					return err
13175				}
13176				ercp.Name = &name
13177			}
13178		case "etag":
13179			if v != nil {
13180				var etag string
13181				err = json.Unmarshal(*v, &etag)
13182				if err != nil {
13183					return err
13184				}
13185				ercp.Etag = &etag
13186			}
13187		case "type":
13188			if v != nil {
13189				var typeVar string
13190				err = json.Unmarshal(*v, &typeVar)
13191				if err != nil {
13192					return err
13193				}
13194				ercp.Type = &typeVar
13195			}
13196		case "id":
13197			if v != nil {
13198				var ID string
13199				err = json.Unmarshal(*v, &ID)
13200				if err != nil {
13201					return err
13202				}
13203				ercp.ID = &ID
13204			}
13205		}
13206	}
13207
13208	return nil
13209}
13210
13211// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
13212type ExpressRouteCircuitPeeringConfig struct {
13213	// AdvertisedPublicPrefixes - The reference to AdvertisedPublicPrefixes.
13214	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
13215	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering.
13216	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
13217	// AdvertisedPublicPrefixesState - READ-ONLY; The advertised public prefix state of the Peering resource. Possible values include: 'ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured', 'ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring', 'ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured', 'ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded'
13218	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
13219	// LegacyMode - The legacy mode of the peering.
13220	LegacyMode *int32 `json:"legacyMode,omitempty"`
13221	// CustomerASN - The CustomerASN of the peering.
13222	CustomerASN *int32 `json:"customerASN,omitempty"`
13223	// RoutingRegistryName - The RoutingRegistryName of the configuration.
13224	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
13225}
13226
13227// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringConfig.
13228func (ercpc ExpressRouteCircuitPeeringConfig) MarshalJSON() ([]byte, error) {
13229	objectMap := make(map[string]interface{})
13230	if ercpc.AdvertisedPublicPrefixes != nil {
13231		objectMap["advertisedPublicPrefixes"] = ercpc.AdvertisedPublicPrefixes
13232	}
13233	if ercpc.AdvertisedCommunities != nil {
13234		objectMap["advertisedCommunities"] = ercpc.AdvertisedCommunities
13235	}
13236	if ercpc.LegacyMode != nil {
13237		objectMap["legacyMode"] = ercpc.LegacyMode
13238	}
13239	if ercpc.CustomerASN != nil {
13240		objectMap["customerASN"] = ercpc.CustomerASN
13241	}
13242	if ercpc.RoutingRegistryName != nil {
13243		objectMap["routingRegistryName"] = ercpc.RoutingRegistryName
13244	}
13245	return json.Marshal(objectMap)
13246}
13247
13248// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier.
13249type ExpressRouteCircuitPeeringID struct {
13250	// ID - The ID of the ExpressRoute circuit peering.
13251	ID *string `json:"id,omitempty"`
13252}
13253
13254// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
13255// that belong to an ExpressRouteCircuit.
13256type ExpressRouteCircuitPeeringListResult struct {
13257	autorest.Response `json:"-"`
13258	// Value - The peerings in an express route circuit.
13259	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
13260	// NextLink - The URL to get the next set of results.
13261	NextLink *string `json:"nextLink,omitempty"`
13262}
13263
13264// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
13265// ExpressRouteCircuitPeering values.
13266type ExpressRouteCircuitPeeringListResultIterator struct {
13267	i    int
13268	page ExpressRouteCircuitPeeringListResultPage
13269}
13270
13271// NextWithContext advances to the next value.  If there was an error making
13272// the request the iterator does not advance and the error is returned.
13273func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
13274	if tracing.IsEnabled() {
13275		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
13276		defer func() {
13277			sc := -1
13278			if iter.Response().Response.Response != nil {
13279				sc = iter.Response().Response.Response.StatusCode
13280			}
13281			tracing.EndSpan(ctx, sc, err)
13282		}()
13283	}
13284	iter.i++
13285	if iter.i < len(iter.page.Values()) {
13286		return nil
13287	}
13288	err = iter.page.NextWithContext(ctx)
13289	if err != nil {
13290		iter.i--
13291		return err
13292	}
13293	iter.i = 0
13294	return nil
13295}
13296
13297// Next advances to the next value.  If there was an error making
13298// the request the iterator does not advance and the error is returned.
13299// Deprecated: Use NextWithContext() instead.
13300func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
13301	return iter.NextWithContext(context.Background())
13302}
13303
13304// NotDone returns true if the enumeration should be started or is not yet complete.
13305func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
13306	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13307}
13308
13309// Response returns the raw server response from the last page request.
13310func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
13311	return iter.page.Response()
13312}
13313
13314// Value returns the current value or a zero-initialized value if the
13315// iterator has advanced beyond the end of the collection.
13316func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
13317	if !iter.page.NotDone() {
13318		return ExpressRouteCircuitPeering{}
13319	}
13320	return iter.page.Values()[iter.i]
13321}
13322
13323// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
13324func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
13325	return ExpressRouteCircuitPeeringListResultIterator{page: page}
13326}
13327
13328// IsEmpty returns true if the ListResult contains no values.
13329func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
13330	return ercplr.Value == nil || len(*ercplr.Value) == 0
13331}
13332
13333// hasNextLink returns true if the NextLink is not empty.
13334func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
13335	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
13336}
13337
13338// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
13339// It returns nil if no more results exist.
13340func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
13341	if !ercplr.hasNextLink() {
13342		return nil, nil
13343	}
13344	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13345		autorest.AsJSON(),
13346		autorest.AsGet(),
13347		autorest.WithBaseURL(to.String(ercplr.NextLink)))
13348}
13349
13350// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
13351type ExpressRouteCircuitPeeringListResultPage struct {
13352	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
13353	ercplr ExpressRouteCircuitPeeringListResult
13354}
13355
13356// NextWithContext advances to the next page of values.  If there was an error making
13357// the request the page does not advance and the error is returned.
13358func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
13359	if tracing.IsEnabled() {
13360		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
13361		defer func() {
13362			sc := -1
13363			if page.Response().Response.Response != nil {
13364				sc = page.Response().Response.Response.StatusCode
13365			}
13366			tracing.EndSpan(ctx, sc, err)
13367		}()
13368	}
13369	for {
13370		next, err := page.fn(ctx, page.ercplr)
13371		if err != nil {
13372			return err
13373		}
13374		page.ercplr = next
13375		if !next.hasNextLink() || !next.IsEmpty() {
13376			break
13377		}
13378	}
13379	return nil
13380}
13381
13382// Next advances to the next page of values.  If there was an error making
13383// the request the page does not advance and the error is returned.
13384// Deprecated: Use NextWithContext() instead.
13385func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
13386	return page.NextWithContext(context.Background())
13387}
13388
13389// NotDone returns true if the page enumeration should be started or is not yet complete.
13390func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
13391	return !page.ercplr.IsEmpty()
13392}
13393
13394// Response returns the raw server response from the last page request.
13395func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
13396	return page.ercplr
13397}
13398
13399// Values returns the slice of values for the current page or nil if there are no values.
13400func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
13401	if page.ercplr.IsEmpty() {
13402		return nil
13403	}
13404	return *page.ercplr.Value
13405}
13406
13407// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
13408func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
13409	return ExpressRouteCircuitPeeringListResultPage{
13410		fn:     getNextPage,
13411		ercplr: cur,
13412	}
13413}
13414
13415// ExpressRouteCircuitPeeringPropertiesFormat properties of the express route circuit peering.
13416type ExpressRouteCircuitPeeringPropertiesFormat struct {
13417	// PeeringType - The peering type. Possible values include: 'ExpressRoutePeeringTypeAzurePublicPeering', 'ExpressRoutePeeringTypeAzurePrivatePeering', 'ExpressRoutePeeringTypeMicrosoftPeering'
13418	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
13419	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
13420	State ExpressRoutePeeringState `json:"state,omitempty"`
13421	// AzureASN - The Azure ASN.
13422	AzureASN *int32 `json:"azureASN,omitempty"`
13423	// PeerASN - The peer ASN.
13424	PeerASN *int64 `json:"peerASN,omitempty"`
13425	// PrimaryPeerAddressPrefix - The primary address prefix.
13426	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
13427	// SecondaryPeerAddressPrefix - The secondary address prefix.
13428	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
13429	// PrimaryAzurePort - The primary port.
13430	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
13431	// SecondaryAzurePort - The secondary port.
13432	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
13433	// SharedKey - The shared key.
13434	SharedKey *string `json:"sharedKey,omitempty"`
13435	// VlanID - The VLAN ID.
13436	VlanID *int32 `json:"vlanId,omitempty"`
13437	// MicrosoftPeeringConfig - The Microsoft peering configuration.
13438	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
13439	// Stats - The peering stats of express route circuit.
13440	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
13441	// ProvisioningState - READ-ONLY; The provisioning state of the express route circuit peering resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
13442	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13443	// GatewayManagerEtag - The GatewayManager Etag.
13444	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
13445	// LastModifiedBy - READ-ONLY; Who was the last to modify the peering.
13446	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
13447	// RouteFilter - The reference to the RouteFilter resource.
13448	RouteFilter *SubResource `json:"routeFilter,omitempty"`
13449	// Ipv6PeeringConfig - The IPv6 peering configuration.
13450	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
13451	// ExpressRouteConnection - The ExpressRoute connection.
13452	ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"`
13453	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
13454	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
13455	// PeeredConnections - READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit.
13456	PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"`
13457}
13458
13459// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringPropertiesFormat.
13460func (ercppf ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
13461	objectMap := make(map[string]interface{})
13462	if ercppf.PeeringType != "" {
13463		objectMap["peeringType"] = ercppf.PeeringType
13464	}
13465	if ercppf.State != "" {
13466		objectMap["state"] = ercppf.State
13467	}
13468	if ercppf.AzureASN != nil {
13469		objectMap["azureASN"] = ercppf.AzureASN
13470	}
13471	if ercppf.PeerASN != nil {
13472		objectMap["peerASN"] = ercppf.PeerASN
13473	}
13474	if ercppf.PrimaryPeerAddressPrefix != nil {
13475		objectMap["primaryPeerAddressPrefix"] = ercppf.PrimaryPeerAddressPrefix
13476	}
13477	if ercppf.SecondaryPeerAddressPrefix != nil {
13478		objectMap["secondaryPeerAddressPrefix"] = ercppf.SecondaryPeerAddressPrefix
13479	}
13480	if ercppf.PrimaryAzurePort != nil {
13481		objectMap["primaryAzurePort"] = ercppf.PrimaryAzurePort
13482	}
13483	if ercppf.SecondaryAzurePort != nil {
13484		objectMap["secondaryAzurePort"] = ercppf.SecondaryAzurePort
13485	}
13486	if ercppf.SharedKey != nil {
13487		objectMap["sharedKey"] = ercppf.SharedKey
13488	}
13489	if ercppf.VlanID != nil {
13490		objectMap["vlanId"] = ercppf.VlanID
13491	}
13492	if ercppf.MicrosoftPeeringConfig != nil {
13493		objectMap["microsoftPeeringConfig"] = ercppf.MicrosoftPeeringConfig
13494	}
13495	if ercppf.Stats != nil {
13496		objectMap["stats"] = ercppf.Stats
13497	}
13498	if ercppf.GatewayManagerEtag != nil {
13499		objectMap["gatewayManagerEtag"] = ercppf.GatewayManagerEtag
13500	}
13501	if ercppf.RouteFilter != nil {
13502		objectMap["routeFilter"] = ercppf.RouteFilter
13503	}
13504	if ercppf.Ipv6PeeringConfig != nil {
13505		objectMap["ipv6PeeringConfig"] = ercppf.Ipv6PeeringConfig
13506	}
13507	if ercppf.ExpressRouteConnection != nil {
13508		objectMap["expressRouteConnection"] = ercppf.ExpressRouteConnection
13509	}
13510	if ercppf.Connections != nil {
13511		objectMap["connections"] = ercppf.Connections
13512	}
13513	return json.Marshal(objectMap)
13514}
13515
13516// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
13517// of a long-running operation.
13518type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
13519	azure.FutureAPI
13520	// Result returns the result of the asynchronous operation.
13521	// If the operation has not completed it will return an error.
13522	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
13523}
13524
13525// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13526func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13527	var azFuture azure.Future
13528	if err := json.Unmarshal(body, &azFuture); err != nil {
13529		return err
13530	}
13531	future.FutureAPI = &azFuture
13532	future.Result = future.result
13533	return nil
13534}
13535
13536// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result.
13537func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
13538	var done bool
13539	done, err = future.DoneWithContext(context.Background(), client)
13540	if err != nil {
13541		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13542		return
13543	}
13544	if !done {
13545		ercp.Response.Response = future.Response()
13546		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
13547		return
13548	}
13549	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13550	if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
13551		ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
13552		if err != nil {
13553			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
13554		}
13555	}
13556	return
13557}
13558
13559// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
13560// long-running operation.
13561type ExpressRouteCircuitPeeringsDeleteFuture struct {
13562	azure.FutureAPI
13563	// Result returns the result of the asynchronous operation.
13564	// If the operation has not completed it will return an error.
13565	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
13566}
13567
13568// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13569func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
13570	var azFuture azure.Future
13571	if err := json.Unmarshal(body, &azFuture); err != nil {
13572		return err
13573	}
13574	future.FutureAPI = &azFuture
13575	future.Result = future.result
13576	return nil
13577}
13578
13579// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result.
13580func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
13581	var done bool
13582	done, err = future.DoneWithContext(context.Background(), client)
13583	if err != nil {
13584		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
13585		return
13586	}
13587	if !done {
13588		ar.Response = future.Response()
13589		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
13590		return
13591	}
13592	ar.Response = future.Response()
13593	return
13594}
13595
13596// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
13597type ExpressRouteCircuitPropertiesFormat struct {
13598	// AllowClassicOperations - Allow classic operations.
13599	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
13600	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
13601	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
13602	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values include: 'ServiceProviderProvisioningStateNotProvisioned', 'ServiceProviderProvisioningStateProvisioning', 'ServiceProviderProvisioningStateProvisioned', 'ServiceProviderProvisioningStateDeprovisioning'
13603	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
13604	// Authorizations - The list of authorizations.
13605	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
13606	// Peerings - The list of peerings.
13607	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
13608	// ServiceKey - The ServiceKey.
13609	ServiceKey *string `json:"serviceKey,omitempty"`
13610	// ServiceProviderNotes - The ServiceProviderNotes.
13611	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
13612	// ServiceProviderProperties - The ServiceProviderProperties.
13613	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
13614	// ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.
13615	ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"`
13616	// BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.
13617	BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"`
13618	// Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation.
13619	Stag *int32 `json:"stag,omitempty"`
13620	// ProvisioningState - READ-ONLY; The provisioning state of the express route circuit resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
13621	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13622	// GatewayManagerEtag - The GatewayManager Etag.
13623	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
13624	// GlobalReachEnabled - Flag denoting global reach status.
13625	GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"`
13626}
13627
13628// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat.
13629func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) {
13630	objectMap := make(map[string]interface{})
13631	if ercpf.AllowClassicOperations != nil {
13632		objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations
13633	}
13634	if ercpf.CircuitProvisioningState != nil {
13635		objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState
13636	}
13637	if ercpf.ServiceProviderProvisioningState != "" {
13638		objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState
13639	}
13640	if ercpf.Authorizations != nil {
13641		objectMap["authorizations"] = ercpf.Authorizations
13642	}
13643	if ercpf.Peerings != nil {
13644		objectMap["peerings"] = ercpf.Peerings
13645	}
13646	if ercpf.ServiceKey != nil {
13647		objectMap["serviceKey"] = ercpf.ServiceKey
13648	}
13649	if ercpf.ServiceProviderNotes != nil {
13650		objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes
13651	}
13652	if ercpf.ServiceProviderProperties != nil {
13653		objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties
13654	}
13655	if ercpf.ExpressRoutePort != nil {
13656		objectMap["expressRoutePort"] = ercpf.ExpressRoutePort
13657	}
13658	if ercpf.BandwidthInGbps != nil {
13659		objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps
13660	}
13661	if ercpf.GatewayManagerEtag != nil {
13662		objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag
13663	}
13664	if ercpf.GlobalReachEnabled != nil {
13665		objectMap["globalReachEnabled"] = ercpf.GlobalReachEnabled
13666	}
13667	return json.Marshal(objectMap)
13668}
13669
13670// ExpressRouteCircuitReference reference to an express route circuit.
13671type ExpressRouteCircuitReference struct {
13672	// ID - Corresponding Express Route Circuit Id.
13673	ID *string `json:"id,omitempty"`
13674}
13675
13676// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit.
13677type ExpressRouteCircuitRoutesTable struct {
13678	// NetworkProperty - IP address of a network entity.
13679	NetworkProperty *string `json:"network,omitempty"`
13680	// NextHop - NextHop address.
13681	NextHop *string `json:"nextHop,omitempty"`
13682	// LocPrf - Local preference value as set with the set local-preference route-map configuration command.
13683	LocPrf *string `json:"locPrf,omitempty"`
13684	// Weight - Route Weight.
13685	Weight *int32 `json:"weight,omitempty"`
13686	// Path - Autonomous system paths to the destination network.
13687	Path *string `json:"path,omitempty"`
13688}
13689
13690// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
13691type ExpressRouteCircuitRoutesTableSummary struct {
13692	// Neighbor - IP address of the neighbor.
13693	Neighbor *string `json:"neighbor,omitempty"`
13694	// V - BGP version number spoken to the neighbor.
13695	V *int32 `json:"v,omitempty"`
13696	// As - Autonomous system number.
13697	As *int32 `json:"as,omitempty"`
13698	// 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.
13699	UpDown *string `json:"upDown,omitempty"`
13700	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
13701	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
13702}
13703
13704// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
13705// Circuits API.
13706type ExpressRouteCircuitsArpTableListResult struct {
13707	autorest.Response `json:"-"`
13708	// Value - A list of the ARP tables.
13709	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
13710	// NextLink - The URL to get the next set of results.
13711	NextLink *string `json:"nextLink,omitempty"`
13712}
13713
13714// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13715// long-running operation.
13716type ExpressRouteCircuitsCreateOrUpdateFuture struct {
13717	azure.FutureAPI
13718	// Result returns the result of the asynchronous operation.
13719	// If the operation has not completed it will return an error.
13720	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
13721}
13722
13723// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13724func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13725	var azFuture azure.Future
13726	if err := json.Unmarshal(body, &azFuture); err != nil {
13727		return err
13728	}
13729	future.FutureAPI = &azFuture
13730	future.Result = future.result
13731	return nil
13732}
13733
13734// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result.
13735func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
13736	var done bool
13737	done, err = future.DoneWithContext(context.Background(), client)
13738	if err != nil {
13739		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13740		return
13741	}
13742	if !done {
13743		erc.Response.Response = future.Response()
13744		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
13745		return
13746	}
13747	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13748	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
13749		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
13750		if err != nil {
13751			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
13752		}
13753	}
13754	return
13755}
13756
13757// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
13758// long-running operation.
13759type ExpressRouteCircuitsDeleteFuture struct {
13760	azure.FutureAPI
13761	// Result returns the result of the asynchronous operation.
13762	// If the operation has not completed it will return an error.
13763	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
13764}
13765
13766// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13767func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error {
13768	var azFuture azure.Future
13769	if err := json.Unmarshal(body, &azFuture); err != nil {
13770		return err
13771	}
13772	future.FutureAPI = &azFuture
13773	future.Result = future.result
13774	return nil
13775}
13776
13777// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result.
13778func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
13779	var done bool
13780	done, err = future.DoneWithContext(context.Background(), client)
13781	if err != nil {
13782		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
13783		return
13784	}
13785	if !done {
13786		ar.Response = future.Response()
13787		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
13788		return
13789	}
13790	ar.Response = future.Response()
13791	return
13792}
13793
13794// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
13795// ExpressRouteCircuit.
13796type ExpressRouteCircuitServiceProviderProperties struct {
13797	// ServiceProviderName - The serviceProviderName.
13798	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
13799	// PeeringLocation - The peering location.
13800	PeeringLocation *string `json:"peeringLocation,omitempty"`
13801	// BandwidthInMbps - The BandwidthInMbps.
13802	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
13803}
13804
13805// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
13806type ExpressRouteCircuitSku struct {
13807	// Name - The name of the SKU.
13808	Name *string `json:"name,omitempty"`
13809	// Tier - The tier of the SKU. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic', 'ExpressRouteCircuitSkuTierLocal'
13810	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
13811	// Family - The family of the SKU. Possible values include: 'ExpressRouteCircuitSkuFamilyUnlimitedData', 'ExpressRouteCircuitSkuFamilyMeteredData'
13812	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
13813}
13814
13815// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
13816// long-running operation.
13817type ExpressRouteCircuitsListArpTableFuture struct {
13818	azure.FutureAPI
13819	// Result returns the result of the asynchronous operation.
13820	// If the operation has not completed it will return an error.
13821	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
13822}
13823
13824// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13825func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error {
13826	var azFuture azure.Future
13827	if err := json.Unmarshal(body, &azFuture); err != nil {
13828		return err
13829	}
13830	future.FutureAPI = &azFuture
13831	future.Result = future.result
13832	return nil
13833}
13834
13835// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result.
13836func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
13837	var done bool
13838	done, err = future.DoneWithContext(context.Background(), client)
13839	if err != nil {
13840		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
13841		return
13842	}
13843	if !done {
13844		ercatlr.Response.Response = future.Response()
13845		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
13846		return
13847	}
13848	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13849	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
13850		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
13851		if err != nil {
13852			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
13853		}
13854	}
13855	return
13856}
13857
13858// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
13859// long-running operation.
13860type ExpressRouteCircuitsListRoutesTableFuture struct {
13861	azure.FutureAPI
13862	// Result returns the result of the asynchronous operation.
13863	// If the operation has not completed it will return an error.
13864	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
13865}
13866
13867// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13868func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
13869	var azFuture azure.Future
13870	if err := json.Unmarshal(body, &azFuture); err != nil {
13871		return err
13872	}
13873	future.FutureAPI = &azFuture
13874	future.Result = future.result
13875	return nil
13876}
13877
13878// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result.
13879func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
13880	var done bool
13881	done, err = future.DoneWithContext(context.Background(), client)
13882	if err != nil {
13883		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
13884		return
13885	}
13886	if !done {
13887		ercrtlr.Response.Response = future.Response()
13888		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
13889		return
13890	}
13891	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13892	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
13893		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
13894		if err != nil {
13895			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
13896		}
13897	}
13898	return
13899}
13900
13901// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
13902// results of a long-running operation.
13903type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
13904	azure.FutureAPI
13905	// Result returns the result of the asynchronous operation.
13906	// If the operation has not completed it will return an error.
13907	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
13908}
13909
13910// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13911func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
13912	var azFuture azure.Future
13913	if err := json.Unmarshal(body, &azFuture); err != nil {
13914		return err
13915	}
13916	future.FutureAPI = &azFuture
13917	future.Result = future.result
13918	return nil
13919}
13920
13921// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result.
13922func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
13923	var done bool
13924	done, err = future.DoneWithContext(context.Background(), client)
13925	if err != nil {
13926		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
13927		return
13928	}
13929	if !done {
13930		ercrtslr.Response.Response = future.Response()
13931		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
13932		return
13933	}
13934	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13935	if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
13936		ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
13937		if err != nil {
13938			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
13939		}
13940	}
13941	return
13942}
13943
13944// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
13945// Circuits API.
13946type ExpressRouteCircuitsRoutesTableListResult struct {
13947	autorest.Response `json:"-"`
13948	// Value - The list of routes table.
13949	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
13950	// NextLink - The URL to get the next set of results.
13951	NextLink *string `json:"nextLink,omitempty"`
13952}
13953
13954// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
13955// Express Route Circuits API.
13956type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
13957	autorest.Response `json:"-"`
13958	// Value - A list of the routes table.
13959	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
13960	// NextLink - The URL to get the next set of results.
13961	NextLink *string `json:"nextLink,omitempty"`
13962}
13963
13964// ExpressRouteCircuitStats contains stats associated with the peering.
13965type ExpressRouteCircuitStats struct {
13966	autorest.Response `json:"-"`
13967	// PrimarybytesIn - The Primary BytesIn of the peering.
13968	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
13969	// PrimarybytesOut - The primary BytesOut of the peering.
13970	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
13971	// SecondarybytesIn - The secondary BytesIn of the peering.
13972	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
13973	// SecondarybytesOut - The secondary BytesOut of the peering.
13974	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
13975}
13976
13977// ExpressRouteConnection expressRouteConnection resource.
13978type ExpressRouteConnection struct {
13979	autorest.Response `json:"-"`
13980	// ExpressRouteConnectionProperties - Properties of the express route connection.
13981	*ExpressRouteConnectionProperties `json:"properties,omitempty"`
13982	// Name - The name of the resource.
13983	Name *string `json:"name,omitempty"`
13984	// ID - Resource ID.
13985	ID *string `json:"id,omitempty"`
13986}
13987
13988// MarshalJSON is the custom marshaler for ExpressRouteConnection.
13989func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) {
13990	objectMap := make(map[string]interface{})
13991	if erc.ExpressRouteConnectionProperties != nil {
13992		objectMap["properties"] = erc.ExpressRouteConnectionProperties
13993	}
13994	if erc.Name != nil {
13995		objectMap["name"] = erc.Name
13996	}
13997	if erc.ID != nil {
13998		objectMap["id"] = erc.ID
13999	}
14000	return json.Marshal(objectMap)
14001}
14002
14003// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct.
14004func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error {
14005	var m map[string]*json.RawMessage
14006	err := json.Unmarshal(body, &m)
14007	if err != nil {
14008		return err
14009	}
14010	for k, v := range m {
14011		switch k {
14012		case "properties":
14013			if v != nil {
14014				var expressRouteConnectionProperties ExpressRouteConnectionProperties
14015				err = json.Unmarshal(*v, &expressRouteConnectionProperties)
14016				if err != nil {
14017					return err
14018				}
14019				erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties
14020			}
14021		case "name":
14022			if v != nil {
14023				var name string
14024				err = json.Unmarshal(*v, &name)
14025				if err != nil {
14026					return err
14027				}
14028				erc.Name = &name
14029			}
14030		case "id":
14031			if v != nil {
14032				var ID string
14033				err = json.Unmarshal(*v, &ID)
14034				if err != nil {
14035					return err
14036				}
14037				erc.ID = &ID
14038			}
14039		}
14040	}
14041
14042	return nil
14043}
14044
14045// ExpressRouteConnectionID the ID of the ExpressRouteConnection.
14046type ExpressRouteConnectionID struct {
14047	// ID - READ-ONLY; The ID of the ExpressRouteConnection.
14048	ID *string `json:"id,omitempty"`
14049}
14050
14051// MarshalJSON is the custom marshaler for ExpressRouteConnectionID.
14052func (erci ExpressRouteConnectionID) MarshalJSON() ([]byte, error) {
14053	objectMap := make(map[string]interface{})
14054	return json.Marshal(objectMap)
14055}
14056
14057// ExpressRouteConnectionList expressRouteConnection list.
14058type ExpressRouteConnectionList struct {
14059	autorest.Response `json:"-"`
14060	// Value - The list of ExpressRoute connections.
14061	Value *[]ExpressRouteConnection `json:"value,omitempty"`
14062}
14063
14064// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource.
14065type ExpressRouteConnectionProperties struct {
14066	// ProvisioningState - READ-ONLY; The provisioning state of the express route connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
14067	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14068	// ExpressRouteCircuitPeering - The ExpressRoute circuit peering.
14069	ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"`
14070	// AuthorizationKey - Authorization key to establish the connection.
14071	AuthorizationKey *string `json:"authorizationKey,omitempty"`
14072	// RoutingWeight - The routing weight associated to the connection.
14073	RoutingWeight *int32 `json:"routingWeight,omitempty"`
14074	// EnableInternetSecurity - Enable internet security.
14075	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
14076	// ExpressRouteGatewayBypass - Enable FastPath to vWan Firewall hub.
14077	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
14078	// RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection.
14079	RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"`
14080}
14081
14082// MarshalJSON is the custom marshaler for ExpressRouteConnectionProperties.
14083func (ercp ExpressRouteConnectionProperties) MarshalJSON() ([]byte, error) {
14084	objectMap := make(map[string]interface{})
14085	if ercp.ExpressRouteCircuitPeering != nil {
14086		objectMap["expressRouteCircuitPeering"] = ercp.ExpressRouteCircuitPeering
14087	}
14088	if ercp.AuthorizationKey != nil {
14089		objectMap["authorizationKey"] = ercp.AuthorizationKey
14090	}
14091	if ercp.RoutingWeight != nil {
14092		objectMap["routingWeight"] = ercp.RoutingWeight
14093	}
14094	if ercp.EnableInternetSecurity != nil {
14095		objectMap["enableInternetSecurity"] = ercp.EnableInternetSecurity
14096	}
14097	if ercp.ExpressRouteGatewayBypass != nil {
14098		objectMap["expressRouteGatewayBypass"] = ercp.ExpressRouteGatewayBypass
14099	}
14100	if ercp.RoutingConfiguration != nil {
14101		objectMap["routingConfiguration"] = ercp.RoutingConfiguration
14102	}
14103	return json.Marshal(objectMap)
14104}
14105
14106// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
14107// a long-running operation.
14108type ExpressRouteConnectionsCreateOrUpdateFuture struct {
14109	azure.FutureAPI
14110	// Result returns the result of the asynchronous operation.
14111	// If the operation has not completed it will return an error.
14112	Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error)
14113}
14114
14115// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14116func (future *ExpressRouteConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14117	var azFuture azure.Future
14118	if err := json.Unmarshal(body, &azFuture); err != nil {
14119		return err
14120	}
14121	future.FutureAPI = &azFuture
14122	future.Result = future.result
14123	return nil
14124}
14125
14126// result is the default implementation for ExpressRouteConnectionsCreateOrUpdateFuture.Result.
14127func (future *ExpressRouteConnectionsCreateOrUpdateFuture) result(client ExpressRouteConnectionsClient) (erc ExpressRouteConnection, err error) {
14128	var done bool
14129	done, err = future.DoneWithContext(context.Background(), client)
14130	if err != nil {
14131		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14132		return
14133	}
14134	if !done {
14135		erc.Response.Response = future.Response()
14136		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsCreateOrUpdateFuture")
14137		return
14138	}
14139	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14140	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
14141		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
14142		if err != nil {
14143			err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
14144		}
14145	}
14146	return
14147}
14148
14149// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
14150// long-running operation.
14151type ExpressRouteConnectionsDeleteFuture struct {
14152	azure.FutureAPI
14153	// Result returns the result of the asynchronous operation.
14154	// If the operation has not completed it will return an error.
14155	Result func(ExpressRouteConnectionsClient) (autorest.Response, error)
14156}
14157
14158// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14159func (future *ExpressRouteConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
14160	var azFuture azure.Future
14161	if err := json.Unmarshal(body, &azFuture); err != nil {
14162		return err
14163	}
14164	future.FutureAPI = &azFuture
14165	future.Result = future.result
14166	return nil
14167}
14168
14169// result is the default implementation for ExpressRouteConnectionsDeleteFuture.Result.
14170func (future *ExpressRouteConnectionsDeleteFuture) result(client ExpressRouteConnectionsClient) (ar autorest.Response, err error) {
14171	var done bool
14172	done, err = future.DoneWithContext(context.Background(), client)
14173	if err != nil {
14174		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
14175		return
14176	}
14177	if !done {
14178		ar.Response = future.Response()
14179		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsDeleteFuture")
14180		return
14181	}
14182	ar.Response = future.Response()
14183	return
14184}
14185
14186// ExpressRouteCrossConnection expressRouteCrossConnection resource.
14187type ExpressRouteCrossConnection struct {
14188	autorest.Response `json:"-"`
14189	// ExpressRouteCrossConnectionProperties - Properties of the express route cross connection.
14190	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
14191	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
14192	Etag *string `json:"etag,omitempty"`
14193	// ID - Resource ID.
14194	ID *string `json:"id,omitempty"`
14195	// Name - READ-ONLY; Resource name.
14196	Name *string `json:"name,omitempty"`
14197	// Type - READ-ONLY; Resource type.
14198	Type *string `json:"type,omitempty"`
14199	// Location - Resource location.
14200	Location *string `json:"location,omitempty"`
14201	// Tags - Resource tags.
14202	Tags map[string]*string `json:"tags"`
14203}
14204
14205// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
14206func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
14207	objectMap := make(map[string]interface{})
14208	if ercc.ExpressRouteCrossConnectionProperties != nil {
14209		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
14210	}
14211	if ercc.ID != nil {
14212		objectMap["id"] = ercc.ID
14213	}
14214	if ercc.Location != nil {
14215		objectMap["location"] = ercc.Location
14216	}
14217	if ercc.Tags != nil {
14218		objectMap["tags"] = ercc.Tags
14219	}
14220	return json.Marshal(objectMap)
14221}
14222
14223// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
14224func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
14225	var m map[string]*json.RawMessage
14226	err := json.Unmarshal(body, &m)
14227	if err != nil {
14228		return err
14229	}
14230	for k, v := range m {
14231		switch k {
14232		case "properties":
14233			if v != nil {
14234				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
14235				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
14236				if err != nil {
14237					return err
14238				}
14239				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
14240			}
14241		case "etag":
14242			if v != nil {
14243				var etag string
14244				err = json.Unmarshal(*v, &etag)
14245				if err != nil {
14246					return err
14247				}
14248				ercc.Etag = &etag
14249			}
14250		case "id":
14251			if v != nil {
14252				var ID string
14253				err = json.Unmarshal(*v, &ID)
14254				if err != nil {
14255					return err
14256				}
14257				ercc.ID = &ID
14258			}
14259		case "name":
14260			if v != nil {
14261				var name string
14262				err = json.Unmarshal(*v, &name)
14263				if err != nil {
14264					return err
14265				}
14266				ercc.Name = &name
14267			}
14268		case "type":
14269			if v != nil {
14270				var typeVar string
14271				err = json.Unmarshal(*v, &typeVar)
14272				if err != nil {
14273					return err
14274				}
14275				ercc.Type = &typeVar
14276			}
14277		case "location":
14278			if v != nil {
14279				var location string
14280				err = json.Unmarshal(*v, &location)
14281				if err != nil {
14282					return err
14283				}
14284				ercc.Location = &location
14285			}
14286		case "tags":
14287			if v != nil {
14288				var tags map[string]*string
14289				err = json.Unmarshal(*v, &tags)
14290				if err != nil {
14291					return err
14292				}
14293				ercc.Tags = tags
14294			}
14295		}
14296	}
14297
14298	return nil
14299}
14300
14301// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
14302type ExpressRouteCrossConnectionListResult struct {
14303	autorest.Response `json:"-"`
14304	// Value - A list of ExpressRouteCrossConnection resources.
14305	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
14306	// NextLink - READ-ONLY; The URL to get the next set of results.
14307	NextLink *string `json:"nextLink,omitempty"`
14308}
14309
14310// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
14311func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
14312	objectMap := make(map[string]interface{})
14313	if ercclr.Value != nil {
14314		objectMap["value"] = ercclr.Value
14315	}
14316	return json.Marshal(objectMap)
14317}
14318
14319// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
14320// ExpressRouteCrossConnection values.
14321type ExpressRouteCrossConnectionListResultIterator struct {
14322	i    int
14323	page ExpressRouteCrossConnectionListResultPage
14324}
14325
14326// NextWithContext advances to the next value.  If there was an error making
14327// the request the iterator does not advance and the error is returned.
14328func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
14329	if tracing.IsEnabled() {
14330		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
14331		defer func() {
14332			sc := -1
14333			if iter.Response().Response.Response != nil {
14334				sc = iter.Response().Response.Response.StatusCode
14335			}
14336			tracing.EndSpan(ctx, sc, err)
14337		}()
14338	}
14339	iter.i++
14340	if iter.i < len(iter.page.Values()) {
14341		return nil
14342	}
14343	err = iter.page.NextWithContext(ctx)
14344	if err != nil {
14345		iter.i--
14346		return err
14347	}
14348	iter.i = 0
14349	return nil
14350}
14351
14352// Next advances to the next value.  If there was an error making
14353// the request the iterator does not advance and the error is returned.
14354// Deprecated: Use NextWithContext() instead.
14355func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
14356	return iter.NextWithContext(context.Background())
14357}
14358
14359// NotDone returns true if the enumeration should be started or is not yet complete.
14360func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
14361	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14362}
14363
14364// Response returns the raw server response from the last page request.
14365func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
14366	return iter.page.Response()
14367}
14368
14369// Value returns the current value or a zero-initialized value if the
14370// iterator has advanced beyond the end of the collection.
14371func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
14372	if !iter.page.NotDone() {
14373		return ExpressRouteCrossConnection{}
14374	}
14375	return iter.page.Values()[iter.i]
14376}
14377
14378// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
14379func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
14380	return ExpressRouteCrossConnectionListResultIterator{page: page}
14381}
14382
14383// IsEmpty returns true if the ListResult contains no values.
14384func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
14385	return ercclr.Value == nil || len(*ercclr.Value) == 0
14386}
14387
14388// hasNextLink returns true if the NextLink is not empty.
14389func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
14390	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
14391}
14392
14393// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
14394// It returns nil if no more results exist.
14395func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
14396	if !ercclr.hasNextLink() {
14397		return nil, nil
14398	}
14399	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14400		autorest.AsJSON(),
14401		autorest.AsGet(),
14402		autorest.WithBaseURL(to.String(ercclr.NextLink)))
14403}
14404
14405// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
14406type ExpressRouteCrossConnectionListResultPage struct {
14407	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
14408	ercclr ExpressRouteCrossConnectionListResult
14409}
14410
14411// NextWithContext advances to the next page of values.  If there was an error making
14412// the request the page does not advance and the error is returned.
14413func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
14414	if tracing.IsEnabled() {
14415		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
14416		defer func() {
14417			sc := -1
14418			if page.Response().Response.Response != nil {
14419				sc = page.Response().Response.Response.StatusCode
14420			}
14421			tracing.EndSpan(ctx, sc, err)
14422		}()
14423	}
14424	for {
14425		next, err := page.fn(ctx, page.ercclr)
14426		if err != nil {
14427			return err
14428		}
14429		page.ercclr = next
14430		if !next.hasNextLink() || !next.IsEmpty() {
14431			break
14432		}
14433	}
14434	return nil
14435}
14436
14437// Next advances to the next page of values.  If there was an error making
14438// the request the page does not advance and the error is returned.
14439// Deprecated: Use NextWithContext() instead.
14440func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
14441	return page.NextWithContext(context.Background())
14442}
14443
14444// NotDone returns true if the page enumeration should be started or is not yet complete.
14445func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
14446	return !page.ercclr.IsEmpty()
14447}
14448
14449// Response returns the raw server response from the last page request.
14450func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
14451	return page.ercclr
14452}
14453
14454// Values returns the slice of values for the current page or nil if there are no values.
14455func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
14456	if page.ercclr.IsEmpty() {
14457		return nil
14458	}
14459	return *page.ercclr.Value
14460}
14461
14462// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
14463func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
14464	return ExpressRouteCrossConnectionListResultPage{
14465		fn:     getNextPage,
14466		ercclr: cur,
14467	}
14468}
14469
14470// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
14471type ExpressRouteCrossConnectionPeering struct {
14472	autorest.Response `json:"-"`
14473	// ExpressRouteCrossConnectionPeeringProperties - Properties of the express route cross connection peering.
14474	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
14475	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14476	Name *string `json:"name,omitempty"`
14477	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
14478	Etag *string `json:"etag,omitempty"`
14479	// ID - Resource ID.
14480	ID *string `json:"id,omitempty"`
14481}
14482
14483// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
14484func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
14485	objectMap := make(map[string]interface{})
14486	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
14487		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
14488	}
14489	if erccp.Name != nil {
14490		objectMap["name"] = erccp.Name
14491	}
14492	if erccp.ID != nil {
14493		objectMap["id"] = erccp.ID
14494	}
14495	return json.Marshal(objectMap)
14496}
14497
14498// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
14499func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
14500	var m map[string]*json.RawMessage
14501	err := json.Unmarshal(body, &m)
14502	if err != nil {
14503		return err
14504	}
14505	for k, v := range m {
14506		switch k {
14507		case "properties":
14508			if v != nil {
14509				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
14510				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
14511				if err != nil {
14512					return err
14513				}
14514				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
14515			}
14516		case "name":
14517			if v != nil {
14518				var name string
14519				err = json.Unmarshal(*v, &name)
14520				if err != nil {
14521					return err
14522				}
14523				erccp.Name = &name
14524			}
14525		case "etag":
14526			if v != nil {
14527				var etag string
14528				err = json.Unmarshal(*v, &etag)
14529				if err != nil {
14530					return err
14531				}
14532				erccp.Etag = &etag
14533			}
14534		case "id":
14535			if v != nil {
14536				var ID string
14537				err = json.Unmarshal(*v, &ID)
14538				if err != nil {
14539					return err
14540				}
14541				erccp.ID = &ID
14542			}
14543		}
14544	}
14545
14546	return nil
14547}
14548
14549// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
14550// that belong to an ExpressRouteCrossConnection.
14551type ExpressRouteCrossConnectionPeeringList struct {
14552	autorest.Response `json:"-"`
14553	// Value - The peerings in an express route cross connection.
14554	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
14555	// NextLink - READ-ONLY; The URL to get the next set of results.
14556	NextLink *string `json:"nextLink,omitempty"`
14557}
14558
14559// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
14560func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
14561	objectMap := make(map[string]interface{})
14562	if erccpl.Value != nil {
14563		objectMap["value"] = erccpl.Value
14564	}
14565	return json.Marshal(objectMap)
14566}
14567
14568// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
14569// ExpressRouteCrossConnectionPeering values.
14570type ExpressRouteCrossConnectionPeeringListIterator struct {
14571	i    int
14572	page ExpressRouteCrossConnectionPeeringListPage
14573}
14574
14575// NextWithContext advances to the next value.  If there was an error making
14576// the request the iterator does not advance and the error is returned.
14577func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
14578	if tracing.IsEnabled() {
14579		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
14580		defer func() {
14581			sc := -1
14582			if iter.Response().Response.Response != nil {
14583				sc = iter.Response().Response.Response.StatusCode
14584			}
14585			tracing.EndSpan(ctx, sc, err)
14586		}()
14587	}
14588	iter.i++
14589	if iter.i < len(iter.page.Values()) {
14590		return nil
14591	}
14592	err = iter.page.NextWithContext(ctx)
14593	if err != nil {
14594		iter.i--
14595		return err
14596	}
14597	iter.i = 0
14598	return nil
14599}
14600
14601// Next advances to the next value.  If there was an error making
14602// the request the iterator does not advance and the error is returned.
14603// Deprecated: Use NextWithContext() instead.
14604func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
14605	return iter.NextWithContext(context.Background())
14606}
14607
14608// NotDone returns true if the enumeration should be started or is not yet complete.
14609func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
14610	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14611}
14612
14613// Response returns the raw server response from the last page request.
14614func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
14615	return iter.page.Response()
14616}
14617
14618// Value returns the current value or a zero-initialized value if the
14619// iterator has advanced beyond the end of the collection.
14620func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
14621	if !iter.page.NotDone() {
14622		return ExpressRouteCrossConnectionPeering{}
14623	}
14624	return iter.page.Values()[iter.i]
14625}
14626
14627// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
14628func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
14629	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
14630}
14631
14632// IsEmpty returns true if the ListResult contains no values.
14633func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
14634	return erccpl.Value == nil || len(*erccpl.Value) == 0
14635}
14636
14637// hasNextLink returns true if the NextLink is not empty.
14638func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
14639	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
14640}
14641
14642// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
14643// It returns nil if no more results exist.
14644func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
14645	if !erccpl.hasNextLink() {
14646		return nil, nil
14647	}
14648	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14649		autorest.AsJSON(),
14650		autorest.AsGet(),
14651		autorest.WithBaseURL(to.String(erccpl.NextLink)))
14652}
14653
14654// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
14655type ExpressRouteCrossConnectionPeeringListPage struct {
14656	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
14657	erccpl ExpressRouteCrossConnectionPeeringList
14658}
14659
14660// NextWithContext advances to the next page of values.  If there was an error making
14661// the request the page does not advance and the error is returned.
14662func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
14663	if tracing.IsEnabled() {
14664		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
14665		defer func() {
14666			sc := -1
14667			if page.Response().Response.Response != nil {
14668				sc = page.Response().Response.Response.StatusCode
14669			}
14670			tracing.EndSpan(ctx, sc, err)
14671		}()
14672	}
14673	for {
14674		next, err := page.fn(ctx, page.erccpl)
14675		if err != nil {
14676			return err
14677		}
14678		page.erccpl = next
14679		if !next.hasNextLink() || !next.IsEmpty() {
14680			break
14681		}
14682	}
14683	return nil
14684}
14685
14686// Next advances to the next page of values.  If there was an error making
14687// the request the page does not advance and the error is returned.
14688// Deprecated: Use NextWithContext() instead.
14689func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
14690	return page.NextWithContext(context.Background())
14691}
14692
14693// NotDone returns true if the page enumeration should be started or is not yet complete.
14694func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
14695	return !page.erccpl.IsEmpty()
14696}
14697
14698// Response returns the raw server response from the last page request.
14699func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
14700	return page.erccpl
14701}
14702
14703// Values returns the slice of values for the current page or nil if there are no values.
14704func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
14705	if page.erccpl.IsEmpty() {
14706		return nil
14707	}
14708	return *page.erccpl.Value
14709}
14710
14711// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
14712func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
14713	return ExpressRouteCrossConnectionPeeringListPage{
14714		fn:     getNextPage,
14715		erccpl: cur,
14716	}
14717}
14718
14719// ExpressRouteCrossConnectionPeeringProperties properties of express route cross connection peering.
14720type ExpressRouteCrossConnectionPeeringProperties struct {
14721	// PeeringType - The peering type. Possible values include: 'ExpressRoutePeeringTypeAzurePublicPeering', 'ExpressRoutePeeringTypeAzurePrivatePeering', 'ExpressRoutePeeringTypeMicrosoftPeering'
14722	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
14723	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
14724	State ExpressRoutePeeringState `json:"state,omitempty"`
14725	// AzureASN - READ-ONLY; The Azure ASN.
14726	AzureASN *int32 `json:"azureASN,omitempty"`
14727	// PeerASN - The peer ASN.
14728	PeerASN *int64 `json:"peerASN,omitempty"`
14729	// PrimaryPeerAddressPrefix - The primary address prefix.
14730	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
14731	// SecondaryPeerAddressPrefix - The secondary address prefix.
14732	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
14733	// PrimaryAzurePort - READ-ONLY; The primary port.
14734	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
14735	// SecondaryAzurePort - READ-ONLY; The secondary port.
14736	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
14737	// SharedKey - The shared key.
14738	SharedKey *string `json:"sharedKey,omitempty"`
14739	// VlanID - The VLAN ID.
14740	VlanID *int32 `json:"vlanId,omitempty"`
14741	// MicrosoftPeeringConfig - The Microsoft peering configuration.
14742	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
14743	// ProvisioningState - READ-ONLY; The provisioning state of the express route cross connection peering resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
14744	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14745	// GatewayManagerEtag - The GatewayManager Etag.
14746	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
14747	// LastModifiedBy - READ-ONLY; Who was the last to modify the peering.
14748	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
14749	// Ipv6PeeringConfig - The IPv6 peering configuration.
14750	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
14751}
14752
14753// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
14754func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
14755	objectMap := make(map[string]interface{})
14756	if erccpp.PeeringType != "" {
14757		objectMap["peeringType"] = erccpp.PeeringType
14758	}
14759	if erccpp.State != "" {
14760		objectMap["state"] = erccpp.State
14761	}
14762	if erccpp.PeerASN != nil {
14763		objectMap["peerASN"] = erccpp.PeerASN
14764	}
14765	if erccpp.PrimaryPeerAddressPrefix != nil {
14766		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
14767	}
14768	if erccpp.SecondaryPeerAddressPrefix != nil {
14769		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
14770	}
14771	if erccpp.SharedKey != nil {
14772		objectMap["sharedKey"] = erccpp.SharedKey
14773	}
14774	if erccpp.VlanID != nil {
14775		objectMap["vlanId"] = erccpp.VlanID
14776	}
14777	if erccpp.MicrosoftPeeringConfig != nil {
14778		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
14779	}
14780	if erccpp.GatewayManagerEtag != nil {
14781		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
14782	}
14783	if erccpp.Ipv6PeeringConfig != nil {
14784		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
14785	}
14786	return json.Marshal(objectMap)
14787}
14788
14789// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
14790// results of a long-running operation.
14791type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
14792	azure.FutureAPI
14793	// Result returns the result of the asynchronous operation.
14794	// If the operation has not completed it will return an error.
14795	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
14796}
14797
14798// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14799func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14800	var azFuture azure.Future
14801	if err := json.Unmarshal(body, &azFuture); err != nil {
14802		return err
14803	}
14804	future.FutureAPI = &azFuture
14805	future.Result = future.result
14806	return nil
14807}
14808
14809// result is the default implementation for ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.Result.
14810func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
14811	var done bool
14812	done, err = future.DoneWithContext(context.Background(), client)
14813	if err != nil {
14814		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14815		return
14816	}
14817	if !done {
14818		erccp.Response.Response = future.Response()
14819		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
14820		return
14821	}
14822	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14823	if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
14824		erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
14825		if err != nil {
14826			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
14827		}
14828	}
14829	return
14830}
14831
14832// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
14833// of a long-running operation.
14834type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
14835	azure.FutureAPI
14836	// Result returns the result of the asynchronous operation.
14837	// If the operation has not completed it will return an error.
14838	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
14839}
14840
14841// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14842func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
14843	var azFuture azure.Future
14844	if err := json.Unmarshal(body, &azFuture); err != nil {
14845		return err
14846	}
14847	future.FutureAPI = &azFuture
14848	future.Result = future.result
14849	return nil
14850}
14851
14852// result is the default implementation for ExpressRouteCrossConnectionPeeringsDeleteFuture.Result.
14853func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
14854	var done bool
14855	done, err = future.DoneWithContext(context.Background(), client)
14856	if err != nil {
14857		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
14858		return
14859	}
14860	if !done {
14861		ar.Response = future.Response()
14862		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
14863		return
14864	}
14865	ar.Response = future.Response()
14866	return
14867}
14868
14869// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
14870type ExpressRouteCrossConnectionProperties struct {
14871	// PrimaryAzurePort - READ-ONLY; The name of the primary port.
14872	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
14873	// SecondaryAzurePort - READ-ONLY; The name of the secondary port.
14874	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
14875	// STag - READ-ONLY; The identifier of the circuit traffic.
14876	STag *int32 `json:"sTag,omitempty"`
14877	// PeeringLocation - READ-ONLY; The peering location of the ExpressRoute circuit.
14878	PeeringLocation *string `json:"peeringLocation,omitempty"`
14879	// BandwidthInMbps - READ-ONLY; The circuit bandwidth In Mbps.
14880	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
14881	// ExpressRouteCircuit - The ExpressRouteCircuit.
14882	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
14883	// ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values include: 'ServiceProviderProvisioningStateNotProvisioned', 'ServiceProviderProvisioningStateProvisioning', 'ServiceProviderProvisioningStateProvisioned', 'ServiceProviderProvisioningStateDeprovisioning'
14884	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
14885	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
14886	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
14887	// ProvisioningState - READ-ONLY; The provisioning state of the express route cross connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
14888	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14889	// Peerings - The list of peerings.
14890	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
14891}
14892
14893// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
14894func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
14895	objectMap := make(map[string]interface{})
14896	if erccp.ExpressRouteCircuit != nil {
14897		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
14898	}
14899	if erccp.ServiceProviderProvisioningState != "" {
14900		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
14901	}
14902	if erccp.ServiceProviderNotes != nil {
14903		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
14904	}
14905	if erccp.Peerings != nil {
14906		objectMap["peerings"] = erccp.Peerings
14907	}
14908	return json.Marshal(objectMap)
14909}
14910
14911// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
14912type ExpressRouteCrossConnectionRoutesTableSummary struct {
14913	// Neighbor - IP address of Neighbor router.
14914	Neighbor *string `json:"neighbor,omitempty"`
14915	// Asn - Autonomous system number.
14916	Asn *int32 `json:"asn,omitempty"`
14917	// 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.
14918	UpDown *string `json:"upDown,omitempty"`
14919	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
14920	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
14921}
14922
14923// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
14924// results of a long-running operation.
14925type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
14926	azure.FutureAPI
14927	// Result returns the result of the asynchronous operation.
14928	// If the operation has not completed it will return an error.
14929	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
14930}
14931
14932// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14933func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14934	var azFuture azure.Future
14935	if err := json.Unmarshal(body, &azFuture); err != nil {
14936		return err
14937	}
14938	future.FutureAPI = &azFuture
14939	future.Result = future.result
14940	return nil
14941}
14942
14943// result is the default implementation for ExpressRouteCrossConnectionsCreateOrUpdateFuture.Result.
14944func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
14945	var done bool
14946	done, err = future.DoneWithContext(context.Background(), client)
14947	if err != nil {
14948		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14949		return
14950	}
14951	if !done {
14952		ercc.Response.Response = future.Response()
14953		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
14954		return
14955	}
14956	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14957	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
14958		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
14959		if err != nil {
14960			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
14961		}
14962	}
14963	return
14964}
14965
14966// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
14967// of a long-running operation.
14968type ExpressRouteCrossConnectionsListArpTableFuture struct {
14969	azure.FutureAPI
14970	// Result returns the result of the asynchronous operation.
14971	// If the operation has not completed it will return an error.
14972	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
14973}
14974
14975// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14976func (future *ExpressRouteCrossConnectionsListArpTableFuture) UnmarshalJSON(body []byte) error {
14977	var azFuture azure.Future
14978	if err := json.Unmarshal(body, &azFuture); err != nil {
14979		return err
14980	}
14981	future.FutureAPI = &azFuture
14982	future.Result = future.result
14983	return nil
14984}
14985
14986// result is the default implementation for ExpressRouteCrossConnectionsListArpTableFuture.Result.
14987func (future *ExpressRouteCrossConnectionsListArpTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
14988	var done bool
14989	done, err = future.DoneWithContext(context.Background(), client)
14990	if err != nil {
14991		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure")
14992		return
14993	}
14994	if !done {
14995		ercatlr.Response.Response = future.Response()
14996		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
14997		return
14998	}
14999	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15000	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
15001		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
15002		if err != nil {
15003			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
15004		}
15005	}
15006	return
15007}
15008
15009// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
15010// results of a long-running operation.
15011type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
15012	azure.FutureAPI
15013	// Result returns the result of the asynchronous operation.
15014	// If the operation has not completed it will return an error.
15015	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
15016}
15017
15018// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15019func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
15020	var azFuture azure.Future
15021	if err := json.Unmarshal(body, &azFuture); err != nil {
15022		return err
15023	}
15024	future.FutureAPI = &azFuture
15025	future.Result = future.result
15026	return nil
15027}
15028
15029// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableFuture.Result.
15030func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
15031	var done bool
15032	done, err = future.DoneWithContext(context.Background(), client)
15033	if err != nil {
15034		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
15035		return
15036	}
15037	if !done {
15038		ercrtlr.Response.Response = future.Response()
15039		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
15040		return
15041	}
15042	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15043	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
15044		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
15045		if err != nil {
15046			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
15047		}
15048	}
15049	return
15050}
15051
15052// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
15053// the results of a long-running operation.
15054type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
15055	azure.FutureAPI
15056	// Result returns the result of the asynchronous operation.
15057	// If the operation has not completed it will return an error.
15058	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
15059}
15060
15061// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15062func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
15063	var azFuture azure.Future
15064	if err := json.Unmarshal(body, &azFuture); err != nil {
15065		return err
15066	}
15067	future.FutureAPI = &azFuture
15068	future.Result = future.result
15069	return nil
15070}
15071
15072// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.Result.
15073func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
15074	var done bool
15075	done, err = future.DoneWithContext(context.Background(), client)
15076	if err != nil {
15077		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
15078		return
15079	}
15080	if !done {
15081		erccrtslr.Response.Response = future.Response()
15082		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
15083		return
15084	}
15085	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15086	if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
15087		erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
15088		if err != nil {
15089			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
15090		}
15091	}
15092	return
15093}
15094
15095// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
15096// the Express Route Cross Connections.
15097type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
15098	autorest.Response `json:"-"`
15099	// Value - A list of the routes table.
15100	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
15101	// NextLink - READ-ONLY; The URL to get the next set of results.
15102	NextLink *string `json:"nextLink,omitempty"`
15103}
15104
15105// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
15106func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
15107	objectMap := make(map[string]interface{})
15108	if erccrtslr.Value != nil {
15109		objectMap["value"] = erccrtslr.Value
15110	}
15111	return json.Marshal(objectMap)
15112}
15113
15114// ExpressRouteGateway expressRoute gateway resource.
15115type ExpressRouteGateway struct {
15116	autorest.Response `json:"-"`
15117	// ExpressRouteGatewayProperties - Properties of the express route gateway.
15118	*ExpressRouteGatewayProperties `json:"properties,omitempty"`
15119	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15120	Etag *string `json:"etag,omitempty"`
15121	// ID - Resource ID.
15122	ID *string `json:"id,omitempty"`
15123	// Name - READ-ONLY; Resource name.
15124	Name *string `json:"name,omitempty"`
15125	// Type - READ-ONLY; Resource type.
15126	Type *string `json:"type,omitempty"`
15127	// Location - Resource location.
15128	Location *string `json:"location,omitempty"`
15129	// Tags - Resource tags.
15130	Tags map[string]*string `json:"tags"`
15131}
15132
15133// MarshalJSON is the custom marshaler for ExpressRouteGateway.
15134func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) {
15135	objectMap := make(map[string]interface{})
15136	if erg.ExpressRouteGatewayProperties != nil {
15137		objectMap["properties"] = erg.ExpressRouteGatewayProperties
15138	}
15139	if erg.ID != nil {
15140		objectMap["id"] = erg.ID
15141	}
15142	if erg.Location != nil {
15143		objectMap["location"] = erg.Location
15144	}
15145	if erg.Tags != nil {
15146		objectMap["tags"] = erg.Tags
15147	}
15148	return json.Marshal(objectMap)
15149}
15150
15151// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct.
15152func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error {
15153	var m map[string]*json.RawMessage
15154	err := json.Unmarshal(body, &m)
15155	if err != nil {
15156		return err
15157	}
15158	for k, v := range m {
15159		switch k {
15160		case "properties":
15161			if v != nil {
15162				var expressRouteGatewayProperties ExpressRouteGatewayProperties
15163				err = json.Unmarshal(*v, &expressRouteGatewayProperties)
15164				if err != nil {
15165					return err
15166				}
15167				erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties
15168			}
15169		case "etag":
15170			if v != nil {
15171				var etag string
15172				err = json.Unmarshal(*v, &etag)
15173				if err != nil {
15174					return err
15175				}
15176				erg.Etag = &etag
15177			}
15178		case "id":
15179			if v != nil {
15180				var ID string
15181				err = json.Unmarshal(*v, &ID)
15182				if err != nil {
15183					return err
15184				}
15185				erg.ID = &ID
15186			}
15187		case "name":
15188			if v != nil {
15189				var name string
15190				err = json.Unmarshal(*v, &name)
15191				if err != nil {
15192					return err
15193				}
15194				erg.Name = &name
15195			}
15196		case "type":
15197			if v != nil {
15198				var typeVar string
15199				err = json.Unmarshal(*v, &typeVar)
15200				if err != nil {
15201					return err
15202				}
15203				erg.Type = &typeVar
15204			}
15205		case "location":
15206			if v != nil {
15207				var location string
15208				err = json.Unmarshal(*v, &location)
15209				if err != nil {
15210					return err
15211				}
15212				erg.Location = &location
15213			}
15214		case "tags":
15215			if v != nil {
15216				var tags map[string]*string
15217				err = json.Unmarshal(*v, &tags)
15218				if err != nil {
15219					return err
15220				}
15221				erg.Tags = tags
15222			}
15223		}
15224	}
15225
15226	return nil
15227}
15228
15229// ExpressRouteGatewayList list of ExpressRoute gateways.
15230type ExpressRouteGatewayList struct {
15231	autorest.Response `json:"-"`
15232	// Value - List of ExpressRoute gateways.
15233	Value *[]ExpressRouteGateway `json:"value,omitempty"`
15234}
15235
15236// ExpressRouteGatewayProperties expressRoute gateway resource properties.
15237type ExpressRouteGatewayProperties struct {
15238	// AutoScaleConfiguration - Configuration for auto scaling.
15239	AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"`
15240	// ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway.
15241	ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"`
15242	// ProvisioningState - READ-ONLY; The provisioning state of the express route gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
15243	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15244	// VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed.
15245	VirtualHub *VirtualHubID `json:"virtualHub,omitempty"`
15246}
15247
15248// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties.
15249func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) {
15250	objectMap := make(map[string]interface{})
15251	if ergp.AutoScaleConfiguration != nil {
15252		objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration
15253	}
15254	if ergp.VirtualHub != nil {
15255		objectMap["virtualHub"] = ergp.VirtualHub
15256	}
15257	return json.Marshal(objectMap)
15258}
15259
15260// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling.
15261type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct {
15262	// Bounds - Minimum and maximum number of scale units to deploy.
15263	Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"`
15264}
15265
15266// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to
15267// deploy.
15268type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct {
15269	// Min - Minimum number of scale units deployed for ExpressRoute gateway.
15270	Min *int32 `json:"min,omitempty"`
15271	// Max - Maximum number of scale units deployed for ExpressRoute gateway.
15272	Max *int32 `json:"max,omitempty"`
15273}
15274
15275// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15276// long-running operation.
15277type ExpressRouteGatewaysCreateOrUpdateFuture struct {
15278	azure.FutureAPI
15279	// Result returns the result of the asynchronous operation.
15280	// If the operation has not completed it will return an error.
15281	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
15282}
15283
15284// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15285func (future *ExpressRouteGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
15286	var azFuture azure.Future
15287	if err := json.Unmarshal(body, &azFuture); err != nil {
15288		return err
15289	}
15290	future.FutureAPI = &azFuture
15291	future.Result = future.result
15292	return nil
15293}
15294
15295// result is the default implementation for ExpressRouteGatewaysCreateOrUpdateFuture.Result.
15296func (future *ExpressRouteGatewaysCreateOrUpdateFuture) result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) {
15297	var done bool
15298	done, err = future.DoneWithContext(context.Background(), client)
15299	if err != nil {
15300		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15301		return
15302	}
15303	if !done {
15304		erg.Response.Response = future.Response()
15305		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysCreateOrUpdateFuture")
15306		return
15307	}
15308	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15309	if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent {
15310		erg, err = client.CreateOrUpdateResponder(erg.Response.Response)
15311		if err != nil {
15312			err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", erg.Response.Response, "Failure responding to request")
15313		}
15314	}
15315	return
15316}
15317
15318// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
15319// long-running operation.
15320type ExpressRouteGatewaysDeleteFuture struct {
15321	azure.FutureAPI
15322	// Result returns the result of the asynchronous operation.
15323	// If the operation has not completed it will return an error.
15324	Result func(ExpressRouteGatewaysClient) (autorest.Response, error)
15325}
15326
15327// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15328func (future *ExpressRouteGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
15329	var azFuture azure.Future
15330	if err := json.Unmarshal(body, &azFuture); err != nil {
15331		return err
15332	}
15333	future.FutureAPI = &azFuture
15334	future.Result = future.result
15335	return nil
15336}
15337
15338// result is the default implementation for ExpressRouteGatewaysDeleteFuture.Result.
15339func (future *ExpressRouteGatewaysDeleteFuture) result(client ExpressRouteGatewaysClient) (ar autorest.Response, err error) {
15340	var done bool
15341	done, err = future.DoneWithContext(context.Background(), client)
15342	if err != nil {
15343		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
15344		return
15345	}
15346	if !done {
15347		ar.Response = future.Response()
15348		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysDeleteFuture")
15349		return
15350	}
15351	ar.Response = future.Response()
15352	return
15353}
15354
15355// ExpressRouteGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
15356// long-running operation.
15357type ExpressRouteGatewaysUpdateTagsFuture struct {
15358	azure.FutureAPI
15359	// Result returns the result of the asynchronous operation.
15360	// If the operation has not completed it will return an error.
15361	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
15362}
15363
15364// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15365func (future *ExpressRouteGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
15366	var azFuture azure.Future
15367	if err := json.Unmarshal(body, &azFuture); err != nil {
15368		return err
15369	}
15370	future.FutureAPI = &azFuture
15371	future.Result = future.result
15372	return nil
15373}
15374
15375// result is the default implementation for ExpressRouteGatewaysUpdateTagsFuture.Result.
15376func (future *ExpressRouteGatewaysUpdateTagsFuture) result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) {
15377	var done bool
15378	done, err = future.DoneWithContext(context.Background(), client)
15379	if err != nil {
15380		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
15381		return
15382	}
15383	if !done {
15384		erg.Response.Response = future.Response()
15385		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysUpdateTagsFuture")
15386		return
15387	}
15388	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15389	if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent {
15390		erg, err = client.UpdateTagsResponder(erg.Response.Response)
15391		if err != nil {
15392			err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysUpdateTagsFuture", "Result", erg.Response.Response, "Failure responding to request")
15393		}
15394	}
15395	return
15396}
15397
15398// ExpressRouteLink expressRouteLink child resource definition.
15399type ExpressRouteLink struct {
15400	autorest.Response `json:"-"`
15401	// ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties.
15402	*ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"`
15403	// Name - Name of child port resource that is unique among child port resources of the parent.
15404	Name *string `json:"name,omitempty"`
15405	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15406	Etag *string `json:"etag,omitempty"`
15407	// ID - Resource ID.
15408	ID *string `json:"id,omitempty"`
15409}
15410
15411// MarshalJSON is the custom marshaler for ExpressRouteLink.
15412func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) {
15413	objectMap := make(map[string]interface{})
15414	if erl.ExpressRouteLinkPropertiesFormat != nil {
15415		objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat
15416	}
15417	if erl.Name != nil {
15418		objectMap["name"] = erl.Name
15419	}
15420	if erl.ID != nil {
15421		objectMap["id"] = erl.ID
15422	}
15423	return json.Marshal(objectMap)
15424}
15425
15426// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct.
15427func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error {
15428	var m map[string]*json.RawMessage
15429	err := json.Unmarshal(body, &m)
15430	if err != nil {
15431		return err
15432	}
15433	for k, v := range m {
15434		switch k {
15435		case "properties":
15436			if v != nil {
15437				var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat
15438				err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat)
15439				if err != nil {
15440					return err
15441				}
15442				erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat
15443			}
15444		case "name":
15445			if v != nil {
15446				var name string
15447				err = json.Unmarshal(*v, &name)
15448				if err != nil {
15449					return err
15450				}
15451				erl.Name = &name
15452			}
15453		case "etag":
15454			if v != nil {
15455				var etag string
15456				err = json.Unmarshal(*v, &etag)
15457				if err != nil {
15458					return err
15459				}
15460				erl.Etag = &etag
15461			}
15462		case "id":
15463			if v != nil {
15464				var ID string
15465				err = json.Unmarshal(*v, &ID)
15466				if err != nil {
15467					return err
15468				}
15469				erl.ID = &ID
15470			}
15471		}
15472	}
15473
15474	return nil
15475}
15476
15477// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call.
15478type ExpressRouteLinkListResult struct {
15479	autorest.Response `json:"-"`
15480	// Value - The list of ExpressRouteLink sub-resources.
15481	Value *[]ExpressRouteLink `json:"value,omitempty"`
15482	// NextLink - The URL to get the next set of results.
15483	NextLink *string `json:"nextLink,omitempty"`
15484}
15485
15486// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values.
15487type ExpressRouteLinkListResultIterator struct {
15488	i    int
15489	page ExpressRouteLinkListResultPage
15490}
15491
15492// NextWithContext advances to the next value.  If there was an error making
15493// the request the iterator does not advance and the error is returned.
15494func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
15495	if tracing.IsEnabled() {
15496		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext")
15497		defer func() {
15498			sc := -1
15499			if iter.Response().Response.Response != nil {
15500				sc = iter.Response().Response.Response.StatusCode
15501			}
15502			tracing.EndSpan(ctx, sc, err)
15503		}()
15504	}
15505	iter.i++
15506	if iter.i < len(iter.page.Values()) {
15507		return nil
15508	}
15509	err = iter.page.NextWithContext(ctx)
15510	if err != nil {
15511		iter.i--
15512		return err
15513	}
15514	iter.i = 0
15515	return nil
15516}
15517
15518// Next advances to the next value.  If there was an error making
15519// the request the iterator does not advance and the error is returned.
15520// Deprecated: Use NextWithContext() instead.
15521func (iter *ExpressRouteLinkListResultIterator) Next() error {
15522	return iter.NextWithContext(context.Background())
15523}
15524
15525// NotDone returns true if the enumeration should be started or is not yet complete.
15526func (iter ExpressRouteLinkListResultIterator) NotDone() bool {
15527	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15528}
15529
15530// Response returns the raw server response from the last page request.
15531func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult {
15532	return iter.page.Response()
15533}
15534
15535// Value returns the current value or a zero-initialized value if the
15536// iterator has advanced beyond the end of the collection.
15537func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink {
15538	if !iter.page.NotDone() {
15539		return ExpressRouteLink{}
15540	}
15541	return iter.page.Values()[iter.i]
15542}
15543
15544// Creates a new instance of the ExpressRouteLinkListResultIterator type.
15545func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator {
15546	return ExpressRouteLinkListResultIterator{page: page}
15547}
15548
15549// IsEmpty returns true if the ListResult contains no values.
15550func (erllr ExpressRouteLinkListResult) IsEmpty() bool {
15551	return erllr.Value == nil || len(*erllr.Value) == 0
15552}
15553
15554// hasNextLink returns true if the NextLink is not empty.
15555func (erllr ExpressRouteLinkListResult) hasNextLink() bool {
15556	return erllr.NextLink != nil && len(*erllr.NextLink) != 0
15557}
15558
15559// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results.
15560// It returns nil if no more results exist.
15561func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
15562	if !erllr.hasNextLink() {
15563		return nil, nil
15564	}
15565	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15566		autorest.AsJSON(),
15567		autorest.AsGet(),
15568		autorest.WithBaseURL(to.String(erllr.NextLink)))
15569}
15570
15571// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values.
15572type ExpressRouteLinkListResultPage struct {
15573	fn    func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)
15574	erllr ExpressRouteLinkListResult
15575}
15576
15577// NextWithContext advances to the next page of values.  If there was an error making
15578// the request the page does not advance and the error is returned.
15579func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
15580	if tracing.IsEnabled() {
15581		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext")
15582		defer func() {
15583			sc := -1
15584			if page.Response().Response.Response != nil {
15585				sc = page.Response().Response.Response.StatusCode
15586			}
15587			tracing.EndSpan(ctx, sc, err)
15588		}()
15589	}
15590	for {
15591		next, err := page.fn(ctx, page.erllr)
15592		if err != nil {
15593			return err
15594		}
15595		page.erllr = next
15596		if !next.hasNextLink() || !next.IsEmpty() {
15597			break
15598		}
15599	}
15600	return nil
15601}
15602
15603// Next advances to the next page of values.  If there was an error making
15604// the request the page does not advance and the error is returned.
15605// Deprecated: Use NextWithContext() instead.
15606func (page *ExpressRouteLinkListResultPage) Next() error {
15607	return page.NextWithContext(context.Background())
15608}
15609
15610// NotDone returns true if the page enumeration should be started or is not yet complete.
15611func (page ExpressRouteLinkListResultPage) NotDone() bool {
15612	return !page.erllr.IsEmpty()
15613}
15614
15615// Response returns the raw server response from the last page request.
15616func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult {
15617	return page.erllr
15618}
15619
15620// Values returns the slice of values for the current page or nil if there are no values.
15621func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink {
15622	if page.erllr.IsEmpty() {
15623		return nil
15624	}
15625	return *page.erllr.Value
15626}
15627
15628// Creates a new instance of the ExpressRouteLinkListResultPage type.
15629func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage {
15630	return ExpressRouteLinkListResultPage{
15631		fn:    getNextPage,
15632		erllr: cur,
15633	}
15634}
15635
15636// ExpressRouteLinkMacSecConfig expressRouteLink Mac Security Configuration.
15637type ExpressRouteLinkMacSecConfig struct {
15638	// CknSecretIdentifier - Keyvault Secret Identifier URL containing Mac security CKN key.
15639	CknSecretIdentifier *string `json:"cknSecretIdentifier,omitempty"`
15640	// CakSecretIdentifier - Keyvault Secret Identifier URL containing Mac security CAK key.
15641	CakSecretIdentifier *string `json:"cakSecretIdentifier,omitempty"`
15642	// Cipher - Mac security cipher. Possible values include: 'ExpressRouteLinkMacSecCipherGcmAes256', 'ExpressRouteLinkMacSecCipherGcmAes128', 'ExpressRouteLinkMacSecCipherGcmAesXpn128', 'ExpressRouteLinkMacSecCipherGcmAesXpn256'
15643	Cipher ExpressRouteLinkMacSecCipher `json:"cipher,omitempty"`
15644	// SciState - Sci mode enabled/disabled. Possible values include: 'ExpressRouteLinkMacSecSciStateDisabled', 'ExpressRouteLinkMacSecSciStateEnabled'
15645	SciState ExpressRouteLinkMacSecSciState `json:"sciState,omitempty"`
15646}
15647
15648// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources.
15649type ExpressRouteLinkPropertiesFormat struct {
15650	// RouterName - READ-ONLY; Name of Azure router associated with physical port.
15651	RouterName *string `json:"routerName,omitempty"`
15652	// InterfaceName - READ-ONLY; Name of Azure router interface.
15653	InterfaceName *string `json:"interfaceName,omitempty"`
15654	// PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port.
15655	PatchPanelID *string `json:"patchPanelId,omitempty"`
15656	// RackID - READ-ONLY; Mapping of physical patch panel to rack.
15657	RackID *string `json:"rackId,omitempty"`
15658	// ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'ExpressRouteLinkConnectorTypeLC', 'ExpressRouteLinkConnectorTypeSC'
15659	ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"`
15660	// AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled'
15661	AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"`
15662	// ProvisioningState - READ-ONLY; The provisioning state of the express route link resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
15663	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15664	// MacSecConfig - MacSec configuration.
15665	MacSecConfig *ExpressRouteLinkMacSecConfig `json:"macSecConfig,omitempty"`
15666}
15667
15668// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat.
15669func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
15670	objectMap := make(map[string]interface{})
15671	if erlpf.AdminState != "" {
15672		objectMap["adminState"] = erlpf.AdminState
15673	}
15674	if erlpf.MacSecConfig != nil {
15675		objectMap["macSecConfig"] = erlpf.MacSecConfig
15676	}
15677	return json.Marshal(objectMap)
15678}
15679
15680// ExpressRoutePort expressRoutePort resource definition.
15681type ExpressRoutePort struct {
15682	autorest.Response `json:"-"`
15683	// ExpressRoutePortPropertiesFormat - ExpressRoutePort properties.
15684	*ExpressRoutePortPropertiesFormat `json:"properties,omitempty"`
15685	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15686	Etag *string `json:"etag,omitempty"`
15687	// Identity - The identity of ExpressRoutePort, if configured.
15688	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
15689	// ID - Resource ID.
15690	ID *string `json:"id,omitempty"`
15691	// Name - READ-ONLY; Resource name.
15692	Name *string `json:"name,omitempty"`
15693	// Type - READ-ONLY; Resource type.
15694	Type *string `json:"type,omitempty"`
15695	// Location - Resource location.
15696	Location *string `json:"location,omitempty"`
15697	// Tags - Resource tags.
15698	Tags map[string]*string `json:"tags"`
15699}
15700
15701// MarshalJSON is the custom marshaler for ExpressRoutePort.
15702func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) {
15703	objectMap := make(map[string]interface{})
15704	if erp.ExpressRoutePortPropertiesFormat != nil {
15705		objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat
15706	}
15707	if erp.Identity != nil {
15708		objectMap["identity"] = erp.Identity
15709	}
15710	if erp.ID != nil {
15711		objectMap["id"] = erp.ID
15712	}
15713	if erp.Location != nil {
15714		objectMap["location"] = erp.Location
15715	}
15716	if erp.Tags != nil {
15717		objectMap["tags"] = erp.Tags
15718	}
15719	return json.Marshal(objectMap)
15720}
15721
15722// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct.
15723func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error {
15724	var m map[string]*json.RawMessage
15725	err := json.Unmarshal(body, &m)
15726	if err != nil {
15727		return err
15728	}
15729	for k, v := range m {
15730		switch k {
15731		case "properties":
15732			if v != nil {
15733				var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat
15734				err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat)
15735				if err != nil {
15736					return err
15737				}
15738				erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat
15739			}
15740		case "etag":
15741			if v != nil {
15742				var etag string
15743				err = json.Unmarshal(*v, &etag)
15744				if err != nil {
15745					return err
15746				}
15747				erp.Etag = &etag
15748			}
15749		case "identity":
15750			if v != nil {
15751				var identity ManagedServiceIdentity
15752				err = json.Unmarshal(*v, &identity)
15753				if err != nil {
15754					return err
15755				}
15756				erp.Identity = &identity
15757			}
15758		case "id":
15759			if v != nil {
15760				var ID string
15761				err = json.Unmarshal(*v, &ID)
15762				if err != nil {
15763					return err
15764				}
15765				erp.ID = &ID
15766			}
15767		case "name":
15768			if v != nil {
15769				var name string
15770				err = json.Unmarshal(*v, &name)
15771				if err != nil {
15772					return err
15773				}
15774				erp.Name = &name
15775			}
15776		case "type":
15777			if v != nil {
15778				var typeVar string
15779				err = json.Unmarshal(*v, &typeVar)
15780				if err != nil {
15781					return err
15782				}
15783				erp.Type = &typeVar
15784			}
15785		case "location":
15786			if v != nil {
15787				var location string
15788				err = json.Unmarshal(*v, &location)
15789				if err != nil {
15790					return err
15791				}
15792				erp.Location = &location
15793			}
15794		case "tags":
15795			if v != nil {
15796				var tags map[string]*string
15797				err = json.Unmarshal(*v, &tags)
15798				if err != nil {
15799					return err
15800				}
15801				erp.Tags = tags
15802			}
15803		}
15804	}
15805
15806	return nil
15807}
15808
15809// ExpressRoutePortListResult response for ListExpressRoutePorts API service call.
15810type ExpressRoutePortListResult struct {
15811	autorest.Response `json:"-"`
15812	// Value - A list of ExpressRoutePort resources.
15813	Value *[]ExpressRoutePort `json:"value,omitempty"`
15814	// NextLink - The URL to get the next set of results.
15815	NextLink *string `json:"nextLink,omitempty"`
15816}
15817
15818// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values.
15819type ExpressRoutePortListResultIterator struct {
15820	i    int
15821	page ExpressRoutePortListResultPage
15822}
15823
15824// NextWithContext advances to the next value.  If there was an error making
15825// the request the iterator does not advance and the error is returned.
15826func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) {
15827	if tracing.IsEnabled() {
15828		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext")
15829		defer func() {
15830			sc := -1
15831			if iter.Response().Response.Response != nil {
15832				sc = iter.Response().Response.Response.StatusCode
15833			}
15834			tracing.EndSpan(ctx, sc, err)
15835		}()
15836	}
15837	iter.i++
15838	if iter.i < len(iter.page.Values()) {
15839		return nil
15840	}
15841	err = iter.page.NextWithContext(ctx)
15842	if err != nil {
15843		iter.i--
15844		return err
15845	}
15846	iter.i = 0
15847	return nil
15848}
15849
15850// Next advances to the next value.  If there was an error making
15851// the request the iterator does not advance and the error is returned.
15852// Deprecated: Use NextWithContext() instead.
15853func (iter *ExpressRoutePortListResultIterator) Next() error {
15854	return iter.NextWithContext(context.Background())
15855}
15856
15857// NotDone returns true if the enumeration should be started or is not yet complete.
15858func (iter ExpressRoutePortListResultIterator) NotDone() bool {
15859	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15860}
15861
15862// Response returns the raw server response from the last page request.
15863func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult {
15864	return iter.page.Response()
15865}
15866
15867// Value returns the current value or a zero-initialized value if the
15868// iterator has advanced beyond the end of the collection.
15869func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort {
15870	if !iter.page.NotDone() {
15871		return ExpressRoutePort{}
15872	}
15873	return iter.page.Values()[iter.i]
15874}
15875
15876// Creates a new instance of the ExpressRoutePortListResultIterator type.
15877func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator {
15878	return ExpressRoutePortListResultIterator{page: page}
15879}
15880
15881// IsEmpty returns true if the ListResult contains no values.
15882func (erplr ExpressRoutePortListResult) IsEmpty() bool {
15883	return erplr.Value == nil || len(*erplr.Value) == 0
15884}
15885
15886// hasNextLink returns true if the NextLink is not empty.
15887func (erplr ExpressRoutePortListResult) hasNextLink() bool {
15888	return erplr.NextLink != nil && len(*erplr.NextLink) != 0
15889}
15890
15891// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results.
15892// It returns nil if no more results exist.
15893func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) {
15894	if !erplr.hasNextLink() {
15895		return nil, nil
15896	}
15897	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15898		autorest.AsJSON(),
15899		autorest.AsGet(),
15900		autorest.WithBaseURL(to.String(erplr.NextLink)))
15901}
15902
15903// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values.
15904type ExpressRoutePortListResultPage struct {
15905	fn    func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)
15906	erplr ExpressRoutePortListResult
15907}
15908
15909// NextWithContext advances to the next page of values.  If there was an error making
15910// the request the page does not advance and the error is returned.
15911func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) {
15912	if tracing.IsEnabled() {
15913		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext")
15914		defer func() {
15915			sc := -1
15916			if page.Response().Response.Response != nil {
15917				sc = page.Response().Response.Response.StatusCode
15918			}
15919			tracing.EndSpan(ctx, sc, err)
15920		}()
15921	}
15922	for {
15923		next, err := page.fn(ctx, page.erplr)
15924		if err != nil {
15925			return err
15926		}
15927		page.erplr = next
15928		if !next.hasNextLink() || !next.IsEmpty() {
15929			break
15930		}
15931	}
15932	return nil
15933}
15934
15935// Next advances to the next page of values.  If there was an error making
15936// the request the page does not advance and the error is returned.
15937// Deprecated: Use NextWithContext() instead.
15938func (page *ExpressRoutePortListResultPage) Next() error {
15939	return page.NextWithContext(context.Background())
15940}
15941
15942// NotDone returns true if the page enumeration should be started or is not yet complete.
15943func (page ExpressRoutePortListResultPage) NotDone() bool {
15944	return !page.erplr.IsEmpty()
15945}
15946
15947// Response returns the raw server response from the last page request.
15948func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult {
15949	return page.erplr
15950}
15951
15952// Values returns the slice of values for the current page or nil if there are no values.
15953func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort {
15954	if page.erplr.IsEmpty() {
15955		return nil
15956	}
15957	return *page.erplr.Value
15958}
15959
15960// Creates a new instance of the ExpressRoutePortListResultPage type.
15961func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage {
15962	return ExpressRoutePortListResultPage{
15963		fn:    getNextPage,
15964		erplr: cur,
15965	}
15966}
15967
15968// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources.
15969type ExpressRoutePortPropertiesFormat struct {
15970	// PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically.
15971	PeeringLocation *string `json:"peeringLocation,omitempty"`
15972	// BandwidthInGbps - Bandwidth of procured ports in Gbps.
15973	BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"`
15974	// ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths.
15975	ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"`
15976	// Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s).
15977	Mtu *string `json:"mtu,omitempty"`
15978	// Encapsulation - Encapsulation method on physical ports. Possible values include: 'ExpressRoutePortsEncapsulationDot1Q', 'ExpressRoutePortsEncapsulationQinQ'
15979	Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"`
15980	// EtherType - READ-ONLY; Ether type of the physical port.
15981	EtherType *string `json:"etherType,omitempty"`
15982	// AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization.
15983	AllocationDate *string `json:"allocationDate,omitempty"`
15984	// Links - The set of physical links of the ExpressRoutePort resource.
15985	Links *[]ExpressRouteLink `json:"links,omitempty"`
15986	// Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource.
15987	Circuits *[]SubResource `json:"circuits,omitempty"`
15988	// ProvisioningState - READ-ONLY; The provisioning state of the express route port resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
15989	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15990	// ResourceGUID - READ-ONLY; The resource GUID property of the express route port resource.
15991	ResourceGUID *string `json:"resourceGuid,omitempty"`
15992}
15993
15994// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat.
15995func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) {
15996	objectMap := make(map[string]interface{})
15997	if erppf.PeeringLocation != nil {
15998		objectMap["peeringLocation"] = erppf.PeeringLocation
15999	}
16000	if erppf.BandwidthInGbps != nil {
16001		objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps
16002	}
16003	if erppf.Encapsulation != "" {
16004		objectMap["encapsulation"] = erppf.Encapsulation
16005	}
16006	if erppf.Links != nil {
16007		objectMap["links"] = erppf.Links
16008	}
16009	return json.Marshal(objectMap)
16010}
16011
16012// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16013// long-running operation.
16014type ExpressRoutePortsCreateOrUpdateFuture struct {
16015	azure.FutureAPI
16016	// Result returns the result of the asynchronous operation.
16017	// If the operation has not completed it will return an error.
16018	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
16019}
16020
16021// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16022func (future *ExpressRoutePortsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16023	var azFuture azure.Future
16024	if err := json.Unmarshal(body, &azFuture); err != nil {
16025		return err
16026	}
16027	future.FutureAPI = &azFuture
16028	future.Result = future.result
16029	return nil
16030}
16031
16032// result is the default implementation for ExpressRoutePortsCreateOrUpdateFuture.Result.
16033func (future *ExpressRoutePortsCreateOrUpdateFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
16034	var done bool
16035	done, err = future.DoneWithContext(context.Background(), client)
16036	if err != nil {
16037		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16038		return
16039	}
16040	if !done {
16041		erp.Response.Response = future.Response()
16042		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsCreateOrUpdateFuture")
16043		return
16044	}
16045	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16046	if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
16047		erp, err = client.CreateOrUpdateResponder(erp.Response.Response)
16048		if err != nil {
16049			err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", erp.Response.Response, "Failure responding to request")
16050		}
16051	}
16052	return
16053}
16054
16055// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16056// operation.
16057type ExpressRoutePortsDeleteFuture struct {
16058	azure.FutureAPI
16059	// Result returns the result of the asynchronous operation.
16060	// If the operation has not completed it will return an error.
16061	Result func(ExpressRoutePortsClient) (autorest.Response, error)
16062}
16063
16064// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16065func (future *ExpressRoutePortsDeleteFuture) UnmarshalJSON(body []byte) error {
16066	var azFuture azure.Future
16067	if err := json.Unmarshal(body, &azFuture); err != nil {
16068		return err
16069	}
16070	future.FutureAPI = &azFuture
16071	future.Result = future.result
16072	return nil
16073}
16074
16075// result is the default implementation for ExpressRoutePortsDeleteFuture.Result.
16076func (future *ExpressRoutePortsDeleteFuture) result(client ExpressRoutePortsClient) (ar autorest.Response, err error) {
16077	var done bool
16078	done, err = future.DoneWithContext(context.Background(), client)
16079	if err != nil {
16080		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsDeleteFuture", "Result", future.Response(), "Polling failure")
16081		return
16082	}
16083	if !done {
16084		ar.Response = future.Response()
16085		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsDeleteFuture")
16086		return
16087	}
16088	ar.Response = future.Response()
16089	return
16090}
16091
16092// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
16093type ExpressRoutePortsLocation struct {
16094	autorest.Response `json:"-"`
16095	// ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties.
16096	*ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"`
16097	// ID - Resource ID.
16098	ID *string `json:"id,omitempty"`
16099	// Name - READ-ONLY; Resource name.
16100	Name *string `json:"name,omitempty"`
16101	// Type - READ-ONLY; Resource type.
16102	Type *string `json:"type,omitempty"`
16103	// Location - Resource location.
16104	Location *string `json:"location,omitempty"`
16105	// Tags - Resource tags.
16106	Tags map[string]*string `json:"tags"`
16107}
16108
16109// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation.
16110func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) {
16111	objectMap := make(map[string]interface{})
16112	if erpl.ExpressRoutePortsLocationPropertiesFormat != nil {
16113		objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat
16114	}
16115	if erpl.ID != nil {
16116		objectMap["id"] = erpl.ID
16117	}
16118	if erpl.Location != nil {
16119		objectMap["location"] = erpl.Location
16120	}
16121	if erpl.Tags != nil {
16122		objectMap["tags"] = erpl.Tags
16123	}
16124	return json.Marshal(objectMap)
16125}
16126
16127// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct.
16128func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error {
16129	var m map[string]*json.RawMessage
16130	err := json.Unmarshal(body, &m)
16131	if err != nil {
16132		return err
16133	}
16134	for k, v := range m {
16135		switch k {
16136		case "properties":
16137			if v != nil {
16138				var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat
16139				err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat)
16140				if err != nil {
16141					return err
16142				}
16143				erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat
16144			}
16145		case "id":
16146			if v != nil {
16147				var ID string
16148				err = json.Unmarshal(*v, &ID)
16149				if err != nil {
16150					return err
16151				}
16152				erpl.ID = &ID
16153			}
16154		case "name":
16155			if v != nil {
16156				var name string
16157				err = json.Unmarshal(*v, &name)
16158				if err != nil {
16159					return err
16160				}
16161				erpl.Name = &name
16162			}
16163		case "type":
16164			if v != nil {
16165				var typeVar string
16166				err = json.Unmarshal(*v, &typeVar)
16167				if err != nil {
16168					return err
16169				}
16170				erpl.Type = &typeVar
16171			}
16172		case "location":
16173			if v != nil {
16174				var location string
16175				err = json.Unmarshal(*v, &location)
16176				if err != nil {
16177					return err
16178				}
16179				erpl.Location = &location
16180			}
16181		case "tags":
16182			if v != nil {
16183				var tags map[string]*string
16184				err = json.Unmarshal(*v, &tags)
16185				if err != nil {
16186					return err
16187				}
16188				erpl.Tags = tags
16189			}
16190		}
16191	}
16192
16193	return nil
16194}
16195
16196// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths.
16197type ExpressRoutePortsLocationBandwidths struct {
16198	// OfferName - READ-ONLY; Bandwidth descriptive name.
16199	OfferName *string `json:"offerName,omitempty"`
16200	// ValueInGbps - READ-ONLY; Bandwidth value in Gbps.
16201	ValueInGbps *int32 `json:"valueInGbps,omitempty"`
16202}
16203
16204// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationBandwidths.
16205func (erplb ExpressRoutePortsLocationBandwidths) MarshalJSON() ([]byte, error) {
16206	objectMap := make(map[string]interface{})
16207	return json.Marshal(objectMap)
16208}
16209
16210// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
16211type ExpressRoutePortsLocationListResult struct {
16212	autorest.Response `json:"-"`
16213	// Value - The list of all ExpressRoutePort peering locations.
16214	Value *[]ExpressRoutePortsLocation `json:"value,omitempty"`
16215	// NextLink - The URL to get the next set of results.
16216	NextLink *string `json:"nextLink,omitempty"`
16217}
16218
16219// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of
16220// ExpressRoutePortsLocation values.
16221type ExpressRoutePortsLocationListResultIterator struct {
16222	i    int
16223	page ExpressRoutePortsLocationListResultPage
16224}
16225
16226// NextWithContext advances to the next value.  If there was an error making
16227// the request the iterator does not advance and the error is returned.
16228func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
16229	if tracing.IsEnabled() {
16230		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext")
16231		defer func() {
16232			sc := -1
16233			if iter.Response().Response.Response != nil {
16234				sc = iter.Response().Response.Response.StatusCode
16235			}
16236			tracing.EndSpan(ctx, sc, err)
16237		}()
16238	}
16239	iter.i++
16240	if iter.i < len(iter.page.Values()) {
16241		return nil
16242	}
16243	err = iter.page.NextWithContext(ctx)
16244	if err != nil {
16245		iter.i--
16246		return err
16247	}
16248	iter.i = 0
16249	return nil
16250}
16251
16252// Next advances to the next value.  If there was an error making
16253// the request the iterator does not advance and the error is returned.
16254// Deprecated: Use NextWithContext() instead.
16255func (iter *ExpressRoutePortsLocationListResultIterator) Next() error {
16256	return iter.NextWithContext(context.Background())
16257}
16258
16259// NotDone returns true if the enumeration should be started or is not yet complete.
16260func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool {
16261	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16262}
16263
16264// Response returns the raw server response from the last page request.
16265func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult {
16266	return iter.page.Response()
16267}
16268
16269// Value returns the current value or a zero-initialized value if the
16270// iterator has advanced beyond the end of the collection.
16271func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation {
16272	if !iter.page.NotDone() {
16273		return ExpressRoutePortsLocation{}
16274	}
16275	return iter.page.Values()[iter.i]
16276}
16277
16278// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type.
16279func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator {
16280	return ExpressRoutePortsLocationListResultIterator{page: page}
16281}
16282
16283// IsEmpty returns true if the ListResult contains no values.
16284func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool {
16285	return erpllr.Value == nil || len(*erpllr.Value) == 0
16286}
16287
16288// hasNextLink returns true if the NextLink is not empty.
16289func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool {
16290	return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0
16291}
16292
16293// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results.
16294// It returns nil if no more results exist.
16295func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) {
16296	if !erpllr.hasNextLink() {
16297		return nil, nil
16298	}
16299	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16300		autorest.AsJSON(),
16301		autorest.AsGet(),
16302		autorest.WithBaseURL(to.String(erpllr.NextLink)))
16303}
16304
16305// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values.
16306type ExpressRoutePortsLocationListResultPage struct {
16307	fn     func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)
16308	erpllr ExpressRoutePortsLocationListResult
16309}
16310
16311// NextWithContext advances to the next page of values.  If there was an error making
16312// the request the page does not advance and the error is returned.
16313func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) {
16314	if tracing.IsEnabled() {
16315		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext")
16316		defer func() {
16317			sc := -1
16318			if page.Response().Response.Response != nil {
16319				sc = page.Response().Response.Response.StatusCode
16320			}
16321			tracing.EndSpan(ctx, sc, err)
16322		}()
16323	}
16324	for {
16325		next, err := page.fn(ctx, page.erpllr)
16326		if err != nil {
16327			return err
16328		}
16329		page.erpllr = next
16330		if !next.hasNextLink() || !next.IsEmpty() {
16331			break
16332		}
16333	}
16334	return nil
16335}
16336
16337// Next advances to the next page of values.  If there was an error making
16338// the request the page does not advance and the error is returned.
16339// Deprecated: Use NextWithContext() instead.
16340func (page *ExpressRoutePortsLocationListResultPage) Next() error {
16341	return page.NextWithContext(context.Background())
16342}
16343
16344// NotDone returns true if the page enumeration should be started or is not yet complete.
16345func (page ExpressRoutePortsLocationListResultPage) NotDone() bool {
16346	return !page.erpllr.IsEmpty()
16347}
16348
16349// Response returns the raw server response from the last page request.
16350func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult {
16351	return page.erpllr
16352}
16353
16354// Values returns the slice of values for the current page or nil if there are no values.
16355func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation {
16356	if page.erpllr.IsEmpty() {
16357		return nil
16358	}
16359	return *page.erpllr.Value
16360}
16361
16362// Creates a new instance of the ExpressRoutePortsLocationListResultPage type.
16363func NewExpressRoutePortsLocationListResultPage(cur ExpressRoutePortsLocationListResult, getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage {
16364	return ExpressRoutePortsLocationListResultPage{
16365		fn:     getNextPage,
16366		erpllr: cur,
16367	}
16368}
16369
16370// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location
16371// resources.
16372type ExpressRoutePortsLocationPropertiesFormat struct {
16373	// Address - READ-ONLY; Address of peering location.
16374	Address *string `json:"address,omitempty"`
16375	// Contact - READ-ONLY; Contact details of peering locations.
16376	Contact *string `json:"contact,omitempty"`
16377	// AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths.
16378	AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"`
16379	// ProvisioningState - READ-ONLY; The provisioning state of the express route port location resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
16380	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16381}
16382
16383// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat.
16384func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) {
16385	objectMap := make(map[string]interface{})
16386	if erplpf.AvailableBandwidths != nil {
16387		objectMap["availableBandwidths"] = erplpf.AvailableBandwidths
16388	}
16389	return json.Marshal(objectMap)
16390}
16391
16392// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
16393type ExpressRouteServiceProvider struct {
16394	// ExpressRouteServiceProviderPropertiesFormat - Properties of the express route service provider.
16395	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
16396	// ID - Resource ID.
16397	ID *string `json:"id,omitempty"`
16398	// Name - READ-ONLY; Resource name.
16399	Name *string `json:"name,omitempty"`
16400	// Type - READ-ONLY; Resource type.
16401	Type *string `json:"type,omitempty"`
16402	// Location - Resource location.
16403	Location *string `json:"location,omitempty"`
16404	// Tags - Resource tags.
16405	Tags map[string]*string `json:"tags"`
16406}
16407
16408// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
16409func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
16410	objectMap := make(map[string]interface{})
16411	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
16412		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
16413	}
16414	if ersp.ID != nil {
16415		objectMap["id"] = ersp.ID
16416	}
16417	if ersp.Location != nil {
16418		objectMap["location"] = ersp.Location
16419	}
16420	if ersp.Tags != nil {
16421		objectMap["tags"] = ersp.Tags
16422	}
16423	return json.Marshal(objectMap)
16424}
16425
16426// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
16427func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
16428	var m map[string]*json.RawMessage
16429	err := json.Unmarshal(body, &m)
16430	if err != nil {
16431		return err
16432	}
16433	for k, v := range m {
16434		switch k {
16435		case "properties":
16436			if v != nil {
16437				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
16438				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
16439				if err != nil {
16440					return err
16441				}
16442				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
16443			}
16444		case "id":
16445			if v != nil {
16446				var ID string
16447				err = json.Unmarshal(*v, &ID)
16448				if err != nil {
16449					return err
16450				}
16451				ersp.ID = &ID
16452			}
16453		case "name":
16454			if v != nil {
16455				var name string
16456				err = json.Unmarshal(*v, &name)
16457				if err != nil {
16458					return err
16459				}
16460				ersp.Name = &name
16461			}
16462		case "type":
16463			if v != nil {
16464				var typeVar string
16465				err = json.Unmarshal(*v, &typeVar)
16466				if err != nil {
16467					return err
16468				}
16469				ersp.Type = &typeVar
16470			}
16471		case "location":
16472			if v != nil {
16473				var location string
16474				err = json.Unmarshal(*v, &location)
16475				if err != nil {
16476					return err
16477				}
16478				ersp.Location = &location
16479			}
16480		case "tags":
16481			if v != nil {
16482				var tags map[string]*string
16483				err = json.Unmarshal(*v, &tags)
16484				if err != nil {
16485					return err
16486				}
16487				ersp.Tags = tags
16488			}
16489		}
16490	}
16491
16492	return nil
16493}
16494
16495// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
16496// resources.
16497type ExpressRouteServiceProviderBandwidthsOffered struct {
16498	// OfferName - The OfferName.
16499	OfferName *string `json:"offerName,omitempty"`
16500	// ValueInMbps - The ValueInMbps.
16501	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
16502}
16503
16504// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
16505type ExpressRouteServiceProviderListResult struct {
16506	autorest.Response `json:"-"`
16507	// Value - A list of ExpressRouteResourceProvider resources.
16508	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
16509	// NextLink - The URL to get the next set of results.
16510	NextLink *string `json:"nextLink,omitempty"`
16511}
16512
16513// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
16514// ExpressRouteServiceProvider values.
16515type ExpressRouteServiceProviderListResultIterator struct {
16516	i    int
16517	page ExpressRouteServiceProviderListResultPage
16518}
16519
16520// NextWithContext advances to the next value.  If there was an error making
16521// the request the iterator does not advance and the error is returned.
16522func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
16523	if tracing.IsEnabled() {
16524		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
16525		defer func() {
16526			sc := -1
16527			if iter.Response().Response.Response != nil {
16528				sc = iter.Response().Response.Response.StatusCode
16529			}
16530			tracing.EndSpan(ctx, sc, err)
16531		}()
16532	}
16533	iter.i++
16534	if iter.i < len(iter.page.Values()) {
16535		return nil
16536	}
16537	err = iter.page.NextWithContext(ctx)
16538	if err != nil {
16539		iter.i--
16540		return err
16541	}
16542	iter.i = 0
16543	return nil
16544}
16545
16546// Next advances to the next value.  If there was an error making
16547// the request the iterator does not advance and the error is returned.
16548// Deprecated: Use NextWithContext() instead.
16549func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
16550	return iter.NextWithContext(context.Background())
16551}
16552
16553// NotDone returns true if the enumeration should be started or is not yet complete.
16554func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
16555	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16556}
16557
16558// Response returns the raw server response from the last page request.
16559func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
16560	return iter.page.Response()
16561}
16562
16563// Value returns the current value or a zero-initialized value if the
16564// iterator has advanced beyond the end of the collection.
16565func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
16566	if !iter.page.NotDone() {
16567		return ExpressRouteServiceProvider{}
16568	}
16569	return iter.page.Values()[iter.i]
16570}
16571
16572// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
16573func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
16574	return ExpressRouteServiceProviderListResultIterator{page: page}
16575}
16576
16577// IsEmpty returns true if the ListResult contains no values.
16578func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
16579	return ersplr.Value == nil || len(*ersplr.Value) == 0
16580}
16581
16582// hasNextLink returns true if the NextLink is not empty.
16583func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
16584	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
16585}
16586
16587// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
16588// It returns nil if no more results exist.
16589func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
16590	if !ersplr.hasNextLink() {
16591		return nil, nil
16592	}
16593	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16594		autorest.AsJSON(),
16595		autorest.AsGet(),
16596		autorest.WithBaseURL(to.String(ersplr.NextLink)))
16597}
16598
16599// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
16600type ExpressRouteServiceProviderListResultPage struct {
16601	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
16602	ersplr ExpressRouteServiceProviderListResult
16603}
16604
16605// NextWithContext advances to the next page of values.  If there was an error making
16606// the request the page does not advance and the error is returned.
16607func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
16608	if tracing.IsEnabled() {
16609		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
16610		defer func() {
16611			sc := -1
16612			if page.Response().Response.Response != nil {
16613				sc = page.Response().Response.Response.StatusCode
16614			}
16615			tracing.EndSpan(ctx, sc, err)
16616		}()
16617	}
16618	for {
16619		next, err := page.fn(ctx, page.ersplr)
16620		if err != nil {
16621			return err
16622		}
16623		page.ersplr = next
16624		if !next.hasNextLink() || !next.IsEmpty() {
16625			break
16626		}
16627	}
16628	return nil
16629}
16630
16631// Next advances to the next page of values.  If there was an error making
16632// the request the page does not advance and the error is returned.
16633// Deprecated: Use NextWithContext() instead.
16634func (page *ExpressRouteServiceProviderListResultPage) Next() error {
16635	return page.NextWithContext(context.Background())
16636}
16637
16638// NotDone returns true if the page enumeration should be started or is not yet complete.
16639func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
16640	return !page.ersplr.IsEmpty()
16641}
16642
16643// Response returns the raw server response from the last page request.
16644func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
16645	return page.ersplr
16646}
16647
16648// Values returns the slice of values for the current page or nil if there are no values.
16649func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
16650	if page.ersplr.IsEmpty() {
16651		return nil
16652	}
16653	return *page.ersplr.Value
16654}
16655
16656// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
16657func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
16658	return ExpressRouteServiceProviderListResultPage{
16659		fn:     getNextPage,
16660		ersplr: cur,
16661	}
16662}
16663
16664// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
16665type ExpressRouteServiceProviderPropertiesFormat struct {
16666	// PeeringLocations - A list of peering locations.
16667	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
16668	// BandwidthsOffered - A list of bandwidths offered.
16669	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
16670	// ProvisioningState - READ-ONLY; The provisioning state of the express route service provider resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
16671	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16672}
16673
16674// MarshalJSON is the custom marshaler for ExpressRouteServiceProviderPropertiesFormat.
16675func (ersppf ExpressRouteServiceProviderPropertiesFormat) MarshalJSON() ([]byte, error) {
16676	objectMap := make(map[string]interface{})
16677	if ersppf.PeeringLocations != nil {
16678		objectMap["peeringLocations"] = ersppf.PeeringLocations
16679	}
16680	if ersppf.BandwidthsOffered != nil {
16681		objectMap["bandwidthsOffered"] = ersppf.BandwidthsOffered
16682	}
16683	return json.Marshal(objectMap)
16684}
16685
16686// ExtendedLocation extendedLocation complex type.
16687type ExtendedLocation struct {
16688	// Name - The name of the extended location.
16689	Name *string `json:"name,omitempty"`
16690	// Type - The type of the extended location.
16691	Type *string `json:"type,omitempty"`
16692}
16693
16694// FirewallPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16695// long-running operation.
16696type FirewallPoliciesCreateOrUpdateFuture struct {
16697	azure.FutureAPI
16698	// Result returns the result of the asynchronous operation.
16699	// If the operation has not completed it will return an error.
16700	Result func(FirewallPoliciesClient) (FirewallPolicy, error)
16701}
16702
16703// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16704func (future *FirewallPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16705	var azFuture azure.Future
16706	if err := json.Unmarshal(body, &azFuture); err != nil {
16707		return err
16708	}
16709	future.FutureAPI = &azFuture
16710	future.Result = future.result
16711	return nil
16712}
16713
16714// result is the default implementation for FirewallPoliciesCreateOrUpdateFuture.Result.
16715func (future *FirewallPoliciesCreateOrUpdateFuture) result(client FirewallPoliciesClient) (fp FirewallPolicy, err error) {
16716	var done bool
16717	done, err = future.DoneWithContext(context.Background(), client)
16718	if err != nil {
16719		err = autorest.NewErrorWithError(err, "network.FirewallPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16720		return
16721	}
16722	if !done {
16723		fp.Response.Response = future.Response()
16724		err = azure.NewAsyncOpIncompleteError("network.FirewallPoliciesCreateOrUpdateFuture")
16725		return
16726	}
16727	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16728	if fp.Response.Response, err = future.GetResult(sender); err == nil && fp.Response.Response.StatusCode != http.StatusNoContent {
16729		fp, err = client.CreateOrUpdateResponder(fp.Response.Response)
16730		if err != nil {
16731			err = autorest.NewErrorWithError(err, "network.FirewallPoliciesCreateOrUpdateFuture", "Result", fp.Response.Response, "Failure responding to request")
16732		}
16733	}
16734	return
16735}
16736
16737// FirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16738// operation.
16739type FirewallPoliciesDeleteFuture struct {
16740	azure.FutureAPI
16741	// Result returns the result of the asynchronous operation.
16742	// If the operation has not completed it will return an error.
16743	Result func(FirewallPoliciesClient) (autorest.Response, error)
16744}
16745
16746// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16747func (future *FirewallPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
16748	var azFuture azure.Future
16749	if err := json.Unmarshal(body, &azFuture); err != nil {
16750		return err
16751	}
16752	future.FutureAPI = &azFuture
16753	future.Result = future.result
16754	return nil
16755}
16756
16757// result is the default implementation for FirewallPoliciesDeleteFuture.Result.
16758func (future *FirewallPoliciesDeleteFuture) result(client FirewallPoliciesClient) (ar autorest.Response, err error) {
16759	var done bool
16760	done, err = future.DoneWithContext(context.Background(), client)
16761	if err != nil {
16762		err = autorest.NewErrorWithError(err, "network.FirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
16763		return
16764	}
16765	if !done {
16766		ar.Response = future.Response()
16767		err = azure.NewAsyncOpIncompleteError("network.FirewallPoliciesDeleteFuture")
16768		return
16769	}
16770	ar.Response = future.Response()
16771	return
16772}
16773
16774// FirewallPolicy firewallPolicy Resource.
16775type FirewallPolicy struct {
16776	autorest.Response `json:"-"`
16777	// FirewallPolicyPropertiesFormat - Properties of the firewall policy.
16778	*FirewallPolicyPropertiesFormat `json:"properties,omitempty"`
16779	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
16780	Etag *string `json:"etag,omitempty"`
16781	// Identity - The identity of the firewall policy.
16782	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
16783	// ID - Resource ID.
16784	ID *string `json:"id,omitempty"`
16785	// Name - READ-ONLY; Resource name.
16786	Name *string `json:"name,omitempty"`
16787	// Type - READ-ONLY; Resource type.
16788	Type *string `json:"type,omitempty"`
16789	// Location - Resource location.
16790	Location *string `json:"location,omitempty"`
16791	// Tags - Resource tags.
16792	Tags map[string]*string `json:"tags"`
16793}
16794
16795// MarshalJSON is the custom marshaler for FirewallPolicy.
16796func (fp FirewallPolicy) MarshalJSON() ([]byte, error) {
16797	objectMap := make(map[string]interface{})
16798	if fp.FirewallPolicyPropertiesFormat != nil {
16799		objectMap["properties"] = fp.FirewallPolicyPropertiesFormat
16800	}
16801	if fp.Identity != nil {
16802		objectMap["identity"] = fp.Identity
16803	}
16804	if fp.ID != nil {
16805		objectMap["id"] = fp.ID
16806	}
16807	if fp.Location != nil {
16808		objectMap["location"] = fp.Location
16809	}
16810	if fp.Tags != nil {
16811		objectMap["tags"] = fp.Tags
16812	}
16813	return json.Marshal(objectMap)
16814}
16815
16816// UnmarshalJSON is the custom unmarshaler for FirewallPolicy struct.
16817func (fp *FirewallPolicy) UnmarshalJSON(body []byte) error {
16818	var m map[string]*json.RawMessage
16819	err := json.Unmarshal(body, &m)
16820	if err != nil {
16821		return err
16822	}
16823	for k, v := range m {
16824		switch k {
16825		case "properties":
16826			if v != nil {
16827				var firewallPolicyPropertiesFormat FirewallPolicyPropertiesFormat
16828				err = json.Unmarshal(*v, &firewallPolicyPropertiesFormat)
16829				if err != nil {
16830					return err
16831				}
16832				fp.FirewallPolicyPropertiesFormat = &firewallPolicyPropertiesFormat
16833			}
16834		case "etag":
16835			if v != nil {
16836				var etag string
16837				err = json.Unmarshal(*v, &etag)
16838				if err != nil {
16839					return err
16840				}
16841				fp.Etag = &etag
16842			}
16843		case "identity":
16844			if v != nil {
16845				var identity ManagedServiceIdentity
16846				err = json.Unmarshal(*v, &identity)
16847				if err != nil {
16848					return err
16849				}
16850				fp.Identity = &identity
16851			}
16852		case "id":
16853			if v != nil {
16854				var ID string
16855				err = json.Unmarshal(*v, &ID)
16856				if err != nil {
16857					return err
16858				}
16859				fp.ID = &ID
16860			}
16861		case "name":
16862			if v != nil {
16863				var name string
16864				err = json.Unmarshal(*v, &name)
16865				if err != nil {
16866					return err
16867				}
16868				fp.Name = &name
16869			}
16870		case "type":
16871			if v != nil {
16872				var typeVar string
16873				err = json.Unmarshal(*v, &typeVar)
16874				if err != nil {
16875					return err
16876				}
16877				fp.Type = &typeVar
16878			}
16879		case "location":
16880			if v != nil {
16881				var location string
16882				err = json.Unmarshal(*v, &location)
16883				if err != nil {
16884					return err
16885				}
16886				fp.Location = &location
16887			}
16888		case "tags":
16889			if v != nil {
16890				var tags map[string]*string
16891				err = json.Unmarshal(*v, &tags)
16892				if err != nil {
16893					return err
16894				}
16895				fp.Tags = tags
16896			}
16897		}
16898	}
16899
16900	return nil
16901}
16902
16903// FirewallPolicyCertificateAuthority trusted Root certificates properties for tls.
16904type FirewallPolicyCertificateAuthority struct {
16905	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
16906	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
16907	// Name - Name of the CA certificate.
16908	Name *string `json:"name,omitempty"`
16909}
16910
16911// FirewallPolicyFilterRuleCollection firewall Policy Filter Rule Collection.
16912type FirewallPolicyFilterRuleCollection struct {
16913	// Action - The action type of a Filter rule collection.
16914	Action *FirewallPolicyFilterRuleCollectionAction `json:"action,omitempty"`
16915	// Rules - List of rules included in a rule collection.
16916	Rules *[]BasicFirewallPolicyRule `json:"rules,omitempty"`
16917	// Name - The name of the rule collection.
16918	Name *string `json:"name,omitempty"`
16919	// Priority - Priority of the Firewall Policy Rule Collection resource.
16920	Priority *int32 `json:"priority,omitempty"`
16921	// RuleCollectionType - Possible values include: 'RuleCollectionTypeFirewallPolicyRuleCollection', 'RuleCollectionTypeFirewallPolicyNatRuleCollection', 'RuleCollectionTypeFirewallPolicyFilterRuleCollection'
16922	RuleCollectionType RuleCollectionType `json:"ruleCollectionType,omitempty"`
16923}
16924
16925// MarshalJSON is the custom marshaler for FirewallPolicyFilterRuleCollection.
16926func (fpfrc FirewallPolicyFilterRuleCollection) MarshalJSON() ([]byte, error) {
16927	fpfrc.RuleCollectionType = RuleCollectionTypeFirewallPolicyFilterRuleCollection
16928	objectMap := make(map[string]interface{})
16929	if fpfrc.Action != nil {
16930		objectMap["action"] = fpfrc.Action
16931	}
16932	if fpfrc.Rules != nil {
16933		objectMap["rules"] = fpfrc.Rules
16934	}
16935	if fpfrc.Name != nil {
16936		objectMap["name"] = fpfrc.Name
16937	}
16938	if fpfrc.Priority != nil {
16939		objectMap["priority"] = fpfrc.Priority
16940	}
16941	if fpfrc.RuleCollectionType != "" {
16942		objectMap["ruleCollectionType"] = fpfrc.RuleCollectionType
16943	}
16944	return json.Marshal(objectMap)
16945}
16946
16947// AsFirewallPolicyNatRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection.
16948func (fpfrc FirewallPolicyFilterRuleCollection) AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool) {
16949	return nil, false
16950}
16951
16952// AsFirewallPolicyFilterRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection.
16953func (fpfrc FirewallPolicyFilterRuleCollection) AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool) {
16954	return &fpfrc, true
16955}
16956
16957// AsFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection.
16958func (fpfrc FirewallPolicyFilterRuleCollection) AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool) {
16959	return nil, false
16960}
16961
16962// AsBasicFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection.
16963func (fpfrc FirewallPolicyFilterRuleCollection) AsBasicFirewallPolicyRuleCollection() (BasicFirewallPolicyRuleCollection, bool) {
16964	return &fpfrc, true
16965}
16966
16967// UnmarshalJSON is the custom unmarshaler for FirewallPolicyFilterRuleCollection struct.
16968func (fpfrc *FirewallPolicyFilterRuleCollection) UnmarshalJSON(body []byte) error {
16969	var m map[string]*json.RawMessage
16970	err := json.Unmarshal(body, &m)
16971	if err != nil {
16972		return err
16973	}
16974	for k, v := range m {
16975		switch k {
16976		case "action":
16977			if v != nil {
16978				var action FirewallPolicyFilterRuleCollectionAction
16979				err = json.Unmarshal(*v, &action)
16980				if err != nil {
16981					return err
16982				}
16983				fpfrc.Action = &action
16984			}
16985		case "rules":
16986			if v != nil {
16987				rules, err := unmarshalBasicFirewallPolicyRuleArray(*v)
16988				if err != nil {
16989					return err
16990				}
16991				fpfrc.Rules = &rules
16992			}
16993		case "name":
16994			if v != nil {
16995				var name string
16996				err = json.Unmarshal(*v, &name)
16997				if err != nil {
16998					return err
16999				}
17000				fpfrc.Name = &name
17001			}
17002		case "priority":
17003			if v != nil {
17004				var priority int32
17005				err = json.Unmarshal(*v, &priority)
17006				if err != nil {
17007					return err
17008				}
17009				fpfrc.Priority = &priority
17010			}
17011		case "ruleCollectionType":
17012			if v != nil {
17013				var ruleCollectionType RuleCollectionType
17014				err = json.Unmarshal(*v, &ruleCollectionType)
17015				if err != nil {
17016					return err
17017				}
17018				fpfrc.RuleCollectionType = ruleCollectionType
17019			}
17020		}
17021	}
17022
17023	return nil
17024}
17025
17026// FirewallPolicyFilterRuleCollectionAction properties of the FirewallPolicyFilterRuleCollectionAction.
17027type FirewallPolicyFilterRuleCollectionAction struct {
17028	// Type - The type of action. Possible values include: 'FirewallPolicyFilterRuleCollectionActionTypeAllow', 'FirewallPolicyFilterRuleCollectionActionTypeDeny'
17029	Type FirewallPolicyFilterRuleCollectionActionType `json:"type,omitempty"`
17030}
17031
17032// FirewallPolicyInsights firewall Policy Insights.
17033type FirewallPolicyInsights struct {
17034	// IsEnabled - A flag to indicate if the insights are enabled on the policy.
17035	IsEnabled *bool `json:"isEnabled,omitempty"`
17036	// RetentionDays - Number of days the insights should be enabled on the policy.
17037	RetentionDays *int32 `json:"retentionDays,omitempty"`
17038	// LogAnalyticsResources - Workspaces needed to configure the Firewall Policy Insights.
17039	LogAnalyticsResources *FirewallPolicyLogAnalyticsResources `json:"logAnalyticsResources,omitempty"`
17040}
17041
17042// FirewallPolicyIntrusionDetection configuration for intrusion detection mode and rules.
17043type FirewallPolicyIntrusionDetection struct {
17044	// Mode - Intrusion detection general state. Possible values include: 'FirewallPolicyIntrusionDetectionStateTypeOff', 'FirewallPolicyIntrusionDetectionStateTypeAlert', 'FirewallPolicyIntrusionDetectionStateTypeDeny'
17045	Mode FirewallPolicyIntrusionDetectionStateType `json:"mode,omitempty"`
17046	// Configuration - Intrusion detection configuration properties.
17047	Configuration *FirewallPolicyIntrusionDetectionConfiguration `json:"configuration,omitempty"`
17048}
17049
17050// FirewallPolicyIntrusionDetectionBypassTrafficSpecifications intrusion detection bypass traffic
17051// specification.
17052type FirewallPolicyIntrusionDetectionBypassTrafficSpecifications struct {
17053	// Name - Name of the bypass traffic rule.
17054	Name *string `json:"name,omitempty"`
17055	// Description - Description of the bypass traffic rule.
17056	Description *string `json:"description,omitempty"`
17057	// Protocol - The rule bypass protocol. Possible values include: 'FirewallPolicyIntrusionDetectionProtocolTCP', 'FirewallPolicyIntrusionDetectionProtocolUDP', 'FirewallPolicyIntrusionDetectionProtocolICMP', 'FirewallPolicyIntrusionDetectionProtocolANY'
17058	Protocol FirewallPolicyIntrusionDetectionProtocol `json:"protocol,omitempty"`
17059	// SourceAddresses - List of source IP addresses or ranges for this rule.
17060	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
17061	// DestinationAddresses - List of destination IP addresses or ranges for this rule.
17062	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
17063	// DestinationPorts - List of destination ports or ranges.
17064	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
17065	// SourceIPGroups - List of source IpGroups for this rule.
17066	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
17067	// DestinationIPGroups - List of destination IpGroups for this rule.
17068	DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"`
17069}
17070
17071// FirewallPolicyIntrusionDetectionConfiguration the operation for configuring intrusion detection.
17072type FirewallPolicyIntrusionDetectionConfiguration struct {
17073	// SignatureOverrides - List of specific signatures states.
17074	SignatureOverrides *[]FirewallPolicyIntrusionDetectionSignatureSpecification `json:"signatureOverrides,omitempty"`
17075	// BypassTrafficSettings - List of rules for traffic to bypass.
17076	BypassTrafficSettings *[]FirewallPolicyIntrusionDetectionBypassTrafficSpecifications `json:"bypassTrafficSettings,omitempty"`
17077}
17078
17079// FirewallPolicyIntrusionDetectionSignatureSpecification intrusion detection signatures specification
17080// states.
17081type FirewallPolicyIntrusionDetectionSignatureSpecification struct {
17082	// ID - Signature id.
17083	ID *string `json:"id,omitempty"`
17084	// Mode - The signature state. Possible values include: 'FirewallPolicyIntrusionDetectionStateTypeOff', 'FirewallPolicyIntrusionDetectionStateTypeAlert', 'FirewallPolicyIntrusionDetectionStateTypeDeny'
17085	Mode FirewallPolicyIntrusionDetectionStateType `json:"mode,omitempty"`
17086}
17087
17088// FirewallPolicyListResult response for ListFirewallPolicies API service call.
17089type FirewallPolicyListResult struct {
17090	autorest.Response `json:"-"`
17091	// Value - List of Firewall Policies in a resource group.
17092	Value *[]FirewallPolicy `json:"value,omitempty"`
17093	// NextLink - URL to get the next set of results.
17094	NextLink *string `json:"nextLink,omitempty"`
17095}
17096
17097// FirewallPolicyListResultIterator provides access to a complete listing of FirewallPolicy values.
17098type FirewallPolicyListResultIterator struct {
17099	i    int
17100	page FirewallPolicyListResultPage
17101}
17102
17103// NextWithContext advances to the next value.  If there was an error making
17104// the request the iterator does not advance and the error is returned.
17105func (iter *FirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
17106	if tracing.IsEnabled() {
17107		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultIterator.NextWithContext")
17108		defer func() {
17109			sc := -1
17110			if iter.Response().Response.Response != nil {
17111				sc = iter.Response().Response.Response.StatusCode
17112			}
17113			tracing.EndSpan(ctx, sc, err)
17114		}()
17115	}
17116	iter.i++
17117	if iter.i < len(iter.page.Values()) {
17118		return nil
17119	}
17120	err = iter.page.NextWithContext(ctx)
17121	if err != nil {
17122		iter.i--
17123		return err
17124	}
17125	iter.i = 0
17126	return nil
17127}
17128
17129// Next advances to the next value.  If there was an error making
17130// the request the iterator does not advance and the error is returned.
17131// Deprecated: Use NextWithContext() instead.
17132func (iter *FirewallPolicyListResultIterator) Next() error {
17133	return iter.NextWithContext(context.Background())
17134}
17135
17136// NotDone returns true if the enumeration should be started or is not yet complete.
17137func (iter FirewallPolicyListResultIterator) NotDone() bool {
17138	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17139}
17140
17141// Response returns the raw server response from the last page request.
17142func (iter FirewallPolicyListResultIterator) Response() FirewallPolicyListResult {
17143	return iter.page.Response()
17144}
17145
17146// Value returns the current value or a zero-initialized value if the
17147// iterator has advanced beyond the end of the collection.
17148func (iter FirewallPolicyListResultIterator) Value() FirewallPolicy {
17149	if !iter.page.NotDone() {
17150		return FirewallPolicy{}
17151	}
17152	return iter.page.Values()[iter.i]
17153}
17154
17155// Creates a new instance of the FirewallPolicyListResultIterator type.
17156func NewFirewallPolicyListResultIterator(page FirewallPolicyListResultPage) FirewallPolicyListResultIterator {
17157	return FirewallPolicyListResultIterator{page: page}
17158}
17159
17160// IsEmpty returns true if the ListResult contains no values.
17161func (fplr FirewallPolicyListResult) IsEmpty() bool {
17162	return fplr.Value == nil || len(*fplr.Value) == 0
17163}
17164
17165// hasNextLink returns true if the NextLink is not empty.
17166func (fplr FirewallPolicyListResult) hasNextLink() bool {
17167	return fplr.NextLink != nil && len(*fplr.NextLink) != 0
17168}
17169
17170// firewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
17171// It returns nil if no more results exist.
17172func (fplr FirewallPolicyListResult) firewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
17173	if !fplr.hasNextLink() {
17174		return nil, nil
17175	}
17176	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17177		autorest.AsJSON(),
17178		autorest.AsGet(),
17179		autorest.WithBaseURL(to.String(fplr.NextLink)))
17180}
17181
17182// FirewallPolicyListResultPage contains a page of FirewallPolicy values.
17183type FirewallPolicyListResultPage struct {
17184	fn   func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)
17185	fplr FirewallPolicyListResult
17186}
17187
17188// NextWithContext advances to the next page of values.  If there was an error making
17189// the request the page does not advance and the error is returned.
17190func (page *FirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
17191	if tracing.IsEnabled() {
17192		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultPage.NextWithContext")
17193		defer func() {
17194			sc := -1
17195			if page.Response().Response.Response != nil {
17196				sc = page.Response().Response.Response.StatusCode
17197			}
17198			tracing.EndSpan(ctx, sc, err)
17199		}()
17200	}
17201	for {
17202		next, err := page.fn(ctx, page.fplr)
17203		if err != nil {
17204			return err
17205		}
17206		page.fplr = next
17207		if !next.hasNextLink() || !next.IsEmpty() {
17208			break
17209		}
17210	}
17211	return nil
17212}
17213
17214// Next advances to the next page of values.  If there was an error making
17215// the request the page does not advance and the error is returned.
17216// Deprecated: Use NextWithContext() instead.
17217func (page *FirewallPolicyListResultPage) Next() error {
17218	return page.NextWithContext(context.Background())
17219}
17220
17221// NotDone returns true if the page enumeration should be started or is not yet complete.
17222func (page FirewallPolicyListResultPage) NotDone() bool {
17223	return !page.fplr.IsEmpty()
17224}
17225
17226// Response returns the raw server response from the last page request.
17227func (page FirewallPolicyListResultPage) Response() FirewallPolicyListResult {
17228	return page.fplr
17229}
17230
17231// Values returns the slice of values for the current page or nil if there are no values.
17232func (page FirewallPolicyListResultPage) Values() []FirewallPolicy {
17233	if page.fplr.IsEmpty() {
17234		return nil
17235	}
17236	return *page.fplr.Value
17237}
17238
17239// Creates a new instance of the FirewallPolicyListResultPage type.
17240func NewFirewallPolicyListResultPage(cur FirewallPolicyListResult, getNextPage func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)) FirewallPolicyListResultPage {
17241	return FirewallPolicyListResultPage{
17242		fn:   getNextPage,
17243		fplr: cur,
17244	}
17245}
17246
17247// FirewallPolicyLogAnalyticsResources log Analytics Resources for Firewall Policy Insights.
17248type FirewallPolicyLogAnalyticsResources struct {
17249	// Workspaces - List of workspaces for Firewall Policy Insights.
17250	Workspaces *[]FirewallPolicyLogAnalyticsWorkspace `json:"workspaces,omitempty"`
17251	// DefaultWorkspaceID - The default workspace Id for Firewall Policy Insights.
17252	DefaultWorkspaceID *SubResource `json:"defaultWorkspaceId,omitempty"`
17253}
17254
17255// FirewallPolicyLogAnalyticsWorkspace log Analytics Workspace for Firewall Policy Insights.
17256type FirewallPolicyLogAnalyticsWorkspace struct {
17257	// Region - Region to configure the Workspace.
17258	Region *string `json:"region,omitempty"`
17259	// WorkspaceID - The workspace Id for Firewall Policy Insights.
17260	WorkspaceID *SubResource `json:"workspaceId,omitempty"`
17261}
17262
17263// FirewallPolicyNatRuleCollection firewall Policy NAT Rule Collection.
17264type FirewallPolicyNatRuleCollection struct {
17265	// Action - The action type of a Nat rule collection.
17266	Action *FirewallPolicyNatRuleCollectionAction `json:"action,omitempty"`
17267	// Rules - List of rules included in a rule collection.
17268	Rules *[]BasicFirewallPolicyRule `json:"rules,omitempty"`
17269	// Name - The name of the rule collection.
17270	Name *string `json:"name,omitempty"`
17271	// Priority - Priority of the Firewall Policy Rule Collection resource.
17272	Priority *int32 `json:"priority,omitempty"`
17273	// RuleCollectionType - Possible values include: 'RuleCollectionTypeFirewallPolicyRuleCollection', 'RuleCollectionTypeFirewallPolicyNatRuleCollection', 'RuleCollectionTypeFirewallPolicyFilterRuleCollection'
17274	RuleCollectionType RuleCollectionType `json:"ruleCollectionType,omitempty"`
17275}
17276
17277// MarshalJSON is the custom marshaler for FirewallPolicyNatRuleCollection.
17278func (fpnrc FirewallPolicyNatRuleCollection) MarshalJSON() ([]byte, error) {
17279	fpnrc.RuleCollectionType = RuleCollectionTypeFirewallPolicyNatRuleCollection
17280	objectMap := make(map[string]interface{})
17281	if fpnrc.Action != nil {
17282		objectMap["action"] = fpnrc.Action
17283	}
17284	if fpnrc.Rules != nil {
17285		objectMap["rules"] = fpnrc.Rules
17286	}
17287	if fpnrc.Name != nil {
17288		objectMap["name"] = fpnrc.Name
17289	}
17290	if fpnrc.Priority != nil {
17291		objectMap["priority"] = fpnrc.Priority
17292	}
17293	if fpnrc.RuleCollectionType != "" {
17294		objectMap["ruleCollectionType"] = fpnrc.RuleCollectionType
17295	}
17296	return json.Marshal(objectMap)
17297}
17298
17299// AsFirewallPolicyNatRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection.
17300func (fpnrc FirewallPolicyNatRuleCollection) AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool) {
17301	return &fpnrc, true
17302}
17303
17304// AsFirewallPolicyFilterRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection.
17305func (fpnrc FirewallPolicyNatRuleCollection) AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool) {
17306	return nil, false
17307}
17308
17309// AsFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection.
17310func (fpnrc FirewallPolicyNatRuleCollection) AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool) {
17311	return nil, false
17312}
17313
17314// AsBasicFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection.
17315func (fpnrc FirewallPolicyNatRuleCollection) AsBasicFirewallPolicyRuleCollection() (BasicFirewallPolicyRuleCollection, bool) {
17316	return &fpnrc, true
17317}
17318
17319// UnmarshalJSON is the custom unmarshaler for FirewallPolicyNatRuleCollection struct.
17320func (fpnrc *FirewallPolicyNatRuleCollection) UnmarshalJSON(body []byte) error {
17321	var m map[string]*json.RawMessage
17322	err := json.Unmarshal(body, &m)
17323	if err != nil {
17324		return err
17325	}
17326	for k, v := range m {
17327		switch k {
17328		case "action":
17329			if v != nil {
17330				var action FirewallPolicyNatRuleCollectionAction
17331				err = json.Unmarshal(*v, &action)
17332				if err != nil {
17333					return err
17334				}
17335				fpnrc.Action = &action
17336			}
17337		case "rules":
17338			if v != nil {
17339				rules, err := unmarshalBasicFirewallPolicyRuleArray(*v)
17340				if err != nil {
17341					return err
17342				}
17343				fpnrc.Rules = &rules
17344			}
17345		case "name":
17346			if v != nil {
17347				var name string
17348				err = json.Unmarshal(*v, &name)
17349				if err != nil {
17350					return err
17351				}
17352				fpnrc.Name = &name
17353			}
17354		case "priority":
17355			if v != nil {
17356				var priority int32
17357				err = json.Unmarshal(*v, &priority)
17358				if err != nil {
17359					return err
17360				}
17361				fpnrc.Priority = &priority
17362			}
17363		case "ruleCollectionType":
17364			if v != nil {
17365				var ruleCollectionType RuleCollectionType
17366				err = json.Unmarshal(*v, &ruleCollectionType)
17367				if err != nil {
17368					return err
17369				}
17370				fpnrc.RuleCollectionType = ruleCollectionType
17371			}
17372		}
17373	}
17374
17375	return nil
17376}
17377
17378// FirewallPolicyNatRuleCollectionAction properties of the FirewallPolicyNatRuleCollectionAction.
17379type FirewallPolicyNatRuleCollectionAction struct {
17380	// Type - The type of action. Possible values include: 'FirewallPolicyNatRuleCollectionActionTypeDNAT'
17381	Type FirewallPolicyNatRuleCollectionActionType `json:"type,omitempty"`
17382}
17383
17384// FirewallPolicyPropertiesFormat firewall Policy definition.
17385type FirewallPolicyPropertiesFormat struct {
17386	// RuleCollectionGroups - READ-ONLY; List of references to FirewallPolicyRuleCollectionGroups.
17387	RuleCollectionGroups *[]SubResource `json:"ruleCollectionGroups,omitempty"`
17388	// ProvisioningState - READ-ONLY; The provisioning state of the firewall policy resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
17389	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17390	// BasePolicy - The parent firewall policy from which rules are inherited.
17391	BasePolicy *SubResource `json:"basePolicy,omitempty"`
17392	// Firewalls - READ-ONLY; List of references to Azure Firewalls that this Firewall Policy is associated with.
17393	Firewalls *[]SubResource `json:"firewalls,omitempty"`
17394	// ChildPolicies - READ-ONLY; List of references to Child Firewall Policies.
17395	ChildPolicies *[]SubResource `json:"childPolicies,omitempty"`
17396	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
17397	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
17398	// ThreatIntelWhitelist - ThreatIntel Whitelist for Firewall Policy.
17399	ThreatIntelWhitelist *FirewallPolicyThreatIntelWhitelist `json:"threatIntelWhitelist,omitempty"`
17400	// Insights - Insights on Firewall Policy.
17401	Insights *FirewallPolicyInsights `json:"insights,omitempty"`
17402	// Snat - The private IP addresses/IP ranges to which traffic will not be SNAT.
17403	Snat *FirewallPolicySNAT `json:"snat,omitempty"`
17404	// DNSSettings - DNS Proxy Settings definition.
17405	DNSSettings *DNSSettings `json:"dnsSettings,omitempty"`
17406	// IntrusionDetection - The configuration for Intrusion detection.
17407	IntrusionDetection *FirewallPolicyIntrusionDetection `json:"intrusionDetection,omitempty"`
17408	// TransportSecurity - TLS Configuration definition.
17409	TransportSecurity *FirewallPolicyTransportSecurity `json:"transportSecurity,omitempty"`
17410	// Sku - The Firewall Policy SKU.
17411	Sku *FirewallPolicySku `json:"sku,omitempty"`
17412}
17413
17414// MarshalJSON is the custom marshaler for FirewallPolicyPropertiesFormat.
17415func (fppf FirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
17416	objectMap := make(map[string]interface{})
17417	if fppf.BasePolicy != nil {
17418		objectMap["basePolicy"] = fppf.BasePolicy
17419	}
17420	if fppf.ThreatIntelMode != "" {
17421		objectMap["threatIntelMode"] = fppf.ThreatIntelMode
17422	}
17423	if fppf.ThreatIntelWhitelist != nil {
17424		objectMap["threatIntelWhitelist"] = fppf.ThreatIntelWhitelist
17425	}
17426	if fppf.Insights != nil {
17427		objectMap["insights"] = fppf.Insights
17428	}
17429	if fppf.Snat != nil {
17430		objectMap["snat"] = fppf.Snat
17431	}
17432	if fppf.DNSSettings != nil {
17433		objectMap["dnsSettings"] = fppf.DNSSettings
17434	}
17435	if fppf.IntrusionDetection != nil {
17436		objectMap["intrusionDetection"] = fppf.IntrusionDetection
17437	}
17438	if fppf.TransportSecurity != nil {
17439		objectMap["transportSecurity"] = fppf.TransportSecurity
17440	}
17441	if fppf.Sku != nil {
17442		objectMap["sku"] = fppf.Sku
17443	}
17444	return json.Marshal(objectMap)
17445}
17446
17447// BasicFirewallPolicyRule properties of a rule.
17448type BasicFirewallPolicyRule interface {
17449	AsApplicationRule() (*ApplicationRule, bool)
17450	AsNatRule() (*NatRule, bool)
17451	AsRule() (*Rule, bool)
17452	AsFirewallPolicyRule() (*FirewallPolicyRule, bool)
17453}
17454
17455// FirewallPolicyRule properties of a rule.
17456type FirewallPolicyRule struct {
17457	// Name - Name of the rule.
17458	Name *string `json:"name,omitempty"`
17459	// Description - Description of the rule.
17460	Description *string `json:"description,omitempty"`
17461	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule'
17462	RuleType RuleType `json:"ruleType,omitempty"`
17463}
17464
17465func unmarshalBasicFirewallPolicyRule(body []byte) (BasicFirewallPolicyRule, error) {
17466	var m map[string]interface{}
17467	err := json.Unmarshal(body, &m)
17468	if err != nil {
17469		return nil, err
17470	}
17471
17472	switch m["ruleType"] {
17473	case string(RuleTypeApplicationRule):
17474		var ar ApplicationRule
17475		err := json.Unmarshal(body, &ar)
17476		return ar, err
17477	case string(RuleTypeNatRule):
17478		var nr NatRule
17479		err := json.Unmarshal(body, &nr)
17480		return nr, err
17481	case string(RuleTypeNetworkRule):
17482		var r Rule
17483		err := json.Unmarshal(body, &r)
17484		return r, err
17485	default:
17486		var fpr FirewallPolicyRule
17487		err := json.Unmarshal(body, &fpr)
17488		return fpr, err
17489	}
17490}
17491func unmarshalBasicFirewallPolicyRuleArray(body []byte) ([]BasicFirewallPolicyRule, error) {
17492	var rawMessages []*json.RawMessage
17493	err := json.Unmarshal(body, &rawMessages)
17494	if err != nil {
17495		return nil, err
17496	}
17497
17498	fprArray := make([]BasicFirewallPolicyRule, len(rawMessages))
17499
17500	for index, rawMessage := range rawMessages {
17501		fpr, err := unmarshalBasicFirewallPolicyRule(*rawMessage)
17502		if err != nil {
17503			return nil, err
17504		}
17505		fprArray[index] = fpr
17506	}
17507	return fprArray, nil
17508}
17509
17510// MarshalJSON is the custom marshaler for FirewallPolicyRule.
17511func (fpr FirewallPolicyRule) MarshalJSON() ([]byte, error) {
17512	fpr.RuleType = RuleTypeFirewallPolicyRule
17513	objectMap := make(map[string]interface{})
17514	if fpr.Name != nil {
17515		objectMap["name"] = fpr.Name
17516	}
17517	if fpr.Description != nil {
17518		objectMap["description"] = fpr.Description
17519	}
17520	if fpr.RuleType != "" {
17521		objectMap["ruleType"] = fpr.RuleType
17522	}
17523	return json.Marshal(objectMap)
17524}
17525
17526// AsApplicationRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
17527func (fpr FirewallPolicyRule) AsApplicationRule() (*ApplicationRule, bool) {
17528	return nil, false
17529}
17530
17531// AsNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
17532func (fpr FirewallPolicyRule) AsNatRule() (*NatRule, bool) {
17533	return nil, false
17534}
17535
17536// AsRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
17537func (fpr FirewallPolicyRule) AsRule() (*Rule, bool) {
17538	return nil, false
17539}
17540
17541// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
17542func (fpr FirewallPolicyRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
17543	return &fpr, true
17544}
17545
17546// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
17547func (fpr FirewallPolicyRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
17548	return &fpr, true
17549}
17550
17551// FirewallPolicyRuleApplicationProtocol properties of the application rule protocol.
17552type FirewallPolicyRuleApplicationProtocol struct {
17553	// ProtocolType - Protocol type. Possible values include: 'FirewallPolicyRuleApplicationProtocolTypeHTTP', 'FirewallPolicyRuleApplicationProtocolTypeHTTPS'
17554	ProtocolType FirewallPolicyRuleApplicationProtocolType `json:"protocolType,omitempty"`
17555	// Port - Port number for the protocol, cannot be greater than 64000.
17556	Port *int32 `json:"port,omitempty"`
17557}
17558
17559// BasicFirewallPolicyRuleCollection properties of the rule collection.
17560type BasicFirewallPolicyRuleCollection interface {
17561	AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool)
17562	AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool)
17563	AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool)
17564}
17565
17566// FirewallPolicyRuleCollection properties of the rule collection.
17567type FirewallPolicyRuleCollection struct {
17568	// Name - The name of the rule collection.
17569	Name *string `json:"name,omitempty"`
17570	// Priority - Priority of the Firewall Policy Rule Collection resource.
17571	Priority *int32 `json:"priority,omitempty"`
17572	// RuleCollectionType - Possible values include: 'RuleCollectionTypeFirewallPolicyRuleCollection', 'RuleCollectionTypeFirewallPolicyNatRuleCollection', 'RuleCollectionTypeFirewallPolicyFilterRuleCollection'
17573	RuleCollectionType RuleCollectionType `json:"ruleCollectionType,omitempty"`
17574}
17575
17576func unmarshalBasicFirewallPolicyRuleCollection(body []byte) (BasicFirewallPolicyRuleCollection, error) {
17577	var m map[string]interface{}
17578	err := json.Unmarshal(body, &m)
17579	if err != nil {
17580		return nil, err
17581	}
17582
17583	switch m["ruleCollectionType"] {
17584	case string(RuleCollectionTypeFirewallPolicyNatRuleCollection):
17585		var fpnrc FirewallPolicyNatRuleCollection
17586		err := json.Unmarshal(body, &fpnrc)
17587		return fpnrc, err
17588	case string(RuleCollectionTypeFirewallPolicyFilterRuleCollection):
17589		var fpfrc FirewallPolicyFilterRuleCollection
17590		err := json.Unmarshal(body, &fpfrc)
17591		return fpfrc, err
17592	default:
17593		var fprc FirewallPolicyRuleCollection
17594		err := json.Unmarshal(body, &fprc)
17595		return fprc, err
17596	}
17597}
17598func unmarshalBasicFirewallPolicyRuleCollectionArray(body []byte) ([]BasicFirewallPolicyRuleCollection, error) {
17599	var rawMessages []*json.RawMessage
17600	err := json.Unmarshal(body, &rawMessages)
17601	if err != nil {
17602		return nil, err
17603	}
17604
17605	fprcArray := make([]BasicFirewallPolicyRuleCollection, len(rawMessages))
17606
17607	for index, rawMessage := range rawMessages {
17608		fprc, err := unmarshalBasicFirewallPolicyRuleCollection(*rawMessage)
17609		if err != nil {
17610			return nil, err
17611		}
17612		fprcArray[index] = fprc
17613	}
17614	return fprcArray, nil
17615}
17616
17617// MarshalJSON is the custom marshaler for FirewallPolicyRuleCollection.
17618func (fprc FirewallPolicyRuleCollection) MarshalJSON() ([]byte, error) {
17619	fprc.RuleCollectionType = RuleCollectionTypeFirewallPolicyRuleCollection
17620	objectMap := make(map[string]interface{})
17621	if fprc.Name != nil {
17622		objectMap["name"] = fprc.Name
17623	}
17624	if fprc.Priority != nil {
17625		objectMap["priority"] = fprc.Priority
17626	}
17627	if fprc.RuleCollectionType != "" {
17628		objectMap["ruleCollectionType"] = fprc.RuleCollectionType
17629	}
17630	return json.Marshal(objectMap)
17631}
17632
17633// AsFirewallPolicyNatRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection.
17634func (fprc FirewallPolicyRuleCollection) AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool) {
17635	return nil, false
17636}
17637
17638// AsFirewallPolicyFilterRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection.
17639func (fprc FirewallPolicyRuleCollection) AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool) {
17640	return nil, false
17641}
17642
17643// AsFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection.
17644func (fprc FirewallPolicyRuleCollection) AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool) {
17645	return &fprc, true
17646}
17647
17648// AsBasicFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection.
17649func (fprc FirewallPolicyRuleCollection) AsBasicFirewallPolicyRuleCollection() (BasicFirewallPolicyRuleCollection, bool) {
17650	return &fprc, true
17651}
17652
17653// FirewallPolicyRuleCollectionGroup rule Collection Group resource.
17654type FirewallPolicyRuleCollectionGroup struct {
17655	autorest.Response `json:"-"`
17656	// FirewallPolicyRuleCollectionGroupProperties - The properties of the firewall policy rule collection group.
17657	*FirewallPolicyRuleCollectionGroupProperties `json:"properties,omitempty"`
17658	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17659	Name *string `json:"name,omitempty"`
17660	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
17661	Etag *string `json:"etag,omitempty"`
17662	// Type - READ-ONLY; Rule Group type.
17663	Type *string `json:"type,omitempty"`
17664	// ID - Resource ID.
17665	ID *string `json:"id,omitempty"`
17666}
17667
17668// MarshalJSON is the custom marshaler for FirewallPolicyRuleCollectionGroup.
17669func (fprcg FirewallPolicyRuleCollectionGroup) MarshalJSON() ([]byte, error) {
17670	objectMap := make(map[string]interface{})
17671	if fprcg.FirewallPolicyRuleCollectionGroupProperties != nil {
17672		objectMap["properties"] = fprcg.FirewallPolicyRuleCollectionGroupProperties
17673	}
17674	if fprcg.Name != nil {
17675		objectMap["name"] = fprcg.Name
17676	}
17677	if fprcg.ID != nil {
17678		objectMap["id"] = fprcg.ID
17679	}
17680	return json.Marshal(objectMap)
17681}
17682
17683// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleCollectionGroup struct.
17684func (fprcg *FirewallPolicyRuleCollectionGroup) UnmarshalJSON(body []byte) error {
17685	var m map[string]*json.RawMessage
17686	err := json.Unmarshal(body, &m)
17687	if err != nil {
17688		return err
17689	}
17690	for k, v := range m {
17691		switch k {
17692		case "properties":
17693			if v != nil {
17694				var firewallPolicyRuleCollectionGroupProperties FirewallPolicyRuleCollectionGroupProperties
17695				err = json.Unmarshal(*v, &firewallPolicyRuleCollectionGroupProperties)
17696				if err != nil {
17697					return err
17698				}
17699				fprcg.FirewallPolicyRuleCollectionGroupProperties = &firewallPolicyRuleCollectionGroupProperties
17700			}
17701		case "name":
17702			if v != nil {
17703				var name string
17704				err = json.Unmarshal(*v, &name)
17705				if err != nil {
17706					return err
17707				}
17708				fprcg.Name = &name
17709			}
17710		case "etag":
17711			if v != nil {
17712				var etag string
17713				err = json.Unmarshal(*v, &etag)
17714				if err != nil {
17715					return err
17716				}
17717				fprcg.Etag = &etag
17718			}
17719		case "type":
17720			if v != nil {
17721				var typeVar string
17722				err = json.Unmarshal(*v, &typeVar)
17723				if err != nil {
17724					return err
17725				}
17726				fprcg.Type = &typeVar
17727			}
17728		case "id":
17729			if v != nil {
17730				var ID string
17731				err = json.Unmarshal(*v, &ID)
17732				if err != nil {
17733					return err
17734				}
17735				fprcg.ID = &ID
17736			}
17737		}
17738	}
17739
17740	return nil
17741}
17742
17743// FirewallPolicyRuleCollectionGroupListResult response for ListFirewallPolicyRuleCollectionGroups API
17744// service call.
17745type FirewallPolicyRuleCollectionGroupListResult struct {
17746	autorest.Response `json:"-"`
17747	// Value - List of FirewallPolicyRuleCollectionGroups in a FirewallPolicy.
17748	Value *[]FirewallPolicyRuleCollectionGroup `json:"value,omitempty"`
17749	// NextLink - URL to get the next set of results.
17750	NextLink *string `json:"nextLink,omitempty"`
17751}
17752
17753// FirewallPolicyRuleCollectionGroupListResultIterator provides access to a complete listing of
17754// FirewallPolicyRuleCollectionGroup values.
17755type FirewallPolicyRuleCollectionGroupListResultIterator struct {
17756	i    int
17757	page FirewallPolicyRuleCollectionGroupListResultPage
17758}
17759
17760// NextWithContext advances to the next value.  If there was an error making
17761// the request the iterator does not advance and the error is returned.
17762func (iter *FirewallPolicyRuleCollectionGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
17763	if tracing.IsEnabled() {
17764		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleCollectionGroupListResultIterator.NextWithContext")
17765		defer func() {
17766			sc := -1
17767			if iter.Response().Response.Response != nil {
17768				sc = iter.Response().Response.Response.StatusCode
17769			}
17770			tracing.EndSpan(ctx, sc, err)
17771		}()
17772	}
17773	iter.i++
17774	if iter.i < len(iter.page.Values()) {
17775		return nil
17776	}
17777	err = iter.page.NextWithContext(ctx)
17778	if err != nil {
17779		iter.i--
17780		return err
17781	}
17782	iter.i = 0
17783	return nil
17784}
17785
17786// Next advances to the next value.  If there was an error making
17787// the request the iterator does not advance and the error is returned.
17788// Deprecated: Use NextWithContext() instead.
17789func (iter *FirewallPolicyRuleCollectionGroupListResultIterator) Next() error {
17790	return iter.NextWithContext(context.Background())
17791}
17792
17793// NotDone returns true if the enumeration should be started or is not yet complete.
17794func (iter FirewallPolicyRuleCollectionGroupListResultIterator) NotDone() bool {
17795	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17796}
17797
17798// Response returns the raw server response from the last page request.
17799func (iter FirewallPolicyRuleCollectionGroupListResultIterator) Response() FirewallPolicyRuleCollectionGroupListResult {
17800	return iter.page.Response()
17801}
17802
17803// Value returns the current value or a zero-initialized value if the
17804// iterator has advanced beyond the end of the collection.
17805func (iter FirewallPolicyRuleCollectionGroupListResultIterator) Value() FirewallPolicyRuleCollectionGroup {
17806	if !iter.page.NotDone() {
17807		return FirewallPolicyRuleCollectionGroup{}
17808	}
17809	return iter.page.Values()[iter.i]
17810}
17811
17812// Creates a new instance of the FirewallPolicyRuleCollectionGroupListResultIterator type.
17813func NewFirewallPolicyRuleCollectionGroupListResultIterator(page FirewallPolicyRuleCollectionGroupListResultPage) FirewallPolicyRuleCollectionGroupListResultIterator {
17814	return FirewallPolicyRuleCollectionGroupListResultIterator{page: page}
17815}
17816
17817// IsEmpty returns true if the ListResult contains no values.
17818func (fprcglr FirewallPolicyRuleCollectionGroupListResult) IsEmpty() bool {
17819	return fprcglr.Value == nil || len(*fprcglr.Value) == 0
17820}
17821
17822// hasNextLink returns true if the NextLink is not empty.
17823func (fprcglr FirewallPolicyRuleCollectionGroupListResult) hasNextLink() bool {
17824	return fprcglr.NextLink != nil && len(*fprcglr.NextLink) != 0
17825}
17826
17827// firewallPolicyRuleCollectionGroupListResultPreparer prepares a request to retrieve the next set of results.
17828// It returns nil if no more results exist.
17829func (fprcglr FirewallPolicyRuleCollectionGroupListResult) firewallPolicyRuleCollectionGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
17830	if !fprcglr.hasNextLink() {
17831		return nil, nil
17832	}
17833	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17834		autorest.AsJSON(),
17835		autorest.AsGet(),
17836		autorest.WithBaseURL(to.String(fprcglr.NextLink)))
17837}
17838
17839// FirewallPolicyRuleCollectionGroupListResultPage contains a page of FirewallPolicyRuleCollectionGroup
17840// values.
17841type FirewallPolicyRuleCollectionGroupListResultPage struct {
17842	fn      func(context.Context, FirewallPolicyRuleCollectionGroupListResult) (FirewallPolicyRuleCollectionGroupListResult, error)
17843	fprcglr FirewallPolicyRuleCollectionGroupListResult
17844}
17845
17846// NextWithContext advances to the next page of values.  If there was an error making
17847// the request the page does not advance and the error is returned.
17848func (page *FirewallPolicyRuleCollectionGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
17849	if tracing.IsEnabled() {
17850		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleCollectionGroupListResultPage.NextWithContext")
17851		defer func() {
17852			sc := -1
17853			if page.Response().Response.Response != nil {
17854				sc = page.Response().Response.Response.StatusCode
17855			}
17856			tracing.EndSpan(ctx, sc, err)
17857		}()
17858	}
17859	for {
17860		next, err := page.fn(ctx, page.fprcglr)
17861		if err != nil {
17862			return err
17863		}
17864		page.fprcglr = next
17865		if !next.hasNextLink() || !next.IsEmpty() {
17866			break
17867		}
17868	}
17869	return nil
17870}
17871
17872// Next advances to the next page of values.  If there was an error making
17873// the request the page does not advance and the error is returned.
17874// Deprecated: Use NextWithContext() instead.
17875func (page *FirewallPolicyRuleCollectionGroupListResultPage) Next() error {
17876	return page.NextWithContext(context.Background())
17877}
17878
17879// NotDone returns true if the page enumeration should be started or is not yet complete.
17880func (page FirewallPolicyRuleCollectionGroupListResultPage) NotDone() bool {
17881	return !page.fprcglr.IsEmpty()
17882}
17883
17884// Response returns the raw server response from the last page request.
17885func (page FirewallPolicyRuleCollectionGroupListResultPage) Response() FirewallPolicyRuleCollectionGroupListResult {
17886	return page.fprcglr
17887}
17888
17889// Values returns the slice of values for the current page or nil if there are no values.
17890func (page FirewallPolicyRuleCollectionGroupListResultPage) Values() []FirewallPolicyRuleCollectionGroup {
17891	if page.fprcglr.IsEmpty() {
17892		return nil
17893	}
17894	return *page.fprcglr.Value
17895}
17896
17897// Creates a new instance of the FirewallPolicyRuleCollectionGroupListResultPage type.
17898func NewFirewallPolicyRuleCollectionGroupListResultPage(cur FirewallPolicyRuleCollectionGroupListResult, getNextPage func(context.Context, FirewallPolicyRuleCollectionGroupListResult) (FirewallPolicyRuleCollectionGroupListResult, error)) FirewallPolicyRuleCollectionGroupListResultPage {
17899	return FirewallPolicyRuleCollectionGroupListResultPage{
17900		fn:      getNextPage,
17901		fprcglr: cur,
17902	}
17903}
17904
17905// FirewallPolicyRuleCollectionGroupProperties properties of the rule collection group.
17906type FirewallPolicyRuleCollectionGroupProperties struct {
17907	// Priority - Priority of the Firewall Policy Rule Collection Group resource.
17908	Priority *int32 `json:"priority,omitempty"`
17909	// RuleCollections - Group of Firewall Policy rule collections.
17910	RuleCollections *[]BasicFirewallPolicyRuleCollection `json:"ruleCollections,omitempty"`
17911	// ProvisioningState - READ-ONLY; The provisioning state of the firewall policy rule collection group resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
17912	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17913}
17914
17915// MarshalJSON is the custom marshaler for FirewallPolicyRuleCollectionGroupProperties.
17916func (fprcgp FirewallPolicyRuleCollectionGroupProperties) MarshalJSON() ([]byte, error) {
17917	objectMap := make(map[string]interface{})
17918	if fprcgp.Priority != nil {
17919		objectMap["priority"] = fprcgp.Priority
17920	}
17921	if fprcgp.RuleCollections != nil {
17922		objectMap["ruleCollections"] = fprcgp.RuleCollections
17923	}
17924	return json.Marshal(objectMap)
17925}
17926
17927// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleCollectionGroupProperties struct.
17928func (fprcgp *FirewallPolicyRuleCollectionGroupProperties) UnmarshalJSON(body []byte) error {
17929	var m map[string]*json.RawMessage
17930	err := json.Unmarshal(body, &m)
17931	if err != nil {
17932		return err
17933	}
17934	for k, v := range m {
17935		switch k {
17936		case "priority":
17937			if v != nil {
17938				var priority int32
17939				err = json.Unmarshal(*v, &priority)
17940				if err != nil {
17941					return err
17942				}
17943				fprcgp.Priority = &priority
17944			}
17945		case "ruleCollections":
17946			if v != nil {
17947				ruleCollections, err := unmarshalBasicFirewallPolicyRuleCollectionArray(*v)
17948				if err != nil {
17949					return err
17950				}
17951				fprcgp.RuleCollections = &ruleCollections
17952			}
17953		case "provisioningState":
17954			if v != nil {
17955				var provisioningState ProvisioningState
17956				err = json.Unmarshal(*v, &provisioningState)
17957				if err != nil {
17958					return err
17959				}
17960				fprcgp.ProvisioningState = provisioningState
17961			}
17962		}
17963	}
17964
17965	return nil
17966}
17967
17968// FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
17969// results of a long-running operation.
17970type FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture struct {
17971	azure.FutureAPI
17972	// Result returns the result of the asynchronous operation.
17973	// If the operation has not completed it will return an error.
17974	Result func(FirewallPolicyRuleCollectionGroupsClient) (FirewallPolicyRuleCollectionGroup, error)
17975}
17976
17977// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17978func (future *FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17979	var azFuture azure.Future
17980	if err := json.Unmarshal(body, &azFuture); err != nil {
17981		return err
17982	}
17983	future.FutureAPI = &azFuture
17984	future.Result = future.result
17985	return nil
17986}
17987
17988// result is the default implementation for FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture.Result.
17989func (future *FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture) result(client FirewallPolicyRuleCollectionGroupsClient) (fprcg FirewallPolicyRuleCollectionGroup, err error) {
17990	var done bool
17991	done, err = future.DoneWithContext(context.Background(), client)
17992	if err != nil {
17993		err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17994		return
17995	}
17996	if !done {
17997		fprcg.Response.Response = future.Response()
17998		err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture")
17999		return
18000	}
18001	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18002	if fprcg.Response.Response, err = future.GetResult(sender); err == nil && fprcg.Response.Response.StatusCode != http.StatusNoContent {
18003		fprcg, err = client.CreateOrUpdateResponder(fprcg.Response.Response)
18004		if err != nil {
18005			err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture", "Result", fprcg.Response.Response, "Failure responding to request")
18006		}
18007	}
18008	return
18009}
18010
18011// FirewallPolicyRuleCollectionGroupsDeleteFuture an abstraction for monitoring and retrieving the results
18012// of a long-running operation.
18013type FirewallPolicyRuleCollectionGroupsDeleteFuture struct {
18014	azure.FutureAPI
18015	// Result returns the result of the asynchronous operation.
18016	// If the operation has not completed it will return an error.
18017	Result func(FirewallPolicyRuleCollectionGroupsClient) (autorest.Response, error)
18018}
18019
18020// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18021func (future *FirewallPolicyRuleCollectionGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
18022	var azFuture azure.Future
18023	if err := json.Unmarshal(body, &azFuture); err != nil {
18024		return err
18025	}
18026	future.FutureAPI = &azFuture
18027	future.Result = future.result
18028	return nil
18029}
18030
18031// result is the default implementation for FirewallPolicyRuleCollectionGroupsDeleteFuture.Result.
18032func (future *FirewallPolicyRuleCollectionGroupsDeleteFuture) result(client FirewallPolicyRuleCollectionGroupsClient) (ar autorest.Response, err error) {
18033	var done bool
18034	done, err = future.DoneWithContext(context.Background(), client)
18035	if err != nil {
18036		err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
18037		return
18038	}
18039	if !done {
18040		ar.Response = future.Response()
18041		err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleCollectionGroupsDeleteFuture")
18042		return
18043	}
18044	ar.Response = future.Response()
18045	return
18046}
18047
18048// FirewallPolicySku SKU of Firewall policy.
18049type FirewallPolicySku struct {
18050	// Tier - Tier of Firewall Policy. Possible values include: 'FirewallPolicySkuTierStandard', 'FirewallPolicySkuTierPremium'
18051	Tier FirewallPolicySkuTier `json:"tier,omitempty"`
18052}
18053
18054// FirewallPolicySNAT the private IP addresses/IP ranges to which traffic will not be SNAT.
18055type FirewallPolicySNAT struct {
18056	// PrivateRanges - List of private IP addresses/IP address ranges to not be SNAT.
18057	PrivateRanges *[]string `json:"privateRanges,omitempty"`
18058}
18059
18060// FirewallPolicyThreatIntelWhitelist threatIntel Whitelist for Firewall Policy.
18061type FirewallPolicyThreatIntelWhitelist struct {
18062	// IPAddresses - List of IP addresses for the ThreatIntel Whitelist.
18063	IPAddresses *[]string `json:"ipAddresses,omitempty"`
18064	// Fqdns - List of FQDNs for the ThreatIntel Whitelist.
18065	Fqdns *[]string `json:"fqdns,omitempty"`
18066}
18067
18068// FirewallPolicyTransportSecurity configuration needed to perform TLS termination & initiation.
18069type FirewallPolicyTransportSecurity struct {
18070	// CertificateAuthority - The CA used for intermediate CA generation.
18071	CertificateAuthority *FirewallPolicyCertificateAuthority `json:"certificateAuthority,omitempty"`
18072}
18073
18074// FlowLog a flow log resource.
18075type FlowLog struct {
18076	autorest.Response `json:"-"`
18077	// FlowLogPropertiesFormat - Properties of the flow log.
18078	*FlowLogPropertiesFormat `json:"properties,omitempty"`
18079	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
18080	Etag *string `json:"etag,omitempty"`
18081	// ID - Resource ID.
18082	ID *string `json:"id,omitempty"`
18083	// Name - READ-ONLY; Resource name.
18084	Name *string `json:"name,omitempty"`
18085	// Type - READ-ONLY; Resource type.
18086	Type *string `json:"type,omitempty"`
18087	// Location - Resource location.
18088	Location *string `json:"location,omitempty"`
18089	// Tags - Resource tags.
18090	Tags map[string]*string `json:"tags"`
18091}
18092
18093// MarshalJSON is the custom marshaler for FlowLog.
18094func (fl FlowLog) MarshalJSON() ([]byte, error) {
18095	objectMap := make(map[string]interface{})
18096	if fl.FlowLogPropertiesFormat != nil {
18097		objectMap["properties"] = fl.FlowLogPropertiesFormat
18098	}
18099	if fl.ID != nil {
18100		objectMap["id"] = fl.ID
18101	}
18102	if fl.Location != nil {
18103		objectMap["location"] = fl.Location
18104	}
18105	if fl.Tags != nil {
18106		objectMap["tags"] = fl.Tags
18107	}
18108	return json.Marshal(objectMap)
18109}
18110
18111// UnmarshalJSON is the custom unmarshaler for FlowLog struct.
18112func (fl *FlowLog) UnmarshalJSON(body []byte) error {
18113	var m map[string]*json.RawMessage
18114	err := json.Unmarshal(body, &m)
18115	if err != nil {
18116		return err
18117	}
18118	for k, v := range m {
18119		switch k {
18120		case "properties":
18121			if v != nil {
18122				var flowLogPropertiesFormat FlowLogPropertiesFormat
18123				err = json.Unmarshal(*v, &flowLogPropertiesFormat)
18124				if err != nil {
18125					return err
18126				}
18127				fl.FlowLogPropertiesFormat = &flowLogPropertiesFormat
18128			}
18129		case "etag":
18130			if v != nil {
18131				var etag string
18132				err = json.Unmarshal(*v, &etag)
18133				if err != nil {
18134					return err
18135				}
18136				fl.Etag = &etag
18137			}
18138		case "id":
18139			if v != nil {
18140				var ID string
18141				err = json.Unmarshal(*v, &ID)
18142				if err != nil {
18143					return err
18144				}
18145				fl.ID = &ID
18146			}
18147		case "name":
18148			if v != nil {
18149				var name string
18150				err = json.Unmarshal(*v, &name)
18151				if err != nil {
18152					return err
18153				}
18154				fl.Name = &name
18155			}
18156		case "type":
18157			if v != nil {
18158				var typeVar string
18159				err = json.Unmarshal(*v, &typeVar)
18160				if err != nil {
18161					return err
18162				}
18163				fl.Type = &typeVar
18164			}
18165		case "location":
18166			if v != nil {
18167				var location string
18168				err = json.Unmarshal(*v, &location)
18169				if err != nil {
18170					return err
18171				}
18172				fl.Location = &location
18173			}
18174		case "tags":
18175			if v != nil {
18176				var tags map[string]*string
18177				err = json.Unmarshal(*v, &tags)
18178				if err != nil {
18179					return err
18180				}
18181				fl.Tags = tags
18182			}
18183		}
18184	}
18185
18186	return nil
18187}
18188
18189// FlowLogFormatParameters parameters that define the flow log format.
18190type FlowLogFormatParameters struct {
18191	// Type - The file type of flow log. Possible values include: 'FlowLogFormatTypeJSON'
18192	Type FlowLogFormatType `json:"type,omitempty"`
18193	// Version - The version (revision) of the flow log.
18194	Version *int32 `json:"version,omitempty"`
18195}
18196
18197// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
18198type FlowLogInformation struct {
18199	autorest.Response `json:"-"`
18200	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
18201	TargetResourceID *string `json:"targetResourceId,omitempty"`
18202	// FlowLogProperties - Properties of the flow log.
18203	*FlowLogProperties `json:"properties,omitempty"`
18204	// FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
18205	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
18206}
18207
18208// MarshalJSON is the custom marshaler for FlowLogInformation.
18209func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
18210	objectMap := make(map[string]interface{})
18211	if fli.TargetResourceID != nil {
18212		objectMap["targetResourceId"] = fli.TargetResourceID
18213	}
18214	if fli.FlowLogProperties != nil {
18215		objectMap["properties"] = fli.FlowLogProperties
18216	}
18217	if fli.FlowAnalyticsConfiguration != nil {
18218		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
18219	}
18220	return json.Marshal(objectMap)
18221}
18222
18223// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
18224func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
18225	var m map[string]*json.RawMessage
18226	err := json.Unmarshal(body, &m)
18227	if err != nil {
18228		return err
18229	}
18230	for k, v := range m {
18231		switch k {
18232		case "targetResourceId":
18233			if v != nil {
18234				var targetResourceID string
18235				err = json.Unmarshal(*v, &targetResourceID)
18236				if err != nil {
18237					return err
18238				}
18239				fli.TargetResourceID = &targetResourceID
18240			}
18241		case "properties":
18242			if v != nil {
18243				var flowLogProperties FlowLogProperties
18244				err = json.Unmarshal(*v, &flowLogProperties)
18245				if err != nil {
18246					return err
18247				}
18248				fli.FlowLogProperties = &flowLogProperties
18249			}
18250		case "flowAnalyticsConfiguration":
18251			if v != nil {
18252				var flowAnalyticsConfiguration TrafficAnalyticsProperties
18253				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
18254				if err != nil {
18255					return err
18256				}
18257				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
18258			}
18259		}
18260	}
18261
18262	return nil
18263}
18264
18265// FlowLogListResult list of flow logs.
18266type FlowLogListResult struct {
18267	autorest.Response `json:"-"`
18268	// Value - Information about flow log resource.
18269	Value *[]FlowLog `json:"value,omitempty"`
18270	// NextLink - READ-ONLY; The URL to get the next set of results.
18271	NextLink *string `json:"nextLink,omitempty"`
18272}
18273
18274// MarshalJSON is the custom marshaler for FlowLogListResult.
18275func (fllr FlowLogListResult) MarshalJSON() ([]byte, error) {
18276	objectMap := make(map[string]interface{})
18277	if fllr.Value != nil {
18278		objectMap["value"] = fllr.Value
18279	}
18280	return json.Marshal(objectMap)
18281}
18282
18283// FlowLogListResultIterator provides access to a complete listing of FlowLog values.
18284type FlowLogListResultIterator struct {
18285	i    int
18286	page FlowLogListResultPage
18287}
18288
18289// NextWithContext advances to the next value.  If there was an error making
18290// the request the iterator does not advance and the error is returned.
18291func (iter *FlowLogListResultIterator) NextWithContext(ctx context.Context) (err error) {
18292	if tracing.IsEnabled() {
18293		ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogListResultIterator.NextWithContext")
18294		defer func() {
18295			sc := -1
18296			if iter.Response().Response.Response != nil {
18297				sc = iter.Response().Response.Response.StatusCode
18298			}
18299			tracing.EndSpan(ctx, sc, err)
18300		}()
18301	}
18302	iter.i++
18303	if iter.i < len(iter.page.Values()) {
18304		return nil
18305	}
18306	err = iter.page.NextWithContext(ctx)
18307	if err != nil {
18308		iter.i--
18309		return err
18310	}
18311	iter.i = 0
18312	return nil
18313}
18314
18315// Next advances to the next value.  If there was an error making
18316// the request the iterator does not advance and the error is returned.
18317// Deprecated: Use NextWithContext() instead.
18318func (iter *FlowLogListResultIterator) Next() error {
18319	return iter.NextWithContext(context.Background())
18320}
18321
18322// NotDone returns true if the enumeration should be started or is not yet complete.
18323func (iter FlowLogListResultIterator) NotDone() bool {
18324	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18325}
18326
18327// Response returns the raw server response from the last page request.
18328func (iter FlowLogListResultIterator) Response() FlowLogListResult {
18329	return iter.page.Response()
18330}
18331
18332// Value returns the current value or a zero-initialized value if the
18333// iterator has advanced beyond the end of the collection.
18334func (iter FlowLogListResultIterator) Value() FlowLog {
18335	if !iter.page.NotDone() {
18336		return FlowLog{}
18337	}
18338	return iter.page.Values()[iter.i]
18339}
18340
18341// Creates a new instance of the FlowLogListResultIterator type.
18342func NewFlowLogListResultIterator(page FlowLogListResultPage) FlowLogListResultIterator {
18343	return FlowLogListResultIterator{page: page}
18344}
18345
18346// IsEmpty returns true if the ListResult contains no values.
18347func (fllr FlowLogListResult) IsEmpty() bool {
18348	return fllr.Value == nil || len(*fllr.Value) == 0
18349}
18350
18351// hasNextLink returns true if the NextLink is not empty.
18352func (fllr FlowLogListResult) hasNextLink() bool {
18353	return fllr.NextLink != nil && len(*fllr.NextLink) != 0
18354}
18355
18356// flowLogListResultPreparer prepares a request to retrieve the next set of results.
18357// It returns nil if no more results exist.
18358func (fllr FlowLogListResult) flowLogListResultPreparer(ctx context.Context) (*http.Request, error) {
18359	if !fllr.hasNextLink() {
18360		return nil, nil
18361	}
18362	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18363		autorest.AsJSON(),
18364		autorest.AsGet(),
18365		autorest.WithBaseURL(to.String(fllr.NextLink)))
18366}
18367
18368// FlowLogListResultPage contains a page of FlowLog values.
18369type FlowLogListResultPage struct {
18370	fn   func(context.Context, FlowLogListResult) (FlowLogListResult, error)
18371	fllr FlowLogListResult
18372}
18373
18374// NextWithContext advances to the next page of values.  If there was an error making
18375// the request the page does not advance and the error is returned.
18376func (page *FlowLogListResultPage) NextWithContext(ctx context.Context) (err error) {
18377	if tracing.IsEnabled() {
18378		ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogListResultPage.NextWithContext")
18379		defer func() {
18380			sc := -1
18381			if page.Response().Response.Response != nil {
18382				sc = page.Response().Response.Response.StatusCode
18383			}
18384			tracing.EndSpan(ctx, sc, err)
18385		}()
18386	}
18387	for {
18388		next, err := page.fn(ctx, page.fllr)
18389		if err != nil {
18390			return err
18391		}
18392		page.fllr = next
18393		if !next.hasNextLink() || !next.IsEmpty() {
18394			break
18395		}
18396	}
18397	return nil
18398}
18399
18400// Next advances to the next page of values.  If there was an error making
18401// the request the page does not advance and the error is returned.
18402// Deprecated: Use NextWithContext() instead.
18403func (page *FlowLogListResultPage) Next() error {
18404	return page.NextWithContext(context.Background())
18405}
18406
18407// NotDone returns true if the page enumeration should be started or is not yet complete.
18408func (page FlowLogListResultPage) NotDone() bool {
18409	return !page.fllr.IsEmpty()
18410}
18411
18412// Response returns the raw server response from the last page request.
18413func (page FlowLogListResultPage) Response() FlowLogListResult {
18414	return page.fllr
18415}
18416
18417// Values returns the slice of values for the current page or nil if there are no values.
18418func (page FlowLogListResultPage) Values() []FlowLog {
18419	if page.fllr.IsEmpty() {
18420		return nil
18421	}
18422	return *page.fllr.Value
18423}
18424
18425// Creates a new instance of the FlowLogListResultPage type.
18426func NewFlowLogListResultPage(cur FlowLogListResult, getNextPage func(context.Context, FlowLogListResult) (FlowLogListResult, error)) FlowLogListResultPage {
18427	return FlowLogListResultPage{
18428		fn:   getNextPage,
18429		fllr: cur,
18430	}
18431}
18432
18433// FlowLogProperties parameters that define the configuration of flow log.
18434type FlowLogProperties struct {
18435	// StorageID - ID of the storage account which is used to store the flow log.
18436	StorageID *string `json:"storageId,omitempty"`
18437	// Enabled - Flag to enable/disable flow logging.
18438	Enabled *bool `json:"enabled,omitempty"`
18439	// RetentionPolicy - Parameters that define the retention policy for flow log.
18440	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
18441	// Format - Parameters that define the flow log format.
18442	Format *FlowLogFormatParameters `json:"format,omitempty"`
18443}
18444
18445// FlowLogPropertiesFormat parameters that define the configuration of flow log.
18446type FlowLogPropertiesFormat struct {
18447	// TargetResourceID - ID of network security group to which flow log will be applied.
18448	TargetResourceID *string `json:"targetResourceId,omitempty"`
18449	// TargetResourceGUID - READ-ONLY; Guid of network security group to which flow log will be applied.
18450	TargetResourceGUID *string `json:"targetResourceGuid,omitempty"`
18451	// StorageID - ID of the storage account which is used to store the flow log.
18452	StorageID *string `json:"storageId,omitempty"`
18453	// Enabled - Flag to enable/disable flow logging.
18454	Enabled *bool `json:"enabled,omitempty"`
18455	// RetentionPolicy - Parameters that define the retention policy for flow log.
18456	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
18457	// Format - Parameters that define the flow log format.
18458	Format *FlowLogFormatParameters `json:"format,omitempty"`
18459	// FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
18460	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
18461	// ProvisioningState - READ-ONLY; The provisioning state of the flow log. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
18462	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
18463}
18464
18465// MarshalJSON is the custom marshaler for FlowLogPropertiesFormat.
18466func (flpf FlowLogPropertiesFormat) MarshalJSON() ([]byte, error) {
18467	objectMap := make(map[string]interface{})
18468	if flpf.TargetResourceID != nil {
18469		objectMap["targetResourceId"] = flpf.TargetResourceID
18470	}
18471	if flpf.StorageID != nil {
18472		objectMap["storageId"] = flpf.StorageID
18473	}
18474	if flpf.Enabled != nil {
18475		objectMap["enabled"] = flpf.Enabled
18476	}
18477	if flpf.RetentionPolicy != nil {
18478		objectMap["retentionPolicy"] = flpf.RetentionPolicy
18479	}
18480	if flpf.Format != nil {
18481		objectMap["format"] = flpf.Format
18482	}
18483	if flpf.FlowAnalyticsConfiguration != nil {
18484		objectMap["flowAnalyticsConfiguration"] = flpf.FlowAnalyticsConfiguration
18485	}
18486	return json.Marshal(objectMap)
18487}
18488
18489// FlowLogsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
18490// operation.
18491type FlowLogsCreateOrUpdateFuture struct {
18492	azure.FutureAPI
18493	// Result returns the result of the asynchronous operation.
18494	// If the operation has not completed it will return an error.
18495	Result func(FlowLogsClient) (FlowLog, error)
18496}
18497
18498// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18499func (future *FlowLogsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
18500	var azFuture azure.Future
18501	if err := json.Unmarshal(body, &azFuture); err != nil {
18502		return err
18503	}
18504	future.FutureAPI = &azFuture
18505	future.Result = future.result
18506	return nil
18507}
18508
18509// result is the default implementation for FlowLogsCreateOrUpdateFuture.Result.
18510func (future *FlowLogsCreateOrUpdateFuture) result(client FlowLogsClient) (fl FlowLog, err error) {
18511	var done bool
18512	done, err = future.DoneWithContext(context.Background(), client)
18513	if err != nil {
18514		err = autorest.NewErrorWithError(err, "network.FlowLogsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18515		return
18516	}
18517	if !done {
18518		fl.Response.Response = future.Response()
18519		err = azure.NewAsyncOpIncompleteError("network.FlowLogsCreateOrUpdateFuture")
18520		return
18521	}
18522	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18523	if fl.Response.Response, err = future.GetResult(sender); err == nil && fl.Response.Response.StatusCode != http.StatusNoContent {
18524		fl, err = client.CreateOrUpdateResponder(fl.Response.Response)
18525		if err != nil {
18526			err = autorest.NewErrorWithError(err, "network.FlowLogsCreateOrUpdateFuture", "Result", fl.Response.Response, "Failure responding to request")
18527		}
18528	}
18529	return
18530}
18531
18532// FlowLogsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18533// operation.
18534type FlowLogsDeleteFuture struct {
18535	azure.FutureAPI
18536	// Result returns the result of the asynchronous operation.
18537	// If the operation has not completed it will return an error.
18538	Result func(FlowLogsClient) (autorest.Response, error)
18539}
18540
18541// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18542func (future *FlowLogsDeleteFuture) UnmarshalJSON(body []byte) error {
18543	var azFuture azure.Future
18544	if err := json.Unmarshal(body, &azFuture); err != nil {
18545		return err
18546	}
18547	future.FutureAPI = &azFuture
18548	future.Result = future.result
18549	return nil
18550}
18551
18552// result is the default implementation for FlowLogsDeleteFuture.Result.
18553func (future *FlowLogsDeleteFuture) result(client FlowLogsClient) (ar autorest.Response, err error) {
18554	var done bool
18555	done, err = future.DoneWithContext(context.Background(), client)
18556	if err != nil {
18557		err = autorest.NewErrorWithError(err, "network.FlowLogsDeleteFuture", "Result", future.Response(), "Polling failure")
18558		return
18559	}
18560	if !done {
18561		ar.Response = future.Response()
18562		err = azure.NewAsyncOpIncompleteError("network.FlowLogsDeleteFuture")
18563		return
18564	}
18565	ar.Response = future.Response()
18566	return
18567}
18568
18569// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
18570// (optional) status.
18571type FlowLogStatusParameters struct {
18572	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
18573	TargetResourceID *string `json:"targetResourceId,omitempty"`
18574}
18575
18576// FrontendIPConfiguration frontend IP address of the load balancer.
18577type FrontendIPConfiguration struct {
18578	autorest.Response `json:"-"`
18579	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
18580	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
18581	// 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.
18582	Name *string `json:"name,omitempty"`
18583	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
18584	Etag *string `json:"etag,omitempty"`
18585	// Type - READ-ONLY; Type of the resource.
18586	Type *string `json:"type,omitempty"`
18587	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
18588	Zones *[]string `json:"zones,omitempty"`
18589	// ID - Resource ID.
18590	ID *string `json:"id,omitempty"`
18591}
18592
18593// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
18594func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
18595	objectMap := make(map[string]interface{})
18596	if fic.FrontendIPConfigurationPropertiesFormat != nil {
18597		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
18598	}
18599	if fic.Name != nil {
18600		objectMap["name"] = fic.Name
18601	}
18602	if fic.Zones != nil {
18603		objectMap["zones"] = fic.Zones
18604	}
18605	if fic.ID != nil {
18606		objectMap["id"] = fic.ID
18607	}
18608	return json.Marshal(objectMap)
18609}
18610
18611// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
18612func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
18613	var m map[string]*json.RawMessage
18614	err := json.Unmarshal(body, &m)
18615	if err != nil {
18616		return err
18617	}
18618	for k, v := range m {
18619		switch k {
18620		case "properties":
18621			if v != nil {
18622				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
18623				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
18624				if err != nil {
18625					return err
18626				}
18627				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
18628			}
18629		case "name":
18630			if v != nil {
18631				var name string
18632				err = json.Unmarshal(*v, &name)
18633				if err != nil {
18634					return err
18635				}
18636				fic.Name = &name
18637			}
18638		case "etag":
18639			if v != nil {
18640				var etag string
18641				err = json.Unmarshal(*v, &etag)
18642				if err != nil {
18643					return err
18644				}
18645				fic.Etag = &etag
18646			}
18647		case "type":
18648			if v != nil {
18649				var typeVar string
18650				err = json.Unmarshal(*v, &typeVar)
18651				if err != nil {
18652					return err
18653				}
18654				fic.Type = &typeVar
18655			}
18656		case "zones":
18657			if v != nil {
18658				var zones []string
18659				err = json.Unmarshal(*v, &zones)
18660				if err != nil {
18661					return err
18662				}
18663				fic.Zones = &zones
18664			}
18665		case "id":
18666			if v != nil {
18667				var ID string
18668				err = json.Unmarshal(*v, &ID)
18669				if err != nil {
18670					return err
18671				}
18672				fic.ID = &ID
18673			}
18674		}
18675	}
18676
18677	return nil
18678}
18679
18680// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
18681type FrontendIPConfigurationPropertiesFormat struct {
18682	// InboundNatRules - READ-ONLY; An array of references to inbound rules that use this frontend IP.
18683	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
18684	// InboundNatPools - READ-ONLY; An array of references to inbound pools that use this frontend IP.
18685	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
18686	// OutboundRules - READ-ONLY; An array of references to outbound rules that use this frontend IP.
18687	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
18688	// LoadBalancingRules - READ-ONLY; An array of references to load balancing rules that use this frontend IP.
18689	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
18690	// PrivateIPAddress - The private IP address of the IP configuration.
18691	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
18692	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic'
18693	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
18694	// PrivateIPAddressVersion - Whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
18695	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
18696	// Subnet - The reference to the subnet resource.
18697	Subnet *Subnet `json:"subnet,omitempty"`
18698	// PublicIPAddress - The reference to the Public IP resource.
18699	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
18700	// PublicIPPrefix - The reference to the Public IP Prefix resource.
18701	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
18702	// ProvisioningState - READ-ONLY; The provisioning state of the frontend IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
18703	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
18704}
18705
18706// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
18707func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
18708	objectMap := make(map[string]interface{})
18709	if ficpf.PrivateIPAddress != nil {
18710		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
18711	}
18712	if ficpf.PrivateIPAllocationMethod != "" {
18713		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
18714	}
18715	if ficpf.PrivateIPAddressVersion != "" {
18716		objectMap["privateIPAddressVersion"] = ficpf.PrivateIPAddressVersion
18717	}
18718	if ficpf.Subnet != nil {
18719		objectMap["subnet"] = ficpf.Subnet
18720	}
18721	if ficpf.PublicIPAddress != nil {
18722		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
18723	}
18724	if ficpf.PublicIPPrefix != nil {
18725		objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix
18726	}
18727	return json.Marshal(objectMap)
18728}
18729
18730// GatewayRoute gateway routing details.
18731type GatewayRoute struct {
18732	// LocalAddress - READ-ONLY; The gateway's local address.
18733	LocalAddress *string `json:"localAddress,omitempty"`
18734	// NetworkProperty - READ-ONLY; The route's network prefix.
18735	NetworkProperty *string `json:"network,omitempty"`
18736	// NextHop - READ-ONLY; The route's next hop.
18737	NextHop *string `json:"nextHop,omitempty"`
18738	// SourcePeer - READ-ONLY; The peer this route was learned from.
18739	SourcePeer *string `json:"sourcePeer,omitempty"`
18740	// Origin - READ-ONLY; The source this route was learned from.
18741	Origin *string `json:"origin,omitempty"`
18742	// AsPath - READ-ONLY; The route's AS path sequence.
18743	AsPath *string `json:"asPath,omitempty"`
18744	// Weight - READ-ONLY; The route's weight.
18745	Weight *int32 `json:"weight,omitempty"`
18746}
18747
18748// MarshalJSON is the custom marshaler for GatewayRoute.
18749func (gr GatewayRoute) MarshalJSON() ([]byte, error) {
18750	objectMap := make(map[string]interface{})
18751	return json.Marshal(objectMap)
18752}
18753
18754// GatewayRouteListResult list of virtual network gateway routes.
18755type GatewayRouteListResult struct {
18756	autorest.Response `json:"-"`
18757	// Value - List of gateway routes.
18758	Value *[]GatewayRoute `json:"value,omitempty"`
18759}
18760
18761// GenerateExpressRoutePortsLOARequest the customer name to be printed on a letter of authorization.
18762type GenerateExpressRoutePortsLOARequest struct {
18763	// CustomerName - The customer name.
18764	CustomerName *string `json:"customerName,omitempty"`
18765}
18766
18767// GenerateExpressRoutePortsLOAResult response for GenerateExpressRoutePortsLOA API service call.
18768type GenerateExpressRoutePortsLOAResult struct {
18769	autorest.Response `json:"-"`
18770	// EncodedContent - The content as a base64 encoded string.
18771	EncodedContent *string `json:"encodedContent,omitempty"`
18772}
18773
18774// GeneratevirtualwanvpnserverconfigurationvpnprofileFuture an abstraction for monitoring and retrieving
18775// the results of a long-running operation.
18776type GeneratevirtualwanvpnserverconfigurationvpnprofileFuture struct {
18777	azure.FutureAPI
18778	// Result returns the result of the asynchronous operation.
18779	// If the operation has not completed it will return an error.
18780	Result func(BaseClient) (VpnProfileResponse, error)
18781}
18782
18783// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18784func (future *GeneratevirtualwanvpnserverconfigurationvpnprofileFuture) UnmarshalJSON(body []byte) error {
18785	var azFuture azure.Future
18786	if err := json.Unmarshal(body, &azFuture); err != nil {
18787		return err
18788	}
18789	future.FutureAPI = &azFuture
18790	future.Result = future.result
18791	return nil
18792}
18793
18794// result is the default implementation for GeneratevirtualwanvpnserverconfigurationvpnprofileFuture.Result.
18795func (future *GeneratevirtualwanvpnserverconfigurationvpnprofileFuture) result(client BaseClient) (vpr VpnProfileResponse, err error) {
18796	var done bool
18797	done, err = future.DoneWithContext(context.Background(), client)
18798	if err != nil {
18799		err = autorest.NewErrorWithError(err, "network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture", "Result", future.Response(), "Polling failure")
18800		return
18801	}
18802	if !done {
18803		vpr.Response.Response = future.Response()
18804		err = azure.NewAsyncOpIncompleteError("network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture")
18805		return
18806	}
18807	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18808	if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent {
18809		vpr, err = client.GeneratevirtualwanvpnserverconfigurationvpnprofileResponder(vpr.Response.Response)
18810		if err != nil {
18811			err = autorest.NewErrorWithError(err, "network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture", "Result", vpr.Response.Response, "Failure responding to request")
18812		}
18813	}
18814	return
18815}
18816
18817// GetActiveSessionsAllFuture an abstraction for monitoring and retrieving the results of a long-running
18818// operation.
18819type GetActiveSessionsAllFuture struct {
18820	azure.FutureAPI
18821	// Result returns the result of the asynchronous operation.
18822	// If the operation has not completed it will return an error.
18823	Result func(BaseClient) (BastionActiveSessionListResultPage, error)
18824}
18825
18826// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18827func (future *GetActiveSessionsAllFuture) UnmarshalJSON(body []byte) error {
18828	var azFuture azure.Future
18829	if err := json.Unmarshal(body, &azFuture); err != nil {
18830		return err
18831	}
18832	future.FutureAPI = &azFuture
18833	future.Result = future.result
18834	return nil
18835}
18836
18837// result is the default implementation for GetActiveSessionsAllFuture.Result.
18838func (future *GetActiveSessionsAllFuture) result(client BaseClient) (baslrp BastionActiveSessionListResultPage, err error) {
18839	var done bool
18840	done, err = future.DoneWithContext(context.Background(), client)
18841	if err != nil {
18842		err = autorest.NewErrorWithError(err, "network.GetActiveSessionsAllFuture", "Result", future.Response(), "Polling failure")
18843		return
18844	}
18845	if !done {
18846		baslrp.baslr.Response.Response = future.Response()
18847		err = azure.NewAsyncOpIncompleteError("network.GetActiveSessionsAllFuture")
18848		return
18849	}
18850	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18851	if baslrp.baslr.Response.Response, err = future.GetResult(sender); err == nil && baslrp.baslr.Response.Response.StatusCode != http.StatusNoContent {
18852		baslrp, err = client.GetActiveSessionsResponder(baslrp.baslr.Response.Response)
18853		if err != nil {
18854			err = autorest.NewErrorWithError(err, "network.GetActiveSessionsAllFuture", "Result", baslrp.baslr.Response.Response, "Failure responding to request")
18855		}
18856	}
18857	return
18858}
18859
18860// GetActiveSessionsFuture an abstraction for monitoring and retrieving the results of a long-running
18861// operation.
18862type GetActiveSessionsFuture struct {
18863	azure.FutureAPI
18864	// Result returns the result of the asynchronous operation.
18865	// If the operation has not completed it will return an error.
18866	Result func(BaseClient) (BastionActiveSessionListResultPage, error)
18867}
18868
18869// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18870func (future *GetActiveSessionsFuture) UnmarshalJSON(body []byte) error {
18871	var azFuture azure.Future
18872	if err := json.Unmarshal(body, &azFuture); err != nil {
18873		return err
18874	}
18875	future.FutureAPI = &azFuture
18876	future.Result = future.result
18877	return nil
18878}
18879
18880// result is the default implementation for GetActiveSessionsFuture.Result.
18881func (future *GetActiveSessionsFuture) result(client BaseClient) (baslrp BastionActiveSessionListResultPage, err error) {
18882	var done bool
18883	done, err = future.DoneWithContext(context.Background(), client)
18884	if err != nil {
18885		err = autorest.NewErrorWithError(err, "network.GetActiveSessionsFuture", "Result", future.Response(), "Polling failure")
18886		return
18887	}
18888	if !done {
18889		baslrp.baslr.Response.Response = future.Response()
18890		err = azure.NewAsyncOpIncompleteError("network.GetActiveSessionsFuture")
18891		return
18892	}
18893	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18894	if baslrp.baslr.Response.Response, err = future.GetResult(sender); err == nil && baslrp.baslr.Response.Response.StatusCode != http.StatusNoContent {
18895		baslrp, err = client.GetActiveSessionsResponder(baslrp.baslr.Response.Response)
18896		if err != nil {
18897			err = autorest.NewErrorWithError(err, "network.GetActiveSessionsFuture", "Result", baslrp.baslr.Response.Response, "Failure responding to request")
18898		}
18899	}
18900	return
18901}
18902
18903// GetVpnSitesConfigurationRequest list of Vpn-Sites.
18904type GetVpnSitesConfigurationRequest struct {
18905	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
18906	VpnSites *[]string `json:"vpnSites,omitempty"`
18907	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites.
18908	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
18909}
18910
18911// HopLink hop link.
18912type HopLink struct {
18913	// NextHopID - READ-ONLY; The ID of the next hop.
18914	NextHopID *string `json:"nextHopId,omitempty"`
18915	// LinkType - READ-ONLY; Link type.
18916	LinkType *string `json:"linkType,omitempty"`
18917	// HopLinkProperties - Hop link properties.
18918	*HopLinkProperties `json:"properties,omitempty"`
18919	// Issues - READ-ONLY; List of issues.
18920	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
18921	// Context - READ-ONLY; Provides additional context on links.
18922	Context map[string]*string `json:"context"`
18923	// ResourceID - READ-ONLY; Resource ID.
18924	ResourceID *string `json:"resourceId,omitempty"`
18925}
18926
18927// MarshalJSON is the custom marshaler for HopLink.
18928func (hl HopLink) MarshalJSON() ([]byte, error) {
18929	objectMap := make(map[string]interface{})
18930	if hl.HopLinkProperties != nil {
18931		objectMap["properties"] = hl.HopLinkProperties
18932	}
18933	return json.Marshal(objectMap)
18934}
18935
18936// UnmarshalJSON is the custom unmarshaler for HopLink struct.
18937func (hl *HopLink) UnmarshalJSON(body []byte) error {
18938	var m map[string]*json.RawMessage
18939	err := json.Unmarshal(body, &m)
18940	if err != nil {
18941		return err
18942	}
18943	for k, v := range m {
18944		switch k {
18945		case "nextHopId":
18946			if v != nil {
18947				var nextHopID string
18948				err = json.Unmarshal(*v, &nextHopID)
18949				if err != nil {
18950					return err
18951				}
18952				hl.NextHopID = &nextHopID
18953			}
18954		case "linkType":
18955			if v != nil {
18956				var linkType string
18957				err = json.Unmarshal(*v, &linkType)
18958				if err != nil {
18959					return err
18960				}
18961				hl.LinkType = &linkType
18962			}
18963		case "properties":
18964			if v != nil {
18965				var hopLinkProperties HopLinkProperties
18966				err = json.Unmarshal(*v, &hopLinkProperties)
18967				if err != nil {
18968					return err
18969				}
18970				hl.HopLinkProperties = &hopLinkProperties
18971			}
18972		case "issues":
18973			if v != nil {
18974				var issues []ConnectivityIssue
18975				err = json.Unmarshal(*v, &issues)
18976				if err != nil {
18977					return err
18978				}
18979				hl.Issues = &issues
18980			}
18981		case "context":
18982			if v != nil {
18983				var context map[string]*string
18984				err = json.Unmarshal(*v, &context)
18985				if err != nil {
18986					return err
18987				}
18988				hl.Context = context
18989			}
18990		case "resourceId":
18991			if v != nil {
18992				var resourceID string
18993				err = json.Unmarshal(*v, &resourceID)
18994				if err != nil {
18995					return err
18996				}
18997				hl.ResourceID = &resourceID
18998			}
18999		}
19000	}
19001
19002	return nil
19003}
19004
19005// HopLinkProperties hop link properties.
19006type HopLinkProperties struct {
19007	// RoundTripTimeMin - READ-ONLY; Minimum roundtrip time in milliseconds.
19008	RoundTripTimeMin *int64 `json:"roundTripTimeMin,omitempty"`
19009	// RoundTripTimeAvg - READ-ONLY; Average roundtrip time in milliseconds.
19010	RoundTripTimeAvg *int64 `json:"roundTripTimeAvg,omitempty"`
19011	// RoundTripTimeMax - READ-ONLY; Maximum roundtrip time in milliseconds.
19012	RoundTripTimeMax *int64 `json:"roundTripTimeMax,omitempty"`
19013}
19014
19015// MarshalJSON is the custom marshaler for HopLinkProperties.
19016func (hlp HopLinkProperties) MarshalJSON() ([]byte, error) {
19017	objectMap := make(map[string]interface{})
19018	return json.Marshal(objectMap)
19019}
19020
19021// HTTPConfiguration HTTP configuration of the connectivity check.
19022type HTTPConfiguration struct {
19023	// Method - HTTP method. Possible values include: 'HTTPMethodGet'
19024	Method HTTPMethod `json:"method,omitempty"`
19025	// Headers - List of HTTP headers.
19026	Headers *[]HTTPHeader `json:"headers,omitempty"`
19027	// ValidStatusCodes - Valid status codes.
19028	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
19029}
19030
19031// HTTPHeader the HTTP header.
19032type HTTPHeader struct {
19033	// Name - The name in HTTP header.
19034	Name *string `json:"name,omitempty"`
19035	// Value - The value in HTTP header.
19036	Value *string `json:"value,omitempty"`
19037}
19038
19039// HubIPAddresses IP addresses associated with azure firewall.
19040type HubIPAddresses struct {
19041	// PublicIPs - Public IP addresses associated with azure firewall.
19042	PublicIPs *HubPublicIPAddresses `json:"publicIPs,omitempty"`
19043	// PrivateIPAddress - Private IP Address associated with azure firewall.
19044	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
19045}
19046
19047// HubIPConfiguration ipConfigurations.
19048type HubIPConfiguration struct {
19049	autorest.Response `json:"-"`
19050	// HubIPConfigurationPropertiesFormat - The properties of the Virtual Hub IPConfigurations.
19051	*HubIPConfigurationPropertiesFormat `json:"properties,omitempty"`
19052	// Name - Name of the Ip Configuration.
19053	Name *string `json:"name,omitempty"`
19054	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19055	Etag *string `json:"etag,omitempty"`
19056	// Type - READ-ONLY; Ipconfiguration type.
19057	Type *string `json:"type,omitempty"`
19058	// ID - Resource ID.
19059	ID *string `json:"id,omitempty"`
19060}
19061
19062// MarshalJSON is the custom marshaler for HubIPConfiguration.
19063func (hic HubIPConfiguration) MarshalJSON() ([]byte, error) {
19064	objectMap := make(map[string]interface{})
19065	if hic.HubIPConfigurationPropertiesFormat != nil {
19066		objectMap["properties"] = hic.HubIPConfigurationPropertiesFormat
19067	}
19068	if hic.Name != nil {
19069		objectMap["name"] = hic.Name
19070	}
19071	if hic.ID != nil {
19072		objectMap["id"] = hic.ID
19073	}
19074	return json.Marshal(objectMap)
19075}
19076
19077// UnmarshalJSON is the custom unmarshaler for HubIPConfiguration struct.
19078func (hic *HubIPConfiguration) UnmarshalJSON(body []byte) error {
19079	var m map[string]*json.RawMessage
19080	err := json.Unmarshal(body, &m)
19081	if err != nil {
19082		return err
19083	}
19084	for k, v := range m {
19085		switch k {
19086		case "properties":
19087			if v != nil {
19088				var hubIPConfigurationPropertiesFormat HubIPConfigurationPropertiesFormat
19089				err = json.Unmarshal(*v, &hubIPConfigurationPropertiesFormat)
19090				if err != nil {
19091					return err
19092				}
19093				hic.HubIPConfigurationPropertiesFormat = &hubIPConfigurationPropertiesFormat
19094			}
19095		case "name":
19096			if v != nil {
19097				var name string
19098				err = json.Unmarshal(*v, &name)
19099				if err != nil {
19100					return err
19101				}
19102				hic.Name = &name
19103			}
19104		case "etag":
19105			if v != nil {
19106				var etag string
19107				err = json.Unmarshal(*v, &etag)
19108				if err != nil {
19109					return err
19110				}
19111				hic.Etag = &etag
19112			}
19113		case "type":
19114			if v != nil {
19115				var typeVar string
19116				err = json.Unmarshal(*v, &typeVar)
19117				if err != nil {
19118					return err
19119				}
19120				hic.Type = &typeVar
19121			}
19122		case "id":
19123			if v != nil {
19124				var ID string
19125				err = json.Unmarshal(*v, &ID)
19126				if err != nil {
19127					return err
19128				}
19129				hic.ID = &ID
19130			}
19131		}
19132	}
19133
19134	return nil
19135}
19136
19137// HubIPConfigurationPropertiesFormat properties of IP configuration.
19138type HubIPConfigurationPropertiesFormat struct {
19139	// PrivateIPAddress - The private IP address of the IP configuration.
19140	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
19141	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic'
19142	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
19143	// Subnet - The reference to the subnet resource.
19144	Subnet *Subnet `json:"subnet,omitempty"`
19145	// PublicIPAddress - The reference to the public IP resource.
19146	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
19147	// ProvisioningState - READ-ONLY; The provisioning state of the IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
19148	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19149}
19150
19151// MarshalJSON is the custom marshaler for HubIPConfigurationPropertiesFormat.
19152func (hicpf HubIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
19153	objectMap := make(map[string]interface{})
19154	if hicpf.PrivateIPAddress != nil {
19155		objectMap["privateIPAddress"] = hicpf.PrivateIPAddress
19156	}
19157	if hicpf.PrivateIPAllocationMethod != "" {
19158		objectMap["privateIPAllocationMethod"] = hicpf.PrivateIPAllocationMethod
19159	}
19160	if hicpf.Subnet != nil {
19161		objectMap["subnet"] = hicpf.Subnet
19162	}
19163	if hicpf.PublicIPAddress != nil {
19164		objectMap["publicIPAddress"] = hicpf.PublicIPAddress
19165	}
19166	return json.Marshal(objectMap)
19167}
19168
19169// HubPublicIPAddresses public IP addresses associated with azure firewall.
19170type HubPublicIPAddresses struct {
19171	// Addresses - The list of Public IP addresses associated with azure firewall or IP addresses to be retained.
19172	Addresses *[]AzureFirewallPublicIPAddress `json:"addresses,omitempty"`
19173	// Count - The number of Public IP addresses associated with azure firewall.
19174	Count *int32 `json:"count,omitempty"`
19175}
19176
19177// HubRoute routeTable route.
19178type HubRoute struct {
19179	// Name - The name of the Route that is unique within a RouteTable. This name can be used to access this route.
19180	Name *string `json:"name,omitempty"`
19181	// DestinationType - The type of destinations (eg: CIDR, ResourceId, Service).
19182	DestinationType *string `json:"destinationType,omitempty"`
19183	// Destinations - List of all destinations.
19184	Destinations *[]string `json:"destinations,omitempty"`
19185	// NextHopType - The type of next hop (eg: ResourceId).
19186	NextHopType *string `json:"nextHopType,omitempty"`
19187	// NextHop - NextHop resource ID.
19188	NextHop *string `json:"nextHop,omitempty"`
19189}
19190
19191// HubRouteTable routeTable resource in a virtual hub.
19192type HubRouteTable struct {
19193	autorest.Response `json:"-"`
19194	// HubRouteTableProperties - Properties of the RouteTable resource.
19195	*HubRouteTableProperties `json:"properties,omitempty"`
19196	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19197	Name *string `json:"name,omitempty"`
19198	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19199	Etag *string `json:"etag,omitempty"`
19200	// Type - READ-ONLY; Resource type.
19201	Type *string `json:"type,omitempty"`
19202	// ID - Resource ID.
19203	ID *string `json:"id,omitempty"`
19204}
19205
19206// MarshalJSON is the custom marshaler for HubRouteTable.
19207func (hrt HubRouteTable) MarshalJSON() ([]byte, error) {
19208	objectMap := make(map[string]interface{})
19209	if hrt.HubRouteTableProperties != nil {
19210		objectMap["properties"] = hrt.HubRouteTableProperties
19211	}
19212	if hrt.Name != nil {
19213		objectMap["name"] = hrt.Name
19214	}
19215	if hrt.ID != nil {
19216		objectMap["id"] = hrt.ID
19217	}
19218	return json.Marshal(objectMap)
19219}
19220
19221// UnmarshalJSON is the custom unmarshaler for HubRouteTable struct.
19222func (hrt *HubRouteTable) UnmarshalJSON(body []byte) error {
19223	var m map[string]*json.RawMessage
19224	err := json.Unmarshal(body, &m)
19225	if err != nil {
19226		return err
19227	}
19228	for k, v := range m {
19229		switch k {
19230		case "properties":
19231			if v != nil {
19232				var hubRouteTableProperties HubRouteTableProperties
19233				err = json.Unmarshal(*v, &hubRouteTableProperties)
19234				if err != nil {
19235					return err
19236				}
19237				hrt.HubRouteTableProperties = &hubRouteTableProperties
19238			}
19239		case "name":
19240			if v != nil {
19241				var name string
19242				err = json.Unmarshal(*v, &name)
19243				if err != nil {
19244					return err
19245				}
19246				hrt.Name = &name
19247			}
19248		case "etag":
19249			if v != nil {
19250				var etag string
19251				err = json.Unmarshal(*v, &etag)
19252				if err != nil {
19253					return err
19254				}
19255				hrt.Etag = &etag
19256			}
19257		case "type":
19258			if v != nil {
19259				var typeVar string
19260				err = json.Unmarshal(*v, &typeVar)
19261				if err != nil {
19262					return err
19263				}
19264				hrt.Type = &typeVar
19265			}
19266		case "id":
19267			if v != nil {
19268				var ID string
19269				err = json.Unmarshal(*v, &ID)
19270				if err != nil {
19271					return err
19272				}
19273				hrt.ID = &ID
19274			}
19275		}
19276	}
19277
19278	return nil
19279}
19280
19281// HubRouteTableProperties parameters for RouteTable.
19282type HubRouteTableProperties struct {
19283	// Routes - List of all routes.
19284	Routes *[]HubRoute `json:"routes,omitempty"`
19285	// Labels - List of labels associated with this route table.
19286	Labels *[]string `json:"labels,omitempty"`
19287	// AssociatedConnections - READ-ONLY; List of all connections associated with this route table.
19288	AssociatedConnections *[]string `json:"associatedConnections,omitempty"`
19289	// PropagatingConnections - READ-ONLY; List of all connections that advertise to this route table.
19290	PropagatingConnections *[]string `json:"propagatingConnections,omitempty"`
19291	// ProvisioningState - READ-ONLY; The provisioning state of the RouteTable resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
19292	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19293}
19294
19295// MarshalJSON is the custom marshaler for HubRouteTableProperties.
19296func (hrtp HubRouteTableProperties) MarshalJSON() ([]byte, error) {
19297	objectMap := make(map[string]interface{})
19298	if hrtp.Routes != nil {
19299		objectMap["routes"] = hrtp.Routes
19300	}
19301	if hrtp.Labels != nil {
19302		objectMap["labels"] = hrtp.Labels
19303	}
19304	return json.Marshal(objectMap)
19305}
19306
19307// HubRouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
19308// long-running operation.
19309type HubRouteTablesCreateOrUpdateFuture struct {
19310	azure.FutureAPI
19311	// Result returns the result of the asynchronous operation.
19312	// If the operation has not completed it will return an error.
19313	Result func(HubRouteTablesClient) (HubRouteTable, error)
19314}
19315
19316// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19317func (future *HubRouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
19318	var azFuture azure.Future
19319	if err := json.Unmarshal(body, &azFuture); err != nil {
19320		return err
19321	}
19322	future.FutureAPI = &azFuture
19323	future.Result = future.result
19324	return nil
19325}
19326
19327// result is the default implementation for HubRouteTablesCreateOrUpdateFuture.Result.
19328func (future *HubRouteTablesCreateOrUpdateFuture) result(client HubRouteTablesClient) (hrt HubRouteTable, err error) {
19329	var done bool
19330	done, err = future.DoneWithContext(context.Background(), client)
19331	if err != nil {
19332		err = autorest.NewErrorWithError(err, "network.HubRouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
19333		return
19334	}
19335	if !done {
19336		hrt.Response.Response = future.Response()
19337		err = azure.NewAsyncOpIncompleteError("network.HubRouteTablesCreateOrUpdateFuture")
19338		return
19339	}
19340	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19341	if hrt.Response.Response, err = future.GetResult(sender); err == nil && hrt.Response.Response.StatusCode != http.StatusNoContent {
19342		hrt, err = client.CreateOrUpdateResponder(hrt.Response.Response)
19343		if err != nil {
19344			err = autorest.NewErrorWithError(err, "network.HubRouteTablesCreateOrUpdateFuture", "Result", hrt.Response.Response, "Failure responding to request")
19345		}
19346	}
19347	return
19348}
19349
19350// HubRouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19351// operation.
19352type HubRouteTablesDeleteFuture struct {
19353	azure.FutureAPI
19354	// Result returns the result of the asynchronous operation.
19355	// If the operation has not completed it will return an error.
19356	Result func(HubRouteTablesClient) (autorest.Response, error)
19357}
19358
19359// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19360func (future *HubRouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
19361	var azFuture azure.Future
19362	if err := json.Unmarshal(body, &azFuture); err != nil {
19363		return err
19364	}
19365	future.FutureAPI = &azFuture
19366	future.Result = future.result
19367	return nil
19368}
19369
19370// result is the default implementation for HubRouteTablesDeleteFuture.Result.
19371func (future *HubRouteTablesDeleteFuture) result(client HubRouteTablesClient) (ar autorest.Response, err error) {
19372	var done bool
19373	done, err = future.DoneWithContext(context.Background(), client)
19374	if err != nil {
19375		err = autorest.NewErrorWithError(err, "network.HubRouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
19376		return
19377	}
19378	if !done {
19379		ar.Response = future.Response()
19380		err = azure.NewAsyncOpIncompleteError("network.HubRouteTablesDeleteFuture")
19381		return
19382	}
19383	ar.Response = future.Response()
19384	return
19385}
19386
19387// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
19388type HubVirtualNetworkConnection struct {
19389	autorest.Response `json:"-"`
19390	// HubVirtualNetworkConnectionProperties - Properties of the hub virtual network connection.
19391	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
19392	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19393	Name *string `json:"name,omitempty"`
19394	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19395	Etag *string `json:"etag,omitempty"`
19396	// ID - Resource ID.
19397	ID *string `json:"id,omitempty"`
19398}
19399
19400// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
19401func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
19402	objectMap := make(map[string]interface{})
19403	if hvnc.HubVirtualNetworkConnectionProperties != nil {
19404		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
19405	}
19406	if hvnc.Name != nil {
19407		objectMap["name"] = hvnc.Name
19408	}
19409	if hvnc.ID != nil {
19410		objectMap["id"] = hvnc.ID
19411	}
19412	return json.Marshal(objectMap)
19413}
19414
19415// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
19416func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
19417	var m map[string]*json.RawMessage
19418	err := json.Unmarshal(body, &m)
19419	if err != nil {
19420		return err
19421	}
19422	for k, v := range m {
19423		switch k {
19424		case "properties":
19425			if v != nil {
19426				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
19427				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
19428				if err != nil {
19429					return err
19430				}
19431				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
19432			}
19433		case "name":
19434			if v != nil {
19435				var name string
19436				err = json.Unmarshal(*v, &name)
19437				if err != nil {
19438					return err
19439				}
19440				hvnc.Name = &name
19441			}
19442		case "etag":
19443			if v != nil {
19444				var etag string
19445				err = json.Unmarshal(*v, &etag)
19446				if err != nil {
19447					return err
19448				}
19449				hvnc.Etag = &etag
19450			}
19451		case "id":
19452			if v != nil {
19453				var ID string
19454				err = json.Unmarshal(*v, &ID)
19455				if err != nil {
19456					return err
19457				}
19458				hvnc.ID = &ID
19459			}
19460		}
19461	}
19462
19463	return nil
19464}
19465
19466// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection.
19467type HubVirtualNetworkConnectionProperties struct {
19468	// RemoteVirtualNetwork - Reference to the remote virtual network.
19469	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
19470	// AllowHubToRemoteVnetTransit - Deprecated: VirtualHub to RemoteVnet transit to enabled or not.
19471	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
19472	// AllowRemoteVnetToUseHubVnetGateways - Deprecated: Allow RemoteVnet to use Virtual Hub's gateways.
19473	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
19474	// EnableInternetSecurity - Enable internet security.
19475	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
19476	// RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection.
19477	RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"`
19478	// ProvisioningState - READ-ONLY; The provisioning state of the hub virtual network connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
19479	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19480}
19481
19482// MarshalJSON is the custom marshaler for HubVirtualNetworkConnectionProperties.
19483func (hvncp HubVirtualNetworkConnectionProperties) MarshalJSON() ([]byte, error) {
19484	objectMap := make(map[string]interface{})
19485	if hvncp.RemoteVirtualNetwork != nil {
19486		objectMap["remoteVirtualNetwork"] = hvncp.RemoteVirtualNetwork
19487	}
19488	if hvncp.AllowHubToRemoteVnetTransit != nil {
19489		objectMap["allowHubToRemoteVnetTransit"] = hvncp.AllowHubToRemoteVnetTransit
19490	}
19491	if hvncp.AllowRemoteVnetToUseHubVnetGateways != nil {
19492		objectMap["allowRemoteVnetToUseHubVnetGateways"] = hvncp.AllowRemoteVnetToUseHubVnetGateways
19493	}
19494	if hvncp.EnableInternetSecurity != nil {
19495		objectMap["enableInternetSecurity"] = hvncp.EnableInternetSecurity
19496	}
19497	if hvncp.RoutingConfiguration != nil {
19498		objectMap["routingConfiguration"] = hvncp.RoutingConfiguration
19499	}
19500	return json.Marshal(objectMap)
19501}
19502
19503// HubVirtualNetworkConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
19504// results of a long-running operation.
19505type HubVirtualNetworkConnectionsCreateOrUpdateFuture struct {
19506	azure.FutureAPI
19507	// Result returns the result of the asynchronous operation.
19508	// If the operation has not completed it will return an error.
19509	Result func(HubVirtualNetworkConnectionsClient) (HubVirtualNetworkConnection, error)
19510}
19511
19512// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19513func (future *HubVirtualNetworkConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
19514	var azFuture azure.Future
19515	if err := json.Unmarshal(body, &azFuture); err != nil {
19516		return err
19517	}
19518	future.FutureAPI = &azFuture
19519	future.Result = future.result
19520	return nil
19521}
19522
19523// result is the default implementation for HubVirtualNetworkConnectionsCreateOrUpdateFuture.Result.
19524func (future *HubVirtualNetworkConnectionsCreateOrUpdateFuture) result(client HubVirtualNetworkConnectionsClient) (hvnc HubVirtualNetworkConnection, err error) {
19525	var done bool
19526	done, err = future.DoneWithContext(context.Background(), client)
19527	if err != nil {
19528		err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
19529		return
19530	}
19531	if !done {
19532		hvnc.Response.Response = future.Response()
19533		err = azure.NewAsyncOpIncompleteError("network.HubVirtualNetworkConnectionsCreateOrUpdateFuture")
19534		return
19535	}
19536	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19537	if hvnc.Response.Response, err = future.GetResult(sender); err == nil && hvnc.Response.Response.StatusCode != http.StatusNoContent {
19538		hvnc, err = client.CreateOrUpdateResponder(hvnc.Response.Response)
19539		if err != nil {
19540			err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsCreateOrUpdateFuture", "Result", hvnc.Response.Response, "Failure responding to request")
19541		}
19542	}
19543	return
19544}
19545
19546// HubVirtualNetworkConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
19547// long-running operation.
19548type HubVirtualNetworkConnectionsDeleteFuture struct {
19549	azure.FutureAPI
19550	// Result returns the result of the asynchronous operation.
19551	// If the operation has not completed it will return an error.
19552	Result func(HubVirtualNetworkConnectionsClient) (autorest.Response, error)
19553}
19554
19555// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19556func (future *HubVirtualNetworkConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
19557	var azFuture azure.Future
19558	if err := json.Unmarshal(body, &azFuture); err != nil {
19559		return err
19560	}
19561	future.FutureAPI = &azFuture
19562	future.Result = future.result
19563	return nil
19564}
19565
19566// result is the default implementation for HubVirtualNetworkConnectionsDeleteFuture.Result.
19567func (future *HubVirtualNetworkConnectionsDeleteFuture) result(client HubVirtualNetworkConnectionsClient) (ar autorest.Response, err error) {
19568	var done bool
19569	done, err = future.DoneWithContext(context.Background(), client)
19570	if err != nil {
19571		err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
19572		return
19573	}
19574	if !done {
19575		ar.Response = future.Response()
19576		err = azure.NewAsyncOpIncompleteError("network.HubVirtualNetworkConnectionsDeleteFuture")
19577		return
19578	}
19579	ar.Response = future.Response()
19580	return
19581}
19582
19583// InboundNatPool inbound NAT pool of the load balancer.
19584type InboundNatPool struct {
19585	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
19586	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
19587	// 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.
19588	Name *string `json:"name,omitempty"`
19589	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19590	Etag *string `json:"etag,omitempty"`
19591	// Type - READ-ONLY; Type of the resource.
19592	Type *string `json:"type,omitempty"`
19593	// ID - Resource ID.
19594	ID *string `json:"id,omitempty"`
19595}
19596
19597// MarshalJSON is the custom marshaler for InboundNatPool.
19598func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
19599	objectMap := make(map[string]interface{})
19600	if inp.InboundNatPoolPropertiesFormat != nil {
19601		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
19602	}
19603	if inp.Name != nil {
19604		objectMap["name"] = inp.Name
19605	}
19606	if inp.ID != nil {
19607		objectMap["id"] = inp.ID
19608	}
19609	return json.Marshal(objectMap)
19610}
19611
19612// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
19613func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
19614	var m map[string]*json.RawMessage
19615	err := json.Unmarshal(body, &m)
19616	if err != nil {
19617		return err
19618	}
19619	for k, v := range m {
19620		switch k {
19621		case "properties":
19622			if v != nil {
19623				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
19624				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
19625				if err != nil {
19626					return err
19627				}
19628				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
19629			}
19630		case "name":
19631			if v != nil {
19632				var name string
19633				err = json.Unmarshal(*v, &name)
19634				if err != nil {
19635					return err
19636				}
19637				inp.Name = &name
19638			}
19639		case "etag":
19640			if v != nil {
19641				var etag string
19642				err = json.Unmarshal(*v, &etag)
19643				if err != nil {
19644					return err
19645				}
19646				inp.Etag = &etag
19647			}
19648		case "type":
19649			if v != nil {
19650				var typeVar string
19651				err = json.Unmarshal(*v, &typeVar)
19652				if err != nil {
19653					return err
19654				}
19655				inp.Type = &typeVar
19656			}
19657		case "id":
19658			if v != nil {
19659				var ID string
19660				err = json.Unmarshal(*v, &ID)
19661				if err != nil {
19662					return err
19663				}
19664				inp.ID = &ID
19665			}
19666		}
19667	}
19668
19669	return nil
19670}
19671
19672// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
19673type InboundNatPoolPropertiesFormat struct {
19674	// FrontendIPConfiguration - A reference to frontend IP addresses.
19675	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
19676	// Protocol - The reference to the transport protocol used by the inbound NAT pool. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
19677	Protocol TransportProtocol `json:"protocol,omitempty"`
19678	// 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.
19679	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
19680	// 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.
19681	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
19682	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
19683	BackendPort *int32 `json:"backendPort,omitempty"`
19684	// 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.
19685	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
19686	// 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.
19687	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
19688	// 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.
19689	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
19690	// ProvisioningState - READ-ONLY; The provisioning state of the inbound NAT pool resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
19691	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19692}
19693
19694// MarshalJSON is the custom marshaler for InboundNatPoolPropertiesFormat.
19695func (inppf InboundNatPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
19696	objectMap := make(map[string]interface{})
19697	if inppf.FrontendIPConfiguration != nil {
19698		objectMap["frontendIPConfiguration"] = inppf.FrontendIPConfiguration
19699	}
19700	if inppf.Protocol != "" {
19701		objectMap["protocol"] = inppf.Protocol
19702	}
19703	if inppf.FrontendPortRangeStart != nil {
19704		objectMap["frontendPortRangeStart"] = inppf.FrontendPortRangeStart
19705	}
19706	if inppf.FrontendPortRangeEnd != nil {
19707		objectMap["frontendPortRangeEnd"] = inppf.FrontendPortRangeEnd
19708	}
19709	if inppf.BackendPort != nil {
19710		objectMap["backendPort"] = inppf.BackendPort
19711	}
19712	if inppf.IdleTimeoutInMinutes != nil {
19713		objectMap["idleTimeoutInMinutes"] = inppf.IdleTimeoutInMinutes
19714	}
19715	if inppf.EnableFloatingIP != nil {
19716		objectMap["enableFloatingIP"] = inppf.EnableFloatingIP
19717	}
19718	if inppf.EnableTCPReset != nil {
19719		objectMap["enableTcpReset"] = inppf.EnableTCPReset
19720	}
19721	return json.Marshal(objectMap)
19722}
19723
19724// InboundNatRule inbound NAT rule of the load balancer.
19725type InboundNatRule struct {
19726	autorest.Response `json:"-"`
19727	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
19728	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
19729	// 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.
19730	Name *string `json:"name,omitempty"`
19731	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19732	Etag *string `json:"etag,omitempty"`
19733	// Type - READ-ONLY; Type of the resource.
19734	Type *string `json:"type,omitempty"`
19735	// ID - Resource ID.
19736	ID *string `json:"id,omitempty"`
19737}
19738
19739// MarshalJSON is the custom marshaler for InboundNatRule.
19740func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
19741	objectMap := make(map[string]interface{})
19742	if inr.InboundNatRulePropertiesFormat != nil {
19743		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
19744	}
19745	if inr.Name != nil {
19746		objectMap["name"] = inr.Name
19747	}
19748	if inr.ID != nil {
19749		objectMap["id"] = inr.ID
19750	}
19751	return json.Marshal(objectMap)
19752}
19753
19754// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
19755func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
19756	var m map[string]*json.RawMessage
19757	err := json.Unmarshal(body, &m)
19758	if err != nil {
19759		return err
19760	}
19761	for k, v := range m {
19762		switch k {
19763		case "properties":
19764			if v != nil {
19765				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
19766				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
19767				if err != nil {
19768					return err
19769				}
19770				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
19771			}
19772		case "name":
19773			if v != nil {
19774				var name string
19775				err = json.Unmarshal(*v, &name)
19776				if err != nil {
19777					return err
19778				}
19779				inr.Name = &name
19780			}
19781		case "etag":
19782			if v != nil {
19783				var etag string
19784				err = json.Unmarshal(*v, &etag)
19785				if err != nil {
19786					return err
19787				}
19788				inr.Etag = &etag
19789			}
19790		case "type":
19791			if v != nil {
19792				var typeVar string
19793				err = json.Unmarshal(*v, &typeVar)
19794				if err != nil {
19795					return err
19796				}
19797				inr.Type = &typeVar
19798			}
19799		case "id":
19800			if v != nil {
19801				var ID string
19802				err = json.Unmarshal(*v, &ID)
19803				if err != nil {
19804					return err
19805				}
19806				inr.ID = &ID
19807			}
19808		}
19809	}
19810
19811	return nil
19812}
19813
19814// InboundNatRuleListResult response for ListInboundNatRule API service call.
19815type InboundNatRuleListResult struct {
19816	autorest.Response `json:"-"`
19817	// Value - A list of inbound nat rules in a load balancer.
19818	Value *[]InboundNatRule `json:"value,omitempty"`
19819	// NextLink - READ-ONLY; The URL to get the next set of results.
19820	NextLink *string `json:"nextLink,omitempty"`
19821}
19822
19823// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
19824func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
19825	objectMap := make(map[string]interface{})
19826	if inrlr.Value != nil {
19827		objectMap["value"] = inrlr.Value
19828	}
19829	return json.Marshal(objectMap)
19830}
19831
19832// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
19833type InboundNatRuleListResultIterator struct {
19834	i    int
19835	page InboundNatRuleListResultPage
19836}
19837
19838// NextWithContext advances to the next value.  If there was an error making
19839// the request the iterator does not advance and the error is returned.
19840func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
19841	if tracing.IsEnabled() {
19842		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
19843		defer func() {
19844			sc := -1
19845			if iter.Response().Response.Response != nil {
19846				sc = iter.Response().Response.Response.StatusCode
19847			}
19848			tracing.EndSpan(ctx, sc, err)
19849		}()
19850	}
19851	iter.i++
19852	if iter.i < len(iter.page.Values()) {
19853		return nil
19854	}
19855	err = iter.page.NextWithContext(ctx)
19856	if err != nil {
19857		iter.i--
19858		return err
19859	}
19860	iter.i = 0
19861	return nil
19862}
19863
19864// Next advances to the next value.  If there was an error making
19865// the request the iterator does not advance and the error is returned.
19866// Deprecated: Use NextWithContext() instead.
19867func (iter *InboundNatRuleListResultIterator) Next() error {
19868	return iter.NextWithContext(context.Background())
19869}
19870
19871// NotDone returns true if the enumeration should be started or is not yet complete.
19872func (iter InboundNatRuleListResultIterator) NotDone() bool {
19873	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19874}
19875
19876// Response returns the raw server response from the last page request.
19877func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
19878	return iter.page.Response()
19879}
19880
19881// Value returns the current value or a zero-initialized value if the
19882// iterator has advanced beyond the end of the collection.
19883func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
19884	if !iter.page.NotDone() {
19885		return InboundNatRule{}
19886	}
19887	return iter.page.Values()[iter.i]
19888}
19889
19890// Creates a new instance of the InboundNatRuleListResultIterator type.
19891func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
19892	return InboundNatRuleListResultIterator{page: page}
19893}
19894
19895// IsEmpty returns true if the ListResult contains no values.
19896func (inrlr InboundNatRuleListResult) IsEmpty() bool {
19897	return inrlr.Value == nil || len(*inrlr.Value) == 0
19898}
19899
19900// hasNextLink returns true if the NextLink is not empty.
19901func (inrlr InboundNatRuleListResult) hasNextLink() bool {
19902	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
19903}
19904
19905// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
19906// It returns nil if no more results exist.
19907func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
19908	if !inrlr.hasNextLink() {
19909		return nil, nil
19910	}
19911	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19912		autorest.AsJSON(),
19913		autorest.AsGet(),
19914		autorest.WithBaseURL(to.String(inrlr.NextLink)))
19915}
19916
19917// InboundNatRuleListResultPage contains a page of InboundNatRule values.
19918type InboundNatRuleListResultPage struct {
19919	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
19920	inrlr InboundNatRuleListResult
19921}
19922
19923// NextWithContext advances to the next page of values.  If there was an error making
19924// the request the page does not advance and the error is returned.
19925func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
19926	if tracing.IsEnabled() {
19927		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
19928		defer func() {
19929			sc := -1
19930			if page.Response().Response.Response != nil {
19931				sc = page.Response().Response.Response.StatusCode
19932			}
19933			tracing.EndSpan(ctx, sc, err)
19934		}()
19935	}
19936	for {
19937		next, err := page.fn(ctx, page.inrlr)
19938		if err != nil {
19939			return err
19940		}
19941		page.inrlr = next
19942		if !next.hasNextLink() || !next.IsEmpty() {
19943			break
19944		}
19945	}
19946	return nil
19947}
19948
19949// Next advances to the next page of values.  If there was an error making
19950// the request the page does not advance and the error is returned.
19951// Deprecated: Use NextWithContext() instead.
19952func (page *InboundNatRuleListResultPage) Next() error {
19953	return page.NextWithContext(context.Background())
19954}
19955
19956// NotDone returns true if the page enumeration should be started or is not yet complete.
19957func (page InboundNatRuleListResultPage) NotDone() bool {
19958	return !page.inrlr.IsEmpty()
19959}
19960
19961// Response returns the raw server response from the last page request.
19962func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
19963	return page.inrlr
19964}
19965
19966// Values returns the slice of values for the current page or nil if there are no values.
19967func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
19968	if page.inrlr.IsEmpty() {
19969		return nil
19970	}
19971	return *page.inrlr.Value
19972}
19973
19974// Creates a new instance of the InboundNatRuleListResultPage type.
19975func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
19976	return InboundNatRuleListResultPage{
19977		fn:    getNextPage,
19978		inrlr: cur,
19979	}
19980}
19981
19982// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
19983type InboundNatRulePropertiesFormat struct {
19984	// FrontendIPConfiguration - A reference to frontend IP addresses.
19985	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
19986	// 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.
19987	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
19988	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
19989	Protocol TransportProtocol `json:"protocol,omitempty"`
19990	// 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.
19991	FrontendPort *int32 `json:"frontendPort,omitempty"`
19992	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
19993	BackendPort *int32 `json:"backendPort,omitempty"`
19994	// 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.
19995	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
19996	// 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.
19997	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
19998	// 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.
19999	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
20000	// ProvisioningState - READ-ONLY; The provisioning state of the inbound NAT rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
20001	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20002}
20003
20004// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
20005func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
20006	objectMap := make(map[string]interface{})
20007	if inrpf.FrontendIPConfiguration != nil {
20008		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
20009	}
20010	if inrpf.Protocol != "" {
20011		objectMap["protocol"] = inrpf.Protocol
20012	}
20013	if inrpf.FrontendPort != nil {
20014		objectMap["frontendPort"] = inrpf.FrontendPort
20015	}
20016	if inrpf.BackendPort != nil {
20017		objectMap["backendPort"] = inrpf.BackendPort
20018	}
20019	if inrpf.IdleTimeoutInMinutes != nil {
20020		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
20021	}
20022	if inrpf.EnableFloatingIP != nil {
20023		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
20024	}
20025	if inrpf.EnableTCPReset != nil {
20026		objectMap["enableTcpReset"] = inrpf.EnableTCPReset
20027	}
20028	return json.Marshal(objectMap)
20029}
20030
20031// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20032// long-running operation.
20033type InboundNatRulesCreateOrUpdateFuture struct {
20034	azure.FutureAPI
20035	// Result returns the result of the asynchronous operation.
20036	// If the operation has not completed it will return an error.
20037	Result func(InboundNatRulesClient) (InboundNatRule, error)
20038}
20039
20040// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20041func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
20042	var azFuture azure.Future
20043	if err := json.Unmarshal(body, &azFuture); err != nil {
20044		return err
20045	}
20046	future.FutureAPI = &azFuture
20047	future.Result = future.result
20048	return nil
20049}
20050
20051// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result.
20052func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
20053	var done bool
20054	done, err = future.DoneWithContext(context.Background(), client)
20055	if err != nil {
20056		err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
20057		return
20058	}
20059	if !done {
20060		inr.Response.Response = future.Response()
20061		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
20062		return
20063	}
20064	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20065	if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
20066		inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
20067		if err != nil {
20068			err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
20069		}
20070	}
20071	return
20072}
20073
20074// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20075// operation.
20076type InboundNatRulesDeleteFuture struct {
20077	azure.FutureAPI
20078	// Result returns the result of the asynchronous operation.
20079	// If the operation has not completed it will return an error.
20080	Result func(InboundNatRulesClient) (autorest.Response, error)
20081}
20082
20083// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20084func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
20085	var azFuture azure.Future
20086	if err := json.Unmarshal(body, &azFuture); err != nil {
20087		return err
20088	}
20089	future.FutureAPI = &azFuture
20090	future.Result = future.result
20091	return nil
20092}
20093
20094// result is the default implementation for InboundNatRulesDeleteFuture.Result.
20095func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) {
20096	var done bool
20097	done, err = future.DoneWithContext(context.Background(), client)
20098	if err != nil {
20099		err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
20100		return
20101	}
20102	if !done {
20103		ar.Response = future.Response()
20104		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
20105		return
20106	}
20107	ar.Response = future.Response()
20108	return
20109}
20110
20111// InboundSecurityRule NVA Inbound Security Rule resource.
20112type InboundSecurityRule struct {
20113	autorest.Response `json:"-"`
20114	// InboundSecurityRuleProperties - The properties of the Inbound Security Rules.
20115	*InboundSecurityRuleProperties `json:"properties,omitempty"`
20116	// Name - Name of security rule collection.
20117	Name *string `json:"name,omitempty"`
20118	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20119	Etag *string `json:"etag,omitempty"`
20120	// Type - READ-ONLY; NVA inbound security rule type.
20121	Type *string `json:"type,omitempty"`
20122	// ID - Resource ID.
20123	ID *string `json:"id,omitempty"`
20124}
20125
20126// MarshalJSON is the custom marshaler for InboundSecurityRule.
20127func (isr InboundSecurityRule) MarshalJSON() ([]byte, error) {
20128	objectMap := make(map[string]interface{})
20129	if isr.InboundSecurityRuleProperties != nil {
20130		objectMap["properties"] = isr.InboundSecurityRuleProperties
20131	}
20132	if isr.Name != nil {
20133		objectMap["name"] = isr.Name
20134	}
20135	if isr.ID != nil {
20136		objectMap["id"] = isr.ID
20137	}
20138	return json.Marshal(objectMap)
20139}
20140
20141// UnmarshalJSON is the custom unmarshaler for InboundSecurityRule struct.
20142func (isr *InboundSecurityRule) UnmarshalJSON(body []byte) error {
20143	var m map[string]*json.RawMessage
20144	err := json.Unmarshal(body, &m)
20145	if err != nil {
20146		return err
20147	}
20148	for k, v := range m {
20149		switch k {
20150		case "properties":
20151			if v != nil {
20152				var inboundSecurityRuleProperties InboundSecurityRuleProperties
20153				err = json.Unmarshal(*v, &inboundSecurityRuleProperties)
20154				if err != nil {
20155					return err
20156				}
20157				isr.InboundSecurityRuleProperties = &inboundSecurityRuleProperties
20158			}
20159		case "name":
20160			if v != nil {
20161				var name string
20162				err = json.Unmarshal(*v, &name)
20163				if err != nil {
20164					return err
20165				}
20166				isr.Name = &name
20167			}
20168		case "etag":
20169			if v != nil {
20170				var etag string
20171				err = json.Unmarshal(*v, &etag)
20172				if err != nil {
20173					return err
20174				}
20175				isr.Etag = &etag
20176			}
20177		case "type":
20178			if v != nil {
20179				var typeVar string
20180				err = json.Unmarshal(*v, &typeVar)
20181				if err != nil {
20182					return err
20183				}
20184				isr.Type = &typeVar
20185			}
20186		case "id":
20187			if v != nil {
20188				var ID string
20189				err = json.Unmarshal(*v, &ID)
20190				if err != nil {
20191					return err
20192				}
20193				isr.ID = &ID
20194			}
20195		}
20196	}
20197
20198	return nil
20199}
20200
20201// InboundSecurityRuleCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20202// long-running operation.
20203type InboundSecurityRuleCreateOrUpdateFuture struct {
20204	azure.FutureAPI
20205	// Result returns the result of the asynchronous operation.
20206	// If the operation has not completed it will return an error.
20207	Result func(InboundSecurityRuleClient) (InboundSecurityRule, error)
20208}
20209
20210// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20211func (future *InboundSecurityRuleCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
20212	var azFuture azure.Future
20213	if err := json.Unmarshal(body, &azFuture); err != nil {
20214		return err
20215	}
20216	future.FutureAPI = &azFuture
20217	future.Result = future.result
20218	return nil
20219}
20220
20221// result is the default implementation for InboundSecurityRuleCreateOrUpdateFuture.Result.
20222func (future *InboundSecurityRuleCreateOrUpdateFuture) result(client InboundSecurityRuleClient) (isr InboundSecurityRule, err error) {
20223	var done bool
20224	done, err = future.DoneWithContext(context.Background(), client)
20225	if err != nil {
20226		err = autorest.NewErrorWithError(err, "network.InboundSecurityRuleCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
20227		return
20228	}
20229	if !done {
20230		isr.Response.Response = future.Response()
20231		err = azure.NewAsyncOpIncompleteError("network.InboundSecurityRuleCreateOrUpdateFuture")
20232		return
20233	}
20234	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20235	if isr.Response.Response, err = future.GetResult(sender); err == nil && isr.Response.Response.StatusCode != http.StatusNoContent {
20236		isr, err = client.CreateOrUpdateResponder(isr.Response.Response)
20237		if err != nil {
20238			err = autorest.NewErrorWithError(err, "network.InboundSecurityRuleCreateOrUpdateFuture", "Result", isr.Response.Response, "Failure responding to request")
20239		}
20240	}
20241	return
20242}
20243
20244// InboundSecurityRuleProperties properties of the Inbound Security Rules resource.
20245type InboundSecurityRuleProperties struct {
20246	// Rules - List of allowed rules.
20247	Rules *[]InboundSecurityRules `json:"rules,omitempty"`
20248	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
20249	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20250}
20251
20252// MarshalJSON is the custom marshaler for InboundSecurityRuleProperties.
20253func (isrp InboundSecurityRuleProperties) MarshalJSON() ([]byte, error) {
20254	objectMap := make(map[string]interface{})
20255	if isrp.Rules != nil {
20256		objectMap["rules"] = isrp.Rules
20257	}
20258	return json.Marshal(objectMap)
20259}
20260
20261// InboundSecurityRules properties of the Inbound Security Rules resource.
20262type InboundSecurityRules struct {
20263	// Protocol - Protocol. This should be either TCP or UDP. Possible values include: 'InboundSecurityRulesProtocolTCP', 'InboundSecurityRulesProtocolUDP'
20264	Protocol InboundSecurityRulesProtocol `json:"protocol,omitempty"`
20265	// SourceAddressPrefix - The CIDR or source IP range. Only /30, /31 and /32 Ip ranges are allowed.
20266	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
20267	// DestinationPortRange - NVA port ranges to be opened up. One needs to provide specific ports.
20268	DestinationPortRange *int32 `json:"destinationPortRange,omitempty"`
20269}
20270
20271// IntentPolicy network Intent Policy resource.
20272type IntentPolicy struct {
20273	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20274	Etag *string `json:"etag,omitempty"`
20275	// ID - Resource ID.
20276	ID *string `json:"id,omitempty"`
20277	// Name - READ-ONLY; Resource name.
20278	Name *string `json:"name,omitempty"`
20279	// Type - READ-ONLY; Resource type.
20280	Type *string `json:"type,omitempty"`
20281	// Location - Resource location.
20282	Location *string `json:"location,omitempty"`
20283	// Tags - Resource tags.
20284	Tags map[string]*string `json:"tags"`
20285}
20286
20287// MarshalJSON is the custom marshaler for IntentPolicy.
20288func (IP IntentPolicy) MarshalJSON() ([]byte, error) {
20289	objectMap := make(map[string]interface{})
20290	if IP.ID != nil {
20291		objectMap["id"] = IP.ID
20292	}
20293	if IP.Location != nil {
20294		objectMap["location"] = IP.Location
20295	}
20296	if IP.Tags != nil {
20297		objectMap["tags"] = IP.Tags
20298	}
20299	return json.Marshal(objectMap)
20300}
20301
20302// IntentPolicyConfiguration details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest.
20303type IntentPolicyConfiguration struct {
20304	// NetworkIntentPolicyName - The name of the Network Intent Policy for storing in target subscription.
20305	NetworkIntentPolicyName *string `json:"networkIntentPolicyName,omitempty"`
20306	// SourceNetworkIntentPolicy - Source network intent policy.
20307	SourceNetworkIntentPolicy *IntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"`
20308}
20309
20310// Interface a network interface in a resource group.
20311type Interface struct {
20312	autorest.Response `json:"-"`
20313	// ExtendedLocation - The extended location of the network interface.
20314	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
20315	// InterfacePropertiesFormat - Properties of the network interface.
20316	*InterfacePropertiesFormat `json:"properties,omitempty"`
20317	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20318	Etag *string `json:"etag,omitempty"`
20319	// ID - Resource ID.
20320	ID *string `json:"id,omitempty"`
20321	// Name - READ-ONLY; Resource name.
20322	Name *string `json:"name,omitempty"`
20323	// Type - READ-ONLY; Resource type.
20324	Type *string `json:"type,omitempty"`
20325	// Location - Resource location.
20326	Location *string `json:"location,omitempty"`
20327	// Tags - Resource tags.
20328	Tags map[string]*string `json:"tags"`
20329}
20330
20331// MarshalJSON is the custom marshaler for Interface.
20332func (i Interface) MarshalJSON() ([]byte, error) {
20333	objectMap := make(map[string]interface{})
20334	if i.ExtendedLocation != nil {
20335		objectMap["extendedLocation"] = i.ExtendedLocation
20336	}
20337	if i.InterfacePropertiesFormat != nil {
20338		objectMap["properties"] = i.InterfacePropertiesFormat
20339	}
20340	if i.ID != nil {
20341		objectMap["id"] = i.ID
20342	}
20343	if i.Location != nil {
20344		objectMap["location"] = i.Location
20345	}
20346	if i.Tags != nil {
20347		objectMap["tags"] = i.Tags
20348	}
20349	return json.Marshal(objectMap)
20350}
20351
20352// UnmarshalJSON is the custom unmarshaler for Interface struct.
20353func (i *Interface) UnmarshalJSON(body []byte) error {
20354	var m map[string]*json.RawMessage
20355	err := json.Unmarshal(body, &m)
20356	if err != nil {
20357		return err
20358	}
20359	for k, v := range m {
20360		switch k {
20361		case "extendedLocation":
20362			if v != nil {
20363				var extendedLocation ExtendedLocation
20364				err = json.Unmarshal(*v, &extendedLocation)
20365				if err != nil {
20366					return err
20367				}
20368				i.ExtendedLocation = &extendedLocation
20369			}
20370		case "properties":
20371			if v != nil {
20372				var interfacePropertiesFormat InterfacePropertiesFormat
20373				err = json.Unmarshal(*v, &interfacePropertiesFormat)
20374				if err != nil {
20375					return err
20376				}
20377				i.InterfacePropertiesFormat = &interfacePropertiesFormat
20378			}
20379		case "etag":
20380			if v != nil {
20381				var etag string
20382				err = json.Unmarshal(*v, &etag)
20383				if err != nil {
20384					return err
20385				}
20386				i.Etag = &etag
20387			}
20388		case "id":
20389			if v != nil {
20390				var ID string
20391				err = json.Unmarshal(*v, &ID)
20392				if err != nil {
20393					return err
20394				}
20395				i.ID = &ID
20396			}
20397		case "name":
20398			if v != nil {
20399				var name string
20400				err = json.Unmarshal(*v, &name)
20401				if err != nil {
20402					return err
20403				}
20404				i.Name = &name
20405			}
20406		case "type":
20407			if v != nil {
20408				var typeVar string
20409				err = json.Unmarshal(*v, &typeVar)
20410				if err != nil {
20411					return err
20412				}
20413				i.Type = &typeVar
20414			}
20415		case "location":
20416			if v != nil {
20417				var location string
20418				err = json.Unmarshal(*v, &location)
20419				if err != nil {
20420					return err
20421				}
20422				i.Location = &location
20423			}
20424		case "tags":
20425			if v != nil {
20426				var tags map[string]*string
20427				err = json.Unmarshal(*v, &tags)
20428				if err != nil {
20429					return err
20430				}
20431				i.Tags = tags
20432			}
20433		}
20434	}
20435
20436	return nil
20437}
20438
20439// InterfaceAssociation network interface and its custom security rules.
20440type InterfaceAssociation struct {
20441	// ID - READ-ONLY; Network interface ID.
20442	ID *string `json:"id,omitempty"`
20443	// SecurityRules - Collection of custom security rules.
20444	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
20445}
20446
20447// MarshalJSON is the custom marshaler for InterfaceAssociation.
20448func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
20449	objectMap := make(map[string]interface{})
20450	if ia.SecurityRules != nil {
20451		objectMap["securityRules"] = ia.SecurityRules
20452	}
20453	return json.Marshal(objectMap)
20454}
20455
20456// InterfaceDNSSettings DNS settings of a network interface.
20457type InterfaceDNSSettings struct {
20458	// 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.
20459	DNSServers *[]string `json:"dnsServers,omitempty"`
20460	// 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.
20461	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
20462	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
20463	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
20464	// InternalFqdn - READ-ONLY; Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
20465	InternalFqdn *string `json:"internalFqdn,omitempty"`
20466	// 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.
20467	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
20468}
20469
20470// MarshalJSON is the custom marshaler for InterfaceDNSSettings.
20471func (ids InterfaceDNSSettings) MarshalJSON() ([]byte, error) {
20472	objectMap := make(map[string]interface{})
20473	if ids.DNSServers != nil {
20474		objectMap["dnsServers"] = ids.DNSServers
20475	}
20476	if ids.InternalDNSNameLabel != nil {
20477		objectMap["internalDnsNameLabel"] = ids.InternalDNSNameLabel
20478	}
20479	return json.Marshal(objectMap)
20480}
20481
20482// InterfaceIPConfiguration iPConfiguration in a network interface.
20483type InterfaceIPConfiguration struct {
20484	autorest.Response `json:"-"`
20485	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
20486	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
20487	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
20488	Name *string `json:"name,omitempty"`
20489	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20490	Etag *string `json:"etag,omitempty"`
20491	// Type - Resource type.
20492	Type *string `json:"type,omitempty"`
20493	// ID - Resource ID.
20494	ID *string `json:"id,omitempty"`
20495}
20496
20497// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
20498func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
20499	objectMap := make(map[string]interface{})
20500	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
20501		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
20502	}
20503	if iic.Name != nil {
20504		objectMap["name"] = iic.Name
20505	}
20506	if iic.Type != nil {
20507		objectMap["type"] = iic.Type
20508	}
20509	if iic.ID != nil {
20510		objectMap["id"] = iic.ID
20511	}
20512	return json.Marshal(objectMap)
20513}
20514
20515// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
20516func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
20517	var m map[string]*json.RawMessage
20518	err := json.Unmarshal(body, &m)
20519	if err != nil {
20520		return err
20521	}
20522	for k, v := range m {
20523		switch k {
20524		case "properties":
20525			if v != nil {
20526				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
20527				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
20528				if err != nil {
20529					return err
20530				}
20531				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
20532			}
20533		case "name":
20534			if v != nil {
20535				var name string
20536				err = json.Unmarshal(*v, &name)
20537				if err != nil {
20538					return err
20539				}
20540				iic.Name = &name
20541			}
20542		case "etag":
20543			if v != nil {
20544				var etag string
20545				err = json.Unmarshal(*v, &etag)
20546				if err != nil {
20547					return err
20548				}
20549				iic.Etag = &etag
20550			}
20551		case "type":
20552			if v != nil {
20553				var typeVar string
20554				err = json.Unmarshal(*v, &typeVar)
20555				if err != nil {
20556					return err
20557				}
20558				iic.Type = &typeVar
20559			}
20560		case "id":
20561			if v != nil {
20562				var ID string
20563				err = json.Unmarshal(*v, &ID)
20564				if err != nil {
20565					return err
20566				}
20567				iic.ID = &ID
20568			}
20569		}
20570	}
20571
20572	return nil
20573}
20574
20575// InterfaceIPConfigurationListResult response for list ip configurations API service call.
20576type InterfaceIPConfigurationListResult struct {
20577	autorest.Response `json:"-"`
20578	// Value - A list of ip configurations.
20579	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
20580	// NextLink - READ-ONLY; The URL to get the next set of results.
20581	NextLink *string `json:"nextLink,omitempty"`
20582}
20583
20584// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
20585func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
20586	objectMap := make(map[string]interface{})
20587	if iiclr.Value != nil {
20588		objectMap["value"] = iiclr.Value
20589	}
20590	return json.Marshal(objectMap)
20591}
20592
20593// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
20594// InterfaceIPConfiguration values.
20595type InterfaceIPConfigurationListResultIterator struct {
20596	i    int
20597	page InterfaceIPConfigurationListResultPage
20598}
20599
20600// NextWithContext advances to the next value.  If there was an error making
20601// the request the iterator does not advance and the error is returned.
20602func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
20603	if tracing.IsEnabled() {
20604		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
20605		defer func() {
20606			sc := -1
20607			if iter.Response().Response.Response != nil {
20608				sc = iter.Response().Response.Response.StatusCode
20609			}
20610			tracing.EndSpan(ctx, sc, err)
20611		}()
20612	}
20613	iter.i++
20614	if iter.i < len(iter.page.Values()) {
20615		return nil
20616	}
20617	err = iter.page.NextWithContext(ctx)
20618	if err != nil {
20619		iter.i--
20620		return err
20621	}
20622	iter.i = 0
20623	return nil
20624}
20625
20626// Next advances to the next value.  If there was an error making
20627// the request the iterator does not advance and the error is returned.
20628// Deprecated: Use NextWithContext() instead.
20629func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
20630	return iter.NextWithContext(context.Background())
20631}
20632
20633// NotDone returns true if the enumeration should be started or is not yet complete.
20634func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
20635	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20636}
20637
20638// Response returns the raw server response from the last page request.
20639func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
20640	return iter.page.Response()
20641}
20642
20643// Value returns the current value or a zero-initialized value if the
20644// iterator has advanced beyond the end of the collection.
20645func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
20646	if !iter.page.NotDone() {
20647		return InterfaceIPConfiguration{}
20648	}
20649	return iter.page.Values()[iter.i]
20650}
20651
20652// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
20653func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
20654	return InterfaceIPConfigurationListResultIterator{page: page}
20655}
20656
20657// IsEmpty returns true if the ListResult contains no values.
20658func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
20659	return iiclr.Value == nil || len(*iiclr.Value) == 0
20660}
20661
20662// hasNextLink returns true if the NextLink is not empty.
20663func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
20664	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
20665}
20666
20667// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
20668// It returns nil if no more results exist.
20669func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
20670	if !iiclr.hasNextLink() {
20671		return nil, nil
20672	}
20673	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20674		autorest.AsJSON(),
20675		autorest.AsGet(),
20676		autorest.WithBaseURL(to.String(iiclr.NextLink)))
20677}
20678
20679// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
20680type InterfaceIPConfigurationListResultPage struct {
20681	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
20682	iiclr InterfaceIPConfigurationListResult
20683}
20684
20685// NextWithContext advances to the next page of values.  If there was an error making
20686// the request the page does not advance and the error is returned.
20687func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
20688	if tracing.IsEnabled() {
20689		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
20690		defer func() {
20691			sc := -1
20692			if page.Response().Response.Response != nil {
20693				sc = page.Response().Response.Response.StatusCode
20694			}
20695			tracing.EndSpan(ctx, sc, err)
20696		}()
20697	}
20698	for {
20699		next, err := page.fn(ctx, page.iiclr)
20700		if err != nil {
20701			return err
20702		}
20703		page.iiclr = next
20704		if !next.hasNextLink() || !next.IsEmpty() {
20705			break
20706		}
20707	}
20708	return nil
20709}
20710
20711// Next advances to the next page of values.  If there was an error making
20712// the request the page does not advance and the error is returned.
20713// Deprecated: Use NextWithContext() instead.
20714func (page *InterfaceIPConfigurationListResultPage) Next() error {
20715	return page.NextWithContext(context.Background())
20716}
20717
20718// NotDone returns true if the page enumeration should be started or is not yet complete.
20719func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
20720	return !page.iiclr.IsEmpty()
20721}
20722
20723// Response returns the raw server response from the last page request.
20724func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
20725	return page.iiclr
20726}
20727
20728// Values returns the slice of values for the current page or nil if there are no values.
20729func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
20730	if page.iiclr.IsEmpty() {
20731		return nil
20732	}
20733	return *page.iiclr.Value
20734}
20735
20736// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
20737func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
20738	return InterfaceIPConfigurationListResultPage{
20739		fn:    getNextPage,
20740		iiclr: cur,
20741	}
20742}
20743
20744// InterfaceIPConfigurationPrivateLinkConnectionProperties privateLinkConnection properties for the network
20745// interface.
20746type InterfaceIPConfigurationPrivateLinkConnectionProperties struct {
20747	// GroupID - READ-ONLY; The group ID for current private link connection.
20748	GroupID *string `json:"groupId,omitempty"`
20749	// RequiredMemberName - READ-ONLY; The required member name for current private link connection.
20750	RequiredMemberName *string `json:"requiredMemberName,omitempty"`
20751	// Fqdns - READ-ONLY; List of FQDNs for current private link connection.
20752	Fqdns *[]string `json:"fqdns,omitempty"`
20753}
20754
20755// MarshalJSON is the custom marshaler for InterfaceIPConfigurationPrivateLinkConnectionProperties.
20756func (iicplcp InterfaceIPConfigurationPrivateLinkConnectionProperties) MarshalJSON() ([]byte, error) {
20757	objectMap := make(map[string]interface{})
20758	return json.Marshal(objectMap)
20759}
20760
20761// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
20762type InterfaceIPConfigurationPropertiesFormat struct {
20763	// VirtualNetworkTaps - The reference to Virtual Network Taps.
20764	VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"`
20765	// ApplicationGatewayBackendAddressPools - The reference to ApplicationGatewayBackendAddressPool resource.
20766	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
20767	// LoadBalancerBackendAddressPools - The reference to LoadBalancerBackendAddressPool resource.
20768	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
20769	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
20770	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
20771	// PrivateIPAddress - Private IP address of the IP configuration.
20772	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
20773	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic'
20774	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
20775	// PrivateIPAddressVersion - Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
20776	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
20777	// Subnet - Subnet bound to the IP configuration.
20778	Subnet *Subnet `json:"subnet,omitempty"`
20779	// Primary - Whether this is a primary customer address on the network interface.
20780	Primary *bool `json:"primary,omitempty"`
20781	// PublicIPAddress - Public IP address bound to the IP configuration.
20782	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
20783	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
20784	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
20785	// ProvisioningState - READ-ONLY; The provisioning state of the network interface IP configuration. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
20786	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20787	// PrivateLinkConnectionProperties - READ-ONLY; PrivateLinkConnection properties for the network interface.
20788	PrivateLinkConnectionProperties *InterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"`
20789}
20790
20791// MarshalJSON is the custom marshaler for InterfaceIPConfigurationPropertiesFormat.
20792func (iicpf InterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
20793	objectMap := make(map[string]interface{})
20794	if iicpf.VirtualNetworkTaps != nil {
20795		objectMap["virtualNetworkTaps"] = iicpf.VirtualNetworkTaps
20796	}
20797	if iicpf.ApplicationGatewayBackendAddressPools != nil {
20798		objectMap["applicationGatewayBackendAddressPools"] = iicpf.ApplicationGatewayBackendAddressPools
20799	}
20800	if iicpf.LoadBalancerBackendAddressPools != nil {
20801		objectMap["loadBalancerBackendAddressPools"] = iicpf.LoadBalancerBackendAddressPools
20802	}
20803	if iicpf.LoadBalancerInboundNatRules != nil {
20804		objectMap["loadBalancerInboundNatRules"] = iicpf.LoadBalancerInboundNatRules
20805	}
20806	if iicpf.PrivateIPAddress != nil {
20807		objectMap["privateIPAddress"] = iicpf.PrivateIPAddress
20808	}
20809	if iicpf.PrivateIPAllocationMethod != "" {
20810		objectMap["privateIPAllocationMethod"] = iicpf.PrivateIPAllocationMethod
20811	}
20812	if iicpf.PrivateIPAddressVersion != "" {
20813		objectMap["privateIPAddressVersion"] = iicpf.PrivateIPAddressVersion
20814	}
20815	if iicpf.Subnet != nil {
20816		objectMap["subnet"] = iicpf.Subnet
20817	}
20818	if iicpf.Primary != nil {
20819		objectMap["primary"] = iicpf.Primary
20820	}
20821	if iicpf.PublicIPAddress != nil {
20822		objectMap["publicIPAddress"] = iicpf.PublicIPAddress
20823	}
20824	if iicpf.ApplicationSecurityGroups != nil {
20825		objectMap["applicationSecurityGroups"] = iicpf.ApplicationSecurityGroups
20826	}
20827	return json.Marshal(objectMap)
20828}
20829
20830// InterfaceListResult response for the ListNetworkInterface API service call.
20831type InterfaceListResult struct {
20832	autorest.Response `json:"-"`
20833	// Value - A list of network interfaces in a resource group.
20834	Value *[]Interface `json:"value,omitempty"`
20835	// NextLink - READ-ONLY; The URL to get the next set of results.
20836	NextLink *string `json:"nextLink,omitempty"`
20837}
20838
20839// MarshalJSON is the custom marshaler for InterfaceListResult.
20840func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
20841	objectMap := make(map[string]interface{})
20842	if ilr.Value != nil {
20843		objectMap["value"] = ilr.Value
20844	}
20845	return json.Marshal(objectMap)
20846}
20847
20848// InterfaceListResultIterator provides access to a complete listing of Interface values.
20849type InterfaceListResultIterator struct {
20850	i    int
20851	page InterfaceListResultPage
20852}
20853
20854// NextWithContext advances to the next value.  If there was an error making
20855// the request the iterator does not advance and the error is returned.
20856func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
20857	if tracing.IsEnabled() {
20858		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
20859		defer func() {
20860			sc := -1
20861			if iter.Response().Response.Response != nil {
20862				sc = iter.Response().Response.Response.StatusCode
20863			}
20864			tracing.EndSpan(ctx, sc, err)
20865		}()
20866	}
20867	iter.i++
20868	if iter.i < len(iter.page.Values()) {
20869		return nil
20870	}
20871	err = iter.page.NextWithContext(ctx)
20872	if err != nil {
20873		iter.i--
20874		return err
20875	}
20876	iter.i = 0
20877	return nil
20878}
20879
20880// Next advances to the next value.  If there was an error making
20881// the request the iterator does not advance and the error is returned.
20882// Deprecated: Use NextWithContext() instead.
20883func (iter *InterfaceListResultIterator) Next() error {
20884	return iter.NextWithContext(context.Background())
20885}
20886
20887// NotDone returns true if the enumeration should be started or is not yet complete.
20888func (iter InterfaceListResultIterator) NotDone() bool {
20889	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20890}
20891
20892// Response returns the raw server response from the last page request.
20893func (iter InterfaceListResultIterator) Response() InterfaceListResult {
20894	return iter.page.Response()
20895}
20896
20897// Value returns the current value or a zero-initialized value if the
20898// iterator has advanced beyond the end of the collection.
20899func (iter InterfaceListResultIterator) Value() Interface {
20900	if !iter.page.NotDone() {
20901		return Interface{}
20902	}
20903	return iter.page.Values()[iter.i]
20904}
20905
20906// Creates a new instance of the InterfaceListResultIterator type.
20907func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
20908	return InterfaceListResultIterator{page: page}
20909}
20910
20911// IsEmpty returns true if the ListResult contains no values.
20912func (ilr InterfaceListResult) IsEmpty() bool {
20913	return ilr.Value == nil || len(*ilr.Value) == 0
20914}
20915
20916// hasNextLink returns true if the NextLink is not empty.
20917func (ilr InterfaceListResult) hasNextLink() bool {
20918	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
20919}
20920
20921// interfaceListResultPreparer prepares a request to retrieve the next set of results.
20922// It returns nil if no more results exist.
20923func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
20924	if !ilr.hasNextLink() {
20925		return nil, nil
20926	}
20927	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20928		autorest.AsJSON(),
20929		autorest.AsGet(),
20930		autorest.WithBaseURL(to.String(ilr.NextLink)))
20931}
20932
20933// InterfaceListResultPage contains a page of Interface values.
20934type InterfaceListResultPage struct {
20935	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
20936	ilr InterfaceListResult
20937}
20938
20939// NextWithContext advances to the next page of values.  If there was an error making
20940// the request the page does not advance and the error is returned.
20941func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
20942	if tracing.IsEnabled() {
20943		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
20944		defer func() {
20945			sc := -1
20946			if page.Response().Response.Response != nil {
20947				sc = page.Response().Response.Response.StatusCode
20948			}
20949			tracing.EndSpan(ctx, sc, err)
20950		}()
20951	}
20952	for {
20953		next, err := page.fn(ctx, page.ilr)
20954		if err != nil {
20955			return err
20956		}
20957		page.ilr = next
20958		if !next.hasNextLink() || !next.IsEmpty() {
20959			break
20960		}
20961	}
20962	return nil
20963}
20964
20965// Next advances to the next page of values.  If there was an error making
20966// the request the page does not advance and the error is returned.
20967// Deprecated: Use NextWithContext() instead.
20968func (page *InterfaceListResultPage) Next() error {
20969	return page.NextWithContext(context.Background())
20970}
20971
20972// NotDone returns true if the page enumeration should be started or is not yet complete.
20973func (page InterfaceListResultPage) NotDone() bool {
20974	return !page.ilr.IsEmpty()
20975}
20976
20977// Response returns the raw server response from the last page request.
20978func (page InterfaceListResultPage) Response() InterfaceListResult {
20979	return page.ilr
20980}
20981
20982// Values returns the slice of values for the current page or nil if there are no values.
20983func (page InterfaceListResultPage) Values() []Interface {
20984	if page.ilr.IsEmpty() {
20985		return nil
20986	}
20987	return *page.ilr.Value
20988}
20989
20990// Creates a new instance of the InterfaceListResultPage type.
20991func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
20992	return InterfaceListResultPage{
20993		fn:  getNextPage,
20994		ilr: cur,
20995	}
20996}
20997
20998// InterfaceLoadBalancerListResult response for list ip configurations API service call.
20999type InterfaceLoadBalancerListResult struct {
21000	autorest.Response `json:"-"`
21001	// Value - A list of load balancers.
21002	Value *[]LoadBalancer `json:"value,omitempty"`
21003	// NextLink - READ-ONLY; The URL to get the next set of results.
21004	NextLink *string `json:"nextLink,omitempty"`
21005}
21006
21007// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
21008func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
21009	objectMap := make(map[string]interface{})
21010	if ilblr.Value != nil {
21011		objectMap["value"] = ilblr.Value
21012	}
21013	return json.Marshal(objectMap)
21014}
21015
21016// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
21017type InterfaceLoadBalancerListResultIterator struct {
21018	i    int
21019	page InterfaceLoadBalancerListResultPage
21020}
21021
21022// NextWithContext advances to the next value.  If there was an error making
21023// the request the iterator does not advance and the error is returned.
21024func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
21025	if tracing.IsEnabled() {
21026		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
21027		defer func() {
21028			sc := -1
21029			if iter.Response().Response.Response != nil {
21030				sc = iter.Response().Response.Response.StatusCode
21031			}
21032			tracing.EndSpan(ctx, sc, err)
21033		}()
21034	}
21035	iter.i++
21036	if iter.i < len(iter.page.Values()) {
21037		return nil
21038	}
21039	err = iter.page.NextWithContext(ctx)
21040	if err != nil {
21041		iter.i--
21042		return err
21043	}
21044	iter.i = 0
21045	return nil
21046}
21047
21048// Next advances to the next value.  If there was an error making
21049// the request the iterator does not advance and the error is returned.
21050// Deprecated: Use NextWithContext() instead.
21051func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
21052	return iter.NextWithContext(context.Background())
21053}
21054
21055// NotDone returns true if the enumeration should be started or is not yet complete.
21056func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
21057	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21058}
21059
21060// Response returns the raw server response from the last page request.
21061func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
21062	return iter.page.Response()
21063}
21064
21065// Value returns the current value or a zero-initialized value if the
21066// iterator has advanced beyond the end of the collection.
21067func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
21068	if !iter.page.NotDone() {
21069		return LoadBalancer{}
21070	}
21071	return iter.page.Values()[iter.i]
21072}
21073
21074// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
21075func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
21076	return InterfaceLoadBalancerListResultIterator{page: page}
21077}
21078
21079// IsEmpty returns true if the ListResult contains no values.
21080func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
21081	return ilblr.Value == nil || len(*ilblr.Value) == 0
21082}
21083
21084// hasNextLink returns true if the NextLink is not empty.
21085func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
21086	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
21087}
21088
21089// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
21090// It returns nil if no more results exist.
21091func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
21092	if !ilblr.hasNextLink() {
21093		return nil, nil
21094	}
21095	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21096		autorest.AsJSON(),
21097		autorest.AsGet(),
21098		autorest.WithBaseURL(to.String(ilblr.NextLink)))
21099}
21100
21101// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
21102type InterfaceLoadBalancerListResultPage struct {
21103	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
21104	ilblr InterfaceLoadBalancerListResult
21105}
21106
21107// NextWithContext advances to the next page of values.  If there was an error making
21108// the request the page does not advance and the error is returned.
21109func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
21110	if tracing.IsEnabled() {
21111		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
21112		defer func() {
21113			sc := -1
21114			if page.Response().Response.Response != nil {
21115				sc = page.Response().Response.Response.StatusCode
21116			}
21117			tracing.EndSpan(ctx, sc, err)
21118		}()
21119	}
21120	for {
21121		next, err := page.fn(ctx, page.ilblr)
21122		if err != nil {
21123			return err
21124		}
21125		page.ilblr = next
21126		if !next.hasNextLink() || !next.IsEmpty() {
21127			break
21128		}
21129	}
21130	return nil
21131}
21132
21133// Next advances to the next page of values.  If there was an error making
21134// the request the page does not advance and the error is returned.
21135// Deprecated: Use NextWithContext() instead.
21136func (page *InterfaceLoadBalancerListResultPage) Next() error {
21137	return page.NextWithContext(context.Background())
21138}
21139
21140// NotDone returns true if the page enumeration should be started or is not yet complete.
21141func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
21142	return !page.ilblr.IsEmpty()
21143}
21144
21145// Response returns the raw server response from the last page request.
21146func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
21147	return page.ilblr
21148}
21149
21150// Values returns the slice of values for the current page or nil if there are no values.
21151func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
21152	if page.ilblr.IsEmpty() {
21153		return nil
21154	}
21155	return *page.ilblr.Value
21156}
21157
21158// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
21159func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
21160	return InterfaceLoadBalancerListResultPage{
21161		fn:    getNextPage,
21162		ilblr: cur,
21163	}
21164}
21165
21166// InterfacePropertiesFormat networkInterface properties.
21167type InterfacePropertiesFormat struct {
21168	// VirtualMachine - READ-ONLY; The reference to a virtual machine.
21169	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
21170	// NetworkSecurityGroup - The reference to the NetworkSecurityGroup resource.
21171	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
21172	// PrivateEndpoint - READ-ONLY; A reference to the private endpoint to which the network interface is linked.
21173	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
21174	// IPConfigurations - A list of IPConfigurations of the network interface.
21175	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
21176	// TapConfigurations - READ-ONLY; A list of TapConfigurations of the network interface.
21177	TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"`
21178	// DNSSettings - The DNS settings in network interface.
21179	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
21180	// MacAddress - READ-ONLY; The MAC address of the network interface.
21181	MacAddress *string `json:"macAddress,omitempty"`
21182	// Primary - READ-ONLY; Whether this is a primary network interface on a virtual machine.
21183	Primary *bool `json:"primary,omitempty"`
21184	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
21185	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
21186	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
21187	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
21188	// HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources.
21189	HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"`
21190	// DscpConfiguration - READ-ONLY; A reference to the dscp configuration to which the network interface is linked.
21191	DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"`
21192	// ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource.
21193	ResourceGUID *string `json:"resourceGuid,omitempty"`
21194	// ProvisioningState - READ-ONLY; The provisioning state of the network interface resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
21195	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21196	// NicType - Type of Network Interface resource. Possible values include: 'InterfaceNicTypeStandard', 'InterfaceNicTypeElastic'
21197	NicType InterfaceNicType `json:"nicType,omitempty"`
21198	// PrivateLinkService - Privatelinkservice of the network interface resource.
21199	PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"`
21200	// MigrationPhase - Migration phase of Network Interface resource. Possible values include: 'InterfaceMigrationPhaseNone', 'InterfaceMigrationPhasePrepare', 'InterfaceMigrationPhaseCommit', 'InterfaceMigrationPhaseAbort', 'InterfaceMigrationPhaseCommitted'
21201	MigrationPhase InterfaceMigrationPhase `json:"migrationPhase,omitempty"`
21202}
21203
21204// MarshalJSON is the custom marshaler for InterfacePropertiesFormat.
21205func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
21206	objectMap := make(map[string]interface{})
21207	if ipf.NetworkSecurityGroup != nil {
21208		objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup
21209	}
21210	if ipf.IPConfigurations != nil {
21211		objectMap["ipConfigurations"] = ipf.IPConfigurations
21212	}
21213	if ipf.DNSSettings != nil {
21214		objectMap["dnsSettings"] = ipf.DNSSettings
21215	}
21216	if ipf.EnableAcceleratedNetworking != nil {
21217		objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking
21218	}
21219	if ipf.EnableIPForwarding != nil {
21220		objectMap["enableIPForwarding"] = ipf.EnableIPForwarding
21221	}
21222	if ipf.NicType != "" {
21223		objectMap["nicType"] = ipf.NicType
21224	}
21225	if ipf.PrivateLinkService != nil {
21226		objectMap["privateLinkService"] = ipf.PrivateLinkService
21227	}
21228	if ipf.MigrationPhase != "" {
21229		objectMap["migrationPhase"] = ipf.MigrationPhase
21230	}
21231	return json.Marshal(objectMap)
21232}
21233
21234// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21235// long-running operation.
21236type InterfacesCreateOrUpdateFuture struct {
21237	azure.FutureAPI
21238	// Result returns the result of the asynchronous operation.
21239	// If the operation has not completed it will return an error.
21240	Result func(InterfacesClient) (Interface, error)
21241}
21242
21243// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21244func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
21245	var azFuture azure.Future
21246	if err := json.Unmarshal(body, &azFuture); err != nil {
21247		return err
21248	}
21249	future.FutureAPI = &azFuture
21250	future.Result = future.result
21251	return nil
21252}
21253
21254// result is the default implementation for InterfacesCreateOrUpdateFuture.Result.
21255func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) {
21256	var done bool
21257	done, err = future.DoneWithContext(context.Background(), client)
21258	if err != nil {
21259		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21260		return
21261	}
21262	if !done {
21263		i.Response.Response = future.Response()
21264		err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
21265		return
21266	}
21267	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21268	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
21269		i, err = client.CreateOrUpdateResponder(i.Response.Response)
21270		if err != nil {
21271			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
21272		}
21273	}
21274	return
21275}
21276
21277// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21278// operation.
21279type InterfacesDeleteFuture struct {
21280	azure.FutureAPI
21281	// Result returns the result of the asynchronous operation.
21282	// If the operation has not completed it will return an error.
21283	Result func(InterfacesClient) (autorest.Response, error)
21284}
21285
21286// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21287func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error {
21288	var azFuture azure.Future
21289	if err := json.Unmarshal(body, &azFuture); err != nil {
21290		return err
21291	}
21292	future.FutureAPI = &azFuture
21293	future.Result = future.result
21294	return nil
21295}
21296
21297// result is the default implementation for InterfacesDeleteFuture.Result.
21298func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) {
21299	var done bool
21300	done, err = future.DoneWithContext(context.Background(), client)
21301	if err != nil {
21302		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
21303		return
21304	}
21305	if !done {
21306		ar.Response = future.Response()
21307		err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
21308		return
21309	}
21310	ar.Response = future.Response()
21311	return
21312}
21313
21314// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
21315// long-running operation.
21316type InterfacesGetEffectiveRouteTableFuture struct {
21317	azure.FutureAPI
21318	// Result returns the result of the asynchronous operation.
21319	// If the operation has not completed it will return an error.
21320	Result func(InterfacesClient) (EffectiveRouteListResult, error)
21321}
21322
21323// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21324func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error {
21325	var azFuture azure.Future
21326	if err := json.Unmarshal(body, &azFuture); err != nil {
21327		return err
21328	}
21329	future.FutureAPI = &azFuture
21330	future.Result = future.result
21331	return nil
21332}
21333
21334// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result.
21335func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
21336	var done bool
21337	done, err = future.DoneWithContext(context.Background(), client)
21338	if err != nil {
21339		err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
21340		return
21341	}
21342	if !done {
21343		erlr.Response.Response = future.Response()
21344		err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
21345		return
21346	}
21347	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21348	if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
21349		erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
21350		if err != nil {
21351			err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
21352		}
21353	}
21354	return
21355}
21356
21357// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
21358// results of a long-running operation.
21359type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
21360	azure.FutureAPI
21361	// Result returns the result of the asynchronous operation.
21362	// If the operation has not completed it will return an error.
21363	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
21364}
21365
21366// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21367func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error {
21368	var azFuture azure.Future
21369	if err := json.Unmarshal(body, &azFuture); err != nil {
21370		return err
21371	}
21372	future.FutureAPI = &azFuture
21373	future.Result = future.result
21374	return nil
21375}
21376
21377// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result.
21378func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
21379	var done bool
21380	done, err = future.DoneWithContext(context.Background(), client)
21381	if err != nil {
21382		err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
21383		return
21384	}
21385	if !done {
21386		ensglr.Response.Response = future.Response()
21387		err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
21388		return
21389	}
21390	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21391	if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
21392		ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
21393		if err != nil {
21394			err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
21395		}
21396	}
21397	return
21398}
21399
21400// InterfaceTapConfiguration tap configuration in a Network Interface.
21401type InterfaceTapConfiguration struct {
21402	autorest.Response `json:"-"`
21403	// InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration.
21404	*InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"`
21405	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21406	Name *string `json:"name,omitempty"`
21407	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21408	Etag *string `json:"etag,omitempty"`
21409	// Type - READ-ONLY; Sub Resource type.
21410	Type *string `json:"type,omitempty"`
21411	// ID - Resource ID.
21412	ID *string `json:"id,omitempty"`
21413}
21414
21415// MarshalJSON is the custom marshaler for InterfaceTapConfiguration.
21416func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) {
21417	objectMap := make(map[string]interface{})
21418	if itc.InterfaceTapConfigurationPropertiesFormat != nil {
21419		objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat
21420	}
21421	if itc.Name != nil {
21422		objectMap["name"] = itc.Name
21423	}
21424	if itc.ID != nil {
21425		objectMap["id"] = itc.ID
21426	}
21427	return json.Marshal(objectMap)
21428}
21429
21430// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct.
21431func (itc *InterfaceTapConfiguration) UnmarshalJSON(body []byte) error {
21432	var m map[string]*json.RawMessage
21433	err := json.Unmarshal(body, &m)
21434	if err != nil {
21435		return err
21436	}
21437	for k, v := range m {
21438		switch k {
21439		case "properties":
21440			if v != nil {
21441				var interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat
21442				err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat)
21443				if err != nil {
21444					return err
21445				}
21446				itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat
21447			}
21448		case "name":
21449			if v != nil {
21450				var name string
21451				err = json.Unmarshal(*v, &name)
21452				if err != nil {
21453					return err
21454				}
21455				itc.Name = &name
21456			}
21457		case "etag":
21458			if v != nil {
21459				var etag string
21460				err = json.Unmarshal(*v, &etag)
21461				if err != nil {
21462					return err
21463				}
21464				itc.Etag = &etag
21465			}
21466		case "type":
21467			if v != nil {
21468				var typeVar string
21469				err = json.Unmarshal(*v, &typeVar)
21470				if err != nil {
21471					return err
21472				}
21473				itc.Type = &typeVar
21474			}
21475		case "id":
21476			if v != nil {
21477				var ID string
21478				err = json.Unmarshal(*v, &ID)
21479				if err != nil {
21480					return err
21481				}
21482				itc.ID = &ID
21483			}
21484		}
21485	}
21486
21487	return nil
21488}
21489
21490// InterfaceTapConfigurationListResult response for list tap configurations API service call.
21491type InterfaceTapConfigurationListResult struct {
21492	autorest.Response `json:"-"`
21493	// Value - A list of tap configurations.
21494	Value *[]InterfaceTapConfiguration `json:"value,omitempty"`
21495	// NextLink - READ-ONLY; The URL to get the next set of results.
21496	NextLink *string `json:"nextLink,omitempty"`
21497}
21498
21499// MarshalJSON is the custom marshaler for InterfaceTapConfigurationListResult.
21500func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) {
21501	objectMap := make(map[string]interface{})
21502	if itclr.Value != nil {
21503		objectMap["value"] = itclr.Value
21504	}
21505	return json.Marshal(objectMap)
21506}
21507
21508// InterfaceTapConfigurationListResultIterator provides access to a complete listing of
21509// InterfaceTapConfiguration values.
21510type InterfaceTapConfigurationListResultIterator struct {
21511	i    int
21512	page InterfaceTapConfigurationListResultPage
21513}
21514
21515// NextWithContext advances to the next value.  If there was an error making
21516// the request the iterator does not advance and the error is returned.
21517func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
21518	if tracing.IsEnabled() {
21519		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.NextWithContext")
21520		defer func() {
21521			sc := -1
21522			if iter.Response().Response.Response != nil {
21523				sc = iter.Response().Response.Response.StatusCode
21524			}
21525			tracing.EndSpan(ctx, sc, err)
21526		}()
21527	}
21528	iter.i++
21529	if iter.i < len(iter.page.Values()) {
21530		return nil
21531	}
21532	err = iter.page.NextWithContext(ctx)
21533	if err != nil {
21534		iter.i--
21535		return err
21536	}
21537	iter.i = 0
21538	return nil
21539}
21540
21541// Next advances to the next value.  If there was an error making
21542// the request the iterator does not advance and the error is returned.
21543// Deprecated: Use NextWithContext() instead.
21544func (iter *InterfaceTapConfigurationListResultIterator) Next() error {
21545	return iter.NextWithContext(context.Background())
21546}
21547
21548// NotDone returns true if the enumeration should be started or is not yet complete.
21549func (iter InterfaceTapConfigurationListResultIterator) NotDone() bool {
21550	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21551}
21552
21553// Response returns the raw server response from the last page request.
21554func (iter InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult {
21555	return iter.page.Response()
21556}
21557
21558// Value returns the current value or a zero-initialized value if the
21559// iterator has advanced beyond the end of the collection.
21560func (iter InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration {
21561	if !iter.page.NotDone() {
21562		return InterfaceTapConfiguration{}
21563	}
21564	return iter.page.Values()[iter.i]
21565}
21566
21567// Creates a new instance of the InterfaceTapConfigurationListResultIterator type.
21568func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator {
21569	return InterfaceTapConfigurationListResultIterator{page: page}
21570}
21571
21572// IsEmpty returns true if the ListResult contains no values.
21573func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
21574	return itclr.Value == nil || len(*itclr.Value) == 0
21575}
21576
21577// hasNextLink returns true if the NextLink is not empty.
21578func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool {
21579	return itclr.NextLink != nil && len(*itclr.NextLink) != 0
21580}
21581
21582// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results.
21583// It returns nil if no more results exist.
21584func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
21585	if !itclr.hasNextLink() {
21586		return nil, nil
21587	}
21588	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21589		autorest.AsJSON(),
21590		autorest.AsGet(),
21591		autorest.WithBaseURL(to.String(itclr.NextLink)))
21592}
21593
21594// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values.
21595type InterfaceTapConfigurationListResultPage struct {
21596	fn    func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
21597	itclr InterfaceTapConfigurationListResult
21598}
21599
21600// NextWithContext advances to the next page of values.  If there was an error making
21601// the request the page does not advance and the error is returned.
21602func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
21603	if tracing.IsEnabled() {
21604		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext")
21605		defer func() {
21606			sc := -1
21607			if page.Response().Response.Response != nil {
21608				sc = page.Response().Response.Response.StatusCode
21609			}
21610			tracing.EndSpan(ctx, sc, err)
21611		}()
21612	}
21613	for {
21614		next, err := page.fn(ctx, page.itclr)
21615		if err != nil {
21616			return err
21617		}
21618		page.itclr = next
21619		if !next.hasNextLink() || !next.IsEmpty() {
21620			break
21621		}
21622	}
21623	return nil
21624}
21625
21626// Next advances to the next page of values.  If there was an error making
21627// the request the page does not advance and the error is returned.
21628// Deprecated: Use NextWithContext() instead.
21629func (page *InterfaceTapConfigurationListResultPage) Next() error {
21630	return page.NextWithContext(context.Background())
21631}
21632
21633// NotDone returns true if the page enumeration should be started or is not yet complete.
21634func (page InterfaceTapConfigurationListResultPage) NotDone() bool {
21635	return !page.itclr.IsEmpty()
21636}
21637
21638// Response returns the raw server response from the last page request.
21639func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult {
21640	return page.itclr
21641}
21642
21643// Values returns the slice of values for the current page or nil if there are no values.
21644func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration {
21645	if page.itclr.IsEmpty() {
21646		return nil
21647	}
21648	return *page.itclr.Value
21649}
21650
21651// Creates a new instance of the InterfaceTapConfigurationListResultPage type.
21652func NewInterfaceTapConfigurationListResultPage(cur InterfaceTapConfigurationListResult, getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage {
21653	return InterfaceTapConfigurationListResultPage{
21654		fn:    getNextPage,
21655		itclr: cur,
21656	}
21657}
21658
21659// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration.
21660type InterfaceTapConfigurationPropertiesFormat struct {
21661	// VirtualNetworkTap - The reference to the Virtual Network Tap resource.
21662	VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"`
21663	// ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
21664	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21665}
21666
21667// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat.
21668func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
21669	objectMap := make(map[string]interface{})
21670	if itcpf.VirtualNetworkTap != nil {
21671		objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap
21672	}
21673	return json.Marshal(objectMap)
21674}
21675
21676// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
21677// of a long-running operation.
21678type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
21679	azure.FutureAPI
21680	// Result returns the result of the asynchronous operation.
21681	// If the operation has not completed it will return an error.
21682	Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error)
21683}
21684
21685// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21686func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
21687	var azFuture azure.Future
21688	if err := json.Unmarshal(body, &azFuture); err != nil {
21689		return err
21690	}
21691	future.FutureAPI = &azFuture
21692	future.Result = future.result
21693	return nil
21694}
21695
21696// result is the default implementation for InterfaceTapConfigurationsCreateOrUpdateFuture.Result.
21697func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) result(client InterfaceTapConfigurationsClient) (itc InterfaceTapConfiguration, err error) {
21698	var done bool
21699	done, err = future.DoneWithContext(context.Background(), client)
21700	if err != nil {
21701		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21702		return
21703	}
21704	if !done {
21705		itc.Response.Response = future.Response()
21706		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsCreateOrUpdateFuture")
21707		return
21708	}
21709	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21710	if itc.Response.Response, err = future.GetResult(sender); err == nil && itc.Response.Response.StatusCode != http.StatusNoContent {
21711		itc, err = client.CreateOrUpdateResponder(itc.Response.Response)
21712		if err != nil {
21713			err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", itc.Response.Response, "Failure responding to request")
21714		}
21715	}
21716	return
21717}
21718
21719// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
21720// long-running operation.
21721type InterfaceTapConfigurationsDeleteFuture struct {
21722	azure.FutureAPI
21723	// Result returns the result of the asynchronous operation.
21724	// If the operation has not completed it will return an error.
21725	Result func(InterfaceTapConfigurationsClient) (autorest.Response, error)
21726}
21727
21728// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21729func (future *InterfaceTapConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
21730	var azFuture azure.Future
21731	if err := json.Unmarshal(body, &azFuture); err != nil {
21732		return err
21733	}
21734	future.FutureAPI = &azFuture
21735	future.Result = future.result
21736	return nil
21737}
21738
21739// result is the default implementation for InterfaceTapConfigurationsDeleteFuture.Result.
21740func (future *InterfaceTapConfigurationsDeleteFuture) result(client InterfaceTapConfigurationsClient) (ar autorest.Response, err error) {
21741	var done bool
21742	done, err = future.DoneWithContext(context.Background(), client)
21743	if err != nil {
21744		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
21745		return
21746	}
21747	if !done {
21748		ar.Response = future.Response()
21749		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsDeleteFuture")
21750		return
21751	}
21752	ar.Response = future.Response()
21753	return
21754}
21755
21756// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call.
21757type IPAddressAvailabilityResult struct {
21758	autorest.Response `json:"-"`
21759	// Available - Private IP address availability.
21760	Available *bool `json:"available,omitempty"`
21761	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
21762	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
21763	// IsPlatformReserved - Private IP address platform reserved.
21764	IsPlatformReserved *bool `json:"isPlatformReserved,omitempty"`
21765}
21766
21767// IPAllocation ipAllocation resource.
21768type IPAllocation struct {
21769	autorest.Response `json:"-"`
21770	// IPAllocationPropertiesFormat - Properties of the IpAllocation.
21771	*IPAllocationPropertiesFormat `json:"properties,omitempty"`
21772	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21773	Etag *string `json:"etag,omitempty"`
21774	// ID - Resource ID.
21775	ID *string `json:"id,omitempty"`
21776	// Name - READ-ONLY; Resource name.
21777	Name *string `json:"name,omitempty"`
21778	// Type - READ-ONLY; Resource type.
21779	Type *string `json:"type,omitempty"`
21780	// Location - Resource location.
21781	Location *string `json:"location,omitempty"`
21782	// Tags - Resource tags.
21783	Tags map[string]*string `json:"tags"`
21784}
21785
21786// MarshalJSON is the custom marshaler for IPAllocation.
21787func (ia IPAllocation) MarshalJSON() ([]byte, error) {
21788	objectMap := make(map[string]interface{})
21789	if ia.IPAllocationPropertiesFormat != nil {
21790		objectMap["properties"] = ia.IPAllocationPropertiesFormat
21791	}
21792	if ia.ID != nil {
21793		objectMap["id"] = ia.ID
21794	}
21795	if ia.Location != nil {
21796		objectMap["location"] = ia.Location
21797	}
21798	if ia.Tags != nil {
21799		objectMap["tags"] = ia.Tags
21800	}
21801	return json.Marshal(objectMap)
21802}
21803
21804// UnmarshalJSON is the custom unmarshaler for IPAllocation struct.
21805func (ia *IPAllocation) UnmarshalJSON(body []byte) error {
21806	var m map[string]*json.RawMessage
21807	err := json.Unmarshal(body, &m)
21808	if err != nil {
21809		return err
21810	}
21811	for k, v := range m {
21812		switch k {
21813		case "properties":
21814			if v != nil {
21815				var IPAllocationPropertiesFormat IPAllocationPropertiesFormat
21816				err = json.Unmarshal(*v, &IPAllocationPropertiesFormat)
21817				if err != nil {
21818					return err
21819				}
21820				ia.IPAllocationPropertiesFormat = &IPAllocationPropertiesFormat
21821			}
21822		case "etag":
21823			if v != nil {
21824				var etag string
21825				err = json.Unmarshal(*v, &etag)
21826				if err != nil {
21827					return err
21828				}
21829				ia.Etag = &etag
21830			}
21831		case "id":
21832			if v != nil {
21833				var ID string
21834				err = json.Unmarshal(*v, &ID)
21835				if err != nil {
21836					return err
21837				}
21838				ia.ID = &ID
21839			}
21840		case "name":
21841			if v != nil {
21842				var name string
21843				err = json.Unmarshal(*v, &name)
21844				if err != nil {
21845					return err
21846				}
21847				ia.Name = &name
21848			}
21849		case "type":
21850			if v != nil {
21851				var typeVar string
21852				err = json.Unmarshal(*v, &typeVar)
21853				if err != nil {
21854					return err
21855				}
21856				ia.Type = &typeVar
21857			}
21858		case "location":
21859			if v != nil {
21860				var location string
21861				err = json.Unmarshal(*v, &location)
21862				if err != nil {
21863					return err
21864				}
21865				ia.Location = &location
21866			}
21867		case "tags":
21868			if v != nil {
21869				var tags map[string]*string
21870				err = json.Unmarshal(*v, &tags)
21871				if err != nil {
21872					return err
21873				}
21874				ia.Tags = tags
21875			}
21876		}
21877	}
21878
21879	return nil
21880}
21881
21882// IPAllocationListResult response for the ListIpAllocations API service call.
21883type IPAllocationListResult struct {
21884	autorest.Response `json:"-"`
21885	// Value - A list of IpAllocation resources.
21886	Value *[]IPAllocation `json:"value,omitempty"`
21887	// NextLink - The URL to get the next set of results.
21888	NextLink *string `json:"nextLink,omitempty"`
21889}
21890
21891// IPAllocationListResultIterator provides access to a complete listing of IPAllocation values.
21892type IPAllocationListResultIterator struct {
21893	i    int
21894	page IPAllocationListResultPage
21895}
21896
21897// NextWithContext advances to the next value.  If there was an error making
21898// the request the iterator does not advance and the error is returned.
21899func (iter *IPAllocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
21900	if tracing.IsEnabled() {
21901		ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationListResultIterator.NextWithContext")
21902		defer func() {
21903			sc := -1
21904			if iter.Response().Response.Response != nil {
21905				sc = iter.Response().Response.Response.StatusCode
21906			}
21907			tracing.EndSpan(ctx, sc, err)
21908		}()
21909	}
21910	iter.i++
21911	if iter.i < len(iter.page.Values()) {
21912		return nil
21913	}
21914	err = iter.page.NextWithContext(ctx)
21915	if err != nil {
21916		iter.i--
21917		return err
21918	}
21919	iter.i = 0
21920	return nil
21921}
21922
21923// Next advances to the next value.  If there was an error making
21924// the request the iterator does not advance and the error is returned.
21925// Deprecated: Use NextWithContext() instead.
21926func (iter *IPAllocationListResultIterator) Next() error {
21927	return iter.NextWithContext(context.Background())
21928}
21929
21930// NotDone returns true if the enumeration should be started or is not yet complete.
21931func (iter IPAllocationListResultIterator) NotDone() bool {
21932	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21933}
21934
21935// Response returns the raw server response from the last page request.
21936func (iter IPAllocationListResultIterator) Response() IPAllocationListResult {
21937	return iter.page.Response()
21938}
21939
21940// Value returns the current value or a zero-initialized value if the
21941// iterator has advanced beyond the end of the collection.
21942func (iter IPAllocationListResultIterator) Value() IPAllocation {
21943	if !iter.page.NotDone() {
21944		return IPAllocation{}
21945	}
21946	return iter.page.Values()[iter.i]
21947}
21948
21949// Creates a new instance of the IPAllocationListResultIterator type.
21950func NewIPAllocationListResultIterator(page IPAllocationListResultPage) IPAllocationListResultIterator {
21951	return IPAllocationListResultIterator{page: page}
21952}
21953
21954// IsEmpty returns true if the ListResult contains no values.
21955func (ialr IPAllocationListResult) IsEmpty() bool {
21956	return ialr.Value == nil || len(*ialr.Value) == 0
21957}
21958
21959// hasNextLink returns true if the NextLink is not empty.
21960func (ialr IPAllocationListResult) hasNextLink() bool {
21961	return ialr.NextLink != nil && len(*ialr.NextLink) != 0
21962}
21963
21964// iPAllocationListResultPreparer prepares a request to retrieve the next set of results.
21965// It returns nil if no more results exist.
21966func (ialr IPAllocationListResult) iPAllocationListResultPreparer(ctx context.Context) (*http.Request, error) {
21967	if !ialr.hasNextLink() {
21968		return nil, nil
21969	}
21970	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21971		autorest.AsJSON(),
21972		autorest.AsGet(),
21973		autorest.WithBaseURL(to.String(ialr.NextLink)))
21974}
21975
21976// IPAllocationListResultPage contains a page of IPAllocation values.
21977type IPAllocationListResultPage struct {
21978	fn   func(context.Context, IPAllocationListResult) (IPAllocationListResult, error)
21979	ialr IPAllocationListResult
21980}
21981
21982// NextWithContext advances to the next page of values.  If there was an error making
21983// the request the page does not advance and the error is returned.
21984func (page *IPAllocationListResultPage) NextWithContext(ctx context.Context) (err error) {
21985	if tracing.IsEnabled() {
21986		ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationListResultPage.NextWithContext")
21987		defer func() {
21988			sc := -1
21989			if page.Response().Response.Response != nil {
21990				sc = page.Response().Response.Response.StatusCode
21991			}
21992			tracing.EndSpan(ctx, sc, err)
21993		}()
21994	}
21995	for {
21996		next, err := page.fn(ctx, page.ialr)
21997		if err != nil {
21998			return err
21999		}
22000		page.ialr = next
22001		if !next.hasNextLink() || !next.IsEmpty() {
22002			break
22003		}
22004	}
22005	return nil
22006}
22007
22008// Next advances to the next page of values.  If there was an error making
22009// the request the page does not advance and the error is returned.
22010// Deprecated: Use NextWithContext() instead.
22011func (page *IPAllocationListResultPage) Next() error {
22012	return page.NextWithContext(context.Background())
22013}
22014
22015// NotDone returns true if the page enumeration should be started or is not yet complete.
22016func (page IPAllocationListResultPage) NotDone() bool {
22017	return !page.ialr.IsEmpty()
22018}
22019
22020// Response returns the raw server response from the last page request.
22021func (page IPAllocationListResultPage) Response() IPAllocationListResult {
22022	return page.ialr
22023}
22024
22025// Values returns the slice of values for the current page or nil if there are no values.
22026func (page IPAllocationListResultPage) Values() []IPAllocation {
22027	if page.ialr.IsEmpty() {
22028		return nil
22029	}
22030	return *page.ialr.Value
22031}
22032
22033// Creates a new instance of the IPAllocationListResultPage type.
22034func NewIPAllocationListResultPage(cur IPAllocationListResult, getNextPage func(context.Context, IPAllocationListResult) (IPAllocationListResult, error)) IPAllocationListResultPage {
22035	return IPAllocationListResultPage{
22036		fn:   getNextPage,
22037		ialr: cur,
22038	}
22039}
22040
22041// IPAllocationPropertiesFormat properties of the IpAllocation.
22042type IPAllocationPropertiesFormat struct {
22043	// Subnet - READ-ONLY; The Subnet that using the prefix of this IpAllocation resource.
22044	Subnet *SubResource `json:"subnet,omitempty"`
22045	// VirtualNetwork - READ-ONLY; The VirtualNetwork that using the prefix of this IpAllocation resource.
22046	VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"`
22047	// Type - The type for the IpAllocation. Possible values include: 'IPAllocationTypeUndefined', 'IPAllocationTypeHypernet'
22048	Type IPAllocationType `json:"type,omitempty"`
22049	// Prefix - The address prefix for the IpAllocation.
22050	Prefix *string `json:"prefix,omitempty"`
22051	// PrefixLength - The address prefix length for the IpAllocation.
22052	PrefixLength *int32 `json:"prefixLength,omitempty"`
22053	// PrefixType - The address prefix Type for the IpAllocation. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
22054	PrefixType IPVersion `json:"prefixType,omitempty"`
22055	// IpamAllocationID - The IPAM allocation ID.
22056	IpamAllocationID *string `json:"ipamAllocationId,omitempty"`
22057	// AllocationTags - IpAllocation tags.
22058	AllocationTags map[string]*string `json:"allocationTags"`
22059}
22060
22061// MarshalJSON is the custom marshaler for IPAllocationPropertiesFormat.
22062func (iapf IPAllocationPropertiesFormat) MarshalJSON() ([]byte, error) {
22063	objectMap := make(map[string]interface{})
22064	if iapf.Type != "" {
22065		objectMap["type"] = iapf.Type
22066	}
22067	if iapf.Prefix != nil {
22068		objectMap["prefix"] = iapf.Prefix
22069	}
22070	if iapf.PrefixLength != nil {
22071		objectMap["prefixLength"] = iapf.PrefixLength
22072	}
22073	if iapf.PrefixType != "" {
22074		objectMap["prefixType"] = iapf.PrefixType
22075	}
22076	if iapf.IpamAllocationID != nil {
22077		objectMap["ipamAllocationId"] = iapf.IpamAllocationID
22078	}
22079	if iapf.AllocationTags != nil {
22080		objectMap["allocationTags"] = iapf.AllocationTags
22081	}
22082	return json.Marshal(objectMap)
22083}
22084
22085// IPAllocationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22086// long-running operation.
22087type IPAllocationsCreateOrUpdateFuture struct {
22088	azure.FutureAPI
22089	// Result returns the result of the asynchronous operation.
22090	// If the operation has not completed it will return an error.
22091	Result func(IPAllocationsClient) (IPAllocation, error)
22092}
22093
22094// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22095func (future *IPAllocationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22096	var azFuture azure.Future
22097	if err := json.Unmarshal(body, &azFuture); err != nil {
22098		return err
22099	}
22100	future.FutureAPI = &azFuture
22101	future.Result = future.result
22102	return nil
22103}
22104
22105// result is the default implementation for IPAllocationsCreateOrUpdateFuture.Result.
22106func (future *IPAllocationsCreateOrUpdateFuture) result(client IPAllocationsClient) (ia IPAllocation, err error) {
22107	var done bool
22108	done, err = future.DoneWithContext(context.Background(), client)
22109	if err != nil {
22110		err = autorest.NewErrorWithError(err, "network.IPAllocationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22111		return
22112	}
22113	if !done {
22114		ia.Response.Response = future.Response()
22115		err = azure.NewAsyncOpIncompleteError("network.IPAllocationsCreateOrUpdateFuture")
22116		return
22117	}
22118	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22119	if ia.Response.Response, err = future.GetResult(sender); err == nil && ia.Response.Response.StatusCode != http.StatusNoContent {
22120		ia, err = client.CreateOrUpdateResponder(ia.Response.Response)
22121		if err != nil {
22122			err = autorest.NewErrorWithError(err, "network.IPAllocationsCreateOrUpdateFuture", "Result", ia.Response.Response, "Failure responding to request")
22123		}
22124	}
22125	return
22126}
22127
22128// IPAllocationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22129// operation.
22130type IPAllocationsDeleteFuture struct {
22131	azure.FutureAPI
22132	// Result returns the result of the asynchronous operation.
22133	// If the operation has not completed it will return an error.
22134	Result func(IPAllocationsClient) (autorest.Response, error)
22135}
22136
22137// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22138func (future *IPAllocationsDeleteFuture) UnmarshalJSON(body []byte) error {
22139	var azFuture azure.Future
22140	if err := json.Unmarshal(body, &azFuture); err != nil {
22141		return err
22142	}
22143	future.FutureAPI = &azFuture
22144	future.Result = future.result
22145	return nil
22146}
22147
22148// result is the default implementation for IPAllocationsDeleteFuture.Result.
22149func (future *IPAllocationsDeleteFuture) result(client IPAllocationsClient) (ar autorest.Response, err error) {
22150	var done bool
22151	done, err = future.DoneWithContext(context.Background(), client)
22152	if err != nil {
22153		err = autorest.NewErrorWithError(err, "network.IPAllocationsDeleteFuture", "Result", future.Response(), "Polling failure")
22154		return
22155	}
22156	if !done {
22157		ar.Response = future.Response()
22158		err = azure.NewAsyncOpIncompleteError("network.IPAllocationsDeleteFuture")
22159		return
22160	}
22161	ar.Response = future.Response()
22162	return
22163}
22164
22165// IPConfiguration IP configuration.
22166type IPConfiguration struct {
22167	// IPConfigurationPropertiesFormat - Properties of the IP configuration.
22168	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
22169	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
22170	Name *string `json:"name,omitempty"`
22171	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22172	Etag *string `json:"etag,omitempty"`
22173	// ID - Resource ID.
22174	ID *string `json:"id,omitempty"`
22175}
22176
22177// MarshalJSON is the custom marshaler for IPConfiguration.
22178func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
22179	objectMap := make(map[string]interface{})
22180	if ic.IPConfigurationPropertiesFormat != nil {
22181		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
22182	}
22183	if ic.Name != nil {
22184		objectMap["name"] = ic.Name
22185	}
22186	if ic.ID != nil {
22187		objectMap["id"] = ic.ID
22188	}
22189	return json.Marshal(objectMap)
22190}
22191
22192// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
22193func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
22194	var m map[string]*json.RawMessage
22195	err := json.Unmarshal(body, &m)
22196	if err != nil {
22197		return err
22198	}
22199	for k, v := range m {
22200		switch k {
22201		case "properties":
22202			if v != nil {
22203				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
22204				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
22205				if err != nil {
22206					return err
22207				}
22208				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
22209			}
22210		case "name":
22211			if v != nil {
22212				var name string
22213				err = json.Unmarshal(*v, &name)
22214				if err != nil {
22215					return err
22216				}
22217				ic.Name = &name
22218			}
22219		case "etag":
22220			if v != nil {
22221				var etag string
22222				err = json.Unmarshal(*v, &etag)
22223				if err != nil {
22224					return err
22225				}
22226				ic.Etag = &etag
22227			}
22228		case "id":
22229			if v != nil {
22230				var ID string
22231				err = json.Unmarshal(*v, &ID)
22232				if err != nil {
22233					return err
22234				}
22235				ic.ID = &ID
22236			}
22237		}
22238	}
22239
22240	return nil
22241}
22242
22243// IPConfigurationBgpPeeringAddress properties of IPConfigurationBgpPeeringAddress.
22244type IPConfigurationBgpPeeringAddress struct {
22245	// IpconfigurationID - The ID of IP configuration which belongs to gateway.
22246	IpconfigurationID *string `json:"ipconfigurationId,omitempty"`
22247	// DefaultBgpIPAddresses - READ-ONLY; The list of default BGP peering addresses which belong to IP configuration.
22248	DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"`
22249	// CustomBgpIPAddresses - The list of custom BGP peering addresses which belong to IP configuration.
22250	CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"`
22251	// TunnelIPAddresses - READ-ONLY; The list of tunnel public IP addresses which belong to IP configuration.
22252	TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"`
22253}
22254
22255// MarshalJSON is the custom marshaler for IPConfigurationBgpPeeringAddress.
22256func (icbpa IPConfigurationBgpPeeringAddress) MarshalJSON() ([]byte, error) {
22257	objectMap := make(map[string]interface{})
22258	if icbpa.IpconfigurationID != nil {
22259		objectMap["ipconfigurationId"] = icbpa.IpconfigurationID
22260	}
22261	if icbpa.CustomBgpIPAddresses != nil {
22262		objectMap["customBgpIpAddresses"] = icbpa.CustomBgpIPAddresses
22263	}
22264	return json.Marshal(objectMap)
22265}
22266
22267// IPConfigurationProfile IP configuration profile child resource.
22268type IPConfigurationProfile struct {
22269	// IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile.
22270	*IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"`
22271	// Name - The name of the resource. This name can be used to access the resource.
22272	Name *string `json:"name,omitempty"`
22273	// Type - READ-ONLY; Sub Resource type.
22274	Type *string `json:"type,omitempty"`
22275	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22276	Etag *string `json:"etag,omitempty"`
22277	// ID - Resource ID.
22278	ID *string `json:"id,omitempty"`
22279}
22280
22281// MarshalJSON is the custom marshaler for IPConfigurationProfile.
22282func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) {
22283	objectMap := make(map[string]interface{})
22284	if icp.IPConfigurationProfilePropertiesFormat != nil {
22285		objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat
22286	}
22287	if icp.Name != nil {
22288		objectMap["name"] = icp.Name
22289	}
22290	if icp.ID != nil {
22291		objectMap["id"] = icp.ID
22292	}
22293	return json.Marshal(objectMap)
22294}
22295
22296// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct.
22297func (icp *IPConfigurationProfile) UnmarshalJSON(body []byte) error {
22298	var m map[string]*json.RawMessage
22299	err := json.Unmarshal(body, &m)
22300	if err != nil {
22301		return err
22302	}
22303	for k, v := range m {
22304		switch k {
22305		case "properties":
22306			if v != nil {
22307				var IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat
22308				err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat)
22309				if err != nil {
22310					return err
22311				}
22312				icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat
22313			}
22314		case "name":
22315			if v != nil {
22316				var name string
22317				err = json.Unmarshal(*v, &name)
22318				if err != nil {
22319					return err
22320				}
22321				icp.Name = &name
22322			}
22323		case "type":
22324			if v != nil {
22325				var typeVar string
22326				err = json.Unmarshal(*v, &typeVar)
22327				if err != nil {
22328					return err
22329				}
22330				icp.Type = &typeVar
22331			}
22332		case "etag":
22333			if v != nil {
22334				var etag string
22335				err = json.Unmarshal(*v, &etag)
22336				if err != nil {
22337					return err
22338				}
22339				icp.Etag = &etag
22340			}
22341		case "id":
22342			if v != nil {
22343				var ID string
22344				err = json.Unmarshal(*v, &ID)
22345				if err != nil {
22346					return err
22347				}
22348				icp.ID = &ID
22349			}
22350		}
22351	}
22352
22353	return nil
22354}
22355
22356// IPConfigurationProfilePropertiesFormat IP configuration profile properties.
22357type IPConfigurationProfilePropertiesFormat struct {
22358	// Subnet - The reference to the subnet resource to create a container network interface ip configuration.
22359	Subnet *Subnet `json:"subnet,omitempty"`
22360	// ProvisioningState - READ-ONLY; The provisioning state of the IP configuration profile resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
22361	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22362}
22363
22364// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat.
22365func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
22366	objectMap := make(map[string]interface{})
22367	if icppf.Subnet != nil {
22368		objectMap["subnet"] = icppf.Subnet
22369	}
22370	return json.Marshal(objectMap)
22371}
22372
22373// IPConfigurationPropertiesFormat properties of IP configuration.
22374type IPConfigurationPropertiesFormat struct {
22375	// PrivateIPAddress - The private IP address of the IP configuration.
22376	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
22377	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic'
22378	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
22379	// Subnet - The reference to the subnet resource.
22380	Subnet *Subnet `json:"subnet,omitempty"`
22381	// PublicIPAddress - The reference to the public IP resource.
22382	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
22383	// ProvisioningState - READ-ONLY; The provisioning state of the IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
22384	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22385}
22386
22387// MarshalJSON is the custom marshaler for IPConfigurationPropertiesFormat.
22388func (icpf IPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
22389	objectMap := make(map[string]interface{})
22390	if icpf.PrivateIPAddress != nil {
22391		objectMap["privateIPAddress"] = icpf.PrivateIPAddress
22392	}
22393	if icpf.PrivateIPAllocationMethod != "" {
22394		objectMap["privateIPAllocationMethod"] = icpf.PrivateIPAllocationMethod
22395	}
22396	if icpf.Subnet != nil {
22397		objectMap["subnet"] = icpf.Subnet
22398	}
22399	if icpf.PublicIPAddress != nil {
22400		objectMap["publicIPAddress"] = icpf.PublicIPAddress
22401	}
22402	return json.Marshal(objectMap)
22403}
22404
22405// IPGroup the IpGroups resource information.
22406type IPGroup struct {
22407	autorest.Response `json:"-"`
22408	// IPGroupPropertiesFormat - Properties of the IpGroups.
22409	*IPGroupPropertiesFormat `json:"properties,omitempty"`
22410	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22411	Etag *string `json:"etag,omitempty"`
22412	// ID - Resource ID.
22413	ID *string `json:"id,omitempty"`
22414	// Name - READ-ONLY; Resource name.
22415	Name *string `json:"name,omitempty"`
22416	// Type - READ-ONLY; Resource type.
22417	Type *string `json:"type,omitempty"`
22418	// Location - Resource location.
22419	Location *string `json:"location,omitempty"`
22420	// Tags - Resource tags.
22421	Tags map[string]*string `json:"tags"`
22422}
22423
22424// MarshalJSON is the custom marshaler for IPGroup.
22425func (ig IPGroup) MarshalJSON() ([]byte, error) {
22426	objectMap := make(map[string]interface{})
22427	if ig.IPGroupPropertiesFormat != nil {
22428		objectMap["properties"] = ig.IPGroupPropertiesFormat
22429	}
22430	if ig.ID != nil {
22431		objectMap["id"] = ig.ID
22432	}
22433	if ig.Location != nil {
22434		objectMap["location"] = ig.Location
22435	}
22436	if ig.Tags != nil {
22437		objectMap["tags"] = ig.Tags
22438	}
22439	return json.Marshal(objectMap)
22440}
22441
22442// UnmarshalJSON is the custom unmarshaler for IPGroup struct.
22443func (ig *IPGroup) UnmarshalJSON(body []byte) error {
22444	var m map[string]*json.RawMessage
22445	err := json.Unmarshal(body, &m)
22446	if err != nil {
22447		return err
22448	}
22449	for k, v := range m {
22450		switch k {
22451		case "properties":
22452			if v != nil {
22453				var IPGroupPropertiesFormat IPGroupPropertiesFormat
22454				err = json.Unmarshal(*v, &IPGroupPropertiesFormat)
22455				if err != nil {
22456					return err
22457				}
22458				ig.IPGroupPropertiesFormat = &IPGroupPropertiesFormat
22459			}
22460		case "etag":
22461			if v != nil {
22462				var etag string
22463				err = json.Unmarshal(*v, &etag)
22464				if err != nil {
22465					return err
22466				}
22467				ig.Etag = &etag
22468			}
22469		case "id":
22470			if v != nil {
22471				var ID string
22472				err = json.Unmarshal(*v, &ID)
22473				if err != nil {
22474					return err
22475				}
22476				ig.ID = &ID
22477			}
22478		case "name":
22479			if v != nil {
22480				var name string
22481				err = json.Unmarshal(*v, &name)
22482				if err != nil {
22483					return err
22484				}
22485				ig.Name = &name
22486			}
22487		case "type":
22488			if v != nil {
22489				var typeVar string
22490				err = json.Unmarshal(*v, &typeVar)
22491				if err != nil {
22492					return err
22493				}
22494				ig.Type = &typeVar
22495			}
22496		case "location":
22497			if v != nil {
22498				var location string
22499				err = json.Unmarshal(*v, &location)
22500				if err != nil {
22501					return err
22502				}
22503				ig.Location = &location
22504			}
22505		case "tags":
22506			if v != nil {
22507				var tags map[string]*string
22508				err = json.Unmarshal(*v, &tags)
22509				if err != nil {
22510					return err
22511				}
22512				ig.Tags = tags
22513			}
22514		}
22515	}
22516
22517	return nil
22518}
22519
22520// IPGroupListResult response for the ListIpGroups API service call.
22521type IPGroupListResult struct {
22522	autorest.Response `json:"-"`
22523	// Value - The list of IpGroups information resources.
22524	Value *[]IPGroup `json:"value,omitempty"`
22525	// NextLink - URL to get the next set of results.
22526	NextLink *string `json:"nextLink,omitempty"`
22527}
22528
22529// IPGroupListResultIterator provides access to a complete listing of IPGroup values.
22530type IPGroupListResultIterator struct {
22531	i    int
22532	page IPGroupListResultPage
22533}
22534
22535// NextWithContext advances to the next value.  If there was an error making
22536// the request the iterator does not advance and the error is returned.
22537func (iter *IPGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
22538	if tracing.IsEnabled() {
22539		ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupListResultIterator.NextWithContext")
22540		defer func() {
22541			sc := -1
22542			if iter.Response().Response.Response != nil {
22543				sc = iter.Response().Response.Response.StatusCode
22544			}
22545			tracing.EndSpan(ctx, sc, err)
22546		}()
22547	}
22548	iter.i++
22549	if iter.i < len(iter.page.Values()) {
22550		return nil
22551	}
22552	err = iter.page.NextWithContext(ctx)
22553	if err != nil {
22554		iter.i--
22555		return err
22556	}
22557	iter.i = 0
22558	return nil
22559}
22560
22561// Next advances to the next value.  If there was an error making
22562// the request the iterator does not advance and the error is returned.
22563// Deprecated: Use NextWithContext() instead.
22564func (iter *IPGroupListResultIterator) Next() error {
22565	return iter.NextWithContext(context.Background())
22566}
22567
22568// NotDone returns true if the enumeration should be started or is not yet complete.
22569func (iter IPGroupListResultIterator) NotDone() bool {
22570	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22571}
22572
22573// Response returns the raw server response from the last page request.
22574func (iter IPGroupListResultIterator) Response() IPGroupListResult {
22575	return iter.page.Response()
22576}
22577
22578// Value returns the current value or a zero-initialized value if the
22579// iterator has advanced beyond the end of the collection.
22580func (iter IPGroupListResultIterator) Value() IPGroup {
22581	if !iter.page.NotDone() {
22582		return IPGroup{}
22583	}
22584	return iter.page.Values()[iter.i]
22585}
22586
22587// Creates a new instance of the IPGroupListResultIterator type.
22588func NewIPGroupListResultIterator(page IPGroupListResultPage) IPGroupListResultIterator {
22589	return IPGroupListResultIterator{page: page}
22590}
22591
22592// IsEmpty returns true if the ListResult contains no values.
22593func (iglr IPGroupListResult) IsEmpty() bool {
22594	return iglr.Value == nil || len(*iglr.Value) == 0
22595}
22596
22597// hasNextLink returns true if the NextLink is not empty.
22598func (iglr IPGroupListResult) hasNextLink() bool {
22599	return iglr.NextLink != nil && len(*iglr.NextLink) != 0
22600}
22601
22602// iPGroupListResultPreparer prepares a request to retrieve the next set of results.
22603// It returns nil if no more results exist.
22604func (iglr IPGroupListResult) iPGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
22605	if !iglr.hasNextLink() {
22606		return nil, nil
22607	}
22608	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22609		autorest.AsJSON(),
22610		autorest.AsGet(),
22611		autorest.WithBaseURL(to.String(iglr.NextLink)))
22612}
22613
22614// IPGroupListResultPage contains a page of IPGroup values.
22615type IPGroupListResultPage struct {
22616	fn   func(context.Context, IPGroupListResult) (IPGroupListResult, error)
22617	iglr IPGroupListResult
22618}
22619
22620// NextWithContext advances to the next page of values.  If there was an error making
22621// the request the page does not advance and the error is returned.
22622func (page *IPGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
22623	if tracing.IsEnabled() {
22624		ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupListResultPage.NextWithContext")
22625		defer func() {
22626			sc := -1
22627			if page.Response().Response.Response != nil {
22628				sc = page.Response().Response.Response.StatusCode
22629			}
22630			tracing.EndSpan(ctx, sc, err)
22631		}()
22632	}
22633	for {
22634		next, err := page.fn(ctx, page.iglr)
22635		if err != nil {
22636			return err
22637		}
22638		page.iglr = next
22639		if !next.hasNextLink() || !next.IsEmpty() {
22640			break
22641		}
22642	}
22643	return nil
22644}
22645
22646// Next advances to the next page of values.  If there was an error making
22647// the request the page does not advance and the error is returned.
22648// Deprecated: Use NextWithContext() instead.
22649func (page *IPGroupListResultPage) Next() error {
22650	return page.NextWithContext(context.Background())
22651}
22652
22653// NotDone returns true if the page enumeration should be started or is not yet complete.
22654func (page IPGroupListResultPage) NotDone() bool {
22655	return !page.iglr.IsEmpty()
22656}
22657
22658// Response returns the raw server response from the last page request.
22659func (page IPGroupListResultPage) Response() IPGroupListResult {
22660	return page.iglr
22661}
22662
22663// Values returns the slice of values for the current page or nil if there are no values.
22664func (page IPGroupListResultPage) Values() []IPGroup {
22665	if page.iglr.IsEmpty() {
22666		return nil
22667	}
22668	return *page.iglr.Value
22669}
22670
22671// Creates a new instance of the IPGroupListResultPage type.
22672func NewIPGroupListResultPage(cur IPGroupListResult, getNextPage func(context.Context, IPGroupListResult) (IPGroupListResult, error)) IPGroupListResultPage {
22673	return IPGroupListResultPage{
22674		fn:   getNextPage,
22675		iglr: cur,
22676	}
22677}
22678
22679// IPGroupPropertiesFormat the IpGroups property information.
22680type IPGroupPropertiesFormat struct {
22681	// ProvisioningState - READ-ONLY; The provisioning state of the IpGroups resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
22682	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22683	// IPAddresses - IpAddresses/IpAddressPrefixes in the IpGroups resource.
22684	IPAddresses *[]string `json:"ipAddresses,omitempty"`
22685	// Firewalls - READ-ONLY; List of references to Firewall resources that this IpGroups is associated with.
22686	Firewalls *[]SubResource `json:"firewalls,omitempty"`
22687	// FirewallPolicies - READ-ONLY; List of references to Firewall Policies resources that this IpGroups is associated with.
22688	FirewallPolicies *[]SubResource `json:"firewallPolicies,omitempty"`
22689}
22690
22691// MarshalJSON is the custom marshaler for IPGroupPropertiesFormat.
22692func (igpf IPGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
22693	objectMap := make(map[string]interface{})
22694	if igpf.IPAddresses != nil {
22695		objectMap["ipAddresses"] = igpf.IPAddresses
22696	}
22697	return json.Marshal(objectMap)
22698}
22699
22700// IPGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
22701// operation.
22702type IPGroupsCreateOrUpdateFuture struct {
22703	azure.FutureAPI
22704	// Result returns the result of the asynchronous operation.
22705	// If the operation has not completed it will return an error.
22706	Result func(IPGroupsClient) (IPGroup, error)
22707}
22708
22709// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22710func (future *IPGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22711	var azFuture azure.Future
22712	if err := json.Unmarshal(body, &azFuture); err != nil {
22713		return err
22714	}
22715	future.FutureAPI = &azFuture
22716	future.Result = future.result
22717	return nil
22718}
22719
22720// result is the default implementation for IPGroupsCreateOrUpdateFuture.Result.
22721func (future *IPGroupsCreateOrUpdateFuture) result(client IPGroupsClient) (ig IPGroup, err error) {
22722	var done bool
22723	done, err = future.DoneWithContext(context.Background(), client)
22724	if err != nil {
22725		err = autorest.NewErrorWithError(err, "network.IPGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22726		return
22727	}
22728	if !done {
22729		ig.Response.Response = future.Response()
22730		err = azure.NewAsyncOpIncompleteError("network.IPGroupsCreateOrUpdateFuture")
22731		return
22732	}
22733	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22734	if ig.Response.Response, err = future.GetResult(sender); err == nil && ig.Response.Response.StatusCode != http.StatusNoContent {
22735		ig, err = client.CreateOrUpdateResponder(ig.Response.Response)
22736		if err != nil {
22737			err = autorest.NewErrorWithError(err, "network.IPGroupsCreateOrUpdateFuture", "Result", ig.Response.Response, "Failure responding to request")
22738		}
22739	}
22740	return
22741}
22742
22743// IPGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22744// operation.
22745type IPGroupsDeleteFuture struct {
22746	azure.FutureAPI
22747	// Result returns the result of the asynchronous operation.
22748	// If the operation has not completed it will return an error.
22749	Result func(IPGroupsClient) (autorest.Response, error)
22750}
22751
22752// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22753func (future *IPGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
22754	var azFuture azure.Future
22755	if err := json.Unmarshal(body, &azFuture); err != nil {
22756		return err
22757	}
22758	future.FutureAPI = &azFuture
22759	future.Result = future.result
22760	return nil
22761}
22762
22763// result is the default implementation for IPGroupsDeleteFuture.Result.
22764func (future *IPGroupsDeleteFuture) result(client IPGroupsClient) (ar autorest.Response, err error) {
22765	var done bool
22766	done, err = future.DoneWithContext(context.Background(), client)
22767	if err != nil {
22768		err = autorest.NewErrorWithError(err, "network.IPGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
22769		return
22770	}
22771	if !done {
22772		ar.Response = future.Response()
22773		err = azure.NewAsyncOpIncompleteError("network.IPGroupsDeleteFuture")
22774		return
22775	}
22776	ar.Response = future.Response()
22777	return
22778}
22779
22780// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection.
22781type IpsecPolicy struct {
22782	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
22783	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
22784	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
22785	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
22786	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
22787	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
22788	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
22789	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
22790	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'IkeEncryptionDES', 'IkeEncryptionDES3', 'IkeEncryptionAES128', 'IkeEncryptionAES192', 'IkeEncryptionAES256', 'IkeEncryptionGCMAES256', 'IkeEncryptionGCMAES128'
22791	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
22792	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
22793	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
22794	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'DhGroupNone', 'DhGroupDHGroup1', 'DhGroupDHGroup2', 'DhGroupDHGroup14', 'DhGroupDHGroup2048', 'DhGroupECP256', 'DhGroupECP384', 'DhGroupDHGroup24'
22795	DhGroup DhGroup `json:"dhGroup,omitempty"`
22796	// 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'
22797	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
22798}
22799
22800// IPTag contains the IpTag associated with the object.
22801type IPTag struct {
22802	// IPTagType - The IP tag type. Example: FirstPartyUsage.
22803	IPTagType *string `json:"ipTagType,omitempty"`
22804	// Tag - The value of the IP tag associated with the public IP. Example: SQL.
22805	Tag *string `json:"tag,omitempty"`
22806}
22807
22808// Ipv6CircuitConnectionConfig iPv6 Circuit Connection properties for global reach.
22809type Ipv6CircuitConnectionConfig struct {
22810	// AddressPrefix - /125 IP address space to carve out customer addresses for global reach.
22811	AddressPrefix *string `json:"addressPrefix,omitempty"`
22812	// CircuitConnectionStatus - READ-ONLY; Express Route Circuit connection state. Possible values include: 'CircuitConnectionStatusConnected', 'CircuitConnectionStatusConnecting', 'CircuitConnectionStatusDisconnected'
22813	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
22814}
22815
22816// MarshalJSON is the custom marshaler for Ipv6CircuitConnectionConfig.
22817func (i6ccc Ipv6CircuitConnectionConfig) MarshalJSON() ([]byte, error) {
22818	objectMap := make(map[string]interface{})
22819	if i6ccc.AddressPrefix != nil {
22820		objectMap["addressPrefix"] = i6ccc.AddressPrefix
22821	}
22822	return json.Marshal(objectMap)
22823}
22824
22825// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
22826type Ipv6ExpressRouteCircuitPeeringConfig struct {
22827	// PrimaryPeerAddressPrefix - The primary address prefix.
22828	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
22829	// SecondaryPeerAddressPrefix - The secondary address prefix.
22830	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
22831	// MicrosoftPeeringConfig - The Microsoft peering configuration.
22832	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
22833	// RouteFilter - The reference to the RouteFilter resource.
22834	RouteFilter *SubResource `json:"routeFilter,omitempty"`
22835	// State - The state of peering. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
22836	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
22837}
22838
22839// ListHubRouteTablesResult list of RouteTables and a URL nextLink to get the next set of results.
22840type ListHubRouteTablesResult struct {
22841	autorest.Response `json:"-"`
22842	// Value - List of RouteTables.
22843	Value *[]HubRouteTable `json:"value,omitempty"`
22844	// NextLink - URL to get the next set of operation list results if there are any.
22845	NextLink *string `json:"nextLink,omitempty"`
22846}
22847
22848// ListHubRouteTablesResultIterator provides access to a complete listing of HubRouteTable values.
22849type ListHubRouteTablesResultIterator struct {
22850	i    int
22851	page ListHubRouteTablesResultPage
22852}
22853
22854// NextWithContext advances to the next value.  If there was an error making
22855// the request the iterator does not advance and the error is returned.
22856func (iter *ListHubRouteTablesResultIterator) NextWithContext(ctx context.Context) (err error) {
22857	if tracing.IsEnabled() {
22858		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubRouteTablesResultIterator.NextWithContext")
22859		defer func() {
22860			sc := -1
22861			if iter.Response().Response.Response != nil {
22862				sc = iter.Response().Response.Response.StatusCode
22863			}
22864			tracing.EndSpan(ctx, sc, err)
22865		}()
22866	}
22867	iter.i++
22868	if iter.i < len(iter.page.Values()) {
22869		return nil
22870	}
22871	err = iter.page.NextWithContext(ctx)
22872	if err != nil {
22873		iter.i--
22874		return err
22875	}
22876	iter.i = 0
22877	return nil
22878}
22879
22880// Next advances to the next value.  If there was an error making
22881// the request the iterator does not advance and the error is returned.
22882// Deprecated: Use NextWithContext() instead.
22883func (iter *ListHubRouteTablesResultIterator) Next() error {
22884	return iter.NextWithContext(context.Background())
22885}
22886
22887// NotDone returns true if the enumeration should be started or is not yet complete.
22888func (iter ListHubRouteTablesResultIterator) NotDone() bool {
22889	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22890}
22891
22892// Response returns the raw server response from the last page request.
22893func (iter ListHubRouteTablesResultIterator) Response() ListHubRouteTablesResult {
22894	return iter.page.Response()
22895}
22896
22897// Value returns the current value or a zero-initialized value if the
22898// iterator has advanced beyond the end of the collection.
22899func (iter ListHubRouteTablesResultIterator) Value() HubRouteTable {
22900	if !iter.page.NotDone() {
22901		return HubRouteTable{}
22902	}
22903	return iter.page.Values()[iter.i]
22904}
22905
22906// Creates a new instance of the ListHubRouteTablesResultIterator type.
22907func NewListHubRouteTablesResultIterator(page ListHubRouteTablesResultPage) ListHubRouteTablesResultIterator {
22908	return ListHubRouteTablesResultIterator{page: page}
22909}
22910
22911// IsEmpty returns true if the ListResult contains no values.
22912func (lhrtr ListHubRouteTablesResult) IsEmpty() bool {
22913	return lhrtr.Value == nil || len(*lhrtr.Value) == 0
22914}
22915
22916// hasNextLink returns true if the NextLink is not empty.
22917func (lhrtr ListHubRouteTablesResult) hasNextLink() bool {
22918	return lhrtr.NextLink != nil && len(*lhrtr.NextLink) != 0
22919}
22920
22921// listHubRouteTablesResultPreparer prepares a request to retrieve the next set of results.
22922// It returns nil if no more results exist.
22923func (lhrtr ListHubRouteTablesResult) listHubRouteTablesResultPreparer(ctx context.Context) (*http.Request, error) {
22924	if !lhrtr.hasNextLink() {
22925		return nil, nil
22926	}
22927	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22928		autorest.AsJSON(),
22929		autorest.AsGet(),
22930		autorest.WithBaseURL(to.String(lhrtr.NextLink)))
22931}
22932
22933// ListHubRouteTablesResultPage contains a page of HubRouteTable values.
22934type ListHubRouteTablesResultPage struct {
22935	fn    func(context.Context, ListHubRouteTablesResult) (ListHubRouteTablesResult, error)
22936	lhrtr ListHubRouteTablesResult
22937}
22938
22939// NextWithContext advances to the next page of values.  If there was an error making
22940// the request the page does not advance and the error is returned.
22941func (page *ListHubRouteTablesResultPage) NextWithContext(ctx context.Context) (err error) {
22942	if tracing.IsEnabled() {
22943		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubRouteTablesResultPage.NextWithContext")
22944		defer func() {
22945			sc := -1
22946			if page.Response().Response.Response != nil {
22947				sc = page.Response().Response.Response.StatusCode
22948			}
22949			tracing.EndSpan(ctx, sc, err)
22950		}()
22951	}
22952	for {
22953		next, err := page.fn(ctx, page.lhrtr)
22954		if err != nil {
22955			return err
22956		}
22957		page.lhrtr = next
22958		if !next.hasNextLink() || !next.IsEmpty() {
22959			break
22960		}
22961	}
22962	return nil
22963}
22964
22965// Next advances to the next page of values.  If there was an error making
22966// the request the page does not advance and the error is returned.
22967// Deprecated: Use NextWithContext() instead.
22968func (page *ListHubRouteTablesResultPage) Next() error {
22969	return page.NextWithContext(context.Background())
22970}
22971
22972// NotDone returns true if the page enumeration should be started or is not yet complete.
22973func (page ListHubRouteTablesResultPage) NotDone() bool {
22974	return !page.lhrtr.IsEmpty()
22975}
22976
22977// Response returns the raw server response from the last page request.
22978func (page ListHubRouteTablesResultPage) Response() ListHubRouteTablesResult {
22979	return page.lhrtr
22980}
22981
22982// Values returns the slice of values for the current page or nil if there are no values.
22983func (page ListHubRouteTablesResultPage) Values() []HubRouteTable {
22984	if page.lhrtr.IsEmpty() {
22985		return nil
22986	}
22987	return *page.lhrtr.Value
22988}
22989
22990// Creates a new instance of the ListHubRouteTablesResultPage type.
22991func NewListHubRouteTablesResultPage(cur ListHubRouteTablesResult, getNextPage func(context.Context, ListHubRouteTablesResult) (ListHubRouteTablesResult, error)) ListHubRouteTablesResultPage {
22992	return ListHubRouteTablesResultPage{
22993		fn:    getNextPage,
22994		lhrtr: cur,
22995	}
22996}
22997
22998// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
22999// the next set of results.
23000type ListHubVirtualNetworkConnectionsResult struct {
23001	autorest.Response `json:"-"`
23002	// Value - List of HubVirtualNetworkConnections.
23003	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
23004	// NextLink - URL to get the next set of operation list results if there are any.
23005	NextLink *string `json:"nextLink,omitempty"`
23006}
23007
23008// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
23009// HubVirtualNetworkConnection values.
23010type ListHubVirtualNetworkConnectionsResultIterator struct {
23011	i    int
23012	page ListHubVirtualNetworkConnectionsResultPage
23013}
23014
23015// NextWithContext advances to the next value.  If there was an error making
23016// the request the iterator does not advance and the error is returned.
23017func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
23018	if tracing.IsEnabled() {
23019		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
23020		defer func() {
23021			sc := -1
23022			if iter.Response().Response.Response != nil {
23023				sc = iter.Response().Response.Response.StatusCode
23024			}
23025			tracing.EndSpan(ctx, sc, err)
23026		}()
23027	}
23028	iter.i++
23029	if iter.i < len(iter.page.Values()) {
23030		return nil
23031	}
23032	err = iter.page.NextWithContext(ctx)
23033	if err != nil {
23034		iter.i--
23035		return err
23036	}
23037	iter.i = 0
23038	return nil
23039}
23040
23041// Next advances to the next value.  If there was an error making
23042// the request the iterator does not advance and the error is returned.
23043// Deprecated: Use NextWithContext() instead.
23044func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
23045	return iter.NextWithContext(context.Background())
23046}
23047
23048// NotDone returns true if the enumeration should be started or is not yet complete.
23049func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
23050	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23051}
23052
23053// Response returns the raw server response from the last page request.
23054func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
23055	return iter.page.Response()
23056}
23057
23058// Value returns the current value or a zero-initialized value if the
23059// iterator has advanced beyond the end of the collection.
23060func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
23061	if !iter.page.NotDone() {
23062		return HubVirtualNetworkConnection{}
23063	}
23064	return iter.page.Values()[iter.i]
23065}
23066
23067// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
23068func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
23069	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
23070}
23071
23072// IsEmpty returns true if the ListResult contains no values.
23073func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
23074	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
23075}
23076
23077// hasNextLink returns true if the NextLink is not empty.
23078func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
23079	return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
23080}
23081
23082// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
23083// It returns nil if no more results exist.
23084func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
23085	if !lhvncr.hasNextLink() {
23086		return nil, nil
23087	}
23088	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23089		autorest.AsJSON(),
23090		autorest.AsGet(),
23091		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
23092}
23093
23094// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
23095type ListHubVirtualNetworkConnectionsResultPage struct {
23096	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
23097	lhvncr ListHubVirtualNetworkConnectionsResult
23098}
23099
23100// NextWithContext advances to the next page of values.  If there was an error making
23101// the request the page does not advance and the error is returned.
23102func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
23103	if tracing.IsEnabled() {
23104		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
23105		defer func() {
23106			sc := -1
23107			if page.Response().Response.Response != nil {
23108				sc = page.Response().Response.Response.StatusCode
23109			}
23110			tracing.EndSpan(ctx, sc, err)
23111		}()
23112	}
23113	for {
23114		next, err := page.fn(ctx, page.lhvncr)
23115		if err != nil {
23116			return err
23117		}
23118		page.lhvncr = next
23119		if !next.hasNextLink() || !next.IsEmpty() {
23120			break
23121		}
23122	}
23123	return nil
23124}
23125
23126// Next advances to the next page of values.  If there was an error making
23127// the request the page does not advance and the error is returned.
23128// Deprecated: Use NextWithContext() instead.
23129func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
23130	return page.NextWithContext(context.Background())
23131}
23132
23133// NotDone returns true if the page enumeration should be started or is not yet complete.
23134func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
23135	return !page.lhvncr.IsEmpty()
23136}
23137
23138// Response returns the raw server response from the last page request.
23139func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
23140	return page.lhvncr
23141}
23142
23143// Values returns the slice of values for the current page or nil if there are no values.
23144func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
23145	if page.lhvncr.IsEmpty() {
23146		return nil
23147	}
23148	return *page.lhvncr.Value
23149}
23150
23151// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
23152func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
23153	return ListHubVirtualNetworkConnectionsResultPage{
23154		fn:     getNextPage,
23155		lhvncr: cur,
23156	}
23157}
23158
23159// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of
23160// P2SVpnGateways and a URL nextLink to get the next set of results.
23161type ListP2SVpnGatewaysResult struct {
23162	autorest.Response `json:"-"`
23163	// Value - List of P2SVpnGateways.
23164	Value *[]P2SVpnGateway `json:"value,omitempty"`
23165	// NextLink - URL to get the next set of operation list results if there are any.
23166	NextLink *string `json:"nextLink,omitempty"`
23167}
23168
23169// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values.
23170type ListP2SVpnGatewaysResultIterator struct {
23171	i    int
23172	page ListP2SVpnGatewaysResultPage
23173}
23174
23175// NextWithContext advances to the next value.  If there was an error making
23176// the request the iterator does not advance and the error is returned.
23177func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
23178	if tracing.IsEnabled() {
23179		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.NextWithContext")
23180		defer func() {
23181			sc := -1
23182			if iter.Response().Response.Response != nil {
23183				sc = iter.Response().Response.Response.StatusCode
23184			}
23185			tracing.EndSpan(ctx, sc, err)
23186		}()
23187	}
23188	iter.i++
23189	if iter.i < len(iter.page.Values()) {
23190		return nil
23191	}
23192	err = iter.page.NextWithContext(ctx)
23193	if err != nil {
23194		iter.i--
23195		return err
23196	}
23197	iter.i = 0
23198	return nil
23199}
23200
23201// Next advances to the next value.  If there was an error making
23202// the request the iterator does not advance and the error is returned.
23203// Deprecated: Use NextWithContext() instead.
23204func (iter *ListP2SVpnGatewaysResultIterator) Next() error {
23205	return iter.NextWithContext(context.Background())
23206}
23207
23208// NotDone returns true if the enumeration should be started or is not yet complete.
23209func (iter ListP2SVpnGatewaysResultIterator) NotDone() bool {
23210	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23211}
23212
23213// Response returns the raw server response from the last page request.
23214func (iter ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult {
23215	return iter.page.Response()
23216}
23217
23218// Value returns the current value or a zero-initialized value if the
23219// iterator has advanced beyond the end of the collection.
23220func (iter ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway {
23221	if !iter.page.NotDone() {
23222		return P2SVpnGateway{}
23223	}
23224	return iter.page.Values()[iter.i]
23225}
23226
23227// Creates a new instance of the ListP2SVpnGatewaysResultIterator type.
23228func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator {
23229	return ListP2SVpnGatewaysResultIterator{page: page}
23230}
23231
23232// IsEmpty returns true if the ListResult contains no values.
23233func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
23234	return lpvgr.Value == nil || len(*lpvgr.Value) == 0
23235}
23236
23237// hasNextLink returns true if the NextLink is not empty.
23238func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool {
23239	return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0
23240}
23241
23242// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
23243// It returns nil if no more results exist.
23244func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
23245	if !lpvgr.hasNextLink() {
23246		return nil, nil
23247	}
23248	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23249		autorest.AsJSON(),
23250		autorest.AsGet(),
23251		autorest.WithBaseURL(to.String(lpvgr.NextLink)))
23252}
23253
23254// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values.
23255type ListP2SVpnGatewaysResultPage struct {
23256	fn    func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
23257	lpvgr ListP2SVpnGatewaysResult
23258}
23259
23260// NextWithContext advances to the next page of values.  If there was an error making
23261// the request the page does not advance and the error is returned.
23262func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
23263	if tracing.IsEnabled() {
23264		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext")
23265		defer func() {
23266			sc := -1
23267			if page.Response().Response.Response != nil {
23268				sc = page.Response().Response.Response.StatusCode
23269			}
23270			tracing.EndSpan(ctx, sc, err)
23271		}()
23272	}
23273	for {
23274		next, err := page.fn(ctx, page.lpvgr)
23275		if err != nil {
23276			return err
23277		}
23278		page.lpvgr = next
23279		if !next.hasNextLink() || !next.IsEmpty() {
23280			break
23281		}
23282	}
23283	return nil
23284}
23285
23286// Next advances to the next page of values.  If there was an error making
23287// the request the page does not advance and the error is returned.
23288// Deprecated: Use NextWithContext() instead.
23289func (page *ListP2SVpnGatewaysResultPage) Next() error {
23290	return page.NextWithContext(context.Background())
23291}
23292
23293// NotDone returns true if the page enumeration should be started or is not yet complete.
23294func (page ListP2SVpnGatewaysResultPage) NotDone() bool {
23295	return !page.lpvgr.IsEmpty()
23296}
23297
23298// Response returns the raw server response from the last page request.
23299func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult {
23300	return page.lpvgr
23301}
23302
23303// Values returns the slice of values for the current page or nil if there are no values.
23304func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway {
23305	if page.lpvgr.IsEmpty() {
23306		return nil
23307	}
23308	return *page.lpvgr.Value
23309}
23310
23311// Creates a new instance of the ListP2SVpnGatewaysResultPage type.
23312func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage {
23313	return ListP2SVpnGatewaysResultPage{
23314		fn:    getNextPage,
23315		lpvgr: cur,
23316	}
23317}
23318
23319// ListString ...
23320type ListString struct {
23321	autorest.Response `json:"-"`
23322	Value             *[]string `json:"value,omitempty"`
23323}
23324
23325// ListVirtualHubBgpConnectionResults virtualHubBgpConnections list.
23326type ListVirtualHubBgpConnectionResults struct {
23327	autorest.Response `json:"-"`
23328	// Value - The list of VirtualHubBgpConnections.
23329	Value *[]BgpConnection `json:"value,omitempty"`
23330	// NextLink - URL to get the next set of results.
23331	NextLink *string `json:"nextLink,omitempty"`
23332}
23333
23334// ListVirtualHubBgpConnectionResultsIterator provides access to a complete listing of BgpConnection
23335// values.
23336type ListVirtualHubBgpConnectionResultsIterator struct {
23337	i    int
23338	page ListVirtualHubBgpConnectionResultsPage
23339}
23340
23341// NextWithContext advances to the next value.  If there was an error making
23342// the request the iterator does not advance and the error is returned.
23343func (iter *ListVirtualHubBgpConnectionResultsIterator) NextWithContext(ctx context.Context) (err error) {
23344	if tracing.IsEnabled() {
23345		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubBgpConnectionResultsIterator.NextWithContext")
23346		defer func() {
23347			sc := -1
23348			if iter.Response().Response.Response != nil {
23349				sc = iter.Response().Response.Response.StatusCode
23350			}
23351			tracing.EndSpan(ctx, sc, err)
23352		}()
23353	}
23354	iter.i++
23355	if iter.i < len(iter.page.Values()) {
23356		return nil
23357	}
23358	err = iter.page.NextWithContext(ctx)
23359	if err != nil {
23360		iter.i--
23361		return err
23362	}
23363	iter.i = 0
23364	return nil
23365}
23366
23367// Next advances to the next value.  If there was an error making
23368// the request the iterator does not advance and the error is returned.
23369// Deprecated: Use NextWithContext() instead.
23370func (iter *ListVirtualHubBgpConnectionResultsIterator) Next() error {
23371	return iter.NextWithContext(context.Background())
23372}
23373
23374// NotDone returns true if the enumeration should be started or is not yet complete.
23375func (iter ListVirtualHubBgpConnectionResultsIterator) NotDone() bool {
23376	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23377}
23378
23379// Response returns the raw server response from the last page request.
23380func (iter ListVirtualHubBgpConnectionResultsIterator) Response() ListVirtualHubBgpConnectionResults {
23381	return iter.page.Response()
23382}
23383
23384// Value returns the current value or a zero-initialized value if the
23385// iterator has advanced beyond the end of the collection.
23386func (iter ListVirtualHubBgpConnectionResultsIterator) Value() BgpConnection {
23387	if !iter.page.NotDone() {
23388		return BgpConnection{}
23389	}
23390	return iter.page.Values()[iter.i]
23391}
23392
23393// Creates a new instance of the ListVirtualHubBgpConnectionResultsIterator type.
23394func NewListVirtualHubBgpConnectionResultsIterator(page ListVirtualHubBgpConnectionResultsPage) ListVirtualHubBgpConnectionResultsIterator {
23395	return ListVirtualHubBgpConnectionResultsIterator{page: page}
23396}
23397
23398// IsEmpty returns true if the ListResult contains no values.
23399func (lvhbcr ListVirtualHubBgpConnectionResults) IsEmpty() bool {
23400	return lvhbcr.Value == nil || len(*lvhbcr.Value) == 0
23401}
23402
23403// hasNextLink returns true if the NextLink is not empty.
23404func (lvhbcr ListVirtualHubBgpConnectionResults) hasNextLink() bool {
23405	return lvhbcr.NextLink != nil && len(*lvhbcr.NextLink) != 0
23406}
23407
23408// listVirtualHubBgpConnectionResultsPreparer prepares a request to retrieve the next set of results.
23409// It returns nil if no more results exist.
23410func (lvhbcr ListVirtualHubBgpConnectionResults) listVirtualHubBgpConnectionResultsPreparer(ctx context.Context) (*http.Request, error) {
23411	if !lvhbcr.hasNextLink() {
23412		return nil, nil
23413	}
23414	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23415		autorest.AsJSON(),
23416		autorest.AsGet(),
23417		autorest.WithBaseURL(to.String(lvhbcr.NextLink)))
23418}
23419
23420// ListVirtualHubBgpConnectionResultsPage contains a page of BgpConnection values.
23421type ListVirtualHubBgpConnectionResultsPage struct {
23422	fn     func(context.Context, ListVirtualHubBgpConnectionResults) (ListVirtualHubBgpConnectionResults, error)
23423	lvhbcr ListVirtualHubBgpConnectionResults
23424}
23425
23426// NextWithContext advances to the next page of values.  If there was an error making
23427// the request the page does not advance and the error is returned.
23428func (page *ListVirtualHubBgpConnectionResultsPage) NextWithContext(ctx context.Context) (err error) {
23429	if tracing.IsEnabled() {
23430		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubBgpConnectionResultsPage.NextWithContext")
23431		defer func() {
23432			sc := -1
23433			if page.Response().Response.Response != nil {
23434				sc = page.Response().Response.Response.StatusCode
23435			}
23436			tracing.EndSpan(ctx, sc, err)
23437		}()
23438	}
23439	for {
23440		next, err := page.fn(ctx, page.lvhbcr)
23441		if err != nil {
23442			return err
23443		}
23444		page.lvhbcr = next
23445		if !next.hasNextLink() || !next.IsEmpty() {
23446			break
23447		}
23448	}
23449	return nil
23450}
23451
23452// Next advances to the next page of values.  If there was an error making
23453// the request the page does not advance and the error is returned.
23454// Deprecated: Use NextWithContext() instead.
23455func (page *ListVirtualHubBgpConnectionResultsPage) Next() error {
23456	return page.NextWithContext(context.Background())
23457}
23458
23459// NotDone returns true if the page enumeration should be started or is not yet complete.
23460func (page ListVirtualHubBgpConnectionResultsPage) NotDone() bool {
23461	return !page.lvhbcr.IsEmpty()
23462}
23463
23464// Response returns the raw server response from the last page request.
23465func (page ListVirtualHubBgpConnectionResultsPage) Response() ListVirtualHubBgpConnectionResults {
23466	return page.lvhbcr
23467}
23468
23469// Values returns the slice of values for the current page or nil if there are no values.
23470func (page ListVirtualHubBgpConnectionResultsPage) Values() []BgpConnection {
23471	if page.lvhbcr.IsEmpty() {
23472		return nil
23473	}
23474	return *page.lvhbcr.Value
23475}
23476
23477// Creates a new instance of the ListVirtualHubBgpConnectionResultsPage type.
23478func NewListVirtualHubBgpConnectionResultsPage(cur ListVirtualHubBgpConnectionResults, getNextPage func(context.Context, ListVirtualHubBgpConnectionResults) (ListVirtualHubBgpConnectionResults, error)) ListVirtualHubBgpConnectionResultsPage {
23479	return ListVirtualHubBgpConnectionResultsPage{
23480		fn:     getNextPage,
23481		lvhbcr: cur,
23482	}
23483}
23484
23485// ListVirtualHubIPConfigurationResults virtualHubIpConfigurations list.
23486type ListVirtualHubIPConfigurationResults struct {
23487	autorest.Response `json:"-"`
23488	// Value - The list of VirtualHubIpConfigurations.
23489	Value *[]HubIPConfiguration `json:"value,omitempty"`
23490	// NextLink - URL to get the next set of results.
23491	NextLink *string `json:"nextLink,omitempty"`
23492}
23493
23494// ListVirtualHubIPConfigurationResultsIterator provides access to a complete listing of HubIPConfiguration
23495// values.
23496type ListVirtualHubIPConfigurationResultsIterator struct {
23497	i    int
23498	page ListVirtualHubIPConfigurationResultsPage
23499}
23500
23501// NextWithContext advances to the next value.  If there was an error making
23502// the request the iterator does not advance and the error is returned.
23503func (iter *ListVirtualHubIPConfigurationResultsIterator) NextWithContext(ctx context.Context) (err error) {
23504	if tracing.IsEnabled() {
23505		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubIPConfigurationResultsIterator.NextWithContext")
23506		defer func() {
23507			sc := -1
23508			if iter.Response().Response.Response != nil {
23509				sc = iter.Response().Response.Response.StatusCode
23510			}
23511			tracing.EndSpan(ctx, sc, err)
23512		}()
23513	}
23514	iter.i++
23515	if iter.i < len(iter.page.Values()) {
23516		return nil
23517	}
23518	err = iter.page.NextWithContext(ctx)
23519	if err != nil {
23520		iter.i--
23521		return err
23522	}
23523	iter.i = 0
23524	return nil
23525}
23526
23527// Next advances to the next value.  If there was an error making
23528// the request the iterator does not advance and the error is returned.
23529// Deprecated: Use NextWithContext() instead.
23530func (iter *ListVirtualHubIPConfigurationResultsIterator) Next() error {
23531	return iter.NextWithContext(context.Background())
23532}
23533
23534// NotDone returns true if the enumeration should be started or is not yet complete.
23535func (iter ListVirtualHubIPConfigurationResultsIterator) NotDone() bool {
23536	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23537}
23538
23539// Response returns the raw server response from the last page request.
23540func (iter ListVirtualHubIPConfigurationResultsIterator) Response() ListVirtualHubIPConfigurationResults {
23541	return iter.page.Response()
23542}
23543
23544// Value returns the current value or a zero-initialized value if the
23545// iterator has advanced beyond the end of the collection.
23546func (iter ListVirtualHubIPConfigurationResultsIterator) Value() HubIPConfiguration {
23547	if !iter.page.NotDone() {
23548		return HubIPConfiguration{}
23549	}
23550	return iter.page.Values()[iter.i]
23551}
23552
23553// Creates a new instance of the ListVirtualHubIPConfigurationResultsIterator type.
23554func NewListVirtualHubIPConfigurationResultsIterator(page ListVirtualHubIPConfigurationResultsPage) ListVirtualHubIPConfigurationResultsIterator {
23555	return ListVirtualHubIPConfigurationResultsIterator{page: page}
23556}
23557
23558// IsEmpty returns true if the ListResult contains no values.
23559func (lvhicr ListVirtualHubIPConfigurationResults) IsEmpty() bool {
23560	return lvhicr.Value == nil || len(*lvhicr.Value) == 0
23561}
23562
23563// hasNextLink returns true if the NextLink is not empty.
23564func (lvhicr ListVirtualHubIPConfigurationResults) hasNextLink() bool {
23565	return lvhicr.NextLink != nil && len(*lvhicr.NextLink) != 0
23566}
23567
23568// listVirtualHubIPConfigurationResultsPreparer prepares a request to retrieve the next set of results.
23569// It returns nil if no more results exist.
23570func (lvhicr ListVirtualHubIPConfigurationResults) listVirtualHubIPConfigurationResultsPreparer(ctx context.Context) (*http.Request, error) {
23571	if !lvhicr.hasNextLink() {
23572		return nil, nil
23573	}
23574	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23575		autorest.AsJSON(),
23576		autorest.AsGet(),
23577		autorest.WithBaseURL(to.String(lvhicr.NextLink)))
23578}
23579
23580// ListVirtualHubIPConfigurationResultsPage contains a page of HubIPConfiguration values.
23581type ListVirtualHubIPConfigurationResultsPage struct {
23582	fn     func(context.Context, ListVirtualHubIPConfigurationResults) (ListVirtualHubIPConfigurationResults, error)
23583	lvhicr ListVirtualHubIPConfigurationResults
23584}
23585
23586// NextWithContext advances to the next page of values.  If there was an error making
23587// the request the page does not advance and the error is returned.
23588func (page *ListVirtualHubIPConfigurationResultsPage) NextWithContext(ctx context.Context) (err error) {
23589	if tracing.IsEnabled() {
23590		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubIPConfigurationResultsPage.NextWithContext")
23591		defer func() {
23592			sc := -1
23593			if page.Response().Response.Response != nil {
23594				sc = page.Response().Response.Response.StatusCode
23595			}
23596			tracing.EndSpan(ctx, sc, err)
23597		}()
23598	}
23599	for {
23600		next, err := page.fn(ctx, page.lvhicr)
23601		if err != nil {
23602			return err
23603		}
23604		page.lvhicr = next
23605		if !next.hasNextLink() || !next.IsEmpty() {
23606			break
23607		}
23608	}
23609	return nil
23610}
23611
23612// Next advances to the next page of values.  If there was an error making
23613// the request the page does not advance and the error is returned.
23614// Deprecated: Use NextWithContext() instead.
23615func (page *ListVirtualHubIPConfigurationResultsPage) Next() error {
23616	return page.NextWithContext(context.Background())
23617}
23618
23619// NotDone returns true if the page enumeration should be started or is not yet complete.
23620func (page ListVirtualHubIPConfigurationResultsPage) NotDone() bool {
23621	return !page.lvhicr.IsEmpty()
23622}
23623
23624// Response returns the raw server response from the last page request.
23625func (page ListVirtualHubIPConfigurationResultsPage) Response() ListVirtualHubIPConfigurationResults {
23626	return page.lvhicr
23627}
23628
23629// Values returns the slice of values for the current page or nil if there are no values.
23630func (page ListVirtualHubIPConfigurationResultsPage) Values() []HubIPConfiguration {
23631	if page.lvhicr.IsEmpty() {
23632		return nil
23633	}
23634	return *page.lvhicr.Value
23635}
23636
23637// Creates a new instance of the ListVirtualHubIPConfigurationResultsPage type.
23638func NewListVirtualHubIPConfigurationResultsPage(cur ListVirtualHubIPConfigurationResults, getNextPage func(context.Context, ListVirtualHubIPConfigurationResults) (ListVirtualHubIPConfigurationResults, error)) ListVirtualHubIPConfigurationResultsPage {
23639	return ListVirtualHubIPConfigurationResultsPage{
23640		fn:     getNextPage,
23641		lvhicr: cur,
23642	}
23643}
23644
23645// ListVirtualHubRouteTableV2sResult list of VirtualHubRouteTableV2s and a URL nextLink to get the next set
23646// of results.
23647type ListVirtualHubRouteTableV2sResult struct {
23648	autorest.Response `json:"-"`
23649	// Value - List of VirtualHubRouteTableV2s.
23650	Value *[]VirtualHubRouteTableV2 `json:"value,omitempty"`
23651	// NextLink - URL to get the next set of operation list results if there are any.
23652	NextLink *string `json:"nextLink,omitempty"`
23653}
23654
23655// ListVirtualHubRouteTableV2sResultIterator provides access to a complete listing of
23656// VirtualHubRouteTableV2 values.
23657type ListVirtualHubRouteTableV2sResultIterator struct {
23658	i    int
23659	page ListVirtualHubRouteTableV2sResultPage
23660}
23661
23662// NextWithContext advances to the next value.  If there was an error making
23663// the request the iterator does not advance and the error is returned.
23664func (iter *ListVirtualHubRouteTableV2sResultIterator) NextWithContext(ctx context.Context) (err error) {
23665	if tracing.IsEnabled() {
23666		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubRouteTableV2sResultIterator.NextWithContext")
23667		defer func() {
23668			sc := -1
23669			if iter.Response().Response.Response != nil {
23670				sc = iter.Response().Response.Response.StatusCode
23671			}
23672			tracing.EndSpan(ctx, sc, err)
23673		}()
23674	}
23675	iter.i++
23676	if iter.i < len(iter.page.Values()) {
23677		return nil
23678	}
23679	err = iter.page.NextWithContext(ctx)
23680	if err != nil {
23681		iter.i--
23682		return err
23683	}
23684	iter.i = 0
23685	return nil
23686}
23687
23688// Next advances to the next value.  If there was an error making
23689// the request the iterator does not advance and the error is returned.
23690// Deprecated: Use NextWithContext() instead.
23691func (iter *ListVirtualHubRouteTableV2sResultIterator) Next() error {
23692	return iter.NextWithContext(context.Background())
23693}
23694
23695// NotDone returns true if the enumeration should be started or is not yet complete.
23696func (iter ListVirtualHubRouteTableV2sResultIterator) NotDone() bool {
23697	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23698}
23699
23700// Response returns the raw server response from the last page request.
23701func (iter ListVirtualHubRouteTableV2sResultIterator) Response() ListVirtualHubRouteTableV2sResult {
23702	return iter.page.Response()
23703}
23704
23705// Value returns the current value or a zero-initialized value if the
23706// iterator has advanced beyond the end of the collection.
23707func (iter ListVirtualHubRouteTableV2sResultIterator) Value() VirtualHubRouteTableV2 {
23708	if !iter.page.NotDone() {
23709		return VirtualHubRouteTableV2{}
23710	}
23711	return iter.page.Values()[iter.i]
23712}
23713
23714// Creates a new instance of the ListVirtualHubRouteTableV2sResultIterator type.
23715func NewListVirtualHubRouteTableV2sResultIterator(page ListVirtualHubRouteTableV2sResultPage) ListVirtualHubRouteTableV2sResultIterator {
23716	return ListVirtualHubRouteTableV2sResultIterator{page: page}
23717}
23718
23719// IsEmpty returns true if the ListResult contains no values.
23720func (lvhrtvr ListVirtualHubRouteTableV2sResult) IsEmpty() bool {
23721	return lvhrtvr.Value == nil || len(*lvhrtvr.Value) == 0
23722}
23723
23724// hasNextLink returns true if the NextLink is not empty.
23725func (lvhrtvr ListVirtualHubRouteTableV2sResult) hasNextLink() bool {
23726	return lvhrtvr.NextLink != nil && len(*lvhrtvr.NextLink) != 0
23727}
23728
23729// listVirtualHubRouteTableV2sResultPreparer prepares a request to retrieve the next set of results.
23730// It returns nil if no more results exist.
23731func (lvhrtvr ListVirtualHubRouteTableV2sResult) listVirtualHubRouteTableV2sResultPreparer(ctx context.Context) (*http.Request, error) {
23732	if !lvhrtvr.hasNextLink() {
23733		return nil, nil
23734	}
23735	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23736		autorest.AsJSON(),
23737		autorest.AsGet(),
23738		autorest.WithBaseURL(to.String(lvhrtvr.NextLink)))
23739}
23740
23741// ListVirtualHubRouteTableV2sResultPage contains a page of VirtualHubRouteTableV2 values.
23742type ListVirtualHubRouteTableV2sResultPage struct {
23743	fn      func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error)
23744	lvhrtvr ListVirtualHubRouteTableV2sResult
23745}
23746
23747// NextWithContext advances to the next page of values.  If there was an error making
23748// the request the page does not advance and the error is returned.
23749func (page *ListVirtualHubRouteTableV2sResultPage) NextWithContext(ctx context.Context) (err error) {
23750	if tracing.IsEnabled() {
23751		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubRouteTableV2sResultPage.NextWithContext")
23752		defer func() {
23753			sc := -1
23754			if page.Response().Response.Response != nil {
23755				sc = page.Response().Response.Response.StatusCode
23756			}
23757			tracing.EndSpan(ctx, sc, err)
23758		}()
23759	}
23760	for {
23761		next, err := page.fn(ctx, page.lvhrtvr)
23762		if err != nil {
23763			return err
23764		}
23765		page.lvhrtvr = next
23766		if !next.hasNextLink() || !next.IsEmpty() {
23767			break
23768		}
23769	}
23770	return nil
23771}
23772
23773// Next advances to the next page of values.  If there was an error making
23774// the request the page does not advance and the error is returned.
23775// Deprecated: Use NextWithContext() instead.
23776func (page *ListVirtualHubRouteTableV2sResultPage) Next() error {
23777	return page.NextWithContext(context.Background())
23778}
23779
23780// NotDone returns true if the page enumeration should be started or is not yet complete.
23781func (page ListVirtualHubRouteTableV2sResultPage) NotDone() bool {
23782	return !page.lvhrtvr.IsEmpty()
23783}
23784
23785// Response returns the raw server response from the last page request.
23786func (page ListVirtualHubRouteTableV2sResultPage) Response() ListVirtualHubRouteTableV2sResult {
23787	return page.lvhrtvr
23788}
23789
23790// Values returns the slice of values for the current page or nil if there are no values.
23791func (page ListVirtualHubRouteTableV2sResultPage) Values() []VirtualHubRouteTableV2 {
23792	if page.lvhrtvr.IsEmpty() {
23793		return nil
23794	}
23795	return *page.lvhrtvr.Value
23796}
23797
23798// Creates a new instance of the ListVirtualHubRouteTableV2sResultPage type.
23799func NewListVirtualHubRouteTableV2sResultPage(cur ListVirtualHubRouteTableV2sResult, getNextPage func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error)) ListVirtualHubRouteTableV2sResultPage {
23800	return ListVirtualHubRouteTableV2sResultPage{
23801		fn:      getNextPage,
23802		lvhrtvr: cur,
23803	}
23804}
23805
23806// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
23807// URL nextLink to get the next set of results.
23808type ListVirtualHubsResult struct {
23809	autorest.Response `json:"-"`
23810	// Value - List of VirtualHubs.
23811	Value *[]VirtualHub `json:"value,omitempty"`
23812	// NextLink - URL to get the next set of operation list results if there are any.
23813	NextLink *string `json:"nextLink,omitempty"`
23814}
23815
23816// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
23817type ListVirtualHubsResultIterator struct {
23818	i    int
23819	page ListVirtualHubsResultPage
23820}
23821
23822// NextWithContext advances to the next value.  If there was an error making
23823// the request the iterator does not advance and the error is returned.
23824func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
23825	if tracing.IsEnabled() {
23826		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
23827		defer func() {
23828			sc := -1
23829			if iter.Response().Response.Response != nil {
23830				sc = iter.Response().Response.Response.StatusCode
23831			}
23832			tracing.EndSpan(ctx, sc, err)
23833		}()
23834	}
23835	iter.i++
23836	if iter.i < len(iter.page.Values()) {
23837		return nil
23838	}
23839	err = iter.page.NextWithContext(ctx)
23840	if err != nil {
23841		iter.i--
23842		return err
23843	}
23844	iter.i = 0
23845	return nil
23846}
23847
23848// Next advances to the next value.  If there was an error making
23849// the request the iterator does not advance and the error is returned.
23850// Deprecated: Use NextWithContext() instead.
23851func (iter *ListVirtualHubsResultIterator) Next() error {
23852	return iter.NextWithContext(context.Background())
23853}
23854
23855// NotDone returns true if the enumeration should be started or is not yet complete.
23856func (iter ListVirtualHubsResultIterator) NotDone() bool {
23857	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23858}
23859
23860// Response returns the raw server response from the last page request.
23861func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
23862	return iter.page.Response()
23863}
23864
23865// Value returns the current value or a zero-initialized value if the
23866// iterator has advanced beyond the end of the collection.
23867func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
23868	if !iter.page.NotDone() {
23869		return VirtualHub{}
23870	}
23871	return iter.page.Values()[iter.i]
23872}
23873
23874// Creates a new instance of the ListVirtualHubsResultIterator type.
23875func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
23876	return ListVirtualHubsResultIterator{page: page}
23877}
23878
23879// IsEmpty returns true if the ListResult contains no values.
23880func (lvhr ListVirtualHubsResult) IsEmpty() bool {
23881	return lvhr.Value == nil || len(*lvhr.Value) == 0
23882}
23883
23884// hasNextLink returns true if the NextLink is not empty.
23885func (lvhr ListVirtualHubsResult) hasNextLink() bool {
23886	return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
23887}
23888
23889// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
23890// It returns nil if no more results exist.
23891func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
23892	if !lvhr.hasNextLink() {
23893		return nil, nil
23894	}
23895	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23896		autorest.AsJSON(),
23897		autorest.AsGet(),
23898		autorest.WithBaseURL(to.String(lvhr.NextLink)))
23899}
23900
23901// ListVirtualHubsResultPage contains a page of VirtualHub values.
23902type ListVirtualHubsResultPage struct {
23903	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
23904	lvhr ListVirtualHubsResult
23905}
23906
23907// NextWithContext advances to the next page of values.  If there was an error making
23908// the request the page does not advance and the error is returned.
23909func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
23910	if tracing.IsEnabled() {
23911		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
23912		defer func() {
23913			sc := -1
23914			if page.Response().Response.Response != nil {
23915				sc = page.Response().Response.Response.StatusCode
23916			}
23917			tracing.EndSpan(ctx, sc, err)
23918		}()
23919	}
23920	for {
23921		next, err := page.fn(ctx, page.lvhr)
23922		if err != nil {
23923			return err
23924		}
23925		page.lvhr = next
23926		if !next.hasNextLink() || !next.IsEmpty() {
23927			break
23928		}
23929	}
23930	return nil
23931}
23932
23933// Next advances to the next page of values.  If there was an error making
23934// the request the page does not advance and the error is returned.
23935// Deprecated: Use NextWithContext() instead.
23936func (page *ListVirtualHubsResultPage) Next() error {
23937	return page.NextWithContext(context.Background())
23938}
23939
23940// NotDone returns true if the page enumeration should be started or is not yet complete.
23941func (page ListVirtualHubsResultPage) NotDone() bool {
23942	return !page.lvhr.IsEmpty()
23943}
23944
23945// Response returns the raw server response from the last page request.
23946func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
23947	return page.lvhr
23948}
23949
23950// Values returns the slice of values for the current page or nil if there are no values.
23951func (page ListVirtualHubsResultPage) Values() []VirtualHub {
23952	if page.lvhr.IsEmpty() {
23953		return nil
23954	}
23955	return *page.lvhr.Value
23956}
23957
23958// Creates a new instance of the ListVirtualHubsResultPage type.
23959func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
23960	return ListVirtualHubsResultPage{
23961		fn:   getNextPage,
23962		lvhr: cur,
23963	}
23964}
23965
23966// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
23967// URL nextLink to get the next set of results.
23968type ListVirtualWANsResult struct {
23969	autorest.Response `json:"-"`
23970	// Value - List of VirtualWANs.
23971	Value *[]VirtualWAN `json:"value,omitempty"`
23972	// NextLink - URL to get the next set of operation list results if there are any.
23973	NextLink *string `json:"nextLink,omitempty"`
23974}
23975
23976// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
23977type ListVirtualWANsResultIterator struct {
23978	i    int
23979	page ListVirtualWANsResultPage
23980}
23981
23982// NextWithContext advances to the next value.  If there was an error making
23983// the request the iterator does not advance and the error is returned.
23984func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
23985	if tracing.IsEnabled() {
23986		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
23987		defer func() {
23988			sc := -1
23989			if iter.Response().Response.Response != nil {
23990				sc = iter.Response().Response.Response.StatusCode
23991			}
23992			tracing.EndSpan(ctx, sc, err)
23993		}()
23994	}
23995	iter.i++
23996	if iter.i < len(iter.page.Values()) {
23997		return nil
23998	}
23999	err = iter.page.NextWithContext(ctx)
24000	if err != nil {
24001		iter.i--
24002		return err
24003	}
24004	iter.i = 0
24005	return nil
24006}
24007
24008// Next advances to the next value.  If there was an error making
24009// the request the iterator does not advance and the error is returned.
24010// Deprecated: Use NextWithContext() instead.
24011func (iter *ListVirtualWANsResultIterator) Next() error {
24012	return iter.NextWithContext(context.Background())
24013}
24014
24015// NotDone returns true if the enumeration should be started or is not yet complete.
24016func (iter ListVirtualWANsResultIterator) NotDone() bool {
24017	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24018}
24019
24020// Response returns the raw server response from the last page request.
24021func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
24022	return iter.page.Response()
24023}
24024
24025// Value returns the current value or a zero-initialized value if the
24026// iterator has advanced beyond the end of the collection.
24027func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
24028	if !iter.page.NotDone() {
24029		return VirtualWAN{}
24030	}
24031	return iter.page.Values()[iter.i]
24032}
24033
24034// Creates a new instance of the ListVirtualWANsResultIterator type.
24035func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
24036	return ListVirtualWANsResultIterator{page: page}
24037}
24038
24039// IsEmpty returns true if the ListResult contains no values.
24040func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
24041	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
24042}
24043
24044// hasNextLink returns true if the NextLink is not empty.
24045func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
24046	return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
24047}
24048
24049// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
24050// It returns nil if no more results exist.
24051func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
24052	if !lvwnr.hasNextLink() {
24053		return nil, nil
24054	}
24055	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24056		autorest.AsJSON(),
24057		autorest.AsGet(),
24058		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
24059}
24060
24061// ListVirtualWANsResultPage contains a page of VirtualWAN values.
24062type ListVirtualWANsResultPage struct {
24063	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
24064	lvwnr ListVirtualWANsResult
24065}
24066
24067// NextWithContext advances to the next page of values.  If there was an error making
24068// the request the page does not advance and the error is returned.
24069func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
24070	if tracing.IsEnabled() {
24071		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
24072		defer func() {
24073			sc := -1
24074			if page.Response().Response.Response != nil {
24075				sc = page.Response().Response.Response.StatusCode
24076			}
24077			tracing.EndSpan(ctx, sc, err)
24078		}()
24079	}
24080	for {
24081		next, err := page.fn(ctx, page.lvwnr)
24082		if err != nil {
24083			return err
24084		}
24085		page.lvwnr = next
24086		if !next.hasNextLink() || !next.IsEmpty() {
24087			break
24088		}
24089	}
24090	return nil
24091}
24092
24093// Next advances to the next page of values.  If there was an error making
24094// the request the page does not advance and the error is returned.
24095// Deprecated: Use NextWithContext() instead.
24096func (page *ListVirtualWANsResultPage) Next() error {
24097	return page.NextWithContext(context.Background())
24098}
24099
24100// NotDone returns true if the page enumeration should be started or is not yet complete.
24101func (page ListVirtualWANsResultPage) NotDone() bool {
24102	return !page.lvwnr.IsEmpty()
24103}
24104
24105// Response returns the raw server response from the last page request.
24106func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
24107	return page.lvwnr
24108}
24109
24110// Values returns the slice of values for the current page or nil if there are no values.
24111func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
24112	if page.lvwnr.IsEmpty() {
24113		return nil
24114	}
24115	return *page.lvwnr.Value
24116}
24117
24118// Creates a new instance of the ListVirtualWANsResultPage type.
24119func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
24120	return ListVirtualWANsResultPage{
24121		fn:    getNextPage,
24122		lvwnr: cur,
24123	}
24124}
24125
24126// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
24127// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
24128type ListVpnConnectionsResult struct {
24129	autorest.Response `json:"-"`
24130	// Value - List of Vpn Connections.
24131	Value *[]VpnConnection `json:"value,omitempty"`
24132	// NextLink - URL to get the next set of operation list results if there are any.
24133	NextLink *string `json:"nextLink,omitempty"`
24134}
24135
24136// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
24137type ListVpnConnectionsResultIterator struct {
24138	i    int
24139	page ListVpnConnectionsResultPage
24140}
24141
24142// NextWithContext advances to the next value.  If there was an error making
24143// the request the iterator does not advance and the error is returned.
24144func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
24145	if tracing.IsEnabled() {
24146		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
24147		defer func() {
24148			sc := -1
24149			if iter.Response().Response.Response != nil {
24150				sc = iter.Response().Response.Response.StatusCode
24151			}
24152			tracing.EndSpan(ctx, sc, err)
24153		}()
24154	}
24155	iter.i++
24156	if iter.i < len(iter.page.Values()) {
24157		return nil
24158	}
24159	err = iter.page.NextWithContext(ctx)
24160	if err != nil {
24161		iter.i--
24162		return err
24163	}
24164	iter.i = 0
24165	return nil
24166}
24167
24168// Next advances to the next value.  If there was an error making
24169// the request the iterator does not advance and the error is returned.
24170// Deprecated: Use NextWithContext() instead.
24171func (iter *ListVpnConnectionsResultIterator) Next() error {
24172	return iter.NextWithContext(context.Background())
24173}
24174
24175// NotDone returns true if the enumeration should be started or is not yet complete.
24176func (iter ListVpnConnectionsResultIterator) NotDone() bool {
24177	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24178}
24179
24180// Response returns the raw server response from the last page request.
24181func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
24182	return iter.page.Response()
24183}
24184
24185// Value returns the current value or a zero-initialized value if the
24186// iterator has advanced beyond the end of the collection.
24187func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
24188	if !iter.page.NotDone() {
24189		return VpnConnection{}
24190	}
24191	return iter.page.Values()[iter.i]
24192}
24193
24194// Creates a new instance of the ListVpnConnectionsResultIterator type.
24195func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
24196	return ListVpnConnectionsResultIterator{page: page}
24197}
24198
24199// IsEmpty returns true if the ListResult contains no values.
24200func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
24201	return lvcr.Value == nil || len(*lvcr.Value) == 0
24202}
24203
24204// hasNextLink returns true if the NextLink is not empty.
24205func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
24206	return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
24207}
24208
24209// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
24210// It returns nil if no more results exist.
24211func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
24212	if !lvcr.hasNextLink() {
24213		return nil, nil
24214	}
24215	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24216		autorest.AsJSON(),
24217		autorest.AsGet(),
24218		autorest.WithBaseURL(to.String(lvcr.NextLink)))
24219}
24220
24221// ListVpnConnectionsResultPage contains a page of VpnConnection values.
24222type ListVpnConnectionsResultPage struct {
24223	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
24224	lvcr ListVpnConnectionsResult
24225}
24226
24227// NextWithContext advances to the next page of values.  If there was an error making
24228// the request the page does not advance and the error is returned.
24229func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
24230	if tracing.IsEnabled() {
24231		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
24232		defer func() {
24233			sc := -1
24234			if page.Response().Response.Response != nil {
24235				sc = page.Response().Response.Response.StatusCode
24236			}
24237			tracing.EndSpan(ctx, sc, err)
24238		}()
24239	}
24240	for {
24241		next, err := page.fn(ctx, page.lvcr)
24242		if err != nil {
24243			return err
24244		}
24245		page.lvcr = next
24246		if !next.hasNextLink() || !next.IsEmpty() {
24247			break
24248		}
24249	}
24250	return nil
24251}
24252
24253// Next advances to the next page of values.  If there was an error making
24254// the request the page does not advance and the error is returned.
24255// Deprecated: Use NextWithContext() instead.
24256func (page *ListVpnConnectionsResultPage) Next() error {
24257	return page.NextWithContext(context.Background())
24258}
24259
24260// NotDone returns true if the page enumeration should be started or is not yet complete.
24261func (page ListVpnConnectionsResultPage) NotDone() bool {
24262	return !page.lvcr.IsEmpty()
24263}
24264
24265// Response returns the raw server response from the last page request.
24266func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
24267	return page.lvcr
24268}
24269
24270// Values returns the slice of values for the current page or nil if there are no values.
24271func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
24272	if page.lvcr.IsEmpty() {
24273		return nil
24274	}
24275	return *page.lvcr.Value
24276}
24277
24278// Creates a new instance of the ListVpnConnectionsResultPage type.
24279func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
24280	return ListVpnConnectionsResultPage{
24281		fn:   getNextPage,
24282		lvcr: cur,
24283	}
24284}
24285
24286// ListVpnGatewayNatRulesResult result of the request to list all nat rules to a virtual wan vpn gateway.
24287// It contains a list of Nat rules and a URL nextLink to get the next set of results.
24288type ListVpnGatewayNatRulesResult struct {
24289	autorest.Response `json:"-"`
24290	// Value - List of Nat Rules.
24291	Value *[]VpnGatewayNatRule `json:"value,omitempty"`
24292	// NextLink - URL to get the next set of operation list results if there are any.
24293	NextLink *string `json:"nextLink,omitempty"`
24294}
24295
24296// ListVpnGatewayNatRulesResultIterator provides access to a complete listing of VpnGatewayNatRule values.
24297type ListVpnGatewayNatRulesResultIterator struct {
24298	i    int
24299	page ListVpnGatewayNatRulesResultPage
24300}
24301
24302// NextWithContext advances to the next value.  If there was an error making
24303// the request the iterator does not advance and the error is returned.
24304func (iter *ListVpnGatewayNatRulesResultIterator) NextWithContext(ctx context.Context) (err error) {
24305	if tracing.IsEnabled() {
24306		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewayNatRulesResultIterator.NextWithContext")
24307		defer func() {
24308			sc := -1
24309			if iter.Response().Response.Response != nil {
24310				sc = iter.Response().Response.Response.StatusCode
24311			}
24312			tracing.EndSpan(ctx, sc, err)
24313		}()
24314	}
24315	iter.i++
24316	if iter.i < len(iter.page.Values()) {
24317		return nil
24318	}
24319	err = iter.page.NextWithContext(ctx)
24320	if err != nil {
24321		iter.i--
24322		return err
24323	}
24324	iter.i = 0
24325	return nil
24326}
24327
24328// Next advances to the next value.  If there was an error making
24329// the request the iterator does not advance and the error is returned.
24330// Deprecated: Use NextWithContext() instead.
24331func (iter *ListVpnGatewayNatRulesResultIterator) Next() error {
24332	return iter.NextWithContext(context.Background())
24333}
24334
24335// NotDone returns true if the enumeration should be started or is not yet complete.
24336func (iter ListVpnGatewayNatRulesResultIterator) NotDone() bool {
24337	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24338}
24339
24340// Response returns the raw server response from the last page request.
24341func (iter ListVpnGatewayNatRulesResultIterator) Response() ListVpnGatewayNatRulesResult {
24342	return iter.page.Response()
24343}
24344
24345// Value returns the current value or a zero-initialized value if the
24346// iterator has advanced beyond the end of the collection.
24347func (iter ListVpnGatewayNatRulesResultIterator) Value() VpnGatewayNatRule {
24348	if !iter.page.NotDone() {
24349		return VpnGatewayNatRule{}
24350	}
24351	return iter.page.Values()[iter.i]
24352}
24353
24354// Creates a new instance of the ListVpnGatewayNatRulesResultIterator type.
24355func NewListVpnGatewayNatRulesResultIterator(page ListVpnGatewayNatRulesResultPage) ListVpnGatewayNatRulesResultIterator {
24356	return ListVpnGatewayNatRulesResultIterator{page: page}
24357}
24358
24359// IsEmpty returns true if the ListResult contains no values.
24360func (lvgnrr ListVpnGatewayNatRulesResult) IsEmpty() bool {
24361	return lvgnrr.Value == nil || len(*lvgnrr.Value) == 0
24362}
24363
24364// hasNextLink returns true if the NextLink is not empty.
24365func (lvgnrr ListVpnGatewayNatRulesResult) hasNextLink() bool {
24366	return lvgnrr.NextLink != nil && len(*lvgnrr.NextLink) != 0
24367}
24368
24369// listVpnGatewayNatRulesResultPreparer prepares a request to retrieve the next set of results.
24370// It returns nil if no more results exist.
24371func (lvgnrr ListVpnGatewayNatRulesResult) listVpnGatewayNatRulesResultPreparer(ctx context.Context) (*http.Request, error) {
24372	if !lvgnrr.hasNextLink() {
24373		return nil, nil
24374	}
24375	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24376		autorest.AsJSON(),
24377		autorest.AsGet(),
24378		autorest.WithBaseURL(to.String(lvgnrr.NextLink)))
24379}
24380
24381// ListVpnGatewayNatRulesResultPage contains a page of VpnGatewayNatRule values.
24382type ListVpnGatewayNatRulesResultPage struct {
24383	fn     func(context.Context, ListVpnGatewayNatRulesResult) (ListVpnGatewayNatRulesResult, error)
24384	lvgnrr ListVpnGatewayNatRulesResult
24385}
24386
24387// NextWithContext advances to the next page of values.  If there was an error making
24388// the request the page does not advance and the error is returned.
24389func (page *ListVpnGatewayNatRulesResultPage) NextWithContext(ctx context.Context) (err error) {
24390	if tracing.IsEnabled() {
24391		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewayNatRulesResultPage.NextWithContext")
24392		defer func() {
24393			sc := -1
24394			if page.Response().Response.Response != nil {
24395				sc = page.Response().Response.Response.StatusCode
24396			}
24397			tracing.EndSpan(ctx, sc, err)
24398		}()
24399	}
24400	for {
24401		next, err := page.fn(ctx, page.lvgnrr)
24402		if err != nil {
24403			return err
24404		}
24405		page.lvgnrr = next
24406		if !next.hasNextLink() || !next.IsEmpty() {
24407			break
24408		}
24409	}
24410	return nil
24411}
24412
24413// Next advances to the next page of values.  If there was an error making
24414// the request the page does not advance and the error is returned.
24415// Deprecated: Use NextWithContext() instead.
24416func (page *ListVpnGatewayNatRulesResultPage) Next() error {
24417	return page.NextWithContext(context.Background())
24418}
24419
24420// NotDone returns true if the page enumeration should be started or is not yet complete.
24421func (page ListVpnGatewayNatRulesResultPage) NotDone() bool {
24422	return !page.lvgnrr.IsEmpty()
24423}
24424
24425// Response returns the raw server response from the last page request.
24426func (page ListVpnGatewayNatRulesResultPage) Response() ListVpnGatewayNatRulesResult {
24427	return page.lvgnrr
24428}
24429
24430// Values returns the slice of values for the current page or nil if there are no values.
24431func (page ListVpnGatewayNatRulesResultPage) Values() []VpnGatewayNatRule {
24432	if page.lvgnrr.IsEmpty() {
24433		return nil
24434	}
24435	return *page.lvgnrr.Value
24436}
24437
24438// Creates a new instance of the ListVpnGatewayNatRulesResultPage type.
24439func NewListVpnGatewayNatRulesResultPage(cur ListVpnGatewayNatRulesResult, getNextPage func(context.Context, ListVpnGatewayNatRulesResult) (ListVpnGatewayNatRulesResult, error)) ListVpnGatewayNatRulesResultPage {
24440	return ListVpnGatewayNatRulesResultPage{
24441		fn:     getNextPage,
24442		lvgnrr: cur,
24443	}
24444}
24445
24446// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
24447// URL nextLink to get the next set of results.
24448type ListVpnGatewaysResult struct {
24449	autorest.Response `json:"-"`
24450	// Value - List of VpnGateways.
24451	Value *[]VpnGateway `json:"value,omitempty"`
24452	// NextLink - URL to get the next set of operation list results if there are any.
24453	NextLink *string `json:"nextLink,omitempty"`
24454}
24455
24456// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
24457type ListVpnGatewaysResultIterator struct {
24458	i    int
24459	page ListVpnGatewaysResultPage
24460}
24461
24462// NextWithContext advances to the next value.  If there was an error making
24463// the request the iterator does not advance and the error is returned.
24464func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
24465	if tracing.IsEnabled() {
24466		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
24467		defer func() {
24468			sc := -1
24469			if iter.Response().Response.Response != nil {
24470				sc = iter.Response().Response.Response.StatusCode
24471			}
24472			tracing.EndSpan(ctx, sc, err)
24473		}()
24474	}
24475	iter.i++
24476	if iter.i < len(iter.page.Values()) {
24477		return nil
24478	}
24479	err = iter.page.NextWithContext(ctx)
24480	if err != nil {
24481		iter.i--
24482		return err
24483	}
24484	iter.i = 0
24485	return nil
24486}
24487
24488// Next advances to the next value.  If there was an error making
24489// the request the iterator does not advance and the error is returned.
24490// Deprecated: Use NextWithContext() instead.
24491func (iter *ListVpnGatewaysResultIterator) Next() error {
24492	return iter.NextWithContext(context.Background())
24493}
24494
24495// NotDone returns true if the enumeration should be started or is not yet complete.
24496func (iter ListVpnGatewaysResultIterator) NotDone() bool {
24497	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24498}
24499
24500// Response returns the raw server response from the last page request.
24501func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
24502	return iter.page.Response()
24503}
24504
24505// Value returns the current value or a zero-initialized value if the
24506// iterator has advanced beyond the end of the collection.
24507func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
24508	if !iter.page.NotDone() {
24509		return VpnGateway{}
24510	}
24511	return iter.page.Values()[iter.i]
24512}
24513
24514// Creates a new instance of the ListVpnGatewaysResultIterator type.
24515func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
24516	return ListVpnGatewaysResultIterator{page: page}
24517}
24518
24519// IsEmpty returns true if the ListResult contains no values.
24520func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
24521	return lvgr.Value == nil || len(*lvgr.Value) == 0
24522}
24523
24524// hasNextLink returns true if the NextLink is not empty.
24525func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
24526	return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
24527}
24528
24529// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
24530// It returns nil if no more results exist.
24531func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
24532	if !lvgr.hasNextLink() {
24533		return nil, nil
24534	}
24535	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24536		autorest.AsJSON(),
24537		autorest.AsGet(),
24538		autorest.WithBaseURL(to.String(lvgr.NextLink)))
24539}
24540
24541// ListVpnGatewaysResultPage contains a page of VpnGateway values.
24542type ListVpnGatewaysResultPage struct {
24543	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
24544	lvgr ListVpnGatewaysResult
24545}
24546
24547// NextWithContext advances to the next page of values.  If there was an error making
24548// the request the page does not advance and the error is returned.
24549func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
24550	if tracing.IsEnabled() {
24551		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
24552		defer func() {
24553			sc := -1
24554			if page.Response().Response.Response != nil {
24555				sc = page.Response().Response.Response.StatusCode
24556			}
24557			tracing.EndSpan(ctx, sc, err)
24558		}()
24559	}
24560	for {
24561		next, err := page.fn(ctx, page.lvgr)
24562		if err != nil {
24563			return err
24564		}
24565		page.lvgr = next
24566		if !next.hasNextLink() || !next.IsEmpty() {
24567			break
24568		}
24569	}
24570	return nil
24571}
24572
24573// Next advances to the next page of values.  If there was an error making
24574// the request the page does not advance and the error is returned.
24575// Deprecated: Use NextWithContext() instead.
24576func (page *ListVpnGatewaysResultPage) Next() error {
24577	return page.NextWithContext(context.Background())
24578}
24579
24580// NotDone returns true if the page enumeration should be started or is not yet complete.
24581func (page ListVpnGatewaysResultPage) NotDone() bool {
24582	return !page.lvgr.IsEmpty()
24583}
24584
24585// Response returns the raw server response from the last page request.
24586func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
24587	return page.lvgr
24588}
24589
24590// Values returns the slice of values for the current page or nil if there are no values.
24591func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
24592	if page.lvgr.IsEmpty() {
24593		return nil
24594	}
24595	return *page.lvgr.Value
24596}
24597
24598// Creates a new instance of the ListVpnGatewaysResultPage type.
24599func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
24600	return ListVpnGatewaysResultPage{
24601		fn:   getNextPage,
24602		lvgr: cur,
24603	}
24604}
24605
24606// ListVpnServerConfigurationsResult result of the request to list all VpnServerConfigurations. It contains
24607// a list of VpnServerConfigurations and a URL nextLink to get the next set of results.
24608type ListVpnServerConfigurationsResult struct {
24609	autorest.Response `json:"-"`
24610	// Value - List of VpnServerConfigurations.
24611	Value *[]VpnServerConfiguration `json:"value,omitempty"`
24612	// NextLink - URL to get the next set of operation list results if there are any.
24613	NextLink *string `json:"nextLink,omitempty"`
24614}
24615
24616// ListVpnServerConfigurationsResultIterator provides access to a complete listing of
24617// VpnServerConfiguration values.
24618type ListVpnServerConfigurationsResultIterator struct {
24619	i    int
24620	page ListVpnServerConfigurationsResultPage
24621}
24622
24623// NextWithContext advances to the next value.  If there was an error making
24624// the request the iterator does not advance and the error is returned.
24625func (iter *ListVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) {
24626	if tracing.IsEnabled() {
24627		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnServerConfigurationsResultIterator.NextWithContext")
24628		defer func() {
24629			sc := -1
24630			if iter.Response().Response.Response != nil {
24631				sc = iter.Response().Response.Response.StatusCode
24632			}
24633			tracing.EndSpan(ctx, sc, err)
24634		}()
24635	}
24636	iter.i++
24637	if iter.i < len(iter.page.Values()) {
24638		return nil
24639	}
24640	err = iter.page.NextWithContext(ctx)
24641	if err != nil {
24642		iter.i--
24643		return err
24644	}
24645	iter.i = 0
24646	return nil
24647}
24648
24649// Next advances to the next value.  If there was an error making
24650// the request the iterator does not advance and the error is returned.
24651// Deprecated: Use NextWithContext() instead.
24652func (iter *ListVpnServerConfigurationsResultIterator) Next() error {
24653	return iter.NextWithContext(context.Background())
24654}
24655
24656// NotDone returns true if the enumeration should be started or is not yet complete.
24657func (iter ListVpnServerConfigurationsResultIterator) NotDone() bool {
24658	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24659}
24660
24661// Response returns the raw server response from the last page request.
24662func (iter ListVpnServerConfigurationsResultIterator) Response() ListVpnServerConfigurationsResult {
24663	return iter.page.Response()
24664}
24665
24666// Value returns the current value or a zero-initialized value if the
24667// iterator has advanced beyond the end of the collection.
24668func (iter ListVpnServerConfigurationsResultIterator) Value() VpnServerConfiguration {
24669	if !iter.page.NotDone() {
24670		return VpnServerConfiguration{}
24671	}
24672	return iter.page.Values()[iter.i]
24673}
24674
24675// Creates a new instance of the ListVpnServerConfigurationsResultIterator type.
24676func NewListVpnServerConfigurationsResultIterator(page ListVpnServerConfigurationsResultPage) ListVpnServerConfigurationsResultIterator {
24677	return ListVpnServerConfigurationsResultIterator{page: page}
24678}
24679
24680// IsEmpty returns true if the ListResult contains no values.
24681func (lvscr ListVpnServerConfigurationsResult) IsEmpty() bool {
24682	return lvscr.Value == nil || len(*lvscr.Value) == 0
24683}
24684
24685// hasNextLink returns true if the NextLink is not empty.
24686func (lvscr ListVpnServerConfigurationsResult) hasNextLink() bool {
24687	return lvscr.NextLink != nil && len(*lvscr.NextLink) != 0
24688}
24689
24690// listVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results.
24691// It returns nil if no more results exist.
24692func (lvscr ListVpnServerConfigurationsResult) listVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) {
24693	if !lvscr.hasNextLink() {
24694		return nil, nil
24695	}
24696	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24697		autorest.AsJSON(),
24698		autorest.AsGet(),
24699		autorest.WithBaseURL(to.String(lvscr.NextLink)))
24700}
24701
24702// ListVpnServerConfigurationsResultPage contains a page of VpnServerConfiguration values.
24703type ListVpnServerConfigurationsResultPage struct {
24704	fn    func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error)
24705	lvscr ListVpnServerConfigurationsResult
24706}
24707
24708// NextWithContext advances to the next page of values.  If there was an error making
24709// the request the page does not advance and the error is returned.
24710func (page *ListVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) {
24711	if tracing.IsEnabled() {
24712		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnServerConfigurationsResultPage.NextWithContext")
24713		defer func() {
24714			sc := -1
24715			if page.Response().Response.Response != nil {
24716				sc = page.Response().Response.Response.StatusCode
24717			}
24718			tracing.EndSpan(ctx, sc, err)
24719		}()
24720	}
24721	for {
24722		next, err := page.fn(ctx, page.lvscr)
24723		if err != nil {
24724			return err
24725		}
24726		page.lvscr = next
24727		if !next.hasNextLink() || !next.IsEmpty() {
24728			break
24729		}
24730	}
24731	return nil
24732}
24733
24734// Next advances to the next page of values.  If there was an error making
24735// the request the page does not advance and the error is returned.
24736// Deprecated: Use NextWithContext() instead.
24737func (page *ListVpnServerConfigurationsResultPage) Next() error {
24738	return page.NextWithContext(context.Background())
24739}
24740
24741// NotDone returns true if the page enumeration should be started or is not yet complete.
24742func (page ListVpnServerConfigurationsResultPage) NotDone() bool {
24743	return !page.lvscr.IsEmpty()
24744}
24745
24746// Response returns the raw server response from the last page request.
24747func (page ListVpnServerConfigurationsResultPage) Response() ListVpnServerConfigurationsResult {
24748	return page.lvscr
24749}
24750
24751// Values returns the slice of values for the current page or nil if there are no values.
24752func (page ListVpnServerConfigurationsResultPage) Values() []VpnServerConfiguration {
24753	if page.lvscr.IsEmpty() {
24754		return nil
24755	}
24756	return *page.lvscr.Value
24757}
24758
24759// Creates a new instance of the ListVpnServerConfigurationsResultPage type.
24760func NewListVpnServerConfigurationsResultPage(cur ListVpnServerConfigurationsResult, getNextPage func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error)) ListVpnServerConfigurationsResultPage {
24761	return ListVpnServerConfigurationsResultPage{
24762		fn:    getNextPage,
24763		lvscr: cur,
24764	}
24765}
24766
24767// ListVpnSiteLinkConnectionsResult result of the request to list all vpn connections to a virtual wan vpn
24768// gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
24769type ListVpnSiteLinkConnectionsResult struct {
24770	autorest.Response `json:"-"`
24771	// Value - List of VpnSiteLinkConnections.
24772	Value *[]VpnSiteLinkConnection `json:"value,omitempty"`
24773	// NextLink - URL to get the next set of operation list results if there are any.
24774	NextLink *string `json:"nextLink,omitempty"`
24775}
24776
24777// ListVpnSiteLinkConnectionsResultIterator provides access to a complete listing of VpnSiteLinkConnection
24778// values.
24779type ListVpnSiteLinkConnectionsResultIterator struct {
24780	i    int
24781	page ListVpnSiteLinkConnectionsResultPage
24782}
24783
24784// NextWithContext advances to the next value.  If there was an error making
24785// the request the iterator does not advance and the error is returned.
24786func (iter *ListVpnSiteLinkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
24787	if tracing.IsEnabled() {
24788		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultIterator.NextWithContext")
24789		defer func() {
24790			sc := -1
24791			if iter.Response().Response.Response != nil {
24792				sc = iter.Response().Response.Response.StatusCode
24793			}
24794			tracing.EndSpan(ctx, sc, err)
24795		}()
24796	}
24797	iter.i++
24798	if iter.i < len(iter.page.Values()) {
24799		return nil
24800	}
24801	err = iter.page.NextWithContext(ctx)
24802	if err != nil {
24803		iter.i--
24804		return err
24805	}
24806	iter.i = 0
24807	return nil
24808}
24809
24810// Next advances to the next value.  If there was an error making
24811// the request the iterator does not advance and the error is returned.
24812// Deprecated: Use NextWithContext() instead.
24813func (iter *ListVpnSiteLinkConnectionsResultIterator) Next() error {
24814	return iter.NextWithContext(context.Background())
24815}
24816
24817// NotDone returns true if the enumeration should be started or is not yet complete.
24818func (iter ListVpnSiteLinkConnectionsResultIterator) NotDone() bool {
24819	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24820}
24821
24822// Response returns the raw server response from the last page request.
24823func (iter ListVpnSiteLinkConnectionsResultIterator) Response() ListVpnSiteLinkConnectionsResult {
24824	return iter.page.Response()
24825}
24826
24827// Value returns the current value or a zero-initialized value if the
24828// iterator has advanced beyond the end of the collection.
24829func (iter ListVpnSiteLinkConnectionsResultIterator) Value() VpnSiteLinkConnection {
24830	if !iter.page.NotDone() {
24831		return VpnSiteLinkConnection{}
24832	}
24833	return iter.page.Values()[iter.i]
24834}
24835
24836// Creates a new instance of the ListVpnSiteLinkConnectionsResultIterator type.
24837func NewListVpnSiteLinkConnectionsResultIterator(page ListVpnSiteLinkConnectionsResultPage) ListVpnSiteLinkConnectionsResultIterator {
24838	return ListVpnSiteLinkConnectionsResultIterator{page: page}
24839}
24840
24841// IsEmpty returns true if the ListResult contains no values.
24842func (lvslcr ListVpnSiteLinkConnectionsResult) IsEmpty() bool {
24843	return lvslcr.Value == nil || len(*lvslcr.Value) == 0
24844}
24845
24846// hasNextLink returns true if the NextLink is not empty.
24847func (lvslcr ListVpnSiteLinkConnectionsResult) hasNextLink() bool {
24848	return lvslcr.NextLink != nil && len(*lvslcr.NextLink) != 0
24849}
24850
24851// listVpnSiteLinkConnectionsResultPreparer prepares a request to retrieve the next set of results.
24852// It returns nil if no more results exist.
24853func (lvslcr ListVpnSiteLinkConnectionsResult) listVpnSiteLinkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
24854	if !lvslcr.hasNextLink() {
24855		return nil, nil
24856	}
24857	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24858		autorest.AsJSON(),
24859		autorest.AsGet(),
24860		autorest.WithBaseURL(to.String(lvslcr.NextLink)))
24861}
24862
24863// ListVpnSiteLinkConnectionsResultPage contains a page of VpnSiteLinkConnection values.
24864type ListVpnSiteLinkConnectionsResultPage struct {
24865	fn     func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)
24866	lvslcr ListVpnSiteLinkConnectionsResult
24867}
24868
24869// NextWithContext advances to the next page of values.  If there was an error making
24870// the request the page does not advance and the error is returned.
24871func (page *ListVpnSiteLinkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
24872	if tracing.IsEnabled() {
24873		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultPage.NextWithContext")
24874		defer func() {
24875			sc := -1
24876			if page.Response().Response.Response != nil {
24877				sc = page.Response().Response.Response.StatusCode
24878			}
24879			tracing.EndSpan(ctx, sc, err)
24880		}()
24881	}
24882	for {
24883		next, err := page.fn(ctx, page.lvslcr)
24884		if err != nil {
24885			return err
24886		}
24887		page.lvslcr = next
24888		if !next.hasNextLink() || !next.IsEmpty() {
24889			break
24890		}
24891	}
24892	return nil
24893}
24894
24895// Next advances to the next page of values.  If there was an error making
24896// the request the page does not advance and the error is returned.
24897// Deprecated: Use NextWithContext() instead.
24898func (page *ListVpnSiteLinkConnectionsResultPage) Next() error {
24899	return page.NextWithContext(context.Background())
24900}
24901
24902// NotDone returns true if the page enumeration should be started or is not yet complete.
24903func (page ListVpnSiteLinkConnectionsResultPage) NotDone() bool {
24904	return !page.lvslcr.IsEmpty()
24905}
24906
24907// Response returns the raw server response from the last page request.
24908func (page ListVpnSiteLinkConnectionsResultPage) Response() ListVpnSiteLinkConnectionsResult {
24909	return page.lvslcr
24910}
24911
24912// Values returns the slice of values for the current page or nil if there are no values.
24913func (page ListVpnSiteLinkConnectionsResultPage) Values() []VpnSiteLinkConnection {
24914	if page.lvslcr.IsEmpty() {
24915		return nil
24916	}
24917	return *page.lvslcr.Value
24918}
24919
24920// Creates a new instance of the ListVpnSiteLinkConnectionsResultPage type.
24921func NewListVpnSiteLinkConnectionsResultPage(cur ListVpnSiteLinkConnectionsResult, getNextPage func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)) ListVpnSiteLinkConnectionsResultPage {
24922	return ListVpnSiteLinkConnectionsResultPage{
24923		fn:     getNextPage,
24924		lvslcr: cur,
24925	}
24926}
24927
24928// ListVpnSiteLinksResult result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks
24929// and a URL nextLink to get the next set of results.
24930type ListVpnSiteLinksResult struct {
24931	autorest.Response `json:"-"`
24932	// Value - List of VpnSitesLinks.
24933	Value *[]VpnSiteLink `json:"value,omitempty"`
24934	// NextLink - URL to get the next set of operation list results if there are any.
24935	NextLink *string `json:"nextLink,omitempty"`
24936}
24937
24938// ListVpnSiteLinksResultIterator provides access to a complete listing of VpnSiteLink values.
24939type ListVpnSiteLinksResultIterator struct {
24940	i    int
24941	page ListVpnSiteLinksResultPage
24942}
24943
24944// NextWithContext advances to the next value.  If there was an error making
24945// the request the iterator does not advance and the error is returned.
24946func (iter *ListVpnSiteLinksResultIterator) NextWithContext(ctx context.Context) (err error) {
24947	if tracing.IsEnabled() {
24948		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultIterator.NextWithContext")
24949		defer func() {
24950			sc := -1
24951			if iter.Response().Response.Response != nil {
24952				sc = iter.Response().Response.Response.StatusCode
24953			}
24954			tracing.EndSpan(ctx, sc, err)
24955		}()
24956	}
24957	iter.i++
24958	if iter.i < len(iter.page.Values()) {
24959		return nil
24960	}
24961	err = iter.page.NextWithContext(ctx)
24962	if err != nil {
24963		iter.i--
24964		return err
24965	}
24966	iter.i = 0
24967	return nil
24968}
24969
24970// Next advances to the next value.  If there was an error making
24971// the request the iterator does not advance and the error is returned.
24972// Deprecated: Use NextWithContext() instead.
24973func (iter *ListVpnSiteLinksResultIterator) Next() error {
24974	return iter.NextWithContext(context.Background())
24975}
24976
24977// NotDone returns true if the enumeration should be started or is not yet complete.
24978func (iter ListVpnSiteLinksResultIterator) NotDone() bool {
24979	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24980}
24981
24982// Response returns the raw server response from the last page request.
24983func (iter ListVpnSiteLinksResultIterator) Response() ListVpnSiteLinksResult {
24984	return iter.page.Response()
24985}
24986
24987// Value returns the current value or a zero-initialized value if the
24988// iterator has advanced beyond the end of the collection.
24989func (iter ListVpnSiteLinksResultIterator) Value() VpnSiteLink {
24990	if !iter.page.NotDone() {
24991		return VpnSiteLink{}
24992	}
24993	return iter.page.Values()[iter.i]
24994}
24995
24996// Creates a new instance of the ListVpnSiteLinksResultIterator type.
24997func NewListVpnSiteLinksResultIterator(page ListVpnSiteLinksResultPage) ListVpnSiteLinksResultIterator {
24998	return ListVpnSiteLinksResultIterator{page: page}
24999}
25000
25001// IsEmpty returns true if the ListResult contains no values.
25002func (lvslr ListVpnSiteLinksResult) IsEmpty() bool {
25003	return lvslr.Value == nil || len(*lvslr.Value) == 0
25004}
25005
25006// hasNextLink returns true if the NextLink is not empty.
25007func (lvslr ListVpnSiteLinksResult) hasNextLink() bool {
25008	return lvslr.NextLink != nil && len(*lvslr.NextLink) != 0
25009}
25010
25011// listVpnSiteLinksResultPreparer prepares a request to retrieve the next set of results.
25012// It returns nil if no more results exist.
25013func (lvslr ListVpnSiteLinksResult) listVpnSiteLinksResultPreparer(ctx context.Context) (*http.Request, error) {
25014	if !lvslr.hasNextLink() {
25015		return nil, nil
25016	}
25017	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25018		autorest.AsJSON(),
25019		autorest.AsGet(),
25020		autorest.WithBaseURL(to.String(lvslr.NextLink)))
25021}
25022
25023// ListVpnSiteLinksResultPage contains a page of VpnSiteLink values.
25024type ListVpnSiteLinksResultPage struct {
25025	fn    func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)
25026	lvslr ListVpnSiteLinksResult
25027}
25028
25029// NextWithContext advances to the next page of values.  If there was an error making
25030// the request the page does not advance and the error is returned.
25031func (page *ListVpnSiteLinksResultPage) NextWithContext(ctx context.Context) (err error) {
25032	if tracing.IsEnabled() {
25033		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultPage.NextWithContext")
25034		defer func() {
25035			sc := -1
25036			if page.Response().Response.Response != nil {
25037				sc = page.Response().Response.Response.StatusCode
25038			}
25039			tracing.EndSpan(ctx, sc, err)
25040		}()
25041	}
25042	for {
25043		next, err := page.fn(ctx, page.lvslr)
25044		if err != nil {
25045			return err
25046		}
25047		page.lvslr = next
25048		if !next.hasNextLink() || !next.IsEmpty() {
25049			break
25050		}
25051	}
25052	return nil
25053}
25054
25055// Next advances to the next page of values.  If there was an error making
25056// the request the page does not advance and the error is returned.
25057// Deprecated: Use NextWithContext() instead.
25058func (page *ListVpnSiteLinksResultPage) Next() error {
25059	return page.NextWithContext(context.Background())
25060}
25061
25062// NotDone returns true if the page enumeration should be started or is not yet complete.
25063func (page ListVpnSiteLinksResultPage) NotDone() bool {
25064	return !page.lvslr.IsEmpty()
25065}
25066
25067// Response returns the raw server response from the last page request.
25068func (page ListVpnSiteLinksResultPage) Response() ListVpnSiteLinksResult {
25069	return page.lvslr
25070}
25071
25072// Values returns the slice of values for the current page or nil if there are no values.
25073func (page ListVpnSiteLinksResultPage) Values() []VpnSiteLink {
25074	if page.lvslr.IsEmpty() {
25075		return nil
25076	}
25077	return *page.lvslr.Value
25078}
25079
25080// Creates a new instance of the ListVpnSiteLinksResultPage type.
25081func NewListVpnSiteLinksResultPage(cur ListVpnSiteLinksResult, getNextPage func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)) ListVpnSiteLinksResultPage {
25082	return ListVpnSiteLinksResultPage{
25083		fn:    getNextPage,
25084		lvslr: cur,
25085	}
25086}
25087
25088// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
25089// nextLink to get the next set of results.
25090type ListVpnSitesResult struct {
25091	autorest.Response `json:"-"`
25092	// Value - List of VpnSites.
25093	Value *[]VpnSite `json:"value,omitempty"`
25094	// NextLink - URL to get the next set of operation list results if there are any.
25095	NextLink *string `json:"nextLink,omitempty"`
25096}
25097
25098// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
25099type ListVpnSitesResultIterator struct {
25100	i    int
25101	page ListVpnSitesResultPage
25102}
25103
25104// NextWithContext advances to the next value.  If there was an error making
25105// the request the iterator does not advance and the error is returned.
25106func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
25107	if tracing.IsEnabled() {
25108		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
25109		defer func() {
25110			sc := -1
25111			if iter.Response().Response.Response != nil {
25112				sc = iter.Response().Response.Response.StatusCode
25113			}
25114			tracing.EndSpan(ctx, sc, err)
25115		}()
25116	}
25117	iter.i++
25118	if iter.i < len(iter.page.Values()) {
25119		return nil
25120	}
25121	err = iter.page.NextWithContext(ctx)
25122	if err != nil {
25123		iter.i--
25124		return err
25125	}
25126	iter.i = 0
25127	return nil
25128}
25129
25130// Next advances to the next value.  If there was an error making
25131// the request the iterator does not advance and the error is returned.
25132// Deprecated: Use NextWithContext() instead.
25133func (iter *ListVpnSitesResultIterator) Next() error {
25134	return iter.NextWithContext(context.Background())
25135}
25136
25137// NotDone returns true if the enumeration should be started or is not yet complete.
25138func (iter ListVpnSitesResultIterator) NotDone() bool {
25139	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25140}
25141
25142// Response returns the raw server response from the last page request.
25143func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
25144	return iter.page.Response()
25145}
25146
25147// Value returns the current value or a zero-initialized value if the
25148// iterator has advanced beyond the end of the collection.
25149func (iter ListVpnSitesResultIterator) Value() VpnSite {
25150	if !iter.page.NotDone() {
25151		return VpnSite{}
25152	}
25153	return iter.page.Values()[iter.i]
25154}
25155
25156// Creates a new instance of the ListVpnSitesResultIterator type.
25157func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
25158	return ListVpnSitesResultIterator{page: page}
25159}
25160
25161// IsEmpty returns true if the ListResult contains no values.
25162func (lvsr ListVpnSitesResult) IsEmpty() bool {
25163	return lvsr.Value == nil || len(*lvsr.Value) == 0
25164}
25165
25166// hasNextLink returns true if the NextLink is not empty.
25167func (lvsr ListVpnSitesResult) hasNextLink() bool {
25168	return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
25169}
25170
25171// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
25172// It returns nil if no more results exist.
25173func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
25174	if !lvsr.hasNextLink() {
25175		return nil, nil
25176	}
25177	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25178		autorest.AsJSON(),
25179		autorest.AsGet(),
25180		autorest.WithBaseURL(to.String(lvsr.NextLink)))
25181}
25182
25183// ListVpnSitesResultPage contains a page of VpnSite values.
25184type ListVpnSitesResultPage struct {
25185	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
25186	lvsr ListVpnSitesResult
25187}
25188
25189// NextWithContext advances to the next page of values.  If there was an error making
25190// the request the page does not advance and the error is returned.
25191func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
25192	if tracing.IsEnabled() {
25193		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
25194		defer func() {
25195			sc := -1
25196			if page.Response().Response.Response != nil {
25197				sc = page.Response().Response.Response.StatusCode
25198			}
25199			tracing.EndSpan(ctx, sc, err)
25200		}()
25201	}
25202	for {
25203		next, err := page.fn(ctx, page.lvsr)
25204		if err != nil {
25205			return err
25206		}
25207		page.lvsr = next
25208		if !next.hasNextLink() || !next.IsEmpty() {
25209			break
25210		}
25211	}
25212	return nil
25213}
25214
25215// Next advances to the next page of values.  If there was an error making
25216// the request the page does not advance and the error is returned.
25217// Deprecated: Use NextWithContext() instead.
25218func (page *ListVpnSitesResultPage) Next() error {
25219	return page.NextWithContext(context.Background())
25220}
25221
25222// NotDone returns true if the page enumeration should be started or is not yet complete.
25223func (page ListVpnSitesResultPage) NotDone() bool {
25224	return !page.lvsr.IsEmpty()
25225}
25226
25227// Response returns the raw server response from the last page request.
25228func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
25229	return page.lvsr
25230}
25231
25232// Values returns the slice of values for the current page or nil if there are no values.
25233func (page ListVpnSitesResultPage) Values() []VpnSite {
25234	if page.lvsr.IsEmpty() {
25235		return nil
25236	}
25237	return *page.lvsr.Value
25238}
25239
25240// Creates a new instance of the ListVpnSitesResultPage type.
25241func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
25242	return ListVpnSitesResultPage{
25243		fn:   getNextPage,
25244		lvsr: cur,
25245	}
25246}
25247
25248// LoadBalancer loadBalancer resource.
25249type LoadBalancer struct {
25250	autorest.Response `json:"-"`
25251	// ExtendedLocation - The extended location of the load balancer.
25252	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
25253	// Sku - The load balancer SKU.
25254	Sku *LoadBalancerSku `json:"sku,omitempty"`
25255	// LoadBalancerPropertiesFormat - Properties of load balancer.
25256	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
25257	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
25258	Etag *string `json:"etag,omitempty"`
25259	// ID - Resource ID.
25260	ID *string `json:"id,omitempty"`
25261	// Name - READ-ONLY; Resource name.
25262	Name *string `json:"name,omitempty"`
25263	// Type - READ-ONLY; Resource type.
25264	Type *string `json:"type,omitempty"`
25265	// Location - Resource location.
25266	Location *string `json:"location,omitempty"`
25267	// Tags - Resource tags.
25268	Tags map[string]*string `json:"tags"`
25269}
25270
25271// MarshalJSON is the custom marshaler for LoadBalancer.
25272func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
25273	objectMap := make(map[string]interface{})
25274	if lb.ExtendedLocation != nil {
25275		objectMap["extendedLocation"] = lb.ExtendedLocation
25276	}
25277	if lb.Sku != nil {
25278		objectMap["sku"] = lb.Sku
25279	}
25280	if lb.LoadBalancerPropertiesFormat != nil {
25281		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
25282	}
25283	if lb.ID != nil {
25284		objectMap["id"] = lb.ID
25285	}
25286	if lb.Location != nil {
25287		objectMap["location"] = lb.Location
25288	}
25289	if lb.Tags != nil {
25290		objectMap["tags"] = lb.Tags
25291	}
25292	return json.Marshal(objectMap)
25293}
25294
25295// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
25296func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
25297	var m map[string]*json.RawMessage
25298	err := json.Unmarshal(body, &m)
25299	if err != nil {
25300		return err
25301	}
25302	for k, v := range m {
25303		switch k {
25304		case "extendedLocation":
25305			if v != nil {
25306				var extendedLocation ExtendedLocation
25307				err = json.Unmarshal(*v, &extendedLocation)
25308				if err != nil {
25309					return err
25310				}
25311				lb.ExtendedLocation = &extendedLocation
25312			}
25313		case "sku":
25314			if v != nil {
25315				var sku LoadBalancerSku
25316				err = json.Unmarshal(*v, &sku)
25317				if err != nil {
25318					return err
25319				}
25320				lb.Sku = &sku
25321			}
25322		case "properties":
25323			if v != nil {
25324				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
25325				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
25326				if err != nil {
25327					return err
25328				}
25329				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
25330			}
25331		case "etag":
25332			if v != nil {
25333				var etag string
25334				err = json.Unmarshal(*v, &etag)
25335				if err != nil {
25336					return err
25337				}
25338				lb.Etag = &etag
25339			}
25340		case "id":
25341			if v != nil {
25342				var ID string
25343				err = json.Unmarshal(*v, &ID)
25344				if err != nil {
25345					return err
25346				}
25347				lb.ID = &ID
25348			}
25349		case "name":
25350			if v != nil {
25351				var name string
25352				err = json.Unmarshal(*v, &name)
25353				if err != nil {
25354					return err
25355				}
25356				lb.Name = &name
25357			}
25358		case "type":
25359			if v != nil {
25360				var typeVar string
25361				err = json.Unmarshal(*v, &typeVar)
25362				if err != nil {
25363					return err
25364				}
25365				lb.Type = &typeVar
25366			}
25367		case "location":
25368			if v != nil {
25369				var location string
25370				err = json.Unmarshal(*v, &location)
25371				if err != nil {
25372					return err
25373				}
25374				lb.Location = &location
25375			}
25376		case "tags":
25377			if v != nil {
25378				var tags map[string]*string
25379				err = json.Unmarshal(*v, &tags)
25380				if err != nil {
25381					return err
25382				}
25383				lb.Tags = tags
25384			}
25385		}
25386	}
25387
25388	return nil
25389}
25390
25391// LoadBalancerBackendAddress load balancer backend addresses.
25392type LoadBalancerBackendAddress struct {
25393	// LoadBalancerBackendAddressPropertiesFormat - Properties of load balancer backend address pool.
25394	*LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"`
25395	// Name - Name of the backend address.
25396	Name *string `json:"name,omitempty"`
25397}
25398
25399// MarshalJSON is the custom marshaler for LoadBalancerBackendAddress.
25400func (lbba LoadBalancerBackendAddress) MarshalJSON() ([]byte, error) {
25401	objectMap := make(map[string]interface{})
25402	if lbba.LoadBalancerBackendAddressPropertiesFormat != nil {
25403		objectMap["properties"] = lbba.LoadBalancerBackendAddressPropertiesFormat
25404	}
25405	if lbba.Name != nil {
25406		objectMap["name"] = lbba.Name
25407	}
25408	return json.Marshal(objectMap)
25409}
25410
25411// UnmarshalJSON is the custom unmarshaler for LoadBalancerBackendAddress struct.
25412func (lbba *LoadBalancerBackendAddress) UnmarshalJSON(body []byte) error {
25413	var m map[string]*json.RawMessage
25414	err := json.Unmarshal(body, &m)
25415	if err != nil {
25416		return err
25417	}
25418	for k, v := range m {
25419		switch k {
25420		case "properties":
25421			if v != nil {
25422				var loadBalancerBackendAddressPropertiesFormat LoadBalancerBackendAddressPropertiesFormat
25423				err = json.Unmarshal(*v, &loadBalancerBackendAddressPropertiesFormat)
25424				if err != nil {
25425					return err
25426				}
25427				lbba.LoadBalancerBackendAddressPropertiesFormat = &loadBalancerBackendAddressPropertiesFormat
25428			}
25429		case "name":
25430			if v != nil {
25431				var name string
25432				err = json.Unmarshal(*v, &name)
25433				if err != nil {
25434					return err
25435				}
25436				lbba.Name = &name
25437			}
25438		}
25439	}
25440
25441	return nil
25442}
25443
25444// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
25445type LoadBalancerBackendAddressPoolListResult struct {
25446	autorest.Response `json:"-"`
25447	// Value - A list of backend address pools in a load balancer.
25448	Value *[]BackendAddressPool `json:"value,omitempty"`
25449	// NextLink - READ-ONLY; The URL to get the next set of results.
25450	NextLink *string `json:"nextLink,omitempty"`
25451}
25452
25453// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
25454func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
25455	objectMap := make(map[string]interface{})
25456	if lbbaplr.Value != nil {
25457		objectMap["value"] = lbbaplr.Value
25458	}
25459	return json.Marshal(objectMap)
25460}
25461
25462// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
25463// BackendAddressPool values.
25464type LoadBalancerBackendAddressPoolListResultIterator struct {
25465	i    int
25466	page LoadBalancerBackendAddressPoolListResultPage
25467}
25468
25469// NextWithContext advances to the next value.  If there was an error making
25470// the request the iterator does not advance and the error is returned.
25471func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
25472	if tracing.IsEnabled() {
25473		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
25474		defer func() {
25475			sc := -1
25476			if iter.Response().Response.Response != nil {
25477				sc = iter.Response().Response.Response.StatusCode
25478			}
25479			tracing.EndSpan(ctx, sc, err)
25480		}()
25481	}
25482	iter.i++
25483	if iter.i < len(iter.page.Values()) {
25484		return nil
25485	}
25486	err = iter.page.NextWithContext(ctx)
25487	if err != nil {
25488		iter.i--
25489		return err
25490	}
25491	iter.i = 0
25492	return nil
25493}
25494
25495// Next advances to the next value.  If there was an error making
25496// the request the iterator does not advance and the error is returned.
25497// Deprecated: Use NextWithContext() instead.
25498func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
25499	return iter.NextWithContext(context.Background())
25500}
25501
25502// NotDone returns true if the enumeration should be started or is not yet complete.
25503func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
25504	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25505}
25506
25507// Response returns the raw server response from the last page request.
25508func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
25509	return iter.page.Response()
25510}
25511
25512// Value returns the current value or a zero-initialized value if the
25513// iterator has advanced beyond the end of the collection.
25514func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
25515	if !iter.page.NotDone() {
25516		return BackendAddressPool{}
25517	}
25518	return iter.page.Values()[iter.i]
25519}
25520
25521// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
25522func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
25523	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
25524}
25525
25526// IsEmpty returns true if the ListResult contains no values.
25527func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
25528	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
25529}
25530
25531// hasNextLink returns true if the NextLink is not empty.
25532func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
25533	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
25534}
25535
25536// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
25537// It returns nil if no more results exist.
25538func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
25539	if !lbbaplr.hasNextLink() {
25540		return nil, nil
25541	}
25542	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25543		autorest.AsJSON(),
25544		autorest.AsGet(),
25545		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
25546}
25547
25548// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
25549type LoadBalancerBackendAddressPoolListResultPage struct {
25550	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
25551	lbbaplr LoadBalancerBackendAddressPoolListResult
25552}
25553
25554// NextWithContext advances to the next page of values.  If there was an error making
25555// the request the page does not advance and the error is returned.
25556func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
25557	if tracing.IsEnabled() {
25558		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
25559		defer func() {
25560			sc := -1
25561			if page.Response().Response.Response != nil {
25562				sc = page.Response().Response.Response.StatusCode
25563			}
25564			tracing.EndSpan(ctx, sc, err)
25565		}()
25566	}
25567	for {
25568		next, err := page.fn(ctx, page.lbbaplr)
25569		if err != nil {
25570			return err
25571		}
25572		page.lbbaplr = next
25573		if !next.hasNextLink() || !next.IsEmpty() {
25574			break
25575		}
25576	}
25577	return nil
25578}
25579
25580// Next advances to the next page of values.  If there was an error making
25581// the request the page does not advance and the error is returned.
25582// Deprecated: Use NextWithContext() instead.
25583func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
25584	return page.NextWithContext(context.Background())
25585}
25586
25587// NotDone returns true if the page enumeration should be started or is not yet complete.
25588func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
25589	return !page.lbbaplr.IsEmpty()
25590}
25591
25592// Response returns the raw server response from the last page request.
25593func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
25594	return page.lbbaplr
25595}
25596
25597// Values returns the slice of values for the current page or nil if there are no values.
25598func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
25599	if page.lbbaplr.IsEmpty() {
25600		return nil
25601	}
25602	return *page.lbbaplr.Value
25603}
25604
25605// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
25606func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
25607	return LoadBalancerBackendAddressPoolListResultPage{
25608		fn:      getNextPage,
25609		lbbaplr: cur,
25610	}
25611}
25612
25613// LoadBalancerBackendAddressPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
25614// results of a long-running operation.
25615type LoadBalancerBackendAddressPoolsCreateOrUpdateFuture struct {
25616	azure.FutureAPI
25617	// Result returns the result of the asynchronous operation.
25618	// If the operation has not completed it will return an error.
25619	Result func(LoadBalancerBackendAddressPoolsClient) (BackendAddressPool, error)
25620}
25621
25622// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25623func (future *LoadBalancerBackendAddressPoolsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
25624	var azFuture azure.Future
25625	if err := json.Unmarshal(body, &azFuture); err != nil {
25626		return err
25627	}
25628	future.FutureAPI = &azFuture
25629	future.Result = future.result
25630	return nil
25631}
25632
25633// result is the default implementation for LoadBalancerBackendAddressPoolsCreateOrUpdateFuture.Result.
25634func (future *LoadBalancerBackendAddressPoolsCreateOrUpdateFuture) result(client LoadBalancerBackendAddressPoolsClient) (bap BackendAddressPool, err error) {
25635	var done bool
25636	done, err = future.DoneWithContext(context.Background(), client)
25637	if err != nil {
25638		err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
25639		return
25640	}
25641	if !done {
25642		bap.Response.Response = future.Response()
25643		err = azure.NewAsyncOpIncompleteError("network.LoadBalancerBackendAddressPoolsCreateOrUpdateFuture")
25644		return
25645	}
25646	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25647	if bap.Response.Response, err = future.GetResult(sender); err == nil && bap.Response.Response.StatusCode != http.StatusNoContent {
25648		bap, err = client.CreateOrUpdateResponder(bap.Response.Response)
25649		if err != nil {
25650			err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsCreateOrUpdateFuture", "Result", bap.Response.Response, "Failure responding to request")
25651		}
25652	}
25653	return
25654}
25655
25656// LoadBalancerBackendAddressPoolsDeleteFuture an abstraction for monitoring and retrieving the results of
25657// a long-running operation.
25658type LoadBalancerBackendAddressPoolsDeleteFuture struct {
25659	azure.FutureAPI
25660	// Result returns the result of the asynchronous operation.
25661	// If the operation has not completed it will return an error.
25662	Result func(LoadBalancerBackendAddressPoolsClient) (autorest.Response, error)
25663}
25664
25665// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25666func (future *LoadBalancerBackendAddressPoolsDeleteFuture) UnmarshalJSON(body []byte) error {
25667	var azFuture azure.Future
25668	if err := json.Unmarshal(body, &azFuture); err != nil {
25669		return err
25670	}
25671	future.FutureAPI = &azFuture
25672	future.Result = future.result
25673	return nil
25674}
25675
25676// result is the default implementation for LoadBalancerBackendAddressPoolsDeleteFuture.Result.
25677func (future *LoadBalancerBackendAddressPoolsDeleteFuture) result(client LoadBalancerBackendAddressPoolsClient) (ar autorest.Response, err error) {
25678	var done bool
25679	done, err = future.DoneWithContext(context.Background(), client)
25680	if err != nil {
25681		err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsDeleteFuture", "Result", future.Response(), "Polling failure")
25682		return
25683	}
25684	if !done {
25685		ar.Response = future.Response()
25686		err = azure.NewAsyncOpIncompleteError("network.LoadBalancerBackendAddressPoolsDeleteFuture")
25687		return
25688	}
25689	ar.Response = future.Response()
25690	return
25691}
25692
25693// LoadBalancerBackendAddressPropertiesFormat properties of the load balancer backend addresses.
25694type LoadBalancerBackendAddressPropertiesFormat struct {
25695	// VirtualNetwork - Reference to an existing virtual network.
25696	VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"`
25697	// Subnet - Reference to an existing subnet.
25698	Subnet *SubResource `json:"subnet,omitempty"`
25699	// IPAddress - IP Address belonging to the referenced virtual network.
25700	IPAddress *string `json:"ipAddress,omitempty"`
25701	// NetworkInterfaceIPConfiguration - READ-ONLY; Reference to IP address defined in network interfaces.
25702	NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"`
25703	// LoadBalancerFrontendIPConfiguration - Reference to the frontend ip address configuration defined in regional loadbalancer.
25704	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"`
25705}
25706
25707// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPropertiesFormat.
25708func (lbbapf LoadBalancerBackendAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
25709	objectMap := make(map[string]interface{})
25710	if lbbapf.VirtualNetwork != nil {
25711		objectMap["virtualNetwork"] = lbbapf.VirtualNetwork
25712	}
25713	if lbbapf.Subnet != nil {
25714		objectMap["subnet"] = lbbapf.Subnet
25715	}
25716	if lbbapf.IPAddress != nil {
25717		objectMap["ipAddress"] = lbbapf.IPAddress
25718	}
25719	if lbbapf.LoadBalancerFrontendIPConfiguration != nil {
25720		objectMap["loadBalancerFrontendIPConfiguration"] = lbbapf.LoadBalancerFrontendIPConfiguration
25721	}
25722	return json.Marshal(objectMap)
25723}
25724
25725// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
25726type LoadBalancerFrontendIPConfigurationListResult struct {
25727	autorest.Response `json:"-"`
25728	// Value - A list of frontend IP configurations in a load balancer.
25729	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
25730	// NextLink - READ-ONLY; The URL to get the next set of results.
25731	NextLink *string `json:"nextLink,omitempty"`
25732}
25733
25734// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
25735func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
25736	objectMap := make(map[string]interface{})
25737	if lbficlr.Value != nil {
25738		objectMap["value"] = lbficlr.Value
25739	}
25740	return json.Marshal(objectMap)
25741}
25742
25743// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
25744// FrontendIPConfiguration values.
25745type LoadBalancerFrontendIPConfigurationListResultIterator struct {
25746	i    int
25747	page LoadBalancerFrontendIPConfigurationListResultPage
25748}
25749
25750// NextWithContext advances to the next value.  If there was an error making
25751// the request the iterator does not advance and the error is returned.
25752func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
25753	if tracing.IsEnabled() {
25754		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
25755		defer func() {
25756			sc := -1
25757			if iter.Response().Response.Response != nil {
25758				sc = iter.Response().Response.Response.StatusCode
25759			}
25760			tracing.EndSpan(ctx, sc, err)
25761		}()
25762	}
25763	iter.i++
25764	if iter.i < len(iter.page.Values()) {
25765		return nil
25766	}
25767	err = iter.page.NextWithContext(ctx)
25768	if err != nil {
25769		iter.i--
25770		return err
25771	}
25772	iter.i = 0
25773	return nil
25774}
25775
25776// Next advances to the next value.  If there was an error making
25777// the request the iterator does not advance and the error is returned.
25778// Deprecated: Use NextWithContext() instead.
25779func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
25780	return iter.NextWithContext(context.Background())
25781}
25782
25783// NotDone returns true if the enumeration should be started or is not yet complete.
25784func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
25785	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25786}
25787
25788// Response returns the raw server response from the last page request.
25789func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
25790	return iter.page.Response()
25791}
25792
25793// Value returns the current value or a zero-initialized value if the
25794// iterator has advanced beyond the end of the collection.
25795func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
25796	if !iter.page.NotDone() {
25797		return FrontendIPConfiguration{}
25798	}
25799	return iter.page.Values()[iter.i]
25800}
25801
25802// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
25803func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
25804	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
25805}
25806
25807// IsEmpty returns true if the ListResult contains no values.
25808func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
25809	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
25810}
25811
25812// hasNextLink returns true if the NextLink is not empty.
25813func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
25814	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
25815}
25816
25817// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
25818// It returns nil if no more results exist.
25819func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
25820	if !lbficlr.hasNextLink() {
25821		return nil, nil
25822	}
25823	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25824		autorest.AsJSON(),
25825		autorest.AsGet(),
25826		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
25827}
25828
25829// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
25830type LoadBalancerFrontendIPConfigurationListResultPage struct {
25831	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
25832	lbficlr LoadBalancerFrontendIPConfigurationListResult
25833}
25834
25835// NextWithContext advances to the next page of values.  If there was an error making
25836// the request the page does not advance and the error is returned.
25837func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
25838	if tracing.IsEnabled() {
25839		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
25840		defer func() {
25841			sc := -1
25842			if page.Response().Response.Response != nil {
25843				sc = page.Response().Response.Response.StatusCode
25844			}
25845			tracing.EndSpan(ctx, sc, err)
25846		}()
25847	}
25848	for {
25849		next, err := page.fn(ctx, page.lbficlr)
25850		if err != nil {
25851			return err
25852		}
25853		page.lbficlr = next
25854		if !next.hasNextLink() || !next.IsEmpty() {
25855			break
25856		}
25857	}
25858	return nil
25859}
25860
25861// Next advances to the next page of values.  If there was an error making
25862// the request the page does not advance and the error is returned.
25863// Deprecated: Use NextWithContext() instead.
25864func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
25865	return page.NextWithContext(context.Background())
25866}
25867
25868// NotDone returns true if the page enumeration should be started or is not yet complete.
25869func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
25870	return !page.lbficlr.IsEmpty()
25871}
25872
25873// Response returns the raw server response from the last page request.
25874func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
25875	return page.lbficlr
25876}
25877
25878// Values returns the slice of values for the current page or nil if there are no values.
25879func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
25880	if page.lbficlr.IsEmpty() {
25881		return nil
25882	}
25883	return *page.lbficlr.Value
25884}
25885
25886// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
25887func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
25888	return LoadBalancerFrontendIPConfigurationListResultPage{
25889		fn:      getNextPage,
25890		lbficlr: cur,
25891	}
25892}
25893
25894// LoadBalancerListResult response for ListLoadBalancers API service call.
25895type LoadBalancerListResult struct {
25896	autorest.Response `json:"-"`
25897	// Value - A list of load balancers in a resource group.
25898	Value *[]LoadBalancer `json:"value,omitempty"`
25899	// NextLink - READ-ONLY; The URL to get the next set of results.
25900	NextLink *string `json:"nextLink,omitempty"`
25901}
25902
25903// MarshalJSON is the custom marshaler for LoadBalancerListResult.
25904func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
25905	objectMap := make(map[string]interface{})
25906	if lblr.Value != nil {
25907		objectMap["value"] = lblr.Value
25908	}
25909	return json.Marshal(objectMap)
25910}
25911
25912// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
25913type LoadBalancerListResultIterator struct {
25914	i    int
25915	page LoadBalancerListResultPage
25916}
25917
25918// NextWithContext advances to the next value.  If there was an error making
25919// the request the iterator does not advance and the error is returned.
25920func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
25921	if tracing.IsEnabled() {
25922		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
25923		defer func() {
25924			sc := -1
25925			if iter.Response().Response.Response != nil {
25926				sc = iter.Response().Response.Response.StatusCode
25927			}
25928			tracing.EndSpan(ctx, sc, err)
25929		}()
25930	}
25931	iter.i++
25932	if iter.i < len(iter.page.Values()) {
25933		return nil
25934	}
25935	err = iter.page.NextWithContext(ctx)
25936	if err != nil {
25937		iter.i--
25938		return err
25939	}
25940	iter.i = 0
25941	return nil
25942}
25943
25944// Next advances to the next value.  If there was an error making
25945// the request the iterator does not advance and the error is returned.
25946// Deprecated: Use NextWithContext() instead.
25947func (iter *LoadBalancerListResultIterator) Next() error {
25948	return iter.NextWithContext(context.Background())
25949}
25950
25951// NotDone returns true if the enumeration should be started or is not yet complete.
25952func (iter LoadBalancerListResultIterator) NotDone() bool {
25953	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25954}
25955
25956// Response returns the raw server response from the last page request.
25957func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
25958	return iter.page.Response()
25959}
25960
25961// Value returns the current value or a zero-initialized value if the
25962// iterator has advanced beyond the end of the collection.
25963func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
25964	if !iter.page.NotDone() {
25965		return LoadBalancer{}
25966	}
25967	return iter.page.Values()[iter.i]
25968}
25969
25970// Creates a new instance of the LoadBalancerListResultIterator type.
25971func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
25972	return LoadBalancerListResultIterator{page: page}
25973}
25974
25975// IsEmpty returns true if the ListResult contains no values.
25976func (lblr LoadBalancerListResult) IsEmpty() bool {
25977	return lblr.Value == nil || len(*lblr.Value) == 0
25978}
25979
25980// hasNextLink returns true if the NextLink is not empty.
25981func (lblr LoadBalancerListResult) hasNextLink() bool {
25982	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
25983}
25984
25985// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
25986// It returns nil if no more results exist.
25987func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
25988	if !lblr.hasNextLink() {
25989		return nil, nil
25990	}
25991	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25992		autorest.AsJSON(),
25993		autorest.AsGet(),
25994		autorest.WithBaseURL(to.String(lblr.NextLink)))
25995}
25996
25997// LoadBalancerListResultPage contains a page of LoadBalancer values.
25998type LoadBalancerListResultPage struct {
25999	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
26000	lblr LoadBalancerListResult
26001}
26002
26003// NextWithContext advances to the next page of values.  If there was an error making
26004// the request the page does not advance and the error is returned.
26005func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
26006	if tracing.IsEnabled() {
26007		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
26008		defer func() {
26009			sc := -1
26010			if page.Response().Response.Response != nil {
26011				sc = page.Response().Response.Response.StatusCode
26012			}
26013			tracing.EndSpan(ctx, sc, err)
26014		}()
26015	}
26016	for {
26017		next, err := page.fn(ctx, page.lblr)
26018		if err != nil {
26019			return err
26020		}
26021		page.lblr = next
26022		if !next.hasNextLink() || !next.IsEmpty() {
26023			break
26024		}
26025	}
26026	return nil
26027}
26028
26029// Next advances to the next page of values.  If there was an error making
26030// the request the page does not advance and the error is returned.
26031// Deprecated: Use NextWithContext() instead.
26032func (page *LoadBalancerListResultPage) Next() error {
26033	return page.NextWithContext(context.Background())
26034}
26035
26036// NotDone returns true if the page enumeration should be started or is not yet complete.
26037func (page LoadBalancerListResultPage) NotDone() bool {
26038	return !page.lblr.IsEmpty()
26039}
26040
26041// Response returns the raw server response from the last page request.
26042func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
26043	return page.lblr
26044}
26045
26046// Values returns the slice of values for the current page or nil if there are no values.
26047func (page LoadBalancerListResultPage) Values() []LoadBalancer {
26048	if page.lblr.IsEmpty() {
26049		return nil
26050	}
26051	return *page.lblr.Value
26052}
26053
26054// Creates a new instance of the LoadBalancerListResultPage type.
26055func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
26056	return LoadBalancerListResultPage{
26057		fn:   getNextPage,
26058		lblr: cur,
26059	}
26060}
26061
26062// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
26063type LoadBalancerLoadBalancingRuleListResult struct {
26064	autorest.Response `json:"-"`
26065	// Value - A list of load balancing rules in a load balancer.
26066	Value *[]LoadBalancingRule `json:"value,omitempty"`
26067	// NextLink - READ-ONLY; The URL to get the next set of results.
26068	NextLink *string `json:"nextLink,omitempty"`
26069}
26070
26071// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
26072func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
26073	objectMap := make(map[string]interface{})
26074	if lblbrlr.Value != nil {
26075		objectMap["value"] = lblbrlr.Value
26076	}
26077	return json.Marshal(objectMap)
26078}
26079
26080// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
26081// LoadBalancingRule values.
26082type LoadBalancerLoadBalancingRuleListResultIterator struct {
26083	i    int
26084	page LoadBalancerLoadBalancingRuleListResultPage
26085}
26086
26087// NextWithContext advances to the next value.  If there was an error making
26088// the request the iterator does not advance and the error is returned.
26089func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
26090	if tracing.IsEnabled() {
26091		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
26092		defer func() {
26093			sc := -1
26094			if iter.Response().Response.Response != nil {
26095				sc = iter.Response().Response.Response.StatusCode
26096			}
26097			tracing.EndSpan(ctx, sc, err)
26098		}()
26099	}
26100	iter.i++
26101	if iter.i < len(iter.page.Values()) {
26102		return nil
26103	}
26104	err = iter.page.NextWithContext(ctx)
26105	if err != nil {
26106		iter.i--
26107		return err
26108	}
26109	iter.i = 0
26110	return nil
26111}
26112
26113// Next advances to the next value.  If there was an error making
26114// the request the iterator does not advance and the error is returned.
26115// Deprecated: Use NextWithContext() instead.
26116func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
26117	return iter.NextWithContext(context.Background())
26118}
26119
26120// NotDone returns true if the enumeration should be started or is not yet complete.
26121func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
26122	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26123}
26124
26125// Response returns the raw server response from the last page request.
26126func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
26127	return iter.page.Response()
26128}
26129
26130// Value returns the current value or a zero-initialized value if the
26131// iterator has advanced beyond the end of the collection.
26132func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
26133	if !iter.page.NotDone() {
26134		return LoadBalancingRule{}
26135	}
26136	return iter.page.Values()[iter.i]
26137}
26138
26139// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
26140func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
26141	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
26142}
26143
26144// IsEmpty returns true if the ListResult contains no values.
26145func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
26146	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
26147}
26148
26149// hasNextLink returns true if the NextLink is not empty.
26150func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
26151	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
26152}
26153
26154// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
26155// It returns nil if no more results exist.
26156func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
26157	if !lblbrlr.hasNextLink() {
26158		return nil, nil
26159	}
26160	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26161		autorest.AsJSON(),
26162		autorest.AsGet(),
26163		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
26164}
26165
26166// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
26167type LoadBalancerLoadBalancingRuleListResultPage struct {
26168	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
26169	lblbrlr LoadBalancerLoadBalancingRuleListResult
26170}
26171
26172// NextWithContext advances to the next page of values.  If there was an error making
26173// the request the page does not advance and the error is returned.
26174func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
26175	if tracing.IsEnabled() {
26176		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
26177		defer func() {
26178			sc := -1
26179			if page.Response().Response.Response != nil {
26180				sc = page.Response().Response.Response.StatusCode
26181			}
26182			tracing.EndSpan(ctx, sc, err)
26183		}()
26184	}
26185	for {
26186		next, err := page.fn(ctx, page.lblbrlr)
26187		if err != nil {
26188			return err
26189		}
26190		page.lblbrlr = next
26191		if !next.hasNextLink() || !next.IsEmpty() {
26192			break
26193		}
26194	}
26195	return nil
26196}
26197
26198// Next advances to the next page of values.  If there was an error making
26199// the request the page does not advance and the error is returned.
26200// Deprecated: Use NextWithContext() instead.
26201func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
26202	return page.NextWithContext(context.Background())
26203}
26204
26205// NotDone returns true if the page enumeration should be started or is not yet complete.
26206func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
26207	return !page.lblbrlr.IsEmpty()
26208}
26209
26210// Response returns the raw server response from the last page request.
26211func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
26212	return page.lblbrlr
26213}
26214
26215// Values returns the slice of values for the current page or nil if there are no values.
26216func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
26217	if page.lblbrlr.IsEmpty() {
26218		return nil
26219	}
26220	return *page.lblbrlr.Value
26221}
26222
26223// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
26224func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
26225	return LoadBalancerLoadBalancingRuleListResultPage{
26226		fn:      getNextPage,
26227		lblbrlr: cur,
26228	}
26229}
26230
26231// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call.
26232type LoadBalancerOutboundRuleListResult struct {
26233	autorest.Response `json:"-"`
26234	// Value - A list of outbound rules in a load balancer.
26235	Value *[]OutboundRule `json:"value,omitempty"`
26236	// NextLink - READ-ONLY; The URL to get the next set of results.
26237	NextLink *string `json:"nextLink,omitempty"`
26238}
26239
26240// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult.
26241func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) {
26242	objectMap := make(map[string]interface{})
26243	if lborlr.Value != nil {
26244		objectMap["value"] = lborlr.Value
26245	}
26246	return json.Marshal(objectMap)
26247}
26248
26249// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values.
26250type LoadBalancerOutboundRuleListResultIterator struct {
26251	i    int
26252	page LoadBalancerOutboundRuleListResultPage
26253}
26254
26255// NextWithContext advances to the next value.  If there was an error making
26256// the request the iterator does not advance and the error is returned.
26257func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
26258	if tracing.IsEnabled() {
26259		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext")
26260		defer func() {
26261			sc := -1
26262			if iter.Response().Response.Response != nil {
26263				sc = iter.Response().Response.Response.StatusCode
26264			}
26265			tracing.EndSpan(ctx, sc, err)
26266		}()
26267	}
26268	iter.i++
26269	if iter.i < len(iter.page.Values()) {
26270		return nil
26271	}
26272	err = iter.page.NextWithContext(ctx)
26273	if err != nil {
26274		iter.i--
26275		return err
26276	}
26277	iter.i = 0
26278	return nil
26279}
26280
26281// Next advances to the next value.  If there was an error making
26282// the request the iterator does not advance and the error is returned.
26283// Deprecated: Use NextWithContext() instead.
26284func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error {
26285	return iter.NextWithContext(context.Background())
26286}
26287
26288// NotDone returns true if the enumeration should be started or is not yet complete.
26289func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool {
26290	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26291}
26292
26293// Response returns the raw server response from the last page request.
26294func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult {
26295	return iter.page.Response()
26296}
26297
26298// Value returns the current value or a zero-initialized value if the
26299// iterator has advanced beyond the end of the collection.
26300func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule {
26301	if !iter.page.NotDone() {
26302		return OutboundRule{}
26303	}
26304	return iter.page.Values()[iter.i]
26305}
26306
26307// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type.
26308func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator {
26309	return LoadBalancerOutboundRuleListResultIterator{page: page}
26310}
26311
26312// IsEmpty returns true if the ListResult contains no values.
26313func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool {
26314	return lborlr.Value == nil || len(*lborlr.Value) == 0
26315}
26316
26317// hasNextLink returns true if the NextLink is not empty.
26318func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool {
26319	return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0
26320}
26321
26322// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results.
26323// It returns nil if no more results exist.
26324func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
26325	if !lborlr.hasNextLink() {
26326		return nil, nil
26327	}
26328	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26329		autorest.AsJSON(),
26330		autorest.AsGet(),
26331		autorest.WithBaseURL(to.String(lborlr.NextLink)))
26332}
26333
26334// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values.
26335type LoadBalancerOutboundRuleListResultPage struct {
26336	fn     func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)
26337	lborlr LoadBalancerOutboundRuleListResult
26338}
26339
26340// NextWithContext advances to the next page of values.  If there was an error making
26341// the request the page does not advance and the error is returned.
26342func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
26343	if tracing.IsEnabled() {
26344		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext")
26345		defer func() {
26346			sc := -1
26347			if page.Response().Response.Response != nil {
26348				sc = page.Response().Response.Response.StatusCode
26349			}
26350			tracing.EndSpan(ctx, sc, err)
26351		}()
26352	}
26353	for {
26354		next, err := page.fn(ctx, page.lborlr)
26355		if err != nil {
26356			return err
26357		}
26358		page.lborlr = next
26359		if !next.hasNextLink() || !next.IsEmpty() {
26360			break
26361		}
26362	}
26363	return nil
26364}
26365
26366// Next advances to the next page of values.  If there was an error making
26367// the request the page does not advance and the error is returned.
26368// Deprecated: Use NextWithContext() instead.
26369func (page *LoadBalancerOutboundRuleListResultPage) Next() error {
26370	return page.NextWithContext(context.Background())
26371}
26372
26373// NotDone returns true if the page enumeration should be started or is not yet complete.
26374func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool {
26375	return !page.lborlr.IsEmpty()
26376}
26377
26378// Response returns the raw server response from the last page request.
26379func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult {
26380	return page.lborlr
26381}
26382
26383// Values returns the slice of values for the current page or nil if there are no values.
26384func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule {
26385	if page.lborlr.IsEmpty() {
26386		return nil
26387	}
26388	return *page.lborlr.Value
26389}
26390
26391// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type.
26392func NewLoadBalancerOutboundRuleListResultPage(cur LoadBalancerOutboundRuleListResult, getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage {
26393	return LoadBalancerOutboundRuleListResultPage{
26394		fn:     getNextPage,
26395		lborlr: cur,
26396	}
26397}
26398
26399// LoadBalancerProbeListResult response for ListProbe API service call.
26400type LoadBalancerProbeListResult struct {
26401	autorest.Response `json:"-"`
26402	// Value - A list of probes in a load balancer.
26403	Value *[]Probe `json:"value,omitempty"`
26404	// NextLink - READ-ONLY; The URL to get the next set of results.
26405	NextLink *string `json:"nextLink,omitempty"`
26406}
26407
26408// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
26409func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
26410	objectMap := make(map[string]interface{})
26411	if lbplr.Value != nil {
26412		objectMap["value"] = lbplr.Value
26413	}
26414	return json.Marshal(objectMap)
26415}
26416
26417// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
26418type LoadBalancerProbeListResultIterator struct {
26419	i    int
26420	page LoadBalancerProbeListResultPage
26421}
26422
26423// NextWithContext advances to the next value.  If there was an error making
26424// the request the iterator does not advance and the error is returned.
26425func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
26426	if tracing.IsEnabled() {
26427		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
26428		defer func() {
26429			sc := -1
26430			if iter.Response().Response.Response != nil {
26431				sc = iter.Response().Response.Response.StatusCode
26432			}
26433			tracing.EndSpan(ctx, sc, err)
26434		}()
26435	}
26436	iter.i++
26437	if iter.i < len(iter.page.Values()) {
26438		return nil
26439	}
26440	err = iter.page.NextWithContext(ctx)
26441	if err != nil {
26442		iter.i--
26443		return err
26444	}
26445	iter.i = 0
26446	return nil
26447}
26448
26449// Next advances to the next value.  If there was an error making
26450// the request the iterator does not advance and the error is returned.
26451// Deprecated: Use NextWithContext() instead.
26452func (iter *LoadBalancerProbeListResultIterator) Next() error {
26453	return iter.NextWithContext(context.Background())
26454}
26455
26456// NotDone returns true if the enumeration should be started or is not yet complete.
26457func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
26458	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26459}
26460
26461// Response returns the raw server response from the last page request.
26462func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
26463	return iter.page.Response()
26464}
26465
26466// Value returns the current value or a zero-initialized value if the
26467// iterator has advanced beyond the end of the collection.
26468func (iter LoadBalancerProbeListResultIterator) Value() Probe {
26469	if !iter.page.NotDone() {
26470		return Probe{}
26471	}
26472	return iter.page.Values()[iter.i]
26473}
26474
26475// Creates a new instance of the LoadBalancerProbeListResultIterator type.
26476func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
26477	return LoadBalancerProbeListResultIterator{page: page}
26478}
26479
26480// IsEmpty returns true if the ListResult contains no values.
26481func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
26482	return lbplr.Value == nil || len(*lbplr.Value) == 0
26483}
26484
26485// hasNextLink returns true if the NextLink is not empty.
26486func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
26487	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
26488}
26489
26490// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
26491// It returns nil if no more results exist.
26492func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
26493	if !lbplr.hasNextLink() {
26494		return nil, nil
26495	}
26496	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26497		autorest.AsJSON(),
26498		autorest.AsGet(),
26499		autorest.WithBaseURL(to.String(lbplr.NextLink)))
26500}
26501
26502// LoadBalancerProbeListResultPage contains a page of Probe values.
26503type LoadBalancerProbeListResultPage struct {
26504	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
26505	lbplr LoadBalancerProbeListResult
26506}
26507
26508// NextWithContext advances to the next page of values.  If there was an error making
26509// the request the page does not advance and the error is returned.
26510func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
26511	if tracing.IsEnabled() {
26512		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
26513		defer func() {
26514			sc := -1
26515			if page.Response().Response.Response != nil {
26516				sc = page.Response().Response.Response.StatusCode
26517			}
26518			tracing.EndSpan(ctx, sc, err)
26519		}()
26520	}
26521	for {
26522		next, err := page.fn(ctx, page.lbplr)
26523		if err != nil {
26524			return err
26525		}
26526		page.lbplr = next
26527		if !next.hasNextLink() || !next.IsEmpty() {
26528			break
26529		}
26530	}
26531	return nil
26532}
26533
26534// Next advances to the next page of values.  If there was an error making
26535// the request the page does not advance and the error is returned.
26536// Deprecated: Use NextWithContext() instead.
26537func (page *LoadBalancerProbeListResultPage) Next() error {
26538	return page.NextWithContext(context.Background())
26539}
26540
26541// NotDone returns true if the page enumeration should be started or is not yet complete.
26542func (page LoadBalancerProbeListResultPage) NotDone() bool {
26543	return !page.lbplr.IsEmpty()
26544}
26545
26546// Response returns the raw server response from the last page request.
26547func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
26548	return page.lbplr
26549}
26550
26551// Values returns the slice of values for the current page or nil if there are no values.
26552func (page LoadBalancerProbeListResultPage) Values() []Probe {
26553	if page.lbplr.IsEmpty() {
26554		return nil
26555	}
26556	return *page.lbplr.Value
26557}
26558
26559// Creates a new instance of the LoadBalancerProbeListResultPage type.
26560func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
26561	return LoadBalancerProbeListResultPage{
26562		fn:    getNextPage,
26563		lbplr: cur,
26564	}
26565}
26566
26567// LoadBalancerPropertiesFormat properties of the load balancer.
26568type LoadBalancerPropertiesFormat struct {
26569	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer.
26570	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
26571	// BackendAddressPools - Collection of backend address pools used by a load balancer.
26572	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
26573	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning.
26574	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
26575	// Probes - Collection of probe objects used in the load balancer.
26576	Probes *[]Probe `json:"probes,omitempty"`
26577	// 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.
26578	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
26579	// 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.
26580	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
26581	// OutboundRules - The outbound rules.
26582	OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
26583	// ResourceGUID - READ-ONLY; The resource GUID property of the load balancer resource.
26584	ResourceGUID *string `json:"resourceGuid,omitempty"`
26585	// ProvisioningState - READ-ONLY; The provisioning state of the load balancer resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
26586	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26587}
26588
26589// MarshalJSON is the custom marshaler for LoadBalancerPropertiesFormat.
26590func (lbpf LoadBalancerPropertiesFormat) MarshalJSON() ([]byte, error) {
26591	objectMap := make(map[string]interface{})
26592	if lbpf.FrontendIPConfigurations != nil {
26593		objectMap["frontendIPConfigurations"] = lbpf.FrontendIPConfigurations
26594	}
26595	if lbpf.BackendAddressPools != nil {
26596		objectMap["backendAddressPools"] = lbpf.BackendAddressPools
26597	}
26598	if lbpf.LoadBalancingRules != nil {
26599		objectMap["loadBalancingRules"] = lbpf.LoadBalancingRules
26600	}
26601	if lbpf.Probes != nil {
26602		objectMap["probes"] = lbpf.Probes
26603	}
26604	if lbpf.InboundNatRules != nil {
26605		objectMap["inboundNatRules"] = lbpf.InboundNatRules
26606	}
26607	if lbpf.InboundNatPools != nil {
26608		objectMap["inboundNatPools"] = lbpf.InboundNatPools
26609	}
26610	if lbpf.OutboundRules != nil {
26611		objectMap["outboundRules"] = lbpf.OutboundRules
26612	}
26613	return json.Marshal(objectMap)
26614}
26615
26616// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
26617// long-running operation.
26618type LoadBalancersCreateOrUpdateFuture struct {
26619	azure.FutureAPI
26620	// Result returns the result of the asynchronous operation.
26621	// If the operation has not completed it will return an error.
26622	Result func(LoadBalancersClient) (LoadBalancer, error)
26623}
26624
26625// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26626func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
26627	var azFuture azure.Future
26628	if err := json.Unmarshal(body, &azFuture); err != nil {
26629		return err
26630	}
26631	future.FutureAPI = &azFuture
26632	future.Result = future.result
26633	return nil
26634}
26635
26636// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result.
26637func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
26638	var done bool
26639	done, err = future.DoneWithContext(context.Background(), client)
26640	if err != nil {
26641		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
26642		return
26643	}
26644	if !done {
26645		lb.Response.Response = future.Response()
26646		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
26647		return
26648	}
26649	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26650	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
26651		lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
26652		if err != nil {
26653			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
26654		}
26655	}
26656	return
26657}
26658
26659// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26660// operation.
26661type LoadBalancersDeleteFuture struct {
26662	azure.FutureAPI
26663	// Result returns the result of the asynchronous operation.
26664	// If the operation has not completed it will return an error.
26665	Result func(LoadBalancersClient) (autorest.Response, error)
26666}
26667
26668// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26669func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error {
26670	var azFuture azure.Future
26671	if err := json.Unmarshal(body, &azFuture); err != nil {
26672		return err
26673	}
26674	future.FutureAPI = &azFuture
26675	future.Result = future.result
26676	return nil
26677}
26678
26679// result is the default implementation for LoadBalancersDeleteFuture.Result.
26680func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) {
26681	var done bool
26682	done, err = future.DoneWithContext(context.Background(), client)
26683	if err != nil {
26684		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
26685		return
26686	}
26687	if !done {
26688		ar.Response = future.Response()
26689		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
26690		return
26691	}
26692	ar.Response = future.Response()
26693	return
26694}
26695
26696// LoadBalancerSku SKU of a load balancer.
26697type LoadBalancerSku struct {
26698	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
26699	Name LoadBalancerSkuName `json:"name,omitempty"`
26700	// Tier - Tier of a load balancer SKU. Possible values include: 'LoadBalancerSkuTierRegional', 'LoadBalancerSkuTierGlobal'
26701	Tier LoadBalancerSkuTier `json:"tier,omitempty"`
26702}
26703
26704// LoadBalancingRule a load balancing rule for a load balancer.
26705type LoadBalancingRule struct {
26706	autorest.Response `json:"-"`
26707	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
26708	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
26709	// 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.
26710	Name *string `json:"name,omitempty"`
26711	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26712	Etag *string `json:"etag,omitempty"`
26713	// Type - READ-ONLY; Type of the resource.
26714	Type *string `json:"type,omitempty"`
26715	// ID - Resource ID.
26716	ID *string `json:"id,omitempty"`
26717}
26718
26719// MarshalJSON is the custom marshaler for LoadBalancingRule.
26720func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
26721	objectMap := make(map[string]interface{})
26722	if lbr.LoadBalancingRulePropertiesFormat != nil {
26723		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
26724	}
26725	if lbr.Name != nil {
26726		objectMap["name"] = lbr.Name
26727	}
26728	if lbr.ID != nil {
26729		objectMap["id"] = lbr.ID
26730	}
26731	return json.Marshal(objectMap)
26732}
26733
26734// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
26735func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
26736	var m map[string]*json.RawMessage
26737	err := json.Unmarshal(body, &m)
26738	if err != nil {
26739		return err
26740	}
26741	for k, v := range m {
26742		switch k {
26743		case "properties":
26744			if v != nil {
26745				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
26746				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
26747				if err != nil {
26748					return err
26749				}
26750				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
26751			}
26752		case "name":
26753			if v != nil {
26754				var name string
26755				err = json.Unmarshal(*v, &name)
26756				if err != nil {
26757					return err
26758				}
26759				lbr.Name = &name
26760			}
26761		case "etag":
26762			if v != nil {
26763				var etag string
26764				err = json.Unmarshal(*v, &etag)
26765				if err != nil {
26766					return err
26767				}
26768				lbr.Etag = &etag
26769			}
26770		case "type":
26771			if v != nil {
26772				var typeVar string
26773				err = json.Unmarshal(*v, &typeVar)
26774				if err != nil {
26775					return err
26776				}
26777				lbr.Type = &typeVar
26778			}
26779		case "id":
26780			if v != nil {
26781				var ID string
26782				err = json.Unmarshal(*v, &ID)
26783				if err != nil {
26784					return err
26785				}
26786				lbr.ID = &ID
26787			}
26788		}
26789	}
26790
26791	return nil
26792}
26793
26794// LoadBalancingRulePropertiesFormat properties of the load balancer.
26795type LoadBalancingRulePropertiesFormat struct {
26796	// FrontendIPConfiguration - A reference to frontend IP addresses.
26797	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
26798	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
26799	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
26800	// Probe - The reference to the load balancer probe used by the load balancing rule.
26801	Probe *SubResource `json:"probe,omitempty"`
26802	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
26803	Protocol TransportProtocol `json:"protocol,omitempty"`
26804	// LoadDistribution - The load distribution policy for this rule. Possible values include: 'LoadDistributionDefault', 'LoadDistributionSourceIP', 'LoadDistributionSourceIPProtocol'
26805	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
26806	// 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".
26807	FrontendPort *int32 `json:"frontendPort,omitempty"`
26808	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port".
26809	BackendPort *int32 `json:"backendPort,omitempty"`
26810	// 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.
26811	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
26812	// 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.
26813	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
26814	// 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.
26815	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
26816	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
26817	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
26818	// ProvisioningState - READ-ONLY; The provisioning state of the load balancing rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
26819	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26820}
26821
26822// MarshalJSON is the custom marshaler for LoadBalancingRulePropertiesFormat.
26823func (lbrpf LoadBalancingRulePropertiesFormat) MarshalJSON() ([]byte, error) {
26824	objectMap := make(map[string]interface{})
26825	if lbrpf.FrontendIPConfiguration != nil {
26826		objectMap["frontendIPConfiguration"] = lbrpf.FrontendIPConfiguration
26827	}
26828	if lbrpf.BackendAddressPool != nil {
26829		objectMap["backendAddressPool"] = lbrpf.BackendAddressPool
26830	}
26831	if lbrpf.Probe != nil {
26832		objectMap["probe"] = lbrpf.Probe
26833	}
26834	if lbrpf.Protocol != "" {
26835		objectMap["protocol"] = lbrpf.Protocol
26836	}
26837	if lbrpf.LoadDistribution != "" {
26838		objectMap["loadDistribution"] = lbrpf.LoadDistribution
26839	}
26840	if lbrpf.FrontendPort != nil {
26841		objectMap["frontendPort"] = lbrpf.FrontendPort
26842	}
26843	if lbrpf.BackendPort != nil {
26844		objectMap["backendPort"] = lbrpf.BackendPort
26845	}
26846	if lbrpf.IdleTimeoutInMinutes != nil {
26847		objectMap["idleTimeoutInMinutes"] = lbrpf.IdleTimeoutInMinutes
26848	}
26849	if lbrpf.EnableFloatingIP != nil {
26850		objectMap["enableFloatingIP"] = lbrpf.EnableFloatingIP
26851	}
26852	if lbrpf.EnableTCPReset != nil {
26853		objectMap["enableTcpReset"] = lbrpf.EnableTCPReset
26854	}
26855	if lbrpf.DisableOutboundSnat != nil {
26856		objectMap["disableOutboundSnat"] = lbrpf.DisableOutboundSnat
26857	}
26858	return json.Marshal(objectMap)
26859}
26860
26861// LocalNetworkGateway a common class for general resource information.
26862type LocalNetworkGateway struct {
26863	autorest.Response `json:"-"`
26864	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
26865	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
26866	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26867	Etag *string `json:"etag,omitempty"`
26868	// ID - Resource ID.
26869	ID *string `json:"id,omitempty"`
26870	// Name - READ-ONLY; Resource name.
26871	Name *string `json:"name,omitempty"`
26872	// Type - READ-ONLY; Resource type.
26873	Type *string `json:"type,omitempty"`
26874	// Location - Resource location.
26875	Location *string `json:"location,omitempty"`
26876	// Tags - Resource tags.
26877	Tags map[string]*string `json:"tags"`
26878}
26879
26880// MarshalJSON is the custom marshaler for LocalNetworkGateway.
26881func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
26882	objectMap := make(map[string]interface{})
26883	if lng.LocalNetworkGatewayPropertiesFormat != nil {
26884		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
26885	}
26886	if lng.ID != nil {
26887		objectMap["id"] = lng.ID
26888	}
26889	if lng.Location != nil {
26890		objectMap["location"] = lng.Location
26891	}
26892	if lng.Tags != nil {
26893		objectMap["tags"] = lng.Tags
26894	}
26895	return json.Marshal(objectMap)
26896}
26897
26898// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
26899func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
26900	var m map[string]*json.RawMessage
26901	err := json.Unmarshal(body, &m)
26902	if err != nil {
26903		return err
26904	}
26905	for k, v := range m {
26906		switch k {
26907		case "properties":
26908			if v != nil {
26909				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
26910				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
26911				if err != nil {
26912					return err
26913				}
26914				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
26915			}
26916		case "etag":
26917			if v != nil {
26918				var etag string
26919				err = json.Unmarshal(*v, &etag)
26920				if err != nil {
26921					return err
26922				}
26923				lng.Etag = &etag
26924			}
26925		case "id":
26926			if v != nil {
26927				var ID string
26928				err = json.Unmarshal(*v, &ID)
26929				if err != nil {
26930					return err
26931				}
26932				lng.ID = &ID
26933			}
26934		case "name":
26935			if v != nil {
26936				var name string
26937				err = json.Unmarshal(*v, &name)
26938				if err != nil {
26939					return err
26940				}
26941				lng.Name = &name
26942			}
26943		case "type":
26944			if v != nil {
26945				var typeVar string
26946				err = json.Unmarshal(*v, &typeVar)
26947				if err != nil {
26948					return err
26949				}
26950				lng.Type = &typeVar
26951			}
26952		case "location":
26953			if v != nil {
26954				var location string
26955				err = json.Unmarshal(*v, &location)
26956				if err != nil {
26957					return err
26958				}
26959				lng.Location = &location
26960			}
26961		case "tags":
26962			if v != nil {
26963				var tags map[string]*string
26964				err = json.Unmarshal(*v, &tags)
26965				if err != nil {
26966					return err
26967				}
26968				lng.Tags = tags
26969			}
26970		}
26971	}
26972
26973	return nil
26974}
26975
26976// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
26977type LocalNetworkGatewayListResult struct {
26978	autorest.Response `json:"-"`
26979	// Value - A list of local network gateways that exists in a resource group.
26980	Value *[]LocalNetworkGateway `json:"value,omitempty"`
26981	// NextLink - READ-ONLY; The URL to get the next set of results.
26982	NextLink *string `json:"nextLink,omitempty"`
26983}
26984
26985// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
26986func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
26987	objectMap := make(map[string]interface{})
26988	if lnglr.Value != nil {
26989		objectMap["value"] = lnglr.Value
26990	}
26991	return json.Marshal(objectMap)
26992}
26993
26994// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
26995// values.
26996type LocalNetworkGatewayListResultIterator struct {
26997	i    int
26998	page LocalNetworkGatewayListResultPage
26999}
27000
27001// NextWithContext advances to the next value.  If there was an error making
27002// the request the iterator does not advance and the error is returned.
27003func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
27004	if tracing.IsEnabled() {
27005		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
27006		defer func() {
27007			sc := -1
27008			if iter.Response().Response.Response != nil {
27009				sc = iter.Response().Response.Response.StatusCode
27010			}
27011			tracing.EndSpan(ctx, sc, err)
27012		}()
27013	}
27014	iter.i++
27015	if iter.i < len(iter.page.Values()) {
27016		return nil
27017	}
27018	err = iter.page.NextWithContext(ctx)
27019	if err != nil {
27020		iter.i--
27021		return err
27022	}
27023	iter.i = 0
27024	return nil
27025}
27026
27027// Next advances to the next value.  If there was an error making
27028// the request the iterator does not advance and the error is returned.
27029// Deprecated: Use NextWithContext() instead.
27030func (iter *LocalNetworkGatewayListResultIterator) Next() error {
27031	return iter.NextWithContext(context.Background())
27032}
27033
27034// NotDone returns true if the enumeration should be started or is not yet complete.
27035func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
27036	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27037}
27038
27039// Response returns the raw server response from the last page request.
27040func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
27041	return iter.page.Response()
27042}
27043
27044// Value returns the current value or a zero-initialized value if the
27045// iterator has advanced beyond the end of the collection.
27046func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
27047	if !iter.page.NotDone() {
27048		return LocalNetworkGateway{}
27049	}
27050	return iter.page.Values()[iter.i]
27051}
27052
27053// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
27054func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
27055	return LocalNetworkGatewayListResultIterator{page: page}
27056}
27057
27058// IsEmpty returns true if the ListResult contains no values.
27059func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
27060	return lnglr.Value == nil || len(*lnglr.Value) == 0
27061}
27062
27063// hasNextLink returns true if the NextLink is not empty.
27064func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
27065	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
27066}
27067
27068// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
27069// It returns nil if no more results exist.
27070func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
27071	if !lnglr.hasNextLink() {
27072		return nil, nil
27073	}
27074	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27075		autorest.AsJSON(),
27076		autorest.AsGet(),
27077		autorest.WithBaseURL(to.String(lnglr.NextLink)))
27078}
27079
27080// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
27081type LocalNetworkGatewayListResultPage struct {
27082	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
27083	lnglr LocalNetworkGatewayListResult
27084}
27085
27086// NextWithContext advances to the next page of values.  If there was an error making
27087// the request the page does not advance and the error is returned.
27088func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
27089	if tracing.IsEnabled() {
27090		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
27091		defer func() {
27092			sc := -1
27093			if page.Response().Response.Response != nil {
27094				sc = page.Response().Response.Response.StatusCode
27095			}
27096			tracing.EndSpan(ctx, sc, err)
27097		}()
27098	}
27099	for {
27100		next, err := page.fn(ctx, page.lnglr)
27101		if err != nil {
27102			return err
27103		}
27104		page.lnglr = next
27105		if !next.hasNextLink() || !next.IsEmpty() {
27106			break
27107		}
27108	}
27109	return nil
27110}
27111
27112// Next advances to the next page of values.  If there was an error making
27113// the request the page does not advance and the error is returned.
27114// Deprecated: Use NextWithContext() instead.
27115func (page *LocalNetworkGatewayListResultPage) Next() error {
27116	return page.NextWithContext(context.Background())
27117}
27118
27119// NotDone returns true if the page enumeration should be started or is not yet complete.
27120func (page LocalNetworkGatewayListResultPage) NotDone() bool {
27121	return !page.lnglr.IsEmpty()
27122}
27123
27124// Response returns the raw server response from the last page request.
27125func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
27126	return page.lnglr
27127}
27128
27129// Values returns the slice of values for the current page or nil if there are no values.
27130func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
27131	if page.lnglr.IsEmpty() {
27132		return nil
27133	}
27134	return *page.lnglr.Value
27135}
27136
27137// Creates a new instance of the LocalNetworkGatewayListResultPage type.
27138func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
27139	return LocalNetworkGatewayListResultPage{
27140		fn:    getNextPage,
27141		lnglr: cur,
27142	}
27143}
27144
27145// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties.
27146type LocalNetworkGatewayPropertiesFormat struct {
27147	// LocalNetworkAddressSpace - Local network site address space.
27148	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
27149	// GatewayIPAddress - IP address of local network gateway.
27150	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
27151	// Fqdn - FQDN of local network gateway.
27152	Fqdn *string `json:"fqdn,omitempty"`
27153	// BgpSettings - Local network gateway's BGP speaker settings.
27154	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
27155	// ResourceGUID - READ-ONLY; The resource GUID property of the local network gateway resource.
27156	ResourceGUID *string `json:"resourceGuid,omitempty"`
27157	// ProvisioningState - READ-ONLY; The provisioning state of the local network gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
27158	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27159}
27160
27161// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
27162func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
27163	objectMap := make(map[string]interface{})
27164	if lngpf.LocalNetworkAddressSpace != nil {
27165		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
27166	}
27167	if lngpf.GatewayIPAddress != nil {
27168		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
27169	}
27170	if lngpf.Fqdn != nil {
27171		objectMap["fqdn"] = lngpf.Fqdn
27172	}
27173	if lngpf.BgpSettings != nil {
27174		objectMap["bgpSettings"] = lngpf.BgpSettings
27175	}
27176	return json.Marshal(objectMap)
27177}
27178
27179// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
27180// long-running operation.
27181type LocalNetworkGatewaysCreateOrUpdateFuture struct {
27182	azure.FutureAPI
27183	// Result returns the result of the asynchronous operation.
27184	// If the operation has not completed it will return an error.
27185	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
27186}
27187
27188// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27189func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
27190	var azFuture azure.Future
27191	if err := json.Unmarshal(body, &azFuture); err != nil {
27192		return err
27193	}
27194	future.FutureAPI = &azFuture
27195	future.Result = future.result
27196	return nil
27197}
27198
27199// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result.
27200func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
27201	var done bool
27202	done, err = future.DoneWithContext(context.Background(), client)
27203	if err != nil {
27204		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
27205		return
27206	}
27207	if !done {
27208		lng.Response.Response = future.Response()
27209		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
27210		return
27211	}
27212	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27213	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
27214		lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
27215		if err != nil {
27216			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
27217		}
27218	}
27219	return
27220}
27221
27222// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
27223// long-running operation.
27224type LocalNetworkGatewaysDeleteFuture struct {
27225	azure.FutureAPI
27226	// Result returns the result of the asynchronous operation.
27227	// If the operation has not completed it will return an error.
27228	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
27229}
27230
27231// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27232func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
27233	var azFuture azure.Future
27234	if err := json.Unmarshal(body, &azFuture); err != nil {
27235		return err
27236	}
27237	future.FutureAPI = &azFuture
27238	future.Result = future.result
27239	return nil
27240}
27241
27242// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result.
27243func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
27244	var done bool
27245	done, err = future.DoneWithContext(context.Background(), client)
27246	if err != nil {
27247		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
27248		return
27249	}
27250	if !done {
27251		ar.Response = future.Response()
27252		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
27253		return
27254	}
27255	ar.Response = future.Response()
27256	return
27257}
27258
27259// LogSpecification description of logging specification.
27260type LogSpecification struct {
27261	// Name - The name of the specification.
27262	Name *string `json:"name,omitempty"`
27263	// DisplayName - The display name of the specification.
27264	DisplayName *string `json:"displayName,omitempty"`
27265	// BlobDuration - Duration of the blob.
27266	BlobDuration *string `json:"blobDuration,omitempty"`
27267}
27268
27269// ManagedRuleGroupOverride defines a managed rule group override setting.
27270type ManagedRuleGroupOverride struct {
27271	// RuleGroupName - The managed rule group to override.
27272	RuleGroupName *string `json:"ruleGroupName,omitempty"`
27273	// Rules - List of rules that will be disabled. If none specified, all rules in the group will be disabled.
27274	Rules *[]ManagedRuleOverride `json:"rules,omitempty"`
27275}
27276
27277// ManagedRuleOverride defines a managed rule group override setting.
27278type ManagedRuleOverride struct {
27279	// RuleID - Identifier for the managed rule.
27280	RuleID *string `json:"ruleId,omitempty"`
27281	// State - The state of the managed rule. Defaults to Disabled if not specified. Possible values include: 'ManagedRuleEnabledStateDisabled'
27282	State ManagedRuleEnabledState `json:"state,omitempty"`
27283}
27284
27285// ManagedRulesDefinition allow to exclude some variable satisfy the condition for the WAF check.
27286type ManagedRulesDefinition struct {
27287	// Exclusions - The Exclusions that are applied on the policy.
27288	Exclusions *[]OwaspCrsExclusionEntry `json:"exclusions,omitempty"`
27289	// ManagedRuleSets - The managed rule sets that are associated with the policy.
27290	ManagedRuleSets *[]ManagedRuleSet `json:"managedRuleSets,omitempty"`
27291}
27292
27293// ManagedRuleSet defines a managed rule set.
27294type ManagedRuleSet struct {
27295	// RuleSetType - Defines the rule set type to use.
27296	RuleSetType *string `json:"ruleSetType,omitempty"`
27297	// RuleSetVersion - Defines the version of the rule set to use.
27298	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
27299	// RuleGroupOverrides - Defines the rule group overrides to apply to the rule set.
27300	RuleGroupOverrides *[]ManagedRuleGroupOverride `json:"ruleGroupOverrides,omitempty"`
27301}
27302
27303// ManagedServiceIdentity identity for the resource.
27304type ManagedServiceIdentity struct {
27305	// PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
27306	PrincipalID *string `json:"principalId,omitempty"`
27307	// TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
27308	TenantID *string `json:"tenantId,omitempty"`
27309	// 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'
27310	Type ResourceIdentityType `json:"type,omitempty"`
27311	// 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}'.
27312	UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
27313}
27314
27315// MarshalJSON is the custom marshaler for ManagedServiceIdentity.
27316func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
27317	objectMap := make(map[string]interface{})
27318	if msi.Type != "" {
27319		objectMap["type"] = msi.Type
27320	}
27321	if msi.UserAssignedIdentities != nil {
27322		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
27323	}
27324	return json.Marshal(objectMap)
27325}
27326
27327// ManagedServiceIdentityUserAssignedIdentitiesValue ...
27328type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
27329	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
27330	PrincipalID *string `json:"principalId,omitempty"`
27331	// ClientID - READ-ONLY; The client id of user assigned identity.
27332	ClientID *string `json:"clientId,omitempty"`
27333}
27334
27335// MarshalJSON is the custom marshaler for ManagedServiceIdentityUserAssignedIdentitiesValue.
27336func (msiAiv ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
27337	objectMap := make(map[string]interface{})
27338	return json.Marshal(objectMap)
27339}
27340
27341// MatchCondition define match conditions.
27342type MatchCondition struct {
27343	// MatchVariables - List of match variables.
27344	MatchVariables *[]MatchVariable `json:"matchVariables,omitempty"`
27345	// Operator - The operator to be matched. Possible values include: 'WebApplicationFirewallOperatorIPMatch', 'WebApplicationFirewallOperatorEqual', 'WebApplicationFirewallOperatorContains', 'WebApplicationFirewallOperatorLessThan', 'WebApplicationFirewallOperatorGreaterThan', 'WebApplicationFirewallOperatorLessThanOrEqual', 'WebApplicationFirewallOperatorGreaterThanOrEqual', 'WebApplicationFirewallOperatorBeginsWith', 'WebApplicationFirewallOperatorEndsWith', 'WebApplicationFirewallOperatorRegex', 'WebApplicationFirewallOperatorGeoMatch'
27346	Operator WebApplicationFirewallOperator `json:"operator,omitempty"`
27347	// NegationConditon - Whether this is negate condition or not.
27348	NegationConditon *bool `json:"negationConditon,omitempty"`
27349	// MatchValues - Match value.
27350	MatchValues *[]string `json:"matchValues,omitempty"`
27351	// Transforms - List of transforms.
27352	Transforms *[]WebApplicationFirewallTransform `json:"transforms,omitempty"`
27353}
27354
27355// MatchedRule matched rule.
27356type MatchedRule struct {
27357	// RuleName - Name of the matched network security rule.
27358	RuleName *string `json:"ruleName,omitempty"`
27359	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
27360	Action *string `json:"action,omitempty"`
27361}
27362
27363// MatchVariable define match variables.
27364type MatchVariable struct {
27365	// VariableName - Match Variable. Possible values include: 'WebApplicationFirewallMatchVariableRemoteAddr', 'WebApplicationFirewallMatchVariableRequestMethod', 'WebApplicationFirewallMatchVariableQueryString', 'WebApplicationFirewallMatchVariablePostArgs', 'WebApplicationFirewallMatchVariableRequestURI', 'WebApplicationFirewallMatchVariableRequestHeaders', 'WebApplicationFirewallMatchVariableRequestBody', 'WebApplicationFirewallMatchVariableRequestCookies'
27366	VariableName WebApplicationFirewallMatchVariable `json:"variableName,omitempty"`
27367	// Selector - The selector of match variable.
27368	Selector *string `json:"selector,omitempty"`
27369}
27370
27371// MetricSpecification description of metrics specification.
27372type MetricSpecification struct {
27373	// Name - The name of the metric.
27374	Name *string `json:"name,omitempty"`
27375	// DisplayName - The display name of the metric.
27376	DisplayName *string `json:"displayName,omitempty"`
27377	// DisplayDescription - The description of the metric.
27378	DisplayDescription *string `json:"displayDescription,omitempty"`
27379	// Unit - Units the metric to be displayed in.
27380	Unit *string `json:"unit,omitempty"`
27381	// AggregationType - The aggregation type.
27382	AggregationType *string `json:"aggregationType,omitempty"`
27383	// Availabilities - List of availability.
27384	Availabilities *[]Availability `json:"availabilities,omitempty"`
27385	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
27386	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
27387	// FillGapWithZero - Whether gaps would be filled with zeros.
27388	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
27389	// MetricFilterPattern - Pattern for the filter of the metric.
27390	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
27391	// Dimensions - List of dimensions.
27392	Dimensions *[]Dimension `json:"dimensions,omitempty"`
27393	// IsInternal - Whether the metric is internal.
27394	IsInternal *bool `json:"isInternal,omitempty"`
27395	// SourceMdmAccount - The source MDM account.
27396	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
27397	// SourceMdmNamespace - The source MDM namespace.
27398	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
27399	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
27400	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
27401}
27402
27403// NatGateway nat Gateway resource.
27404type NatGateway struct {
27405	autorest.Response `json:"-"`
27406	// Sku - The nat gateway SKU.
27407	Sku *NatGatewaySku `json:"sku,omitempty"`
27408	// NatGatewayPropertiesFormat - Nat Gateway properties.
27409	*NatGatewayPropertiesFormat `json:"properties,omitempty"`
27410	// Zones - A list of availability zones denoting the zone in which Nat Gateway should be deployed.
27411	Zones *[]string `json:"zones,omitempty"`
27412	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
27413	Etag *string `json:"etag,omitempty"`
27414	// ID - Resource ID.
27415	ID *string `json:"id,omitempty"`
27416	// Name - READ-ONLY; Resource name.
27417	Name *string `json:"name,omitempty"`
27418	// Type - READ-ONLY; Resource type.
27419	Type *string `json:"type,omitempty"`
27420	// Location - Resource location.
27421	Location *string `json:"location,omitempty"`
27422	// Tags - Resource tags.
27423	Tags map[string]*string `json:"tags"`
27424}
27425
27426// MarshalJSON is the custom marshaler for NatGateway.
27427func (ng NatGateway) MarshalJSON() ([]byte, error) {
27428	objectMap := make(map[string]interface{})
27429	if ng.Sku != nil {
27430		objectMap["sku"] = ng.Sku
27431	}
27432	if ng.NatGatewayPropertiesFormat != nil {
27433		objectMap["properties"] = ng.NatGatewayPropertiesFormat
27434	}
27435	if ng.Zones != nil {
27436		objectMap["zones"] = ng.Zones
27437	}
27438	if ng.ID != nil {
27439		objectMap["id"] = ng.ID
27440	}
27441	if ng.Location != nil {
27442		objectMap["location"] = ng.Location
27443	}
27444	if ng.Tags != nil {
27445		objectMap["tags"] = ng.Tags
27446	}
27447	return json.Marshal(objectMap)
27448}
27449
27450// UnmarshalJSON is the custom unmarshaler for NatGateway struct.
27451func (ng *NatGateway) UnmarshalJSON(body []byte) error {
27452	var m map[string]*json.RawMessage
27453	err := json.Unmarshal(body, &m)
27454	if err != nil {
27455		return err
27456	}
27457	for k, v := range m {
27458		switch k {
27459		case "sku":
27460			if v != nil {
27461				var sku NatGatewaySku
27462				err = json.Unmarshal(*v, &sku)
27463				if err != nil {
27464					return err
27465				}
27466				ng.Sku = &sku
27467			}
27468		case "properties":
27469			if v != nil {
27470				var natGatewayPropertiesFormat NatGatewayPropertiesFormat
27471				err = json.Unmarshal(*v, &natGatewayPropertiesFormat)
27472				if err != nil {
27473					return err
27474				}
27475				ng.NatGatewayPropertiesFormat = &natGatewayPropertiesFormat
27476			}
27477		case "zones":
27478			if v != nil {
27479				var zones []string
27480				err = json.Unmarshal(*v, &zones)
27481				if err != nil {
27482					return err
27483				}
27484				ng.Zones = &zones
27485			}
27486		case "etag":
27487			if v != nil {
27488				var etag string
27489				err = json.Unmarshal(*v, &etag)
27490				if err != nil {
27491					return err
27492				}
27493				ng.Etag = &etag
27494			}
27495		case "id":
27496			if v != nil {
27497				var ID string
27498				err = json.Unmarshal(*v, &ID)
27499				if err != nil {
27500					return err
27501				}
27502				ng.ID = &ID
27503			}
27504		case "name":
27505			if v != nil {
27506				var name string
27507				err = json.Unmarshal(*v, &name)
27508				if err != nil {
27509					return err
27510				}
27511				ng.Name = &name
27512			}
27513		case "type":
27514			if v != nil {
27515				var typeVar string
27516				err = json.Unmarshal(*v, &typeVar)
27517				if err != nil {
27518					return err
27519				}
27520				ng.Type = &typeVar
27521			}
27522		case "location":
27523			if v != nil {
27524				var location string
27525				err = json.Unmarshal(*v, &location)
27526				if err != nil {
27527					return err
27528				}
27529				ng.Location = &location
27530			}
27531		case "tags":
27532			if v != nil {
27533				var tags map[string]*string
27534				err = json.Unmarshal(*v, &tags)
27535				if err != nil {
27536					return err
27537				}
27538				ng.Tags = tags
27539			}
27540		}
27541	}
27542
27543	return nil
27544}
27545
27546// NatGatewayListResult response for ListNatGateways API service call.
27547type NatGatewayListResult struct {
27548	autorest.Response `json:"-"`
27549	// Value - A list of Nat Gateways that exists in a resource group.
27550	Value *[]NatGateway `json:"value,omitempty"`
27551	// NextLink - The URL to get the next set of results.
27552	NextLink *string `json:"nextLink,omitempty"`
27553}
27554
27555// NatGatewayListResultIterator provides access to a complete listing of NatGateway values.
27556type NatGatewayListResultIterator struct {
27557	i    int
27558	page NatGatewayListResultPage
27559}
27560
27561// NextWithContext advances to the next value.  If there was an error making
27562// the request the iterator does not advance and the error is returned.
27563func (iter *NatGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
27564	if tracing.IsEnabled() {
27565		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultIterator.NextWithContext")
27566		defer func() {
27567			sc := -1
27568			if iter.Response().Response.Response != nil {
27569				sc = iter.Response().Response.Response.StatusCode
27570			}
27571			tracing.EndSpan(ctx, sc, err)
27572		}()
27573	}
27574	iter.i++
27575	if iter.i < len(iter.page.Values()) {
27576		return nil
27577	}
27578	err = iter.page.NextWithContext(ctx)
27579	if err != nil {
27580		iter.i--
27581		return err
27582	}
27583	iter.i = 0
27584	return nil
27585}
27586
27587// Next advances to the next value.  If there was an error making
27588// the request the iterator does not advance and the error is returned.
27589// Deprecated: Use NextWithContext() instead.
27590func (iter *NatGatewayListResultIterator) Next() error {
27591	return iter.NextWithContext(context.Background())
27592}
27593
27594// NotDone returns true if the enumeration should be started or is not yet complete.
27595func (iter NatGatewayListResultIterator) NotDone() bool {
27596	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27597}
27598
27599// Response returns the raw server response from the last page request.
27600func (iter NatGatewayListResultIterator) Response() NatGatewayListResult {
27601	return iter.page.Response()
27602}
27603
27604// Value returns the current value or a zero-initialized value if the
27605// iterator has advanced beyond the end of the collection.
27606func (iter NatGatewayListResultIterator) Value() NatGateway {
27607	if !iter.page.NotDone() {
27608		return NatGateway{}
27609	}
27610	return iter.page.Values()[iter.i]
27611}
27612
27613// Creates a new instance of the NatGatewayListResultIterator type.
27614func NewNatGatewayListResultIterator(page NatGatewayListResultPage) NatGatewayListResultIterator {
27615	return NatGatewayListResultIterator{page: page}
27616}
27617
27618// IsEmpty returns true if the ListResult contains no values.
27619func (nglr NatGatewayListResult) IsEmpty() bool {
27620	return nglr.Value == nil || len(*nglr.Value) == 0
27621}
27622
27623// hasNextLink returns true if the NextLink is not empty.
27624func (nglr NatGatewayListResult) hasNextLink() bool {
27625	return nglr.NextLink != nil && len(*nglr.NextLink) != 0
27626}
27627
27628// natGatewayListResultPreparer prepares a request to retrieve the next set of results.
27629// It returns nil if no more results exist.
27630func (nglr NatGatewayListResult) natGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
27631	if !nglr.hasNextLink() {
27632		return nil, nil
27633	}
27634	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27635		autorest.AsJSON(),
27636		autorest.AsGet(),
27637		autorest.WithBaseURL(to.String(nglr.NextLink)))
27638}
27639
27640// NatGatewayListResultPage contains a page of NatGateway values.
27641type NatGatewayListResultPage struct {
27642	fn   func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)
27643	nglr NatGatewayListResult
27644}
27645
27646// NextWithContext advances to the next page of values.  If there was an error making
27647// the request the page does not advance and the error is returned.
27648func (page *NatGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
27649	if tracing.IsEnabled() {
27650		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultPage.NextWithContext")
27651		defer func() {
27652			sc := -1
27653			if page.Response().Response.Response != nil {
27654				sc = page.Response().Response.Response.StatusCode
27655			}
27656			tracing.EndSpan(ctx, sc, err)
27657		}()
27658	}
27659	for {
27660		next, err := page.fn(ctx, page.nglr)
27661		if err != nil {
27662			return err
27663		}
27664		page.nglr = next
27665		if !next.hasNextLink() || !next.IsEmpty() {
27666			break
27667		}
27668	}
27669	return nil
27670}
27671
27672// Next advances to the next page of values.  If there was an error making
27673// the request the page does not advance and the error is returned.
27674// Deprecated: Use NextWithContext() instead.
27675func (page *NatGatewayListResultPage) Next() error {
27676	return page.NextWithContext(context.Background())
27677}
27678
27679// NotDone returns true if the page enumeration should be started or is not yet complete.
27680func (page NatGatewayListResultPage) NotDone() bool {
27681	return !page.nglr.IsEmpty()
27682}
27683
27684// Response returns the raw server response from the last page request.
27685func (page NatGatewayListResultPage) Response() NatGatewayListResult {
27686	return page.nglr
27687}
27688
27689// Values returns the slice of values for the current page or nil if there are no values.
27690func (page NatGatewayListResultPage) Values() []NatGateway {
27691	if page.nglr.IsEmpty() {
27692		return nil
27693	}
27694	return *page.nglr.Value
27695}
27696
27697// Creates a new instance of the NatGatewayListResultPage type.
27698func NewNatGatewayListResultPage(cur NatGatewayListResult, getNextPage func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)) NatGatewayListResultPage {
27699	return NatGatewayListResultPage{
27700		fn:   getNextPage,
27701		nglr: cur,
27702	}
27703}
27704
27705// NatGatewayPropertiesFormat nat Gateway properties.
27706type NatGatewayPropertiesFormat struct {
27707	// IdleTimeoutInMinutes - The idle timeout of the nat gateway.
27708	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
27709	// PublicIPAddresses - An array of public ip addresses associated with the nat gateway resource.
27710	PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"`
27711	// PublicIPPrefixes - An array of public ip prefixes associated with the nat gateway resource.
27712	PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"`
27713	// Subnets - READ-ONLY; An array of references to the subnets using this nat gateway resource.
27714	Subnets *[]SubResource `json:"subnets,omitempty"`
27715	// ResourceGUID - READ-ONLY; The resource GUID property of the NAT gateway resource.
27716	ResourceGUID *string `json:"resourceGuid,omitempty"`
27717	// ProvisioningState - READ-ONLY; The provisioning state of the NAT gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
27718	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27719}
27720
27721// MarshalJSON is the custom marshaler for NatGatewayPropertiesFormat.
27722func (ngpf NatGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
27723	objectMap := make(map[string]interface{})
27724	if ngpf.IdleTimeoutInMinutes != nil {
27725		objectMap["idleTimeoutInMinutes"] = ngpf.IdleTimeoutInMinutes
27726	}
27727	if ngpf.PublicIPAddresses != nil {
27728		objectMap["publicIpAddresses"] = ngpf.PublicIPAddresses
27729	}
27730	if ngpf.PublicIPPrefixes != nil {
27731		objectMap["publicIpPrefixes"] = ngpf.PublicIPPrefixes
27732	}
27733	return json.Marshal(objectMap)
27734}
27735
27736// NatGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
27737// long-running operation.
27738type NatGatewaysCreateOrUpdateFuture struct {
27739	azure.FutureAPI
27740	// Result returns the result of the asynchronous operation.
27741	// If the operation has not completed it will return an error.
27742	Result func(NatGatewaysClient) (NatGateway, error)
27743}
27744
27745// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27746func (future *NatGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
27747	var azFuture azure.Future
27748	if err := json.Unmarshal(body, &azFuture); err != nil {
27749		return err
27750	}
27751	future.FutureAPI = &azFuture
27752	future.Result = future.result
27753	return nil
27754}
27755
27756// result is the default implementation for NatGatewaysCreateOrUpdateFuture.Result.
27757func (future *NatGatewaysCreateOrUpdateFuture) result(client NatGatewaysClient) (ng NatGateway, err error) {
27758	var done bool
27759	done, err = future.DoneWithContext(context.Background(), client)
27760	if err != nil {
27761		err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
27762		return
27763	}
27764	if !done {
27765		ng.Response.Response = future.Response()
27766		err = azure.NewAsyncOpIncompleteError("network.NatGatewaysCreateOrUpdateFuture")
27767		return
27768	}
27769	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27770	if ng.Response.Response, err = future.GetResult(sender); err == nil && ng.Response.Response.StatusCode != http.StatusNoContent {
27771		ng, err = client.CreateOrUpdateResponder(ng.Response.Response)
27772		if err != nil {
27773			err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", ng.Response.Response, "Failure responding to request")
27774		}
27775	}
27776	return
27777}
27778
27779// NatGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
27780// operation.
27781type NatGatewaysDeleteFuture struct {
27782	azure.FutureAPI
27783	// Result returns the result of the asynchronous operation.
27784	// If the operation has not completed it will return an error.
27785	Result func(NatGatewaysClient) (autorest.Response, error)
27786}
27787
27788// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27789func (future *NatGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
27790	var azFuture azure.Future
27791	if err := json.Unmarshal(body, &azFuture); err != nil {
27792		return err
27793	}
27794	future.FutureAPI = &azFuture
27795	future.Result = future.result
27796	return nil
27797}
27798
27799// result is the default implementation for NatGatewaysDeleteFuture.Result.
27800func (future *NatGatewaysDeleteFuture) result(client NatGatewaysClient) (ar autorest.Response, err error) {
27801	var done bool
27802	done, err = future.DoneWithContext(context.Background(), client)
27803	if err != nil {
27804		err = autorest.NewErrorWithError(err, "network.NatGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
27805		return
27806	}
27807	if !done {
27808		ar.Response = future.Response()
27809		err = azure.NewAsyncOpIncompleteError("network.NatGatewaysDeleteFuture")
27810		return
27811	}
27812	ar.Response = future.Response()
27813	return
27814}
27815
27816// NatGatewaySku SKU of nat gateway.
27817type NatGatewaySku struct {
27818	// Name - Name of Nat Gateway SKU. Possible values include: 'NatGatewaySkuNameStandard'
27819	Name NatGatewaySkuName `json:"name,omitempty"`
27820}
27821
27822// NatRule rule of type nat.
27823type NatRule struct {
27824	// IPProtocols - Array of FirewallPolicyRuleNetworkProtocols.
27825	IPProtocols *[]FirewallPolicyRuleNetworkProtocol `json:"ipProtocols,omitempty"`
27826	// SourceAddresses - List of source IP addresses for this rule.
27827	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
27828	// DestinationAddresses - List of destination IP addresses or Service Tags.
27829	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
27830	// DestinationPorts - List of destination ports.
27831	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
27832	// TranslatedAddress - The translated address for this NAT rule.
27833	TranslatedAddress *string `json:"translatedAddress,omitempty"`
27834	// TranslatedPort - The translated port for this NAT rule.
27835	TranslatedPort *string `json:"translatedPort,omitempty"`
27836	// SourceIPGroups - List of source IpGroups for this rule.
27837	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
27838	// TranslatedFqdn - The translated FQDN for this NAT rule.
27839	TranslatedFqdn *string `json:"translatedFqdn,omitempty"`
27840	// Name - Name of the rule.
27841	Name *string `json:"name,omitempty"`
27842	// Description - Description of the rule.
27843	Description *string `json:"description,omitempty"`
27844	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule'
27845	RuleType RuleType `json:"ruleType,omitempty"`
27846}
27847
27848// MarshalJSON is the custom marshaler for NatRule.
27849func (nr NatRule) MarshalJSON() ([]byte, error) {
27850	nr.RuleType = RuleTypeNatRule
27851	objectMap := make(map[string]interface{})
27852	if nr.IPProtocols != nil {
27853		objectMap["ipProtocols"] = nr.IPProtocols
27854	}
27855	if nr.SourceAddresses != nil {
27856		objectMap["sourceAddresses"] = nr.SourceAddresses
27857	}
27858	if nr.DestinationAddresses != nil {
27859		objectMap["destinationAddresses"] = nr.DestinationAddresses
27860	}
27861	if nr.DestinationPorts != nil {
27862		objectMap["destinationPorts"] = nr.DestinationPorts
27863	}
27864	if nr.TranslatedAddress != nil {
27865		objectMap["translatedAddress"] = nr.TranslatedAddress
27866	}
27867	if nr.TranslatedPort != nil {
27868		objectMap["translatedPort"] = nr.TranslatedPort
27869	}
27870	if nr.SourceIPGroups != nil {
27871		objectMap["sourceIpGroups"] = nr.SourceIPGroups
27872	}
27873	if nr.TranslatedFqdn != nil {
27874		objectMap["translatedFqdn"] = nr.TranslatedFqdn
27875	}
27876	if nr.Name != nil {
27877		objectMap["name"] = nr.Name
27878	}
27879	if nr.Description != nil {
27880		objectMap["description"] = nr.Description
27881	}
27882	if nr.RuleType != "" {
27883		objectMap["ruleType"] = nr.RuleType
27884	}
27885	return json.Marshal(objectMap)
27886}
27887
27888// AsApplicationRule is the BasicFirewallPolicyRule implementation for NatRule.
27889func (nr NatRule) AsApplicationRule() (*ApplicationRule, bool) {
27890	return nil, false
27891}
27892
27893// AsNatRule is the BasicFirewallPolicyRule implementation for NatRule.
27894func (nr NatRule) AsNatRule() (*NatRule, bool) {
27895	return &nr, true
27896}
27897
27898// AsRule is the BasicFirewallPolicyRule implementation for NatRule.
27899func (nr NatRule) AsRule() (*Rule, bool) {
27900	return nil, false
27901}
27902
27903// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for NatRule.
27904func (nr NatRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
27905	return nil, false
27906}
27907
27908// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for NatRule.
27909func (nr NatRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
27910	return &nr, true
27911}
27912
27913// NatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
27914// operation.
27915type NatRulesCreateOrUpdateFuture struct {
27916	azure.FutureAPI
27917	// Result returns the result of the asynchronous operation.
27918	// If the operation has not completed it will return an error.
27919	Result func(NatRulesClient) (VpnGatewayNatRule, error)
27920}
27921
27922// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27923func (future *NatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
27924	var azFuture azure.Future
27925	if err := json.Unmarshal(body, &azFuture); err != nil {
27926		return err
27927	}
27928	future.FutureAPI = &azFuture
27929	future.Result = future.result
27930	return nil
27931}
27932
27933// result is the default implementation for NatRulesCreateOrUpdateFuture.Result.
27934func (future *NatRulesCreateOrUpdateFuture) result(client NatRulesClient) (vgnr VpnGatewayNatRule, err error) {
27935	var done bool
27936	done, err = future.DoneWithContext(context.Background(), client)
27937	if err != nil {
27938		err = autorest.NewErrorWithError(err, "network.NatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
27939		return
27940	}
27941	if !done {
27942		vgnr.Response.Response = future.Response()
27943		err = azure.NewAsyncOpIncompleteError("network.NatRulesCreateOrUpdateFuture")
27944		return
27945	}
27946	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27947	if vgnr.Response.Response, err = future.GetResult(sender); err == nil && vgnr.Response.Response.StatusCode != http.StatusNoContent {
27948		vgnr, err = client.CreateOrUpdateResponder(vgnr.Response.Response)
27949		if err != nil {
27950			err = autorest.NewErrorWithError(err, "network.NatRulesCreateOrUpdateFuture", "Result", vgnr.Response.Response, "Failure responding to request")
27951		}
27952	}
27953	return
27954}
27955
27956// NatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
27957// operation.
27958type NatRulesDeleteFuture struct {
27959	azure.FutureAPI
27960	// Result returns the result of the asynchronous operation.
27961	// If the operation has not completed it will return an error.
27962	Result func(NatRulesClient) (autorest.Response, error)
27963}
27964
27965// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27966func (future *NatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
27967	var azFuture azure.Future
27968	if err := json.Unmarshal(body, &azFuture); err != nil {
27969		return err
27970	}
27971	future.FutureAPI = &azFuture
27972	future.Result = future.result
27973	return nil
27974}
27975
27976// result is the default implementation for NatRulesDeleteFuture.Result.
27977func (future *NatRulesDeleteFuture) result(client NatRulesClient) (ar autorest.Response, err error) {
27978	var done bool
27979	done, err = future.DoneWithContext(context.Background(), client)
27980	if err != nil {
27981		err = autorest.NewErrorWithError(err, "network.NatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
27982		return
27983	}
27984	if !done {
27985		ar.Response = future.Response()
27986		err = azure.NewAsyncOpIncompleteError("network.NatRulesDeleteFuture")
27987		return
27988	}
27989	ar.Response = future.Response()
27990	return
27991}
27992
27993// NextHopParameters parameters that define the source and destination endpoint.
27994type NextHopParameters struct {
27995	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
27996	TargetResourceID *string `json:"targetResourceId,omitempty"`
27997	// SourceIPAddress - The source IP address.
27998	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
27999	// DestinationIPAddress - The destination IP address.
28000	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
28001	// 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).
28002	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
28003}
28004
28005// NextHopResult the information about next hop from the specified VM.
28006type NextHopResult struct {
28007	autorest.Response `json:"-"`
28008	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
28009	NextHopType NextHopType `json:"nextHopType,omitempty"`
28010	// NextHopIPAddress - Next hop IP Address.
28011	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
28012	// 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'.
28013	RouteTableID *string `json:"routeTableId,omitempty"`
28014}
28015
28016// O365BreakOutCategoryPolicies office365 breakout categories.
28017type O365BreakOutCategoryPolicies struct {
28018	// Allow - Flag to control allow category.
28019	Allow *bool `json:"allow,omitempty"`
28020	// Optimize - Flag to control optimize category.
28021	Optimize *bool `json:"optimize,omitempty"`
28022	// Default - Flag to control default category.
28023	Default *bool `json:"default,omitempty"`
28024}
28025
28026// O365PolicyProperties the Office365 breakout policy.
28027type O365PolicyProperties struct {
28028	// BreakOutCategories - Office365 breakout categories.
28029	BreakOutCategories *O365BreakOutCategoryPolicies `json:"breakOutCategories,omitempty"`
28030}
28031
28032// Office365PolicyProperties network Virtual Appliance Sku Properties.
28033type Office365PolicyProperties struct {
28034	// BreakOutCategories - Office 365 breakout categories.
28035	BreakOutCategories *BreakOutCategoryPolicies `json:"breakOutCategories,omitempty"`
28036}
28037
28038// Operation network REST API operation definition.
28039type Operation struct {
28040	// Name - Operation name: {provider}/{resource}/{operation}.
28041	Name *string `json:"name,omitempty"`
28042	// Display - Display metadata associated with the operation.
28043	Display *OperationDisplay `json:"display,omitempty"`
28044	// Origin - Origin of the operation.
28045	Origin *string `json:"origin,omitempty"`
28046	// OperationPropertiesFormat - Operation properties format.
28047	*OperationPropertiesFormat `json:"properties,omitempty"`
28048}
28049
28050// MarshalJSON is the custom marshaler for Operation.
28051func (o Operation) MarshalJSON() ([]byte, error) {
28052	objectMap := make(map[string]interface{})
28053	if o.Name != nil {
28054		objectMap["name"] = o.Name
28055	}
28056	if o.Display != nil {
28057		objectMap["display"] = o.Display
28058	}
28059	if o.Origin != nil {
28060		objectMap["origin"] = o.Origin
28061	}
28062	if o.OperationPropertiesFormat != nil {
28063		objectMap["properties"] = o.OperationPropertiesFormat
28064	}
28065	return json.Marshal(objectMap)
28066}
28067
28068// UnmarshalJSON is the custom unmarshaler for Operation struct.
28069func (o *Operation) UnmarshalJSON(body []byte) error {
28070	var m map[string]*json.RawMessage
28071	err := json.Unmarshal(body, &m)
28072	if err != nil {
28073		return err
28074	}
28075	for k, v := range m {
28076		switch k {
28077		case "name":
28078			if v != nil {
28079				var name string
28080				err = json.Unmarshal(*v, &name)
28081				if err != nil {
28082					return err
28083				}
28084				o.Name = &name
28085			}
28086		case "display":
28087			if v != nil {
28088				var display OperationDisplay
28089				err = json.Unmarshal(*v, &display)
28090				if err != nil {
28091					return err
28092				}
28093				o.Display = &display
28094			}
28095		case "origin":
28096			if v != nil {
28097				var origin string
28098				err = json.Unmarshal(*v, &origin)
28099				if err != nil {
28100					return err
28101				}
28102				o.Origin = &origin
28103			}
28104		case "properties":
28105			if v != nil {
28106				var operationPropertiesFormat OperationPropertiesFormat
28107				err = json.Unmarshal(*v, &operationPropertiesFormat)
28108				if err != nil {
28109					return err
28110				}
28111				o.OperationPropertiesFormat = &operationPropertiesFormat
28112			}
28113		}
28114	}
28115
28116	return nil
28117}
28118
28119// OperationDisplay display metadata associated with the operation.
28120type OperationDisplay struct {
28121	// Provider - Service provider: Microsoft Network.
28122	Provider *string `json:"provider,omitempty"`
28123	// Resource - Resource on which the operation is performed.
28124	Resource *string `json:"resource,omitempty"`
28125	// Operation - Type of the operation: get, read, delete, etc.
28126	Operation *string `json:"operation,omitempty"`
28127	// Description - Description of the operation.
28128	Description *string `json:"description,omitempty"`
28129}
28130
28131// OperationListResult result of the request to list Network operations. It contains a list of operations
28132// and a URL link to get the next set of results.
28133type OperationListResult struct {
28134	autorest.Response `json:"-"`
28135	// Value - List of Network operations supported by the Network resource provider.
28136	Value *[]Operation `json:"value,omitempty"`
28137	// NextLink - URL to get the next set of operation list results if there are any.
28138	NextLink *string `json:"nextLink,omitempty"`
28139}
28140
28141// OperationListResultIterator provides access to a complete listing of Operation values.
28142type OperationListResultIterator struct {
28143	i    int
28144	page OperationListResultPage
28145}
28146
28147// NextWithContext advances to the next value.  If there was an error making
28148// the request the iterator does not advance and the error is returned.
28149func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
28150	if tracing.IsEnabled() {
28151		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
28152		defer func() {
28153			sc := -1
28154			if iter.Response().Response.Response != nil {
28155				sc = iter.Response().Response.Response.StatusCode
28156			}
28157			tracing.EndSpan(ctx, sc, err)
28158		}()
28159	}
28160	iter.i++
28161	if iter.i < len(iter.page.Values()) {
28162		return nil
28163	}
28164	err = iter.page.NextWithContext(ctx)
28165	if err != nil {
28166		iter.i--
28167		return err
28168	}
28169	iter.i = 0
28170	return nil
28171}
28172
28173// Next advances to the next value.  If there was an error making
28174// the request the iterator does not advance and the error is returned.
28175// Deprecated: Use NextWithContext() instead.
28176func (iter *OperationListResultIterator) Next() error {
28177	return iter.NextWithContext(context.Background())
28178}
28179
28180// NotDone returns true if the enumeration should be started or is not yet complete.
28181func (iter OperationListResultIterator) NotDone() bool {
28182	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28183}
28184
28185// Response returns the raw server response from the last page request.
28186func (iter OperationListResultIterator) Response() OperationListResult {
28187	return iter.page.Response()
28188}
28189
28190// Value returns the current value or a zero-initialized value if the
28191// iterator has advanced beyond the end of the collection.
28192func (iter OperationListResultIterator) Value() Operation {
28193	if !iter.page.NotDone() {
28194		return Operation{}
28195	}
28196	return iter.page.Values()[iter.i]
28197}
28198
28199// Creates a new instance of the OperationListResultIterator type.
28200func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
28201	return OperationListResultIterator{page: page}
28202}
28203
28204// IsEmpty returns true if the ListResult contains no values.
28205func (olr OperationListResult) IsEmpty() bool {
28206	return olr.Value == nil || len(*olr.Value) == 0
28207}
28208
28209// hasNextLink returns true if the NextLink is not empty.
28210func (olr OperationListResult) hasNextLink() bool {
28211	return olr.NextLink != nil && len(*olr.NextLink) != 0
28212}
28213
28214// operationListResultPreparer prepares a request to retrieve the next set of results.
28215// It returns nil if no more results exist.
28216func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
28217	if !olr.hasNextLink() {
28218		return nil, nil
28219	}
28220	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28221		autorest.AsJSON(),
28222		autorest.AsGet(),
28223		autorest.WithBaseURL(to.String(olr.NextLink)))
28224}
28225
28226// OperationListResultPage contains a page of Operation values.
28227type OperationListResultPage struct {
28228	fn  func(context.Context, OperationListResult) (OperationListResult, error)
28229	olr OperationListResult
28230}
28231
28232// NextWithContext advances to the next page of values.  If there was an error making
28233// the request the page does not advance and the error is returned.
28234func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
28235	if tracing.IsEnabled() {
28236		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
28237		defer func() {
28238			sc := -1
28239			if page.Response().Response.Response != nil {
28240				sc = page.Response().Response.Response.StatusCode
28241			}
28242			tracing.EndSpan(ctx, sc, err)
28243		}()
28244	}
28245	for {
28246		next, err := page.fn(ctx, page.olr)
28247		if err != nil {
28248			return err
28249		}
28250		page.olr = next
28251		if !next.hasNextLink() || !next.IsEmpty() {
28252			break
28253		}
28254	}
28255	return nil
28256}
28257
28258// Next advances to the next page of values.  If there was an error making
28259// the request the page does not advance and the error is returned.
28260// Deprecated: Use NextWithContext() instead.
28261func (page *OperationListResultPage) Next() error {
28262	return page.NextWithContext(context.Background())
28263}
28264
28265// NotDone returns true if the page enumeration should be started or is not yet complete.
28266func (page OperationListResultPage) NotDone() bool {
28267	return !page.olr.IsEmpty()
28268}
28269
28270// Response returns the raw server response from the last page request.
28271func (page OperationListResultPage) Response() OperationListResult {
28272	return page.olr
28273}
28274
28275// Values returns the slice of values for the current page or nil if there are no values.
28276func (page OperationListResultPage) Values() []Operation {
28277	if page.olr.IsEmpty() {
28278		return nil
28279	}
28280	return *page.olr.Value
28281}
28282
28283// Creates a new instance of the OperationListResultPage type.
28284func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
28285	return OperationListResultPage{
28286		fn:  getNextPage,
28287		olr: cur,
28288	}
28289}
28290
28291// OperationPropertiesFormat description of operation properties format.
28292type OperationPropertiesFormat struct {
28293	// ServiceSpecification - Specification of the service.
28294	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
28295}
28296
28297// OperationPropertiesFormatServiceSpecification specification of the service.
28298type OperationPropertiesFormatServiceSpecification struct {
28299	// MetricSpecifications - Operation service specification.
28300	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
28301	// LogSpecifications - Operation log specification.
28302	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
28303}
28304
28305// OutboundRule outbound rule of the load balancer.
28306type OutboundRule struct {
28307	autorest.Response `json:"-"`
28308	// OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
28309	*OutboundRulePropertiesFormat `json:"properties,omitempty"`
28310	// 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.
28311	Name *string `json:"name,omitempty"`
28312	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
28313	Etag *string `json:"etag,omitempty"`
28314	// Type - READ-ONLY; Type of the resource.
28315	Type *string `json:"type,omitempty"`
28316	// ID - Resource ID.
28317	ID *string `json:"id,omitempty"`
28318}
28319
28320// MarshalJSON is the custom marshaler for OutboundRule.
28321func (or OutboundRule) MarshalJSON() ([]byte, error) {
28322	objectMap := make(map[string]interface{})
28323	if or.OutboundRulePropertiesFormat != nil {
28324		objectMap["properties"] = or.OutboundRulePropertiesFormat
28325	}
28326	if or.Name != nil {
28327		objectMap["name"] = or.Name
28328	}
28329	if or.ID != nil {
28330		objectMap["id"] = or.ID
28331	}
28332	return json.Marshal(objectMap)
28333}
28334
28335// UnmarshalJSON is the custom unmarshaler for OutboundRule struct.
28336func (or *OutboundRule) UnmarshalJSON(body []byte) error {
28337	var m map[string]*json.RawMessage
28338	err := json.Unmarshal(body, &m)
28339	if err != nil {
28340		return err
28341	}
28342	for k, v := range m {
28343		switch k {
28344		case "properties":
28345			if v != nil {
28346				var outboundRulePropertiesFormat OutboundRulePropertiesFormat
28347				err = json.Unmarshal(*v, &outboundRulePropertiesFormat)
28348				if err != nil {
28349					return err
28350				}
28351				or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat
28352			}
28353		case "name":
28354			if v != nil {
28355				var name string
28356				err = json.Unmarshal(*v, &name)
28357				if err != nil {
28358					return err
28359				}
28360				or.Name = &name
28361			}
28362		case "etag":
28363			if v != nil {
28364				var etag string
28365				err = json.Unmarshal(*v, &etag)
28366				if err != nil {
28367					return err
28368				}
28369				or.Etag = &etag
28370			}
28371		case "type":
28372			if v != nil {
28373				var typeVar string
28374				err = json.Unmarshal(*v, &typeVar)
28375				if err != nil {
28376					return err
28377				}
28378				or.Type = &typeVar
28379			}
28380		case "id":
28381			if v != nil {
28382				var ID string
28383				err = json.Unmarshal(*v, &ID)
28384				if err != nil {
28385					return err
28386				}
28387				or.ID = &ID
28388			}
28389		}
28390	}
28391
28392	return nil
28393}
28394
28395// OutboundRulePropertiesFormat outbound rule of the load balancer.
28396type OutboundRulePropertiesFormat struct {
28397	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
28398	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
28399	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
28400	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
28401	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
28402	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
28403	// ProvisioningState - READ-ONLY; The provisioning state of the outbound rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
28404	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28405	// Protocol - The protocol for the outbound rule in load balancer. Possible values include: 'LoadBalancerOutboundRuleProtocolTCP', 'LoadBalancerOutboundRuleProtocolUDP', 'LoadBalancerOutboundRuleProtocolAll'
28406	Protocol LoadBalancerOutboundRuleProtocol `json:"protocol,omitempty"`
28407	// 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.
28408	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
28409	// IdleTimeoutInMinutes - The timeout for the TCP idle connection.
28410	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
28411}
28412
28413// MarshalJSON is the custom marshaler for OutboundRulePropertiesFormat.
28414func (orpf OutboundRulePropertiesFormat) MarshalJSON() ([]byte, error) {
28415	objectMap := make(map[string]interface{})
28416	if orpf.AllocatedOutboundPorts != nil {
28417		objectMap["allocatedOutboundPorts"] = orpf.AllocatedOutboundPorts
28418	}
28419	if orpf.FrontendIPConfigurations != nil {
28420		objectMap["frontendIPConfigurations"] = orpf.FrontendIPConfigurations
28421	}
28422	if orpf.BackendAddressPool != nil {
28423		objectMap["backendAddressPool"] = orpf.BackendAddressPool
28424	}
28425	if orpf.Protocol != "" {
28426		objectMap["protocol"] = orpf.Protocol
28427	}
28428	if orpf.EnableTCPReset != nil {
28429		objectMap["enableTcpReset"] = orpf.EnableTCPReset
28430	}
28431	if orpf.IdleTimeoutInMinutes != nil {
28432		objectMap["idleTimeoutInMinutes"] = orpf.IdleTimeoutInMinutes
28433	}
28434	return json.Marshal(objectMap)
28435}
28436
28437// OwaspCrsExclusionEntry allow to exclude some variable satisfy the condition for the WAF check.
28438type OwaspCrsExclusionEntry struct {
28439	// MatchVariable - The variable to be excluded. Possible values include: 'OwaspCrsExclusionEntryMatchVariableRequestHeaderNames', 'OwaspCrsExclusionEntryMatchVariableRequestCookieNames', 'OwaspCrsExclusionEntryMatchVariableRequestArgNames'
28440	MatchVariable OwaspCrsExclusionEntryMatchVariable `json:"matchVariable,omitempty"`
28441	// 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'
28442	SelectorMatchOperator OwaspCrsExclusionEntrySelectorMatchOperator `json:"selectorMatchOperator,omitempty"`
28443	// Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
28444	Selector *string `json:"selector,omitempty"`
28445}
28446
28447// P2SConnectionConfiguration p2SConnectionConfiguration Resource.
28448type P2SConnectionConfiguration struct {
28449	// P2SConnectionConfigurationProperties - Properties of the P2S connection configuration.
28450	*P2SConnectionConfigurationProperties `json:"properties,omitempty"`
28451	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
28452	Name *string `json:"name,omitempty"`
28453	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
28454	Etag *string `json:"etag,omitempty"`
28455	// ID - Resource ID.
28456	ID *string `json:"id,omitempty"`
28457}
28458
28459// MarshalJSON is the custom marshaler for P2SConnectionConfiguration.
28460func (pcc P2SConnectionConfiguration) MarshalJSON() ([]byte, error) {
28461	objectMap := make(map[string]interface{})
28462	if pcc.P2SConnectionConfigurationProperties != nil {
28463		objectMap["properties"] = pcc.P2SConnectionConfigurationProperties
28464	}
28465	if pcc.Name != nil {
28466		objectMap["name"] = pcc.Name
28467	}
28468	if pcc.ID != nil {
28469		objectMap["id"] = pcc.ID
28470	}
28471	return json.Marshal(objectMap)
28472}
28473
28474// UnmarshalJSON is the custom unmarshaler for P2SConnectionConfiguration struct.
28475func (pcc *P2SConnectionConfiguration) UnmarshalJSON(body []byte) error {
28476	var m map[string]*json.RawMessage
28477	err := json.Unmarshal(body, &m)
28478	if err != nil {
28479		return err
28480	}
28481	for k, v := range m {
28482		switch k {
28483		case "properties":
28484			if v != nil {
28485				var p2SConnectionConfigurationProperties P2SConnectionConfigurationProperties
28486				err = json.Unmarshal(*v, &p2SConnectionConfigurationProperties)
28487				if err != nil {
28488					return err
28489				}
28490				pcc.P2SConnectionConfigurationProperties = &p2SConnectionConfigurationProperties
28491			}
28492		case "name":
28493			if v != nil {
28494				var name string
28495				err = json.Unmarshal(*v, &name)
28496				if err != nil {
28497					return err
28498				}
28499				pcc.Name = &name
28500			}
28501		case "etag":
28502			if v != nil {
28503				var etag string
28504				err = json.Unmarshal(*v, &etag)
28505				if err != nil {
28506					return err
28507				}
28508				pcc.Etag = &etag
28509			}
28510		case "id":
28511			if v != nil {
28512				var ID string
28513				err = json.Unmarshal(*v, &ID)
28514				if err != nil {
28515					return err
28516				}
28517				pcc.ID = &ID
28518			}
28519		}
28520	}
28521
28522	return nil
28523}
28524
28525// P2SConnectionConfigurationProperties parameters for P2SConnectionConfiguration.
28526type P2SConnectionConfigurationProperties struct {
28527	// VpnClientAddressPool - The reference to the address space resource which represents Address space for P2S VpnClient.
28528	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
28529	// RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection.
28530	RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"`
28531	// EnableInternetSecurity - Flag indicating whether the enable internet security flag is turned on for the P2S Connections or not.
28532	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
28533	// ProvisioningState - READ-ONLY; The provisioning state of the P2SConnectionConfiguration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
28534	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28535}
28536
28537// MarshalJSON is the custom marshaler for P2SConnectionConfigurationProperties.
28538func (pccp P2SConnectionConfigurationProperties) MarshalJSON() ([]byte, error) {
28539	objectMap := make(map[string]interface{})
28540	if pccp.VpnClientAddressPool != nil {
28541		objectMap["vpnClientAddressPool"] = pccp.VpnClientAddressPool
28542	}
28543	if pccp.RoutingConfiguration != nil {
28544		objectMap["routingConfiguration"] = pccp.RoutingConfiguration
28545	}
28546	if pccp.EnableInternetSecurity != nil {
28547		objectMap["enableInternetSecurity"] = pccp.EnableInternetSecurity
28548	}
28549	return json.Marshal(objectMap)
28550}
28551
28552// P2SVpnConnectionHealth p2S Vpn connection detailed health written to sas url.
28553type P2SVpnConnectionHealth struct {
28554	autorest.Response `json:"-"`
28555	// SasURL - Returned sas url of the blob to which the p2s vpn connection detailed health will be written.
28556	SasURL *string `json:"sasUrl,omitempty"`
28557}
28558
28559// P2SVpnConnectionHealthRequest list of P2S Vpn connection health request.
28560type P2SVpnConnectionHealthRequest struct {
28561	// VpnUserNamesFilter - The list of p2s vpn user names whose p2s vpn connection detailed health to retrieve for.
28562	VpnUserNamesFilter *[]string `json:"vpnUserNamesFilter,omitempty"`
28563	// OutputBlobSasURL - The sas-url to download the P2S Vpn connection health detail.
28564	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
28565}
28566
28567// P2SVpnConnectionRequest list of p2s vpn connections to be disconnected.
28568type P2SVpnConnectionRequest struct {
28569	// VpnConnectionIds - List of p2s vpn connection Ids.
28570	VpnConnectionIds *[]string `json:"vpnConnectionIds,omitempty"`
28571}
28572
28573// P2SVpnGateway p2SVpnGateway Resource.
28574type P2SVpnGateway struct {
28575	autorest.Response `json:"-"`
28576	// P2SVpnGatewayProperties - Properties of the P2SVpnGateway.
28577	*P2SVpnGatewayProperties `json:"properties,omitempty"`
28578	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
28579	Etag *string `json:"etag,omitempty"`
28580	// ID - Resource ID.
28581	ID *string `json:"id,omitempty"`
28582	// Name - READ-ONLY; Resource name.
28583	Name *string `json:"name,omitempty"`
28584	// Type - READ-ONLY; Resource type.
28585	Type *string `json:"type,omitempty"`
28586	// Location - Resource location.
28587	Location *string `json:"location,omitempty"`
28588	// Tags - Resource tags.
28589	Tags map[string]*string `json:"tags"`
28590}
28591
28592// MarshalJSON is the custom marshaler for P2SVpnGateway.
28593func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) {
28594	objectMap := make(map[string]interface{})
28595	if pvg.P2SVpnGatewayProperties != nil {
28596		objectMap["properties"] = pvg.P2SVpnGatewayProperties
28597	}
28598	if pvg.ID != nil {
28599		objectMap["id"] = pvg.ID
28600	}
28601	if pvg.Location != nil {
28602		objectMap["location"] = pvg.Location
28603	}
28604	if pvg.Tags != nil {
28605		objectMap["tags"] = pvg.Tags
28606	}
28607	return json.Marshal(objectMap)
28608}
28609
28610// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct.
28611func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error {
28612	var m map[string]*json.RawMessage
28613	err := json.Unmarshal(body, &m)
28614	if err != nil {
28615		return err
28616	}
28617	for k, v := range m {
28618		switch k {
28619		case "properties":
28620			if v != nil {
28621				var p2SVpnGatewayProperties P2SVpnGatewayProperties
28622				err = json.Unmarshal(*v, &p2SVpnGatewayProperties)
28623				if err != nil {
28624					return err
28625				}
28626				pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties
28627			}
28628		case "etag":
28629			if v != nil {
28630				var etag string
28631				err = json.Unmarshal(*v, &etag)
28632				if err != nil {
28633					return err
28634				}
28635				pvg.Etag = &etag
28636			}
28637		case "id":
28638			if v != nil {
28639				var ID string
28640				err = json.Unmarshal(*v, &ID)
28641				if err != nil {
28642					return err
28643				}
28644				pvg.ID = &ID
28645			}
28646		case "name":
28647			if v != nil {
28648				var name string
28649				err = json.Unmarshal(*v, &name)
28650				if err != nil {
28651					return err
28652				}
28653				pvg.Name = &name
28654			}
28655		case "type":
28656			if v != nil {
28657				var typeVar string
28658				err = json.Unmarshal(*v, &typeVar)
28659				if err != nil {
28660					return err
28661				}
28662				pvg.Type = &typeVar
28663			}
28664		case "location":
28665			if v != nil {
28666				var location string
28667				err = json.Unmarshal(*v, &location)
28668				if err != nil {
28669					return err
28670				}
28671				pvg.Location = &location
28672			}
28673		case "tags":
28674			if v != nil {
28675				var tags map[string]*string
28676				err = json.Unmarshal(*v, &tags)
28677				if err != nil {
28678					return err
28679				}
28680				pvg.Tags = tags
28681			}
28682		}
28683	}
28684
28685	return nil
28686}
28687
28688// P2SVpnGatewayProperties parameters for P2SVpnGateway.
28689type P2SVpnGatewayProperties struct {
28690	// VirtualHub - The VirtualHub to which the gateway belongs.
28691	VirtualHub *SubResource `json:"virtualHub,omitempty"`
28692	// P2SConnectionConfigurations - List of all p2s connection configurations of the gateway.
28693	P2SConnectionConfigurations *[]P2SConnectionConfiguration `json:"p2SConnectionConfigurations,omitempty"`
28694	// ProvisioningState - READ-ONLY; The provisioning state of the P2S VPN gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
28695	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28696	// VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway.
28697	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
28698	// VpnServerConfiguration - The VpnServerConfiguration to which the p2sVpnGateway is attached to.
28699	VpnServerConfiguration *SubResource `json:"vpnServerConfiguration,omitempty"`
28700	// VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status.
28701	VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"`
28702	// CustomDNSServers - List of all customer specified DNS servers IP addresses.
28703	CustomDNSServers *[]string `json:"customDnsServers,omitempty"`
28704	// IsRoutingPreferenceInternet - Enable Routing Preference property for the Public IP Interface of the P2SVpnGateway.
28705	IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"`
28706}
28707
28708// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties.
28709func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) {
28710	objectMap := make(map[string]interface{})
28711	if pvgp.VirtualHub != nil {
28712		objectMap["virtualHub"] = pvgp.VirtualHub
28713	}
28714	if pvgp.P2SConnectionConfigurations != nil {
28715		objectMap["p2SConnectionConfigurations"] = pvgp.P2SConnectionConfigurations
28716	}
28717	if pvgp.VpnGatewayScaleUnit != nil {
28718		objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit
28719	}
28720	if pvgp.VpnServerConfiguration != nil {
28721		objectMap["vpnServerConfiguration"] = pvgp.VpnServerConfiguration
28722	}
28723	if pvgp.CustomDNSServers != nil {
28724		objectMap["customDnsServers"] = pvgp.CustomDNSServers
28725	}
28726	if pvgp.IsRoutingPreferenceInternet != nil {
28727		objectMap["isRoutingPreferenceInternet"] = pvgp.IsRoutingPreferenceInternet
28728	}
28729	return json.Marshal(objectMap)
28730}
28731
28732// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28733// long-running operation.
28734type P2sVpnGatewaysCreateOrUpdateFuture struct {
28735	azure.FutureAPI
28736	// Result returns the result of the asynchronous operation.
28737	// If the operation has not completed it will return an error.
28738	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
28739}
28740
28741// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28742func (future *P2sVpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28743	var azFuture azure.Future
28744	if err := json.Unmarshal(body, &azFuture); err != nil {
28745		return err
28746	}
28747	future.FutureAPI = &azFuture
28748	future.Result = future.result
28749	return nil
28750}
28751
28752// result is the default implementation for P2sVpnGatewaysCreateOrUpdateFuture.Result.
28753func (future *P2sVpnGatewaysCreateOrUpdateFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
28754	var done bool
28755	done, err = future.DoneWithContext(context.Background(), client)
28756	if err != nil {
28757		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28758		return
28759	}
28760	if !done {
28761		pvg.Response.Response = future.Response()
28762		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysCreateOrUpdateFuture")
28763		return
28764	}
28765	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28766	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
28767		pvg, err = client.CreateOrUpdateResponder(pvg.Response.Response)
28768		if err != nil {
28769			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", pvg.Response.Response, "Failure responding to request")
28770		}
28771	}
28772	return
28773}
28774
28775// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
28776// operation.
28777type P2sVpnGatewaysDeleteFuture struct {
28778	azure.FutureAPI
28779	// Result returns the result of the asynchronous operation.
28780	// If the operation has not completed it will return an error.
28781	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
28782}
28783
28784// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28785func (future *P2sVpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
28786	var azFuture azure.Future
28787	if err := json.Unmarshal(body, &azFuture); err != nil {
28788		return err
28789	}
28790	future.FutureAPI = &azFuture
28791	future.Result = future.result
28792	return nil
28793}
28794
28795// result is the default implementation for P2sVpnGatewaysDeleteFuture.Result.
28796func (future *P2sVpnGatewaysDeleteFuture) result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) {
28797	var done bool
28798	done, err = future.DoneWithContext(context.Background(), client)
28799	if err != nil {
28800		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
28801		return
28802	}
28803	if !done {
28804		ar.Response = future.Response()
28805		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDeleteFuture")
28806		return
28807	}
28808	ar.Response = future.Response()
28809	return
28810}
28811
28812// P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture an abstraction for monitoring and retrieving the results
28813// of a long-running operation.
28814type P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture struct {
28815	azure.FutureAPI
28816	// Result returns the result of the asynchronous operation.
28817	// If the operation has not completed it will return an error.
28818	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
28819}
28820
28821// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28822func (future *P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture) UnmarshalJSON(body []byte) error {
28823	var azFuture azure.Future
28824	if err := json.Unmarshal(body, &azFuture); err != nil {
28825		return err
28826	}
28827	future.FutureAPI = &azFuture
28828	future.Result = future.result
28829	return nil
28830}
28831
28832// result is the default implementation for P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture.Result.
28833func (future *P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture) result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) {
28834	var done bool
28835	done, err = future.DoneWithContext(context.Background(), client)
28836	if err != nil {
28837		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture", "Result", future.Response(), "Polling failure")
28838		return
28839	}
28840	if !done {
28841		ar.Response = future.Response()
28842		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture")
28843		return
28844	}
28845	ar.Response = future.Response()
28846	return
28847}
28848
28849// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
28850// long-running operation.
28851type P2sVpnGatewaysGenerateVpnProfileFuture struct {
28852	azure.FutureAPI
28853	// Result returns the result of the asynchronous operation.
28854	// If the operation has not completed it will return an error.
28855	Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error)
28856}
28857
28858// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28859func (future *P2sVpnGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
28860	var azFuture azure.Future
28861	if err := json.Unmarshal(body, &azFuture); err != nil {
28862		return err
28863	}
28864	future.FutureAPI = &azFuture
28865	future.Result = future.result
28866	return nil
28867}
28868
28869// result is the default implementation for P2sVpnGatewaysGenerateVpnProfileFuture.Result.
28870func (future *P2sVpnGatewaysGenerateVpnProfileFuture) result(client P2sVpnGatewaysClient) (vpr VpnProfileResponse, err error) {
28871	var done bool
28872	done, err = future.DoneWithContext(context.Background(), client)
28873	if err != nil {
28874		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
28875		return
28876	}
28877	if !done {
28878		vpr.Response.Response = future.Response()
28879		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGenerateVpnProfileFuture")
28880		return
28881	}
28882	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28883	if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent {
28884		vpr, err = client.GenerateVpnProfileResponder(vpr.Response.Response)
28885		if err != nil {
28886			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", vpr.Response.Response, "Failure responding to request")
28887		}
28888	}
28889	return
28890}
28891
28892// P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture an abstraction for monitoring and retrieving the
28893// results of a long-running operation.
28894type P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture struct {
28895	azure.FutureAPI
28896	// Result returns the result of the asynchronous operation.
28897	// If the operation has not completed it will return an error.
28898	Result func(P2sVpnGatewaysClient) (P2SVpnConnectionHealth, error)
28899}
28900
28901// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28902func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture) UnmarshalJSON(body []byte) error {
28903	var azFuture azure.Future
28904	if err := json.Unmarshal(body, &azFuture); err != nil {
28905		return err
28906	}
28907	future.FutureAPI = &azFuture
28908	future.Result = future.result
28909	return nil
28910}
28911
28912// result is the default implementation for P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture.Result.
28913func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture) result(client P2sVpnGatewaysClient) (pvch P2SVpnConnectionHealth, err error) {
28914	var done bool
28915	done, err = future.DoneWithContext(context.Background(), client)
28916	if err != nil {
28917		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture", "Result", future.Response(), "Polling failure")
28918		return
28919	}
28920	if !done {
28921		pvch.Response.Response = future.Response()
28922		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture")
28923		return
28924	}
28925	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28926	if pvch.Response.Response, err = future.GetResult(sender); err == nil && pvch.Response.Response.StatusCode != http.StatusNoContent {
28927		pvch, err = client.GetP2sVpnConnectionHealthDetailedResponder(pvch.Response.Response)
28928		if err != nil {
28929			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture", "Result", pvch.Response.Response, "Failure responding to request")
28930		}
28931	}
28932	return
28933}
28934
28935// P2sVpnGatewaysGetP2sVpnConnectionHealthFuture an abstraction for monitoring and retrieving the results
28936// of a long-running operation.
28937type P2sVpnGatewaysGetP2sVpnConnectionHealthFuture struct {
28938	azure.FutureAPI
28939	// Result returns the result of the asynchronous operation.
28940	// If the operation has not completed it will return an error.
28941	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
28942}
28943
28944// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28945func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) UnmarshalJSON(body []byte) error {
28946	var azFuture azure.Future
28947	if err := json.Unmarshal(body, &azFuture); err != nil {
28948		return err
28949	}
28950	future.FutureAPI = &azFuture
28951	future.Result = future.result
28952	return nil
28953}
28954
28955// result is the default implementation for P2sVpnGatewaysGetP2sVpnConnectionHealthFuture.Result.
28956func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
28957	var done bool
28958	done, err = future.DoneWithContext(context.Background(), client)
28959	if err != nil {
28960		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", future.Response(), "Polling failure")
28961		return
28962	}
28963	if !done {
28964		pvg.Response.Response = future.Response()
28965		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture")
28966		return
28967	}
28968	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28969	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
28970		pvg, err = client.GetP2sVpnConnectionHealthResponder(pvg.Response.Response)
28971		if err != nil {
28972			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", pvg.Response.Response, "Failure responding to request")
28973		}
28974	}
28975	return
28976}
28977
28978// P2SVpnGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running
28979// operation.
28980type P2SVpnGatewaysResetFuture struct {
28981	azure.FutureAPI
28982	// Result returns the result of the asynchronous operation.
28983	// If the operation has not completed it will return an error.
28984	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
28985}
28986
28987// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28988func (future *P2SVpnGatewaysResetFuture) UnmarshalJSON(body []byte) error {
28989	var azFuture azure.Future
28990	if err := json.Unmarshal(body, &azFuture); err != nil {
28991		return err
28992	}
28993	future.FutureAPI = &azFuture
28994	future.Result = future.result
28995	return nil
28996}
28997
28998// result is the default implementation for P2SVpnGatewaysResetFuture.Result.
28999func (future *P2SVpnGatewaysResetFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
29000	var done bool
29001	done, err = future.DoneWithContext(context.Background(), client)
29002	if err != nil {
29003		err = autorest.NewErrorWithError(err, "network.P2SVpnGatewaysResetFuture", "Result", future.Response(), "Polling failure")
29004		return
29005	}
29006	if !done {
29007		pvg.Response.Response = future.Response()
29008		err = azure.NewAsyncOpIncompleteError("network.P2SVpnGatewaysResetFuture")
29009		return
29010	}
29011	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29012	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
29013		pvg, err = client.ResetResponder(pvg.Response.Response)
29014		if err != nil {
29015			err = autorest.NewErrorWithError(err, "network.P2SVpnGatewaysResetFuture", "Result", pvg.Response.Response, "Failure responding to request")
29016		}
29017	}
29018	return
29019}
29020
29021// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
29022// long-running operation.
29023type P2sVpnGatewaysUpdateTagsFuture struct {
29024	azure.FutureAPI
29025	// Result returns the result of the asynchronous operation.
29026	// If the operation has not completed it will return an error.
29027	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
29028}
29029
29030// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29031func (future *P2sVpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
29032	var azFuture azure.Future
29033	if err := json.Unmarshal(body, &azFuture); err != nil {
29034		return err
29035	}
29036	future.FutureAPI = &azFuture
29037	future.Result = future.result
29038	return nil
29039}
29040
29041// result is the default implementation for P2sVpnGatewaysUpdateTagsFuture.Result.
29042func (future *P2sVpnGatewaysUpdateTagsFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
29043	var done bool
29044	done, err = future.DoneWithContext(context.Background(), client)
29045	if err != nil {
29046		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
29047		return
29048	}
29049	if !done {
29050		pvg.Response.Response = future.Response()
29051		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysUpdateTagsFuture")
29052		return
29053	}
29054	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29055	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
29056		pvg, err = client.UpdateTagsResponder(pvg.Response.Response)
29057		if err != nil {
29058			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", pvg.Response.Response, "Failure responding to request")
29059		}
29060	}
29061	return
29062}
29063
29064// P2SVpnProfileParameters vpn Client Parameters for package generation.
29065type P2SVpnProfileParameters struct {
29066	// AuthenticationMethod - VPN client authentication method. Possible values include: 'AuthenticationMethodEAPTLS', 'AuthenticationMethodEAPMSCHAPv2'
29067	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
29068}
29069
29070// PacketCapture parameters that define the create packet capture operation.
29071type PacketCapture struct {
29072	// PacketCaptureParameters - Properties of the packet capture.
29073	*PacketCaptureParameters `json:"properties,omitempty"`
29074}
29075
29076// MarshalJSON is the custom marshaler for PacketCapture.
29077func (pc PacketCapture) MarshalJSON() ([]byte, error) {
29078	objectMap := make(map[string]interface{})
29079	if pc.PacketCaptureParameters != nil {
29080		objectMap["properties"] = pc.PacketCaptureParameters
29081	}
29082	return json.Marshal(objectMap)
29083}
29084
29085// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
29086func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
29087	var m map[string]*json.RawMessage
29088	err := json.Unmarshal(body, &m)
29089	if err != nil {
29090		return err
29091	}
29092	for k, v := range m {
29093		switch k {
29094		case "properties":
29095			if v != nil {
29096				var packetCaptureParameters PacketCaptureParameters
29097				err = json.Unmarshal(*v, &packetCaptureParameters)
29098				if err != nil {
29099					return err
29100				}
29101				pc.PacketCaptureParameters = &packetCaptureParameters
29102			}
29103		}
29104	}
29105
29106	return nil
29107}
29108
29109// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
29110type PacketCaptureFilter struct {
29111	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
29112	Protocol PcProtocol `json:"protocol,omitempty"`
29113	// 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.
29114	LocalIPAddress *string `json:"localIPAddress,omitempty"`
29115	// 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.
29116	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
29117	// 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.
29118	LocalPort *string `json:"localPort,omitempty"`
29119	// 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.
29120	RemotePort *string `json:"remotePort,omitempty"`
29121}
29122
29123// PacketCaptureListResult list of packet capture sessions.
29124type PacketCaptureListResult struct {
29125	autorest.Response `json:"-"`
29126	// Value - Information about packet capture sessions.
29127	Value *[]PacketCaptureResult `json:"value,omitempty"`
29128}
29129
29130// PacketCaptureParameters parameters that define the create packet capture operation.
29131type PacketCaptureParameters struct {
29132	// Target - The ID of the targeted resource, only VM is currently supported.
29133	Target *string `json:"target,omitempty"`
29134	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
29135	BytesToCapturePerPacket *int64 `json:"bytesToCapturePerPacket,omitempty"`
29136	// TotalBytesPerSession - Maximum size of the capture output.
29137	TotalBytesPerSession *int64 `json:"totalBytesPerSession,omitempty"`
29138	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
29139	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
29140	// StorageLocation - The storage location for a packet capture session.
29141	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
29142	// Filters - A list of packet capture filters.
29143	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
29144}
29145
29146// PacketCaptureQueryStatusResult status of packet capture session.
29147type PacketCaptureQueryStatusResult struct {
29148	autorest.Response `json:"-"`
29149	// Name - The name of the packet capture resource.
29150	Name *string `json:"name,omitempty"`
29151	// ID - The ID of the packet capture resource.
29152	ID *string `json:"id,omitempty"`
29153	// CaptureStartTime - The start time of the packet capture session.
29154	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
29155	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
29156	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
29157	// StopReason - The reason the current packet capture session was stopped.
29158	StopReason *string `json:"stopReason,omitempty"`
29159	// PacketCaptureError - List of errors of packet capture session.
29160	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
29161}
29162
29163// PacketCaptureResult information about packet capture session.
29164type PacketCaptureResult struct {
29165	autorest.Response `json:"-"`
29166	// Name - READ-ONLY; Name of the packet capture session.
29167	Name *string `json:"name,omitempty"`
29168	// ID - READ-ONLY; ID of the packet capture operation.
29169	ID *string `json:"id,omitempty"`
29170	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29171	Etag *string `json:"etag,omitempty"`
29172	// PacketCaptureResultProperties - Properties of the packet capture result.
29173	*PacketCaptureResultProperties `json:"properties,omitempty"`
29174}
29175
29176// MarshalJSON is the custom marshaler for PacketCaptureResult.
29177func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
29178	objectMap := make(map[string]interface{})
29179	if pcr.PacketCaptureResultProperties != nil {
29180		objectMap["properties"] = pcr.PacketCaptureResultProperties
29181	}
29182	return json.Marshal(objectMap)
29183}
29184
29185// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
29186func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
29187	var m map[string]*json.RawMessage
29188	err := json.Unmarshal(body, &m)
29189	if err != nil {
29190		return err
29191	}
29192	for k, v := range m {
29193		switch k {
29194		case "name":
29195			if v != nil {
29196				var name string
29197				err = json.Unmarshal(*v, &name)
29198				if err != nil {
29199					return err
29200				}
29201				pcr.Name = &name
29202			}
29203		case "id":
29204			if v != nil {
29205				var ID string
29206				err = json.Unmarshal(*v, &ID)
29207				if err != nil {
29208					return err
29209				}
29210				pcr.ID = &ID
29211			}
29212		case "etag":
29213			if v != nil {
29214				var etag string
29215				err = json.Unmarshal(*v, &etag)
29216				if err != nil {
29217					return err
29218				}
29219				pcr.Etag = &etag
29220			}
29221		case "properties":
29222			if v != nil {
29223				var packetCaptureResultProperties PacketCaptureResultProperties
29224				err = json.Unmarshal(*v, &packetCaptureResultProperties)
29225				if err != nil {
29226					return err
29227				}
29228				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
29229			}
29230		}
29231	}
29232
29233	return nil
29234}
29235
29236// PacketCaptureResultProperties the properties of a packet capture session.
29237type PacketCaptureResultProperties struct {
29238	// ProvisioningState - READ-ONLY; The provisioning state of the packet capture session. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
29239	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29240	// Target - The ID of the targeted resource, only VM is currently supported.
29241	Target *string `json:"target,omitempty"`
29242	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
29243	BytesToCapturePerPacket *int64 `json:"bytesToCapturePerPacket,omitempty"`
29244	// TotalBytesPerSession - Maximum size of the capture output.
29245	TotalBytesPerSession *int64 `json:"totalBytesPerSession,omitempty"`
29246	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
29247	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
29248	// StorageLocation - The storage location for a packet capture session.
29249	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
29250	// Filters - A list of packet capture filters.
29251	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
29252}
29253
29254// MarshalJSON is the custom marshaler for PacketCaptureResultProperties.
29255func (pcrp PacketCaptureResultProperties) MarshalJSON() ([]byte, error) {
29256	objectMap := make(map[string]interface{})
29257	if pcrp.Target != nil {
29258		objectMap["target"] = pcrp.Target
29259	}
29260	if pcrp.BytesToCapturePerPacket != nil {
29261		objectMap["bytesToCapturePerPacket"] = pcrp.BytesToCapturePerPacket
29262	}
29263	if pcrp.TotalBytesPerSession != nil {
29264		objectMap["totalBytesPerSession"] = pcrp.TotalBytesPerSession
29265	}
29266	if pcrp.TimeLimitInSeconds != nil {
29267		objectMap["timeLimitInSeconds"] = pcrp.TimeLimitInSeconds
29268	}
29269	if pcrp.StorageLocation != nil {
29270		objectMap["storageLocation"] = pcrp.StorageLocation
29271	}
29272	if pcrp.Filters != nil {
29273		objectMap["filters"] = pcrp.Filters
29274	}
29275	return json.Marshal(objectMap)
29276}
29277
29278// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
29279// operation.
29280type PacketCapturesCreateFuture struct {
29281	azure.FutureAPI
29282	// Result returns the result of the asynchronous operation.
29283	// If the operation has not completed it will return an error.
29284	Result func(PacketCapturesClient) (PacketCaptureResult, error)
29285}
29286
29287// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29288func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error {
29289	var azFuture azure.Future
29290	if err := json.Unmarshal(body, &azFuture); err != nil {
29291		return err
29292	}
29293	future.FutureAPI = &azFuture
29294	future.Result = future.result
29295	return nil
29296}
29297
29298// result is the default implementation for PacketCapturesCreateFuture.Result.
29299func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
29300	var done bool
29301	done, err = future.DoneWithContext(context.Background(), client)
29302	if err != nil {
29303		err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
29304		return
29305	}
29306	if !done {
29307		pcr.Response.Response = future.Response()
29308		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
29309		return
29310	}
29311	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29312	if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
29313		pcr, err = client.CreateResponder(pcr.Response.Response)
29314		if err != nil {
29315			err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
29316		}
29317	}
29318	return
29319}
29320
29321// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29322// operation.
29323type PacketCapturesDeleteFuture struct {
29324	azure.FutureAPI
29325	// Result returns the result of the asynchronous operation.
29326	// If the operation has not completed it will return an error.
29327	Result func(PacketCapturesClient) (autorest.Response, error)
29328}
29329
29330// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29331func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error {
29332	var azFuture azure.Future
29333	if err := json.Unmarshal(body, &azFuture); err != nil {
29334		return err
29335	}
29336	future.FutureAPI = &azFuture
29337	future.Result = future.result
29338	return nil
29339}
29340
29341// result is the default implementation for PacketCapturesDeleteFuture.Result.
29342func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
29343	var done bool
29344	done, err = future.DoneWithContext(context.Background(), client)
29345	if err != nil {
29346		err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
29347		return
29348	}
29349	if !done {
29350		ar.Response = future.Response()
29351		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
29352		return
29353	}
29354	ar.Response = future.Response()
29355	return
29356}
29357
29358// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
29359// operation.
29360type PacketCapturesGetStatusFuture struct {
29361	azure.FutureAPI
29362	// Result returns the result of the asynchronous operation.
29363	// If the operation has not completed it will return an error.
29364	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
29365}
29366
29367// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29368func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error {
29369	var azFuture azure.Future
29370	if err := json.Unmarshal(body, &azFuture); err != nil {
29371		return err
29372	}
29373	future.FutureAPI = &azFuture
29374	future.Result = future.result
29375	return nil
29376}
29377
29378// result is the default implementation for PacketCapturesGetStatusFuture.Result.
29379func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
29380	var done bool
29381	done, err = future.DoneWithContext(context.Background(), client)
29382	if err != nil {
29383		err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
29384		return
29385	}
29386	if !done {
29387		pcqsr.Response.Response = future.Response()
29388		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
29389		return
29390	}
29391	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29392	if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
29393		pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
29394		if err != nil {
29395			err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
29396		}
29397	}
29398	return
29399}
29400
29401// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
29402// operation.
29403type PacketCapturesStopFuture struct {
29404	azure.FutureAPI
29405	// Result returns the result of the asynchronous operation.
29406	// If the operation has not completed it will return an error.
29407	Result func(PacketCapturesClient) (autorest.Response, error)
29408}
29409
29410// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29411func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error {
29412	var azFuture azure.Future
29413	if err := json.Unmarshal(body, &azFuture); err != nil {
29414		return err
29415	}
29416	future.FutureAPI = &azFuture
29417	future.Result = future.result
29418	return nil
29419}
29420
29421// result is the default implementation for PacketCapturesStopFuture.Result.
29422func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
29423	var done bool
29424	done, err = future.DoneWithContext(context.Background(), client)
29425	if err != nil {
29426		err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
29427		return
29428	}
29429	if !done {
29430		ar.Response = future.Response()
29431		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
29432		return
29433	}
29434	ar.Response = future.Response()
29435	return
29436}
29437
29438// PacketCaptureStorageLocation the storage location for a packet capture session.
29439type PacketCaptureStorageLocation struct {
29440	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
29441	StorageID *string `json:"storageId,omitempty"`
29442	// 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.
29443	StoragePath *string `json:"storagePath,omitempty"`
29444	// 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.
29445	FilePath *string `json:"filePath,omitempty"`
29446}
29447
29448// PatchRouteFilter route Filter Resource.
29449type PatchRouteFilter struct {
29450	// RouteFilterPropertiesFormat - Properties of the route filter.
29451	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
29452	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
29453	Name *string `json:"name,omitempty"`
29454	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29455	Etag *string `json:"etag,omitempty"`
29456	// Type - READ-ONLY; Resource type.
29457	Type *string `json:"type,omitempty"`
29458	// Tags - Resource tags.
29459	Tags map[string]*string `json:"tags"`
29460	// ID - Resource ID.
29461	ID *string `json:"id,omitempty"`
29462}
29463
29464// MarshalJSON is the custom marshaler for PatchRouteFilter.
29465func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
29466	objectMap := make(map[string]interface{})
29467	if prf.RouteFilterPropertiesFormat != nil {
29468		objectMap["properties"] = prf.RouteFilterPropertiesFormat
29469	}
29470	if prf.Tags != nil {
29471		objectMap["tags"] = prf.Tags
29472	}
29473	if prf.ID != nil {
29474		objectMap["id"] = prf.ID
29475	}
29476	return json.Marshal(objectMap)
29477}
29478
29479// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
29480func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
29481	var m map[string]*json.RawMessage
29482	err := json.Unmarshal(body, &m)
29483	if err != nil {
29484		return err
29485	}
29486	for k, v := range m {
29487		switch k {
29488		case "properties":
29489			if v != nil {
29490				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
29491				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
29492				if err != nil {
29493					return err
29494				}
29495				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
29496			}
29497		case "name":
29498			if v != nil {
29499				var name string
29500				err = json.Unmarshal(*v, &name)
29501				if err != nil {
29502					return err
29503				}
29504				prf.Name = &name
29505			}
29506		case "etag":
29507			if v != nil {
29508				var etag string
29509				err = json.Unmarshal(*v, &etag)
29510				if err != nil {
29511					return err
29512				}
29513				prf.Etag = &etag
29514			}
29515		case "type":
29516			if v != nil {
29517				var typeVar string
29518				err = json.Unmarshal(*v, &typeVar)
29519				if err != nil {
29520					return err
29521				}
29522				prf.Type = &typeVar
29523			}
29524		case "tags":
29525			if v != nil {
29526				var tags map[string]*string
29527				err = json.Unmarshal(*v, &tags)
29528				if err != nil {
29529					return err
29530				}
29531				prf.Tags = tags
29532			}
29533		case "id":
29534			if v != nil {
29535				var ID string
29536				err = json.Unmarshal(*v, &ID)
29537				if err != nil {
29538					return err
29539				}
29540				prf.ID = &ID
29541			}
29542		}
29543	}
29544
29545	return nil
29546}
29547
29548// PatchRouteFilterRule route Filter Rule Resource.
29549type PatchRouteFilterRule struct {
29550	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
29551	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
29552	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
29553	Name *string `json:"name,omitempty"`
29554	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29555	Etag *string `json:"etag,omitempty"`
29556	// ID - Resource ID.
29557	ID *string `json:"id,omitempty"`
29558}
29559
29560// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
29561func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
29562	objectMap := make(map[string]interface{})
29563	if prfr.RouteFilterRulePropertiesFormat != nil {
29564		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
29565	}
29566	if prfr.ID != nil {
29567		objectMap["id"] = prfr.ID
29568	}
29569	return json.Marshal(objectMap)
29570}
29571
29572// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
29573func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
29574	var m map[string]*json.RawMessage
29575	err := json.Unmarshal(body, &m)
29576	if err != nil {
29577		return err
29578	}
29579	for k, v := range m {
29580		switch k {
29581		case "properties":
29582			if v != nil {
29583				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
29584				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
29585				if err != nil {
29586					return err
29587				}
29588				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
29589			}
29590		case "name":
29591			if v != nil {
29592				var name string
29593				err = json.Unmarshal(*v, &name)
29594				if err != nil {
29595					return err
29596				}
29597				prfr.Name = &name
29598			}
29599		case "etag":
29600			if v != nil {
29601				var etag string
29602				err = json.Unmarshal(*v, &etag)
29603				if err != nil {
29604					return err
29605				}
29606				prfr.Etag = &etag
29607			}
29608		case "id":
29609			if v != nil {
29610				var ID string
29611				err = json.Unmarshal(*v, &ID)
29612				if err != nil {
29613					return err
29614				}
29615				prfr.ID = &ID
29616			}
29617		}
29618	}
29619
29620	return nil
29621}
29622
29623// PeerExpressRouteCircuitConnection peer Express Route Circuit Connection in an ExpressRouteCircuitPeering
29624// resource.
29625type PeerExpressRouteCircuitConnection struct {
29626	autorest.Response `json:"-"`
29627	// PeerExpressRouteCircuitConnectionPropertiesFormat - Properties of the peer express route circuit connection.
29628	*PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
29629	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29630	Name *string `json:"name,omitempty"`
29631	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29632	Etag *string `json:"etag,omitempty"`
29633	// Type - READ-ONLY; Type of the resource.
29634	Type *string `json:"type,omitempty"`
29635	// ID - Resource ID.
29636	ID *string `json:"id,omitempty"`
29637}
29638
29639// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnection.
29640func (percc PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
29641	objectMap := make(map[string]interface{})
29642	if percc.PeerExpressRouteCircuitConnectionPropertiesFormat != nil {
29643		objectMap["properties"] = percc.PeerExpressRouteCircuitConnectionPropertiesFormat
29644	}
29645	if percc.Name != nil {
29646		objectMap["name"] = percc.Name
29647	}
29648	if percc.ID != nil {
29649		objectMap["id"] = percc.ID
29650	}
29651	return json.Marshal(objectMap)
29652}
29653
29654// UnmarshalJSON is the custom unmarshaler for PeerExpressRouteCircuitConnection struct.
29655func (percc *PeerExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
29656	var m map[string]*json.RawMessage
29657	err := json.Unmarshal(body, &m)
29658	if err != nil {
29659		return err
29660	}
29661	for k, v := range m {
29662		switch k {
29663		case "properties":
29664			if v != nil {
29665				var peerExpressRouteCircuitConnectionPropertiesFormat PeerExpressRouteCircuitConnectionPropertiesFormat
29666				err = json.Unmarshal(*v, &peerExpressRouteCircuitConnectionPropertiesFormat)
29667				if err != nil {
29668					return err
29669				}
29670				percc.PeerExpressRouteCircuitConnectionPropertiesFormat = &peerExpressRouteCircuitConnectionPropertiesFormat
29671			}
29672		case "name":
29673			if v != nil {
29674				var name string
29675				err = json.Unmarshal(*v, &name)
29676				if err != nil {
29677					return err
29678				}
29679				percc.Name = &name
29680			}
29681		case "etag":
29682			if v != nil {
29683				var etag string
29684				err = json.Unmarshal(*v, &etag)
29685				if err != nil {
29686					return err
29687				}
29688				percc.Etag = &etag
29689			}
29690		case "type":
29691			if v != nil {
29692				var typeVar string
29693				err = json.Unmarshal(*v, &typeVar)
29694				if err != nil {
29695					return err
29696				}
29697				percc.Type = &typeVar
29698			}
29699		case "id":
29700			if v != nil {
29701				var ID string
29702				err = json.Unmarshal(*v, &ID)
29703				if err != nil {
29704					return err
29705				}
29706				percc.ID = &ID
29707			}
29708		}
29709	}
29710
29711	return nil
29712}
29713
29714// PeerExpressRouteCircuitConnectionListResult response for ListPeeredConnections API service call
29715// retrieves all global reach peer circuit connections that belongs to a Private Peering for an
29716// ExpressRouteCircuit.
29717type PeerExpressRouteCircuitConnectionListResult struct {
29718	autorest.Response `json:"-"`
29719	// Value - The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit.
29720	Value *[]PeerExpressRouteCircuitConnection `json:"value,omitempty"`
29721	// NextLink - The URL to get the next set of results.
29722	NextLink *string `json:"nextLink,omitempty"`
29723}
29724
29725// PeerExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
29726// PeerExpressRouteCircuitConnection values.
29727type PeerExpressRouteCircuitConnectionListResultIterator struct {
29728	i    int
29729	page PeerExpressRouteCircuitConnectionListResultPage
29730}
29731
29732// NextWithContext advances to the next value.  If there was an error making
29733// the request the iterator does not advance and the error is returned.
29734func (iter *PeerExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
29735	if tracing.IsEnabled() {
29736		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultIterator.NextWithContext")
29737		defer func() {
29738			sc := -1
29739			if iter.Response().Response.Response != nil {
29740				sc = iter.Response().Response.Response.StatusCode
29741			}
29742			tracing.EndSpan(ctx, sc, err)
29743		}()
29744	}
29745	iter.i++
29746	if iter.i < len(iter.page.Values()) {
29747		return nil
29748	}
29749	err = iter.page.NextWithContext(ctx)
29750	if err != nil {
29751		iter.i--
29752		return err
29753	}
29754	iter.i = 0
29755	return nil
29756}
29757
29758// Next advances to the next value.  If there was an error making
29759// the request the iterator does not advance and the error is returned.
29760// Deprecated: Use NextWithContext() instead.
29761func (iter *PeerExpressRouteCircuitConnectionListResultIterator) Next() error {
29762	return iter.NextWithContext(context.Background())
29763}
29764
29765// NotDone returns true if the enumeration should be started or is not yet complete.
29766func (iter PeerExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
29767	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29768}
29769
29770// Response returns the raw server response from the last page request.
29771func (iter PeerExpressRouteCircuitConnectionListResultIterator) Response() PeerExpressRouteCircuitConnectionListResult {
29772	return iter.page.Response()
29773}
29774
29775// Value returns the current value or a zero-initialized value if the
29776// iterator has advanced beyond the end of the collection.
29777func (iter PeerExpressRouteCircuitConnectionListResultIterator) Value() PeerExpressRouteCircuitConnection {
29778	if !iter.page.NotDone() {
29779		return PeerExpressRouteCircuitConnection{}
29780	}
29781	return iter.page.Values()[iter.i]
29782}
29783
29784// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultIterator type.
29785func NewPeerExpressRouteCircuitConnectionListResultIterator(page PeerExpressRouteCircuitConnectionListResultPage) PeerExpressRouteCircuitConnectionListResultIterator {
29786	return PeerExpressRouteCircuitConnectionListResultIterator{page: page}
29787}
29788
29789// IsEmpty returns true if the ListResult contains no values.
29790func (percclr PeerExpressRouteCircuitConnectionListResult) IsEmpty() bool {
29791	return percclr.Value == nil || len(*percclr.Value) == 0
29792}
29793
29794// hasNextLink returns true if the NextLink is not empty.
29795func (percclr PeerExpressRouteCircuitConnectionListResult) hasNextLink() bool {
29796	return percclr.NextLink != nil && len(*percclr.NextLink) != 0
29797}
29798
29799// peerExpressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
29800// It returns nil if no more results exist.
29801func (percclr PeerExpressRouteCircuitConnectionListResult) peerExpressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
29802	if !percclr.hasNextLink() {
29803		return nil, nil
29804	}
29805	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29806		autorest.AsJSON(),
29807		autorest.AsGet(),
29808		autorest.WithBaseURL(to.String(percclr.NextLink)))
29809}
29810
29811// PeerExpressRouteCircuitConnectionListResultPage contains a page of PeerExpressRouteCircuitConnection
29812// values.
29813type PeerExpressRouteCircuitConnectionListResultPage struct {
29814	fn      func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)
29815	percclr PeerExpressRouteCircuitConnectionListResult
29816}
29817
29818// NextWithContext advances to the next page of values.  If there was an error making
29819// the request the page does not advance and the error is returned.
29820func (page *PeerExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
29821	if tracing.IsEnabled() {
29822		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultPage.NextWithContext")
29823		defer func() {
29824			sc := -1
29825			if page.Response().Response.Response != nil {
29826				sc = page.Response().Response.Response.StatusCode
29827			}
29828			tracing.EndSpan(ctx, sc, err)
29829		}()
29830	}
29831	for {
29832		next, err := page.fn(ctx, page.percclr)
29833		if err != nil {
29834			return err
29835		}
29836		page.percclr = next
29837		if !next.hasNextLink() || !next.IsEmpty() {
29838			break
29839		}
29840	}
29841	return nil
29842}
29843
29844// Next advances to the next page of values.  If there was an error making
29845// the request the page does not advance and the error is returned.
29846// Deprecated: Use NextWithContext() instead.
29847func (page *PeerExpressRouteCircuitConnectionListResultPage) Next() error {
29848	return page.NextWithContext(context.Background())
29849}
29850
29851// NotDone returns true if the page enumeration should be started or is not yet complete.
29852func (page PeerExpressRouteCircuitConnectionListResultPage) NotDone() bool {
29853	return !page.percclr.IsEmpty()
29854}
29855
29856// Response returns the raw server response from the last page request.
29857func (page PeerExpressRouteCircuitConnectionListResultPage) Response() PeerExpressRouteCircuitConnectionListResult {
29858	return page.percclr
29859}
29860
29861// Values returns the slice of values for the current page or nil if there are no values.
29862func (page PeerExpressRouteCircuitConnectionListResultPage) Values() []PeerExpressRouteCircuitConnection {
29863	if page.percclr.IsEmpty() {
29864		return nil
29865	}
29866	return *page.percclr.Value
29867}
29868
29869// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultPage type.
29870func NewPeerExpressRouteCircuitConnectionListResultPage(cur PeerExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)) PeerExpressRouteCircuitConnectionListResultPage {
29871	return PeerExpressRouteCircuitConnectionListResultPage{
29872		fn:      getNextPage,
29873		percclr: cur,
29874	}
29875}
29876
29877// PeerExpressRouteCircuitConnectionPropertiesFormat properties of the peer express route circuit
29878// connection.
29879type PeerExpressRouteCircuitConnectionPropertiesFormat struct {
29880	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit.
29881	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
29882	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
29883	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
29884	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
29885	AddressPrefix *string `json:"addressPrefix,omitempty"`
29886	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'CircuitConnectionStatusConnected', 'CircuitConnectionStatusConnecting', 'CircuitConnectionStatusDisconnected'
29887	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
29888	// ConnectionName - The name of the express route circuit connection resource.
29889	ConnectionName *string `json:"connectionName,omitempty"`
29890	// AuthResourceGUID - The resource guid of the authorization used for the express route circuit connection.
29891	AuthResourceGUID *string `json:"authResourceGuid,omitempty"`
29892	// ProvisioningState - READ-ONLY; The provisioning state of the peer express route circuit connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
29893	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29894}
29895
29896// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnectionPropertiesFormat.
29897func (perccpf PeerExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
29898	objectMap := make(map[string]interface{})
29899	if perccpf.ExpressRouteCircuitPeering != nil {
29900		objectMap["expressRouteCircuitPeering"] = perccpf.ExpressRouteCircuitPeering
29901	}
29902	if perccpf.PeerExpressRouteCircuitPeering != nil {
29903		objectMap["peerExpressRouteCircuitPeering"] = perccpf.PeerExpressRouteCircuitPeering
29904	}
29905	if perccpf.AddressPrefix != nil {
29906		objectMap["addressPrefix"] = perccpf.AddressPrefix
29907	}
29908	if perccpf.CircuitConnectionStatus != "" {
29909		objectMap["circuitConnectionStatus"] = perccpf.CircuitConnectionStatus
29910	}
29911	if perccpf.ConnectionName != nil {
29912		objectMap["connectionName"] = perccpf.ConnectionName
29913	}
29914	if perccpf.AuthResourceGUID != nil {
29915		objectMap["authResourceGuid"] = perccpf.AuthResourceGUID
29916	}
29917	return json.Marshal(objectMap)
29918}
29919
29920// PeerRoute peer routing details.
29921type PeerRoute struct {
29922	// LocalAddress - READ-ONLY; The peer's local address.
29923	LocalAddress *string `json:"localAddress,omitempty"`
29924	// NetworkProperty - READ-ONLY; The route's network prefix.
29925	NetworkProperty *string `json:"network,omitempty"`
29926	// NextHop - READ-ONLY; The route's next hop.
29927	NextHop *string `json:"nextHop,omitempty"`
29928	// SourcePeer - READ-ONLY; The peer this route was learned from.
29929	SourcePeer *string `json:"sourcePeer,omitempty"`
29930	// Origin - READ-ONLY; The source this route was learned from.
29931	Origin *string `json:"origin,omitempty"`
29932	// AsPath - READ-ONLY; The route's AS path sequence.
29933	AsPath *string `json:"asPath,omitempty"`
29934	// Weight - READ-ONLY; The route's weight.
29935	Weight *int32 `json:"weight,omitempty"`
29936}
29937
29938// MarshalJSON is the custom marshaler for PeerRoute.
29939func (pr PeerRoute) MarshalJSON() ([]byte, error) {
29940	objectMap := make(map[string]interface{})
29941	return json.Marshal(objectMap)
29942}
29943
29944// PeerRouteList list of virtual router peer routes.
29945type PeerRouteList struct {
29946	autorest.Response `json:"-"`
29947	// Value - List of peer routes.
29948	Value *[]PeerRoute `json:"value,omitempty"`
29949}
29950
29951// PolicySettings defines contents of a web application firewall global configuration.
29952type PolicySettings struct {
29953	// State - The state of the policy. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled'
29954	State WebApplicationFirewallEnabledState `json:"state,omitempty"`
29955	// Mode - The mode of the policy. Possible values include: 'WebApplicationFirewallModePrevention', 'WebApplicationFirewallModeDetection'
29956	Mode WebApplicationFirewallMode `json:"mode,omitempty"`
29957	// RequestBodyCheck - Whether to allow WAF to check request Body.
29958	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
29959	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
29960	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
29961	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
29962	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
29963}
29964
29965// PrepareNetworkPoliciesRequest details of PrepareNetworkPolicies for Subnet.
29966type PrepareNetworkPoliciesRequest struct {
29967	// ServiceName - The name of the service for which subnet is being prepared for.
29968	ServiceName *string `json:"serviceName,omitempty"`
29969	// NetworkIntentPolicyConfigurations - A list of NetworkIntentPolicyConfiguration.
29970	NetworkIntentPolicyConfigurations *[]IntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"`
29971}
29972
29973// PrivateDNSZoneConfig privateDnsZoneConfig resource.
29974type PrivateDNSZoneConfig struct {
29975	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
29976	Name *string `json:"name,omitempty"`
29977	// PrivateDNSZonePropertiesFormat - Properties of the private dns zone configuration.
29978	*PrivateDNSZonePropertiesFormat `json:"properties,omitempty"`
29979}
29980
29981// MarshalJSON is the custom marshaler for PrivateDNSZoneConfig.
29982func (pdzc PrivateDNSZoneConfig) MarshalJSON() ([]byte, error) {
29983	objectMap := make(map[string]interface{})
29984	if pdzc.Name != nil {
29985		objectMap["name"] = pdzc.Name
29986	}
29987	if pdzc.PrivateDNSZonePropertiesFormat != nil {
29988		objectMap["properties"] = pdzc.PrivateDNSZonePropertiesFormat
29989	}
29990	return json.Marshal(objectMap)
29991}
29992
29993// UnmarshalJSON is the custom unmarshaler for PrivateDNSZoneConfig struct.
29994func (pdzc *PrivateDNSZoneConfig) UnmarshalJSON(body []byte) error {
29995	var m map[string]*json.RawMessage
29996	err := json.Unmarshal(body, &m)
29997	if err != nil {
29998		return err
29999	}
30000	for k, v := range m {
30001		switch k {
30002		case "name":
30003			if v != nil {
30004				var name string
30005				err = json.Unmarshal(*v, &name)
30006				if err != nil {
30007					return err
30008				}
30009				pdzc.Name = &name
30010			}
30011		case "properties":
30012			if v != nil {
30013				var privateDNSZonePropertiesFormat PrivateDNSZonePropertiesFormat
30014				err = json.Unmarshal(*v, &privateDNSZonePropertiesFormat)
30015				if err != nil {
30016					return err
30017				}
30018				pdzc.PrivateDNSZonePropertiesFormat = &privateDNSZonePropertiesFormat
30019			}
30020		}
30021	}
30022
30023	return nil
30024}
30025
30026// PrivateDNSZoneGroup private dns zone group resource.
30027type PrivateDNSZoneGroup struct {
30028	autorest.Response `json:"-"`
30029	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
30030	Name *string `json:"name,omitempty"`
30031	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
30032	Etag *string `json:"etag,omitempty"`
30033	// PrivateDNSZoneGroupPropertiesFormat - Properties of the private dns zone group.
30034	*PrivateDNSZoneGroupPropertiesFormat `json:"properties,omitempty"`
30035	// ID - Resource ID.
30036	ID *string `json:"id,omitempty"`
30037}
30038
30039// MarshalJSON is the custom marshaler for PrivateDNSZoneGroup.
30040func (pdzg PrivateDNSZoneGroup) MarshalJSON() ([]byte, error) {
30041	objectMap := make(map[string]interface{})
30042	if pdzg.Name != nil {
30043		objectMap["name"] = pdzg.Name
30044	}
30045	if pdzg.PrivateDNSZoneGroupPropertiesFormat != nil {
30046		objectMap["properties"] = pdzg.PrivateDNSZoneGroupPropertiesFormat
30047	}
30048	if pdzg.ID != nil {
30049		objectMap["id"] = pdzg.ID
30050	}
30051	return json.Marshal(objectMap)
30052}
30053
30054// UnmarshalJSON is the custom unmarshaler for PrivateDNSZoneGroup struct.
30055func (pdzg *PrivateDNSZoneGroup) UnmarshalJSON(body []byte) error {
30056	var m map[string]*json.RawMessage
30057	err := json.Unmarshal(body, &m)
30058	if err != nil {
30059		return err
30060	}
30061	for k, v := range m {
30062		switch k {
30063		case "name":
30064			if v != nil {
30065				var name string
30066				err = json.Unmarshal(*v, &name)
30067				if err != nil {
30068					return err
30069				}
30070				pdzg.Name = &name
30071			}
30072		case "etag":
30073			if v != nil {
30074				var etag string
30075				err = json.Unmarshal(*v, &etag)
30076				if err != nil {
30077					return err
30078				}
30079				pdzg.Etag = &etag
30080			}
30081		case "properties":
30082			if v != nil {
30083				var privateDNSZoneGroupPropertiesFormat PrivateDNSZoneGroupPropertiesFormat
30084				err = json.Unmarshal(*v, &privateDNSZoneGroupPropertiesFormat)
30085				if err != nil {
30086					return err
30087				}
30088				pdzg.PrivateDNSZoneGroupPropertiesFormat = &privateDNSZoneGroupPropertiesFormat
30089			}
30090		case "id":
30091			if v != nil {
30092				var ID string
30093				err = json.Unmarshal(*v, &ID)
30094				if err != nil {
30095					return err
30096				}
30097				pdzg.ID = &ID
30098			}
30099		}
30100	}
30101
30102	return nil
30103}
30104
30105// PrivateDNSZoneGroupListResult response for the ListPrivateDnsZoneGroups API service call.
30106type PrivateDNSZoneGroupListResult struct {
30107	autorest.Response `json:"-"`
30108	// Value - A list of private dns zone group resources in a private endpoint.
30109	Value *[]PrivateDNSZoneGroup `json:"value,omitempty"`
30110	// NextLink - READ-ONLY; The URL to get the next set of results.
30111	NextLink *string `json:"nextLink,omitempty"`
30112}
30113
30114// MarshalJSON is the custom marshaler for PrivateDNSZoneGroupListResult.
30115func (pdzglr PrivateDNSZoneGroupListResult) MarshalJSON() ([]byte, error) {
30116	objectMap := make(map[string]interface{})
30117	if pdzglr.Value != nil {
30118		objectMap["value"] = pdzglr.Value
30119	}
30120	return json.Marshal(objectMap)
30121}
30122
30123// PrivateDNSZoneGroupListResultIterator provides access to a complete listing of PrivateDNSZoneGroup
30124// values.
30125type PrivateDNSZoneGroupListResultIterator struct {
30126	i    int
30127	page PrivateDNSZoneGroupListResultPage
30128}
30129
30130// NextWithContext advances to the next value.  If there was an error making
30131// the request the iterator does not advance and the error is returned.
30132func (iter *PrivateDNSZoneGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
30133	if tracing.IsEnabled() {
30134		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateDNSZoneGroupListResultIterator.NextWithContext")
30135		defer func() {
30136			sc := -1
30137			if iter.Response().Response.Response != nil {
30138				sc = iter.Response().Response.Response.StatusCode
30139			}
30140			tracing.EndSpan(ctx, sc, err)
30141		}()
30142	}
30143	iter.i++
30144	if iter.i < len(iter.page.Values()) {
30145		return nil
30146	}
30147	err = iter.page.NextWithContext(ctx)
30148	if err != nil {
30149		iter.i--
30150		return err
30151	}
30152	iter.i = 0
30153	return nil
30154}
30155
30156// Next advances to the next value.  If there was an error making
30157// the request the iterator does not advance and the error is returned.
30158// Deprecated: Use NextWithContext() instead.
30159func (iter *PrivateDNSZoneGroupListResultIterator) Next() error {
30160	return iter.NextWithContext(context.Background())
30161}
30162
30163// NotDone returns true if the enumeration should be started or is not yet complete.
30164func (iter PrivateDNSZoneGroupListResultIterator) NotDone() bool {
30165	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30166}
30167
30168// Response returns the raw server response from the last page request.
30169func (iter PrivateDNSZoneGroupListResultIterator) Response() PrivateDNSZoneGroupListResult {
30170	return iter.page.Response()
30171}
30172
30173// Value returns the current value or a zero-initialized value if the
30174// iterator has advanced beyond the end of the collection.
30175func (iter PrivateDNSZoneGroupListResultIterator) Value() PrivateDNSZoneGroup {
30176	if !iter.page.NotDone() {
30177		return PrivateDNSZoneGroup{}
30178	}
30179	return iter.page.Values()[iter.i]
30180}
30181
30182// Creates a new instance of the PrivateDNSZoneGroupListResultIterator type.
30183func NewPrivateDNSZoneGroupListResultIterator(page PrivateDNSZoneGroupListResultPage) PrivateDNSZoneGroupListResultIterator {
30184	return PrivateDNSZoneGroupListResultIterator{page: page}
30185}
30186
30187// IsEmpty returns true if the ListResult contains no values.
30188func (pdzglr PrivateDNSZoneGroupListResult) IsEmpty() bool {
30189	return pdzglr.Value == nil || len(*pdzglr.Value) == 0
30190}
30191
30192// hasNextLink returns true if the NextLink is not empty.
30193func (pdzglr PrivateDNSZoneGroupListResult) hasNextLink() bool {
30194	return pdzglr.NextLink != nil && len(*pdzglr.NextLink) != 0
30195}
30196
30197// privateDNSZoneGroupListResultPreparer prepares a request to retrieve the next set of results.
30198// It returns nil if no more results exist.
30199func (pdzglr PrivateDNSZoneGroupListResult) privateDNSZoneGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
30200	if !pdzglr.hasNextLink() {
30201		return nil, nil
30202	}
30203	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30204		autorest.AsJSON(),
30205		autorest.AsGet(),
30206		autorest.WithBaseURL(to.String(pdzglr.NextLink)))
30207}
30208
30209// PrivateDNSZoneGroupListResultPage contains a page of PrivateDNSZoneGroup values.
30210type PrivateDNSZoneGroupListResultPage struct {
30211	fn     func(context.Context, PrivateDNSZoneGroupListResult) (PrivateDNSZoneGroupListResult, error)
30212	pdzglr PrivateDNSZoneGroupListResult
30213}
30214
30215// NextWithContext advances to the next page of values.  If there was an error making
30216// the request the page does not advance and the error is returned.
30217func (page *PrivateDNSZoneGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
30218	if tracing.IsEnabled() {
30219		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateDNSZoneGroupListResultPage.NextWithContext")
30220		defer func() {
30221			sc := -1
30222			if page.Response().Response.Response != nil {
30223				sc = page.Response().Response.Response.StatusCode
30224			}
30225			tracing.EndSpan(ctx, sc, err)
30226		}()
30227	}
30228	for {
30229		next, err := page.fn(ctx, page.pdzglr)
30230		if err != nil {
30231			return err
30232		}
30233		page.pdzglr = next
30234		if !next.hasNextLink() || !next.IsEmpty() {
30235			break
30236		}
30237	}
30238	return nil
30239}
30240
30241// Next advances to the next page of values.  If there was an error making
30242// the request the page does not advance and the error is returned.
30243// Deprecated: Use NextWithContext() instead.
30244func (page *PrivateDNSZoneGroupListResultPage) Next() error {
30245	return page.NextWithContext(context.Background())
30246}
30247
30248// NotDone returns true if the page enumeration should be started or is not yet complete.
30249func (page PrivateDNSZoneGroupListResultPage) NotDone() bool {
30250	return !page.pdzglr.IsEmpty()
30251}
30252
30253// Response returns the raw server response from the last page request.
30254func (page PrivateDNSZoneGroupListResultPage) Response() PrivateDNSZoneGroupListResult {
30255	return page.pdzglr
30256}
30257
30258// Values returns the slice of values for the current page or nil if there are no values.
30259func (page PrivateDNSZoneGroupListResultPage) Values() []PrivateDNSZoneGroup {
30260	if page.pdzglr.IsEmpty() {
30261		return nil
30262	}
30263	return *page.pdzglr.Value
30264}
30265
30266// Creates a new instance of the PrivateDNSZoneGroupListResultPage type.
30267func NewPrivateDNSZoneGroupListResultPage(cur PrivateDNSZoneGroupListResult, getNextPage func(context.Context, PrivateDNSZoneGroupListResult) (PrivateDNSZoneGroupListResult, error)) PrivateDNSZoneGroupListResultPage {
30268	return PrivateDNSZoneGroupListResultPage{
30269		fn:     getNextPage,
30270		pdzglr: cur,
30271	}
30272}
30273
30274// PrivateDNSZoneGroupPropertiesFormat properties of the private dns zone group.
30275type PrivateDNSZoneGroupPropertiesFormat struct {
30276	// ProvisioningState - READ-ONLY; The provisioning state of the private dns zone group resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
30277	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30278	// PrivateDNSZoneConfigs - A collection of private dns zone configurations of the private dns zone group.
30279	PrivateDNSZoneConfigs *[]PrivateDNSZoneConfig `json:"privateDnsZoneConfigs,omitempty"`
30280}
30281
30282// MarshalJSON is the custom marshaler for PrivateDNSZoneGroupPropertiesFormat.
30283func (pdzgpf PrivateDNSZoneGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
30284	objectMap := make(map[string]interface{})
30285	if pdzgpf.PrivateDNSZoneConfigs != nil {
30286		objectMap["privateDnsZoneConfigs"] = pdzgpf.PrivateDNSZoneConfigs
30287	}
30288	return json.Marshal(objectMap)
30289}
30290
30291// PrivateDNSZoneGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30292// long-running operation.
30293type PrivateDNSZoneGroupsCreateOrUpdateFuture struct {
30294	azure.FutureAPI
30295	// Result returns the result of the asynchronous operation.
30296	// If the operation has not completed it will return an error.
30297	Result func(PrivateDNSZoneGroupsClient) (PrivateDNSZoneGroup, error)
30298}
30299
30300// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30301func (future *PrivateDNSZoneGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
30302	var azFuture azure.Future
30303	if err := json.Unmarshal(body, &azFuture); err != nil {
30304		return err
30305	}
30306	future.FutureAPI = &azFuture
30307	future.Result = future.result
30308	return nil
30309}
30310
30311// result is the default implementation for PrivateDNSZoneGroupsCreateOrUpdateFuture.Result.
30312func (future *PrivateDNSZoneGroupsCreateOrUpdateFuture) result(client PrivateDNSZoneGroupsClient) (pdzg PrivateDNSZoneGroup, err error) {
30313	var done bool
30314	done, err = future.DoneWithContext(context.Background(), client)
30315	if err != nil {
30316		err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
30317		return
30318	}
30319	if !done {
30320		pdzg.Response.Response = future.Response()
30321		err = azure.NewAsyncOpIncompleteError("network.PrivateDNSZoneGroupsCreateOrUpdateFuture")
30322		return
30323	}
30324	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30325	if pdzg.Response.Response, err = future.GetResult(sender); err == nil && pdzg.Response.Response.StatusCode != http.StatusNoContent {
30326		pdzg, err = client.CreateOrUpdateResponder(pdzg.Response.Response)
30327		if err != nil {
30328			err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsCreateOrUpdateFuture", "Result", pdzg.Response.Response, "Failure responding to request")
30329		}
30330	}
30331	return
30332}
30333
30334// PrivateDNSZoneGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
30335// long-running operation.
30336type PrivateDNSZoneGroupsDeleteFuture struct {
30337	azure.FutureAPI
30338	// Result returns the result of the asynchronous operation.
30339	// If the operation has not completed it will return an error.
30340	Result func(PrivateDNSZoneGroupsClient) (autorest.Response, error)
30341}
30342
30343// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30344func (future *PrivateDNSZoneGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
30345	var azFuture azure.Future
30346	if err := json.Unmarshal(body, &azFuture); err != nil {
30347		return err
30348	}
30349	future.FutureAPI = &azFuture
30350	future.Result = future.result
30351	return nil
30352}
30353
30354// result is the default implementation for PrivateDNSZoneGroupsDeleteFuture.Result.
30355func (future *PrivateDNSZoneGroupsDeleteFuture) result(client PrivateDNSZoneGroupsClient) (ar autorest.Response, err error) {
30356	var done bool
30357	done, err = future.DoneWithContext(context.Background(), client)
30358	if err != nil {
30359		err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
30360		return
30361	}
30362	if !done {
30363		ar.Response = future.Response()
30364		err = azure.NewAsyncOpIncompleteError("network.PrivateDNSZoneGroupsDeleteFuture")
30365		return
30366	}
30367	ar.Response = future.Response()
30368	return
30369}
30370
30371// PrivateDNSZonePropertiesFormat properties of the private dns zone configuration resource.
30372type PrivateDNSZonePropertiesFormat struct {
30373	// PrivateDNSZoneID - The resource id of the private dns zone.
30374	PrivateDNSZoneID *string `json:"privateDnsZoneId,omitempty"`
30375	// RecordSets - READ-ONLY; A collection of information regarding a recordSet, holding information to identify private resources.
30376	RecordSets *[]RecordSet `json:"recordSets,omitempty"`
30377}
30378
30379// MarshalJSON is the custom marshaler for PrivateDNSZonePropertiesFormat.
30380func (pdzpf PrivateDNSZonePropertiesFormat) MarshalJSON() ([]byte, error) {
30381	objectMap := make(map[string]interface{})
30382	if pdzpf.PrivateDNSZoneID != nil {
30383		objectMap["privateDnsZoneId"] = pdzpf.PrivateDNSZoneID
30384	}
30385	return json.Marshal(objectMap)
30386}
30387
30388// PrivateEndpoint private endpoint resource.
30389type PrivateEndpoint struct {
30390	autorest.Response `json:"-"`
30391	// ExtendedLocation - The extended location of the load balancer.
30392	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
30393	// PrivateEndpointProperties - Properties of the private endpoint.
30394	*PrivateEndpointProperties `json:"properties,omitempty"`
30395	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
30396	Etag *string `json:"etag,omitempty"`
30397	// ID - Resource ID.
30398	ID *string `json:"id,omitempty"`
30399	// Name - READ-ONLY; Resource name.
30400	Name *string `json:"name,omitempty"`
30401	// Type - READ-ONLY; Resource type.
30402	Type *string `json:"type,omitempty"`
30403	// Location - Resource location.
30404	Location *string `json:"location,omitempty"`
30405	// Tags - Resource tags.
30406	Tags map[string]*string `json:"tags"`
30407}
30408
30409// MarshalJSON is the custom marshaler for PrivateEndpoint.
30410func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
30411	objectMap := make(map[string]interface{})
30412	if peVar.ExtendedLocation != nil {
30413		objectMap["extendedLocation"] = peVar.ExtendedLocation
30414	}
30415	if peVar.PrivateEndpointProperties != nil {
30416		objectMap["properties"] = peVar.PrivateEndpointProperties
30417	}
30418	if peVar.ID != nil {
30419		objectMap["id"] = peVar.ID
30420	}
30421	if peVar.Location != nil {
30422		objectMap["location"] = peVar.Location
30423	}
30424	if peVar.Tags != nil {
30425		objectMap["tags"] = peVar.Tags
30426	}
30427	return json.Marshal(objectMap)
30428}
30429
30430// UnmarshalJSON is the custom unmarshaler for PrivateEndpoint struct.
30431func (peVar *PrivateEndpoint) UnmarshalJSON(body []byte) error {
30432	var m map[string]*json.RawMessage
30433	err := json.Unmarshal(body, &m)
30434	if err != nil {
30435		return err
30436	}
30437	for k, v := range m {
30438		switch k {
30439		case "extendedLocation":
30440			if v != nil {
30441				var extendedLocation ExtendedLocation
30442				err = json.Unmarshal(*v, &extendedLocation)
30443				if err != nil {
30444					return err
30445				}
30446				peVar.ExtendedLocation = &extendedLocation
30447			}
30448		case "properties":
30449			if v != nil {
30450				var privateEndpointProperties PrivateEndpointProperties
30451				err = json.Unmarshal(*v, &privateEndpointProperties)
30452				if err != nil {
30453					return err
30454				}
30455				peVar.PrivateEndpointProperties = &privateEndpointProperties
30456			}
30457		case "etag":
30458			if v != nil {
30459				var etag string
30460				err = json.Unmarshal(*v, &etag)
30461				if err != nil {
30462					return err
30463				}
30464				peVar.Etag = &etag
30465			}
30466		case "id":
30467			if v != nil {
30468				var ID string
30469				err = json.Unmarshal(*v, &ID)
30470				if err != nil {
30471					return err
30472				}
30473				peVar.ID = &ID
30474			}
30475		case "name":
30476			if v != nil {
30477				var name string
30478				err = json.Unmarshal(*v, &name)
30479				if err != nil {
30480					return err
30481				}
30482				peVar.Name = &name
30483			}
30484		case "type":
30485			if v != nil {
30486				var typeVar string
30487				err = json.Unmarshal(*v, &typeVar)
30488				if err != nil {
30489					return err
30490				}
30491				peVar.Type = &typeVar
30492			}
30493		case "location":
30494			if v != nil {
30495				var location string
30496				err = json.Unmarshal(*v, &location)
30497				if err != nil {
30498					return err
30499				}
30500				peVar.Location = &location
30501			}
30502		case "tags":
30503			if v != nil {
30504				var tags map[string]*string
30505				err = json.Unmarshal(*v, &tags)
30506				if err != nil {
30507					return err
30508				}
30509				peVar.Tags = tags
30510			}
30511		}
30512	}
30513
30514	return nil
30515}
30516
30517// PrivateEndpointConnection privateEndpointConnection resource.
30518type PrivateEndpointConnection struct {
30519	autorest.Response `json:"-"`
30520	// PrivateEndpointConnectionProperties - Properties of the private end point connection.
30521	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
30522	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
30523	Name *string `json:"name,omitempty"`
30524	// Type - READ-ONLY; The resource type.
30525	Type *string `json:"type,omitempty"`
30526	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
30527	Etag *string `json:"etag,omitempty"`
30528	// ID - Resource ID.
30529	ID *string `json:"id,omitempty"`
30530}
30531
30532// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
30533func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
30534	objectMap := make(map[string]interface{})
30535	if pec.PrivateEndpointConnectionProperties != nil {
30536		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
30537	}
30538	if pec.Name != nil {
30539		objectMap["name"] = pec.Name
30540	}
30541	if pec.ID != nil {
30542		objectMap["id"] = pec.ID
30543	}
30544	return json.Marshal(objectMap)
30545}
30546
30547// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
30548func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
30549	var m map[string]*json.RawMessage
30550	err := json.Unmarshal(body, &m)
30551	if err != nil {
30552		return err
30553	}
30554	for k, v := range m {
30555		switch k {
30556		case "properties":
30557			if v != nil {
30558				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
30559				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
30560				if err != nil {
30561					return err
30562				}
30563				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
30564			}
30565		case "name":
30566			if v != nil {
30567				var name string
30568				err = json.Unmarshal(*v, &name)
30569				if err != nil {
30570					return err
30571				}
30572				pec.Name = &name
30573			}
30574		case "type":
30575			if v != nil {
30576				var typeVar string
30577				err = json.Unmarshal(*v, &typeVar)
30578				if err != nil {
30579					return err
30580				}
30581				pec.Type = &typeVar
30582			}
30583		case "etag":
30584			if v != nil {
30585				var etag string
30586				err = json.Unmarshal(*v, &etag)
30587				if err != nil {
30588					return err
30589				}
30590				pec.Etag = &etag
30591			}
30592		case "id":
30593			if v != nil {
30594				var ID string
30595				err = json.Unmarshal(*v, &ID)
30596				if err != nil {
30597					return err
30598				}
30599				pec.ID = &ID
30600			}
30601		}
30602	}
30603
30604	return nil
30605}
30606
30607// PrivateEndpointConnectionListResult response for the ListPrivateEndpointConnection API service call.
30608type PrivateEndpointConnectionListResult struct {
30609	autorest.Response `json:"-"`
30610	// Value - A list of PrivateEndpointConnection resources for a specific private link service.
30611	Value *[]PrivateEndpointConnection `json:"value,omitempty"`
30612	// NextLink - READ-ONLY; The URL to get the next set of results.
30613	NextLink *string `json:"nextLink,omitempty"`
30614}
30615
30616// MarshalJSON is the custom marshaler for PrivateEndpointConnectionListResult.
30617func (peclr PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) {
30618	objectMap := make(map[string]interface{})
30619	if peclr.Value != nil {
30620		objectMap["value"] = peclr.Value
30621	}
30622	return json.Marshal(objectMap)
30623}
30624
30625// PrivateEndpointConnectionListResultIterator provides access to a complete listing of
30626// PrivateEndpointConnection values.
30627type PrivateEndpointConnectionListResultIterator struct {
30628	i    int
30629	page PrivateEndpointConnectionListResultPage
30630}
30631
30632// NextWithContext advances to the next value.  If there was an error making
30633// the request the iterator does not advance and the error is returned.
30634func (iter *PrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
30635	if tracing.IsEnabled() {
30636		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultIterator.NextWithContext")
30637		defer func() {
30638			sc := -1
30639			if iter.Response().Response.Response != nil {
30640				sc = iter.Response().Response.Response.StatusCode
30641			}
30642			tracing.EndSpan(ctx, sc, err)
30643		}()
30644	}
30645	iter.i++
30646	if iter.i < len(iter.page.Values()) {
30647		return nil
30648	}
30649	err = iter.page.NextWithContext(ctx)
30650	if err != nil {
30651		iter.i--
30652		return err
30653	}
30654	iter.i = 0
30655	return nil
30656}
30657
30658// Next advances to the next value.  If there was an error making
30659// the request the iterator does not advance and the error is returned.
30660// Deprecated: Use NextWithContext() instead.
30661func (iter *PrivateEndpointConnectionListResultIterator) Next() error {
30662	return iter.NextWithContext(context.Background())
30663}
30664
30665// NotDone returns true if the enumeration should be started or is not yet complete.
30666func (iter PrivateEndpointConnectionListResultIterator) NotDone() bool {
30667	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30668}
30669
30670// Response returns the raw server response from the last page request.
30671func (iter PrivateEndpointConnectionListResultIterator) Response() PrivateEndpointConnectionListResult {
30672	return iter.page.Response()
30673}
30674
30675// Value returns the current value or a zero-initialized value if the
30676// iterator has advanced beyond the end of the collection.
30677func (iter PrivateEndpointConnectionListResultIterator) Value() PrivateEndpointConnection {
30678	if !iter.page.NotDone() {
30679		return PrivateEndpointConnection{}
30680	}
30681	return iter.page.Values()[iter.i]
30682}
30683
30684// Creates a new instance of the PrivateEndpointConnectionListResultIterator type.
30685func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator {
30686	return PrivateEndpointConnectionListResultIterator{page: page}
30687}
30688
30689// IsEmpty returns true if the ListResult contains no values.
30690func (peclr PrivateEndpointConnectionListResult) IsEmpty() bool {
30691	return peclr.Value == nil || len(*peclr.Value) == 0
30692}
30693
30694// hasNextLink returns true if the NextLink is not empty.
30695func (peclr PrivateEndpointConnectionListResult) hasNextLink() bool {
30696	return peclr.NextLink != nil && len(*peclr.NextLink) != 0
30697}
30698
30699// privateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results.
30700// It returns nil if no more results exist.
30701func (peclr PrivateEndpointConnectionListResult) privateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
30702	if !peclr.hasNextLink() {
30703		return nil, nil
30704	}
30705	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30706		autorest.AsJSON(),
30707		autorest.AsGet(),
30708		autorest.WithBaseURL(to.String(peclr.NextLink)))
30709}
30710
30711// PrivateEndpointConnectionListResultPage contains a page of PrivateEndpointConnection values.
30712type PrivateEndpointConnectionListResultPage struct {
30713	fn    func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)
30714	peclr PrivateEndpointConnectionListResult
30715}
30716
30717// NextWithContext advances to the next page of values.  If there was an error making
30718// the request the page does not advance and the error is returned.
30719func (page *PrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
30720	if tracing.IsEnabled() {
30721		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultPage.NextWithContext")
30722		defer func() {
30723			sc := -1
30724			if page.Response().Response.Response != nil {
30725				sc = page.Response().Response.Response.StatusCode
30726			}
30727			tracing.EndSpan(ctx, sc, err)
30728		}()
30729	}
30730	for {
30731		next, err := page.fn(ctx, page.peclr)
30732		if err != nil {
30733			return err
30734		}
30735		page.peclr = next
30736		if !next.hasNextLink() || !next.IsEmpty() {
30737			break
30738		}
30739	}
30740	return nil
30741}
30742
30743// Next advances to the next page of values.  If there was an error making
30744// the request the page does not advance and the error is returned.
30745// Deprecated: Use NextWithContext() instead.
30746func (page *PrivateEndpointConnectionListResultPage) Next() error {
30747	return page.NextWithContext(context.Background())
30748}
30749
30750// NotDone returns true if the page enumeration should be started or is not yet complete.
30751func (page PrivateEndpointConnectionListResultPage) NotDone() bool {
30752	return !page.peclr.IsEmpty()
30753}
30754
30755// Response returns the raw server response from the last page request.
30756func (page PrivateEndpointConnectionListResultPage) Response() PrivateEndpointConnectionListResult {
30757	return page.peclr
30758}
30759
30760// Values returns the slice of values for the current page or nil if there are no values.
30761func (page PrivateEndpointConnectionListResultPage) Values() []PrivateEndpointConnection {
30762	if page.peclr.IsEmpty() {
30763		return nil
30764	}
30765	return *page.peclr.Value
30766}
30767
30768// Creates a new instance of the PrivateEndpointConnectionListResultPage type.
30769func NewPrivateEndpointConnectionListResultPage(cur PrivateEndpointConnectionListResult, getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage {
30770	return PrivateEndpointConnectionListResultPage{
30771		fn:    getNextPage,
30772		peclr: cur,
30773	}
30774}
30775
30776// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
30777type PrivateEndpointConnectionProperties struct {
30778	// PrivateEndpoint - READ-ONLY; The resource of private end point.
30779	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
30780	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
30781	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
30782	// ProvisioningState - READ-ONLY; The provisioning state of the private endpoint connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
30783	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30784	// LinkIdentifier - READ-ONLY; The consumer link id.
30785	LinkIdentifier *string `json:"linkIdentifier,omitempty"`
30786}
30787
30788// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties.
30789func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) {
30790	objectMap := make(map[string]interface{})
30791	if pecp.PrivateLinkServiceConnectionState != nil {
30792		objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState
30793	}
30794	return json.Marshal(objectMap)
30795}
30796
30797// PrivateEndpointListResult response for the ListPrivateEndpoints API service call.
30798type PrivateEndpointListResult struct {
30799	autorest.Response `json:"-"`
30800	// Value - A list of private endpoint resources in a resource group.
30801	Value *[]PrivateEndpoint `json:"value,omitempty"`
30802	// NextLink - READ-ONLY; The URL to get the next set of results.
30803	NextLink *string `json:"nextLink,omitempty"`
30804}
30805
30806// MarshalJSON is the custom marshaler for PrivateEndpointListResult.
30807func (pelr PrivateEndpointListResult) MarshalJSON() ([]byte, error) {
30808	objectMap := make(map[string]interface{})
30809	if pelr.Value != nil {
30810		objectMap["value"] = pelr.Value
30811	}
30812	return json.Marshal(objectMap)
30813}
30814
30815// PrivateEndpointListResultIterator provides access to a complete listing of PrivateEndpoint values.
30816type PrivateEndpointListResultIterator struct {
30817	i    int
30818	page PrivateEndpointListResultPage
30819}
30820
30821// NextWithContext advances to the next value.  If there was an error making
30822// the request the iterator does not advance and the error is returned.
30823func (iter *PrivateEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
30824	if tracing.IsEnabled() {
30825		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultIterator.NextWithContext")
30826		defer func() {
30827			sc := -1
30828			if iter.Response().Response.Response != nil {
30829				sc = iter.Response().Response.Response.StatusCode
30830			}
30831			tracing.EndSpan(ctx, sc, err)
30832		}()
30833	}
30834	iter.i++
30835	if iter.i < len(iter.page.Values()) {
30836		return nil
30837	}
30838	err = iter.page.NextWithContext(ctx)
30839	if err != nil {
30840		iter.i--
30841		return err
30842	}
30843	iter.i = 0
30844	return nil
30845}
30846
30847// Next advances to the next value.  If there was an error making
30848// the request the iterator does not advance and the error is returned.
30849// Deprecated: Use NextWithContext() instead.
30850func (iter *PrivateEndpointListResultIterator) Next() error {
30851	return iter.NextWithContext(context.Background())
30852}
30853
30854// NotDone returns true if the enumeration should be started or is not yet complete.
30855func (iter PrivateEndpointListResultIterator) NotDone() bool {
30856	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30857}
30858
30859// Response returns the raw server response from the last page request.
30860func (iter PrivateEndpointListResultIterator) Response() PrivateEndpointListResult {
30861	return iter.page.Response()
30862}
30863
30864// Value returns the current value or a zero-initialized value if the
30865// iterator has advanced beyond the end of the collection.
30866func (iter PrivateEndpointListResultIterator) Value() PrivateEndpoint {
30867	if !iter.page.NotDone() {
30868		return PrivateEndpoint{}
30869	}
30870	return iter.page.Values()[iter.i]
30871}
30872
30873// Creates a new instance of the PrivateEndpointListResultIterator type.
30874func NewPrivateEndpointListResultIterator(page PrivateEndpointListResultPage) PrivateEndpointListResultIterator {
30875	return PrivateEndpointListResultIterator{page: page}
30876}
30877
30878// IsEmpty returns true if the ListResult contains no values.
30879func (pelr PrivateEndpointListResult) IsEmpty() bool {
30880	return pelr.Value == nil || len(*pelr.Value) == 0
30881}
30882
30883// hasNextLink returns true if the NextLink is not empty.
30884func (pelr PrivateEndpointListResult) hasNextLink() bool {
30885	return pelr.NextLink != nil && len(*pelr.NextLink) != 0
30886}
30887
30888// privateEndpointListResultPreparer prepares a request to retrieve the next set of results.
30889// It returns nil if no more results exist.
30890func (pelr PrivateEndpointListResult) privateEndpointListResultPreparer(ctx context.Context) (*http.Request, error) {
30891	if !pelr.hasNextLink() {
30892		return nil, nil
30893	}
30894	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30895		autorest.AsJSON(),
30896		autorest.AsGet(),
30897		autorest.WithBaseURL(to.String(pelr.NextLink)))
30898}
30899
30900// PrivateEndpointListResultPage contains a page of PrivateEndpoint values.
30901type PrivateEndpointListResultPage struct {
30902	fn   func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)
30903	pelr PrivateEndpointListResult
30904}
30905
30906// NextWithContext advances to the next page of values.  If there was an error making
30907// the request the page does not advance and the error is returned.
30908func (page *PrivateEndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
30909	if tracing.IsEnabled() {
30910		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultPage.NextWithContext")
30911		defer func() {
30912			sc := -1
30913			if page.Response().Response.Response != nil {
30914				sc = page.Response().Response.Response.StatusCode
30915			}
30916			tracing.EndSpan(ctx, sc, err)
30917		}()
30918	}
30919	for {
30920		next, err := page.fn(ctx, page.pelr)
30921		if err != nil {
30922			return err
30923		}
30924		page.pelr = next
30925		if !next.hasNextLink() || !next.IsEmpty() {
30926			break
30927		}
30928	}
30929	return nil
30930}
30931
30932// Next advances to the next page of values.  If there was an error making
30933// the request the page does not advance and the error is returned.
30934// Deprecated: Use NextWithContext() instead.
30935func (page *PrivateEndpointListResultPage) Next() error {
30936	return page.NextWithContext(context.Background())
30937}
30938
30939// NotDone returns true if the page enumeration should be started or is not yet complete.
30940func (page PrivateEndpointListResultPage) NotDone() bool {
30941	return !page.pelr.IsEmpty()
30942}
30943
30944// Response returns the raw server response from the last page request.
30945func (page PrivateEndpointListResultPage) Response() PrivateEndpointListResult {
30946	return page.pelr
30947}
30948
30949// Values returns the slice of values for the current page or nil if there are no values.
30950func (page PrivateEndpointListResultPage) Values() []PrivateEndpoint {
30951	if page.pelr.IsEmpty() {
30952		return nil
30953	}
30954	return *page.pelr.Value
30955}
30956
30957// Creates a new instance of the PrivateEndpointListResultPage type.
30958func NewPrivateEndpointListResultPage(cur PrivateEndpointListResult, getNextPage func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)) PrivateEndpointListResultPage {
30959	return PrivateEndpointListResultPage{
30960		fn:   getNextPage,
30961		pelr: cur,
30962	}
30963}
30964
30965// PrivateEndpointProperties properties of the private endpoint.
30966type PrivateEndpointProperties struct {
30967	// Subnet - The ID of the subnet from which the private IP will be allocated.
30968	Subnet *Subnet `json:"subnet,omitempty"`
30969	// NetworkInterfaces - READ-ONLY; An array of references to the network interfaces created for this private endpoint.
30970	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
30971	// ProvisioningState - READ-ONLY; The provisioning state of the private endpoint resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
30972	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30973	// PrivateLinkServiceConnections - A grouping of information about the connection to the remote resource.
30974	PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"`
30975	// 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.
30976	ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"`
30977	// CustomDNSConfigs - An array of custom dns configurations.
30978	CustomDNSConfigs *[]CustomDNSConfigPropertiesFormat `json:"customDnsConfigs,omitempty"`
30979}
30980
30981// MarshalJSON is the custom marshaler for PrivateEndpointProperties.
30982func (pep PrivateEndpointProperties) MarshalJSON() ([]byte, error) {
30983	objectMap := make(map[string]interface{})
30984	if pep.Subnet != nil {
30985		objectMap["subnet"] = pep.Subnet
30986	}
30987	if pep.PrivateLinkServiceConnections != nil {
30988		objectMap["privateLinkServiceConnections"] = pep.PrivateLinkServiceConnections
30989	}
30990	if pep.ManualPrivateLinkServiceConnections != nil {
30991		objectMap["manualPrivateLinkServiceConnections"] = pep.ManualPrivateLinkServiceConnections
30992	}
30993	if pep.CustomDNSConfigs != nil {
30994		objectMap["customDnsConfigs"] = pep.CustomDNSConfigs
30995	}
30996	return json.Marshal(objectMap)
30997}
30998
30999// PrivateEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
31000// long-running operation.
31001type PrivateEndpointsCreateOrUpdateFuture struct {
31002	azure.FutureAPI
31003	// Result returns the result of the asynchronous operation.
31004	// If the operation has not completed it will return an error.
31005	Result func(PrivateEndpointsClient) (PrivateEndpoint, error)
31006}
31007
31008// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31009func (future *PrivateEndpointsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
31010	var azFuture azure.Future
31011	if err := json.Unmarshal(body, &azFuture); err != nil {
31012		return err
31013	}
31014	future.FutureAPI = &azFuture
31015	future.Result = future.result
31016	return nil
31017}
31018
31019// result is the default implementation for PrivateEndpointsCreateOrUpdateFuture.Result.
31020func (future *PrivateEndpointsCreateOrUpdateFuture) result(client PrivateEndpointsClient) (peVar PrivateEndpoint, err error) {
31021	var done bool
31022	done, err = future.DoneWithContext(context.Background(), client)
31023	if err != nil {
31024		err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
31025		return
31026	}
31027	if !done {
31028		peVar.Response.Response = future.Response()
31029		err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsCreateOrUpdateFuture")
31030		return
31031	}
31032	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31033	if peVar.Response.Response, err = future.GetResult(sender); err == nil && peVar.Response.Response.StatusCode != http.StatusNoContent {
31034		peVar, err = client.CreateOrUpdateResponder(peVar.Response.Response)
31035		if err != nil {
31036			err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", peVar.Response.Response, "Failure responding to request")
31037		}
31038	}
31039	return
31040}
31041
31042// PrivateEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
31043// operation.
31044type PrivateEndpointsDeleteFuture struct {
31045	azure.FutureAPI
31046	// Result returns the result of the asynchronous operation.
31047	// If the operation has not completed it will return an error.
31048	Result func(PrivateEndpointsClient) (autorest.Response, error)
31049}
31050
31051// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31052func (future *PrivateEndpointsDeleteFuture) UnmarshalJSON(body []byte) error {
31053	var azFuture azure.Future
31054	if err := json.Unmarshal(body, &azFuture); err != nil {
31055		return err
31056	}
31057	future.FutureAPI = &azFuture
31058	future.Result = future.result
31059	return nil
31060}
31061
31062// result is the default implementation for PrivateEndpointsDeleteFuture.Result.
31063func (future *PrivateEndpointsDeleteFuture) result(client PrivateEndpointsClient) (ar autorest.Response, err error) {
31064	var done bool
31065	done, err = future.DoneWithContext(context.Background(), client)
31066	if err != nil {
31067		err = autorest.NewErrorWithError(err, "network.PrivateEndpointsDeleteFuture", "Result", future.Response(), "Polling failure")
31068		return
31069	}
31070	if !done {
31071		ar.Response = future.Response()
31072		err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsDeleteFuture")
31073		return
31074	}
31075	ar.Response = future.Response()
31076	return
31077}
31078
31079// PrivateLinkService private link service resource.
31080type PrivateLinkService struct {
31081	autorest.Response `json:"-"`
31082	// ExtendedLocation - The extended location of the load balancer.
31083	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
31084	// PrivateLinkServiceProperties - Properties of the private link service.
31085	*PrivateLinkServiceProperties `json:"properties,omitempty"`
31086	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
31087	Etag *string `json:"etag,omitempty"`
31088	// ID - Resource ID.
31089	ID *string `json:"id,omitempty"`
31090	// Name - READ-ONLY; Resource name.
31091	Name *string `json:"name,omitempty"`
31092	// Type - READ-ONLY; Resource type.
31093	Type *string `json:"type,omitempty"`
31094	// Location - Resource location.
31095	Location *string `json:"location,omitempty"`
31096	// Tags - Resource tags.
31097	Tags map[string]*string `json:"tags"`
31098}
31099
31100// MarshalJSON is the custom marshaler for PrivateLinkService.
31101func (pls PrivateLinkService) MarshalJSON() ([]byte, error) {
31102	objectMap := make(map[string]interface{})
31103	if pls.ExtendedLocation != nil {
31104		objectMap["extendedLocation"] = pls.ExtendedLocation
31105	}
31106	if pls.PrivateLinkServiceProperties != nil {
31107		objectMap["properties"] = pls.PrivateLinkServiceProperties
31108	}
31109	if pls.ID != nil {
31110		objectMap["id"] = pls.ID
31111	}
31112	if pls.Location != nil {
31113		objectMap["location"] = pls.Location
31114	}
31115	if pls.Tags != nil {
31116		objectMap["tags"] = pls.Tags
31117	}
31118	return json.Marshal(objectMap)
31119}
31120
31121// UnmarshalJSON is the custom unmarshaler for PrivateLinkService struct.
31122func (pls *PrivateLinkService) UnmarshalJSON(body []byte) error {
31123	var m map[string]*json.RawMessage
31124	err := json.Unmarshal(body, &m)
31125	if err != nil {
31126		return err
31127	}
31128	for k, v := range m {
31129		switch k {
31130		case "extendedLocation":
31131			if v != nil {
31132				var extendedLocation ExtendedLocation
31133				err = json.Unmarshal(*v, &extendedLocation)
31134				if err != nil {
31135					return err
31136				}
31137				pls.ExtendedLocation = &extendedLocation
31138			}
31139		case "properties":
31140			if v != nil {
31141				var privateLinkServiceProperties PrivateLinkServiceProperties
31142				err = json.Unmarshal(*v, &privateLinkServiceProperties)
31143				if err != nil {
31144					return err
31145				}
31146				pls.PrivateLinkServiceProperties = &privateLinkServiceProperties
31147			}
31148		case "etag":
31149			if v != nil {
31150				var etag string
31151				err = json.Unmarshal(*v, &etag)
31152				if err != nil {
31153					return err
31154				}
31155				pls.Etag = &etag
31156			}
31157		case "id":
31158			if v != nil {
31159				var ID string
31160				err = json.Unmarshal(*v, &ID)
31161				if err != nil {
31162					return err
31163				}
31164				pls.ID = &ID
31165			}
31166		case "name":
31167			if v != nil {
31168				var name string
31169				err = json.Unmarshal(*v, &name)
31170				if err != nil {
31171					return err
31172				}
31173				pls.Name = &name
31174			}
31175		case "type":
31176			if v != nil {
31177				var typeVar string
31178				err = json.Unmarshal(*v, &typeVar)
31179				if err != nil {
31180					return err
31181				}
31182				pls.Type = &typeVar
31183			}
31184		case "location":
31185			if v != nil {
31186				var location string
31187				err = json.Unmarshal(*v, &location)
31188				if err != nil {
31189					return err
31190				}
31191				pls.Location = &location
31192			}
31193		case "tags":
31194			if v != nil {
31195				var tags map[string]*string
31196				err = json.Unmarshal(*v, &tags)
31197				if err != nil {
31198					return err
31199				}
31200				pls.Tags = tags
31201			}
31202		}
31203	}
31204
31205	return nil
31206}
31207
31208// PrivateLinkServiceConnection privateLinkServiceConnection resource.
31209type PrivateLinkServiceConnection struct {
31210	// PrivateLinkServiceConnectionProperties - Properties of the private link service connection.
31211	*PrivateLinkServiceConnectionProperties `json:"properties,omitempty"`
31212	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
31213	Name *string `json:"name,omitempty"`
31214	// Type - READ-ONLY; The resource type.
31215	Type *string `json:"type,omitempty"`
31216	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
31217	Etag *string `json:"etag,omitempty"`
31218	// ID - Resource ID.
31219	ID *string `json:"id,omitempty"`
31220}
31221
31222// MarshalJSON is the custom marshaler for PrivateLinkServiceConnection.
31223func (plsc PrivateLinkServiceConnection) MarshalJSON() ([]byte, error) {
31224	objectMap := make(map[string]interface{})
31225	if plsc.PrivateLinkServiceConnectionProperties != nil {
31226		objectMap["properties"] = plsc.PrivateLinkServiceConnectionProperties
31227	}
31228	if plsc.Name != nil {
31229		objectMap["name"] = plsc.Name
31230	}
31231	if plsc.ID != nil {
31232		objectMap["id"] = plsc.ID
31233	}
31234	return json.Marshal(objectMap)
31235}
31236
31237// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceConnection struct.
31238func (plsc *PrivateLinkServiceConnection) UnmarshalJSON(body []byte) error {
31239	var m map[string]*json.RawMessage
31240	err := json.Unmarshal(body, &m)
31241	if err != nil {
31242		return err
31243	}
31244	for k, v := range m {
31245		switch k {
31246		case "properties":
31247			if v != nil {
31248				var privateLinkServiceConnectionProperties PrivateLinkServiceConnectionProperties
31249				err = json.Unmarshal(*v, &privateLinkServiceConnectionProperties)
31250				if err != nil {
31251					return err
31252				}
31253				plsc.PrivateLinkServiceConnectionProperties = &privateLinkServiceConnectionProperties
31254			}
31255		case "name":
31256			if v != nil {
31257				var name string
31258				err = json.Unmarshal(*v, &name)
31259				if err != nil {
31260					return err
31261				}
31262				plsc.Name = &name
31263			}
31264		case "type":
31265			if v != nil {
31266				var typeVar string
31267				err = json.Unmarshal(*v, &typeVar)
31268				if err != nil {
31269					return err
31270				}
31271				plsc.Type = &typeVar
31272			}
31273		case "etag":
31274			if v != nil {
31275				var etag string
31276				err = json.Unmarshal(*v, &etag)
31277				if err != nil {
31278					return err
31279				}
31280				plsc.Etag = &etag
31281			}
31282		case "id":
31283			if v != nil {
31284				var ID string
31285				err = json.Unmarshal(*v, &ID)
31286				if err != nil {
31287					return err
31288				}
31289				plsc.ID = &ID
31290			}
31291		}
31292	}
31293
31294	return nil
31295}
31296
31297// PrivateLinkServiceConnectionProperties properties of the PrivateLinkServiceConnection.
31298type PrivateLinkServiceConnectionProperties struct {
31299	// ProvisioningState - READ-ONLY; The provisioning state of the private link service connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
31300	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31301	// PrivateLinkServiceID - The resource id of private link service.
31302	PrivateLinkServiceID *string `json:"privateLinkServiceId,omitempty"`
31303	// GroupIds - The ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to.
31304	GroupIds *[]string `json:"groupIds,omitempty"`
31305	// RequestMessage - A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars.
31306	RequestMessage *string `json:"requestMessage,omitempty"`
31307	// PrivateLinkServiceConnectionState - A collection of read-only information about the state of the connection to the remote resource.
31308	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
31309}
31310
31311// MarshalJSON is the custom marshaler for PrivateLinkServiceConnectionProperties.
31312func (plscp PrivateLinkServiceConnectionProperties) MarshalJSON() ([]byte, error) {
31313	objectMap := make(map[string]interface{})
31314	if plscp.PrivateLinkServiceID != nil {
31315		objectMap["privateLinkServiceId"] = plscp.PrivateLinkServiceID
31316	}
31317	if plscp.GroupIds != nil {
31318		objectMap["groupIds"] = plscp.GroupIds
31319	}
31320	if plscp.RequestMessage != nil {
31321		objectMap["requestMessage"] = plscp.RequestMessage
31322	}
31323	if plscp.PrivateLinkServiceConnectionState != nil {
31324		objectMap["privateLinkServiceConnectionState"] = plscp.PrivateLinkServiceConnectionState
31325	}
31326	return json.Marshal(objectMap)
31327}
31328
31329// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
31330// service consumer and provider.
31331type PrivateLinkServiceConnectionState struct {
31332	// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
31333	Status *string `json:"status,omitempty"`
31334	// Description - The reason for approval/rejection of the connection.
31335	Description *string `json:"description,omitempty"`
31336	// ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
31337	ActionsRequired *string `json:"actionsRequired,omitempty"`
31338}
31339
31340// PrivateLinkServiceIPConfiguration the private link service ip configuration.
31341type PrivateLinkServiceIPConfiguration struct {
31342	// PrivateLinkServiceIPConfigurationProperties - Properties of the private link service ip configuration.
31343	*PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"`
31344	// Name - The name of private link service ip configuration.
31345	Name *string `json:"name,omitempty"`
31346	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
31347	Etag *string `json:"etag,omitempty"`
31348	// Type - READ-ONLY; The resource type.
31349	Type *string `json:"type,omitempty"`
31350	// ID - Resource ID.
31351	ID *string `json:"id,omitempty"`
31352}
31353
31354// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfiguration.
31355func (plsic PrivateLinkServiceIPConfiguration) MarshalJSON() ([]byte, error) {
31356	objectMap := make(map[string]interface{})
31357	if plsic.PrivateLinkServiceIPConfigurationProperties != nil {
31358		objectMap["properties"] = plsic.PrivateLinkServiceIPConfigurationProperties
31359	}
31360	if plsic.Name != nil {
31361		objectMap["name"] = plsic.Name
31362	}
31363	if plsic.ID != nil {
31364		objectMap["id"] = plsic.ID
31365	}
31366	return json.Marshal(objectMap)
31367}
31368
31369// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceIPConfiguration struct.
31370func (plsic *PrivateLinkServiceIPConfiguration) UnmarshalJSON(body []byte) error {
31371	var m map[string]*json.RawMessage
31372	err := json.Unmarshal(body, &m)
31373	if err != nil {
31374		return err
31375	}
31376	for k, v := range m {
31377		switch k {
31378		case "properties":
31379			if v != nil {
31380				var privateLinkServiceIPConfigurationProperties PrivateLinkServiceIPConfigurationProperties
31381				err = json.Unmarshal(*v, &privateLinkServiceIPConfigurationProperties)
31382				if err != nil {
31383					return err
31384				}
31385				plsic.PrivateLinkServiceIPConfigurationProperties = &privateLinkServiceIPConfigurationProperties
31386			}
31387		case "name":
31388			if v != nil {
31389				var name string
31390				err = json.Unmarshal(*v, &name)
31391				if err != nil {
31392					return err
31393				}
31394				plsic.Name = &name
31395			}
31396		case "etag":
31397			if v != nil {
31398				var etag string
31399				err = json.Unmarshal(*v, &etag)
31400				if err != nil {
31401					return err
31402				}
31403				plsic.Etag = &etag
31404			}
31405		case "type":
31406			if v != nil {
31407				var typeVar string
31408				err = json.Unmarshal(*v, &typeVar)
31409				if err != nil {
31410					return err
31411				}
31412				plsic.Type = &typeVar
31413			}
31414		case "id":
31415			if v != nil {
31416				var ID string
31417				err = json.Unmarshal(*v, &ID)
31418				if err != nil {
31419					return err
31420				}
31421				plsic.ID = &ID
31422			}
31423		}
31424	}
31425
31426	return nil
31427}
31428
31429// PrivateLinkServiceIPConfigurationProperties properties of private link service IP configuration.
31430type PrivateLinkServiceIPConfigurationProperties struct {
31431	// PrivateIPAddress - The private IP address of the IP configuration.
31432	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
31433	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic'
31434	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
31435	// Subnet - The reference to the subnet resource.
31436	Subnet *Subnet `json:"subnet,omitempty"`
31437	// Primary - Whether the ip configuration is primary or not.
31438	Primary *bool `json:"primary,omitempty"`
31439	// ProvisioningState - READ-ONLY; The provisioning state of the private link service IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
31440	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31441	// PrivateIPAddressVersion - Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
31442	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
31443}
31444
31445// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfigurationProperties.
31446func (plsicp PrivateLinkServiceIPConfigurationProperties) MarshalJSON() ([]byte, error) {
31447	objectMap := make(map[string]interface{})
31448	if plsicp.PrivateIPAddress != nil {
31449		objectMap["privateIPAddress"] = plsicp.PrivateIPAddress
31450	}
31451	if plsicp.PrivateIPAllocationMethod != "" {
31452		objectMap["privateIPAllocationMethod"] = plsicp.PrivateIPAllocationMethod
31453	}
31454	if plsicp.Subnet != nil {
31455		objectMap["subnet"] = plsicp.Subnet
31456	}
31457	if plsicp.Primary != nil {
31458		objectMap["primary"] = plsicp.Primary
31459	}
31460	if plsicp.PrivateIPAddressVersion != "" {
31461		objectMap["privateIPAddressVersion"] = plsicp.PrivateIPAddressVersion
31462	}
31463	return json.Marshal(objectMap)
31464}
31465
31466// PrivateLinkServiceListResult response for the ListPrivateLinkService API service call.
31467type PrivateLinkServiceListResult struct {
31468	autorest.Response `json:"-"`
31469	// Value - A list of PrivateLinkService resources in a resource group.
31470	Value *[]PrivateLinkService `json:"value,omitempty"`
31471	// NextLink - READ-ONLY; The URL to get the next set of results.
31472	NextLink *string `json:"nextLink,omitempty"`
31473}
31474
31475// MarshalJSON is the custom marshaler for PrivateLinkServiceListResult.
31476func (plslr PrivateLinkServiceListResult) MarshalJSON() ([]byte, error) {
31477	objectMap := make(map[string]interface{})
31478	if plslr.Value != nil {
31479		objectMap["value"] = plslr.Value
31480	}
31481	return json.Marshal(objectMap)
31482}
31483
31484// PrivateLinkServiceListResultIterator provides access to a complete listing of PrivateLinkService values.
31485type PrivateLinkServiceListResultIterator struct {
31486	i    int
31487	page PrivateLinkServiceListResultPage
31488}
31489
31490// NextWithContext advances to the next value.  If there was an error making
31491// the request the iterator does not advance and the error is returned.
31492func (iter *PrivateLinkServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
31493	if tracing.IsEnabled() {
31494		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultIterator.NextWithContext")
31495		defer func() {
31496			sc := -1
31497			if iter.Response().Response.Response != nil {
31498				sc = iter.Response().Response.Response.StatusCode
31499			}
31500			tracing.EndSpan(ctx, sc, err)
31501		}()
31502	}
31503	iter.i++
31504	if iter.i < len(iter.page.Values()) {
31505		return nil
31506	}
31507	err = iter.page.NextWithContext(ctx)
31508	if err != nil {
31509		iter.i--
31510		return err
31511	}
31512	iter.i = 0
31513	return nil
31514}
31515
31516// Next advances to the next value.  If there was an error making
31517// the request the iterator does not advance and the error is returned.
31518// Deprecated: Use NextWithContext() instead.
31519func (iter *PrivateLinkServiceListResultIterator) Next() error {
31520	return iter.NextWithContext(context.Background())
31521}
31522
31523// NotDone returns true if the enumeration should be started or is not yet complete.
31524func (iter PrivateLinkServiceListResultIterator) NotDone() bool {
31525	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31526}
31527
31528// Response returns the raw server response from the last page request.
31529func (iter PrivateLinkServiceListResultIterator) Response() PrivateLinkServiceListResult {
31530	return iter.page.Response()
31531}
31532
31533// Value returns the current value or a zero-initialized value if the
31534// iterator has advanced beyond the end of the collection.
31535func (iter PrivateLinkServiceListResultIterator) Value() PrivateLinkService {
31536	if !iter.page.NotDone() {
31537		return PrivateLinkService{}
31538	}
31539	return iter.page.Values()[iter.i]
31540}
31541
31542// Creates a new instance of the PrivateLinkServiceListResultIterator type.
31543func NewPrivateLinkServiceListResultIterator(page PrivateLinkServiceListResultPage) PrivateLinkServiceListResultIterator {
31544	return PrivateLinkServiceListResultIterator{page: page}
31545}
31546
31547// IsEmpty returns true if the ListResult contains no values.
31548func (plslr PrivateLinkServiceListResult) IsEmpty() bool {
31549	return plslr.Value == nil || len(*plslr.Value) == 0
31550}
31551
31552// hasNextLink returns true if the NextLink is not empty.
31553func (plslr PrivateLinkServiceListResult) hasNextLink() bool {
31554	return plslr.NextLink != nil && len(*plslr.NextLink) != 0
31555}
31556
31557// privateLinkServiceListResultPreparer prepares a request to retrieve the next set of results.
31558// It returns nil if no more results exist.
31559func (plslr PrivateLinkServiceListResult) privateLinkServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
31560	if !plslr.hasNextLink() {
31561		return nil, nil
31562	}
31563	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31564		autorest.AsJSON(),
31565		autorest.AsGet(),
31566		autorest.WithBaseURL(to.String(plslr.NextLink)))
31567}
31568
31569// PrivateLinkServiceListResultPage contains a page of PrivateLinkService values.
31570type PrivateLinkServiceListResultPage struct {
31571	fn    func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)
31572	plslr PrivateLinkServiceListResult
31573}
31574
31575// NextWithContext advances to the next page of values.  If there was an error making
31576// the request the page does not advance and the error is returned.
31577func (page *PrivateLinkServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
31578	if tracing.IsEnabled() {
31579		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultPage.NextWithContext")
31580		defer func() {
31581			sc := -1
31582			if page.Response().Response.Response != nil {
31583				sc = page.Response().Response.Response.StatusCode
31584			}
31585			tracing.EndSpan(ctx, sc, err)
31586		}()
31587	}
31588	for {
31589		next, err := page.fn(ctx, page.plslr)
31590		if err != nil {
31591			return err
31592		}
31593		page.plslr = next
31594		if !next.hasNextLink() || !next.IsEmpty() {
31595			break
31596		}
31597	}
31598	return nil
31599}
31600
31601// Next advances to the next page of values.  If there was an error making
31602// the request the page does not advance and the error is returned.
31603// Deprecated: Use NextWithContext() instead.
31604func (page *PrivateLinkServiceListResultPage) Next() error {
31605	return page.NextWithContext(context.Background())
31606}
31607
31608// NotDone returns true if the page enumeration should be started or is not yet complete.
31609func (page PrivateLinkServiceListResultPage) NotDone() bool {
31610	return !page.plslr.IsEmpty()
31611}
31612
31613// Response returns the raw server response from the last page request.
31614func (page PrivateLinkServiceListResultPage) Response() PrivateLinkServiceListResult {
31615	return page.plslr
31616}
31617
31618// Values returns the slice of values for the current page or nil if there are no values.
31619func (page PrivateLinkServiceListResultPage) Values() []PrivateLinkService {
31620	if page.plslr.IsEmpty() {
31621		return nil
31622	}
31623	return *page.plslr.Value
31624}
31625
31626// Creates a new instance of the PrivateLinkServiceListResultPage type.
31627func NewPrivateLinkServiceListResultPage(cur PrivateLinkServiceListResult, getNextPage func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)) PrivateLinkServiceListResultPage {
31628	return PrivateLinkServiceListResultPage{
31629		fn:    getNextPage,
31630		plslr: cur,
31631	}
31632}
31633
31634// PrivateLinkServiceProperties properties of the private link service.
31635type PrivateLinkServiceProperties struct {
31636	// LoadBalancerFrontendIPConfigurations - An array of references to the load balancer IP configurations.
31637	LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"`
31638	// IPConfigurations - An array of private link service IP configurations.
31639	IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"`
31640	// NetworkInterfaces - READ-ONLY; An array of references to the network interfaces created for this private link service.
31641	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
31642	// ProvisioningState - READ-ONLY; The provisioning state of the private link service resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
31643	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31644	// PrivateEndpointConnections - READ-ONLY; An array of list about connections to the private endpoint.
31645	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
31646	// Visibility - The visibility list of the private link service.
31647	Visibility *PrivateLinkServicePropertiesVisibility `json:"visibility,omitempty"`
31648	// AutoApproval - The auto-approval list of the private link service.
31649	AutoApproval *PrivateLinkServicePropertiesAutoApproval `json:"autoApproval,omitempty"`
31650	// Fqdns - The list of Fqdn.
31651	Fqdns *[]string `json:"fqdns,omitempty"`
31652	// Alias - READ-ONLY; The alias of the private link service.
31653	Alias *string `json:"alias,omitempty"`
31654	// EnableProxyProtocol - Whether the private link service is enabled for proxy protocol or not.
31655	EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"`
31656}
31657
31658// MarshalJSON is the custom marshaler for PrivateLinkServiceProperties.
31659func (plsp PrivateLinkServiceProperties) MarshalJSON() ([]byte, error) {
31660	objectMap := make(map[string]interface{})
31661	if plsp.LoadBalancerFrontendIPConfigurations != nil {
31662		objectMap["loadBalancerFrontendIpConfigurations"] = plsp.LoadBalancerFrontendIPConfigurations
31663	}
31664	if plsp.IPConfigurations != nil {
31665		objectMap["ipConfigurations"] = plsp.IPConfigurations
31666	}
31667	if plsp.Visibility != nil {
31668		objectMap["visibility"] = plsp.Visibility
31669	}
31670	if plsp.AutoApproval != nil {
31671		objectMap["autoApproval"] = plsp.AutoApproval
31672	}
31673	if plsp.Fqdns != nil {
31674		objectMap["fqdns"] = plsp.Fqdns
31675	}
31676	if plsp.EnableProxyProtocol != nil {
31677		objectMap["enableProxyProtocol"] = plsp.EnableProxyProtocol
31678	}
31679	return json.Marshal(objectMap)
31680}
31681
31682// PrivateLinkServicePropertiesAutoApproval the auto-approval list of the private link service.
31683type PrivateLinkServicePropertiesAutoApproval struct {
31684	// Subscriptions - The list of subscriptions.
31685	Subscriptions *[]string `json:"subscriptions,omitempty"`
31686}
31687
31688// PrivateLinkServicePropertiesVisibility the visibility list of the private link service.
31689type PrivateLinkServicePropertiesVisibility struct {
31690	// Subscriptions - The list of subscriptions.
31691	Subscriptions *[]string `json:"subscriptions,omitempty"`
31692}
31693
31694// PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture an abstraction for monitoring
31695// and retrieving the results of a long-running operation.
31696type PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture struct {
31697	azure.FutureAPI
31698	// Result returns the result of the asynchronous operation.
31699	// If the operation has not completed it will return an error.
31700	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
31701}
31702
31703// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31704func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture) UnmarshalJSON(body []byte) error {
31705	var azFuture azure.Future
31706	if err := json.Unmarshal(body, &azFuture); err != nil {
31707		return err
31708	}
31709	future.FutureAPI = &azFuture
31710	future.Result = future.result
31711	return nil
31712}
31713
31714// result is the default implementation for PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture.Result.
31715func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture) result(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) {
31716	var done bool
31717	done, err = future.DoneWithContext(context.Background(), client)
31718	if err != nil {
31719		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", future.Response(), "Polling failure")
31720		return
31721	}
31722	if !done {
31723		plsv.Response.Response = future.Response()
31724		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture")
31725		return
31726	}
31727	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31728	if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent {
31729		plsv, err = client.CheckPrivateLinkServiceVisibilityByResourceGroupResponder(plsv.Response.Response)
31730		if err != nil {
31731			err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", plsv.Response.Response, "Failure responding to request")
31732		}
31733	}
31734	return
31735}
31736
31737// PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture an abstraction for monitoring and retrieving
31738// the results of a long-running operation.
31739type PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture struct {
31740	azure.FutureAPI
31741	// Result returns the result of the asynchronous operation.
31742	// If the operation has not completed it will return an error.
31743	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
31744}
31745
31746// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31747func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture) UnmarshalJSON(body []byte) error {
31748	var azFuture azure.Future
31749	if err := json.Unmarshal(body, &azFuture); err != nil {
31750		return err
31751	}
31752	future.FutureAPI = &azFuture
31753	future.Result = future.result
31754	return nil
31755}
31756
31757// result is the default implementation for PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture.Result.
31758func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture) result(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) {
31759	var done bool
31760	done, err = future.DoneWithContext(context.Background(), client)
31761	if err != nil {
31762		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", future.Response(), "Polling failure")
31763		return
31764	}
31765	if !done {
31766		plsv.Response.Response = future.Response()
31767		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture")
31768		return
31769	}
31770	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31771	if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent {
31772		plsv, err = client.CheckPrivateLinkServiceVisibilityResponder(plsv.Response.Response)
31773		if err != nil {
31774			err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", plsv.Response.Response, "Failure responding to request")
31775		}
31776	}
31777	return
31778}
31779
31780// PrivateLinkServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
31781// long-running operation.
31782type PrivateLinkServicesCreateOrUpdateFuture struct {
31783	azure.FutureAPI
31784	// Result returns the result of the asynchronous operation.
31785	// If the operation has not completed it will return an error.
31786	Result func(PrivateLinkServicesClient) (PrivateLinkService, error)
31787}
31788
31789// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31790func (future *PrivateLinkServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
31791	var azFuture azure.Future
31792	if err := json.Unmarshal(body, &azFuture); err != nil {
31793		return err
31794	}
31795	future.FutureAPI = &azFuture
31796	future.Result = future.result
31797	return nil
31798}
31799
31800// result is the default implementation for PrivateLinkServicesCreateOrUpdateFuture.Result.
31801func (future *PrivateLinkServicesCreateOrUpdateFuture) result(client PrivateLinkServicesClient) (pls PrivateLinkService, err error) {
31802	var done bool
31803	done, err = future.DoneWithContext(context.Background(), client)
31804	if err != nil {
31805		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
31806		return
31807	}
31808	if !done {
31809		pls.Response.Response = future.Response()
31810		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCreateOrUpdateFuture")
31811		return
31812	}
31813	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31814	if pls.Response.Response, err = future.GetResult(sender); err == nil && pls.Response.Response.StatusCode != http.StatusNoContent {
31815		pls, err = client.CreateOrUpdateResponder(pls.Response.Response)
31816		if err != nil {
31817			err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", pls.Response.Response, "Failure responding to request")
31818		}
31819	}
31820	return
31821}
31822
31823// PrivateLinkServicesDeleteFuture an abstraction for monitoring and retrieving the results of a
31824// long-running operation.
31825type PrivateLinkServicesDeleteFuture struct {
31826	azure.FutureAPI
31827	// Result returns the result of the asynchronous operation.
31828	// If the operation has not completed it will return an error.
31829	Result func(PrivateLinkServicesClient) (autorest.Response, error)
31830}
31831
31832// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31833func (future *PrivateLinkServicesDeleteFuture) UnmarshalJSON(body []byte) error {
31834	var azFuture azure.Future
31835	if err := json.Unmarshal(body, &azFuture); err != nil {
31836		return err
31837	}
31838	future.FutureAPI = &azFuture
31839	future.Result = future.result
31840	return nil
31841}
31842
31843// result is the default implementation for PrivateLinkServicesDeleteFuture.Result.
31844func (future *PrivateLinkServicesDeleteFuture) result(client PrivateLinkServicesClient) (ar autorest.Response, err error) {
31845	var done bool
31846	done, err = future.DoneWithContext(context.Background(), client)
31847	if err != nil {
31848		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeleteFuture", "Result", future.Response(), "Polling failure")
31849		return
31850	}
31851	if !done {
31852		ar.Response = future.Response()
31853		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeleteFuture")
31854		return
31855	}
31856	ar.Response = future.Response()
31857	return
31858}
31859
31860// PrivateLinkServicesDeletePrivateEndpointConnectionFuture an abstraction for monitoring and retrieving
31861// the results of a long-running operation.
31862type PrivateLinkServicesDeletePrivateEndpointConnectionFuture struct {
31863	azure.FutureAPI
31864	// Result returns the result of the asynchronous operation.
31865	// If the operation has not completed it will return an error.
31866	Result func(PrivateLinkServicesClient) (autorest.Response, error)
31867}
31868
31869// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31870func (future *PrivateLinkServicesDeletePrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error {
31871	var azFuture azure.Future
31872	if err := json.Unmarshal(body, &azFuture); err != nil {
31873		return err
31874	}
31875	future.FutureAPI = &azFuture
31876	future.Result = future.result
31877	return nil
31878}
31879
31880// result is the default implementation for PrivateLinkServicesDeletePrivateEndpointConnectionFuture.Result.
31881func (future *PrivateLinkServicesDeletePrivateEndpointConnectionFuture) result(client PrivateLinkServicesClient) (ar autorest.Response, err error) {
31882	var done bool
31883	done, err = future.DoneWithContext(context.Background(), client)
31884	if err != nil {
31885		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure")
31886		return
31887	}
31888	if !done {
31889		ar.Response = future.Response()
31890		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture")
31891		return
31892	}
31893	ar.Response = future.Response()
31894	return
31895}
31896
31897// PrivateLinkServiceVisibility response for the CheckPrivateLinkServiceVisibility API service call.
31898type PrivateLinkServiceVisibility struct {
31899	autorest.Response `json:"-"`
31900	// Visible - Private Link Service Visibility (True/False).
31901	Visible *bool `json:"visible,omitempty"`
31902}
31903
31904// Probe a load balancer probe.
31905type Probe struct {
31906	autorest.Response `json:"-"`
31907	// ProbePropertiesFormat - Properties of load balancer probe.
31908	*ProbePropertiesFormat `json:"properties,omitempty"`
31909	// 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.
31910	Name *string `json:"name,omitempty"`
31911	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
31912	Etag *string `json:"etag,omitempty"`
31913	// Type - READ-ONLY; Type of the resource.
31914	Type *string `json:"type,omitempty"`
31915	// ID - Resource ID.
31916	ID *string `json:"id,omitempty"`
31917}
31918
31919// MarshalJSON is the custom marshaler for Probe.
31920func (p Probe) MarshalJSON() ([]byte, error) {
31921	objectMap := make(map[string]interface{})
31922	if p.ProbePropertiesFormat != nil {
31923		objectMap["properties"] = p.ProbePropertiesFormat
31924	}
31925	if p.Name != nil {
31926		objectMap["name"] = p.Name
31927	}
31928	if p.ID != nil {
31929		objectMap["id"] = p.ID
31930	}
31931	return json.Marshal(objectMap)
31932}
31933
31934// UnmarshalJSON is the custom unmarshaler for Probe struct.
31935func (p *Probe) UnmarshalJSON(body []byte) error {
31936	var m map[string]*json.RawMessage
31937	err := json.Unmarshal(body, &m)
31938	if err != nil {
31939		return err
31940	}
31941	for k, v := range m {
31942		switch k {
31943		case "properties":
31944			if v != nil {
31945				var probePropertiesFormat ProbePropertiesFormat
31946				err = json.Unmarshal(*v, &probePropertiesFormat)
31947				if err != nil {
31948					return err
31949				}
31950				p.ProbePropertiesFormat = &probePropertiesFormat
31951			}
31952		case "name":
31953			if v != nil {
31954				var name string
31955				err = json.Unmarshal(*v, &name)
31956				if err != nil {
31957					return err
31958				}
31959				p.Name = &name
31960			}
31961		case "etag":
31962			if v != nil {
31963				var etag string
31964				err = json.Unmarshal(*v, &etag)
31965				if err != nil {
31966					return err
31967				}
31968				p.Etag = &etag
31969			}
31970		case "type":
31971			if v != nil {
31972				var typeVar string
31973				err = json.Unmarshal(*v, &typeVar)
31974				if err != nil {
31975					return err
31976				}
31977				p.Type = &typeVar
31978			}
31979		case "id":
31980			if v != nil {
31981				var ID string
31982				err = json.Unmarshal(*v, &ID)
31983				if err != nil {
31984					return err
31985				}
31986				p.ID = &ID
31987			}
31988		}
31989	}
31990
31991	return nil
31992}
31993
31994// ProbePropertiesFormat load balancer probe resource.
31995type ProbePropertiesFormat struct {
31996	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
31997	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
31998	// 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'
31999	Protocol ProbeProtocol `json:"protocol,omitempty"`
32000	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
32001	Port *int32 `json:"port,omitempty"`
32002	// 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.
32003	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
32004	// 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.
32005	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
32006	// 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.
32007	RequestPath *string `json:"requestPath,omitempty"`
32008	// ProvisioningState - READ-ONLY; The provisioning state of the probe resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
32009	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32010}
32011
32012// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
32013func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
32014	objectMap := make(map[string]interface{})
32015	if ppf.Protocol != "" {
32016		objectMap["protocol"] = ppf.Protocol
32017	}
32018	if ppf.Port != nil {
32019		objectMap["port"] = ppf.Port
32020	}
32021	if ppf.IntervalInSeconds != nil {
32022		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
32023	}
32024	if ppf.NumberOfProbes != nil {
32025		objectMap["numberOfProbes"] = ppf.NumberOfProbes
32026	}
32027	if ppf.RequestPath != nil {
32028		objectMap["requestPath"] = ppf.RequestPath
32029	}
32030	return json.Marshal(objectMap)
32031}
32032
32033// Profile network profile resource.
32034type Profile struct {
32035	autorest.Response `json:"-"`
32036	// ProfilePropertiesFormat - Network profile properties.
32037	*ProfilePropertiesFormat `json:"properties,omitempty"`
32038	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
32039	Etag *string `json:"etag,omitempty"`
32040	// ID - Resource ID.
32041	ID *string `json:"id,omitempty"`
32042	// Name - READ-ONLY; Resource name.
32043	Name *string `json:"name,omitempty"`
32044	// Type - READ-ONLY; Resource type.
32045	Type *string `json:"type,omitempty"`
32046	// Location - Resource location.
32047	Location *string `json:"location,omitempty"`
32048	// Tags - Resource tags.
32049	Tags map[string]*string `json:"tags"`
32050}
32051
32052// MarshalJSON is the custom marshaler for Profile.
32053func (p Profile) MarshalJSON() ([]byte, error) {
32054	objectMap := make(map[string]interface{})
32055	if p.ProfilePropertiesFormat != nil {
32056		objectMap["properties"] = p.ProfilePropertiesFormat
32057	}
32058	if p.ID != nil {
32059		objectMap["id"] = p.ID
32060	}
32061	if p.Location != nil {
32062		objectMap["location"] = p.Location
32063	}
32064	if p.Tags != nil {
32065		objectMap["tags"] = p.Tags
32066	}
32067	return json.Marshal(objectMap)
32068}
32069
32070// UnmarshalJSON is the custom unmarshaler for Profile struct.
32071func (p *Profile) UnmarshalJSON(body []byte) error {
32072	var m map[string]*json.RawMessage
32073	err := json.Unmarshal(body, &m)
32074	if err != nil {
32075		return err
32076	}
32077	for k, v := range m {
32078		switch k {
32079		case "properties":
32080			if v != nil {
32081				var profilePropertiesFormat ProfilePropertiesFormat
32082				err = json.Unmarshal(*v, &profilePropertiesFormat)
32083				if err != nil {
32084					return err
32085				}
32086				p.ProfilePropertiesFormat = &profilePropertiesFormat
32087			}
32088		case "etag":
32089			if v != nil {
32090				var etag string
32091				err = json.Unmarshal(*v, &etag)
32092				if err != nil {
32093					return err
32094				}
32095				p.Etag = &etag
32096			}
32097		case "id":
32098			if v != nil {
32099				var ID string
32100				err = json.Unmarshal(*v, &ID)
32101				if err != nil {
32102					return err
32103				}
32104				p.ID = &ID
32105			}
32106		case "name":
32107			if v != nil {
32108				var name string
32109				err = json.Unmarshal(*v, &name)
32110				if err != nil {
32111					return err
32112				}
32113				p.Name = &name
32114			}
32115		case "type":
32116			if v != nil {
32117				var typeVar string
32118				err = json.Unmarshal(*v, &typeVar)
32119				if err != nil {
32120					return err
32121				}
32122				p.Type = &typeVar
32123			}
32124		case "location":
32125			if v != nil {
32126				var location string
32127				err = json.Unmarshal(*v, &location)
32128				if err != nil {
32129					return err
32130				}
32131				p.Location = &location
32132			}
32133		case "tags":
32134			if v != nil {
32135				var tags map[string]*string
32136				err = json.Unmarshal(*v, &tags)
32137				if err != nil {
32138					return err
32139				}
32140				p.Tags = tags
32141			}
32142		}
32143	}
32144
32145	return nil
32146}
32147
32148// ProfileListResult response for ListNetworkProfiles API service call.
32149type ProfileListResult struct {
32150	autorest.Response `json:"-"`
32151	// Value - A list of network profiles that exist in a resource group.
32152	Value *[]Profile `json:"value,omitempty"`
32153	// NextLink - The URL to get the next set of results.
32154	NextLink *string `json:"nextLink,omitempty"`
32155}
32156
32157// ProfileListResultIterator provides access to a complete listing of Profile values.
32158type ProfileListResultIterator struct {
32159	i    int
32160	page ProfileListResultPage
32161}
32162
32163// NextWithContext advances to the next value.  If there was an error making
32164// the request the iterator does not advance and the error is returned.
32165func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
32166	if tracing.IsEnabled() {
32167		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
32168		defer func() {
32169			sc := -1
32170			if iter.Response().Response.Response != nil {
32171				sc = iter.Response().Response.Response.StatusCode
32172			}
32173			tracing.EndSpan(ctx, sc, err)
32174		}()
32175	}
32176	iter.i++
32177	if iter.i < len(iter.page.Values()) {
32178		return nil
32179	}
32180	err = iter.page.NextWithContext(ctx)
32181	if err != nil {
32182		iter.i--
32183		return err
32184	}
32185	iter.i = 0
32186	return nil
32187}
32188
32189// Next advances to the next value.  If there was an error making
32190// the request the iterator does not advance and the error is returned.
32191// Deprecated: Use NextWithContext() instead.
32192func (iter *ProfileListResultIterator) Next() error {
32193	return iter.NextWithContext(context.Background())
32194}
32195
32196// NotDone returns true if the enumeration should be started or is not yet complete.
32197func (iter ProfileListResultIterator) NotDone() bool {
32198	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32199}
32200
32201// Response returns the raw server response from the last page request.
32202func (iter ProfileListResultIterator) Response() ProfileListResult {
32203	return iter.page.Response()
32204}
32205
32206// Value returns the current value or a zero-initialized value if the
32207// iterator has advanced beyond the end of the collection.
32208func (iter ProfileListResultIterator) Value() Profile {
32209	if !iter.page.NotDone() {
32210		return Profile{}
32211	}
32212	return iter.page.Values()[iter.i]
32213}
32214
32215// Creates a new instance of the ProfileListResultIterator type.
32216func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
32217	return ProfileListResultIterator{page: page}
32218}
32219
32220// IsEmpty returns true if the ListResult contains no values.
32221func (plr ProfileListResult) IsEmpty() bool {
32222	return plr.Value == nil || len(*plr.Value) == 0
32223}
32224
32225// hasNextLink returns true if the NextLink is not empty.
32226func (plr ProfileListResult) hasNextLink() bool {
32227	return plr.NextLink != nil && len(*plr.NextLink) != 0
32228}
32229
32230// profileListResultPreparer prepares a request to retrieve the next set of results.
32231// It returns nil if no more results exist.
32232func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
32233	if !plr.hasNextLink() {
32234		return nil, nil
32235	}
32236	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32237		autorest.AsJSON(),
32238		autorest.AsGet(),
32239		autorest.WithBaseURL(to.String(plr.NextLink)))
32240}
32241
32242// ProfileListResultPage contains a page of Profile values.
32243type ProfileListResultPage struct {
32244	fn  func(context.Context, ProfileListResult) (ProfileListResult, error)
32245	plr ProfileListResult
32246}
32247
32248// NextWithContext advances to the next page of values.  If there was an error making
32249// the request the page does not advance and the error is returned.
32250func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
32251	if tracing.IsEnabled() {
32252		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
32253		defer func() {
32254			sc := -1
32255			if page.Response().Response.Response != nil {
32256				sc = page.Response().Response.Response.StatusCode
32257			}
32258			tracing.EndSpan(ctx, sc, err)
32259		}()
32260	}
32261	for {
32262		next, err := page.fn(ctx, page.plr)
32263		if err != nil {
32264			return err
32265		}
32266		page.plr = next
32267		if !next.hasNextLink() || !next.IsEmpty() {
32268			break
32269		}
32270	}
32271	return nil
32272}
32273
32274// Next advances to the next page of values.  If there was an error making
32275// the request the page does not advance and the error is returned.
32276// Deprecated: Use NextWithContext() instead.
32277func (page *ProfileListResultPage) Next() error {
32278	return page.NextWithContext(context.Background())
32279}
32280
32281// NotDone returns true if the page enumeration should be started or is not yet complete.
32282func (page ProfileListResultPage) NotDone() bool {
32283	return !page.plr.IsEmpty()
32284}
32285
32286// Response returns the raw server response from the last page request.
32287func (page ProfileListResultPage) Response() ProfileListResult {
32288	return page.plr
32289}
32290
32291// Values returns the slice of values for the current page or nil if there are no values.
32292func (page ProfileListResultPage) Values() []Profile {
32293	if page.plr.IsEmpty() {
32294		return nil
32295	}
32296	return *page.plr.Value
32297}
32298
32299// Creates a new instance of the ProfileListResultPage type.
32300func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
32301	return ProfileListResultPage{
32302		fn:  getNextPage,
32303		plr: cur,
32304	}
32305}
32306
32307// ProfilePropertiesFormat network profile properties.
32308type ProfilePropertiesFormat struct {
32309	// ContainerNetworkInterfaces - READ-ONLY; List of child container network interfaces.
32310	ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"`
32311	// ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations.
32312	ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"`
32313	// ResourceGUID - READ-ONLY; The resource GUID property of the network profile resource.
32314	ResourceGUID *string `json:"resourceGuid,omitempty"`
32315	// ProvisioningState - READ-ONLY; The provisioning state of the network profile resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
32316	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32317}
32318
32319// MarshalJSON is the custom marshaler for ProfilePropertiesFormat.
32320func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
32321	objectMap := make(map[string]interface{})
32322	if ppf.ContainerNetworkInterfaceConfigurations != nil {
32323		objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations
32324	}
32325	return json.Marshal(objectMap)
32326}
32327
32328// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
32329// operation.
32330type ProfilesDeleteFuture struct {
32331	azure.FutureAPI
32332	// Result returns the result of the asynchronous operation.
32333	// If the operation has not completed it will return an error.
32334	Result func(ProfilesClient) (autorest.Response, error)
32335}
32336
32337// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32338func (future *ProfilesDeleteFuture) UnmarshalJSON(body []byte) error {
32339	var azFuture azure.Future
32340	if err := json.Unmarshal(body, &azFuture); err != nil {
32341		return err
32342	}
32343	future.FutureAPI = &azFuture
32344	future.Result = future.result
32345	return nil
32346}
32347
32348// result is the default implementation for ProfilesDeleteFuture.Result.
32349func (future *ProfilesDeleteFuture) result(client ProfilesClient) (ar autorest.Response, err error) {
32350	var done bool
32351	done, err = future.DoneWithContext(context.Background(), client)
32352	if err != nil {
32353		err = autorest.NewErrorWithError(err, "network.ProfilesDeleteFuture", "Result", future.Response(), "Polling failure")
32354		return
32355	}
32356	if !done {
32357		ar.Response = future.Response()
32358		err = azure.NewAsyncOpIncompleteError("network.ProfilesDeleteFuture")
32359		return
32360	}
32361	ar.Response = future.Response()
32362	return
32363}
32364
32365// PropagatedRouteTable the list of RouteTables to advertise the routes to.
32366type PropagatedRouteTable struct {
32367	// Labels - The list of labels.
32368	Labels *[]string `json:"labels,omitempty"`
32369	// Ids - The list of resource ids of all the RouteTables.
32370	Ids *[]SubResource `json:"ids,omitempty"`
32371}
32372
32373// ProtocolConfiguration configuration of the protocol.
32374type ProtocolConfiguration struct {
32375	// HTTPConfiguration - HTTP configuration of the connectivity check.
32376	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
32377}
32378
32379// ProtocolCustomSettingsFormat dDoS custom policy properties.
32380type ProtocolCustomSettingsFormat struct {
32381	// Protocol - The protocol for which the DDoS protection policy is being customized. Possible values include: 'DdosCustomPolicyProtocolTCP', 'DdosCustomPolicyProtocolUDP', 'DdosCustomPolicyProtocolSyn'
32382	Protocol DdosCustomPolicyProtocol `json:"protocol,omitempty"`
32383	// TriggerRateOverride - The customized DDoS protection trigger rate.
32384	TriggerRateOverride *string `json:"triggerRateOverride,omitempty"`
32385	// SourceRateOverride - The customized DDoS protection source rate.
32386	SourceRateOverride *string `json:"sourceRateOverride,omitempty"`
32387	// 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'
32388	TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"`
32389}
32390
32391// PublicIPAddress public IP address resource.
32392type PublicIPAddress struct {
32393	autorest.Response `json:"-"`
32394	// ExtendedLocation - The extended location of the public ip address.
32395	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
32396	// Sku - The public IP address SKU.
32397	Sku *PublicIPAddressSku `json:"sku,omitempty"`
32398	// PublicIPAddressPropertiesFormat - Public IP address properties.
32399	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
32400	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
32401	Etag *string `json:"etag,omitempty"`
32402	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
32403	Zones *[]string `json:"zones,omitempty"`
32404	// ID - Resource ID.
32405	ID *string `json:"id,omitempty"`
32406	// Name - READ-ONLY; Resource name.
32407	Name *string `json:"name,omitempty"`
32408	// Type - READ-ONLY; Resource type.
32409	Type *string `json:"type,omitempty"`
32410	// Location - Resource location.
32411	Location *string `json:"location,omitempty"`
32412	// Tags - Resource tags.
32413	Tags map[string]*string `json:"tags"`
32414}
32415
32416// MarshalJSON is the custom marshaler for PublicIPAddress.
32417func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
32418	objectMap := make(map[string]interface{})
32419	if pia.ExtendedLocation != nil {
32420		objectMap["extendedLocation"] = pia.ExtendedLocation
32421	}
32422	if pia.Sku != nil {
32423		objectMap["sku"] = pia.Sku
32424	}
32425	if pia.PublicIPAddressPropertiesFormat != nil {
32426		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
32427	}
32428	if pia.Zones != nil {
32429		objectMap["zones"] = pia.Zones
32430	}
32431	if pia.ID != nil {
32432		objectMap["id"] = pia.ID
32433	}
32434	if pia.Location != nil {
32435		objectMap["location"] = pia.Location
32436	}
32437	if pia.Tags != nil {
32438		objectMap["tags"] = pia.Tags
32439	}
32440	return json.Marshal(objectMap)
32441}
32442
32443// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
32444func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
32445	var m map[string]*json.RawMessage
32446	err := json.Unmarshal(body, &m)
32447	if err != nil {
32448		return err
32449	}
32450	for k, v := range m {
32451		switch k {
32452		case "extendedLocation":
32453			if v != nil {
32454				var extendedLocation ExtendedLocation
32455				err = json.Unmarshal(*v, &extendedLocation)
32456				if err != nil {
32457					return err
32458				}
32459				pia.ExtendedLocation = &extendedLocation
32460			}
32461		case "sku":
32462			if v != nil {
32463				var sku PublicIPAddressSku
32464				err = json.Unmarshal(*v, &sku)
32465				if err != nil {
32466					return err
32467				}
32468				pia.Sku = &sku
32469			}
32470		case "properties":
32471			if v != nil {
32472				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
32473				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
32474				if err != nil {
32475					return err
32476				}
32477				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
32478			}
32479		case "etag":
32480			if v != nil {
32481				var etag string
32482				err = json.Unmarshal(*v, &etag)
32483				if err != nil {
32484					return err
32485				}
32486				pia.Etag = &etag
32487			}
32488		case "zones":
32489			if v != nil {
32490				var zones []string
32491				err = json.Unmarshal(*v, &zones)
32492				if err != nil {
32493					return err
32494				}
32495				pia.Zones = &zones
32496			}
32497		case "id":
32498			if v != nil {
32499				var ID string
32500				err = json.Unmarshal(*v, &ID)
32501				if err != nil {
32502					return err
32503				}
32504				pia.ID = &ID
32505			}
32506		case "name":
32507			if v != nil {
32508				var name string
32509				err = json.Unmarshal(*v, &name)
32510				if err != nil {
32511					return err
32512				}
32513				pia.Name = &name
32514			}
32515		case "type":
32516			if v != nil {
32517				var typeVar string
32518				err = json.Unmarshal(*v, &typeVar)
32519				if err != nil {
32520					return err
32521				}
32522				pia.Type = &typeVar
32523			}
32524		case "location":
32525			if v != nil {
32526				var location string
32527				err = json.Unmarshal(*v, &location)
32528				if err != nil {
32529					return err
32530				}
32531				pia.Location = &location
32532			}
32533		case "tags":
32534			if v != nil {
32535				var tags map[string]*string
32536				err = json.Unmarshal(*v, &tags)
32537				if err != nil {
32538					return err
32539				}
32540				pia.Tags = tags
32541			}
32542		}
32543	}
32544
32545	return nil
32546}
32547
32548// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address.
32549type PublicIPAddressDNSSettings struct {
32550	// 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.
32551	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
32552	// 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.
32553	Fqdn *string `json:"fqdn,omitempty"`
32554	// 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.
32555	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
32556}
32557
32558// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
32559// long-running operation.
32560type PublicIPAddressesCreateOrUpdateFuture struct {
32561	azure.FutureAPI
32562	// Result returns the result of the asynchronous operation.
32563	// If the operation has not completed it will return an error.
32564	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
32565}
32566
32567// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32568func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
32569	var azFuture azure.Future
32570	if err := json.Unmarshal(body, &azFuture); err != nil {
32571		return err
32572	}
32573	future.FutureAPI = &azFuture
32574	future.Result = future.result
32575	return nil
32576}
32577
32578// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result.
32579func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
32580	var done bool
32581	done, err = future.DoneWithContext(context.Background(), client)
32582	if err != nil {
32583		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
32584		return
32585	}
32586	if !done {
32587		pia.Response.Response = future.Response()
32588		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
32589		return
32590	}
32591	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32592	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
32593		pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
32594		if err != nil {
32595			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
32596		}
32597	}
32598	return
32599}
32600
32601// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
32602// operation.
32603type PublicIPAddressesDeleteFuture struct {
32604	azure.FutureAPI
32605	// Result returns the result of the asynchronous operation.
32606	// If the operation has not completed it will return an error.
32607	Result func(PublicIPAddressesClient) (autorest.Response, error)
32608}
32609
32610// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32611func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error {
32612	var azFuture azure.Future
32613	if err := json.Unmarshal(body, &azFuture); err != nil {
32614		return err
32615	}
32616	future.FutureAPI = &azFuture
32617	future.Result = future.result
32618	return nil
32619}
32620
32621// result is the default implementation for PublicIPAddressesDeleteFuture.Result.
32622func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
32623	var done bool
32624	done, err = future.DoneWithContext(context.Background(), client)
32625	if err != nil {
32626		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
32627		return
32628	}
32629	if !done {
32630		ar.Response = future.Response()
32631		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
32632		return
32633	}
32634	ar.Response = future.Response()
32635	return
32636}
32637
32638// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
32639type PublicIPAddressListResult struct {
32640	autorest.Response `json:"-"`
32641	// Value - A list of public IP addresses that exists in a resource group.
32642	Value *[]PublicIPAddress `json:"value,omitempty"`
32643	// NextLink - The URL to get the next set of results.
32644	NextLink *string `json:"nextLink,omitempty"`
32645}
32646
32647// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
32648type PublicIPAddressListResultIterator struct {
32649	i    int
32650	page PublicIPAddressListResultPage
32651}
32652
32653// NextWithContext advances to the next value.  If there was an error making
32654// the request the iterator does not advance and the error is returned.
32655func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
32656	if tracing.IsEnabled() {
32657		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
32658		defer func() {
32659			sc := -1
32660			if iter.Response().Response.Response != nil {
32661				sc = iter.Response().Response.Response.StatusCode
32662			}
32663			tracing.EndSpan(ctx, sc, err)
32664		}()
32665	}
32666	iter.i++
32667	if iter.i < len(iter.page.Values()) {
32668		return nil
32669	}
32670	err = iter.page.NextWithContext(ctx)
32671	if err != nil {
32672		iter.i--
32673		return err
32674	}
32675	iter.i = 0
32676	return nil
32677}
32678
32679// Next advances to the next value.  If there was an error making
32680// the request the iterator does not advance and the error is returned.
32681// Deprecated: Use NextWithContext() instead.
32682func (iter *PublicIPAddressListResultIterator) Next() error {
32683	return iter.NextWithContext(context.Background())
32684}
32685
32686// NotDone returns true if the enumeration should be started or is not yet complete.
32687func (iter PublicIPAddressListResultIterator) NotDone() bool {
32688	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32689}
32690
32691// Response returns the raw server response from the last page request.
32692func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
32693	return iter.page.Response()
32694}
32695
32696// Value returns the current value or a zero-initialized value if the
32697// iterator has advanced beyond the end of the collection.
32698func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
32699	if !iter.page.NotDone() {
32700		return PublicIPAddress{}
32701	}
32702	return iter.page.Values()[iter.i]
32703}
32704
32705// Creates a new instance of the PublicIPAddressListResultIterator type.
32706func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
32707	return PublicIPAddressListResultIterator{page: page}
32708}
32709
32710// IsEmpty returns true if the ListResult contains no values.
32711func (pialr PublicIPAddressListResult) IsEmpty() bool {
32712	return pialr.Value == nil || len(*pialr.Value) == 0
32713}
32714
32715// hasNextLink returns true if the NextLink is not empty.
32716func (pialr PublicIPAddressListResult) hasNextLink() bool {
32717	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
32718}
32719
32720// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
32721// It returns nil if no more results exist.
32722func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
32723	if !pialr.hasNextLink() {
32724		return nil, nil
32725	}
32726	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32727		autorest.AsJSON(),
32728		autorest.AsGet(),
32729		autorest.WithBaseURL(to.String(pialr.NextLink)))
32730}
32731
32732// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
32733type PublicIPAddressListResultPage struct {
32734	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
32735	pialr PublicIPAddressListResult
32736}
32737
32738// NextWithContext advances to the next page of values.  If there was an error making
32739// the request the page does not advance and the error is returned.
32740func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
32741	if tracing.IsEnabled() {
32742		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
32743		defer func() {
32744			sc := -1
32745			if page.Response().Response.Response != nil {
32746				sc = page.Response().Response.Response.StatusCode
32747			}
32748			tracing.EndSpan(ctx, sc, err)
32749		}()
32750	}
32751	for {
32752		next, err := page.fn(ctx, page.pialr)
32753		if err != nil {
32754			return err
32755		}
32756		page.pialr = next
32757		if !next.hasNextLink() || !next.IsEmpty() {
32758			break
32759		}
32760	}
32761	return nil
32762}
32763
32764// Next advances to the next page of values.  If there was an error making
32765// the request the page does not advance and the error is returned.
32766// Deprecated: Use NextWithContext() instead.
32767func (page *PublicIPAddressListResultPage) Next() error {
32768	return page.NextWithContext(context.Background())
32769}
32770
32771// NotDone returns true if the page enumeration should be started or is not yet complete.
32772func (page PublicIPAddressListResultPage) NotDone() bool {
32773	return !page.pialr.IsEmpty()
32774}
32775
32776// Response returns the raw server response from the last page request.
32777func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
32778	return page.pialr
32779}
32780
32781// Values returns the slice of values for the current page or nil if there are no values.
32782func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
32783	if page.pialr.IsEmpty() {
32784		return nil
32785	}
32786	return *page.pialr.Value
32787}
32788
32789// Creates a new instance of the PublicIPAddressListResultPage type.
32790func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
32791	return PublicIPAddressListResultPage{
32792		fn:    getNextPage,
32793		pialr: cur,
32794	}
32795}
32796
32797// PublicIPAddressPropertiesFormat public IP address properties.
32798type PublicIPAddressPropertiesFormat struct {
32799	// PublicIPAllocationMethod - The public IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic'
32800	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
32801	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
32802	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
32803	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
32804	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
32805	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
32806	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
32807	// DdosSettings - The DDoS protection custom policy associated with the public IP address.
32808	DdosSettings *DdosSettings `json:"ddosSettings,omitempty"`
32809	// IPTags - The list of tags associated with the public IP address.
32810	IPTags *[]IPTag `json:"ipTags,omitempty"`
32811	// IPAddress - The IP address associated with the public IP address resource.
32812	IPAddress *string `json:"ipAddress,omitempty"`
32813	// PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from.
32814	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
32815	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
32816	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
32817	// ResourceGUID - READ-ONLY; The resource GUID property of the public IP address resource.
32818	ResourceGUID *string `json:"resourceGuid,omitempty"`
32819	// ProvisioningState - READ-ONLY; The provisioning state of the public IP address resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
32820	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32821	// ServicePublicIPAddress - The service public IP address of the public IP address resource.
32822	ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"`
32823	// NatGateway - The NatGateway for the Public IP address.
32824	NatGateway *NatGateway `json:"natGateway,omitempty"`
32825	// MigrationPhase - Migration phase of Public IP Address. Possible values include: 'PublicIPAddressMigrationPhaseNone', 'PublicIPAddressMigrationPhasePrepare', 'PublicIPAddressMigrationPhaseCommit', 'PublicIPAddressMigrationPhaseAbort', 'PublicIPAddressMigrationPhaseCommitted'
32826	MigrationPhase PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"`
32827	// LinkedPublicIPAddress - The linked public IP address of the public IP address resource.
32828	LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"`
32829}
32830
32831// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
32832func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
32833	objectMap := make(map[string]interface{})
32834	if piapf.PublicIPAllocationMethod != "" {
32835		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
32836	}
32837	if piapf.PublicIPAddressVersion != "" {
32838		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
32839	}
32840	if piapf.DNSSettings != nil {
32841		objectMap["dnsSettings"] = piapf.DNSSettings
32842	}
32843	if piapf.DdosSettings != nil {
32844		objectMap["ddosSettings"] = piapf.DdosSettings
32845	}
32846	if piapf.IPTags != nil {
32847		objectMap["ipTags"] = piapf.IPTags
32848	}
32849	if piapf.IPAddress != nil {
32850		objectMap["ipAddress"] = piapf.IPAddress
32851	}
32852	if piapf.PublicIPPrefix != nil {
32853		objectMap["publicIPPrefix"] = piapf.PublicIPPrefix
32854	}
32855	if piapf.IdleTimeoutInMinutes != nil {
32856		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
32857	}
32858	if piapf.ServicePublicIPAddress != nil {
32859		objectMap["servicePublicIPAddress"] = piapf.ServicePublicIPAddress
32860	}
32861	if piapf.NatGateway != nil {
32862		objectMap["natGateway"] = piapf.NatGateway
32863	}
32864	if piapf.MigrationPhase != "" {
32865		objectMap["migrationPhase"] = piapf.MigrationPhase
32866	}
32867	if piapf.LinkedPublicIPAddress != nil {
32868		objectMap["linkedPublicIPAddress"] = piapf.LinkedPublicIPAddress
32869	}
32870	return json.Marshal(objectMap)
32871}
32872
32873// PublicIPAddressSku SKU of a public IP address.
32874type PublicIPAddressSku struct {
32875	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
32876	Name PublicIPAddressSkuName `json:"name,omitempty"`
32877	// Tier - Tier of a public IP address SKU. Possible values include: 'PublicIPAddressSkuTierRegional', 'PublicIPAddressSkuTierGlobal'
32878	Tier PublicIPAddressSkuTier `json:"tier,omitempty"`
32879}
32880
32881// PublicIPPrefix public IP prefix resource.
32882type PublicIPPrefix struct {
32883	autorest.Response `json:"-"`
32884	// ExtendedLocation - The extended location of the public ip address.
32885	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
32886	// Sku - The public IP prefix SKU.
32887	Sku *PublicIPPrefixSku `json:"sku,omitempty"`
32888	// PublicIPPrefixPropertiesFormat - Public IP prefix properties.
32889	*PublicIPPrefixPropertiesFormat `json:"properties,omitempty"`
32890	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
32891	Etag *string `json:"etag,omitempty"`
32892	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
32893	Zones *[]string `json:"zones,omitempty"`
32894	// ID - Resource ID.
32895	ID *string `json:"id,omitempty"`
32896	// Name - READ-ONLY; Resource name.
32897	Name *string `json:"name,omitempty"`
32898	// Type - READ-ONLY; Resource type.
32899	Type *string `json:"type,omitempty"`
32900	// Location - Resource location.
32901	Location *string `json:"location,omitempty"`
32902	// Tags - Resource tags.
32903	Tags map[string]*string `json:"tags"`
32904}
32905
32906// MarshalJSON is the custom marshaler for PublicIPPrefix.
32907func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) {
32908	objectMap := make(map[string]interface{})
32909	if pip.ExtendedLocation != nil {
32910		objectMap["extendedLocation"] = pip.ExtendedLocation
32911	}
32912	if pip.Sku != nil {
32913		objectMap["sku"] = pip.Sku
32914	}
32915	if pip.PublicIPPrefixPropertiesFormat != nil {
32916		objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat
32917	}
32918	if pip.Zones != nil {
32919		objectMap["zones"] = pip.Zones
32920	}
32921	if pip.ID != nil {
32922		objectMap["id"] = pip.ID
32923	}
32924	if pip.Location != nil {
32925		objectMap["location"] = pip.Location
32926	}
32927	if pip.Tags != nil {
32928		objectMap["tags"] = pip.Tags
32929	}
32930	return json.Marshal(objectMap)
32931}
32932
32933// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct.
32934func (pip *PublicIPPrefix) UnmarshalJSON(body []byte) error {
32935	var m map[string]*json.RawMessage
32936	err := json.Unmarshal(body, &m)
32937	if err != nil {
32938		return err
32939	}
32940	for k, v := range m {
32941		switch k {
32942		case "extendedLocation":
32943			if v != nil {
32944				var extendedLocation ExtendedLocation
32945				err = json.Unmarshal(*v, &extendedLocation)
32946				if err != nil {
32947					return err
32948				}
32949				pip.ExtendedLocation = &extendedLocation
32950			}
32951		case "sku":
32952			if v != nil {
32953				var sku PublicIPPrefixSku
32954				err = json.Unmarshal(*v, &sku)
32955				if err != nil {
32956					return err
32957				}
32958				pip.Sku = &sku
32959			}
32960		case "properties":
32961			if v != nil {
32962				var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat
32963				err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat)
32964				if err != nil {
32965					return err
32966				}
32967				pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat
32968			}
32969		case "etag":
32970			if v != nil {
32971				var etag string
32972				err = json.Unmarshal(*v, &etag)
32973				if err != nil {
32974					return err
32975				}
32976				pip.Etag = &etag
32977			}
32978		case "zones":
32979			if v != nil {
32980				var zones []string
32981				err = json.Unmarshal(*v, &zones)
32982				if err != nil {
32983					return err
32984				}
32985				pip.Zones = &zones
32986			}
32987		case "id":
32988			if v != nil {
32989				var ID string
32990				err = json.Unmarshal(*v, &ID)
32991				if err != nil {
32992					return err
32993				}
32994				pip.ID = &ID
32995			}
32996		case "name":
32997			if v != nil {
32998				var name string
32999				err = json.Unmarshal(*v, &name)
33000				if err != nil {
33001					return err
33002				}
33003				pip.Name = &name
33004			}
33005		case "type":
33006			if v != nil {
33007				var typeVar string
33008				err = json.Unmarshal(*v, &typeVar)
33009				if err != nil {
33010					return err
33011				}
33012				pip.Type = &typeVar
33013			}
33014		case "location":
33015			if v != nil {
33016				var location string
33017				err = json.Unmarshal(*v, &location)
33018				if err != nil {
33019					return err
33020				}
33021				pip.Location = &location
33022			}
33023		case "tags":
33024			if v != nil {
33025				var tags map[string]*string
33026				err = json.Unmarshal(*v, &tags)
33027				if err != nil {
33028					return err
33029				}
33030				pip.Tags = tags
33031			}
33032		}
33033	}
33034
33035	return nil
33036}
33037
33038// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
33039// long-running operation.
33040type PublicIPPrefixesCreateOrUpdateFuture struct {
33041	azure.FutureAPI
33042	// Result returns the result of the asynchronous operation.
33043	// If the operation has not completed it will return an error.
33044	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
33045}
33046
33047// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33048func (future *PublicIPPrefixesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
33049	var azFuture azure.Future
33050	if err := json.Unmarshal(body, &azFuture); err != nil {
33051		return err
33052	}
33053	future.FutureAPI = &azFuture
33054	future.Result = future.result
33055	return nil
33056}
33057
33058// result is the default implementation for PublicIPPrefixesCreateOrUpdateFuture.Result.
33059func (future *PublicIPPrefixesCreateOrUpdateFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
33060	var done bool
33061	done, err = future.DoneWithContext(context.Background(), client)
33062	if err != nil {
33063		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
33064		return
33065	}
33066	if !done {
33067		pip.Response.Response = future.Response()
33068		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesCreateOrUpdateFuture")
33069		return
33070	}
33071	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33072	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
33073		pip, err = client.CreateOrUpdateResponder(pip.Response.Response)
33074		if err != nil {
33075			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", pip.Response.Response, "Failure responding to request")
33076		}
33077	}
33078	return
33079}
33080
33081// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
33082// operation.
33083type PublicIPPrefixesDeleteFuture struct {
33084	azure.FutureAPI
33085	// Result returns the result of the asynchronous operation.
33086	// If the operation has not completed it will return an error.
33087	Result func(PublicIPPrefixesClient) (autorest.Response, error)
33088}
33089
33090// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33091func (future *PublicIPPrefixesDeleteFuture) UnmarshalJSON(body []byte) error {
33092	var azFuture azure.Future
33093	if err := json.Unmarshal(body, &azFuture); err != nil {
33094		return err
33095	}
33096	future.FutureAPI = &azFuture
33097	future.Result = future.result
33098	return nil
33099}
33100
33101// result is the default implementation for PublicIPPrefixesDeleteFuture.Result.
33102func (future *PublicIPPrefixesDeleteFuture) result(client PublicIPPrefixesClient) (ar autorest.Response, err error) {
33103	var done bool
33104	done, err = future.DoneWithContext(context.Background(), client)
33105	if err != nil {
33106		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure")
33107		return
33108	}
33109	if !done {
33110		ar.Response = future.Response()
33111		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesDeleteFuture")
33112		return
33113	}
33114	ar.Response = future.Response()
33115	return
33116}
33117
33118// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
33119type PublicIPPrefixListResult struct {
33120	autorest.Response `json:"-"`
33121	// Value - A list of public IP prefixes that exists in a resource group.
33122	Value *[]PublicIPPrefix `json:"value,omitempty"`
33123	// NextLink - The URL to get the next set of results.
33124	NextLink *string `json:"nextLink,omitempty"`
33125}
33126
33127// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values.
33128type PublicIPPrefixListResultIterator struct {
33129	i    int
33130	page PublicIPPrefixListResultPage
33131}
33132
33133// NextWithContext advances to the next value.  If there was an error making
33134// the request the iterator does not advance and the error is returned.
33135func (iter *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
33136	if tracing.IsEnabled() {
33137		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.NextWithContext")
33138		defer func() {
33139			sc := -1
33140			if iter.Response().Response.Response != nil {
33141				sc = iter.Response().Response.Response.StatusCode
33142			}
33143			tracing.EndSpan(ctx, sc, err)
33144		}()
33145	}
33146	iter.i++
33147	if iter.i < len(iter.page.Values()) {
33148		return nil
33149	}
33150	err = iter.page.NextWithContext(ctx)
33151	if err != nil {
33152		iter.i--
33153		return err
33154	}
33155	iter.i = 0
33156	return nil
33157}
33158
33159// Next advances to the next value.  If there was an error making
33160// the request the iterator does not advance and the error is returned.
33161// Deprecated: Use NextWithContext() instead.
33162func (iter *PublicIPPrefixListResultIterator) Next() error {
33163	return iter.NextWithContext(context.Background())
33164}
33165
33166// NotDone returns true if the enumeration should be started or is not yet complete.
33167func (iter PublicIPPrefixListResultIterator) NotDone() bool {
33168	return iter.page.NotDone() && iter.i < len(iter.page.Values())
33169}
33170
33171// Response returns the raw server response from the last page request.
33172func (iter PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult {
33173	return iter.page.Response()
33174}
33175
33176// Value returns the current value or a zero-initialized value if the
33177// iterator has advanced beyond the end of the collection.
33178func (iter PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
33179	if !iter.page.NotDone() {
33180		return PublicIPPrefix{}
33181	}
33182	return iter.page.Values()[iter.i]
33183}
33184
33185// Creates a new instance of the PublicIPPrefixListResultIterator type.
33186func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
33187	return PublicIPPrefixListResultIterator{page: page}
33188}
33189
33190// IsEmpty returns true if the ListResult contains no values.
33191func (piplr PublicIPPrefixListResult) IsEmpty() bool {
33192	return piplr.Value == nil || len(*piplr.Value) == 0
33193}
33194
33195// hasNextLink returns true if the NextLink is not empty.
33196func (piplr PublicIPPrefixListResult) hasNextLink() bool {
33197	return piplr.NextLink != nil && len(*piplr.NextLink) != 0
33198}
33199
33200// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
33201// It returns nil if no more results exist.
33202func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
33203	if !piplr.hasNextLink() {
33204		return nil, nil
33205	}
33206	return autorest.Prepare((&http.Request{}).WithContext(ctx),
33207		autorest.AsJSON(),
33208		autorest.AsGet(),
33209		autorest.WithBaseURL(to.String(piplr.NextLink)))
33210}
33211
33212// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
33213type PublicIPPrefixListResultPage struct {
33214	fn    func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
33215	piplr PublicIPPrefixListResult
33216}
33217
33218// NextWithContext advances to the next page of values.  If there was an error making
33219// the request the page does not advance and the error is returned.
33220func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
33221	if tracing.IsEnabled() {
33222		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext")
33223		defer func() {
33224			sc := -1
33225			if page.Response().Response.Response != nil {
33226				sc = page.Response().Response.Response.StatusCode
33227			}
33228			tracing.EndSpan(ctx, sc, err)
33229		}()
33230	}
33231	for {
33232		next, err := page.fn(ctx, page.piplr)
33233		if err != nil {
33234			return err
33235		}
33236		page.piplr = next
33237		if !next.hasNextLink() || !next.IsEmpty() {
33238			break
33239		}
33240	}
33241	return nil
33242}
33243
33244// Next advances to the next page of values.  If there was an error making
33245// the request the page does not advance and the error is returned.
33246// Deprecated: Use NextWithContext() instead.
33247func (page *PublicIPPrefixListResultPage) Next() error {
33248	return page.NextWithContext(context.Background())
33249}
33250
33251// NotDone returns true if the page enumeration should be started or is not yet complete.
33252func (page PublicIPPrefixListResultPage) NotDone() bool {
33253	return !page.piplr.IsEmpty()
33254}
33255
33256// Response returns the raw server response from the last page request.
33257func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult {
33258	return page.piplr
33259}
33260
33261// Values returns the slice of values for the current page or nil if there are no values.
33262func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
33263	if page.piplr.IsEmpty() {
33264		return nil
33265	}
33266	return *page.piplr.Value
33267}
33268
33269// Creates a new instance of the PublicIPPrefixListResultPage type.
33270func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
33271	return PublicIPPrefixListResultPage{
33272		fn:    getNextPage,
33273		piplr: cur,
33274	}
33275}
33276
33277// PublicIPPrefixPropertiesFormat public IP prefix properties.
33278type PublicIPPrefixPropertiesFormat struct {
33279	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
33280	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
33281	// IPTags - The list of tags associated with the public IP prefix.
33282	IPTags *[]IPTag `json:"ipTags,omitempty"`
33283	// PrefixLength - The Length of the Public IP Prefix.
33284	PrefixLength *int32 `json:"prefixLength,omitempty"`
33285	// IPPrefix - READ-ONLY; The allocated Prefix.
33286	IPPrefix *string `json:"ipPrefix,omitempty"`
33287	// PublicIPAddresses - READ-ONLY; The list of all referenced PublicIPAddresses.
33288	PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"`
33289	// LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix.
33290	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"`
33291	// CustomIPPrefix - The customIpPrefix that this prefix is associated with.
33292	CustomIPPrefix *SubResource `json:"customIPPrefix,omitempty"`
33293	// ResourceGUID - READ-ONLY; The resource GUID property of the public IP prefix resource.
33294	ResourceGUID *string `json:"resourceGuid,omitempty"`
33295	// ProvisioningState - READ-ONLY; The provisioning state of the public IP prefix resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
33296	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
33297	// NatGateway - NatGateway of Public IP Prefix.
33298	NatGateway *NatGateway `json:"natGateway,omitempty"`
33299}
33300
33301// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat.
33302func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
33303	objectMap := make(map[string]interface{})
33304	if pippf.PublicIPAddressVersion != "" {
33305		objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion
33306	}
33307	if pippf.IPTags != nil {
33308		objectMap["ipTags"] = pippf.IPTags
33309	}
33310	if pippf.PrefixLength != nil {
33311		objectMap["prefixLength"] = pippf.PrefixLength
33312	}
33313	if pippf.CustomIPPrefix != nil {
33314		objectMap["customIPPrefix"] = pippf.CustomIPPrefix
33315	}
33316	if pippf.NatGateway != nil {
33317		objectMap["natGateway"] = pippf.NatGateway
33318	}
33319	return json.Marshal(objectMap)
33320}
33321
33322// PublicIPPrefixSku SKU of a public IP prefix.
33323type PublicIPPrefixSku struct {
33324	// Name - Name of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuNameStandard'
33325	Name PublicIPPrefixSkuName `json:"name,omitempty"`
33326	// Tier - Tier of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuTierRegional', 'PublicIPPrefixSkuTierGlobal'
33327	Tier PublicIPPrefixSkuTier `json:"tier,omitempty"`
33328}
33329
33330// PutBastionShareableLinkAllFuture an abstraction for monitoring and retrieving the results of a
33331// long-running operation.
33332type PutBastionShareableLinkAllFuture struct {
33333	azure.FutureAPI
33334	// Result returns the result of the asynchronous operation.
33335	// If the operation has not completed it will return an error.
33336	Result func(BaseClient) (BastionShareableLinkListResultPage, error)
33337}
33338
33339// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33340func (future *PutBastionShareableLinkAllFuture) UnmarshalJSON(body []byte) error {
33341	var azFuture azure.Future
33342	if err := json.Unmarshal(body, &azFuture); err != nil {
33343		return err
33344	}
33345	future.FutureAPI = &azFuture
33346	future.Result = future.result
33347	return nil
33348}
33349
33350// result is the default implementation for PutBastionShareableLinkAllFuture.Result.
33351func (future *PutBastionShareableLinkAllFuture) result(client BaseClient) (bsllrp BastionShareableLinkListResultPage, err error) {
33352	var done bool
33353	done, err = future.DoneWithContext(context.Background(), client)
33354	if err != nil {
33355		err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkAllFuture", "Result", future.Response(), "Polling failure")
33356		return
33357	}
33358	if !done {
33359		bsllrp.bsllr.Response.Response = future.Response()
33360		err = azure.NewAsyncOpIncompleteError("network.PutBastionShareableLinkAllFuture")
33361		return
33362	}
33363	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33364	if bsllrp.bsllr.Response.Response, err = future.GetResult(sender); err == nil && bsllrp.bsllr.Response.Response.StatusCode != http.StatusNoContent {
33365		bsllrp, err = client.PutBastionShareableLinkResponder(bsllrp.bsllr.Response.Response)
33366		if err != nil {
33367			err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkAllFuture", "Result", bsllrp.bsllr.Response.Response, "Failure responding to request")
33368		}
33369	}
33370	return
33371}
33372
33373// PutBastionShareableLinkFuture an abstraction for monitoring and retrieving the results of a long-running
33374// operation.
33375type PutBastionShareableLinkFuture struct {
33376	azure.FutureAPI
33377	// Result returns the result of the asynchronous operation.
33378	// If the operation has not completed it will return an error.
33379	Result func(BaseClient) (BastionShareableLinkListResultPage, error)
33380}
33381
33382// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33383func (future *PutBastionShareableLinkFuture) UnmarshalJSON(body []byte) error {
33384	var azFuture azure.Future
33385	if err := json.Unmarshal(body, &azFuture); err != nil {
33386		return err
33387	}
33388	future.FutureAPI = &azFuture
33389	future.Result = future.result
33390	return nil
33391}
33392
33393// result is the default implementation for PutBastionShareableLinkFuture.Result.
33394func (future *PutBastionShareableLinkFuture) result(client BaseClient) (bsllrp BastionShareableLinkListResultPage, err error) {
33395	var done bool
33396	done, err = future.DoneWithContext(context.Background(), client)
33397	if err != nil {
33398		err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkFuture", "Result", future.Response(), "Polling failure")
33399		return
33400	}
33401	if !done {
33402		bsllrp.bsllr.Response.Response = future.Response()
33403		err = azure.NewAsyncOpIncompleteError("network.PutBastionShareableLinkFuture")
33404		return
33405	}
33406	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33407	if bsllrp.bsllr.Response.Response, err = future.GetResult(sender); err == nil && bsllrp.bsllr.Response.Response.StatusCode != http.StatusNoContent {
33408		bsllrp, err = client.PutBastionShareableLinkResponder(bsllrp.bsllr.Response.Response)
33409		if err != nil {
33410			err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkFuture", "Result", bsllrp.bsllr.Response.Response, "Failure responding to request")
33411		}
33412	}
33413	return
33414}
33415
33416// QosIPRange qos Traffic Profiler IP Range properties.
33417type QosIPRange struct {
33418	// StartIP - Start IP Address.
33419	StartIP *string `json:"startIP,omitempty"`
33420	// EndIP - End IP Address.
33421	EndIP *string `json:"endIP,omitempty"`
33422}
33423
33424// QosPortRange qos Traffic Profiler Port range properties.
33425type QosPortRange struct {
33426	// Start - Qos Port Range start.
33427	Start *int32 `json:"start,omitempty"`
33428	// End - Qos Port Range end.
33429	End *int32 `json:"end,omitempty"`
33430}
33431
33432// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
33433type QueryTroubleshootingParameters struct {
33434	// TargetResourceID - The target resource ID to query the troubleshooting result.
33435	TargetResourceID *string `json:"targetResourceId,omitempty"`
33436}
33437
33438// RadiusServer radius Server Settings.
33439type RadiusServer struct {
33440	// RadiusServerAddress - The address of this radius server.
33441	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
33442	// RadiusServerScore - The initial score assigned to this radius server.
33443	RadiusServerScore *int64 `json:"radiusServerScore,omitempty"`
33444	// RadiusServerSecret - The secret used for this radius server.
33445	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
33446}
33447
33448// RecordSet a collective group of information about the record set information.
33449type RecordSet struct {
33450	// RecordType - Resource record type.
33451	RecordType *string `json:"recordType,omitempty"`
33452	// RecordSetName - Recordset name.
33453	RecordSetName *string `json:"recordSetName,omitempty"`
33454	// Fqdn - Fqdn that resolves to private endpoint ip address.
33455	Fqdn *string `json:"fqdn,omitempty"`
33456	// ProvisioningState - READ-ONLY; The provisioning state of the recordset. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
33457	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
33458	// TTL - Recordset time to live.
33459	TTL *int32 `json:"ttl,omitempty"`
33460	// IPAddresses - The private ip address of the private endpoint.
33461	IPAddresses *[]string `json:"ipAddresses,omitempty"`
33462}
33463
33464// MarshalJSON is the custom marshaler for RecordSet.
33465func (rs RecordSet) MarshalJSON() ([]byte, error) {
33466	objectMap := make(map[string]interface{})
33467	if rs.RecordType != nil {
33468		objectMap["recordType"] = rs.RecordType
33469	}
33470	if rs.RecordSetName != nil {
33471		objectMap["recordSetName"] = rs.RecordSetName
33472	}
33473	if rs.Fqdn != nil {
33474		objectMap["fqdn"] = rs.Fqdn
33475	}
33476	if rs.TTL != nil {
33477		objectMap["ttl"] = rs.TTL
33478	}
33479	if rs.IPAddresses != nil {
33480		objectMap["ipAddresses"] = rs.IPAddresses
33481	}
33482	return json.Marshal(objectMap)
33483}
33484
33485// ReferencedPublicIPAddress reference to a public IP address.
33486type ReferencedPublicIPAddress struct {
33487	// ID - The PublicIPAddress Reference.
33488	ID *string `json:"id,omitempty"`
33489}
33490
33491// Resource common resource representation.
33492type Resource struct {
33493	// ID - Resource ID.
33494	ID *string `json:"id,omitempty"`
33495	// Name - READ-ONLY; Resource name.
33496	Name *string `json:"name,omitempty"`
33497	// Type - READ-ONLY; Resource type.
33498	Type *string `json:"type,omitempty"`
33499	// Location - Resource location.
33500	Location *string `json:"location,omitempty"`
33501	// Tags - Resource tags.
33502	Tags map[string]*string `json:"tags"`
33503}
33504
33505// MarshalJSON is the custom marshaler for Resource.
33506func (r Resource) MarshalJSON() ([]byte, error) {
33507	objectMap := make(map[string]interface{})
33508	if r.ID != nil {
33509		objectMap["id"] = r.ID
33510	}
33511	if r.Location != nil {
33512		objectMap["location"] = r.Location
33513	}
33514	if r.Tags != nil {
33515		objectMap["tags"] = r.Tags
33516	}
33517	return json.Marshal(objectMap)
33518}
33519
33520// ResourceNavigationLink resourceNavigationLink resource.
33521type ResourceNavigationLink struct {
33522	// ResourceNavigationLinkFormat - Resource navigation link properties format.
33523	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
33524	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
33525	Name *string `json:"name,omitempty"`
33526	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
33527	Etag *string `json:"etag,omitempty"`
33528	// Type - READ-ONLY; Resource type.
33529	Type *string `json:"type,omitempty"`
33530	// ID - Resource ID.
33531	ID *string `json:"id,omitempty"`
33532}
33533
33534// MarshalJSON is the custom marshaler for ResourceNavigationLink.
33535func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
33536	objectMap := make(map[string]interface{})
33537	if rnl.ResourceNavigationLinkFormat != nil {
33538		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
33539	}
33540	if rnl.Name != nil {
33541		objectMap["name"] = rnl.Name
33542	}
33543	if rnl.ID != nil {
33544		objectMap["id"] = rnl.ID
33545	}
33546	return json.Marshal(objectMap)
33547}
33548
33549// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
33550func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
33551	var m map[string]*json.RawMessage
33552	err := json.Unmarshal(body, &m)
33553	if err != nil {
33554		return err
33555	}
33556	for k, v := range m {
33557		switch k {
33558		case "properties":
33559			if v != nil {
33560				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
33561				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
33562				if err != nil {
33563					return err
33564				}
33565				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
33566			}
33567		case "name":
33568			if v != nil {
33569				var name string
33570				err = json.Unmarshal(*v, &name)
33571				if err != nil {
33572					return err
33573				}
33574				rnl.Name = &name
33575			}
33576		case "etag":
33577			if v != nil {
33578				var etag string
33579				err = json.Unmarshal(*v, &etag)
33580				if err != nil {
33581					return err
33582				}
33583				rnl.Etag = &etag
33584			}
33585		case "type":
33586			if v != nil {
33587				var typeVar string
33588				err = json.Unmarshal(*v, &typeVar)
33589				if err != nil {
33590					return err
33591				}
33592				rnl.Type = &typeVar
33593			}
33594		case "id":
33595			if v != nil {
33596				var ID string
33597				err = json.Unmarshal(*v, &ID)
33598				if err != nil {
33599					return err
33600				}
33601				rnl.ID = &ID
33602			}
33603		}
33604	}
33605
33606	return nil
33607}
33608
33609// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
33610type ResourceNavigationLinkFormat struct {
33611	// LinkedResourceType - Resource type of the linked resource.
33612	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
33613	// Link - Link to the external resource.
33614	Link *string `json:"link,omitempty"`
33615	// ProvisioningState - READ-ONLY; The provisioning state of the resource navigation link resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
33616	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
33617}
33618
33619// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
33620func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
33621	objectMap := make(map[string]interface{})
33622	if rnlf.LinkedResourceType != nil {
33623		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
33624	}
33625	if rnlf.Link != nil {
33626		objectMap["link"] = rnlf.Link
33627	}
33628	return json.Marshal(objectMap)
33629}
33630
33631// ResourceNavigationLinksListResult response for ResourceNavigationLinks_List operation.
33632type ResourceNavigationLinksListResult struct {
33633	autorest.Response `json:"-"`
33634	// Value - The resource navigation links in a subnet.
33635	Value *[]ResourceNavigationLink `json:"value,omitempty"`
33636	// NextLink - READ-ONLY; The URL to get the next set of results.
33637	NextLink *string `json:"nextLink,omitempty"`
33638}
33639
33640// MarshalJSON is the custom marshaler for ResourceNavigationLinksListResult.
33641func (rnllr ResourceNavigationLinksListResult) MarshalJSON() ([]byte, error) {
33642	objectMap := make(map[string]interface{})
33643	if rnllr.Value != nil {
33644		objectMap["value"] = rnllr.Value
33645	}
33646	return json.Marshal(objectMap)
33647}
33648
33649// ResourceSet the base resource set for visibility and auto-approval.
33650type ResourceSet struct {
33651	// Subscriptions - The list of subscriptions.
33652	Subscriptions *[]string `json:"subscriptions,omitempty"`
33653}
33654
33655// RetentionPolicyParameters parameters that define the retention policy for flow log.
33656type RetentionPolicyParameters struct {
33657	// Days - Number of days to retain flow log records.
33658	Days *int32 `json:"days,omitempty"`
33659	// Enabled - Flag to enable/disable retention.
33660	Enabled *bool `json:"enabled,omitempty"`
33661}
33662
33663// Route route resource.
33664type Route struct {
33665	autorest.Response `json:"-"`
33666	// RoutePropertiesFormat - Properties of the route.
33667	*RoutePropertiesFormat `json:"properties,omitempty"`
33668	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
33669	Name *string `json:"name,omitempty"`
33670	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
33671	Etag *string `json:"etag,omitempty"`
33672	// Type - The type of the resource.
33673	Type *string `json:"type,omitempty"`
33674	// ID - Resource ID.
33675	ID *string `json:"id,omitempty"`
33676}
33677
33678// MarshalJSON is the custom marshaler for Route.
33679func (r Route) MarshalJSON() ([]byte, error) {
33680	objectMap := make(map[string]interface{})
33681	if r.RoutePropertiesFormat != nil {
33682		objectMap["properties"] = r.RoutePropertiesFormat
33683	}
33684	if r.Name != nil {
33685		objectMap["name"] = r.Name
33686	}
33687	if r.Type != nil {
33688		objectMap["type"] = r.Type
33689	}
33690	if r.ID != nil {
33691		objectMap["id"] = r.ID
33692	}
33693	return json.Marshal(objectMap)
33694}
33695
33696// UnmarshalJSON is the custom unmarshaler for Route struct.
33697func (r *Route) UnmarshalJSON(body []byte) error {
33698	var m map[string]*json.RawMessage
33699	err := json.Unmarshal(body, &m)
33700	if err != nil {
33701		return err
33702	}
33703	for k, v := range m {
33704		switch k {
33705		case "properties":
33706			if v != nil {
33707				var routePropertiesFormat RoutePropertiesFormat
33708				err = json.Unmarshal(*v, &routePropertiesFormat)
33709				if err != nil {
33710					return err
33711				}
33712				r.RoutePropertiesFormat = &routePropertiesFormat
33713			}
33714		case "name":
33715			if v != nil {
33716				var name string
33717				err = json.Unmarshal(*v, &name)
33718				if err != nil {
33719					return err
33720				}
33721				r.Name = &name
33722			}
33723		case "etag":
33724			if v != nil {
33725				var etag string
33726				err = json.Unmarshal(*v, &etag)
33727				if err != nil {
33728					return err
33729				}
33730				r.Etag = &etag
33731			}
33732		case "type":
33733			if v != nil {
33734				var typeVar string
33735				err = json.Unmarshal(*v, &typeVar)
33736				if err != nil {
33737					return err
33738				}
33739				r.Type = &typeVar
33740			}
33741		case "id":
33742			if v != nil {
33743				var ID string
33744				err = json.Unmarshal(*v, &ID)
33745				if err != nil {
33746					return err
33747				}
33748				r.ID = &ID
33749			}
33750		}
33751	}
33752
33753	return nil
33754}
33755
33756// RouteFilter route Filter Resource.
33757type RouteFilter struct {
33758	autorest.Response `json:"-"`
33759	// RouteFilterPropertiesFormat - Properties of the route filter.
33760	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
33761	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
33762	Etag *string `json:"etag,omitempty"`
33763	// ID - Resource ID.
33764	ID *string `json:"id,omitempty"`
33765	// Name - READ-ONLY; Resource name.
33766	Name *string `json:"name,omitempty"`
33767	// Type - READ-ONLY; Resource type.
33768	Type *string `json:"type,omitempty"`
33769	// Location - Resource location.
33770	Location *string `json:"location,omitempty"`
33771	// Tags - Resource tags.
33772	Tags map[string]*string `json:"tags"`
33773}
33774
33775// MarshalJSON is the custom marshaler for RouteFilter.
33776func (rf RouteFilter) MarshalJSON() ([]byte, error) {
33777	objectMap := make(map[string]interface{})
33778	if rf.RouteFilterPropertiesFormat != nil {
33779		objectMap["properties"] = rf.RouteFilterPropertiesFormat
33780	}
33781	if rf.ID != nil {
33782		objectMap["id"] = rf.ID
33783	}
33784	if rf.Location != nil {
33785		objectMap["location"] = rf.Location
33786	}
33787	if rf.Tags != nil {
33788		objectMap["tags"] = rf.Tags
33789	}
33790	return json.Marshal(objectMap)
33791}
33792
33793// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
33794func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
33795	var m map[string]*json.RawMessage
33796	err := json.Unmarshal(body, &m)
33797	if err != nil {
33798		return err
33799	}
33800	for k, v := range m {
33801		switch k {
33802		case "properties":
33803			if v != nil {
33804				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
33805				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
33806				if err != nil {
33807					return err
33808				}
33809				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
33810			}
33811		case "etag":
33812			if v != nil {
33813				var etag string
33814				err = json.Unmarshal(*v, &etag)
33815				if err != nil {
33816					return err
33817				}
33818				rf.Etag = &etag
33819			}
33820		case "id":
33821			if v != nil {
33822				var ID string
33823				err = json.Unmarshal(*v, &ID)
33824				if err != nil {
33825					return err
33826				}
33827				rf.ID = &ID
33828			}
33829		case "name":
33830			if v != nil {
33831				var name string
33832				err = json.Unmarshal(*v, &name)
33833				if err != nil {
33834					return err
33835				}
33836				rf.Name = &name
33837			}
33838		case "type":
33839			if v != nil {
33840				var typeVar string
33841				err = json.Unmarshal(*v, &typeVar)
33842				if err != nil {
33843					return err
33844				}
33845				rf.Type = &typeVar
33846			}
33847		case "location":
33848			if v != nil {
33849				var location string
33850				err = json.Unmarshal(*v, &location)
33851				if err != nil {
33852					return err
33853				}
33854				rf.Location = &location
33855			}
33856		case "tags":
33857			if v != nil {
33858				var tags map[string]*string
33859				err = json.Unmarshal(*v, &tags)
33860				if err != nil {
33861					return err
33862				}
33863				rf.Tags = tags
33864			}
33865		}
33866	}
33867
33868	return nil
33869}
33870
33871// RouteFilterListResult response for the ListRouteFilters API service call.
33872type RouteFilterListResult struct {
33873	autorest.Response `json:"-"`
33874	// Value - A list of route filters in a resource group.
33875	Value *[]RouteFilter `json:"value,omitempty"`
33876	// NextLink - The URL to get the next set of results.
33877	NextLink *string `json:"nextLink,omitempty"`
33878}
33879
33880// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
33881type RouteFilterListResultIterator struct {
33882	i    int
33883	page RouteFilterListResultPage
33884}
33885
33886// NextWithContext advances to the next value.  If there was an error making
33887// the request the iterator does not advance and the error is returned.
33888func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
33889	if tracing.IsEnabled() {
33890		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
33891		defer func() {
33892			sc := -1
33893			if iter.Response().Response.Response != nil {
33894				sc = iter.Response().Response.Response.StatusCode
33895			}
33896			tracing.EndSpan(ctx, sc, err)
33897		}()
33898	}
33899	iter.i++
33900	if iter.i < len(iter.page.Values()) {
33901		return nil
33902	}
33903	err = iter.page.NextWithContext(ctx)
33904	if err != nil {
33905		iter.i--
33906		return err
33907	}
33908	iter.i = 0
33909	return nil
33910}
33911
33912// Next advances to the next value.  If there was an error making
33913// the request the iterator does not advance and the error is returned.
33914// Deprecated: Use NextWithContext() instead.
33915func (iter *RouteFilterListResultIterator) Next() error {
33916	return iter.NextWithContext(context.Background())
33917}
33918
33919// NotDone returns true if the enumeration should be started or is not yet complete.
33920func (iter RouteFilterListResultIterator) NotDone() bool {
33921	return iter.page.NotDone() && iter.i < len(iter.page.Values())
33922}
33923
33924// Response returns the raw server response from the last page request.
33925func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
33926	return iter.page.Response()
33927}
33928
33929// Value returns the current value or a zero-initialized value if the
33930// iterator has advanced beyond the end of the collection.
33931func (iter RouteFilterListResultIterator) Value() RouteFilter {
33932	if !iter.page.NotDone() {
33933		return RouteFilter{}
33934	}
33935	return iter.page.Values()[iter.i]
33936}
33937
33938// Creates a new instance of the RouteFilterListResultIterator type.
33939func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
33940	return RouteFilterListResultIterator{page: page}
33941}
33942
33943// IsEmpty returns true if the ListResult contains no values.
33944func (rflr RouteFilterListResult) IsEmpty() bool {
33945	return rflr.Value == nil || len(*rflr.Value) == 0
33946}
33947
33948// hasNextLink returns true if the NextLink is not empty.
33949func (rflr RouteFilterListResult) hasNextLink() bool {
33950	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
33951}
33952
33953// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
33954// It returns nil if no more results exist.
33955func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
33956	if !rflr.hasNextLink() {
33957		return nil, nil
33958	}
33959	return autorest.Prepare((&http.Request{}).WithContext(ctx),
33960		autorest.AsJSON(),
33961		autorest.AsGet(),
33962		autorest.WithBaseURL(to.String(rflr.NextLink)))
33963}
33964
33965// RouteFilterListResultPage contains a page of RouteFilter values.
33966type RouteFilterListResultPage struct {
33967	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
33968	rflr RouteFilterListResult
33969}
33970
33971// NextWithContext advances to the next page of values.  If there was an error making
33972// the request the page does not advance and the error is returned.
33973func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
33974	if tracing.IsEnabled() {
33975		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
33976		defer func() {
33977			sc := -1
33978			if page.Response().Response.Response != nil {
33979				sc = page.Response().Response.Response.StatusCode
33980			}
33981			tracing.EndSpan(ctx, sc, err)
33982		}()
33983	}
33984	for {
33985		next, err := page.fn(ctx, page.rflr)
33986		if err != nil {
33987			return err
33988		}
33989		page.rflr = next
33990		if !next.hasNextLink() || !next.IsEmpty() {
33991			break
33992		}
33993	}
33994	return nil
33995}
33996
33997// Next advances to the next page of values.  If there was an error making
33998// the request the page does not advance and the error is returned.
33999// Deprecated: Use NextWithContext() instead.
34000func (page *RouteFilterListResultPage) Next() error {
34001	return page.NextWithContext(context.Background())
34002}
34003
34004// NotDone returns true if the page enumeration should be started or is not yet complete.
34005func (page RouteFilterListResultPage) NotDone() bool {
34006	return !page.rflr.IsEmpty()
34007}
34008
34009// Response returns the raw server response from the last page request.
34010func (page RouteFilterListResultPage) Response() RouteFilterListResult {
34011	return page.rflr
34012}
34013
34014// Values returns the slice of values for the current page or nil if there are no values.
34015func (page RouteFilterListResultPage) Values() []RouteFilter {
34016	if page.rflr.IsEmpty() {
34017		return nil
34018	}
34019	return *page.rflr.Value
34020}
34021
34022// Creates a new instance of the RouteFilterListResultPage type.
34023func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
34024	return RouteFilterListResultPage{
34025		fn:   getNextPage,
34026		rflr: cur,
34027	}
34028}
34029
34030// RouteFilterPropertiesFormat route Filter Resource.
34031type RouteFilterPropertiesFormat struct {
34032	// Rules - Collection of RouteFilterRules contained within a route filter.
34033	Rules *[]RouteFilterRule `json:"rules,omitempty"`
34034	// Peerings - READ-ONLY; A collection of references to express route circuit peerings.
34035	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
34036	// Ipv6Peerings - READ-ONLY; A collection of references to express route circuit ipv6 peerings.
34037	Ipv6Peerings *[]ExpressRouteCircuitPeering `json:"ipv6Peerings,omitempty"`
34038	// ProvisioningState - READ-ONLY; The provisioning state of the route filter resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
34039	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34040}
34041
34042// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
34043func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
34044	objectMap := make(map[string]interface{})
34045	if rfpf.Rules != nil {
34046		objectMap["rules"] = rfpf.Rules
34047	}
34048	return json.Marshal(objectMap)
34049}
34050
34051// RouteFilterRule route Filter Rule Resource.
34052type RouteFilterRule struct {
34053	autorest.Response `json:"-"`
34054	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
34055	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
34056	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
34057	Name *string `json:"name,omitempty"`
34058	// Location - Resource location.
34059	Location *string `json:"location,omitempty"`
34060	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
34061	Etag *string `json:"etag,omitempty"`
34062	// ID - Resource ID.
34063	ID *string `json:"id,omitempty"`
34064}
34065
34066// MarshalJSON is the custom marshaler for RouteFilterRule.
34067func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
34068	objectMap := make(map[string]interface{})
34069	if rfr.RouteFilterRulePropertiesFormat != nil {
34070		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
34071	}
34072	if rfr.Name != nil {
34073		objectMap["name"] = rfr.Name
34074	}
34075	if rfr.Location != nil {
34076		objectMap["location"] = rfr.Location
34077	}
34078	if rfr.ID != nil {
34079		objectMap["id"] = rfr.ID
34080	}
34081	return json.Marshal(objectMap)
34082}
34083
34084// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
34085func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
34086	var m map[string]*json.RawMessage
34087	err := json.Unmarshal(body, &m)
34088	if err != nil {
34089		return err
34090	}
34091	for k, v := range m {
34092		switch k {
34093		case "properties":
34094			if v != nil {
34095				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
34096				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
34097				if err != nil {
34098					return err
34099				}
34100				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
34101			}
34102		case "name":
34103			if v != nil {
34104				var name string
34105				err = json.Unmarshal(*v, &name)
34106				if err != nil {
34107					return err
34108				}
34109				rfr.Name = &name
34110			}
34111		case "location":
34112			if v != nil {
34113				var location string
34114				err = json.Unmarshal(*v, &location)
34115				if err != nil {
34116					return err
34117				}
34118				rfr.Location = &location
34119			}
34120		case "etag":
34121			if v != nil {
34122				var etag string
34123				err = json.Unmarshal(*v, &etag)
34124				if err != nil {
34125					return err
34126				}
34127				rfr.Etag = &etag
34128			}
34129		case "id":
34130			if v != nil {
34131				var ID string
34132				err = json.Unmarshal(*v, &ID)
34133				if err != nil {
34134					return err
34135				}
34136				rfr.ID = &ID
34137			}
34138		}
34139	}
34140
34141	return nil
34142}
34143
34144// RouteFilterRuleListResult response for the ListRouteFilterRules API service call.
34145type RouteFilterRuleListResult struct {
34146	autorest.Response `json:"-"`
34147	// Value - A list of RouteFilterRules in a resource group.
34148	Value *[]RouteFilterRule `json:"value,omitempty"`
34149	// NextLink - The URL to get the next set of results.
34150	NextLink *string `json:"nextLink,omitempty"`
34151}
34152
34153// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
34154type RouteFilterRuleListResultIterator struct {
34155	i    int
34156	page RouteFilterRuleListResultPage
34157}
34158
34159// NextWithContext advances to the next value.  If there was an error making
34160// the request the iterator does not advance and the error is returned.
34161func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
34162	if tracing.IsEnabled() {
34163		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
34164		defer func() {
34165			sc := -1
34166			if iter.Response().Response.Response != nil {
34167				sc = iter.Response().Response.Response.StatusCode
34168			}
34169			tracing.EndSpan(ctx, sc, err)
34170		}()
34171	}
34172	iter.i++
34173	if iter.i < len(iter.page.Values()) {
34174		return nil
34175	}
34176	err = iter.page.NextWithContext(ctx)
34177	if err != nil {
34178		iter.i--
34179		return err
34180	}
34181	iter.i = 0
34182	return nil
34183}
34184
34185// Next advances to the next value.  If there was an error making
34186// the request the iterator does not advance and the error is returned.
34187// Deprecated: Use NextWithContext() instead.
34188func (iter *RouteFilterRuleListResultIterator) Next() error {
34189	return iter.NextWithContext(context.Background())
34190}
34191
34192// NotDone returns true if the enumeration should be started or is not yet complete.
34193func (iter RouteFilterRuleListResultIterator) NotDone() bool {
34194	return iter.page.NotDone() && iter.i < len(iter.page.Values())
34195}
34196
34197// Response returns the raw server response from the last page request.
34198func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
34199	return iter.page.Response()
34200}
34201
34202// Value returns the current value or a zero-initialized value if the
34203// iterator has advanced beyond the end of the collection.
34204func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
34205	if !iter.page.NotDone() {
34206		return RouteFilterRule{}
34207	}
34208	return iter.page.Values()[iter.i]
34209}
34210
34211// Creates a new instance of the RouteFilterRuleListResultIterator type.
34212func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
34213	return RouteFilterRuleListResultIterator{page: page}
34214}
34215
34216// IsEmpty returns true if the ListResult contains no values.
34217func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
34218	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
34219}
34220
34221// hasNextLink returns true if the NextLink is not empty.
34222func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
34223	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
34224}
34225
34226// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
34227// It returns nil if no more results exist.
34228func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
34229	if !rfrlr.hasNextLink() {
34230		return nil, nil
34231	}
34232	return autorest.Prepare((&http.Request{}).WithContext(ctx),
34233		autorest.AsJSON(),
34234		autorest.AsGet(),
34235		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
34236}
34237
34238// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
34239type RouteFilterRuleListResultPage struct {
34240	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
34241	rfrlr RouteFilterRuleListResult
34242}
34243
34244// NextWithContext advances to the next page of values.  If there was an error making
34245// the request the page does not advance and the error is returned.
34246func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
34247	if tracing.IsEnabled() {
34248		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
34249		defer func() {
34250			sc := -1
34251			if page.Response().Response.Response != nil {
34252				sc = page.Response().Response.Response.StatusCode
34253			}
34254			tracing.EndSpan(ctx, sc, err)
34255		}()
34256	}
34257	for {
34258		next, err := page.fn(ctx, page.rfrlr)
34259		if err != nil {
34260			return err
34261		}
34262		page.rfrlr = next
34263		if !next.hasNextLink() || !next.IsEmpty() {
34264			break
34265		}
34266	}
34267	return nil
34268}
34269
34270// Next advances to the next page of values.  If there was an error making
34271// the request the page does not advance and the error is returned.
34272// Deprecated: Use NextWithContext() instead.
34273func (page *RouteFilterRuleListResultPage) Next() error {
34274	return page.NextWithContext(context.Background())
34275}
34276
34277// NotDone returns true if the page enumeration should be started or is not yet complete.
34278func (page RouteFilterRuleListResultPage) NotDone() bool {
34279	return !page.rfrlr.IsEmpty()
34280}
34281
34282// Response returns the raw server response from the last page request.
34283func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
34284	return page.rfrlr
34285}
34286
34287// Values returns the slice of values for the current page or nil if there are no values.
34288func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
34289	if page.rfrlr.IsEmpty() {
34290		return nil
34291	}
34292	return *page.rfrlr.Value
34293}
34294
34295// Creates a new instance of the RouteFilterRuleListResultPage type.
34296func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
34297	return RouteFilterRuleListResultPage{
34298		fn:    getNextPage,
34299		rfrlr: cur,
34300	}
34301}
34302
34303// RouteFilterRulePropertiesFormat route Filter Rule Resource.
34304type RouteFilterRulePropertiesFormat struct {
34305	// Access - The access type of the rule. Possible values include: 'AccessAllow', 'AccessDeny'
34306	Access Access `json:"access,omitempty"`
34307	// RouteFilterRuleType - The rule type of the rule.
34308	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
34309	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
34310	Communities *[]string `json:"communities,omitempty"`
34311	// ProvisioningState - READ-ONLY; The provisioning state of the route filter rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
34312	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34313}
34314
34315// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
34316func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
34317	objectMap := make(map[string]interface{})
34318	if rfrpf.Access != "" {
34319		objectMap["access"] = rfrpf.Access
34320	}
34321	if rfrpf.RouteFilterRuleType != nil {
34322		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
34323	}
34324	if rfrpf.Communities != nil {
34325		objectMap["communities"] = rfrpf.Communities
34326	}
34327	return json.Marshal(objectMap)
34328}
34329
34330// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
34331// long-running operation.
34332type RouteFilterRulesCreateOrUpdateFuture struct {
34333	azure.FutureAPI
34334	// Result returns the result of the asynchronous operation.
34335	// If the operation has not completed it will return an error.
34336	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
34337}
34338
34339// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34340func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
34341	var azFuture azure.Future
34342	if err := json.Unmarshal(body, &azFuture); err != nil {
34343		return err
34344	}
34345	future.FutureAPI = &azFuture
34346	future.Result = future.result
34347	return nil
34348}
34349
34350// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result.
34351func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
34352	var done bool
34353	done, err = future.DoneWithContext(context.Background(), client)
34354	if err != nil {
34355		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
34356		return
34357	}
34358	if !done {
34359		rfr.Response.Response = future.Response()
34360		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
34361		return
34362	}
34363	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34364	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
34365		rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
34366		if err != nil {
34367			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
34368		}
34369	}
34370	return
34371}
34372
34373// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
34374// operation.
34375type RouteFilterRulesDeleteFuture struct {
34376	azure.FutureAPI
34377	// Result returns the result of the asynchronous operation.
34378	// If the operation has not completed it will return an error.
34379	Result func(RouteFilterRulesClient) (autorest.Response, error)
34380}
34381
34382// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34383func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error {
34384	var azFuture azure.Future
34385	if err := json.Unmarshal(body, &azFuture); err != nil {
34386		return err
34387	}
34388	future.FutureAPI = &azFuture
34389	future.Result = future.result
34390	return nil
34391}
34392
34393// result is the default implementation for RouteFilterRulesDeleteFuture.Result.
34394func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
34395	var done bool
34396	done, err = future.DoneWithContext(context.Background(), client)
34397	if err != nil {
34398		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
34399		return
34400	}
34401	if !done {
34402		ar.Response = future.Response()
34403		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
34404		return
34405	}
34406	ar.Response = future.Response()
34407	return
34408}
34409
34410// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
34411// long-running operation.
34412type RouteFiltersCreateOrUpdateFuture struct {
34413	azure.FutureAPI
34414	// Result returns the result of the asynchronous operation.
34415	// If the operation has not completed it will return an error.
34416	Result func(RouteFiltersClient) (RouteFilter, error)
34417}
34418
34419// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34420func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
34421	var azFuture azure.Future
34422	if err := json.Unmarshal(body, &azFuture); err != nil {
34423		return err
34424	}
34425	future.FutureAPI = &azFuture
34426	future.Result = future.result
34427	return nil
34428}
34429
34430// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result.
34431func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
34432	var done bool
34433	done, err = future.DoneWithContext(context.Background(), client)
34434	if err != nil {
34435		err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
34436		return
34437	}
34438	if !done {
34439		rf.Response.Response = future.Response()
34440		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
34441		return
34442	}
34443	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34444	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
34445		rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
34446		if err != nil {
34447			err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
34448		}
34449	}
34450	return
34451}
34452
34453// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
34454// operation.
34455type RouteFiltersDeleteFuture struct {
34456	azure.FutureAPI
34457	// Result returns the result of the asynchronous operation.
34458	// If the operation has not completed it will return an error.
34459	Result func(RouteFiltersClient) (autorest.Response, error)
34460}
34461
34462// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34463func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error {
34464	var azFuture azure.Future
34465	if err := json.Unmarshal(body, &azFuture); err != nil {
34466		return err
34467	}
34468	future.FutureAPI = &azFuture
34469	future.Result = future.result
34470	return nil
34471}
34472
34473// result is the default implementation for RouteFiltersDeleteFuture.Result.
34474func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) {
34475	var done bool
34476	done, err = future.DoneWithContext(context.Background(), client)
34477	if err != nil {
34478		err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
34479		return
34480	}
34481	if !done {
34482		ar.Response = future.Response()
34483		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
34484		return
34485	}
34486	ar.Response = future.Response()
34487	return
34488}
34489
34490// RouteListResult response for the ListRoute API service call.
34491type RouteListResult struct {
34492	autorest.Response `json:"-"`
34493	// Value - A list of routes in a resource group.
34494	Value *[]Route `json:"value,omitempty"`
34495	// NextLink - The URL to get the next set of results.
34496	NextLink *string `json:"nextLink,omitempty"`
34497}
34498
34499// RouteListResultIterator provides access to a complete listing of Route values.
34500type RouteListResultIterator struct {
34501	i    int
34502	page RouteListResultPage
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 *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
34508	if tracing.IsEnabled() {
34509		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.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 *RouteListResultIterator) 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 RouteListResultIterator) 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 RouteListResultIterator) Response() RouteListResult {
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 RouteListResultIterator) Value() Route {
34551	if !iter.page.NotDone() {
34552		return Route{}
34553	}
34554	return iter.page.Values()[iter.i]
34555}
34556
34557// Creates a new instance of the RouteListResultIterator type.
34558func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
34559	return RouteListResultIterator{page: page}
34560}
34561
34562// IsEmpty returns true if the ListResult contains no values.
34563func (rlr RouteListResult) IsEmpty() bool {
34564	return rlr.Value == nil || len(*rlr.Value) == 0
34565}
34566
34567// hasNextLink returns true if the NextLink is not empty.
34568func (rlr RouteListResult) hasNextLink() bool {
34569	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
34570}
34571
34572// routeListResultPreparer prepares a request to retrieve the next set of results.
34573// It returns nil if no more results exist.
34574func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
34575	if !rlr.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(rlr.NextLink)))
34582}
34583
34584// RouteListResultPage contains a page of Route values.
34585type RouteListResultPage struct {
34586	fn  func(context.Context, RouteListResult) (RouteListResult, error)
34587	rlr RouteListResult
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 *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
34593	if tracing.IsEnabled() {
34594		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.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.rlr)
34605		if err != nil {
34606			return err
34607		}
34608		page.rlr = 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 *RouteListResultPage) 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 RouteListResultPage) NotDone() bool {
34625	return !page.rlr.IsEmpty()
34626}
34627
34628// Response returns the raw server response from the last page request.
34629func (page RouteListResultPage) Response() RouteListResult {
34630	return page.rlr
34631}
34632
34633// Values returns the slice of values for the current page or nil if there are no values.
34634func (page RouteListResultPage) Values() []Route {
34635	if page.rlr.IsEmpty() {
34636		return nil
34637	}
34638	return *page.rlr.Value
34639}
34640
34641// Creates a new instance of the RouteListResultPage type.
34642func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
34643	return RouteListResultPage{
34644		fn:  getNextPage,
34645		rlr: cur,
34646	}
34647}
34648
34649// RoutePropertiesFormat route resource.
34650type RoutePropertiesFormat struct {
34651	// AddressPrefix - The destination CIDR to which the route applies.
34652	AddressPrefix *string `json:"addressPrefix,omitempty"`
34653	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
34654	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
34655	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
34656	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
34657	// ProvisioningState - READ-ONLY; The provisioning state of the route resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
34658	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34659	// HasBgpOverride - A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
34660	HasBgpOverride *bool `json:"hasBgpOverride,omitempty"`
34661}
34662
34663// MarshalJSON is the custom marshaler for RoutePropertiesFormat.
34664func (rpf RoutePropertiesFormat) MarshalJSON() ([]byte, error) {
34665	objectMap := make(map[string]interface{})
34666	if rpf.AddressPrefix != nil {
34667		objectMap["addressPrefix"] = rpf.AddressPrefix
34668	}
34669	if rpf.NextHopType != "" {
34670		objectMap["nextHopType"] = rpf.NextHopType
34671	}
34672	if rpf.NextHopIPAddress != nil {
34673		objectMap["nextHopIpAddress"] = rpf.NextHopIPAddress
34674	}
34675	if rpf.HasBgpOverride != nil {
34676		objectMap["hasBgpOverride"] = rpf.HasBgpOverride
34677	}
34678	return json.Marshal(objectMap)
34679}
34680
34681// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
34682// operation.
34683type RoutesCreateOrUpdateFuture struct {
34684	azure.FutureAPI
34685	// Result returns the result of the asynchronous operation.
34686	// If the operation has not completed it will return an error.
34687	Result func(RoutesClient) (Route, error)
34688}
34689
34690// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34691func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
34692	var azFuture azure.Future
34693	if err := json.Unmarshal(body, &azFuture); err != nil {
34694		return err
34695	}
34696	future.FutureAPI = &azFuture
34697	future.Result = future.result
34698	return nil
34699}
34700
34701// result is the default implementation for RoutesCreateOrUpdateFuture.Result.
34702func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) {
34703	var done bool
34704	done, err = future.DoneWithContext(context.Background(), client)
34705	if err != nil {
34706		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
34707		return
34708	}
34709	if !done {
34710		r.Response.Response = future.Response()
34711		err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
34712		return
34713	}
34714	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34715	if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
34716		r, err = client.CreateOrUpdateResponder(r.Response.Response)
34717		if err != nil {
34718			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
34719		}
34720	}
34721	return
34722}
34723
34724// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
34725type RoutesDeleteFuture struct {
34726	azure.FutureAPI
34727	// Result returns the result of the asynchronous operation.
34728	// If the operation has not completed it will return an error.
34729	Result func(RoutesClient) (autorest.Response, error)
34730}
34731
34732// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34733func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error {
34734	var azFuture azure.Future
34735	if err := json.Unmarshal(body, &azFuture); err != nil {
34736		return err
34737	}
34738	future.FutureAPI = &azFuture
34739	future.Result = future.result
34740	return nil
34741}
34742
34743// result is the default implementation for RoutesDeleteFuture.Result.
34744func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) {
34745	var done bool
34746	done, err = future.DoneWithContext(context.Background(), client)
34747	if err != nil {
34748		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
34749		return
34750	}
34751	if !done {
34752		ar.Response = future.Response()
34753		err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
34754		return
34755	}
34756	ar.Response = future.Response()
34757	return
34758}
34759
34760// RouteTable route table resource.
34761type RouteTable struct {
34762	autorest.Response `json:"-"`
34763	// RouteTablePropertiesFormat - Properties of the route table.
34764	*RouteTablePropertiesFormat `json:"properties,omitempty"`
34765	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
34766	Etag *string `json:"etag,omitempty"`
34767	// ID - Resource ID.
34768	ID *string `json:"id,omitempty"`
34769	// Name - READ-ONLY; Resource name.
34770	Name *string `json:"name,omitempty"`
34771	// Type - READ-ONLY; Resource type.
34772	Type *string `json:"type,omitempty"`
34773	// Location - Resource location.
34774	Location *string `json:"location,omitempty"`
34775	// Tags - Resource tags.
34776	Tags map[string]*string `json:"tags"`
34777}
34778
34779// MarshalJSON is the custom marshaler for RouteTable.
34780func (rt RouteTable) MarshalJSON() ([]byte, error) {
34781	objectMap := make(map[string]interface{})
34782	if rt.RouteTablePropertiesFormat != nil {
34783		objectMap["properties"] = rt.RouteTablePropertiesFormat
34784	}
34785	if rt.ID != nil {
34786		objectMap["id"] = rt.ID
34787	}
34788	if rt.Location != nil {
34789		objectMap["location"] = rt.Location
34790	}
34791	if rt.Tags != nil {
34792		objectMap["tags"] = rt.Tags
34793	}
34794	return json.Marshal(objectMap)
34795}
34796
34797// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
34798func (rt *RouteTable) UnmarshalJSON(body []byte) error {
34799	var m map[string]*json.RawMessage
34800	err := json.Unmarshal(body, &m)
34801	if err != nil {
34802		return err
34803	}
34804	for k, v := range m {
34805		switch k {
34806		case "properties":
34807			if v != nil {
34808				var routeTablePropertiesFormat RouteTablePropertiesFormat
34809				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
34810				if err != nil {
34811					return err
34812				}
34813				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
34814			}
34815		case "etag":
34816			if v != nil {
34817				var etag string
34818				err = json.Unmarshal(*v, &etag)
34819				if err != nil {
34820					return err
34821				}
34822				rt.Etag = &etag
34823			}
34824		case "id":
34825			if v != nil {
34826				var ID string
34827				err = json.Unmarshal(*v, &ID)
34828				if err != nil {
34829					return err
34830				}
34831				rt.ID = &ID
34832			}
34833		case "name":
34834			if v != nil {
34835				var name string
34836				err = json.Unmarshal(*v, &name)
34837				if err != nil {
34838					return err
34839				}
34840				rt.Name = &name
34841			}
34842		case "type":
34843			if v != nil {
34844				var typeVar string
34845				err = json.Unmarshal(*v, &typeVar)
34846				if err != nil {
34847					return err
34848				}
34849				rt.Type = &typeVar
34850			}
34851		case "location":
34852			if v != nil {
34853				var location string
34854				err = json.Unmarshal(*v, &location)
34855				if err != nil {
34856					return err
34857				}
34858				rt.Location = &location
34859			}
34860		case "tags":
34861			if v != nil {
34862				var tags map[string]*string
34863				err = json.Unmarshal(*v, &tags)
34864				if err != nil {
34865					return err
34866				}
34867				rt.Tags = tags
34868			}
34869		}
34870	}
34871
34872	return nil
34873}
34874
34875// RouteTableListResult response for the ListRouteTable API service call.
34876type RouteTableListResult struct {
34877	autorest.Response `json:"-"`
34878	// Value - A list of route tables in a resource group.
34879	Value *[]RouteTable `json:"value,omitempty"`
34880	// NextLink - The URL to get the next set of results.
34881	NextLink *string `json:"nextLink,omitempty"`
34882}
34883
34884// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
34885type RouteTableListResultIterator struct {
34886	i    int
34887	page RouteTableListResultPage
34888}
34889
34890// NextWithContext advances to the next value.  If there was an error making
34891// the request the iterator does not advance and the error is returned.
34892func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
34893	if tracing.IsEnabled() {
34894		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
34895		defer func() {
34896			sc := -1
34897			if iter.Response().Response.Response != nil {
34898				sc = iter.Response().Response.Response.StatusCode
34899			}
34900			tracing.EndSpan(ctx, sc, err)
34901		}()
34902	}
34903	iter.i++
34904	if iter.i < len(iter.page.Values()) {
34905		return nil
34906	}
34907	err = iter.page.NextWithContext(ctx)
34908	if err != nil {
34909		iter.i--
34910		return err
34911	}
34912	iter.i = 0
34913	return nil
34914}
34915
34916// Next advances to the next value.  If there was an error making
34917// the request the iterator does not advance and the error is returned.
34918// Deprecated: Use NextWithContext() instead.
34919func (iter *RouteTableListResultIterator) Next() error {
34920	return iter.NextWithContext(context.Background())
34921}
34922
34923// NotDone returns true if the enumeration should be started or is not yet complete.
34924func (iter RouteTableListResultIterator) NotDone() bool {
34925	return iter.page.NotDone() && iter.i < len(iter.page.Values())
34926}
34927
34928// Response returns the raw server response from the last page request.
34929func (iter RouteTableListResultIterator) Response() RouteTableListResult {
34930	return iter.page.Response()
34931}
34932
34933// Value returns the current value or a zero-initialized value if the
34934// iterator has advanced beyond the end of the collection.
34935func (iter RouteTableListResultIterator) Value() RouteTable {
34936	if !iter.page.NotDone() {
34937		return RouteTable{}
34938	}
34939	return iter.page.Values()[iter.i]
34940}
34941
34942// Creates a new instance of the RouteTableListResultIterator type.
34943func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
34944	return RouteTableListResultIterator{page: page}
34945}
34946
34947// IsEmpty returns true if the ListResult contains no values.
34948func (rtlr RouteTableListResult) IsEmpty() bool {
34949	return rtlr.Value == nil || len(*rtlr.Value) == 0
34950}
34951
34952// hasNextLink returns true if the NextLink is not empty.
34953func (rtlr RouteTableListResult) hasNextLink() bool {
34954	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
34955}
34956
34957// routeTableListResultPreparer prepares a request to retrieve the next set of results.
34958// It returns nil if no more results exist.
34959func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
34960	if !rtlr.hasNextLink() {
34961		return nil, nil
34962	}
34963	return autorest.Prepare((&http.Request{}).WithContext(ctx),
34964		autorest.AsJSON(),
34965		autorest.AsGet(),
34966		autorest.WithBaseURL(to.String(rtlr.NextLink)))
34967}
34968
34969// RouteTableListResultPage contains a page of RouteTable values.
34970type RouteTableListResultPage struct {
34971	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
34972	rtlr RouteTableListResult
34973}
34974
34975// NextWithContext advances to the next page of values.  If there was an error making
34976// the request the page does not advance and the error is returned.
34977func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
34978	if tracing.IsEnabled() {
34979		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
34980		defer func() {
34981			sc := -1
34982			if page.Response().Response.Response != nil {
34983				sc = page.Response().Response.Response.StatusCode
34984			}
34985			tracing.EndSpan(ctx, sc, err)
34986		}()
34987	}
34988	for {
34989		next, err := page.fn(ctx, page.rtlr)
34990		if err != nil {
34991			return err
34992		}
34993		page.rtlr = next
34994		if !next.hasNextLink() || !next.IsEmpty() {
34995			break
34996		}
34997	}
34998	return nil
34999}
35000
35001// Next advances to the next page of values.  If there was an error making
35002// the request the page does not advance and the error is returned.
35003// Deprecated: Use NextWithContext() instead.
35004func (page *RouteTableListResultPage) Next() error {
35005	return page.NextWithContext(context.Background())
35006}
35007
35008// NotDone returns true if the page enumeration should be started or is not yet complete.
35009func (page RouteTableListResultPage) NotDone() bool {
35010	return !page.rtlr.IsEmpty()
35011}
35012
35013// Response returns the raw server response from the last page request.
35014func (page RouteTableListResultPage) Response() RouteTableListResult {
35015	return page.rtlr
35016}
35017
35018// Values returns the slice of values for the current page or nil if there are no values.
35019func (page RouteTableListResultPage) Values() []RouteTable {
35020	if page.rtlr.IsEmpty() {
35021		return nil
35022	}
35023	return *page.rtlr.Value
35024}
35025
35026// Creates a new instance of the RouteTableListResultPage type.
35027func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
35028	return RouteTableListResultPage{
35029		fn:   getNextPage,
35030		rtlr: cur,
35031	}
35032}
35033
35034// RouteTablePropertiesFormat route Table resource.
35035type RouteTablePropertiesFormat struct {
35036	// Routes - Collection of routes contained within a route table.
35037	Routes *[]Route `json:"routes,omitempty"`
35038	// Subnets - READ-ONLY; A collection of references to subnets.
35039	Subnets *[]Subnet `json:"subnets,omitempty"`
35040	// DisableBgpRoutePropagation - Whether to disable the routes learned by BGP on that route table. True means disable.
35041	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
35042	// ProvisioningState - READ-ONLY; The provisioning state of the route table resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
35043	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35044	// ResourceGUID - READ-ONLY; The resource GUID property of the route table.
35045	ResourceGUID *string `json:"resourceGuid,omitempty"`
35046}
35047
35048// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
35049func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
35050	objectMap := make(map[string]interface{})
35051	if rtpf.Routes != nil {
35052		objectMap["routes"] = rtpf.Routes
35053	}
35054	if rtpf.DisableBgpRoutePropagation != nil {
35055		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
35056	}
35057	return json.Marshal(objectMap)
35058}
35059
35060// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
35061// long-running operation.
35062type RouteTablesCreateOrUpdateFuture struct {
35063	azure.FutureAPI
35064	// Result returns the result of the asynchronous operation.
35065	// If the operation has not completed it will return an error.
35066	Result func(RouteTablesClient) (RouteTable, error)
35067}
35068
35069// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35070func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
35071	var azFuture azure.Future
35072	if err := json.Unmarshal(body, &azFuture); err != nil {
35073		return err
35074	}
35075	future.FutureAPI = &azFuture
35076	future.Result = future.result
35077	return nil
35078}
35079
35080// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result.
35081func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
35082	var done bool
35083	done, err = future.DoneWithContext(context.Background(), client)
35084	if err != nil {
35085		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
35086		return
35087	}
35088	if !done {
35089		rt.Response.Response = future.Response()
35090		err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
35091		return
35092	}
35093	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35094	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
35095		rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
35096		if err != nil {
35097			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
35098		}
35099	}
35100	return
35101}
35102
35103// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
35104// operation.
35105type RouteTablesDeleteFuture struct {
35106	azure.FutureAPI
35107	// Result returns the result of the asynchronous operation.
35108	// If the operation has not completed it will return an error.
35109	Result func(RouteTablesClient) (autorest.Response, error)
35110}
35111
35112// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35113func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
35114	var azFuture azure.Future
35115	if err := json.Unmarshal(body, &azFuture); err != nil {
35116		return err
35117	}
35118	future.FutureAPI = &azFuture
35119	future.Result = future.result
35120	return nil
35121}
35122
35123// result is the default implementation for RouteTablesDeleteFuture.Result.
35124func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) {
35125	var done bool
35126	done, err = future.DoneWithContext(context.Background(), client)
35127	if err != nil {
35128		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
35129		return
35130	}
35131	if !done {
35132		ar.Response = future.Response()
35133		err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
35134		return
35135	}
35136	ar.Response = future.Response()
35137	return
35138}
35139
35140// RoutingConfiguration routing Configuration indicating the associated and propagated route tables for
35141// this connection.
35142type RoutingConfiguration struct {
35143	// AssociatedRouteTable - The resource id RouteTable associated with this RoutingConfiguration.
35144	AssociatedRouteTable *SubResource `json:"associatedRouteTable,omitempty"`
35145	// PropagatedRouteTables - The list of RouteTables to advertise the routes to.
35146	PropagatedRouteTables *PropagatedRouteTable `json:"propagatedRouteTables,omitempty"`
35147	// VnetRoutes - List of routes that control routing from VirtualHub into a virtual network connection.
35148	VnetRoutes *VnetRoute `json:"vnetRoutes,omitempty"`
35149}
35150
35151// Rule rule of type network.
35152type Rule struct {
35153	// IPProtocols - Array of FirewallPolicyRuleNetworkProtocols.
35154	IPProtocols *[]FirewallPolicyRuleNetworkProtocol `json:"ipProtocols,omitempty"`
35155	// SourceAddresses - List of source IP addresses for this rule.
35156	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
35157	// DestinationAddresses - List of destination IP addresses or Service Tags.
35158	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
35159	// DestinationPorts - List of destination ports.
35160	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
35161	// SourceIPGroups - List of source IpGroups for this rule.
35162	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
35163	// DestinationIPGroups - List of destination IpGroups for this rule.
35164	DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"`
35165	// DestinationFqdns - List of destination FQDNs.
35166	DestinationFqdns *[]string `json:"destinationFqdns,omitempty"`
35167	// Name - Name of the rule.
35168	Name *string `json:"name,omitempty"`
35169	// Description - Description of the rule.
35170	Description *string `json:"description,omitempty"`
35171	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule'
35172	RuleType RuleType `json:"ruleType,omitempty"`
35173}
35174
35175// MarshalJSON is the custom marshaler for Rule.
35176func (r Rule) MarshalJSON() ([]byte, error) {
35177	r.RuleType = RuleTypeNetworkRule
35178	objectMap := make(map[string]interface{})
35179	if r.IPProtocols != nil {
35180		objectMap["ipProtocols"] = r.IPProtocols
35181	}
35182	if r.SourceAddresses != nil {
35183		objectMap["sourceAddresses"] = r.SourceAddresses
35184	}
35185	if r.DestinationAddresses != nil {
35186		objectMap["destinationAddresses"] = r.DestinationAddresses
35187	}
35188	if r.DestinationPorts != nil {
35189		objectMap["destinationPorts"] = r.DestinationPorts
35190	}
35191	if r.SourceIPGroups != nil {
35192		objectMap["sourceIpGroups"] = r.SourceIPGroups
35193	}
35194	if r.DestinationIPGroups != nil {
35195		objectMap["destinationIpGroups"] = r.DestinationIPGroups
35196	}
35197	if r.DestinationFqdns != nil {
35198		objectMap["destinationFqdns"] = r.DestinationFqdns
35199	}
35200	if r.Name != nil {
35201		objectMap["name"] = r.Name
35202	}
35203	if r.Description != nil {
35204		objectMap["description"] = r.Description
35205	}
35206	if r.RuleType != "" {
35207		objectMap["ruleType"] = r.RuleType
35208	}
35209	return json.Marshal(objectMap)
35210}
35211
35212// AsApplicationRule is the BasicFirewallPolicyRule implementation for Rule.
35213func (r Rule) AsApplicationRule() (*ApplicationRule, bool) {
35214	return nil, false
35215}
35216
35217// AsNatRule is the BasicFirewallPolicyRule implementation for Rule.
35218func (r Rule) AsNatRule() (*NatRule, bool) {
35219	return nil, false
35220}
35221
35222// AsRule is the BasicFirewallPolicyRule implementation for Rule.
35223func (r Rule) AsRule() (*Rule, bool) {
35224	return &r, true
35225}
35226
35227// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for Rule.
35228func (r Rule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
35229	return nil, false
35230}
35231
35232// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for Rule.
35233func (r Rule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
35234	return &r, true
35235}
35236
35237// SecurityGroup networkSecurityGroup resource.
35238type SecurityGroup struct {
35239	autorest.Response `json:"-"`
35240	// SecurityGroupPropertiesFormat - Properties of the network security group.
35241	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
35242	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35243	Etag *string `json:"etag,omitempty"`
35244	// ID - Resource ID.
35245	ID *string `json:"id,omitempty"`
35246	// Name - READ-ONLY; Resource name.
35247	Name *string `json:"name,omitempty"`
35248	// Type - READ-ONLY; Resource type.
35249	Type *string `json:"type,omitempty"`
35250	// Location - Resource location.
35251	Location *string `json:"location,omitempty"`
35252	// Tags - Resource tags.
35253	Tags map[string]*string `json:"tags"`
35254}
35255
35256// MarshalJSON is the custom marshaler for SecurityGroup.
35257func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
35258	objectMap := make(map[string]interface{})
35259	if sg.SecurityGroupPropertiesFormat != nil {
35260		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
35261	}
35262	if sg.ID != nil {
35263		objectMap["id"] = sg.ID
35264	}
35265	if sg.Location != nil {
35266		objectMap["location"] = sg.Location
35267	}
35268	if sg.Tags != nil {
35269		objectMap["tags"] = sg.Tags
35270	}
35271	return json.Marshal(objectMap)
35272}
35273
35274// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
35275func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
35276	var m map[string]*json.RawMessage
35277	err := json.Unmarshal(body, &m)
35278	if err != nil {
35279		return err
35280	}
35281	for k, v := range m {
35282		switch k {
35283		case "properties":
35284			if v != nil {
35285				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
35286				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
35287				if err != nil {
35288					return err
35289				}
35290				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
35291			}
35292		case "etag":
35293			if v != nil {
35294				var etag string
35295				err = json.Unmarshal(*v, &etag)
35296				if err != nil {
35297					return err
35298				}
35299				sg.Etag = &etag
35300			}
35301		case "id":
35302			if v != nil {
35303				var ID string
35304				err = json.Unmarshal(*v, &ID)
35305				if err != nil {
35306					return err
35307				}
35308				sg.ID = &ID
35309			}
35310		case "name":
35311			if v != nil {
35312				var name string
35313				err = json.Unmarshal(*v, &name)
35314				if err != nil {
35315					return err
35316				}
35317				sg.Name = &name
35318			}
35319		case "type":
35320			if v != nil {
35321				var typeVar string
35322				err = json.Unmarshal(*v, &typeVar)
35323				if err != nil {
35324					return err
35325				}
35326				sg.Type = &typeVar
35327			}
35328		case "location":
35329			if v != nil {
35330				var location string
35331				err = json.Unmarshal(*v, &location)
35332				if err != nil {
35333					return err
35334				}
35335				sg.Location = &location
35336			}
35337		case "tags":
35338			if v != nil {
35339				var tags map[string]*string
35340				err = json.Unmarshal(*v, &tags)
35341				if err != nil {
35342					return err
35343				}
35344				sg.Tags = tags
35345			}
35346		}
35347	}
35348
35349	return nil
35350}
35351
35352// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
35353type SecurityGroupListResult struct {
35354	autorest.Response `json:"-"`
35355	// Value - A list of NetworkSecurityGroup resources.
35356	Value *[]SecurityGroup `json:"value,omitempty"`
35357	// NextLink - The URL to get the next set of results.
35358	NextLink *string `json:"nextLink,omitempty"`
35359}
35360
35361// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
35362type SecurityGroupListResultIterator struct {
35363	i    int
35364	page SecurityGroupListResultPage
35365}
35366
35367// NextWithContext advances to the next value.  If there was an error making
35368// the request the iterator does not advance and the error is returned.
35369func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
35370	if tracing.IsEnabled() {
35371		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
35372		defer func() {
35373			sc := -1
35374			if iter.Response().Response.Response != nil {
35375				sc = iter.Response().Response.Response.StatusCode
35376			}
35377			tracing.EndSpan(ctx, sc, err)
35378		}()
35379	}
35380	iter.i++
35381	if iter.i < len(iter.page.Values()) {
35382		return nil
35383	}
35384	err = iter.page.NextWithContext(ctx)
35385	if err != nil {
35386		iter.i--
35387		return err
35388	}
35389	iter.i = 0
35390	return nil
35391}
35392
35393// Next advances to the next value.  If there was an error making
35394// the request the iterator does not advance and the error is returned.
35395// Deprecated: Use NextWithContext() instead.
35396func (iter *SecurityGroupListResultIterator) Next() error {
35397	return iter.NextWithContext(context.Background())
35398}
35399
35400// NotDone returns true if the enumeration should be started or is not yet complete.
35401func (iter SecurityGroupListResultIterator) NotDone() bool {
35402	return iter.page.NotDone() && iter.i < len(iter.page.Values())
35403}
35404
35405// Response returns the raw server response from the last page request.
35406func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
35407	return iter.page.Response()
35408}
35409
35410// Value returns the current value or a zero-initialized value if the
35411// iterator has advanced beyond the end of the collection.
35412func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
35413	if !iter.page.NotDone() {
35414		return SecurityGroup{}
35415	}
35416	return iter.page.Values()[iter.i]
35417}
35418
35419// Creates a new instance of the SecurityGroupListResultIterator type.
35420func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
35421	return SecurityGroupListResultIterator{page: page}
35422}
35423
35424// IsEmpty returns true if the ListResult contains no values.
35425func (sglr SecurityGroupListResult) IsEmpty() bool {
35426	return sglr.Value == nil || len(*sglr.Value) == 0
35427}
35428
35429// hasNextLink returns true if the NextLink is not empty.
35430func (sglr SecurityGroupListResult) hasNextLink() bool {
35431	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
35432}
35433
35434// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
35435// It returns nil if no more results exist.
35436func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
35437	if !sglr.hasNextLink() {
35438		return nil, nil
35439	}
35440	return autorest.Prepare((&http.Request{}).WithContext(ctx),
35441		autorest.AsJSON(),
35442		autorest.AsGet(),
35443		autorest.WithBaseURL(to.String(sglr.NextLink)))
35444}
35445
35446// SecurityGroupListResultPage contains a page of SecurityGroup values.
35447type SecurityGroupListResultPage struct {
35448	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
35449	sglr SecurityGroupListResult
35450}
35451
35452// NextWithContext advances to the next page of values.  If there was an error making
35453// the request the page does not advance and the error is returned.
35454func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
35455	if tracing.IsEnabled() {
35456		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
35457		defer func() {
35458			sc := -1
35459			if page.Response().Response.Response != nil {
35460				sc = page.Response().Response.Response.StatusCode
35461			}
35462			tracing.EndSpan(ctx, sc, err)
35463		}()
35464	}
35465	for {
35466		next, err := page.fn(ctx, page.sglr)
35467		if err != nil {
35468			return err
35469		}
35470		page.sglr = next
35471		if !next.hasNextLink() || !next.IsEmpty() {
35472			break
35473		}
35474	}
35475	return nil
35476}
35477
35478// Next advances to the next page of values.  If there was an error making
35479// the request the page does not advance and the error is returned.
35480// Deprecated: Use NextWithContext() instead.
35481func (page *SecurityGroupListResultPage) Next() error {
35482	return page.NextWithContext(context.Background())
35483}
35484
35485// NotDone returns true if the page enumeration should be started or is not yet complete.
35486func (page SecurityGroupListResultPage) NotDone() bool {
35487	return !page.sglr.IsEmpty()
35488}
35489
35490// Response returns the raw server response from the last page request.
35491func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
35492	return page.sglr
35493}
35494
35495// Values returns the slice of values for the current page or nil if there are no values.
35496func (page SecurityGroupListResultPage) Values() []SecurityGroup {
35497	if page.sglr.IsEmpty() {
35498		return nil
35499	}
35500	return *page.sglr.Value
35501}
35502
35503// Creates a new instance of the SecurityGroupListResultPage type.
35504func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
35505	return SecurityGroupListResultPage{
35506		fn:   getNextPage,
35507		sglr: cur,
35508	}
35509}
35510
35511// SecurityGroupNetworkInterface network interface and all its associated security rules.
35512type SecurityGroupNetworkInterface struct {
35513	// ID - ID of the network interface.
35514	ID *string `json:"id,omitempty"`
35515	// SecurityRuleAssociations - All security rules associated with the network interface.
35516	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
35517}
35518
35519// SecurityGroupPropertiesFormat network Security Group resource.
35520type SecurityGroupPropertiesFormat struct {
35521	// SecurityRules - A collection of security rules of the network security group.
35522	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
35523	// DefaultSecurityRules - READ-ONLY; The default security rules of network security group.
35524	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
35525	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
35526	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
35527	// Subnets - READ-ONLY; A collection of references to subnets.
35528	Subnets *[]Subnet `json:"subnets,omitempty"`
35529	// FlowLogs - READ-ONLY; A collection of references to flow log resources.
35530	FlowLogs *[]FlowLog `json:"flowLogs,omitempty"`
35531	// ResourceGUID - READ-ONLY; The resource GUID property of the network security group resource.
35532	ResourceGUID *string `json:"resourceGuid,omitempty"`
35533	// ProvisioningState - READ-ONLY; The provisioning state of the network security group resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
35534	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35535}
35536
35537// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
35538func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
35539	objectMap := make(map[string]interface{})
35540	if sgpf.SecurityRules != nil {
35541		objectMap["securityRules"] = sgpf.SecurityRules
35542	}
35543	return json.Marshal(objectMap)
35544}
35545
35546// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
35547type SecurityGroupResult struct {
35548	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
35549	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
35550	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
35551	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
35552}
35553
35554// MarshalJSON is the custom marshaler for SecurityGroupResult.
35555func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
35556	objectMap := make(map[string]interface{})
35557	if sgr.SecurityRuleAccessResult != "" {
35558		objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
35559	}
35560	return json.Marshal(objectMap)
35561}
35562
35563// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
35564// long-running operation.
35565type SecurityGroupsCreateOrUpdateFuture struct {
35566	azure.FutureAPI
35567	// Result returns the result of the asynchronous operation.
35568	// If the operation has not completed it will return an error.
35569	Result func(SecurityGroupsClient) (SecurityGroup, error)
35570}
35571
35572// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35573func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
35574	var azFuture azure.Future
35575	if err := json.Unmarshal(body, &azFuture); err != nil {
35576		return err
35577	}
35578	future.FutureAPI = &azFuture
35579	future.Result = future.result
35580	return nil
35581}
35582
35583// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result.
35584func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
35585	var done bool
35586	done, err = future.DoneWithContext(context.Background(), client)
35587	if err != nil {
35588		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
35589		return
35590	}
35591	if !done {
35592		sg.Response.Response = future.Response()
35593		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
35594		return
35595	}
35596	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35597	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
35598		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
35599		if err != nil {
35600			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
35601		}
35602	}
35603	return
35604}
35605
35606// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
35607// operation.
35608type SecurityGroupsDeleteFuture struct {
35609	azure.FutureAPI
35610	// Result returns the result of the asynchronous operation.
35611	// If the operation has not completed it will return an error.
35612	Result func(SecurityGroupsClient) (autorest.Response, error)
35613}
35614
35615// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35616func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
35617	var azFuture azure.Future
35618	if err := json.Unmarshal(body, &azFuture); err != nil {
35619		return err
35620	}
35621	future.FutureAPI = &azFuture
35622	future.Result = future.result
35623	return nil
35624}
35625
35626// result is the default implementation for SecurityGroupsDeleteFuture.Result.
35627func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) {
35628	var done bool
35629	done, err = future.DoneWithContext(context.Background(), client)
35630	if err != nil {
35631		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
35632		return
35633	}
35634	if !done {
35635		ar.Response = future.Response()
35636		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
35637		return
35638	}
35639	ar.Response = future.Response()
35640	return
35641}
35642
35643// SecurityGroupViewParameters parameters that define the VM to check security groups for.
35644type SecurityGroupViewParameters struct {
35645	// TargetResourceID - ID of the target VM.
35646	TargetResourceID *string `json:"targetResourceId,omitempty"`
35647}
35648
35649// SecurityGroupViewResult the information about security rules applied to the specified VM.
35650type SecurityGroupViewResult struct {
35651	autorest.Response `json:"-"`
35652	// NetworkInterfaces - List of network interfaces on the specified VM.
35653	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
35654}
35655
35656// SecurityPartnerProvider security Partner Provider resource.
35657type SecurityPartnerProvider struct {
35658	autorest.Response `json:"-"`
35659	// SecurityPartnerProviderPropertiesFormat - Properties of the Security Partner Provider.
35660	*SecurityPartnerProviderPropertiesFormat `json:"properties,omitempty"`
35661	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35662	Etag *string `json:"etag,omitempty"`
35663	// ID - Resource ID.
35664	ID *string `json:"id,omitempty"`
35665	// Name - READ-ONLY; Resource name.
35666	Name *string `json:"name,omitempty"`
35667	// Type - READ-ONLY; Resource type.
35668	Type *string `json:"type,omitempty"`
35669	// Location - Resource location.
35670	Location *string `json:"location,omitempty"`
35671	// Tags - Resource tags.
35672	Tags map[string]*string `json:"tags"`
35673}
35674
35675// MarshalJSON is the custom marshaler for SecurityPartnerProvider.
35676func (spp SecurityPartnerProvider) MarshalJSON() ([]byte, error) {
35677	objectMap := make(map[string]interface{})
35678	if spp.SecurityPartnerProviderPropertiesFormat != nil {
35679		objectMap["properties"] = spp.SecurityPartnerProviderPropertiesFormat
35680	}
35681	if spp.ID != nil {
35682		objectMap["id"] = spp.ID
35683	}
35684	if spp.Location != nil {
35685		objectMap["location"] = spp.Location
35686	}
35687	if spp.Tags != nil {
35688		objectMap["tags"] = spp.Tags
35689	}
35690	return json.Marshal(objectMap)
35691}
35692
35693// UnmarshalJSON is the custom unmarshaler for SecurityPartnerProvider struct.
35694func (spp *SecurityPartnerProvider) UnmarshalJSON(body []byte) error {
35695	var m map[string]*json.RawMessage
35696	err := json.Unmarshal(body, &m)
35697	if err != nil {
35698		return err
35699	}
35700	for k, v := range m {
35701		switch k {
35702		case "properties":
35703			if v != nil {
35704				var securityPartnerProviderPropertiesFormat SecurityPartnerProviderPropertiesFormat
35705				err = json.Unmarshal(*v, &securityPartnerProviderPropertiesFormat)
35706				if err != nil {
35707					return err
35708				}
35709				spp.SecurityPartnerProviderPropertiesFormat = &securityPartnerProviderPropertiesFormat
35710			}
35711		case "etag":
35712			if v != nil {
35713				var etag string
35714				err = json.Unmarshal(*v, &etag)
35715				if err != nil {
35716					return err
35717				}
35718				spp.Etag = &etag
35719			}
35720		case "id":
35721			if v != nil {
35722				var ID string
35723				err = json.Unmarshal(*v, &ID)
35724				if err != nil {
35725					return err
35726				}
35727				spp.ID = &ID
35728			}
35729		case "name":
35730			if v != nil {
35731				var name string
35732				err = json.Unmarshal(*v, &name)
35733				if err != nil {
35734					return err
35735				}
35736				spp.Name = &name
35737			}
35738		case "type":
35739			if v != nil {
35740				var typeVar string
35741				err = json.Unmarshal(*v, &typeVar)
35742				if err != nil {
35743					return err
35744				}
35745				spp.Type = &typeVar
35746			}
35747		case "location":
35748			if v != nil {
35749				var location string
35750				err = json.Unmarshal(*v, &location)
35751				if err != nil {
35752					return err
35753				}
35754				spp.Location = &location
35755			}
35756		case "tags":
35757			if v != nil {
35758				var tags map[string]*string
35759				err = json.Unmarshal(*v, &tags)
35760				if err != nil {
35761					return err
35762				}
35763				spp.Tags = tags
35764			}
35765		}
35766	}
35767
35768	return nil
35769}
35770
35771// SecurityPartnerProviderListResult response for ListSecurityPartnerProviders API service call.
35772type SecurityPartnerProviderListResult struct {
35773	autorest.Response `json:"-"`
35774	// Value - List of Security Partner Providers in a resource group.
35775	Value *[]SecurityPartnerProvider `json:"value,omitempty"`
35776	// NextLink - URL to get the next set of results.
35777	NextLink *string `json:"nextLink,omitempty"`
35778}
35779
35780// SecurityPartnerProviderListResultIterator provides access to a complete listing of
35781// SecurityPartnerProvider values.
35782type SecurityPartnerProviderListResultIterator struct {
35783	i    int
35784	page SecurityPartnerProviderListResultPage
35785}
35786
35787// NextWithContext advances to the next value.  If there was an error making
35788// the request the iterator does not advance and the error is returned.
35789func (iter *SecurityPartnerProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
35790	if tracing.IsEnabled() {
35791		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProviderListResultIterator.NextWithContext")
35792		defer func() {
35793			sc := -1
35794			if iter.Response().Response.Response != nil {
35795				sc = iter.Response().Response.Response.StatusCode
35796			}
35797			tracing.EndSpan(ctx, sc, err)
35798		}()
35799	}
35800	iter.i++
35801	if iter.i < len(iter.page.Values()) {
35802		return nil
35803	}
35804	err = iter.page.NextWithContext(ctx)
35805	if err != nil {
35806		iter.i--
35807		return err
35808	}
35809	iter.i = 0
35810	return nil
35811}
35812
35813// Next advances to the next value.  If there was an error making
35814// the request the iterator does not advance and the error is returned.
35815// Deprecated: Use NextWithContext() instead.
35816func (iter *SecurityPartnerProviderListResultIterator) Next() error {
35817	return iter.NextWithContext(context.Background())
35818}
35819
35820// NotDone returns true if the enumeration should be started or is not yet complete.
35821func (iter SecurityPartnerProviderListResultIterator) NotDone() bool {
35822	return iter.page.NotDone() && iter.i < len(iter.page.Values())
35823}
35824
35825// Response returns the raw server response from the last page request.
35826func (iter SecurityPartnerProviderListResultIterator) Response() SecurityPartnerProviderListResult {
35827	return iter.page.Response()
35828}
35829
35830// Value returns the current value or a zero-initialized value if the
35831// iterator has advanced beyond the end of the collection.
35832func (iter SecurityPartnerProviderListResultIterator) Value() SecurityPartnerProvider {
35833	if !iter.page.NotDone() {
35834		return SecurityPartnerProvider{}
35835	}
35836	return iter.page.Values()[iter.i]
35837}
35838
35839// Creates a new instance of the SecurityPartnerProviderListResultIterator type.
35840func NewSecurityPartnerProviderListResultIterator(page SecurityPartnerProviderListResultPage) SecurityPartnerProviderListResultIterator {
35841	return SecurityPartnerProviderListResultIterator{page: page}
35842}
35843
35844// IsEmpty returns true if the ListResult contains no values.
35845func (spplr SecurityPartnerProviderListResult) IsEmpty() bool {
35846	return spplr.Value == nil || len(*spplr.Value) == 0
35847}
35848
35849// hasNextLink returns true if the NextLink is not empty.
35850func (spplr SecurityPartnerProviderListResult) hasNextLink() bool {
35851	return spplr.NextLink != nil && len(*spplr.NextLink) != 0
35852}
35853
35854// securityPartnerProviderListResultPreparer prepares a request to retrieve the next set of results.
35855// It returns nil if no more results exist.
35856func (spplr SecurityPartnerProviderListResult) securityPartnerProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
35857	if !spplr.hasNextLink() {
35858		return nil, nil
35859	}
35860	return autorest.Prepare((&http.Request{}).WithContext(ctx),
35861		autorest.AsJSON(),
35862		autorest.AsGet(),
35863		autorest.WithBaseURL(to.String(spplr.NextLink)))
35864}
35865
35866// SecurityPartnerProviderListResultPage contains a page of SecurityPartnerProvider values.
35867type SecurityPartnerProviderListResultPage struct {
35868	fn    func(context.Context, SecurityPartnerProviderListResult) (SecurityPartnerProviderListResult, error)
35869	spplr SecurityPartnerProviderListResult
35870}
35871
35872// NextWithContext advances to the next page of values.  If there was an error making
35873// the request the page does not advance and the error is returned.
35874func (page *SecurityPartnerProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
35875	if tracing.IsEnabled() {
35876		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProviderListResultPage.NextWithContext")
35877		defer func() {
35878			sc := -1
35879			if page.Response().Response.Response != nil {
35880				sc = page.Response().Response.Response.StatusCode
35881			}
35882			tracing.EndSpan(ctx, sc, err)
35883		}()
35884	}
35885	for {
35886		next, err := page.fn(ctx, page.spplr)
35887		if err != nil {
35888			return err
35889		}
35890		page.spplr = next
35891		if !next.hasNextLink() || !next.IsEmpty() {
35892			break
35893		}
35894	}
35895	return nil
35896}
35897
35898// Next advances to the next page of values.  If there was an error making
35899// the request the page does not advance and the error is returned.
35900// Deprecated: Use NextWithContext() instead.
35901func (page *SecurityPartnerProviderListResultPage) Next() error {
35902	return page.NextWithContext(context.Background())
35903}
35904
35905// NotDone returns true if the page enumeration should be started or is not yet complete.
35906func (page SecurityPartnerProviderListResultPage) NotDone() bool {
35907	return !page.spplr.IsEmpty()
35908}
35909
35910// Response returns the raw server response from the last page request.
35911func (page SecurityPartnerProviderListResultPage) Response() SecurityPartnerProviderListResult {
35912	return page.spplr
35913}
35914
35915// Values returns the slice of values for the current page or nil if there are no values.
35916func (page SecurityPartnerProviderListResultPage) Values() []SecurityPartnerProvider {
35917	if page.spplr.IsEmpty() {
35918		return nil
35919	}
35920	return *page.spplr.Value
35921}
35922
35923// Creates a new instance of the SecurityPartnerProviderListResultPage type.
35924func NewSecurityPartnerProviderListResultPage(cur SecurityPartnerProviderListResult, getNextPage func(context.Context, SecurityPartnerProviderListResult) (SecurityPartnerProviderListResult, error)) SecurityPartnerProviderListResultPage {
35925	return SecurityPartnerProviderListResultPage{
35926		fn:    getNextPage,
35927		spplr: cur,
35928	}
35929}
35930
35931// SecurityPartnerProviderPropertiesFormat properties of the Security Partner Provider.
35932type SecurityPartnerProviderPropertiesFormat struct {
35933	// ProvisioningState - READ-ONLY; The provisioning state of the Security Partner Provider resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
35934	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35935	// SecurityProviderName - The security provider name. Possible values include: 'SecurityProviderNameZScaler', 'SecurityProviderNameIBoss', 'SecurityProviderNameCheckpoint'
35936	SecurityProviderName SecurityProviderName `json:"securityProviderName,omitempty"`
35937	// ConnectionStatus - READ-ONLY; The connection status with the Security Partner Provider. Possible values include: 'SecurityPartnerProviderConnectionStatusUnknown', 'SecurityPartnerProviderConnectionStatusPartiallyConnected', 'SecurityPartnerProviderConnectionStatusConnected', 'SecurityPartnerProviderConnectionStatusNotConnected'
35938	ConnectionStatus SecurityPartnerProviderConnectionStatus `json:"connectionStatus,omitempty"`
35939	// VirtualHub - The virtualHub to which the Security Partner Provider belongs.
35940	VirtualHub *SubResource `json:"virtualHub,omitempty"`
35941}
35942
35943// MarshalJSON is the custom marshaler for SecurityPartnerProviderPropertiesFormat.
35944func (spppf SecurityPartnerProviderPropertiesFormat) MarshalJSON() ([]byte, error) {
35945	objectMap := make(map[string]interface{})
35946	if spppf.SecurityProviderName != "" {
35947		objectMap["securityProviderName"] = spppf.SecurityProviderName
35948	}
35949	if spppf.VirtualHub != nil {
35950		objectMap["virtualHub"] = spppf.VirtualHub
35951	}
35952	return json.Marshal(objectMap)
35953}
35954
35955// SecurityPartnerProvidersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
35956// a long-running operation.
35957type SecurityPartnerProvidersCreateOrUpdateFuture struct {
35958	azure.FutureAPI
35959	// Result returns the result of the asynchronous operation.
35960	// If the operation has not completed it will return an error.
35961	Result func(SecurityPartnerProvidersClient) (SecurityPartnerProvider, error)
35962}
35963
35964// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35965func (future *SecurityPartnerProvidersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
35966	var azFuture azure.Future
35967	if err := json.Unmarshal(body, &azFuture); err != nil {
35968		return err
35969	}
35970	future.FutureAPI = &azFuture
35971	future.Result = future.result
35972	return nil
35973}
35974
35975// result is the default implementation for SecurityPartnerProvidersCreateOrUpdateFuture.Result.
35976func (future *SecurityPartnerProvidersCreateOrUpdateFuture) result(client SecurityPartnerProvidersClient) (spp SecurityPartnerProvider, err error) {
35977	var done bool
35978	done, err = future.DoneWithContext(context.Background(), client)
35979	if err != nil {
35980		err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
35981		return
35982	}
35983	if !done {
35984		spp.Response.Response = future.Response()
35985		err = azure.NewAsyncOpIncompleteError("network.SecurityPartnerProvidersCreateOrUpdateFuture")
35986		return
35987	}
35988	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35989	if spp.Response.Response, err = future.GetResult(sender); err == nil && spp.Response.Response.StatusCode != http.StatusNoContent {
35990		spp, err = client.CreateOrUpdateResponder(spp.Response.Response)
35991		if err != nil {
35992			err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersCreateOrUpdateFuture", "Result", spp.Response.Response, "Failure responding to request")
35993		}
35994	}
35995	return
35996}
35997
35998// SecurityPartnerProvidersDeleteFuture an abstraction for monitoring and retrieving the results of a
35999// long-running operation.
36000type SecurityPartnerProvidersDeleteFuture struct {
36001	azure.FutureAPI
36002	// Result returns the result of the asynchronous operation.
36003	// If the operation has not completed it will return an error.
36004	Result func(SecurityPartnerProvidersClient) (autorest.Response, error)
36005}
36006
36007// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36008func (future *SecurityPartnerProvidersDeleteFuture) UnmarshalJSON(body []byte) error {
36009	var azFuture azure.Future
36010	if err := json.Unmarshal(body, &azFuture); err != nil {
36011		return err
36012	}
36013	future.FutureAPI = &azFuture
36014	future.Result = future.result
36015	return nil
36016}
36017
36018// result is the default implementation for SecurityPartnerProvidersDeleteFuture.Result.
36019func (future *SecurityPartnerProvidersDeleteFuture) result(client SecurityPartnerProvidersClient) (ar autorest.Response, err error) {
36020	var done bool
36021	done, err = future.DoneWithContext(context.Background(), client)
36022	if err != nil {
36023		err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersDeleteFuture", "Result", future.Response(), "Polling failure")
36024		return
36025	}
36026	if !done {
36027		ar.Response = future.Response()
36028		err = azure.NewAsyncOpIncompleteError("network.SecurityPartnerProvidersDeleteFuture")
36029		return
36030	}
36031	ar.Response = future.Response()
36032	return
36033}
36034
36035// SecurityRule network security rule.
36036type SecurityRule struct {
36037	autorest.Response `json:"-"`
36038	// SecurityRulePropertiesFormat - Properties of the security rule.
36039	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
36040	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
36041	Name *string `json:"name,omitempty"`
36042	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
36043	Etag *string `json:"etag,omitempty"`
36044	// Type - The type of the resource.
36045	Type *string `json:"type,omitempty"`
36046	// ID - Resource ID.
36047	ID *string `json:"id,omitempty"`
36048}
36049
36050// MarshalJSON is the custom marshaler for SecurityRule.
36051func (sr SecurityRule) MarshalJSON() ([]byte, error) {
36052	objectMap := make(map[string]interface{})
36053	if sr.SecurityRulePropertiesFormat != nil {
36054		objectMap["properties"] = sr.SecurityRulePropertiesFormat
36055	}
36056	if sr.Name != nil {
36057		objectMap["name"] = sr.Name
36058	}
36059	if sr.Type != nil {
36060		objectMap["type"] = sr.Type
36061	}
36062	if sr.ID != nil {
36063		objectMap["id"] = sr.ID
36064	}
36065	return json.Marshal(objectMap)
36066}
36067
36068// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
36069func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
36070	var m map[string]*json.RawMessage
36071	err := json.Unmarshal(body, &m)
36072	if err != nil {
36073		return err
36074	}
36075	for k, v := range m {
36076		switch k {
36077		case "properties":
36078			if v != nil {
36079				var securityRulePropertiesFormat SecurityRulePropertiesFormat
36080				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
36081				if err != nil {
36082					return err
36083				}
36084				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
36085			}
36086		case "name":
36087			if v != nil {
36088				var name string
36089				err = json.Unmarshal(*v, &name)
36090				if err != nil {
36091					return err
36092				}
36093				sr.Name = &name
36094			}
36095		case "etag":
36096			if v != nil {
36097				var etag string
36098				err = json.Unmarshal(*v, &etag)
36099				if err != nil {
36100					return err
36101				}
36102				sr.Etag = &etag
36103			}
36104		case "type":
36105			if v != nil {
36106				var typeVar string
36107				err = json.Unmarshal(*v, &typeVar)
36108				if err != nil {
36109					return err
36110				}
36111				sr.Type = &typeVar
36112			}
36113		case "id":
36114			if v != nil {
36115				var ID string
36116				err = json.Unmarshal(*v, &ID)
36117				if err != nil {
36118					return err
36119				}
36120				sr.ID = &ID
36121			}
36122		}
36123	}
36124
36125	return nil
36126}
36127
36128// SecurityRuleAssociations all security rules associated with the network interface.
36129type SecurityRuleAssociations struct {
36130	// NetworkInterfaceAssociation - Network interface and it's custom security rules.
36131	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
36132	// SubnetAssociation - Subnet and it's custom security rules.
36133	SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"`
36134	// DefaultSecurityRules - Collection of default security rules of the network security group.
36135	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
36136	// EffectiveSecurityRules - Collection of effective security rules.
36137	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
36138}
36139
36140// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
36141// belongs to a network security group.
36142type SecurityRuleListResult struct {
36143	autorest.Response `json:"-"`
36144	// Value - The security rules in a network security group.
36145	Value *[]SecurityRule `json:"value,omitempty"`
36146	// NextLink - The URL to get the next set of results.
36147	NextLink *string `json:"nextLink,omitempty"`
36148}
36149
36150// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
36151type SecurityRuleListResultIterator struct {
36152	i    int
36153	page SecurityRuleListResultPage
36154}
36155
36156// NextWithContext advances to the next value.  If there was an error making
36157// the request the iterator does not advance and the error is returned.
36158func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
36159	if tracing.IsEnabled() {
36160		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
36161		defer func() {
36162			sc := -1
36163			if iter.Response().Response.Response != nil {
36164				sc = iter.Response().Response.Response.StatusCode
36165			}
36166			tracing.EndSpan(ctx, sc, err)
36167		}()
36168	}
36169	iter.i++
36170	if iter.i < len(iter.page.Values()) {
36171		return nil
36172	}
36173	err = iter.page.NextWithContext(ctx)
36174	if err != nil {
36175		iter.i--
36176		return err
36177	}
36178	iter.i = 0
36179	return nil
36180}
36181
36182// Next advances to the next value.  If there was an error making
36183// the request the iterator does not advance and the error is returned.
36184// Deprecated: Use NextWithContext() instead.
36185func (iter *SecurityRuleListResultIterator) Next() error {
36186	return iter.NextWithContext(context.Background())
36187}
36188
36189// NotDone returns true if the enumeration should be started or is not yet complete.
36190func (iter SecurityRuleListResultIterator) NotDone() bool {
36191	return iter.page.NotDone() && iter.i < len(iter.page.Values())
36192}
36193
36194// Response returns the raw server response from the last page request.
36195func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
36196	return iter.page.Response()
36197}
36198
36199// Value returns the current value or a zero-initialized value if the
36200// iterator has advanced beyond the end of the collection.
36201func (iter SecurityRuleListResultIterator) Value() SecurityRule {
36202	if !iter.page.NotDone() {
36203		return SecurityRule{}
36204	}
36205	return iter.page.Values()[iter.i]
36206}
36207
36208// Creates a new instance of the SecurityRuleListResultIterator type.
36209func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
36210	return SecurityRuleListResultIterator{page: page}
36211}
36212
36213// IsEmpty returns true if the ListResult contains no values.
36214func (srlr SecurityRuleListResult) IsEmpty() bool {
36215	return srlr.Value == nil || len(*srlr.Value) == 0
36216}
36217
36218// hasNextLink returns true if the NextLink is not empty.
36219func (srlr SecurityRuleListResult) hasNextLink() bool {
36220	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
36221}
36222
36223// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
36224// It returns nil if no more results exist.
36225func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
36226	if !srlr.hasNextLink() {
36227		return nil, nil
36228	}
36229	return autorest.Prepare((&http.Request{}).WithContext(ctx),
36230		autorest.AsJSON(),
36231		autorest.AsGet(),
36232		autorest.WithBaseURL(to.String(srlr.NextLink)))
36233}
36234
36235// SecurityRuleListResultPage contains a page of SecurityRule values.
36236type SecurityRuleListResultPage struct {
36237	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
36238	srlr SecurityRuleListResult
36239}
36240
36241// NextWithContext advances to the next page of values.  If there was an error making
36242// the request the page does not advance and the error is returned.
36243func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
36244	if tracing.IsEnabled() {
36245		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
36246		defer func() {
36247			sc := -1
36248			if page.Response().Response.Response != nil {
36249				sc = page.Response().Response.Response.StatusCode
36250			}
36251			tracing.EndSpan(ctx, sc, err)
36252		}()
36253	}
36254	for {
36255		next, err := page.fn(ctx, page.srlr)
36256		if err != nil {
36257			return err
36258		}
36259		page.srlr = next
36260		if !next.hasNextLink() || !next.IsEmpty() {
36261			break
36262		}
36263	}
36264	return nil
36265}
36266
36267// Next advances to the next page of values.  If there was an error making
36268// the request the page does not advance and the error is returned.
36269// Deprecated: Use NextWithContext() instead.
36270func (page *SecurityRuleListResultPage) Next() error {
36271	return page.NextWithContext(context.Background())
36272}
36273
36274// NotDone returns true if the page enumeration should be started or is not yet complete.
36275func (page SecurityRuleListResultPage) NotDone() bool {
36276	return !page.srlr.IsEmpty()
36277}
36278
36279// Response returns the raw server response from the last page request.
36280func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
36281	return page.srlr
36282}
36283
36284// Values returns the slice of values for the current page or nil if there are no values.
36285func (page SecurityRuleListResultPage) Values() []SecurityRule {
36286	if page.srlr.IsEmpty() {
36287		return nil
36288	}
36289	return *page.srlr.Value
36290}
36291
36292// Creates a new instance of the SecurityRuleListResultPage type.
36293func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
36294	return SecurityRuleListResultPage{
36295		fn:   getNextPage,
36296		srlr: cur,
36297	}
36298}
36299
36300// SecurityRulePropertiesFormat security rule resource.
36301type SecurityRulePropertiesFormat struct {
36302	// Description - A description for this rule. Restricted to 140 chars.
36303	Description *string `json:"description,omitempty"`
36304	// Protocol - Network protocol this rule applies to. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolIcmp', 'SecurityRuleProtocolEsp', 'SecurityRuleProtocolAsterisk', 'SecurityRuleProtocolAh'
36305	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
36306	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
36307	SourcePortRange *string `json:"sourcePortRange,omitempty"`
36308	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
36309	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
36310	// 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.
36311	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
36312	// SourceAddressPrefixes - The CIDR or source IP ranges.
36313	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
36314	// SourceApplicationSecurityGroups - The application security group specified as source.
36315	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
36316	// 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.
36317	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
36318	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
36319	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
36320	// DestinationApplicationSecurityGroups - The application security group specified as destination.
36321	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
36322	// SourcePortRanges - The source port ranges.
36323	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
36324	// DestinationPortRanges - The destination port ranges.
36325	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
36326	// Access - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
36327	Access SecurityRuleAccess `json:"access,omitempty"`
36328	// 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.
36329	Priority *int32 `json:"priority,omitempty"`
36330	// Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
36331	Direction SecurityRuleDirection `json:"direction,omitempty"`
36332	// ProvisioningState - READ-ONLY; The provisioning state of the security rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
36333	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36334}
36335
36336// MarshalJSON is the custom marshaler for SecurityRulePropertiesFormat.
36337func (srpf SecurityRulePropertiesFormat) MarshalJSON() ([]byte, error) {
36338	objectMap := make(map[string]interface{})
36339	if srpf.Description != nil {
36340		objectMap["description"] = srpf.Description
36341	}
36342	if srpf.Protocol != "" {
36343		objectMap["protocol"] = srpf.Protocol
36344	}
36345	if srpf.SourcePortRange != nil {
36346		objectMap["sourcePortRange"] = srpf.SourcePortRange
36347	}
36348	if srpf.DestinationPortRange != nil {
36349		objectMap["destinationPortRange"] = srpf.DestinationPortRange
36350	}
36351	if srpf.SourceAddressPrefix != nil {
36352		objectMap["sourceAddressPrefix"] = srpf.SourceAddressPrefix
36353	}
36354	if srpf.SourceAddressPrefixes != nil {
36355		objectMap["sourceAddressPrefixes"] = srpf.SourceAddressPrefixes
36356	}
36357	if srpf.SourceApplicationSecurityGroups != nil {
36358		objectMap["sourceApplicationSecurityGroups"] = srpf.SourceApplicationSecurityGroups
36359	}
36360	if srpf.DestinationAddressPrefix != nil {
36361		objectMap["destinationAddressPrefix"] = srpf.DestinationAddressPrefix
36362	}
36363	if srpf.DestinationAddressPrefixes != nil {
36364		objectMap["destinationAddressPrefixes"] = srpf.DestinationAddressPrefixes
36365	}
36366	if srpf.DestinationApplicationSecurityGroups != nil {
36367		objectMap["destinationApplicationSecurityGroups"] = srpf.DestinationApplicationSecurityGroups
36368	}
36369	if srpf.SourcePortRanges != nil {
36370		objectMap["sourcePortRanges"] = srpf.SourcePortRanges
36371	}
36372	if srpf.DestinationPortRanges != nil {
36373		objectMap["destinationPortRanges"] = srpf.DestinationPortRanges
36374	}
36375	if srpf.Access != "" {
36376		objectMap["access"] = srpf.Access
36377	}
36378	if srpf.Priority != nil {
36379		objectMap["priority"] = srpf.Priority
36380	}
36381	if srpf.Direction != "" {
36382		objectMap["direction"] = srpf.Direction
36383	}
36384	return json.Marshal(objectMap)
36385}
36386
36387// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
36388// long-running operation.
36389type SecurityRulesCreateOrUpdateFuture struct {
36390	azure.FutureAPI
36391	// Result returns the result of the asynchronous operation.
36392	// If the operation has not completed it will return an error.
36393	Result func(SecurityRulesClient) (SecurityRule, error)
36394}
36395
36396// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36397func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
36398	var azFuture azure.Future
36399	if err := json.Unmarshal(body, &azFuture); err != nil {
36400		return err
36401	}
36402	future.FutureAPI = &azFuture
36403	future.Result = future.result
36404	return nil
36405}
36406
36407// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result.
36408func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) {
36409	var done bool
36410	done, err = future.DoneWithContext(context.Background(), client)
36411	if err != nil {
36412		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
36413		return
36414	}
36415	if !done {
36416		sr.Response.Response = future.Response()
36417		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
36418		return
36419	}
36420	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36421	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
36422		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
36423		if err != nil {
36424			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
36425		}
36426	}
36427	return
36428}
36429
36430// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
36431// operation.
36432type SecurityRulesDeleteFuture struct {
36433	azure.FutureAPI
36434	// Result returns the result of the asynchronous operation.
36435	// If the operation has not completed it will return an error.
36436	Result func(SecurityRulesClient) (autorest.Response, error)
36437}
36438
36439// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36440func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error {
36441	var azFuture azure.Future
36442	if err := json.Unmarshal(body, &azFuture); err != nil {
36443		return err
36444	}
36445	future.FutureAPI = &azFuture
36446	future.Result = future.result
36447	return nil
36448}
36449
36450// result is the default implementation for SecurityRulesDeleteFuture.Result.
36451func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) {
36452	var done bool
36453	done, err = future.DoneWithContext(context.Background(), client)
36454	if err != nil {
36455		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
36456		return
36457	}
36458	if !done {
36459		ar.Response = future.Response()
36460		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
36461		return
36462	}
36463	ar.Response = future.Response()
36464	return
36465}
36466
36467// SecurityRulesEvaluationResult network security rules evaluation result.
36468type SecurityRulesEvaluationResult struct {
36469	// Name - Name of the network security rule.
36470	Name *string `json:"name,omitempty"`
36471	// ProtocolMatched - Value indicating whether protocol is matched.
36472	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
36473	// SourceMatched - Value indicating whether source is matched.
36474	SourceMatched *bool `json:"sourceMatched,omitempty"`
36475	// SourcePortMatched - Value indicating whether source port is matched.
36476	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
36477	// DestinationMatched - Value indicating whether destination is matched.
36478	DestinationMatched *bool `json:"destinationMatched,omitempty"`
36479	// DestinationPortMatched - Value indicating whether destination port is matched.
36480	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
36481}
36482
36483// ServiceAssociationLink serviceAssociationLink resource.
36484type ServiceAssociationLink struct {
36485	// ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format.
36486	*ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"`
36487	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
36488	Name *string `json:"name,omitempty"`
36489	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
36490	Etag *string `json:"etag,omitempty"`
36491	// Type - READ-ONLY; Resource type.
36492	Type *string `json:"type,omitempty"`
36493	// ID - Resource ID.
36494	ID *string `json:"id,omitempty"`
36495}
36496
36497// MarshalJSON is the custom marshaler for ServiceAssociationLink.
36498func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) {
36499	objectMap := make(map[string]interface{})
36500	if sal.ServiceAssociationLinkPropertiesFormat != nil {
36501		objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat
36502	}
36503	if sal.Name != nil {
36504		objectMap["name"] = sal.Name
36505	}
36506	if sal.ID != nil {
36507		objectMap["id"] = sal.ID
36508	}
36509	return json.Marshal(objectMap)
36510}
36511
36512// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct.
36513func (sal *ServiceAssociationLink) UnmarshalJSON(body []byte) error {
36514	var m map[string]*json.RawMessage
36515	err := json.Unmarshal(body, &m)
36516	if err != nil {
36517		return err
36518	}
36519	for k, v := range m {
36520		switch k {
36521		case "properties":
36522			if v != nil {
36523				var serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat
36524				err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat)
36525				if err != nil {
36526					return err
36527				}
36528				sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat
36529			}
36530		case "name":
36531			if v != nil {
36532				var name string
36533				err = json.Unmarshal(*v, &name)
36534				if err != nil {
36535					return err
36536				}
36537				sal.Name = &name
36538			}
36539		case "etag":
36540			if v != nil {
36541				var etag string
36542				err = json.Unmarshal(*v, &etag)
36543				if err != nil {
36544					return err
36545				}
36546				sal.Etag = &etag
36547			}
36548		case "type":
36549			if v != nil {
36550				var typeVar string
36551				err = json.Unmarshal(*v, &typeVar)
36552				if err != nil {
36553					return err
36554				}
36555				sal.Type = &typeVar
36556			}
36557		case "id":
36558			if v != nil {
36559				var ID string
36560				err = json.Unmarshal(*v, &ID)
36561				if err != nil {
36562					return err
36563				}
36564				sal.ID = &ID
36565			}
36566		}
36567	}
36568
36569	return nil
36570}
36571
36572// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink.
36573type ServiceAssociationLinkPropertiesFormat struct {
36574	// LinkedResourceType - Resource type of the linked resource.
36575	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
36576	// Link - Link to the external resource.
36577	Link *string `json:"link,omitempty"`
36578	// ProvisioningState - READ-ONLY; The provisioning state of the service association link resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
36579	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36580	// AllowDelete - If true, the resource can be deleted.
36581	AllowDelete *bool `json:"allowDelete,omitempty"`
36582	// Locations - A list of locations.
36583	Locations *[]string `json:"locations,omitempty"`
36584}
36585
36586// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat.
36587func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
36588	objectMap := make(map[string]interface{})
36589	if salpf.LinkedResourceType != nil {
36590		objectMap["linkedResourceType"] = salpf.LinkedResourceType
36591	}
36592	if salpf.Link != nil {
36593		objectMap["link"] = salpf.Link
36594	}
36595	if salpf.AllowDelete != nil {
36596		objectMap["allowDelete"] = salpf.AllowDelete
36597	}
36598	if salpf.Locations != nil {
36599		objectMap["locations"] = salpf.Locations
36600	}
36601	return json.Marshal(objectMap)
36602}
36603
36604// ServiceAssociationLinksListResult response for ServiceAssociationLinks_List operation.
36605type ServiceAssociationLinksListResult struct {
36606	autorest.Response `json:"-"`
36607	// Value - The service association links in a subnet.
36608	Value *[]ServiceAssociationLink `json:"value,omitempty"`
36609	// NextLink - READ-ONLY; The URL to get the next set of results.
36610	NextLink *string `json:"nextLink,omitempty"`
36611}
36612
36613// MarshalJSON is the custom marshaler for ServiceAssociationLinksListResult.
36614func (sallr ServiceAssociationLinksListResult) MarshalJSON() ([]byte, error) {
36615	objectMap := make(map[string]interface{})
36616	if sallr.Value != nil {
36617		objectMap["value"] = sallr.Value
36618	}
36619	return json.Marshal(objectMap)
36620}
36621
36622// ServiceDelegationPropertiesFormat properties of a service delegation.
36623type ServiceDelegationPropertiesFormat struct {
36624	// ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers).
36625	ServiceName *string `json:"serviceName,omitempty"`
36626	// Actions - READ-ONLY; The actions permitted to the service upon delegation.
36627	Actions *[]string `json:"actions,omitempty"`
36628	// ProvisioningState - READ-ONLY; The provisioning state of the service delegation resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
36629	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36630}
36631
36632// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat.
36633func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) {
36634	objectMap := make(map[string]interface{})
36635	if sdpf.ServiceName != nil {
36636		objectMap["serviceName"] = sdpf.ServiceName
36637	}
36638	return json.Marshal(objectMap)
36639}
36640
36641// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
36642// a long-running operation.
36643type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
36644	azure.FutureAPI
36645	// Result returns the result of the asynchronous operation.
36646	// If the operation has not completed it will return an error.
36647	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
36648}
36649
36650// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36651func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
36652	var azFuture azure.Future
36653	if err := json.Unmarshal(body, &azFuture); err != nil {
36654		return err
36655	}
36656	future.FutureAPI = &azFuture
36657	future.Result = future.result
36658	return nil
36659}
36660
36661// result is the default implementation for ServiceEndpointPoliciesCreateOrUpdateFuture.Result.
36662func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
36663	var done bool
36664	done, err = future.DoneWithContext(context.Background(), client)
36665	if err != nil {
36666		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
36667		return
36668	}
36669	if !done {
36670		sep.Response.Response = future.Response()
36671		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesCreateOrUpdateFuture")
36672		return
36673	}
36674	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36675	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
36676		sep, err = client.CreateOrUpdateResponder(sep.Response.Response)
36677		if err != nil {
36678			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
36679		}
36680	}
36681	return
36682}
36683
36684// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
36685// long-running operation.
36686type ServiceEndpointPoliciesDeleteFuture struct {
36687	azure.FutureAPI
36688	// Result returns the result of the asynchronous operation.
36689	// If the operation has not completed it will return an error.
36690	Result func(ServiceEndpointPoliciesClient) (autorest.Response, error)
36691}
36692
36693// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36694func (future *ServiceEndpointPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
36695	var azFuture azure.Future
36696	if err := json.Unmarshal(body, &azFuture); err != nil {
36697		return err
36698	}
36699	future.FutureAPI = &azFuture
36700	future.Result = future.result
36701	return nil
36702}
36703
36704// result is the default implementation for ServiceEndpointPoliciesDeleteFuture.Result.
36705func (future *ServiceEndpointPoliciesDeleteFuture) result(client ServiceEndpointPoliciesClient) (ar autorest.Response, err error) {
36706	var done bool
36707	done, err = future.DoneWithContext(context.Background(), client)
36708	if err != nil {
36709		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
36710		return
36711	}
36712	if !done {
36713		ar.Response = future.Response()
36714		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesDeleteFuture")
36715		return
36716	}
36717	ar.Response = future.Response()
36718	return
36719}
36720
36721// ServiceEndpointPolicy service End point policy resource.
36722type ServiceEndpointPolicy struct {
36723	autorest.Response `json:"-"`
36724	// ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy.
36725	*ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"`
36726	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
36727	Etag *string `json:"etag,omitempty"`
36728	// Kind - READ-ONLY; Kind of service endpoint policy. This is metadata used for the Azure portal experience.
36729	Kind *string `json:"kind,omitempty"`
36730	// ID - Resource ID.
36731	ID *string `json:"id,omitempty"`
36732	// Name - READ-ONLY; Resource name.
36733	Name *string `json:"name,omitempty"`
36734	// Type - READ-ONLY; Resource type.
36735	Type *string `json:"type,omitempty"`
36736	// Location - Resource location.
36737	Location *string `json:"location,omitempty"`
36738	// Tags - Resource tags.
36739	Tags map[string]*string `json:"tags"`
36740}
36741
36742// MarshalJSON is the custom marshaler for ServiceEndpointPolicy.
36743func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) {
36744	objectMap := make(map[string]interface{})
36745	if sep.ServiceEndpointPolicyPropertiesFormat != nil {
36746		objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat
36747	}
36748	if sep.ID != nil {
36749		objectMap["id"] = sep.ID
36750	}
36751	if sep.Location != nil {
36752		objectMap["location"] = sep.Location
36753	}
36754	if sep.Tags != nil {
36755		objectMap["tags"] = sep.Tags
36756	}
36757	return json.Marshal(objectMap)
36758}
36759
36760// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct.
36761func (sep *ServiceEndpointPolicy) UnmarshalJSON(body []byte) error {
36762	var m map[string]*json.RawMessage
36763	err := json.Unmarshal(body, &m)
36764	if err != nil {
36765		return err
36766	}
36767	for k, v := range m {
36768		switch k {
36769		case "properties":
36770			if v != nil {
36771				var serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat
36772				err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat)
36773				if err != nil {
36774					return err
36775				}
36776				sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat
36777			}
36778		case "etag":
36779			if v != nil {
36780				var etag string
36781				err = json.Unmarshal(*v, &etag)
36782				if err != nil {
36783					return err
36784				}
36785				sep.Etag = &etag
36786			}
36787		case "kind":
36788			if v != nil {
36789				var kind string
36790				err = json.Unmarshal(*v, &kind)
36791				if err != nil {
36792					return err
36793				}
36794				sep.Kind = &kind
36795			}
36796		case "id":
36797			if v != nil {
36798				var ID string
36799				err = json.Unmarshal(*v, &ID)
36800				if err != nil {
36801					return err
36802				}
36803				sep.ID = &ID
36804			}
36805		case "name":
36806			if v != nil {
36807				var name string
36808				err = json.Unmarshal(*v, &name)
36809				if err != nil {
36810					return err
36811				}
36812				sep.Name = &name
36813			}
36814		case "type":
36815			if v != nil {
36816				var typeVar string
36817				err = json.Unmarshal(*v, &typeVar)
36818				if err != nil {
36819					return err
36820				}
36821				sep.Type = &typeVar
36822			}
36823		case "location":
36824			if v != nil {
36825				var location string
36826				err = json.Unmarshal(*v, &location)
36827				if err != nil {
36828					return err
36829				}
36830				sep.Location = &location
36831			}
36832		case "tags":
36833			if v != nil {
36834				var tags map[string]*string
36835				err = json.Unmarshal(*v, &tags)
36836				if err != nil {
36837					return err
36838				}
36839				sep.Tags = tags
36840			}
36841		}
36842	}
36843
36844	return nil
36845}
36846
36847// ServiceEndpointPolicyDefinition service Endpoint policy definitions.
36848type ServiceEndpointPolicyDefinition struct {
36849	autorest.Response `json:"-"`
36850	// ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition.
36851	*ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"`
36852	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
36853	Name *string `json:"name,omitempty"`
36854	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
36855	Etag *string `json:"etag,omitempty"`
36856	// ID - Resource ID.
36857	ID *string `json:"id,omitempty"`
36858}
36859
36860// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition.
36861func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) {
36862	objectMap := make(map[string]interface{})
36863	if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil {
36864		objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat
36865	}
36866	if sepd.Name != nil {
36867		objectMap["name"] = sepd.Name
36868	}
36869	if sepd.ID != nil {
36870		objectMap["id"] = sepd.ID
36871	}
36872	return json.Marshal(objectMap)
36873}
36874
36875// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct.
36876func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error {
36877	var m map[string]*json.RawMessage
36878	err := json.Unmarshal(body, &m)
36879	if err != nil {
36880		return err
36881	}
36882	for k, v := range m {
36883		switch k {
36884		case "properties":
36885			if v != nil {
36886				var serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat
36887				err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat)
36888				if err != nil {
36889					return err
36890				}
36891				sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat
36892			}
36893		case "name":
36894			if v != nil {
36895				var name string
36896				err = json.Unmarshal(*v, &name)
36897				if err != nil {
36898					return err
36899				}
36900				sepd.Name = &name
36901			}
36902		case "etag":
36903			if v != nil {
36904				var etag string
36905				err = json.Unmarshal(*v, &etag)
36906				if err != nil {
36907					return err
36908				}
36909				sepd.Etag = &etag
36910			}
36911		case "id":
36912			if v != nil {
36913				var ID string
36914				err = json.Unmarshal(*v, &ID)
36915				if err != nil {
36916					return err
36917				}
36918				sepd.ID = &ID
36919			}
36920		}
36921	}
36922
36923	return nil
36924}
36925
36926// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service
36927// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
36928type ServiceEndpointPolicyDefinitionListResult struct {
36929	autorest.Response `json:"-"`
36930	// Value - The service endpoint policy definition in a service endpoint policy.
36931	Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"`
36932	// NextLink - The URL to get the next set of results.
36933	NextLink *string `json:"nextLink,omitempty"`
36934}
36935
36936// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of
36937// ServiceEndpointPolicyDefinition values.
36938type ServiceEndpointPolicyDefinitionListResultIterator struct {
36939	i    int
36940	page ServiceEndpointPolicyDefinitionListResultPage
36941}
36942
36943// NextWithContext advances to the next value.  If there was an error making
36944// the request the iterator does not advance and the error is returned.
36945func (iter *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
36946	if tracing.IsEnabled() {
36947		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.NextWithContext")
36948		defer func() {
36949			sc := -1
36950			if iter.Response().Response.Response != nil {
36951				sc = iter.Response().Response.Response.StatusCode
36952			}
36953			tracing.EndSpan(ctx, sc, err)
36954		}()
36955	}
36956	iter.i++
36957	if iter.i < len(iter.page.Values()) {
36958		return nil
36959	}
36960	err = iter.page.NextWithContext(ctx)
36961	if err != nil {
36962		iter.i--
36963		return err
36964	}
36965	iter.i = 0
36966	return nil
36967}
36968
36969// Next advances to the next value.  If there was an error making
36970// the request the iterator does not advance and the error is returned.
36971// Deprecated: Use NextWithContext() instead.
36972func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
36973	return iter.NextWithContext(context.Background())
36974}
36975
36976// NotDone returns true if the enumeration should be started or is not yet complete.
36977func (iter ServiceEndpointPolicyDefinitionListResultIterator) NotDone() bool {
36978	return iter.page.NotDone() && iter.i < len(iter.page.Values())
36979}
36980
36981// Response returns the raw server response from the last page request.
36982func (iter ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult {
36983	return iter.page.Response()
36984}
36985
36986// Value returns the current value or a zero-initialized value if the
36987// iterator has advanced beyond the end of the collection.
36988func (iter ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition {
36989	if !iter.page.NotDone() {
36990		return ServiceEndpointPolicyDefinition{}
36991	}
36992	return iter.page.Values()[iter.i]
36993}
36994
36995// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
36996func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
36997	return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
36998}
36999
37000// IsEmpty returns true if the ListResult contains no values.
37001func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
37002	return sepdlr.Value == nil || len(*sepdlr.Value) == 0
37003}
37004
37005// hasNextLink returns true if the NextLink is not empty.
37006func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool {
37007	return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0
37008}
37009
37010// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
37011// It returns nil if no more results exist.
37012func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
37013	if !sepdlr.hasNextLink() {
37014		return nil, nil
37015	}
37016	return autorest.Prepare((&http.Request{}).WithContext(ctx),
37017		autorest.AsJSON(),
37018		autorest.AsGet(),
37019		autorest.WithBaseURL(to.String(sepdlr.NextLink)))
37020}
37021
37022// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
37023type ServiceEndpointPolicyDefinitionListResultPage struct {
37024	fn     func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
37025	sepdlr ServiceEndpointPolicyDefinitionListResult
37026}
37027
37028// NextWithContext advances to the next page of values.  If there was an error making
37029// the request the page does not advance and the error is returned.
37030func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
37031	if tracing.IsEnabled() {
37032		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext")
37033		defer func() {
37034			sc := -1
37035			if page.Response().Response.Response != nil {
37036				sc = page.Response().Response.Response.StatusCode
37037			}
37038			tracing.EndSpan(ctx, sc, err)
37039		}()
37040	}
37041	for {
37042		next, err := page.fn(ctx, page.sepdlr)
37043		if err != nil {
37044			return err
37045		}
37046		page.sepdlr = next
37047		if !next.hasNextLink() || !next.IsEmpty() {
37048			break
37049		}
37050	}
37051	return nil
37052}
37053
37054// Next advances to the next page of values.  If there was an error making
37055// the request the page does not advance and the error is returned.
37056// Deprecated: Use NextWithContext() instead.
37057func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
37058	return page.NextWithContext(context.Background())
37059}
37060
37061// NotDone returns true if the page enumeration should be started or is not yet complete.
37062func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
37063	return !page.sepdlr.IsEmpty()
37064}
37065
37066// Response returns the raw server response from the last page request.
37067func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult {
37068	return page.sepdlr
37069}
37070
37071// Values returns the slice of values for the current page or nil if there are no values.
37072func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition {
37073	if page.sepdlr.IsEmpty() {
37074		return nil
37075	}
37076	return *page.sepdlr.Value
37077}
37078
37079// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
37080func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
37081	return ServiceEndpointPolicyDefinitionListResultPage{
37082		fn:     getNextPage,
37083		sepdlr: cur,
37084	}
37085}
37086
37087// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
37088type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
37089	// Description - A description for this rule. Restricted to 140 chars.
37090	Description *string `json:"description,omitempty"`
37091	// Service - Service endpoint name.
37092	Service *string `json:"service,omitempty"`
37093	// ServiceResources - A list of service resources.
37094	ServiceResources *[]string `json:"serviceResources,omitempty"`
37095	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy definition resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
37096	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
37097}
37098
37099// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat.
37100func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) {
37101	objectMap := make(map[string]interface{})
37102	if sepdpf.Description != nil {
37103		objectMap["description"] = sepdpf.Description
37104	}
37105	if sepdpf.Service != nil {
37106		objectMap["service"] = sepdpf.Service
37107	}
37108	if sepdpf.ServiceResources != nil {
37109		objectMap["serviceResources"] = sepdpf.ServiceResources
37110	}
37111	return json.Marshal(objectMap)
37112}
37113
37114// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
37115// results of a long-running operation.
37116type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
37117	azure.FutureAPI
37118	// Result returns the result of the asynchronous operation.
37119	// If the operation has not completed it will return an error.
37120	Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error)
37121}
37122
37123// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37124func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
37125	var azFuture azure.Future
37126	if err := json.Unmarshal(body, &azFuture); err != nil {
37127		return err
37128	}
37129	future.FutureAPI = &azFuture
37130	future.Result = future.result
37131	return nil
37132}
37133
37134// result is the default implementation for ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture.Result.
37135func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) result(client ServiceEndpointPolicyDefinitionsClient) (sepd ServiceEndpointPolicyDefinition, err error) {
37136	var done bool
37137	done, err = future.DoneWithContext(context.Background(), client)
37138	if err != nil {
37139		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
37140		return
37141	}
37142	if !done {
37143		sepd.Response.Response = future.Response()
37144		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture")
37145		return
37146	}
37147	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37148	if sepd.Response.Response, err = future.GetResult(sender); err == nil && sepd.Response.Response.StatusCode != http.StatusNoContent {
37149		sepd, err = client.CreateOrUpdateResponder(sepd.Response.Response)
37150		if err != nil {
37151			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", sepd.Response.Response, "Failure responding to request")
37152		}
37153	}
37154	return
37155}
37156
37157// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
37158// a long-running operation.
37159type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
37160	azure.FutureAPI
37161	// Result returns the result of the asynchronous operation.
37162	// If the operation has not completed it will return an error.
37163	Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error)
37164}
37165
37166// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37167func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) UnmarshalJSON(body []byte) error {
37168	var azFuture azure.Future
37169	if err := json.Unmarshal(body, &azFuture); err != nil {
37170		return err
37171	}
37172	future.FutureAPI = &azFuture
37173	future.Result = future.result
37174	return nil
37175}
37176
37177// result is the default implementation for ServiceEndpointPolicyDefinitionsDeleteFuture.Result.
37178func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) result(client ServiceEndpointPolicyDefinitionsClient) (ar autorest.Response, err error) {
37179	var done bool
37180	done, err = future.DoneWithContext(context.Background(), client)
37181	if err != nil {
37182		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsDeleteFuture", "Result", future.Response(), "Polling failure")
37183		return
37184	}
37185	if !done {
37186		ar.Response = future.Response()
37187		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsDeleteFuture")
37188		return
37189	}
37190	ar.Response = future.Response()
37191	return
37192}
37193
37194// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
37195type ServiceEndpointPolicyListResult struct {
37196	autorest.Response `json:"-"`
37197	// Value - A list of ServiceEndpointPolicy resources.
37198	Value *[]ServiceEndpointPolicy `json:"value,omitempty"`
37199	// NextLink - READ-ONLY; The URL to get the next set of results.
37200	NextLink *string `json:"nextLink,omitempty"`
37201}
37202
37203// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult.
37204func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) {
37205	objectMap := make(map[string]interface{})
37206	if seplr.Value != nil {
37207		objectMap["value"] = seplr.Value
37208	}
37209	return json.Marshal(objectMap)
37210}
37211
37212// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
37213// values.
37214type ServiceEndpointPolicyListResultIterator struct {
37215	i    int
37216	page ServiceEndpointPolicyListResultPage
37217}
37218
37219// NextWithContext advances to the next value.  If there was an error making
37220// the request the iterator does not advance and the error is returned.
37221func (iter *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
37222	if tracing.IsEnabled() {
37223		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.NextWithContext")
37224		defer func() {
37225			sc := -1
37226			if iter.Response().Response.Response != nil {
37227				sc = iter.Response().Response.Response.StatusCode
37228			}
37229			tracing.EndSpan(ctx, sc, err)
37230		}()
37231	}
37232	iter.i++
37233	if iter.i < len(iter.page.Values()) {
37234		return nil
37235	}
37236	err = iter.page.NextWithContext(ctx)
37237	if err != nil {
37238		iter.i--
37239		return err
37240	}
37241	iter.i = 0
37242	return nil
37243}
37244
37245// Next advances to the next value.  If there was an error making
37246// the request the iterator does not advance and the error is returned.
37247// Deprecated: Use NextWithContext() instead.
37248func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
37249	return iter.NextWithContext(context.Background())
37250}
37251
37252// NotDone returns true if the enumeration should be started or is not yet complete.
37253func (iter ServiceEndpointPolicyListResultIterator) NotDone() bool {
37254	return iter.page.NotDone() && iter.i < len(iter.page.Values())
37255}
37256
37257// Response returns the raw server response from the last page request.
37258func (iter ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult {
37259	return iter.page.Response()
37260}
37261
37262// Value returns the current value or a zero-initialized value if the
37263// iterator has advanced beyond the end of the collection.
37264func (iter ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy {
37265	if !iter.page.NotDone() {
37266		return ServiceEndpointPolicy{}
37267	}
37268	return iter.page.Values()[iter.i]
37269}
37270
37271// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
37272func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
37273	return ServiceEndpointPolicyListResultIterator{page: page}
37274}
37275
37276// IsEmpty returns true if the ListResult contains no values.
37277func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
37278	return seplr.Value == nil || len(*seplr.Value) == 0
37279}
37280
37281// hasNextLink returns true if the NextLink is not empty.
37282func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool {
37283	return seplr.NextLink != nil && len(*seplr.NextLink) != 0
37284}
37285
37286// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
37287// It returns nil if no more results exist.
37288func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
37289	if !seplr.hasNextLink() {
37290		return nil, nil
37291	}
37292	return autorest.Prepare((&http.Request{}).WithContext(ctx),
37293		autorest.AsJSON(),
37294		autorest.AsGet(),
37295		autorest.WithBaseURL(to.String(seplr.NextLink)))
37296}
37297
37298// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
37299type ServiceEndpointPolicyListResultPage struct {
37300	fn    func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
37301	seplr ServiceEndpointPolicyListResult
37302}
37303
37304// NextWithContext advances to the next page of values.  If there was an error making
37305// the request the page does not advance and the error is returned.
37306func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
37307	if tracing.IsEnabled() {
37308		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext")
37309		defer func() {
37310			sc := -1
37311			if page.Response().Response.Response != nil {
37312				sc = page.Response().Response.Response.StatusCode
37313			}
37314			tracing.EndSpan(ctx, sc, err)
37315		}()
37316	}
37317	for {
37318		next, err := page.fn(ctx, page.seplr)
37319		if err != nil {
37320			return err
37321		}
37322		page.seplr = next
37323		if !next.hasNextLink() || !next.IsEmpty() {
37324			break
37325		}
37326	}
37327	return nil
37328}
37329
37330// Next advances to the next page of values.  If there was an error making
37331// the request the page does not advance and the error is returned.
37332// Deprecated: Use NextWithContext() instead.
37333func (page *ServiceEndpointPolicyListResultPage) Next() error {
37334	return page.NextWithContext(context.Background())
37335}
37336
37337// NotDone returns true if the page enumeration should be started or is not yet complete.
37338func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
37339	return !page.seplr.IsEmpty()
37340}
37341
37342// Response returns the raw server response from the last page request.
37343func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult {
37344	return page.seplr
37345}
37346
37347// Values returns the slice of values for the current page or nil if there are no values.
37348func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy {
37349	if page.seplr.IsEmpty() {
37350		return nil
37351	}
37352	return *page.seplr.Value
37353}
37354
37355// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
37356func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
37357	return ServiceEndpointPolicyListResultPage{
37358		fn:    getNextPage,
37359		seplr: cur,
37360	}
37361}
37362
37363// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
37364type ServiceEndpointPolicyPropertiesFormat struct {
37365	// ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
37366	ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"`
37367	// Subnets - READ-ONLY; A collection of references to subnets.
37368	Subnets *[]Subnet `json:"subnets,omitempty"`
37369	// ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource.
37370	ResourceGUID *string `json:"resourceGuid,omitempty"`
37371	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
37372	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
37373}
37374
37375// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat.
37376func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
37377	objectMap := make(map[string]interface{})
37378	if seppf.ServiceEndpointPolicyDefinitions != nil {
37379		objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions
37380	}
37381	return json.Marshal(objectMap)
37382}
37383
37384// ServiceEndpointPropertiesFormat the service endpoint properties.
37385type ServiceEndpointPropertiesFormat struct {
37386	// Service - The type of the endpoint service.
37387	Service *string `json:"service,omitempty"`
37388	// Locations - A list of locations.
37389	Locations *[]string `json:"locations,omitempty"`
37390	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
37391	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
37392}
37393
37394// MarshalJSON is the custom marshaler for ServiceEndpointPropertiesFormat.
37395func (sepf ServiceEndpointPropertiesFormat) MarshalJSON() ([]byte, error) {
37396	objectMap := make(map[string]interface{})
37397	if sepf.Service != nil {
37398		objectMap["service"] = sepf.Service
37399	}
37400	if sepf.Locations != nil {
37401		objectMap["locations"] = sepf.Locations
37402	}
37403	return json.Marshal(objectMap)
37404}
37405
37406// ServiceTagInformation the service tag information.
37407type ServiceTagInformation struct {
37408	// Properties - READ-ONLY; Properties of the service tag information.
37409	Properties *ServiceTagInformationPropertiesFormat `json:"properties,omitempty"`
37410	// Name - READ-ONLY; The name of service tag.
37411	Name *string `json:"name,omitempty"`
37412	// ID - READ-ONLY; The ID of service tag.
37413	ID *string `json:"id,omitempty"`
37414}
37415
37416// MarshalJSON is the custom marshaler for ServiceTagInformation.
37417func (sti ServiceTagInformation) MarshalJSON() ([]byte, error) {
37418	objectMap := make(map[string]interface{})
37419	return json.Marshal(objectMap)
37420}
37421
37422// ServiceTagInformationPropertiesFormat properties of the service tag information.
37423type ServiceTagInformationPropertiesFormat struct {
37424	// ChangeNumber - READ-ONLY; The iteration number of service tag.
37425	ChangeNumber *string `json:"changeNumber,omitempty"`
37426	// Region - READ-ONLY; The region of service tag.
37427	Region *string `json:"region,omitempty"`
37428	// SystemService - READ-ONLY; The name of system service.
37429	SystemService *string `json:"systemService,omitempty"`
37430	// AddressPrefixes - READ-ONLY; The list of IP address prefixes.
37431	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
37432	// State - READ-ONLY; The state of the service tag.
37433	State *string `json:"state,omitempty"`
37434}
37435
37436// MarshalJSON is the custom marshaler for ServiceTagInformationPropertiesFormat.
37437func (stipf ServiceTagInformationPropertiesFormat) MarshalJSON() ([]byte, error) {
37438	objectMap := make(map[string]interface{})
37439	return json.Marshal(objectMap)
37440}
37441
37442// ServiceTagsListResult response for the ListServiceTags API service call.
37443type ServiceTagsListResult struct {
37444	autorest.Response `json:"-"`
37445	// Name - READ-ONLY; The name of the cloud.
37446	Name *string `json:"name,omitempty"`
37447	// ID - READ-ONLY; The ID of the cloud.
37448	ID *string `json:"id,omitempty"`
37449	// Type - READ-ONLY; The azure resource type.
37450	Type *string `json:"type,omitempty"`
37451	// ChangeNumber - READ-ONLY; The iteration number.
37452	ChangeNumber *string `json:"changeNumber,omitempty"`
37453	// Cloud - READ-ONLY; The name of the cloud.
37454	Cloud *string `json:"cloud,omitempty"`
37455	// Values - READ-ONLY; The list of service tag information resources.
37456	Values *[]ServiceTagInformation `json:"values,omitempty"`
37457	// NextLink - READ-ONLY; The URL to get next page of service tag information resources.
37458	NextLink *string `json:"nextLink,omitempty"`
37459}
37460
37461// MarshalJSON is the custom marshaler for ServiceTagsListResult.
37462func (stlr ServiceTagsListResult) MarshalJSON() ([]byte, error) {
37463	objectMap := make(map[string]interface{})
37464	return json.Marshal(objectMap)
37465}
37466
37467// SessionIds list of session IDs.
37468type SessionIds struct {
37469	// SessionIds - List of session IDs.
37470	SessionIds *[]string `json:"sessionIds,omitempty"`
37471}
37472
37473// StaticRoute list of all Static Routes.
37474type StaticRoute struct {
37475	// Name - The name of the StaticRoute that is unique within a VnetRoute.
37476	Name *string `json:"name,omitempty"`
37477	// AddressPrefixes - List of all address prefixes.
37478	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
37479	// NextHopIPAddress - The ip address of the next hop.
37480	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
37481}
37482
37483// String ...
37484type String struct {
37485	autorest.Response `json:"-"`
37486	Value             *string `json:"value,omitempty"`
37487}
37488
37489// Subnet subnet in a virtual network resource.
37490type Subnet struct {
37491	autorest.Response `json:"-"`
37492	// SubnetPropertiesFormat - Properties of the subnet.
37493	*SubnetPropertiesFormat `json:"properties,omitempty"`
37494	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
37495	Name *string `json:"name,omitempty"`
37496	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
37497	Etag *string `json:"etag,omitempty"`
37498	// Type - Resource type.
37499	Type *string `json:"type,omitempty"`
37500	// ID - Resource ID.
37501	ID *string `json:"id,omitempty"`
37502}
37503
37504// MarshalJSON is the custom marshaler for Subnet.
37505func (s Subnet) MarshalJSON() ([]byte, error) {
37506	objectMap := make(map[string]interface{})
37507	if s.SubnetPropertiesFormat != nil {
37508		objectMap["properties"] = s.SubnetPropertiesFormat
37509	}
37510	if s.Name != nil {
37511		objectMap["name"] = s.Name
37512	}
37513	if s.Type != nil {
37514		objectMap["type"] = s.Type
37515	}
37516	if s.ID != nil {
37517		objectMap["id"] = s.ID
37518	}
37519	return json.Marshal(objectMap)
37520}
37521
37522// UnmarshalJSON is the custom unmarshaler for Subnet struct.
37523func (s *Subnet) UnmarshalJSON(body []byte) error {
37524	var m map[string]*json.RawMessage
37525	err := json.Unmarshal(body, &m)
37526	if err != nil {
37527		return err
37528	}
37529	for k, v := range m {
37530		switch k {
37531		case "properties":
37532			if v != nil {
37533				var subnetPropertiesFormat SubnetPropertiesFormat
37534				err = json.Unmarshal(*v, &subnetPropertiesFormat)
37535				if err != nil {
37536					return err
37537				}
37538				s.SubnetPropertiesFormat = &subnetPropertiesFormat
37539			}
37540		case "name":
37541			if v != nil {
37542				var name string
37543				err = json.Unmarshal(*v, &name)
37544				if err != nil {
37545					return err
37546				}
37547				s.Name = &name
37548			}
37549		case "etag":
37550			if v != nil {
37551				var etag string
37552				err = json.Unmarshal(*v, &etag)
37553				if err != nil {
37554					return err
37555				}
37556				s.Etag = &etag
37557			}
37558		case "type":
37559			if v != nil {
37560				var typeVar string
37561				err = json.Unmarshal(*v, &typeVar)
37562				if err != nil {
37563					return err
37564				}
37565				s.Type = &typeVar
37566			}
37567		case "id":
37568			if v != nil {
37569				var ID string
37570				err = json.Unmarshal(*v, &ID)
37571				if err != nil {
37572					return err
37573				}
37574				s.ID = &ID
37575			}
37576		}
37577	}
37578
37579	return nil
37580}
37581
37582// SubnetAssociation subnet and it's custom security rules.
37583type SubnetAssociation struct {
37584	// ID - READ-ONLY; Subnet ID.
37585	ID *string `json:"id,omitempty"`
37586	// SecurityRules - Collection of custom security rules.
37587	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
37588}
37589
37590// MarshalJSON is the custom marshaler for SubnetAssociation.
37591func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
37592	objectMap := make(map[string]interface{})
37593	if sa.SecurityRules != nil {
37594		objectMap["securityRules"] = sa.SecurityRules
37595	}
37596	return json.Marshal(objectMap)
37597}
37598
37599// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
37600// network.
37601type SubnetListResult struct {
37602	autorest.Response `json:"-"`
37603	// Value - The subnets in a virtual network.
37604	Value *[]Subnet `json:"value,omitempty"`
37605	// NextLink - The URL to get the next set of results.
37606	NextLink *string `json:"nextLink,omitempty"`
37607}
37608
37609// SubnetListResultIterator provides access to a complete listing of Subnet values.
37610type SubnetListResultIterator struct {
37611	i    int
37612	page SubnetListResultPage
37613}
37614
37615// NextWithContext advances to the next value.  If there was an error making
37616// the request the iterator does not advance and the error is returned.
37617func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
37618	if tracing.IsEnabled() {
37619		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
37620		defer func() {
37621			sc := -1
37622			if iter.Response().Response.Response != nil {
37623				sc = iter.Response().Response.Response.StatusCode
37624			}
37625			tracing.EndSpan(ctx, sc, err)
37626		}()
37627	}
37628	iter.i++
37629	if iter.i < len(iter.page.Values()) {
37630		return nil
37631	}
37632	err = iter.page.NextWithContext(ctx)
37633	if err != nil {
37634		iter.i--
37635		return err
37636	}
37637	iter.i = 0
37638	return nil
37639}
37640
37641// Next advances to the next value.  If there was an error making
37642// the request the iterator does not advance and the error is returned.
37643// Deprecated: Use NextWithContext() instead.
37644func (iter *SubnetListResultIterator) Next() error {
37645	return iter.NextWithContext(context.Background())
37646}
37647
37648// NotDone returns true if the enumeration should be started or is not yet complete.
37649func (iter SubnetListResultIterator) NotDone() bool {
37650	return iter.page.NotDone() && iter.i < len(iter.page.Values())
37651}
37652
37653// Response returns the raw server response from the last page request.
37654func (iter SubnetListResultIterator) Response() SubnetListResult {
37655	return iter.page.Response()
37656}
37657
37658// Value returns the current value or a zero-initialized value if the
37659// iterator has advanced beyond the end of the collection.
37660func (iter SubnetListResultIterator) Value() Subnet {
37661	if !iter.page.NotDone() {
37662		return Subnet{}
37663	}
37664	return iter.page.Values()[iter.i]
37665}
37666
37667// Creates a new instance of the SubnetListResultIterator type.
37668func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
37669	return SubnetListResultIterator{page: page}
37670}
37671
37672// IsEmpty returns true if the ListResult contains no values.
37673func (slr SubnetListResult) IsEmpty() bool {
37674	return slr.Value == nil || len(*slr.Value) == 0
37675}
37676
37677// hasNextLink returns true if the NextLink is not empty.
37678func (slr SubnetListResult) hasNextLink() bool {
37679	return slr.NextLink != nil && len(*slr.NextLink) != 0
37680}
37681
37682// subnetListResultPreparer prepares a request to retrieve the next set of results.
37683// It returns nil if no more results exist.
37684func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
37685	if !slr.hasNextLink() {
37686		return nil, nil
37687	}
37688	return autorest.Prepare((&http.Request{}).WithContext(ctx),
37689		autorest.AsJSON(),
37690		autorest.AsGet(),
37691		autorest.WithBaseURL(to.String(slr.NextLink)))
37692}
37693
37694// SubnetListResultPage contains a page of Subnet values.
37695type SubnetListResultPage struct {
37696	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
37697	slr SubnetListResult
37698}
37699
37700// NextWithContext advances to the next page of values.  If there was an error making
37701// the request the page does not advance and the error is returned.
37702func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
37703	if tracing.IsEnabled() {
37704		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
37705		defer func() {
37706			sc := -1
37707			if page.Response().Response.Response != nil {
37708				sc = page.Response().Response.Response.StatusCode
37709			}
37710			tracing.EndSpan(ctx, sc, err)
37711		}()
37712	}
37713	for {
37714		next, err := page.fn(ctx, page.slr)
37715		if err != nil {
37716			return err
37717		}
37718		page.slr = next
37719		if !next.hasNextLink() || !next.IsEmpty() {
37720			break
37721		}
37722	}
37723	return nil
37724}
37725
37726// Next advances to the next page of values.  If there was an error making
37727// the request the page does not advance and the error is returned.
37728// Deprecated: Use NextWithContext() instead.
37729func (page *SubnetListResultPage) Next() error {
37730	return page.NextWithContext(context.Background())
37731}
37732
37733// NotDone returns true if the page enumeration should be started or is not yet complete.
37734func (page SubnetListResultPage) NotDone() bool {
37735	return !page.slr.IsEmpty()
37736}
37737
37738// Response returns the raw server response from the last page request.
37739func (page SubnetListResultPage) Response() SubnetListResult {
37740	return page.slr
37741}
37742
37743// Values returns the slice of values for the current page or nil if there are no values.
37744func (page SubnetListResultPage) Values() []Subnet {
37745	if page.slr.IsEmpty() {
37746		return nil
37747	}
37748	return *page.slr.Value
37749}
37750
37751// Creates a new instance of the SubnetListResultPage type.
37752func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
37753	return SubnetListResultPage{
37754		fn:  getNextPage,
37755		slr: cur,
37756	}
37757}
37758
37759// SubnetPropertiesFormat properties of the subnet.
37760type SubnetPropertiesFormat struct {
37761	// AddressPrefix - The address prefix for the subnet.
37762	AddressPrefix *string `json:"addressPrefix,omitempty"`
37763	// AddressPrefixes - List of address prefixes for the subnet.
37764	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
37765	// NetworkSecurityGroup - The reference to the NetworkSecurityGroup resource.
37766	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
37767	// RouteTable - The reference to the RouteTable resource.
37768	RouteTable *RouteTable `json:"routeTable,omitempty"`
37769	// NatGateway - Nat gateway associated with this subnet.
37770	NatGateway *SubResource `json:"natGateway,omitempty"`
37771	// ServiceEndpoints - An array of service endpoints.
37772	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
37773	// ServiceEndpointPolicies - An array of service endpoint policies.
37774	ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"`
37775	// PrivateEndpoints - READ-ONLY; An array of references to private endpoints.
37776	PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"`
37777	// IPConfigurations - READ-ONLY; An array of references to the network interface IP configurations using subnet.
37778	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
37779	// IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet.
37780	IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"`
37781	// IPAllocations - Array of IpAllocation which reference this subnet.
37782	IPAllocations *[]SubResource `json:"ipAllocations,omitempty"`
37783	// ResourceNavigationLinks - READ-ONLY; An array of references to the external resources using subnet.
37784	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
37785	// ServiceAssociationLinks - READ-ONLY; An array of references to services injecting into this subnet.
37786	ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"`
37787	// Delegations - An array of references to the delegations on the subnet.
37788	Delegations *[]Delegation `json:"delegations,omitempty"`
37789	// Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.
37790	Purpose *string `json:"purpose,omitempty"`
37791	// ProvisioningState - READ-ONLY; The provisioning state of the subnet resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
37792	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
37793	// PrivateEndpointNetworkPolicies - Enable or Disable apply network policies on private end point in the subnet. Possible values include: 'VirtualNetworkPrivateEndpointNetworkPoliciesEnabled', 'VirtualNetworkPrivateEndpointNetworkPoliciesDisabled'
37794	PrivateEndpointNetworkPolicies VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"`
37795	// PrivateLinkServiceNetworkPolicies - Enable or Disable apply network policies on private link service in the subnet. Possible values include: 'VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled', 'VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled'
37796	PrivateLinkServiceNetworkPolicies VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"`
37797	// ApplicationGatewayIPConfigurations - Application gateway IP configurations of virtual network resource.
37798	ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIpConfigurations,omitempty"`
37799}
37800
37801// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
37802func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
37803	objectMap := make(map[string]interface{})
37804	if spf.AddressPrefix != nil {
37805		objectMap["addressPrefix"] = spf.AddressPrefix
37806	}
37807	if spf.AddressPrefixes != nil {
37808		objectMap["addressPrefixes"] = spf.AddressPrefixes
37809	}
37810	if spf.NetworkSecurityGroup != nil {
37811		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
37812	}
37813	if spf.RouteTable != nil {
37814		objectMap["routeTable"] = spf.RouteTable
37815	}
37816	if spf.NatGateway != nil {
37817		objectMap["natGateway"] = spf.NatGateway
37818	}
37819	if spf.ServiceEndpoints != nil {
37820		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
37821	}
37822	if spf.ServiceEndpointPolicies != nil {
37823		objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies
37824	}
37825	if spf.IPAllocations != nil {
37826		objectMap["ipAllocations"] = spf.IPAllocations
37827	}
37828	if spf.Delegations != nil {
37829		objectMap["delegations"] = spf.Delegations
37830	}
37831	if spf.PrivateEndpointNetworkPolicies != "" {
37832		objectMap["privateEndpointNetworkPolicies"] = spf.PrivateEndpointNetworkPolicies
37833	}
37834	if spf.PrivateLinkServiceNetworkPolicies != "" {
37835		objectMap["privateLinkServiceNetworkPolicies"] = spf.PrivateLinkServiceNetworkPolicies
37836	}
37837	if spf.ApplicationGatewayIPConfigurations != nil {
37838		objectMap["applicationGatewayIpConfigurations"] = spf.ApplicationGatewayIPConfigurations
37839	}
37840	return json.Marshal(objectMap)
37841}
37842
37843// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
37844// operation.
37845type SubnetsCreateOrUpdateFuture struct {
37846	azure.FutureAPI
37847	// Result returns the result of the asynchronous operation.
37848	// If the operation has not completed it will return an error.
37849	Result func(SubnetsClient) (Subnet, error)
37850}
37851
37852// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37853func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
37854	var azFuture azure.Future
37855	if err := json.Unmarshal(body, &azFuture); err != nil {
37856		return err
37857	}
37858	future.FutureAPI = &azFuture
37859	future.Result = future.result
37860	return nil
37861}
37862
37863// result is the default implementation for SubnetsCreateOrUpdateFuture.Result.
37864func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) {
37865	var done bool
37866	done, err = future.DoneWithContext(context.Background(), client)
37867	if err != nil {
37868		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
37869		return
37870	}
37871	if !done {
37872		s.Response.Response = future.Response()
37873		err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
37874		return
37875	}
37876	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37877	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
37878		s, err = client.CreateOrUpdateResponder(s.Response.Response)
37879		if err != nil {
37880			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
37881		}
37882	}
37883	return
37884}
37885
37886// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
37887// operation.
37888type SubnetsDeleteFuture struct {
37889	azure.FutureAPI
37890	// Result returns the result of the asynchronous operation.
37891	// If the operation has not completed it will return an error.
37892	Result func(SubnetsClient) (autorest.Response, error)
37893}
37894
37895// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37896func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error {
37897	var azFuture azure.Future
37898	if err := json.Unmarshal(body, &azFuture); err != nil {
37899		return err
37900	}
37901	future.FutureAPI = &azFuture
37902	future.Result = future.result
37903	return nil
37904}
37905
37906// result is the default implementation for SubnetsDeleteFuture.Result.
37907func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
37908	var done bool
37909	done, err = future.DoneWithContext(context.Background(), client)
37910	if err != nil {
37911		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
37912		return
37913	}
37914	if !done {
37915		ar.Response = future.Response()
37916		err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
37917		return
37918	}
37919	ar.Response = future.Response()
37920	return
37921}
37922
37923// SubnetsPrepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
37924// long-running operation.
37925type SubnetsPrepareNetworkPoliciesFuture struct {
37926	azure.FutureAPI
37927	// Result returns the result of the asynchronous operation.
37928	// If the operation has not completed it will return an error.
37929	Result func(SubnetsClient) (autorest.Response, error)
37930}
37931
37932// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37933func (future *SubnetsPrepareNetworkPoliciesFuture) UnmarshalJSON(body []byte) error {
37934	var azFuture azure.Future
37935	if err := json.Unmarshal(body, &azFuture); err != nil {
37936		return err
37937	}
37938	future.FutureAPI = &azFuture
37939	future.Result = future.result
37940	return nil
37941}
37942
37943// result is the default implementation for SubnetsPrepareNetworkPoliciesFuture.Result.
37944func (future *SubnetsPrepareNetworkPoliciesFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
37945	var done bool
37946	done, err = future.DoneWithContext(context.Background(), client)
37947	if err != nil {
37948		err = autorest.NewErrorWithError(err, "network.SubnetsPrepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure")
37949		return
37950	}
37951	if !done {
37952		ar.Response = future.Response()
37953		err = azure.NewAsyncOpIncompleteError("network.SubnetsPrepareNetworkPoliciesFuture")
37954		return
37955	}
37956	ar.Response = future.Response()
37957	return
37958}
37959
37960// SubnetsUnprepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
37961// long-running operation.
37962type SubnetsUnprepareNetworkPoliciesFuture struct {
37963	azure.FutureAPI
37964	// Result returns the result of the asynchronous operation.
37965	// If the operation has not completed it will return an error.
37966	Result func(SubnetsClient) (autorest.Response, error)
37967}
37968
37969// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37970func (future *SubnetsUnprepareNetworkPoliciesFuture) UnmarshalJSON(body []byte) error {
37971	var azFuture azure.Future
37972	if err := json.Unmarshal(body, &azFuture); err != nil {
37973		return err
37974	}
37975	future.FutureAPI = &azFuture
37976	future.Result = future.result
37977	return nil
37978}
37979
37980// result is the default implementation for SubnetsUnprepareNetworkPoliciesFuture.Result.
37981func (future *SubnetsUnprepareNetworkPoliciesFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
37982	var done bool
37983	done, err = future.DoneWithContext(context.Background(), client)
37984	if err != nil {
37985		err = autorest.NewErrorWithError(err, "network.SubnetsUnprepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure")
37986		return
37987	}
37988	if !done {
37989		ar.Response = future.Response()
37990		err = azure.NewAsyncOpIncompleteError("network.SubnetsUnprepareNetworkPoliciesFuture")
37991		return
37992	}
37993	ar.Response = future.Response()
37994	return
37995}
37996
37997// SubResource reference to another subresource.
37998type SubResource struct {
37999	// ID - Resource ID.
38000	ID *string `json:"id,omitempty"`
38001}
38002
38003// TagsObject tags object for patch operations.
38004type TagsObject struct {
38005	// Tags - Resource tags.
38006	Tags map[string]*string `json:"tags"`
38007}
38008
38009// MarshalJSON is the custom marshaler for TagsObject.
38010func (toVar TagsObject) MarshalJSON() ([]byte, error) {
38011	objectMap := make(map[string]interface{})
38012	if toVar.Tags != nil {
38013		objectMap["tags"] = toVar.Tags
38014	}
38015	return json.Marshal(objectMap)
38016}
38017
38018// Topology topology of the specified resource group.
38019type Topology struct {
38020	autorest.Response `json:"-"`
38021	// ID - READ-ONLY; GUID representing the operation id.
38022	ID *string `json:"id,omitempty"`
38023	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
38024	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
38025	// LastModified - READ-ONLY; The datetime when the topology was last modified.
38026	LastModified *date.Time `json:"lastModified,omitempty"`
38027	// Resources - A list of topology resources.
38028	Resources *[]TopologyResource `json:"resources,omitempty"`
38029}
38030
38031// MarshalJSON is the custom marshaler for Topology.
38032func (t Topology) MarshalJSON() ([]byte, error) {
38033	objectMap := make(map[string]interface{})
38034	if t.Resources != nil {
38035		objectMap["resources"] = t.Resources
38036	}
38037	return json.Marshal(objectMap)
38038}
38039
38040// TopologyAssociation resources that have an association with the parent resource.
38041type TopologyAssociation struct {
38042	// Name - The name of the resource that is associated with the parent resource.
38043	Name *string `json:"name,omitempty"`
38044	// ResourceID - The ID of the resource that is associated with the parent resource.
38045	ResourceID *string `json:"resourceId,omitempty"`
38046	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'AssociationTypeAssociated', 'AssociationTypeContains'
38047	AssociationType AssociationType `json:"associationType,omitempty"`
38048}
38049
38050// TopologyParameters parameters that define the representation of topology.
38051type TopologyParameters struct {
38052	// TargetResourceGroupName - The name of the target resource group to perform topology on.
38053	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
38054	// TargetVirtualNetwork - The reference to the Virtual Network resource.
38055	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
38056	// TargetSubnet - The reference to the Subnet resource.
38057	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
38058}
38059
38060// TopologyResource the network resource topology information for the given resource group.
38061type TopologyResource struct {
38062	// Name - Name of the resource.
38063	Name *string `json:"name,omitempty"`
38064	// ID - ID of the resource.
38065	ID *string `json:"id,omitempty"`
38066	// Location - Resource location.
38067	Location *string `json:"location,omitempty"`
38068	// Associations - Holds the associations the resource has with other resources in the resource group.
38069	Associations *[]TopologyAssociation `json:"associations,omitempty"`
38070}
38071
38072// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
38073type TrafficAnalyticsConfigurationProperties struct {
38074	// Enabled - Flag to enable/disable traffic analytics.
38075	Enabled *bool `json:"enabled,omitempty"`
38076	// WorkspaceID - The resource guid of the attached workspace.
38077	WorkspaceID *string `json:"workspaceId,omitempty"`
38078	// WorkspaceRegion - The location of the attached workspace.
38079	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
38080	// WorkspaceResourceID - Resource Id of the attached workspace.
38081	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
38082	// TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics.
38083	TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"`
38084}
38085
38086// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
38087type TrafficAnalyticsProperties struct {
38088	// NetworkWatcherFlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
38089	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
38090}
38091
38092// TrafficSelectorPolicy an traffic selector policy for a virtual network gateway connection.
38093type TrafficSelectorPolicy struct {
38094	// LocalAddressRanges - A collection of local address spaces in CIDR format.
38095	LocalAddressRanges *[]string `json:"localAddressRanges,omitempty"`
38096	// RemoteAddressRanges - A collection of remote address spaces in CIDR format.
38097	RemoteAddressRanges *[]string `json:"remoteAddressRanges,omitempty"`
38098}
38099
38100// TroubleshootingDetails information gained from troubleshooting of specified resource.
38101type TroubleshootingDetails struct {
38102	// ID - The id of the get troubleshoot operation.
38103	ID *string `json:"id,omitempty"`
38104	// ReasonType - Reason type of failure.
38105	ReasonType *string `json:"reasonType,omitempty"`
38106	// Summary - A summary of troubleshooting.
38107	Summary *string `json:"summary,omitempty"`
38108	// Detail - Details on troubleshooting results.
38109	Detail *string `json:"detail,omitempty"`
38110	// RecommendedActions - List of recommended actions.
38111	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
38112}
38113
38114// TroubleshootingParameters parameters that define the resource to troubleshoot.
38115type TroubleshootingParameters struct {
38116	// TargetResourceID - The target resource to troubleshoot.
38117	TargetResourceID *string `json:"targetResourceId,omitempty"`
38118	// TroubleshootingProperties - Properties of the troubleshooting resource.
38119	*TroubleshootingProperties `json:"properties,omitempty"`
38120}
38121
38122// MarshalJSON is the custom marshaler for TroubleshootingParameters.
38123func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
38124	objectMap := make(map[string]interface{})
38125	if tp.TargetResourceID != nil {
38126		objectMap["targetResourceId"] = tp.TargetResourceID
38127	}
38128	if tp.TroubleshootingProperties != nil {
38129		objectMap["properties"] = tp.TroubleshootingProperties
38130	}
38131	return json.Marshal(objectMap)
38132}
38133
38134// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
38135func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
38136	var m map[string]*json.RawMessage
38137	err := json.Unmarshal(body, &m)
38138	if err != nil {
38139		return err
38140	}
38141	for k, v := range m {
38142		switch k {
38143		case "targetResourceId":
38144			if v != nil {
38145				var targetResourceID string
38146				err = json.Unmarshal(*v, &targetResourceID)
38147				if err != nil {
38148					return err
38149				}
38150				tp.TargetResourceID = &targetResourceID
38151			}
38152		case "properties":
38153			if v != nil {
38154				var troubleshootingProperties TroubleshootingProperties
38155				err = json.Unmarshal(*v, &troubleshootingProperties)
38156				if err != nil {
38157					return err
38158				}
38159				tp.TroubleshootingProperties = &troubleshootingProperties
38160			}
38161		}
38162	}
38163
38164	return nil
38165}
38166
38167// TroubleshootingProperties storage location provided for troubleshoot.
38168type TroubleshootingProperties struct {
38169	// StorageID - The ID for the storage account to save the troubleshoot result.
38170	StorageID *string `json:"storageId,omitempty"`
38171	// StoragePath - The path to the blob to save the troubleshoot result in.
38172	StoragePath *string `json:"storagePath,omitempty"`
38173}
38174
38175// TroubleshootingRecommendedActions recommended actions based on discovered issues.
38176type TroubleshootingRecommendedActions struct {
38177	// ActionID - ID of the recommended action.
38178	ActionID *string `json:"actionId,omitempty"`
38179	// ActionText - Description of recommended actions.
38180	ActionText *string `json:"actionText,omitempty"`
38181	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
38182	ActionURI *string `json:"actionUri,omitempty"`
38183	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
38184	ActionURIText *string `json:"actionUriText,omitempty"`
38185}
38186
38187// TroubleshootingResult troubleshooting information gained from specified resource.
38188type TroubleshootingResult struct {
38189	autorest.Response `json:"-"`
38190	// StartTime - The start time of the troubleshooting.
38191	StartTime *date.Time `json:"startTime,omitempty"`
38192	// EndTime - The end time of the troubleshooting.
38193	EndTime *date.Time `json:"endTime,omitempty"`
38194	// Code - The result code of the troubleshooting.
38195	Code *string `json:"code,omitempty"`
38196	// Results - Information from troubleshooting.
38197	Results *[]TroubleshootingDetails `json:"results,omitempty"`
38198}
38199
38200// TunnelConnectionHealth virtualNetworkGatewayConnection properties.
38201type TunnelConnectionHealth struct {
38202	// Tunnel - READ-ONLY; Tunnel name.
38203	Tunnel *string `json:"tunnel,omitempty"`
38204	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
38205	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
38206	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection.
38207	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
38208	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection.
38209	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
38210	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
38211	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
38212}
38213
38214// MarshalJSON is the custom marshaler for TunnelConnectionHealth.
38215func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) {
38216	objectMap := make(map[string]interface{})
38217	return json.Marshal(objectMap)
38218}
38219
38220// UnprepareNetworkPoliciesRequest details of UnprepareNetworkPolicies for Subnet.
38221type UnprepareNetworkPoliciesRequest struct {
38222	// ServiceName - The name of the service for which subnet is being unprepared for.
38223	ServiceName *string `json:"serviceName,omitempty"`
38224}
38225
38226// Usage the network resource usage.
38227type Usage struct {
38228	// ID - READ-ONLY; Resource identifier.
38229	ID *string `json:"id,omitempty"`
38230	// Unit - An enum describing the unit of measurement.
38231	Unit *string `json:"unit,omitempty"`
38232	// CurrentValue - The current value of the usage.
38233	CurrentValue *int64 `json:"currentValue,omitempty"`
38234	// Limit - The limit of usage.
38235	Limit *int64 `json:"limit,omitempty"`
38236	// Name - The name of the type of usage.
38237	Name *UsageName `json:"name,omitempty"`
38238}
38239
38240// MarshalJSON is the custom marshaler for Usage.
38241func (u Usage) MarshalJSON() ([]byte, error) {
38242	objectMap := make(map[string]interface{})
38243	if u.Unit != nil {
38244		objectMap["unit"] = u.Unit
38245	}
38246	if u.CurrentValue != nil {
38247		objectMap["currentValue"] = u.CurrentValue
38248	}
38249	if u.Limit != nil {
38250		objectMap["limit"] = u.Limit
38251	}
38252	if u.Name != nil {
38253		objectMap["name"] = u.Name
38254	}
38255	return json.Marshal(objectMap)
38256}
38257
38258// UsageName the usage names.
38259type UsageName struct {
38260	// Value - A string describing the resource name.
38261	Value *string `json:"value,omitempty"`
38262	// LocalizedValue - A localized string describing the resource name.
38263	LocalizedValue *string `json:"localizedValue,omitempty"`
38264}
38265
38266// UsagesListResult the list usages operation response.
38267type UsagesListResult struct {
38268	autorest.Response `json:"-"`
38269	// Value - The list network resource usages.
38270	Value *[]Usage `json:"value,omitempty"`
38271	// NextLink - URL to get the next set of results.
38272	NextLink *string `json:"nextLink,omitempty"`
38273}
38274
38275// UsagesListResultIterator provides access to a complete listing of Usage values.
38276type UsagesListResultIterator struct {
38277	i    int
38278	page UsagesListResultPage
38279}
38280
38281// NextWithContext advances to the next value.  If there was an error making
38282// the request the iterator does not advance and the error is returned.
38283func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
38284	if tracing.IsEnabled() {
38285		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
38286		defer func() {
38287			sc := -1
38288			if iter.Response().Response.Response != nil {
38289				sc = iter.Response().Response.Response.StatusCode
38290			}
38291			tracing.EndSpan(ctx, sc, err)
38292		}()
38293	}
38294	iter.i++
38295	if iter.i < len(iter.page.Values()) {
38296		return nil
38297	}
38298	err = iter.page.NextWithContext(ctx)
38299	if err != nil {
38300		iter.i--
38301		return err
38302	}
38303	iter.i = 0
38304	return nil
38305}
38306
38307// Next advances to the next value.  If there was an error making
38308// the request the iterator does not advance and the error is returned.
38309// Deprecated: Use NextWithContext() instead.
38310func (iter *UsagesListResultIterator) Next() error {
38311	return iter.NextWithContext(context.Background())
38312}
38313
38314// NotDone returns true if the enumeration should be started or is not yet complete.
38315func (iter UsagesListResultIterator) NotDone() bool {
38316	return iter.page.NotDone() && iter.i < len(iter.page.Values())
38317}
38318
38319// Response returns the raw server response from the last page request.
38320func (iter UsagesListResultIterator) Response() UsagesListResult {
38321	return iter.page.Response()
38322}
38323
38324// Value returns the current value or a zero-initialized value if the
38325// iterator has advanced beyond the end of the collection.
38326func (iter UsagesListResultIterator) Value() Usage {
38327	if !iter.page.NotDone() {
38328		return Usage{}
38329	}
38330	return iter.page.Values()[iter.i]
38331}
38332
38333// Creates a new instance of the UsagesListResultIterator type.
38334func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
38335	return UsagesListResultIterator{page: page}
38336}
38337
38338// IsEmpty returns true if the ListResult contains no values.
38339func (ulr UsagesListResult) IsEmpty() bool {
38340	return ulr.Value == nil || len(*ulr.Value) == 0
38341}
38342
38343// hasNextLink returns true if the NextLink is not empty.
38344func (ulr UsagesListResult) hasNextLink() bool {
38345	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
38346}
38347
38348// usagesListResultPreparer prepares a request to retrieve the next set of results.
38349// It returns nil if no more results exist.
38350func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
38351	if !ulr.hasNextLink() {
38352		return nil, nil
38353	}
38354	return autorest.Prepare((&http.Request{}).WithContext(ctx),
38355		autorest.AsJSON(),
38356		autorest.AsGet(),
38357		autorest.WithBaseURL(to.String(ulr.NextLink)))
38358}
38359
38360// UsagesListResultPage contains a page of Usage values.
38361type UsagesListResultPage struct {
38362	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
38363	ulr UsagesListResult
38364}
38365
38366// NextWithContext advances to the next page of values.  If there was an error making
38367// the request the page does not advance and the error is returned.
38368func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
38369	if tracing.IsEnabled() {
38370		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
38371		defer func() {
38372			sc := -1
38373			if page.Response().Response.Response != nil {
38374				sc = page.Response().Response.Response.StatusCode
38375			}
38376			tracing.EndSpan(ctx, sc, err)
38377		}()
38378	}
38379	for {
38380		next, err := page.fn(ctx, page.ulr)
38381		if err != nil {
38382			return err
38383		}
38384		page.ulr = next
38385		if !next.hasNextLink() || !next.IsEmpty() {
38386			break
38387		}
38388	}
38389	return nil
38390}
38391
38392// Next advances to the next page of values.  If there was an error making
38393// the request the page does not advance and the error is returned.
38394// Deprecated: Use NextWithContext() instead.
38395func (page *UsagesListResultPage) Next() error {
38396	return page.NextWithContext(context.Background())
38397}
38398
38399// NotDone returns true if the page enumeration should be started or is not yet complete.
38400func (page UsagesListResultPage) NotDone() bool {
38401	return !page.ulr.IsEmpty()
38402}
38403
38404// Response returns the raw server response from the last page request.
38405func (page UsagesListResultPage) Response() UsagesListResult {
38406	return page.ulr
38407}
38408
38409// Values returns the slice of values for the current page or nil if there are no values.
38410func (page UsagesListResultPage) Values() []Usage {
38411	if page.ulr.IsEmpty() {
38412		return nil
38413	}
38414	return *page.ulr.Value
38415}
38416
38417// Creates a new instance of the UsagesListResultPage type.
38418func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
38419	return UsagesListResultPage{
38420		fn:  getNextPage,
38421		ulr: cur,
38422	}
38423}
38424
38425// VerificationIPFlowParameters parameters that define the IP flow to be verified.
38426type VerificationIPFlowParameters struct {
38427	// TargetResourceID - The ID of the target resource to perform next-hop on.
38428	TargetResourceID *string `json:"targetResourceId,omitempty"`
38429	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'DirectionInbound', 'DirectionOutbound'
38430	Direction Direction `json:"direction,omitempty"`
38431	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
38432	Protocol IPFlowProtocol `json:"protocol,omitempty"`
38433	// 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.
38434	LocalPort *string `json:"localPort,omitempty"`
38435	// 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.
38436	RemotePort *string `json:"remotePort,omitempty"`
38437	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
38438	LocalIPAddress *string `json:"localIPAddress,omitempty"`
38439	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
38440	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
38441	// 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).
38442	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
38443}
38444
38445// VerificationIPFlowResult results of IP flow verification on the target resource.
38446type VerificationIPFlowResult struct {
38447	autorest.Response `json:"-"`
38448	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'AccessAllow', 'AccessDeny'
38449	Access Access `json:"access,omitempty"`
38450	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
38451	RuleName *string `json:"ruleName,omitempty"`
38452}
38453
38454// VirtualAppliance networkVirtualAppliance Resource.
38455type VirtualAppliance struct {
38456	autorest.Response `json:"-"`
38457	// VirtualAppliancePropertiesFormat - Properties of the Network Virtual Appliance.
38458	*VirtualAppliancePropertiesFormat `json:"properties,omitempty"`
38459	// Identity - The service principal that has read access to cloud-init and config blob.
38460	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
38461	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
38462	Etag *string `json:"etag,omitempty"`
38463	// ID - Resource ID.
38464	ID *string `json:"id,omitempty"`
38465	// Name - READ-ONLY; Resource name.
38466	Name *string `json:"name,omitempty"`
38467	// Type - READ-ONLY; Resource type.
38468	Type *string `json:"type,omitempty"`
38469	// Location - Resource location.
38470	Location *string `json:"location,omitempty"`
38471	// Tags - Resource tags.
38472	Tags map[string]*string `json:"tags"`
38473}
38474
38475// MarshalJSON is the custom marshaler for VirtualAppliance.
38476func (va VirtualAppliance) MarshalJSON() ([]byte, error) {
38477	objectMap := make(map[string]interface{})
38478	if va.VirtualAppliancePropertiesFormat != nil {
38479		objectMap["properties"] = va.VirtualAppliancePropertiesFormat
38480	}
38481	if va.Identity != nil {
38482		objectMap["identity"] = va.Identity
38483	}
38484	if va.ID != nil {
38485		objectMap["id"] = va.ID
38486	}
38487	if va.Location != nil {
38488		objectMap["location"] = va.Location
38489	}
38490	if va.Tags != nil {
38491		objectMap["tags"] = va.Tags
38492	}
38493	return json.Marshal(objectMap)
38494}
38495
38496// UnmarshalJSON is the custom unmarshaler for VirtualAppliance struct.
38497func (va *VirtualAppliance) UnmarshalJSON(body []byte) error {
38498	var m map[string]*json.RawMessage
38499	err := json.Unmarshal(body, &m)
38500	if err != nil {
38501		return err
38502	}
38503	for k, v := range m {
38504		switch k {
38505		case "properties":
38506			if v != nil {
38507				var virtualAppliancePropertiesFormat VirtualAppliancePropertiesFormat
38508				err = json.Unmarshal(*v, &virtualAppliancePropertiesFormat)
38509				if err != nil {
38510					return err
38511				}
38512				va.VirtualAppliancePropertiesFormat = &virtualAppliancePropertiesFormat
38513			}
38514		case "identity":
38515			if v != nil {
38516				var identity ManagedServiceIdentity
38517				err = json.Unmarshal(*v, &identity)
38518				if err != nil {
38519					return err
38520				}
38521				va.Identity = &identity
38522			}
38523		case "etag":
38524			if v != nil {
38525				var etag string
38526				err = json.Unmarshal(*v, &etag)
38527				if err != nil {
38528					return err
38529				}
38530				va.Etag = &etag
38531			}
38532		case "id":
38533			if v != nil {
38534				var ID string
38535				err = json.Unmarshal(*v, &ID)
38536				if err != nil {
38537					return err
38538				}
38539				va.ID = &ID
38540			}
38541		case "name":
38542			if v != nil {
38543				var name string
38544				err = json.Unmarshal(*v, &name)
38545				if err != nil {
38546					return err
38547				}
38548				va.Name = &name
38549			}
38550		case "type":
38551			if v != nil {
38552				var typeVar string
38553				err = json.Unmarshal(*v, &typeVar)
38554				if err != nil {
38555					return err
38556				}
38557				va.Type = &typeVar
38558			}
38559		case "location":
38560			if v != nil {
38561				var location string
38562				err = json.Unmarshal(*v, &location)
38563				if err != nil {
38564					return err
38565				}
38566				va.Location = &location
38567			}
38568		case "tags":
38569			if v != nil {
38570				var tags map[string]*string
38571				err = json.Unmarshal(*v, &tags)
38572				if err != nil {
38573					return err
38574				}
38575				va.Tags = tags
38576			}
38577		}
38578	}
38579
38580	return nil
38581}
38582
38583// VirtualApplianceListResult response for ListNetworkVirtualAppliances API service call.
38584type VirtualApplianceListResult struct {
38585	autorest.Response `json:"-"`
38586	// Value - List of Network Virtual Appliances.
38587	Value *[]VirtualAppliance `json:"value,omitempty"`
38588	// NextLink - URL to get the next set of results.
38589	NextLink *string `json:"nextLink,omitempty"`
38590}
38591
38592// VirtualApplianceListResultIterator provides access to a complete listing of VirtualAppliance values.
38593type VirtualApplianceListResultIterator struct {
38594	i    int
38595	page VirtualApplianceListResultPage
38596}
38597
38598// NextWithContext advances to the next value.  If there was an error making
38599// the request the iterator does not advance and the error is returned.
38600func (iter *VirtualApplianceListResultIterator) NextWithContext(ctx context.Context) (err error) {
38601	if tracing.IsEnabled() {
38602		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceListResultIterator.NextWithContext")
38603		defer func() {
38604			sc := -1
38605			if iter.Response().Response.Response != nil {
38606				sc = iter.Response().Response.Response.StatusCode
38607			}
38608			tracing.EndSpan(ctx, sc, err)
38609		}()
38610	}
38611	iter.i++
38612	if iter.i < len(iter.page.Values()) {
38613		return nil
38614	}
38615	err = iter.page.NextWithContext(ctx)
38616	if err != nil {
38617		iter.i--
38618		return err
38619	}
38620	iter.i = 0
38621	return nil
38622}
38623
38624// Next advances to the next value.  If there was an error making
38625// the request the iterator does not advance and the error is returned.
38626// Deprecated: Use NextWithContext() instead.
38627func (iter *VirtualApplianceListResultIterator) Next() error {
38628	return iter.NextWithContext(context.Background())
38629}
38630
38631// NotDone returns true if the enumeration should be started or is not yet complete.
38632func (iter VirtualApplianceListResultIterator) NotDone() bool {
38633	return iter.page.NotDone() && iter.i < len(iter.page.Values())
38634}
38635
38636// Response returns the raw server response from the last page request.
38637func (iter VirtualApplianceListResultIterator) Response() VirtualApplianceListResult {
38638	return iter.page.Response()
38639}
38640
38641// Value returns the current value or a zero-initialized value if the
38642// iterator has advanced beyond the end of the collection.
38643func (iter VirtualApplianceListResultIterator) Value() VirtualAppliance {
38644	if !iter.page.NotDone() {
38645		return VirtualAppliance{}
38646	}
38647	return iter.page.Values()[iter.i]
38648}
38649
38650// Creates a new instance of the VirtualApplianceListResultIterator type.
38651func NewVirtualApplianceListResultIterator(page VirtualApplianceListResultPage) VirtualApplianceListResultIterator {
38652	return VirtualApplianceListResultIterator{page: page}
38653}
38654
38655// IsEmpty returns true if the ListResult contains no values.
38656func (valr VirtualApplianceListResult) IsEmpty() bool {
38657	return valr.Value == nil || len(*valr.Value) == 0
38658}
38659
38660// hasNextLink returns true if the NextLink is not empty.
38661func (valr VirtualApplianceListResult) hasNextLink() bool {
38662	return valr.NextLink != nil && len(*valr.NextLink) != 0
38663}
38664
38665// virtualApplianceListResultPreparer prepares a request to retrieve the next set of results.
38666// It returns nil if no more results exist.
38667func (valr VirtualApplianceListResult) virtualApplianceListResultPreparer(ctx context.Context) (*http.Request, error) {
38668	if !valr.hasNextLink() {
38669		return nil, nil
38670	}
38671	return autorest.Prepare((&http.Request{}).WithContext(ctx),
38672		autorest.AsJSON(),
38673		autorest.AsGet(),
38674		autorest.WithBaseURL(to.String(valr.NextLink)))
38675}
38676
38677// VirtualApplianceListResultPage contains a page of VirtualAppliance values.
38678type VirtualApplianceListResultPage struct {
38679	fn   func(context.Context, VirtualApplianceListResult) (VirtualApplianceListResult, error)
38680	valr VirtualApplianceListResult
38681}
38682
38683// NextWithContext advances to the next page of values.  If there was an error making
38684// the request the page does not advance and the error is returned.
38685func (page *VirtualApplianceListResultPage) NextWithContext(ctx context.Context) (err error) {
38686	if tracing.IsEnabled() {
38687		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceListResultPage.NextWithContext")
38688		defer func() {
38689			sc := -1
38690			if page.Response().Response.Response != nil {
38691				sc = page.Response().Response.Response.StatusCode
38692			}
38693			tracing.EndSpan(ctx, sc, err)
38694		}()
38695	}
38696	for {
38697		next, err := page.fn(ctx, page.valr)
38698		if err != nil {
38699			return err
38700		}
38701		page.valr = next
38702		if !next.hasNextLink() || !next.IsEmpty() {
38703			break
38704		}
38705	}
38706	return nil
38707}
38708
38709// Next advances to the next page of values.  If there was an error making
38710// the request the page does not advance and the error is returned.
38711// Deprecated: Use NextWithContext() instead.
38712func (page *VirtualApplianceListResultPage) Next() error {
38713	return page.NextWithContext(context.Background())
38714}
38715
38716// NotDone returns true if the page enumeration should be started or is not yet complete.
38717func (page VirtualApplianceListResultPage) NotDone() bool {
38718	return !page.valr.IsEmpty()
38719}
38720
38721// Response returns the raw server response from the last page request.
38722func (page VirtualApplianceListResultPage) Response() VirtualApplianceListResult {
38723	return page.valr
38724}
38725
38726// Values returns the slice of values for the current page or nil if there are no values.
38727func (page VirtualApplianceListResultPage) Values() []VirtualAppliance {
38728	if page.valr.IsEmpty() {
38729		return nil
38730	}
38731	return *page.valr.Value
38732}
38733
38734// Creates a new instance of the VirtualApplianceListResultPage type.
38735func NewVirtualApplianceListResultPage(cur VirtualApplianceListResult, getNextPage func(context.Context, VirtualApplianceListResult) (VirtualApplianceListResult, error)) VirtualApplianceListResultPage {
38736	return VirtualApplianceListResultPage{
38737		fn:   getNextPage,
38738		valr: cur,
38739	}
38740}
38741
38742// VirtualApplianceNicProperties network Virtual Appliance NIC properties.
38743type VirtualApplianceNicProperties struct {
38744	// Name - READ-ONLY; NIC name.
38745	Name *string `json:"name,omitempty"`
38746	// PublicIPAddress - READ-ONLY; Public IP address.
38747	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
38748	// PrivateIPAddress - READ-ONLY; Private IP address.
38749	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
38750}
38751
38752// MarshalJSON is the custom marshaler for VirtualApplianceNicProperties.
38753func (vanp VirtualApplianceNicProperties) MarshalJSON() ([]byte, error) {
38754	objectMap := make(map[string]interface{})
38755	return json.Marshal(objectMap)
38756}
38757
38758// VirtualAppliancePropertiesFormat network Virtual Appliance definition.
38759type VirtualAppliancePropertiesFormat struct {
38760	// NvaSku - Network Virtual Appliance SKU.
38761	NvaSku *VirtualApplianceSkuProperties `json:"nvaSku,omitempty"`
38762	// AddressPrefix - READ-ONLY; Address Prefix.
38763	AddressPrefix *string `json:"addressPrefix,omitempty"`
38764	// BootStrapConfigurationBlobs - BootStrapConfigurationBlobs storage URLs.
38765	BootStrapConfigurationBlobs *[]string `json:"bootStrapConfigurationBlobs,omitempty"`
38766	// VirtualHub - The Virtual Hub where Network Virtual Appliance is being deployed.
38767	VirtualHub *SubResource `json:"virtualHub,omitempty"`
38768	// CloudInitConfigurationBlobs - CloudInitConfigurationBlob storage URLs.
38769	CloudInitConfigurationBlobs *[]string `json:"cloudInitConfigurationBlobs,omitempty"`
38770	// CloudInitConfiguration - CloudInitConfiguration string in plain text.
38771	CloudInitConfiguration *string `json:"cloudInitConfiguration,omitempty"`
38772	// VirtualApplianceAsn - VirtualAppliance ASN.
38773	VirtualApplianceAsn *int64 `json:"virtualApplianceAsn,omitempty"`
38774	// VirtualApplianceNics - READ-ONLY; List of Virtual Appliance Network Interfaces.
38775	VirtualApplianceNics *[]VirtualApplianceNicProperties `json:"virtualApplianceNics,omitempty"`
38776	// VirtualApplianceSites - READ-ONLY; List of references to VirtualApplianceSite.
38777	VirtualApplianceSites *[]SubResource `json:"virtualApplianceSites,omitempty"`
38778	// InboundSecurityRules - READ-ONLY; List of references to InboundSecurityRules.
38779	InboundSecurityRules *[]SubResource `json:"inboundSecurityRules,omitempty"`
38780	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
38781	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
38782}
38783
38784// MarshalJSON is the custom marshaler for VirtualAppliancePropertiesFormat.
38785func (vapf VirtualAppliancePropertiesFormat) MarshalJSON() ([]byte, error) {
38786	objectMap := make(map[string]interface{})
38787	if vapf.NvaSku != nil {
38788		objectMap["nvaSku"] = vapf.NvaSku
38789	}
38790	if vapf.BootStrapConfigurationBlobs != nil {
38791		objectMap["bootStrapConfigurationBlobs"] = vapf.BootStrapConfigurationBlobs
38792	}
38793	if vapf.VirtualHub != nil {
38794		objectMap["virtualHub"] = vapf.VirtualHub
38795	}
38796	if vapf.CloudInitConfigurationBlobs != nil {
38797		objectMap["cloudInitConfigurationBlobs"] = vapf.CloudInitConfigurationBlobs
38798	}
38799	if vapf.CloudInitConfiguration != nil {
38800		objectMap["cloudInitConfiguration"] = vapf.CloudInitConfiguration
38801	}
38802	if vapf.VirtualApplianceAsn != nil {
38803		objectMap["virtualApplianceAsn"] = vapf.VirtualApplianceAsn
38804	}
38805	return json.Marshal(objectMap)
38806}
38807
38808// VirtualAppliancesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
38809// long-running operation.
38810type VirtualAppliancesCreateOrUpdateFuture struct {
38811	azure.FutureAPI
38812	// Result returns the result of the asynchronous operation.
38813	// If the operation has not completed it will return an error.
38814	Result func(VirtualAppliancesClient) (VirtualAppliance, error)
38815}
38816
38817// UnmarshalJSON is the custom unmarshaller for CreateFuture.
38818func (future *VirtualAppliancesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
38819	var azFuture azure.Future
38820	if err := json.Unmarshal(body, &azFuture); err != nil {
38821		return err
38822	}
38823	future.FutureAPI = &azFuture
38824	future.Result = future.result
38825	return nil
38826}
38827
38828// result is the default implementation for VirtualAppliancesCreateOrUpdateFuture.Result.
38829func (future *VirtualAppliancesCreateOrUpdateFuture) result(client VirtualAppliancesClient) (va VirtualAppliance, err error) {
38830	var done bool
38831	done, err = future.DoneWithContext(context.Background(), client)
38832	if err != nil {
38833		err = autorest.NewErrorWithError(err, "network.VirtualAppliancesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
38834		return
38835	}
38836	if !done {
38837		va.Response.Response = future.Response()
38838		err = azure.NewAsyncOpIncompleteError("network.VirtualAppliancesCreateOrUpdateFuture")
38839		return
38840	}
38841	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
38842	if va.Response.Response, err = future.GetResult(sender); err == nil && va.Response.Response.StatusCode != http.StatusNoContent {
38843		va, err = client.CreateOrUpdateResponder(va.Response.Response)
38844		if err != nil {
38845			err = autorest.NewErrorWithError(err, "network.VirtualAppliancesCreateOrUpdateFuture", "Result", va.Response.Response, "Failure responding to request")
38846		}
38847	}
38848	return
38849}
38850
38851// VirtualAppliancesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
38852// operation.
38853type VirtualAppliancesDeleteFuture struct {
38854	azure.FutureAPI
38855	// Result returns the result of the asynchronous operation.
38856	// If the operation has not completed it will return an error.
38857	Result func(VirtualAppliancesClient) (autorest.Response, error)
38858}
38859
38860// UnmarshalJSON is the custom unmarshaller for CreateFuture.
38861func (future *VirtualAppliancesDeleteFuture) UnmarshalJSON(body []byte) error {
38862	var azFuture azure.Future
38863	if err := json.Unmarshal(body, &azFuture); err != nil {
38864		return err
38865	}
38866	future.FutureAPI = &azFuture
38867	future.Result = future.result
38868	return nil
38869}
38870
38871// result is the default implementation for VirtualAppliancesDeleteFuture.Result.
38872func (future *VirtualAppliancesDeleteFuture) result(client VirtualAppliancesClient) (ar autorest.Response, err error) {
38873	var done bool
38874	done, err = future.DoneWithContext(context.Background(), client)
38875	if err != nil {
38876		err = autorest.NewErrorWithError(err, "network.VirtualAppliancesDeleteFuture", "Result", future.Response(), "Polling failure")
38877		return
38878	}
38879	if !done {
38880		ar.Response = future.Response()
38881		err = azure.NewAsyncOpIncompleteError("network.VirtualAppliancesDeleteFuture")
38882		return
38883	}
38884	ar.Response = future.Response()
38885	return
38886}
38887
38888// VirtualApplianceSite virtual Appliance Site resource.
38889type VirtualApplianceSite struct {
38890	autorest.Response `json:"-"`
38891	// VirtualApplianceSiteProperties - The properties of the Virtual Appliance Sites.
38892	*VirtualApplianceSiteProperties `json:"properties,omitempty"`
38893	// Name - Name of the virtual appliance site.
38894	Name *string `json:"name,omitempty"`
38895	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
38896	Etag *string `json:"etag,omitempty"`
38897	// Type - READ-ONLY; Site type.
38898	Type *string `json:"type,omitempty"`
38899	// ID - Resource ID.
38900	ID *string `json:"id,omitempty"`
38901}
38902
38903// MarshalJSON is the custom marshaler for VirtualApplianceSite.
38904func (vas VirtualApplianceSite) MarshalJSON() ([]byte, error) {
38905	objectMap := make(map[string]interface{})
38906	if vas.VirtualApplianceSiteProperties != nil {
38907		objectMap["properties"] = vas.VirtualApplianceSiteProperties
38908	}
38909	if vas.Name != nil {
38910		objectMap["name"] = vas.Name
38911	}
38912	if vas.ID != nil {
38913		objectMap["id"] = vas.ID
38914	}
38915	return json.Marshal(objectMap)
38916}
38917
38918// UnmarshalJSON is the custom unmarshaler for VirtualApplianceSite struct.
38919func (vas *VirtualApplianceSite) UnmarshalJSON(body []byte) error {
38920	var m map[string]*json.RawMessage
38921	err := json.Unmarshal(body, &m)
38922	if err != nil {
38923		return err
38924	}
38925	for k, v := range m {
38926		switch k {
38927		case "properties":
38928			if v != nil {
38929				var virtualApplianceSiteProperties VirtualApplianceSiteProperties
38930				err = json.Unmarshal(*v, &virtualApplianceSiteProperties)
38931				if err != nil {
38932					return err
38933				}
38934				vas.VirtualApplianceSiteProperties = &virtualApplianceSiteProperties
38935			}
38936		case "name":
38937			if v != nil {
38938				var name string
38939				err = json.Unmarshal(*v, &name)
38940				if err != nil {
38941					return err
38942				}
38943				vas.Name = &name
38944			}
38945		case "etag":
38946			if v != nil {
38947				var etag string
38948				err = json.Unmarshal(*v, &etag)
38949				if err != nil {
38950					return err
38951				}
38952				vas.Etag = &etag
38953			}
38954		case "type":
38955			if v != nil {
38956				var typeVar string
38957				err = json.Unmarshal(*v, &typeVar)
38958				if err != nil {
38959					return err
38960				}
38961				vas.Type = &typeVar
38962			}
38963		case "id":
38964			if v != nil {
38965				var ID string
38966				err = json.Unmarshal(*v, &ID)
38967				if err != nil {
38968					return err
38969				}
38970				vas.ID = &ID
38971			}
38972		}
38973	}
38974
38975	return nil
38976}
38977
38978// VirtualApplianceSiteListResult response for ListNetworkVirtualApplianceSites API service call.
38979type VirtualApplianceSiteListResult struct {
38980	autorest.Response `json:"-"`
38981	// Value - List of Network Virtual Appliance sites.
38982	Value *[]VirtualApplianceSite `json:"value,omitempty"`
38983	// NextLink - URL to get the next set of results.
38984	NextLink *string `json:"nextLink,omitempty"`
38985}
38986
38987// VirtualApplianceSiteListResultIterator provides access to a complete listing of VirtualApplianceSite
38988// values.
38989type VirtualApplianceSiteListResultIterator struct {
38990	i    int
38991	page VirtualApplianceSiteListResultPage
38992}
38993
38994// NextWithContext advances to the next value.  If there was an error making
38995// the request the iterator does not advance and the error is returned.
38996func (iter *VirtualApplianceSiteListResultIterator) NextWithContext(ctx context.Context) (err error) {
38997	if tracing.IsEnabled() {
38998		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSiteListResultIterator.NextWithContext")
38999		defer func() {
39000			sc := -1
39001			if iter.Response().Response.Response != nil {
39002				sc = iter.Response().Response.Response.StatusCode
39003			}
39004			tracing.EndSpan(ctx, sc, err)
39005		}()
39006	}
39007	iter.i++
39008	if iter.i < len(iter.page.Values()) {
39009		return nil
39010	}
39011	err = iter.page.NextWithContext(ctx)
39012	if err != nil {
39013		iter.i--
39014		return err
39015	}
39016	iter.i = 0
39017	return nil
39018}
39019
39020// Next advances to the next value.  If there was an error making
39021// the request the iterator does not advance and the error is returned.
39022// Deprecated: Use NextWithContext() instead.
39023func (iter *VirtualApplianceSiteListResultIterator) Next() error {
39024	return iter.NextWithContext(context.Background())
39025}
39026
39027// NotDone returns true if the enumeration should be started or is not yet complete.
39028func (iter VirtualApplianceSiteListResultIterator) NotDone() bool {
39029	return iter.page.NotDone() && iter.i < len(iter.page.Values())
39030}
39031
39032// Response returns the raw server response from the last page request.
39033func (iter VirtualApplianceSiteListResultIterator) Response() VirtualApplianceSiteListResult {
39034	return iter.page.Response()
39035}
39036
39037// Value returns the current value or a zero-initialized value if the
39038// iterator has advanced beyond the end of the collection.
39039func (iter VirtualApplianceSiteListResultIterator) Value() VirtualApplianceSite {
39040	if !iter.page.NotDone() {
39041		return VirtualApplianceSite{}
39042	}
39043	return iter.page.Values()[iter.i]
39044}
39045
39046// Creates a new instance of the VirtualApplianceSiteListResultIterator type.
39047func NewVirtualApplianceSiteListResultIterator(page VirtualApplianceSiteListResultPage) VirtualApplianceSiteListResultIterator {
39048	return VirtualApplianceSiteListResultIterator{page: page}
39049}
39050
39051// IsEmpty returns true if the ListResult contains no values.
39052func (vaslr VirtualApplianceSiteListResult) IsEmpty() bool {
39053	return vaslr.Value == nil || len(*vaslr.Value) == 0
39054}
39055
39056// hasNextLink returns true if the NextLink is not empty.
39057func (vaslr VirtualApplianceSiteListResult) hasNextLink() bool {
39058	return vaslr.NextLink != nil && len(*vaslr.NextLink) != 0
39059}
39060
39061// virtualApplianceSiteListResultPreparer prepares a request to retrieve the next set of results.
39062// It returns nil if no more results exist.
39063func (vaslr VirtualApplianceSiteListResult) virtualApplianceSiteListResultPreparer(ctx context.Context) (*http.Request, error) {
39064	if !vaslr.hasNextLink() {
39065		return nil, nil
39066	}
39067	return autorest.Prepare((&http.Request{}).WithContext(ctx),
39068		autorest.AsJSON(),
39069		autorest.AsGet(),
39070		autorest.WithBaseURL(to.String(vaslr.NextLink)))
39071}
39072
39073// VirtualApplianceSiteListResultPage contains a page of VirtualApplianceSite values.
39074type VirtualApplianceSiteListResultPage struct {
39075	fn    func(context.Context, VirtualApplianceSiteListResult) (VirtualApplianceSiteListResult, error)
39076	vaslr VirtualApplianceSiteListResult
39077}
39078
39079// NextWithContext advances to the next page of values.  If there was an error making
39080// the request the page does not advance and the error is returned.
39081func (page *VirtualApplianceSiteListResultPage) NextWithContext(ctx context.Context) (err error) {
39082	if tracing.IsEnabled() {
39083		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSiteListResultPage.NextWithContext")
39084		defer func() {
39085			sc := -1
39086			if page.Response().Response.Response != nil {
39087				sc = page.Response().Response.Response.StatusCode
39088			}
39089			tracing.EndSpan(ctx, sc, err)
39090		}()
39091	}
39092	for {
39093		next, err := page.fn(ctx, page.vaslr)
39094		if err != nil {
39095			return err
39096		}
39097		page.vaslr = next
39098		if !next.hasNextLink() || !next.IsEmpty() {
39099			break
39100		}
39101	}
39102	return nil
39103}
39104
39105// Next advances to the next page of values.  If there was an error making
39106// the request the page does not advance and the error is returned.
39107// Deprecated: Use NextWithContext() instead.
39108func (page *VirtualApplianceSiteListResultPage) Next() error {
39109	return page.NextWithContext(context.Background())
39110}
39111
39112// NotDone returns true if the page enumeration should be started or is not yet complete.
39113func (page VirtualApplianceSiteListResultPage) NotDone() bool {
39114	return !page.vaslr.IsEmpty()
39115}
39116
39117// Response returns the raw server response from the last page request.
39118func (page VirtualApplianceSiteListResultPage) Response() VirtualApplianceSiteListResult {
39119	return page.vaslr
39120}
39121
39122// Values returns the slice of values for the current page or nil if there are no values.
39123func (page VirtualApplianceSiteListResultPage) Values() []VirtualApplianceSite {
39124	if page.vaslr.IsEmpty() {
39125		return nil
39126	}
39127	return *page.vaslr.Value
39128}
39129
39130// Creates a new instance of the VirtualApplianceSiteListResultPage type.
39131func NewVirtualApplianceSiteListResultPage(cur VirtualApplianceSiteListResult, getNextPage func(context.Context, VirtualApplianceSiteListResult) (VirtualApplianceSiteListResult, error)) VirtualApplianceSiteListResultPage {
39132	return VirtualApplianceSiteListResultPage{
39133		fn:    getNextPage,
39134		vaslr: cur,
39135	}
39136}
39137
39138// VirtualApplianceSiteProperties properties of the rule group.
39139type VirtualApplianceSiteProperties struct {
39140	// AddressPrefix - Address Prefix.
39141	AddressPrefix *string `json:"addressPrefix,omitempty"`
39142	// O365Policy - Office 365 Policy.
39143	O365Policy *Office365PolicyProperties `json:"o365Policy,omitempty"`
39144	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
39145	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
39146}
39147
39148// MarshalJSON is the custom marshaler for VirtualApplianceSiteProperties.
39149func (vasp VirtualApplianceSiteProperties) MarshalJSON() ([]byte, error) {
39150	objectMap := make(map[string]interface{})
39151	if vasp.AddressPrefix != nil {
39152		objectMap["addressPrefix"] = vasp.AddressPrefix
39153	}
39154	if vasp.O365Policy != nil {
39155		objectMap["o365Policy"] = vasp.O365Policy
39156	}
39157	return json.Marshal(objectMap)
39158}
39159
39160// VirtualApplianceSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
39161// long-running operation.
39162type VirtualApplianceSitesCreateOrUpdateFuture 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(VirtualApplianceSitesClient) (VirtualApplianceSite, error)
39167}
39168
39169// UnmarshalJSON is the custom unmarshaller for CreateFuture.
39170func (future *VirtualApplianceSitesCreateOrUpdateFuture) 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 VirtualApplianceSitesCreateOrUpdateFuture.Result.
39181func (future *VirtualApplianceSitesCreateOrUpdateFuture) result(client VirtualApplianceSitesClient) (vas VirtualApplianceSite, err error) {
39182	var done bool
39183	done, err = future.DoneWithContext(context.Background(), client)
39184	if err != nil {
39185		err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
39186		return
39187	}
39188	if !done {
39189		vas.Response.Response = future.Response()
39190		err = azure.NewAsyncOpIncompleteError("network.VirtualApplianceSitesCreateOrUpdateFuture")
39191		return
39192	}
39193	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
39194	if vas.Response.Response, err = future.GetResult(sender); err == nil && vas.Response.Response.StatusCode != http.StatusNoContent {
39195		vas, err = client.CreateOrUpdateResponder(vas.Response.Response)
39196		if err != nil {
39197			err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesCreateOrUpdateFuture", "Result", vas.Response.Response, "Failure responding to request")
39198		}
39199	}
39200	return
39201}
39202
39203// VirtualApplianceSitesDeleteFuture an abstraction for monitoring and retrieving the results of a
39204// long-running operation.
39205type VirtualApplianceSitesDeleteFuture 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(VirtualApplianceSitesClient) (autorest.Response, error)
39210}
39211
39212// UnmarshalJSON is the custom unmarshaller for CreateFuture.
39213func (future *VirtualApplianceSitesDeleteFuture) 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 VirtualApplianceSitesDeleteFuture.Result.
39224func (future *VirtualApplianceSitesDeleteFuture) result(client VirtualApplianceSitesClient) (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.VirtualApplianceSitesDeleteFuture", "Result", future.Response(), "Polling failure")
39229		return
39230	}
39231	if !done {
39232		ar.Response = future.Response()
39233		err = azure.NewAsyncOpIncompleteError("network.VirtualApplianceSitesDeleteFuture")
39234		return
39235	}
39236	ar.Response = future.Response()
39237	return
39238}
39239
39240// VirtualApplianceSku definition of the NetworkVirtualApplianceSkus resource.
39241type VirtualApplianceSku struct {
39242	autorest.Response `json:"-"`
39243	// VirtualApplianceSkuPropertiesFormat - NetworkVirtualApplianceSku properties.
39244	*VirtualApplianceSkuPropertiesFormat `json:"properties,omitempty"`
39245	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
39246	Etag *string `json:"etag,omitempty"`
39247	// ID - Resource ID.
39248	ID *string `json:"id,omitempty"`
39249	// Name - READ-ONLY; Resource name.
39250	Name *string `json:"name,omitempty"`
39251	// Type - READ-ONLY; Resource type.
39252	Type *string `json:"type,omitempty"`
39253	// Location - Resource location.
39254	Location *string `json:"location,omitempty"`
39255	// Tags - Resource tags.
39256	Tags map[string]*string `json:"tags"`
39257}
39258
39259// MarshalJSON is the custom marshaler for VirtualApplianceSku.
39260func (vas VirtualApplianceSku) MarshalJSON() ([]byte, error) {
39261	objectMap := make(map[string]interface{})
39262	if vas.VirtualApplianceSkuPropertiesFormat != nil {
39263		objectMap["properties"] = vas.VirtualApplianceSkuPropertiesFormat
39264	}
39265	if vas.ID != nil {
39266		objectMap["id"] = vas.ID
39267	}
39268	if vas.Location != nil {
39269		objectMap["location"] = vas.Location
39270	}
39271	if vas.Tags != nil {
39272		objectMap["tags"] = vas.Tags
39273	}
39274	return json.Marshal(objectMap)
39275}
39276
39277// UnmarshalJSON is the custom unmarshaler for VirtualApplianceSku struct.
39278func (vas *VirtualApplianceSku) UnmarshalJSON(body []byte) error {
39279	var m map[string]*json.RawMessage
39280	err := json.Unmarshal(body, &m)
39281	if err != nil {
39282		return err
39283	}
39284	for k, v := range m {
39285		switch k {
39286		case "properties":
39287			if v != nil {
39288				var virtualApplianceSkuPropertiesFormat VirtualApplianceSkuPropertiesFormat
39289				err = json.Unmarshal(*v, &virtualApplianceSkuPropertiesFormat)
39290				if err != nil {
39291					return err
39292				}
39293				vas.VirtualApplianceSkuPropertiesFormat = &virtualApplianceSkuPropertiesFormat
39294			}
39295		case "etag":
39296			if v != nil {
39297				var etag string
39298				err = json.Unmarshal(*v, &etag)
39299				if err != nil {
39300					return err
39301				}
39302				vas.Etag = &etag
39303			}
39304		case "id":
39305			if v != nil {
39306				var ID string
39307				err = json.Unmarshal(*v, &ID)
39308				if err != nil {
39309					return err
39310				}
39311				vas.ID = &ID
39312			}
39313		case "name":
39314			if v != nil {
39315				var name string
39316				err = json.Unmarshal(*v, &name)
39317				if err != nil {
39318					return err
39319				}
39320				vas.Name = &name
39321			}
39322		case "type":
39323			if v != nil {
39324				var typeVar string
39325				err = json.Unmarshal(*v, &typeVar)
39326				if err != nil {
39327					return err
39328				}
39329				vas.Type = &typeVar
39330			}
39331		case "location":
39332			if v != nil {
39333				var location string
39334				err = json.Unmarshal(*v, &location)
39335				if err != nil {
39336					return err
39337				}
39338				vas.Location = &location
39339			}
39340		case "tags":
39341			if v != nil {
39342				var tags map[string]*string
39343				err = json.Unmarshal(*v, &tags)
39344				if err != nil {
39345					return err
39346				}
39347				vas.Tags = tags
39348			}
39349		}
39350	}
39351
39352	return nil
39353}
39354
39355// VirtualApplianceSkuInstances list of available Sku and instances.
39356type VirtualApplianceSkuInstances struct {
39357	// ScaleUnit - READ-ONLY; Scale Unit.
39358	ScaleUnit *string `json:"scaleUnit,omitempty"`
39359	// InstanceCount - READ-ONLY; Instance Count.
39360	InstanceCount *int32 `json:"instanceCount,omitempty"`
39361}
39362
39363// MarshalJSON is the custom marshaler for VirtualApplianceSkuInstances.
39364func (vasi VirtualApplianceSkuInstances) MarshalJSON() ([]byte, error) {
39365	objectMap := make(map[string]interface{})
39366	return json.Marshal(objectMap)
39367}
39368
39369// VirtualApplianceSkuListResult response for ListNetworkVirtualApplianceSkus API service call.
39370type VirtualApplianceSkuListResult struct {
39371	autorest.Response `json:"-"`
39372	// Value - List of Network Virtual Appliance Skus that are available.
39373	Value *[]VirtualApplianceSku `json:"value,omitempty"`
39374	// NextLink - URL to get the next set of results.
39375	NextLink *string `json:"nextLink,omitempty"`
39376}
39377
39378// VirtualApplianceSkuListResultIterator provides access to a complete listing of VirtualApplianceSku
39379// values.
39380type VirtualApplianceSkuListResultIterator struct {
39381	i    int
39382	page VirtualApplianceSkuListResultPage
39383}
39384
39385// NextWithContext advances to the next value.  If there was an error making
39386// the request the iterator does not advance and the error is returned.
39387func (iter *VirtualApplianceSkuListResultIterator) NextWithContext(ctx context.Context) (err error) {
39388	if tracing.IsEnabled() {
39389		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSkuListResultIterator.NextWithContext")
39390		defer func() {
39391			sc := -1
39392			if iter.Response().Response.Response != nil {
39393				sc = iter.Response().Response.Response.StatusCode
39394			}
39395			tracing.EndSpan(ctx, sc, err)
39396		}()
39397	}
39398	iter.i++
39399	if iter.i < len(iter.page.Values()) {
39400		return nil
39401	}
39402	err = iter.page.NextWithContext(ctx)
39403	if err != nil {
39404		iter.i--
39405		return err
39406	}
39407	iter.i = 0
39408	return nil
39409}
39410
39411// Next advances to the next value.  If there was an error making
39412// the request the iterator does not advance and the error is returned.
39413// Deprecated: Use NextWithContext() instead.
39414func (iter *VirtualApplianceSkuListResultIterator) Next() error {
39415	return iter.NextWithContext(context.Background())
39416}
39417
39418// NotDone returns true if the enumeration should be started or is not yet complete.
39419func (iter VirtualApplianceSkuListResultIterator) NotDone() bool {
39420	return iter.page.NotDone() && iter.i < len(iter.page.Values())
39421}
39422
39423// Response returns the raw server response from the last page request.
39424func (iter VirtualApplianceSkuListResultIterator) Response() VirtualApplianceSkuListResult {
39425	return iter.page.Response()
39426}
39427
39428// Value returns the current value or a zero-initialized value if the
39429// iterator has advanced beyond the end of the collection.
39430func (iter VirtualApplianceSkuListResultIterator) Value() VirtualApplianceSku {
39431	if !iter.page.NotDone() {
39432		return VirtualApplianceSku{}
39433	}
39434	return iter.page.Values()[iter.i]
39435}
39436
39437// Creates a new instance of the VirtualApplianceSkuListResultIterator type.
39438func NewVirtualApplianceSkuListResultIterator(page VirtualApplianceSkuListResultPage) VirtualApplianceSkuListResultIterator {
39439	return VirtualApplianceSkuListResultIterator{page: page}
39440}
39441
39442// IsEmpty returns true if the ListResult contains no values.
39443func (vaslr VirtualApplianceSkuListResult) IsEmpty() bool {
39444	return vaslr.Value == nil || len(*vaslr.Value) == 0
39445}
39446
39447// hasNextLink returns true if the NextLink is not empty.
39448func (vaslr VirtualApplianceSkuListResult) hasNextLink() bool {
39449	return vaslr.NextLink != nil && len(*vaslr.NextLink) != 0
39450}
39451
39452// virtualApplianceSkuListResultPreparer prepares a request to retrieve the next set of results.
39453// It returns nil if no more results exist.
39454func (vaslr VirtualApplianceSkuListResult) virtualApplianceSkuListResultPreparer(ctx context.Context) (*http.Request, error) {
39455	if !vaslr.hasNextLink() {
39456		return nil, nil
39457	}
39458	return autorest.Prepare((&http.Request{}).WithContext(ctx),
39459		autorest.AsJSON(),
39460		autorest.AsGet(),
39461		autorest.WithBaseURL(to.String(vaslr.NextLink)))
39462}
39463
39464// VirtualApplianceSkuListResultPage contains a page of VirtualApplianceSku values.
39465type VirtualApplianceSkuListResultPage struct {
39466	fn    func(context.Context, VirtualApplianceSkuListResult) (VirtualApplianceSkuListResult, error)
39467	vaslr VirtualApplianceSkuListResult
39468}
39469
39470// NextWithContext advances to the next page of values.  If there was an error making
39471// the request the page does not advance and the error is returned.
39472func (page *VirtualApplianceSkuListResultPage) NextWithContext(ctx context.Context) (err error) {
39473	if tracing.IsEnabled() {
39474		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSkuListResultPage.NextWithContext")
39475		defer func() {
39476			sc := -1
39477			if page.Response().Response.Response != nil {
39478				sc = page.Response().Response.Response.StatusCode
39479			}
39480			tracing.EndSpan(ctx, sc, err)
39481		}()
39482	}
39483	for {
39484		next, err := page.fn(ctx, page.vaslr)
39485		if err != nil {
39486			return err
39487		}
39488		page.vaslr = next
39489		if !next.hasNextLink() || !next.IsEmpty() {
39490			break
39491		}
39492	}
39493	return nil
39494}
39495
39496// Next advances to the next page of values.  If there was an error making
39497// the request the page does not advance and the error is returned.
39498// Deprecated: Use NextWithContext() instead.
39499func (page *VirtualApplianceSkuListResultPage) Next() error {
39500	return page.NextWithContext(context.Background())
39501}
39502
39503// NotDone returns true if the page enumeration should be started or is not yet complete.
39504func (page VirtualApplianceSkuListResultPage) NotDone() bool {
39505	return !page.vaslr.IsEmpty()
39506}
39507
39508// Response returns the raw server response from the last page request.
39509func (page VirtualApplianceSkuListResultPage) Response() VirtualApplianceSkuListResult {
39510	return page.vaslr
39511}
39512
39513// Values returns the slice of values for the current page or nil if there are no values.
39514func (page VirtualApplianceSkuListResultPage) Values() []VirtualApplianceSku {
39515	if page.vaslr.IsEmpty() {
39516		return nil
39517	}
39518	return *page.vaslr.Value
39519}
39520
39521// Creates a new instance of the VirtualApplianceSkuListResultPage type.
39522func NewVirtualApplianceSkuListResultPage(cur VirtualApplianceSkuListResult, getNextPage func(context.Context, VirtualApplianceSkuListResult) (VirtualApplianceSkuListResult, error)) VirtualApplianceSkuListResultPage {
39523	return VirtualApplianceSkuListResultPage{
39524		fn:    getNextPage,
39525		vaslr: cur,
39526	}
39527}
39528
39529// VirtualApplianceSkuProperties network Virtual Appliance Sku Properties.
39530type VirtualApplianceSkuProperties struct {
39531	// Vendor - Virtual Appliance Vendor.
39532	Vendor *string `json:"vendor,omitempty"`
39533	// BundledScaleUnit - Virtual Appliance Scale Unit.
39534	BundledScaleUnit *string `json:"bundledScaleUnit,omitempty"`
39535	// MarketPlaceVersion - Virtual Appliance Version.
39536	MarketPlaceVersion *string `json:"marketPlaceVersion,omitempty"`
39537}
39538
39539// VirtualApplianceSkuPropertiesFormat properties specific to NetworkVirtualApplianceSkus.
39540type VirtualApplianceSkuPropertiesFormat struct {
39541	// Vendor - READ-ONLY; Network Virtual Appliance Sku vendor.
39542	Vendor *string `json:"vendor,omitempty"`
39543	// AvailableVersions - READ-ONLY; Available Network Virtual Appliance versions.
39544	AvailableVersions *[]string `json:"availableVersions,omitempty"`
39545	// AvailableScaleUnits - The list of scale units available.
39546	AvailableScaleUnits *[]VirtualApplianceSkuInstances `json:"availableScaleUnits,omitempty"`
39547}
39548
39549// MarshalJSON is the custom marshaler for VirtualApplianceSkuPropertiesFormat.
39550func (vaspf VirtualApplianceSkuPropertiesFormat) MarshalJSON() ([]byte, error) {
39551	objectMap := make(map[string]interface{})
39552	if vaspf.AvailableScaleUnits != nil {
39553		objectMap["availableScaleUnits"] = vaspf.AvailableScaleUnits
39554	}
39555	return json.Marshal(objectMap)
39556}
39557
39558// VirtualHub virtualHub Resource.
39559type VirtualHub struct {
39560	autorest.Response `json:"-"`
39561	// VirtualHubProperties - Properties of the virtual hub.
39562	*VirtualHubProperties `json:"properties,omitempty"`
39563	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
39564	Etag *string `json:"etag,omitempty"`
39565	// ID - Resource ID.
39566	ID *string `json:"id,omitempty"`
39567	// Name - READ-ONLY; Resource name.
39568	Name *string `json:"name,omitempty"`
39569	// Type - READ-ONLY; Resource type.
39570	Type *string `json:"type,omitempty"`
39571	// Location - Resource location.
39572	Location *string `json:"location,omitempty"`
39573	// Tags - Resource tags.
39574	Tags map[string]*string `json:"tags"`
39575}
39576
39577// MarshalJSON is the custom marshaler for VirtualHub.
39578func (vh VirtualHub) MarshalJSON() ([]byte, error) {
39579	objectMap := make(map[string]interface{})
39580	if vh.VirtualHubProperties != nil {
39581		objectMap["properties"] = vh.VirtualHubProperties
39582	}
39583	if vh.ID != nil {
39584		objectMap["id"] = vh.ID
39585	}
39586	if vh.Location != nil {
39587		objectMap["location"] = vh.Location
39588	}
39589	if vh.Tags != nil {
39590		objectMap["tags"] = vh.Tags
39591	}
39592	return json.Marshal(objectMap)
39593}
39594
39595// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
39596func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
39597	var m map[string]*json.RawMessage
39598	err := json.Unmarshal(body, &m)
39599	if err != nil {
39600		return err
39601	}
39602	for k, v := range m {
39603		switch k {
39604		case "properties":
39605			if v != nil {
39606				var virtualHubProperties VirtualHubProperties
39607				err = json.Unmarshal(*v, &virtualHubProperties)
39608				if err != nil {
39609					return err
39610				}
39611				vh.VirtualHubProperties = &virtualHubProperties
39612			}
39613		case "etag":
39614			if v != nil {
39615				var etag string
39616				err = json.Unmarshal(*v, &etag)
39617				if err != nil {
39618					return err
39619				}
39620				vh.Etag = &etag
39621			}
39622		case "id":
39623			if v != nil {
39624				var ID string
39625				err = json.Unmarshal(*v, &ID)
39626				if err != nil {
39627					return err
39628				}
39629				vh.ID = &ID
39630			}
39631		case "name":
39632			if v != nil {
39633				var name string
39634				err = json.Unmarshal(*v, &name)
39635				if err != nil {
39636					return err
39637				}
39638				vh.Name = &name
39639			}
39640		case "type":
39641			if v != nil {
39642				var typeVar string
39643				err = json.Unmarshal(*v, &typeVar)
39644				if err != nil {
39645					return err
39646				}
39647				vh.Type = &typeVar
39648			}
39649		case "location":
39650			if v != nil {
39651				var location string
39652				err = json.Unmarshal(*v, &location)
39653				if err != nil {
39654					return err
39655				}
39656				vh.Location = &location
39657			}
39658		case "tags":
39659			if v != nil {
39660				var tags map[string]*string
39661				err = json.Unmarshal(*v, &tags)
39662				if err != nil {
39663					return err
39664				}
39665				vh.Tags = tags
39666			}
39667		}
39668	}
39669
39670	return nil
39671}
39672
39673// VirtualHubBgpConnectionCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
39674// a long-running operation.
39675type VirtualHubBgpConnectionCreateOrUpdateFuture struct {
39676	azure.FutureAPI
39677	// Result returns the result of the asynchronous operation.
39678	// If the operation has not completed it will return an error.
39679	Result func(VirtualHubBgpConnectionClient) (BgpConnection, error)
39680}
39681
39682// UnmarshalJSON is the custom unmarshaller for CreateFuture.
39683func (future *VirtualHubBgpConnectionCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
39684	var azFuture azure.Future
39685	if err := json.Unmarshal(body, &azFuture); err != nil {
39686		return err
39687	}
39688	future.FutureAPI = &azFuture
39689	future.Result = future.result
39690	return nil
39691}
39692
39693// result is the default implementation for VirtualHubBgpConnectionCreateOrUpdateFuture.Result.
39694func (future *VirtualHubBgpConnectionCreateOrUpdateFuture) result(client VirtualHubBgpConnectionClient) (bc BgpConnection, err error) {
39695	var done bool
39696	done, err = future.DoneWithContext(context.Background(), client)
39697	if err != nil {
39698		err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
39699		return
39700	}
39701	if !done {
39702		bc.Response.Response = future.Response()
39703		err = azure.NewAsyncOpIncompleteError("network.VirtualHubBgpConnectionCreateOrUpdateFuture")
39704		return
39705	}
39706	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
39707	if bc.Response.Response, err = future.GetResult(sender); err == nil && bc.Response.Response.StatusCode != http.StatusNoContent {
39708		bc, err = client.CreateOrUpdateResponder(bc.Response.Response)
39709		if err != nil {
39710			err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionCreateOrUpdateFuture", "Result", bc.Response.Response, "Failure responding to request")
39711		}
39712	}
39713	return
39714}
39715
39716// VirtualHubBgpConnectionDeleteFuture an abstraction for monitoring and retrieving the results of a
39717// long-running operation.
39718type VirtualHubBgpConnectionDeleteFuture struct {
39719	azure.FutureAPI
39720	// Result returns the result of the asynchronous operation.
39721	// If the operation has not completed it will return an error.
39722	Result func(VirtualHubBgpConnectionClient) (autorest.Response, error)
39723}
39724
39725// UnmarshalJSON is the custom unmarshaller for CreateFuture.
39726func (future *VirtualHubBgpConnectionDeleteFuture) UnmarshalJSON(body []byte) error {
39727	var azFuture azure.Future
39728	if err := json.Unmarshal(body, &azFuture); err != nil {
39729		return err
39730	}
39731	future.FutureAPI = &azFuture
39732	future.Result = future.result
39733	return nil
39734}
39735
39736// result is the default implementation for VirtualHubBgpConnectionDeleteFuture.Result.
39737func (future *VirtualHubBgpConnectionDeleteFuture) result(client VirtualHubBgpConnectionClient) (ar autorest.Response, err error) {
39738	var done bool
39739	done, err = future.DoneWithContext(context.Background(), client)
39740	if err != nil {
39741		err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionDeleteFuture", "Result", future.Response(), "Polling failure")
39742		return
39743	}
39744	if !done {
39745		ar.Response = future.Response()
39746		err = azure.NewAsyncOpIncompleteError("network.VirtualHubBgpConnectionDeleteFuture")
39747		return
39748	}
39749	ar.Response = future.Response()
39750	return
39751}
39752
39753// VirtualHubBgpConnectionsListAdvertisedRoutesFuture an abstraction for monitoring and retrieving the
39754// results of a long-running operation.
39755type VirtualHubBgpConnectionsListAdvertisedRoutesFuture struct {
39756	azure.FutureAPI
39757	// Result returns the result of the asynchronous operation.
39758	// If the operation has not completed it will return an error.
39759	Result func(VirtualHubBgpConnectionsClient) (PeerRouteList, error)
39760}
39761
39762// UnmarshalJSON is the custom unmarshaller for CreateFuture.
39763func (future *VirtualHubBgpConnectionsListAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
39764	var azFuture azure.Future
39765	if err := json.Unmarshal(body, &azFuture); err != nil {
39766		return err
39767	}
39768	future.FutureAPI = &azFuture
39769	future.Result = future.result
39770	return nil
39771}
39772
39773// result is the default implementation for VirtualHubBgpConnectionsListAdvertisedRoutesFuture.Result.
39774func (future *VirtualHubBgpConnectionsListAdvertisedRoutesFuture) result(client VirtualHubBgpConnectionsClient) (prl PeerRouteList, err error) {
39775	var done bool
39776	done, err = future.DoneWithContext(context.Background(), client)
39777	if err != nil {
39778		err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsListAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
39779		return
39780	}
39781	if !done {
39782		prl.Response.Response = future.Response()
39783		err = azure.NewAsyncOpIncompleteError("network.VirtualHubBgpConnectionsListAdvertisedRoutesFuture")
39784		return
39785	}
39786	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
39787	if prl.Response.Response, err = future.GetResult(sender); err == nil && prl.Response.Response.StatusCode != http.StatusNoContent {
39788		prl, err = client.ListAdvertisedRoutesResponder(prl.Response.Response)
39789		if err != nil {
39790			err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsListAdvertisedRoutesFuture", "Result", prl.Response.Response, "Failure responding to request")
39791		}
39792	}
39793	return
39794}
39795
39796// VirtualHubBgpConnectionsListLearnedRoutesFuture an abstraction for monitoring and retrieving the results
39797// of a long-running operation.
39798type VirtualHubBgpConnectionsListLearnedRoutesFuture struct {
39799	azure.FutureAPI
39800	// Result returns the result of the asynchronous operation.
39801	// If the operation has not completed it will return an error.
39802	Result func(VirtualHubBgpConnectionsClient) (PeerRouteList, error)
39803}
39804
39805// UnmarshalJSON is the custom unmarshaller for CreateFuture.
39806func (future *VirtualHubBgpConnectionsListLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
39807	var azFuture azure.Future
39808	if err := json.Unmarshal(body, &azFuture); err != nil {
39809		return err
39810	}
39811	future.FutureAPI = &azFuture
39812	future.Result = future.result
39813	return nil
39814}
39815
39816// result is the default implementation for VirtualHubBgpConnectionsListLearnedRoutesFuture.Result.
39817func (future *VirtualHubBgpConnectionsListLearnedRoutesFuture) result(client VirtualHubBgpConnectionsClient) (prl PeerRouteList, err error) {
39818	var done bool
39819	done, err = future.DoneWithContext(context.Background(), client)
39820	if err != nil {
39821		err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsListLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
39822		return
39823	}
39824	if !done {
39825		prl.Response.Response = future.Response()
39826		err = azure.NewAsyncOpIncompleteError("network.VirtualHubBgpConnectionsListLearnedRoutesFuture")
39827		return
39828	}
39829	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
39830	if prl.Response.Response, err = future.GetResult(sender); err == nil && prl.Response.Response.StatusCode != http.StatusNoContent {
39831		prl, err = client.ListLearnedRoutesResponder(prl.Response.Response)
39832		if err != nil {
39833			err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsListLearnedRoutesFuture", "Result", prl.Response.Response, "Failure responding to request")
39834		}
39835	}
39836	return
39837}
39838
39839// VirtualHubEffectiveRoute the effective route configured on the virtual hub or specified resource.
39840type VirtualHubEffectiveRoute struct {
39841	// AddressPrefixes - The list of address prefixes.
39842	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
39843	// NextHops - The list of next hops.
39844	NextHops *[]string `json:"nextHops,omitempty"`
39845	// NextHopType - The type of the next hop.
39846	NextHopType *string `json:"nextHopType,omitempty"`
39847	// AsPath - The ASPath of this route.
39848	AsPath *string `json:"asPath,omitempty"`
39849	// RouteOrigin - The origin of this route.
39850	RouteOrigin *string `json:"routeOrigin,omitempty"`
39851}
39852
39853// VirtualHubEffectiveRouteList effectiveRoutes List.
39854type VirtualHubEffectiveRouteList struct {
39855	// Value - The list of effective routes configured on the virtual hub or the specified resource.
39856	Value *[]VirtualHubEffectiveRoute `json:"value,omitempty"`
39857}
39858
39859// VirtualHubID virtual Hub identifier.
39860type VirtualHubID struct {
39861	// 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.
39862	ID *string `json:"id,omitempty"`
39863}
39864
39865// VirtualHubIPConfigurationCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
39866// of a long-running operation.
39867type VirtualHubIPConfigurationCreateOrUpdateFuture struct {
39868	azure.FutureAPI
39869	// Result returns the result of the asynchronous operation.
39870	// If the operation has not completed it will return an error.
39871	Result func(VirtualHubIPConfigurationClient) (HubIPConfiguration, error)
39872}
39873
39874// UnmarshalJSON is the custom unmarshaller for CreateFuture.
39875func (future *VirtualHubIPConfigurationCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
39876	var azFuture azure.Future
39877	if err := json.Unmarshal(body, &azFuture); err != nil {
39878		return err
39879	}
39880	future.FutureAPI = &azFuture
39881	future.Result = future.result
39882	return nil
39883}
39884
39885// result is the default implementation for VirtualHubIPConfigurationCreateOrUpdateFuture.Result.
39886func (future *VirtualHubIPConfigurationCreateOrUpdateFuture) result(client VirtualHubIPConfigurationClient) (hic HubIPConfiguration, err error) {
39887	var done bool
39888	done, err = future.DoneWithContext(context.Background(), client)
39889	if err != nil {
39890		err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
39891		return
39892	}
39893	if !done {
39894		hic.Response.Response = future.Response()
39895		err = azure.NewAsyncOpIncompleteError("network.VirtualHubIPConfigurationCreateOrUpdateFuture")
39896		return
39897	}
39898	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
39899	if hic.Response.Response, err = future.GetResult(sender); err == nil && hic.Response.Response.StatusCode != http.StatusNoContent {
39900		hic, err = client.CreateOrUpdateResponder(hic.Response.Response)
39901		if err != nil {
39902			err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationCreateOrUpdateFuture", "Result", hic.Response.Response, "Failure responding to request")
39903		}
39904	}
39905	return
39906}
39907
39908// VirtualHubIPConfigurationDeleteFuture an abstraction for monitoring and retrieving the results of a
39909// long-running operation.
39910type VirtualHubIPConfigurationDeleteFuture struct {
39911	azure.FutureAPI
39912	// Result returns the result of the asynchronous operation.
39913	// If the operation has not completed it will return an error.
39914	Result func(VirtualHubIPConfigurationClient) (autorest.Response, error)
39915}
39916
39917// UnmarshalJSON is the custom unmarshaller for CreateFuture.
39918func (future *VirtualHubIPConfigurationDeleteFuture) UnmarshalJSON(body []byte) error {
39919	var azFuture azure.Future
39920	if err := json.Unmarshal(body, &azFuture); err != nil {
39921		return err
39922	}
39923	future.FutureAPI = &azFuture
39924	future.Result = future.result
39925	return nil
39926}
39927
39928// result is the default implementation for VirtualHubIPConfigurationDeleteFuture.Result.
39929func (future *VirtualHubIPConfigurationDeleteFuture) result(client VirtualHubIPConfigurationClient) (ar autorest.Response, err error) {
39930	var done bool
39931	done, err = future.DoneWithContext(context.Background(), client)
39932	if err != nil {
39933		err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationDeleteFuture", "Result", future.Response(), "Polling failure")
39934		return
39935	}
39936	if !done {
39937		ar.Response = future.Response()
39938		err = azure.NewAsyncOpIncompleteError("network.VirtualHubIPConfigurationDeleteFuture")
39939		return
39940	}
39941	ar.Response = future.Response()
39942	return
39943}
39944
39945// VirtualHubProperties parameters for VirtualHub.
39946type VirtualHubProperties struct {
39947	// VirtualWan - The VirtualWAN to which the VirtualHub belongs.
39948	VirtualWan *SubResource `json:"virtualWan,omitempty"`
39949	// VpnGateway - The VpnGateway associated with this VirtualHub.
39950	VpnGateway *SubResource `json:"vpnGateway,omitempty"`
39951	// P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub.
39952	P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"`
39953	// ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub.
39954	ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"`
39955	// AzureFirewall - The azureFirewall associated with this VirtualHub.
39956	AzureFirewall *SubResource `json:"azureFirewall,omitempty"`
39957	// SecurityPartnerProvider - The securityPartnerProvider associated with this VirtualHub.
39958	SecurityPartnerProvider *SubResource `json:"securityPartnerProvider,omitempty"`
39959	// AddressPrefix - Address-prefix for this VirtualHub.
39960	AddressPrefix *string `json:"addressPrefix,omitempty"`
39961	// RouteTable - The routeTable associated with this virtual hub.
39962	RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"`
39963	// ProvisioningState - READ-ONLY; The provisioning state of the virtual hub resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
39964	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
39965	// SecurityProviderName - The Security Provider name.
39966	SecurityProviderName *string `json:"securityProviderName,omitempty"`
39967	// VirtualHubRouteTableV2s - List of all virtual hub route table v2s associated with this VirtualHub.
39968	VirtualHubRouteTableV2s *[]VirtualHubRouteTableV2 `json:"virtualHubRouteTableV2s,omitempty"`
39969	// Sku - The sku of this VirtualHub.
39970	Sku *string `json:"sku,omitempty"`
39971	// RoutingState - The routing state. Possible values include: 'RoutingStateNone', 'RoutingStateProvisioned', 'RoutingStateProvisioning', 'RoutingStateFailed'
39972	RoutingState RoutingState `json:"routingState,omitempty"`
39973	// BgpConnections - READ-ONLY; List of references to Bgp Connections.
39974	BgpConnections *[]SubResource `json:"bgpConnections,omitempty"`
39975	// IPConfigurations - READ-ONLY; List of references to IpConfigurations.
39976	IPConfigurations *[]SubResource `json:"ipConfigurations,omitempty"`
39977	// VirtualRouterAsn - VirtualRouter ASN.
39978	VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"`
39979	// VirtualRouterIps - VirtualRouter IPs.
39980	VirtualRouterIps *[]string `json:"virtualRouterIps,omitempty"`
39981	// AllowBranchToBranchTraffic - Flag to control transit for VirtualRouter hub.
39982	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
39983}
39984
39985// MarshalJSON is the custom marshaler for VirtualHubProperties.
39986func (vhp VirtualHubProperties) MarshalJSON() ([]byte, error) {
39987	objectMap := make(map[string]interface{})
39988	if vhp.VirtualWan != nil {
39989		objectMap["virtualWan"] = vhp.VirtualWan
39990	}
39991	if vhp.VpnGateway != nil {
39992		objectMap["vpnGateway"] = vhp.VpnGateway
39993	}
39994	if vhp.P2SVpnGateway != nil {
39995		objectMap["p2SVpnGateway"] = vhp.P2SVpnGateway
39996	}
39997	if vhp.ExpressRouteGateway != nil {
39998		objectMap["expressRouteGateway"] = vhp.ExpressRouteGateway
39999	}
40000	if vhp.AzureFirewall != nil {
40001		objectMap["azureFirewall"] = vhp.AzureFirewall
40002	}
40003	if vhp.SecurityPartnerProvider != nil {
40004		objectMap["securityPartnerProvider"] = vhp.SecurityPartnerProvider
40005	}
40006	if vhp.AddressPrefix != nil {
40007		objectMap["addressPrefix"] = vhp.AddressPrefix
40008	}
40009	if vhp.RouteTable != nil {
40010		objectMap["routeTable"] = vhp.RouteTable
40011	}
40012	if vhp.SecurityProviderName != nil {
40013		objectMap["securityProviderName"] = vhp.SecurityProviderName
40014	}
40015	if vhp.VirtualHubRouteTableV2s != nil {
40016		objectMap["virtualHubRouteTableV2s"] = vhp.VirtualHubRouteTableV2s
40017	}
40018	if vhp.Sku != nil {
40019		objectMap["sku"] = vhp.Sku
40020	}
40021	if vhp.RoutingState != "" {
40022		objectMap["routingState"] = vhp.RoutingState
40023	}
40024	if vhp.VirtualRouterAsn != nil {
40025		objectMap["virtualRouterAsn"] = vhp.VirtualRouterAsn
40026	}
40027	if vhp.VirtualRouterIps != nil {
40028		objectMap["virtualRouterIps"] = vhp.VirtualRouterIps
40029	}
40030	if vhp.AllowBranchToBranchTraffic != nil {
40031		objectMap["allowBranchToBranchTraffic"] = vhp.AllowBranchToBranchTraffic
40032	}
40033	return json.Marshal(objectMap)
40034}
40035
40036// VirtualHubRoute virtualHub route.
40037type VirtualHubRoute struct {
40038	// AddressPrefixes - List of all addressPrefixes.
40039	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
40040	// NextHopIPAddress - NextHop ip address.
40041	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
40042}
40043
40044// VirtualHubRouteTable virtualHub route table.
40045type VirtualHubRouteTable struct {
40046	// Routes - List of all routes.
40047	Routes *[]VirtualHubRoute `json:"routes,omitempty"`
40048}
40049
40050// VirtualHubRouteTableV2 virtualHubRouteTableV2 Resource.
40051type VirtualHubRouteTableV2 struct {
40052	autorest.Response `json:"-"`
40053	// VirtualHubRouteTableV2Properties - Properties of the virtual hub route table v2.
40054	*VirtualHubRouteTableV2Properties `json:"properties,omitempty"`
40055	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
40056	Name *string `json:"name,omitempty"`
40057	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40058	Etag *string `json:"etag,omitempty"`
40059	// ID - Resource ID.
40060	ID *string `json:"id,omitempty"`
40061}
40062
40063// MarshalJSON is the custom marshaler for VirtualHubRouteTableV2.
40064func (vhrtv VirtualHubRouteTableV2) MarshalJSON() ([]byte, error) {
40065	objectMap := make(map[string]interface{})
40066	if vhrtv.VirtualHubRouteTableV2Properties != nil {
40067		objectMap["properties"] = vhrtv.VirtualHubRouteTableV2Properties
40068	}
40069	if vhrtv.Name != nil {
40070		objectMap["name"] = vhrtv.Name
40071	}
40072	if vhrtv.ID != nil {
40073		objectMap["id"] = vhrtv.ID
40074	}
40075	return json.Marshal(objectMap)
40076}
40077
40078// UnmarshalJSON is the custom unmarshaler for VirtualHubRouteTableV2 struct.
40079func (vhrtv *VirtualHubRouteTableV2) UnmarshalJSON(body []byte) error {
40080	var m map[string]*json.RawMessage
40081	err := json.Unmarshal(body, &m)
40082	if err != nil {
40083		return err
40084	}
40085	for k, v := range m {
40086		switch k {
40087		case "properties":
40088			if v != nil {
40089				var virtualHubRouteTableV2Properties VirtualHubRouteTableV2Properties
40090				err = json.Unmarshal(*v, &virtualHubRouteTableV2Properties)
40091				if err != nil {
40092					return err
40093				}
40094				vhrtv.VirtualHubRouteTableV2Properties = &virtualHubRouteTableV2Properties
40095			}
40096		case "name":
40097			if v != nil {
40098				var name string
40099				err = json.Unmarshal(*v, &name)
40100				if err != nil {
40101					return err
40102				}
40103				vhrtv.Name = &name
40104			}
40105		case "etag":
40106			if v != nil {
40107				var etag string
40108				err = json.Unmarshal(*v, &etag)
40109				if err != nil {
40110					return err
40111				}
40112				vhrtv.Etag = &etag
40113			}
40114		case "id":
40115			if v != nil {
40116				var ID string
40117				err = json.Unmarshal(*v, &ID)
40118				if err != nil {
40119					return err
40120				}
40121				vhrtv.ID = &ID
40122			}
40123		}
40124	}
40125
40126	return nil
40127}
40128
40129// VirtualHubRouteTableV2Properties parameters for VirtualHubRouteTableV2.
40130type VirtualHubRouteTableV2Properties struct {
40131	// Routes - List of all routes.
40132	Routes *[]VirtualHubRouteV2 `json:"routes,omitempty"`
40133	// AttachedConnections - List of all connections attached to this route table v2.
40134	AttachedConnections *[]string `json:"attachedConnections,omitempty"`
40135	// ProvisioningState - READ-ONLY; The provisioning state of the virtual hub route table v2 resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
40136	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
40137}
40138
40139// MarshalJSON is the custom marshaler for VirtualHubRouteTableV2Properties.
40140func (vhrtvp VirtualHubRouteTableV2Properties) MarshalJSON() ([]byte, error) {
40141	objectMap := make(map[string]interface{})
40142	if vhrtvp.Routes != nil {
40143		objectMap["routes"] = vhrtvp.Routes
40144	}
40145	if vhrtvp.AttachedConnections != nil {
40146		objectMap["attachedConnections"] = vhrtvp.AttachedConnections
40147	}
40148	return json.Marshal(objectMap)
40149}
40150
40151// VirtualHubRouteTableV2sCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
40152// a long-running operation.
40153type VirtualHubRouteTableV2sCreateOrUpdateFuture struct {
40154	azure.FutureAPI
40155	// Result returns the result of the asynchronous operation.
40156	// If the operation has not completed it will return an error.
40157	Result func(VirtualHubRouteTableV2sClient) (VirtualHubRouteTableV2, error)
40158}
40159
40160// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40161func (future *VirtualHubRouteTableV2sCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
40162	var azFuture azure.Future
40163	if err := json.Unmarshal(body, &azFuture); err != nil {
40164		return err
40165	}
40166	future.FutureAPI = &azFuture
40167	future.Result = future.result
40168	return nil
40169}
40170
40171// result is the default implementation for VirtualHubRouteTableV2sCreateOrUpdateFuture.Result.
40172func (future *VirtualHubRouteTableV2sCreateOrUpdateFuture) result(client VirtualHubRouteTableV2sClient) (vhrtv VirtualHubRouteTableV2, err error) {
40173	var done bool
40174	done, err = future.DoneWithContext(context.Background(), client)
40175	if err != nil {
40176		err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
40177		return
40178	}
40179	if !done {
40180		vhrtv.Response.Response = future.Response()
40181		err = azure.NewAsyncOpIncompleteError("network.VirtualHubRouteTableV2sCreateOrUpdateFuture")
40182		return
40183	}
40184	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
40185	if vhrtv.Response.Response, err = future.GetResult(sender); err == nil && vhrtv.Response.Response.StatusCode != http.StatusNoContent {
40186		vhrtv, err = client.CreateOrUpdateResponder(vhrtv.Response.Response)
40187		if err != nil {
40188			err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sCreateOrUpdateFuture", "Result", vhrtv.Response.Response, "Failure responding to request")
40189		}
40190	}
40191	return
40192}
40193
40194// VirtualHubRouteTableV2sDeleteFuture an abstraction for monitoring and retrieving the results of a
40195// long-running operation.
40196type VirtualHubRouteTableV2sDeleteFuture struct {
40197	azure.FutureAPI
40198	// Result returns the result of the asynchronous operation.
40199	// If the operation has not completed it will return an error.
40200	Result func(VirtualHubRouteTableV2sClient) (autorest.Response, error)
40201}
40202
40203// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40204func (future *VirtualHubRouteTableV2sDeleteFuture) UnmarshalJSON(body []byte) error {
40205	var azFuture azure.Future
40206	if err := json.Unmarshal(body, &azFuture); err != nil {
40207		return err
40208	}
40209	future.FutureAPI = &azFuture
40210	future.Result = future.result
40211	return nil
40212}
40213
40214// result is the default implementation for VirtualHubRouteTableV2sDeleteFuture.Result.
40215func (future *VirtualHubRouteTableV2sDeleteFuture) result(client VirtualHubRouteTableV2sClient) (ar autorest.Response, err error) {
40216	var done bool
40217	done, err = future.DoneWithContext(context.Background(), client)
40218	if err != nil {
40219		err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sDeleteFuture", "Result", future.Response(), "Polling failure")
40220		return
40221	}
40222	if !done {
40223		ar.Response = future.Response()
40224		err = azure.NewAsyncOpIncompleteError("network.VirtualHubRouteTableV2sDeleteFuture")
40225		return
40226	}
40227	ar.Response = future.Response()
40228	return
40229}
40230
40231// VirtualHubRouteV2 virtualHubRouteTableV2 route.
40232type VirtualHubRouteV2 struct {
40233	// DestinationType - The type of destinations.
40234	DestinationType *string `json:"destinationType,omitempty"`
40235	// Destinations - List of all destinations.
40236	Destinations *[]string `json:"destinations,omitempty"`
40237	// NextHopType - The type of next hops.
40238	NextHopType *string `json:"nextHopType,omitempty"`
40239	// NextHops - NextHops ip address.
40240	NextHops *[]string `json:"nextHops,omitempty"`
40241}
40242
40243// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
40244// long-running operation.
40245type VirtualHubsCreateOrUpdateFuture struct {
40246	azure.FutureAPI
40247	// Result returns the result of the asynchronous operation.
40248	// If the operation has not completed it will return an error.
40249	Result func(VirtualHubsClient) (VirtualHub, error)
40250}
40251
40252// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40253func (future *VirtualHubsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
40254	var azFuture azure.Future
40255	if err := json.Unmarshal(body, &azFuture); err != nil {
40256		return err
40257	}
40258	future.FutureAPI = &azFuture
40259	future.Result = future.result
40260	return nil
40261}
40262
40263// result is the default implementation for VirtualHubsCreateOrUpdateFuture.Result.
40264func (future *VirtualHubsCreateOrUpdateFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
40265	var done bool
40266	done, err = future.DoneWithContext(context.Background(), client)
40267	if err != nil {
40268		err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
40269		return
40270	}
40271	if !done {
40272		vh.Response.Response = future.Response()
40273		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture")
40274		return
40275	}
40276	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
40277	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
40278		vh, err = client.CreateOrUpdateResponder(vh.Response.Response)
40279		if err != nil {
40280			err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request")
40281		}
40282	}
40283	return
40284}
40285
40286// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
40287// operation.
40288type VirtualHubsDeleteFuture struct {
40289	azure.FutureAPI
40290	// Result returns the result of the asynchronous operation.
40291	// If the operation has not completed it will return an error.
40292	Result func(VirtualHubsClient) (autorest.Response, error)
40293}
40294
40295// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40296func (future *VirtualHubsDeleteFuture) UnmarshalJSON(body []byte) error {
40297	var azFuture azure.Future
40298	if err := json.Unmarshal(body, &azFuture); err != nil {
40299		return err
40300	}
40301	future.FutureAPI = &azFuture
40302	future.Result = future.result
40303	return nil
40304}
40305
40306// result is the default implementation for VirtualHubsDeleteFuture.Result.
40307func (future *VirtualHubsDeleteFuture) result(client VirtualHubsClient) (ar autorest.Response, err error) {
40308	var done bool
40309	done, err = future.DoneWithContext(context.Background(), client)
40310	if err != nil {
40311		err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure")
40312		return
40313	}
40314	if !done {
40315		ar.Response = future.Response()
40316		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture")
40317		return
40318	}
40319	ar.Response = future.Response()
40320	return
40321}
40322
40323// VirtualHubsGetEffectiveVirtualHubRoutesFuture an abstraction for monitoring and retrieving the results
40324// of a long-running operation.
40325type VirtualHubsGetEffectiveVirtualHubRoutesFuture struct {
40326	azure.FutureAPI
40327	// Result returns the result of the asynchronous operation.
40328	// If the operation has not completed it will return an error.
40329	Result func(VirtualHubsClient) (autorest.Response, error)
40330}
40331
40332// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40333func (future *VirtualHubsGetEffectiveVirtualHubRoutesFuture) UnmarshalJSON(body []byte) error {
40334	var azFuture azure.Future
40335	if err := json.Unmarshal(body, &azFuture); err != nil {
40336		return err
40337	}
40338	future.FutureAPI = &azFuture
40339	future.Result = future.result
40340	return nil
40341}
40342
40343// result is the default implementation for VirtualHubsGetEffectiveVirtualHubRoutesFuture.Result.
40344func (future *VirtualHubsGetEffectiveVirtualHubRoutesFuture) result(client VirtualHubsClient) (ar autorest.Response, err error) {
40345	var done bool
40346	done, err = future.DoneWithContext(context.Background(), client)
40347	if err != nil {
40348		err = autorest.NewErrorWithError(err, "network.VirtualHubsGetEffectiveVirtualHubRoutesFuture", "Result", future.Response(), "Polling failure")
40349		return
40350	}
40351	if !done {
40352		ar.Response = future.Response()
40353		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsGetEffectiveVirtualHubRoutesFuture")
40354		return
40355	}
40356	ar.Response = future.Response()
40357	return
40358}
40359
40360// VirtualNetwork virtual Network resource.
40361type VirtualNetwork struct {
40362	autorest.Response `json:"-"`
40363	// ExtendedLocation - The extended location of the virtual network.
40364	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
40365	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
40366	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
40367	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40368	Etag *string `json:"etag,omitempty"`
40369	// ID - Resource ID.
40370	ID *string `json:"id,omitempty"`
40371	// Name - READ-ONLY; Resource name.
40372	Name *string `json:"name,omitempty"`
40373	// Type - READ-ONLY; Resource type.
40374	Type *string `json:"type,omitempty"`
40375	// Location - Resource location.
40376	Location *string `json:"location,omitempty"`
40377	// Tags - Resource tags.
40378	Tags map[string]*string `json:"tags"`
40379}
40380
40381// MarshalJSON is the custom marshaler for VirtualNetwork.
40382func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
40383	objectMap := make(map[string]interface{})
40384	if vn.ExtendedLocation != nil {
40385		objectMap["extendedLocation"] = vn.ExtendedLocation
40386	}
40387	if vn.VirtualNetworkPropertiesFormat != nil {
40388		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
40389	}
40390	if vn.ID != nil {
40391		objectMap["id"] = vn.ID
40392	}
40393	if vn.Location != nil {
40394		objectMap["location"] = vn.Location
40395	}
40396	if vn.Tags != nil {
40397		objectMap["tags"] = vn.Tags
40398	}
40399	return json.Marshal(objectMap)
40400}
40401
40402// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
40403func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
40404	var m map[string]*json.RawMessage
40405	err := json.Unmarshal(body, &m)
40406	if err != nil {
40407		return err
40408	}
40409	for k, v := range m {
40410		switch k {
40411		case "extendedLocation":
40412			if v != nil {
40413				var extendedLocation ExtendedLocation
40414				err = json.Unmarshal(*v, &extendedLocation)
40415				if err != nil {
40416					return err
40417				}
40418				vn.ExtendedLocation = &extendedLocation
40419			}
40420		case "properties":
40421			if v != nil {
40422				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
40423				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
40424				if err != nil {
40425					return err
40426				}
40427				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
40428			}
40429		case "etag":
40430			if v != nil {
40431				var etag string
40432				err = json.Unmarshal(*v, &etag)
40433				if err != nil {
40434					return err
40435				}
40436				vn.Etag = &etag
40437			}
40438		case "id":
40439			if v != nil {
40440				var ID string
40441				err = json.Unmarshal(*v, &ID)
40442				if err != nil {
40443					return err
40444				}
40445				vn.ID = &ID
40446			}
40447		case "name":
40448			if v != nil {
40449				var name string
40450				err = json.Unmarshal(*v, &name)
40451				if err != nil {
40452					return err
40453				}
40454				vn.Name = &name
40455			}
40456		case "type":
40457			if v != nil {
40458				var typeVar string
40459				err = json.Unmarshal(*v, &typeVar)
40460				if err != nil {
40461					return err
40462				}
40463				vn.Type = &typeVar
40464			}
40465		case "location":
40466			if v != nil {
40467				var location string
40468				err = json.Unmarshal(*v, &location)
40469				if err != nil {
40470					return err
40471				}
40472				vn.Location = &location
40473			}
40474		case "tags":
40475			if v != nil {
40476				var tags map[string]*string
40477				err = json.Unmarshal(*v, &tags)
40478				if err != nil {
40479					return err
40480				}
40481				vn.Tags = tags
40482			}
40483		}
40484	}
40485
40486	return nil
40487}
40488
40489// VirtualNetworkBgpCommunities bgp Communities sent over ExpressRoute with each route corresponding to a
40490// prefix in this VNET.
40491type VirtualNetworkBgpCommunities struct {
40492	// VirtualNetworkCommunity - The BGP community associated with the virtual network.
40493	VirtualNetworkCommunity *string `json:"virtualNetworkCommunity,omitempty"`
40494	// RegionalCommunity - READ-ONLY; The BGP community associated with the region of the virtual network.
40495	RegionalCommunity *string `json:"regionalCommunity,omitempty"`
40496}
40497
40498// MarshalJSON is the custom marshaler for VirtualNetworkBgpCommunities.
40499func (vnbc VirtualNetworkBgpCommunities) MarshalJSON() ([]byte, error) {
40500	objectMap := make(map[string]interface{})
40501	if vnbc.VirtualNetworkCommunity != nil {
40502		objectMap["virtualNetworkCommunity"] = vnbc.VirtualNetworkCommunity
40503	}
40504	return json.Marshal(objectMap)
40505}
40506
40507// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
40508// resource.
40509type VirtualNetworkConnectionGatewayReference struct {
40510	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
40511	ID *string `json:"id,omitempty"`
40512}
40513
40514// VirtualNetworkGateway a common class for general resource information.
40515type VirtualNetworkGateway struct {
40516	autorest.Response `json:"-"`
40517	// ExtendedLocation - The extended location of type local virtual network gateway.
40518	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
40519	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
40520	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
40521	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40522	Etag *string `json:"etag,omitempty"`
40523	// ID - Resource ID.
40524	ID *string `json:"id,omitempty"`
40525	// Name - READ-ONLY; Resource name.
40526	Name *string `json:"name,omitempty"`
40527	// Type - READ-ONLY; Resource type.
40528	Type *string `json:"type,omitempty"`
40529	// Location - Resource location.
40530	Location *string `json:"location,omitempty"`
40531	// Tags - Resource tags.
40532	Tags map[string]*string `json:"tags"`
40533}
40534
40535// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
40536func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
40537	objectMap := make(map[string]interface{})
40538	if vng.ExtendedLocation != nil {
40539		objectMap["extendedLocation"] = vng.ExtendedLocation
40540	}
40541	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
40542		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
40543	}
40544	if vng.ID != nil {
40545		objectMap["id"] = vng.ID
40546	}
40547	if vng.Location != nil {
40548		objectMap["location"] = vng.Location
40549	}
40550	if vng.Tags != nil {
40551		objectMap["tags"] = vng.Tags
40552	}
40553	return json.Marshal(objectMap)
40554}
40555
40556// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
40557func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
40558	var m map[string]*json.RawMessage
40559	err := json.Unmarshal(body, &m)
40560	if err != nil {
40561		return err
40562	}
40563	for k, v := range m {
40564		switch k {
40565		case "extendedLocation":
40566			if v != nil {
40567				var extendedLocation ExtendedLocation
40568				err = json.Unmarshal(*v, &extendedLocation)
40569				if err != nil {
40570					return err
40571				}
40572				vng.ExtendedLocation = &extendedLocation
40573			}
40574		case "properties":
40575			if v != nil {
40576				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
40577				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
40578				if err != nil {
40579					return err
40580				}
40581				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
40582			}
40583		case "etag":
40584			if v != nil {
40585				var etag string
40586				err = json.Unmarshal(*v, &etag)
40587				if err != nil {
40588					return err
40589				}
40590				vng.Etag = &etag
40591			}
40592		case "id":
40593			if v != nil {
40594				var ID string
40595				err = json.Unmarshal(*v, &ID)
40596				if err != nil {
40597					return err
40598				}
40599				vng.ID = &ID
40600			}
40601		case "name":
40602			if v != nil {
40603				var name string
40604				err = json.Unmarshal(*v, &name)
40605				if err != nil {
40606					return err
40607				}
40608				vng.Name = &name
40609			}
40610		case "type":
40611			if v != nil {
40612				var typeVar string
40613				err = json.Unmarshal(*v, &typeVar)
40614				if err != nil {
40615					return err
40616				}
40617				vng.Type = &typeVar
40618			}
40619		case "location":
40620			if v != nil {
40621				var location string
40622				err = json.Unmarshal(*v, &location)
40623				if err != nil {
40624					return err
40625				}
40626				vng.Location = &location
40627			}
40628		case "tags":
40629			if v != nil {
40630				var tags map[string]*string
40631				err = json.Unmarshal(*v, &tags)
40632				if err != nil {
40633					return err
40634				}
40635				vng.Tags = tags
40636			}
40637		}
40638	}
40639
40640	return nil
40641}
40642
40643// VirtualNetworkGatewayConnection a common class for general resource information.
40644type VirtualNetworkGatewayConnection struct {
40645	autorest.Response `json:"-"`
40646	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
40647	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
40648	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40649	Etag *string `json:"etag,omitempty"`
40650	// ID - Resource ID.
40651	ID *string `json:"id,omitempty"`
40652	// Name - READ-ONLY; Resource name.
40653	Name *string `json:"name,omitempty"`
40654	// Type - READ-ONLY; Resource type.
40655	Type *string `json:"type,omitempty"`
40656	// Location - Resource location.
40657	Location *string `json:"location,omitempty"`
40658	// Tags - Resource tags.
40659	Tags map[string]*string `json:"tags"`
40660}
40661
40662// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
40663func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
40664	objectMap := make(map[string]interface{})
40665	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
40666		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
40667	}
40668	if vngc.ID != nil {
40669		objectMap["id"] = vngc.ID
40670	}
40671	if vngc.Location != nil {
40672		objectMap["location"] = vngc.Location
40673	}
40674	if vngc.Tags != nil {
40675		objectMap["tags"] = vngc.Tags
40676	}
40677	return json.Marshal(objectMap)
40678}
40679
40680// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
40681func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
40682	var m map[string]*json.RawMessage
40683	err := json.Unmarshal(body, &m)
40684	if err != nil {
40685		return err
40686	}
40687	for k, v := range m {
40688		switch k {
40689		case "properties":
40690			if v != nil {
40691				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
40692				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
40693				if err != nil {
40694					return err
40695				}
40696				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
40697			}
40698		case "etag":
40699			if v != nil {
40700				var etag string
40701				err = json.Unmarshal(*v, &etag)
40702				if err != nil {
40703					return err
40704				}
40705				vngc.Etag = &etag
40706			}
40707		case "id":
40708			if v != nil {
40709				var ID string
40710				err = json.Unmarshal(*v, &ID)
40711				if err != nil {
40712					return err
40713				}
40714				vngc.ID = &ID
40715			}
40716		case "name":
40717			if v != nil {
40718				var name string
40719				err = json.Unmarshal(*v, &name)
40720				if err != nil {
40721					return err
40722				}
40723				vngc.Name = &name
40724			}
40725		case "type":
40726			if v != nil {
40727				var typeVar string
40728				err = json.Unmarshal(*v, &typeVar)
40729				if err != nil {
40730					return err
40731				}
40732				vngc.Type = &typeVar
40733			}
40734		case "location":
40735			if v != nil {
40736				var location string
40737				err = json.Unmarshal(*v, &location)
40738				if err != nil {
40739					return err
40740				}
40741				vngc.Location = &location
40742			}
40743		case "tags":
40744			if v != nil {
40745				var tags map[string]*string
40746				err = json.Unmarshal(*v, &tags)
40747				if err != nil {
40748					return err
40749				}
40750				vngc.Tags = tags
40751			}
40752		}
40753	}
40754
40755	return nil
40756}
40757
40758// VirtualNetworkGatewayConnectionListEntity a common class for general resource information.
40759type VirtualNetworkGatewayConnectionListEntity struct {
40760	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
40761	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
40762	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40763	Etag *string `json:"etag,omitempty"`
40764	// ID - Resource ID.
40765	ID *string `json:"id,omitempty"`
40766	// Name - READ-ONLY; Resource name.
40767	Name *string `json:"name,omitempty"`
40768	// Type - READ-ONLY; Resource type.
40769	Type *string `json:"type,omitempty"`
40770	// Location - Resource location.
40771	Location *string `json:"location,omitempty"`
40772	// Tags - Resource tags.
40773	Tags map[string]*string `json:"tags"`
40774}
40775
40776// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
40777func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
40778	objectMap := make(map[string]interface{})
40779	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
40780		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
40781	}
40782	if vngcle.ID != nil {
40783		objectMap["id"] = vngcle.ID
40784	}
40785	if vngcle.Location != nil {
40786		objectMap["location"] = vngcle.Location
40787	}
40788	if vngcle.Tags != nil {
40789		objectMap["tags"] = vngcle.Tags
40790	}
40791	return json.Marshal(objectMap)
40792}
40793
40794// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
40795func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
40796	var m map[string]*json.RawMessage
40797	err := json.Unmarshal(body, &m)
40798	if err != nil {
40799		return err
40800	}
40801	for k, v := range m {
40802		switch k {
40803		case "properties":
40804			if v != nil {
40805				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
40806				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
40807				if err != nil {
40808					return err
40809				}
40810				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
40811			}
40812		case "etag":
40813			if v != nil {
40814				var etag string
40815				err = json.Unmarshal(*v, &etag)
40816				if err != nil {
40817					return err
40818				}
40819				vngcle.Etag = &etag
40820			}
40821		case "id":
40822			if v != nil {
40823				var ID string
40824				err = json.Unmarshal(*v, &ID)
40825				if err != nil {
40826					return err
40827				}
40828				vngcle.ID = &ID
40829			}
40830		case "name":
40831			if v != nil {
40832				var name string
40833				err = json.Unmarshal(*v, &name)
40834				if err != nil {
40835					return err
40836				}
40837				vngcle.Name = &name
40838			}
40839		case "type":
40840			if v != nil {
40841				var typeVar string
40842				err = json.Unmarshal(*v, &typeVar)
40843				if err != nil {
40844					return err
40845				}
40846				vngcle.Type = &typeVar
40847			}
40848		case "location":
40849			if v != nil {
40850				var location string
40851				err = json.Unmarshal(*v, &location)
40852				if err != nil {
40853					return err
40854				}
40855				vngcle.Location = &location
40856			}
40857		case "tags":
40858			if v != nil {
40859				var tags map[string]*string
40860				err = json.Unmarshal(*v, &tags)
40861				if err != nil {
40862					return err
40863				}
40864				vngcle.Tags = tags
40865			}
40866		}
40867	}
40868
40869	return nil
40870}
40871
40872// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties.
40873type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
40874	// AuthorizationKey - The authorizationKey.
40875	AuthorizationKey *string `json:"authorizationKey,omitempty"`
40876	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
40877	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
40878	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
40879	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
40880	// LocalNetworkGateway2 - The reference to local network gateway resource.
40881	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
40882	// ConnectionType - Gateway connection type. Possible values include: 'VirtualNetworkGatewayConnectionTypeIPsec', 'VirtualNetworkGatewayConnectionTypeVnet2Vnet', 'VirtualNetworkGatewayConnectionTypeExpressRoute', 'VirtualNetworkGatewayConnectionTypeVPNClient'
40883	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
40884	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'VirtualNetworkGatewayConnectionProtocolIKEv2', 'VirtualNetworkGatewayConnectionProtocolIKEv1'
40885	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
40886	// RoutingWeight - The routing weight.
40887	RoutingWeight *int32 `json:"routingWeight,omitempty"`
40888	// ConnectionMode - The connection mode for this connection. Possible values include: 'VirtualNetworkGatewayConnectionModeDefault', 'VirtualNetworkGatewayConnectionModeResponderOnly', 'VirtualNetworkGatewayConnectionModeInitiatorOnly'
40889	ConnectionMode VirtualNetworkGatewayConnectionMode `json:"connectionMode,omitempty"`
40890	// SharedKey - The IPSec shared key.
40891	SharedKey *string `json:"sharedKey,omitempty"`
40892	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
40893	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
40894	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
40895	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
40896	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
40897	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
40898	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
40899	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
40900	// Peer - The reference to peerings resource.
40901	Peer *SubResource `json:"peer,omitempty"`
40902	// EnableBgp - EnableBgp flag.
40903	EnableBgp *bool `json:"enableBgp,omitempty"`
40904	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
40905	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
40906	// IpsecPolicies - The IPSec Policies to be considered by this connection.
40907	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
40908	// TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection.
40909	TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"`
40910	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway connection resource.
40911	ResourceGUID *string `json:"resourceGuid,omitempty"`
40912	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
40913	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
40914	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
40915	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
40916}
40917
40918// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
40919func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
40920	objectMap := make(map[string]interface{})
40921	if vngclepf.AuthorizationKey != nil {
40922		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
40923	}
40924	if vngclepf.VirtualNetworkGateway1 != nil {
40925		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
40926	}
40927	if vngclepf.VirtualNetworkGateway2 != nil {
40928		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
40929	}
40930	if vngclepf.LocalNetworkGateway2 != nil {
40931		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
40932	}
40933	if vngclepf.ConnectionType != "" {
40934		objectMap["connectionType"] = vngclepf.ConnectionType
40935	}
40936	if vngclepf.ConnectionProtocol != "" {
40937		objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol
40938	}
40939	if vngclepf.RoutingWeight != nil {
40940		objectMap["routingWeight"] = vngclepf.RoutingWeight
40941	}
40942	if vngclepf.ConnectionMode != "" {
40943		objectMap["connectionMode"] = vngclepf.ConnectionMode
40944	}
40945	if vngclepf.SharedKey != nil {
40946		objectMap["sharedKey"] = vngclepf.SharedKey
40947	}
40948	if vngclepf.Peer != nil {
40949		objectMap["peer"] = vngclepf.Peer
40950	}
40951	if vngclepf.EnableBgp != nil {
40952		objectMap["enableBgp"] = vngclepf.EnableBgp
40953	}
40954	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
40955		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
40956	}
40957	if vngclepf.IpsecPolicies != nil {
40958		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
40959	}
40960	if vngclepf.TrafficSelectorPolicies != nil {
40961		objectMap["trafficSelectorPolicies"] = vngclepf.TrafficSelectorPolicies
40962	}
40963	if vngclepf.ExpressRouteGatewayBypass != nil {
40964		objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass
40965	}
40966	return json.Marshal(objectMap)
40967}
40968
40969// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
40970// service call.
40971type VirtualNetworkGatewayConnectionListResult struct {
40972	autorest.Response `json:"-"`
40973	// Value - A list of VirtualNetworkGatewayConnection resources that exists in a resource group.
40974	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
40975	// NextLink - READ-ONLY; The URL to get the next set of results.
40976	NextLink *string `json:"nextLink,omitempty"`
40977}
40978
40979// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
40980func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
40981	objectMap := make(map[string]interface{})
40982	if vngclr.Value != nil {
40983		objectMap["value"] = vngclr.Value
40984	}
40985	return json.Marshal(objectMap)
40986}
40987
40988// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
40989// VirtualNetworkGatewayConnection values.
40990type VirtualNetworkGatewayConnectionListResultIterator struct {
40991	i    int
40992	page VirtualNetworkGatewayConnectionListResultPage
40993}
40994
40995// NextWithContext advances to the next value.  If there was an error making
40996// the request the iterator does not advance and the error is returned.
40997func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
40998	if tracing.IsEnabled() {
40999		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
41000		defer func() {
41001			sc := -1
41002			if iter.Response().Response.Response != nil {
41003				sc = iter.Response().Response.Response.StatusCode
41004			}
41005			tracing.EndSpan(ctx, sc, err)
41006		}()
41007	}
41008	iter.i++
41009	if iter.i < len(iter.page.Values()) {
41010		return nil
41011	}
41012	err = iter.page.NextWithContext(ctx)
41013	if err != nil {
41014		iter.i--
41015		return err
41016	}
41017	iter.i = 0
41018	return nil
41019}
41020
41021// Next advances to the next value.  If there was an error making
41022// the request the iterator does not advance and the error is returned.
41023// Deprecated: Use NextWithContext() instead.
41024func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
41025	return iter.NextWithContext(context.Background())
41026}
41027
41028// NotDone returns true if the enumeration should be started or is not yet complete.
41029func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
41030	return iter.page.NotDone() && iter.i < len(iter.page.Values())
41031}
41032
41033// Response returns the raw server response from the last page request.
41034func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
41035	return iter.page.Response()
41036}
41037
41038// Value returns the current value or a zero-initialized value if the
41039// iterator has advanced beyond the end of the collection.
41040func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
41041	if !iter.page.NotDone() {
41042		return VirtualNetworkGatewayConnection{}
41043	}
41044	return iter.page.Values()[iter.i]
41045}
41046
41047// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
41048func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
41049	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
41050}
41051
41052// IsEmpty returns true if the ListResult contains no values.
41053func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
41054	return vngclr.Value == nil || len(*vngclr.Value) == 0
41055}
41056
41057// hasNextLink returns true if the NextLink is not empty.
41058func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
41059	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
41060}
41061
41062// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
41063// It returns nil if no more results exist.
41064func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
41065	if !vngclr.hasNextLink() {
41066		return nil, nil
41067	}
41068	return autorest.Prepare((&http.Request{}).WithContext(ctx),
41069		autorest.AsJSON(),
41070		autorest.AsGet(),
41071		autorest.WithBaseURL(to.String(vngclr.NextLink)))
41072}
41073
41074// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
41075type VirtualNetworkGatewayConnectionListResultPage struct {
41076	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
41077	vngclr VirtualNetworkGatewayConnectionListResult
41078}
41079
41080// NextWithContext advances to the next page of values.  If there was an error making
41081// the request the page does not advance and the error is returned.
41082func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
41083	if tracing.IsEnabled() {
41084		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
41085		defer func() {
41086			sc := -1
41087			if page.Response().Response.Response != nil {
41088				sc = page.Response().Response.Response.StatusCode
41089			}
41090			tracing.EndSpan(ctx, sc, err)
41091		}()
41092	}
41093	for {
41094		next, err := page.fn(ctx, page.vngclr)
41095		if err != nil {
41096			return err
41097		}
41098		page.vngclr = next
41099		if !next.hasNextLink() || !next.IsEmpty() {
41100			break
41101		}
41102	}
41103	return nil
41104}
41105
41106// Next advances to the next page of values.  If there was an error making
41107// the request the page does not advance and the error is returned.
41108// Deprecated: Use NextWithContext() instead.
41109func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
41110	return page.NextWithContext(context.Background())
41111}
41112
41113// NotDone returns true if the page enumeration should be started or is not yet complete.
41114func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
41115	return !page.vngclr.IsEmpty()
41116}
41117
41118// Response returns the raw server response from the last page request.
41119func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
41120	return page.vngclr
41121}
41122
41123// Values returns the slice of values for the current page or nil if there are no values.
41124func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
41125	if page.vngclr.IsEmpty() {
41126		return nil
41127	}
41128	return *page.vngclr.Value
41129}
41130
41131// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
41132func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
41133	return VirtualNetworkGatewayConnectionListResultPage{
41134		fn:     getNextPage,
41135		vngclr: cur,
41136	}
41137}
41138
41139// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties.
41140type VirtualNetworkGatewayConnectionPropertiesFormat struct {
41141	// AuthorizationKey - The authorizationKey.
41142	AuthorizationKey *string `json:"authorizationKey,omitempty"`
41143	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
41144	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
41145	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
41146	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
41147	// LocalNetworkGateway2 - The reference to local network gateway resource.
41148	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
41149	// ConnectionType - Gateway connection type. Possible values include: 'VirtualNetworkGatewayConnectionTypeIPsec', 'VirtualNetworkGatewayConnectionTypeVnet2Vnet', 'VirtualNetworkGatewayConnectionTypeExpressRoute', 'VirtualNetworkGatewayConnectionTypeVPNClient'
41150	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
41151	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'VirtualNetworkGatewayConnectionProtocolIKEv2', 'VirtualNetworkGatewayConnectionProtocolIKEv1'
41152	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
41153	// RoutingWeight - The routing weight.
41154	RoutingWeight *int32 `json:"routingWeight,omitempty"`
41155	// DpdTimeoutSeconds - The dead peer detection timeout of this connection in seconds.
41156	DpdTimeoutSeconds *int32 `json:"dpdTimeoutSeconds,omitempty"`
41157	// ConnectionMode - The connection mode for this connection. Possible values include: 'VirtualNetworkGatewayConnectionModeDefault', 'VirtualNetworkGatewayConnectionModeResponderOnly', 'VirtualNetworkGatewayConnectionModeInitiatorOnly'
41158	ConnectionMode VirtualNetworkGatewayConnectionMode `json:"connectionMode,omitempty"`
41159	// SharedKey - The IPSec shared key.
41160	SharedKey *string `json:"sharedKey,omitempty"`
41161	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
41162	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
41163	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
41164	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
41165	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
41166	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
41167	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
41168	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
41169	// Peer - The reference to peerings resource.
41170	Peer *SubResource `json:"peer,omitempty"`
41171	// EnableBgp - EnableBgp flag.
41172	EnableBgp *bool `json:"enableBgp,omitempty"`
41173	// UseLocalAzureIPAddress - Use private local Azure IP for the connection.
41174	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
41175	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
41176	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
41177	// IpsecPolicies - The IPSec Policies to be considered by this connection.
41178	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
41179	// TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection.
41180	TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"`
41181	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway connection resource.
41182	ResourceGUID *string `json:"resourceGuid,omitempty"`
41183	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
41184	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
41185	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
41186	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
41187}
41188
41189// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
41190func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
41191	objectMap := make(map[string]interface{})
41192	if vngcpf.AuthorizationKey != nil {
41193		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
41194	}
41195	if vngcpf.VirtualNetworkGateway1 != nil {
41196		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
41197	}
41198	if vngcpf.VirtualNetworkGateway2 != nil {
41199		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
41200	}
41201	if vngcpf.LocalNetworkGateway2 != nil {
41202		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
41203	}
41204	if vngcpf.ConnectionType != "" {
41205		objectMap["connectionType"] = vngcpf.ConnectionType
41206	}
41207	if vngcpf.ConnectionProtocol != "" {
41208		objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol
41209	}
41210	if vngcpf.RoutingWeight != nil {
41211		objectMap["routingWeight"] = vngcpf.RoutingWeight
41212	}
41213	if vngcpf.DpdTimeoutSeconds != nil {
41214		objectMap["dpdTimeoutSeconds"] = vngcpf.DpdTimeoutSeconds
41215	}
41216	if vngcpf.ConnectionMode != "" {
41217		objectMap["connectionMode"] = vngcpf.ConnectionMode
41218	}
41219	if vngcpf.SharedKey != nil {
41220		objectMap["sharedKey"] = vngcpf.SharedKey
41221	}
41222	if vngcpf.Peer != nil {
41223		objectMap["peer"] = vngcpf.Peer
41224	}
41225	if vngcpf.EnableBgp != nil {
41226		objectMap["enableBgp"] = vngcpf.EnableBgp
41227	}
41228	if vngcpf.UseLocalAzureIPAddress != nil {
41229		objectMap["useLocalAzureIpAddress"] = vngcpf.UseLocalAzureIPAddress
41230	}
41231	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
41232		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
41233	}
41234	if vngcpf.IpsecPolicies != nil {
41235		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
41236	}
41237	if vngcpf.TrafficSelectorPolicies != nil {
41238		objectMap["trafficSelectorPolicies"] = vngcpf.TrafficSelectorPolicies
41239	}
41240	if vngcpf.ExpressRouteGatewayBypass != nil {
41241		objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass
41242	}
41243	return json.Marshal(objectMap)
41244}
41245
41246// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
41247// results of a long-running operation.
41248type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
41249	azure.FutureAPI
41250	// Result returns the result of the asynchronous operation.
41251	// If the operation has not completed it will return an error.
41252	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
41253}
41254
41255// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41256func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
41257	var azFuture azure.Future
41258	if err := json.Unmarshal(body, &azFuture); err != nil {
41259		return err
41260	}
41261	future.FutureAPI = &azFuture
41262	future.Result = future.result
41263	return nil
41264}
41265
41266// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result.
41267func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
41268	var done bool
41269	done, err = future.DoneWithContext(context.Background(), client)
41270	if err != nil {
41271		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
41272		return
41273	}
41274	if !done {
41275		vngc.Response.Response = future.Response()
41276		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
41277		return
41278	}
41279	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41280	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
41281		vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
41282		if err != nil {
41283			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
41284		}
41285	}
41286	return
41287}
41288
41289// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
41290// a long-running operation.
41291type VirtualNetworkGatewayConnectionsDeleteFuture struct {
41292	azure.FutureAPI
41293	// Result returns the result of the asynchronous operation.
41294	// If the operation has not completed it will return an error.
41295	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
41296}
41297
41298// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41299func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
41300	var azFuture azure.Future
41301	if err := json.Unmarshal(body, &azFuture); err != nil {
41302		return err
41303	}
41304	future.FutureAPI = &azFuture
41305	future.Result = future.result
41306	return nil
41307}
41308
41309// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result.
41310func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
41311	var done bool
41312	done, err = future.DoneWithContext(context.Background(), client)
41313	if err != nil {
41314		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
41315		return
41316	}
41317	if !done {
41318		ar.Response = future.Response()
41319		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
41320		return
41321	}
41322	ar.Response = future.Response()
41323	return
41324}
41325
41326// VirtualNetworkGatewayConnectionsGetIkeSasFuture an abstraction for monitoring and retrieving the results
41327// of a long-running operation.
41328type VirtualNetworkGatewayConnectionsGetIkeSasFuture struct {
41329	azure.FutureAPI
41330	// Result returns the result of the asynchronous operation.
41331	// If the operation has not completed it will return an error.
41332	Result func(VirtualNetworkGatewayConnectionsClient) (String, error)
41333}
41334
41335// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41336func (future *VirtualNetworkGatewayConnectionsGetIkeSasFuture) UnmarshalJSON(body []byte) error {
41337	var azFuture azure.Future
41338	if err := json.Unmarshal(body, &azFuture); err != nil {
41339		return err
41340	}
41341	future.FutureAPI = &azFuture
41342	future.Result = future.result
41343	return nil
41344}
41345
41346// result is the default implementation for VirtualNetworkGatewayConnectionsGetIkeSasFuture.Result.
41347func (future *VirtualNetworkGatewayConnectionsGetIkeSasFuture) result(client VirtualNetworkGatewayConnectionsClient) (s String, err error) {
41348	var done bool
41349	done, err = future.DoneWithContext(context.Background(), client)
41350	if err != nil {
41351		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsGetIkeSasFuture", "Result", future.Response(), "Polling failure")
41352		return
41353	}
41354	if !done {
41355		s.Response.Response = future.Response()
41356		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsGetIkeSasFuture")
41357		return
41358	}
41359	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41360	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
41361		s, err = client.GetIkeSasResponder(s.Response.Response)
41362		if err != nil {
41363			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsGetIkeSasFuture", "Result", s.Response.Response, "Failure responding to request")
41364		}
41365	}
41366	return
41367}
41368
41369// VirtualNetworkGatewayConnectionsResetConnectionFuture an abstraction for monitoring and retrieving the
41370// results of a long-running operation.
41371type VirtualNetworkGatewayConnectionsResetConnectionFuture struct {
41372	azure.FutureAPI
41373	// Result returns the result of the asynchronous operation.
41374	// If the operation has not completed it will return an error.
41375	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
41376}
41377
41378// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41379func (future *VirtualNetworkGatewayConnectionsResetConnectionFuture) UnmarshalJSON(body []byte) error {
41380	var azFuture azure.Future
41381	if err := json.Unmarshal(body, &azFuture); err != nil {
41382		return err
41383	}
41384	future.FutureAPI = &azFuture
41385	future.Result = future.result
41386	return nil
41387}
41388
41389// result is the default implementation for VirtualNetworkGatewayConnectionsResetConnectionFuture.Result.
41390func (future *VirtualNetworkGatewayConnectionsResetConnectionFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
41391	var done bool
41392	done, err = future.DoneWithContext(context.Background(), client)
41393	if err != nil {
41394		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetConnectionFuture", "Result", future.Response(), "Polling failure")
41395		return
41396	}
41397	if !done {
41398		ar.Response = future.Response()
41399		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetConnectionFuture")
41400		return
41401	}
41402	ar.Response = future.Response()
41403	return
41404}
41405
41406// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
41407// results of a long-running operation.
41408type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
41409	azure.FutureAPI
41410	// Result returns the result of the asynchronous operation.
41411	// If the operation has not completed it will return an error.
41412	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
41413}
41414
41415// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41416func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error {
41417	var azFuture azure.Future
41418	if err := json.Unmarshal(body, &azFuture); err != nil {
41419		return err
41420	}
41421	future.FutureAPI = &azFuture
41422	future.Result = future.result
41423	return nil
41424}
41425
41426// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result.
41427func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
41428	var done bool
41429	done, err = future.DoneWithContext(context.Background(), client)
41430	if err != nil {
41431		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
41432		return
41433	}
41434	if !done {
41435		crsk.Response.Response = future.Response()
41436		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
41437		return
41438	}
41439	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41440	if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
41441		crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
41442		if err != nil {
41443			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
41444		}
41445	}
41446	return
41447}
41448
41449// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
41450// results of a long-running operation.
41451type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
41452	azure.FutureAPI
41453	// Result returns the result of the asynchronous operation.
41454	// If the operation has not completed it will return an error.
41455	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
41456}
41457
41458// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41459func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error {
41460	var azFuture azure.Future
41461	if err := json.Unmarshal(body, &azFuture); err != nil {
41462		return err
41463	}
41464	future.FutureAPI = &azFuture
41465	future.Result = future.result
41466	return nil
41467}
41468
41469// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result.
41470func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
41471	var done bool
41472	done, err = future.DoneWithContext(context.Background(), client)
41473	if err != nil {
41474		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
41475		return
41476	}
41477	if !done {
41478		csk.Response.Response = future.Response()
41479		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
41480		return
41481	}
41482	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41483	if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
41484		csk, err = client.SetSharedKeyResponder(csk.Response.Response)
41485		if err != nil {
41486			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
41487		}
41488	}
41489	return
41490}
41491
41492// VirtualNetworkGatewayConnectionsStartPacketCaptureFuture an abstraction for monitoring and retrieving
41493// the results of a long-running operation.
41494type VirtualNetworkGatewayConnectionsStartPacketCaptureFuture struct {
41495	azure.FutureAPI
41496	// Result returns the result of the asynchronous operation.
41497	// If the operation has not completed it will return an error.
41498	Result func(VirtualNetworkGatewayConnectionsClient) (String, error)
41499}
41500
41501// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41502func (future *VirtualNetworkGatewayConnectionsStartPacketCaptureFuture) UnmarshalJSON(body []byte) error {
41503	var azFuture azure.Future
41504	if err := json.Unmarshal(body, &azFuture); err != nil {
41505		return err
41506	}
41507	future.FutureAPI = &azFuture
41508	future.Result = future.result
41509	return nil
41510}
41511
41512// result is the default implementation for VirtualNetworkGatewayConnectionsStartPacketCaptureFuture.Result.
41513func (future *VirtualNetworkGatewayConnectionsStartPacketCaptureFuture) result(client VirtualNetworkGatewayConnectionsClient) (s String, err error) {
41514	var done bool
41515	done, err = future.DoneWithContext(context.Background(), client)
41516	if err != nil {
41517		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture", "Result", future.Response(), "Polling failure")
41518		return
41519	}
41520	if !done {
41521		s.Response.Response = future.Response()
41522		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture")
41523		return
41524	}
41525	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41526	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
41527		s, err = client.StartPacketCaptureResponder(s.Response.Response)
41528		if err != nil {
41529			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
41530		}
41531	}
41532	return
41533}
41534
41535// VirtualNetworkGatewayConnectionsStopPacketCaptureFuture an abstraction for monitoring and retrieving the
41536// results of a long-running operation.
41537type VirtualNetworkGatewayConnectionsStopPacketCaptureFuture struct {
41538	azure.FutureAPI
41539	// Result returns the result of the asynchronous operation.
41540	// If the operation has not completed it will return an error.
41541	Result func(VirtualNetworkGatewayConnectionsClient) (String, error)
41542}
41543
41544// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41545func (future *VirtualNetworkGatewayConnectionsStopPacketCaptureFuture) UnmarshalJSON(body []byte) error {
41546	var azFuture azure.Future
41547	if err := json.Unmarshal(body, &azFuture); err != nil {
41548		return err
41549	}
41550	future.FutureAPI = &azFuture
41551	future.Result = future.result
41552	return nil
41553}
41554
41555// result is the default implementation for VirtualNetworkGatewayConnectionsStopPacketCaptureFuture.Result.
41556func (future *VirtualNetworkGatewayConnectionsStopPacketCaptureFuture) result(client VirtualNetworkGatewayConnectionsClient) (s String, err error) {
41557	var done bool
41558	done, err = future.DoneWithContext(context.Background(), client)
41559	if err != nil {
41560		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture", "Result", future.Response(), "Polling failure")
41561		return
41562	}
41563	if !done {
41564		s.Response.Response = future.Response()
41565		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture")
41566		return
41567	}
41568	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41569	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
41570		s, err = client.StopPacketCaptureResponder(s.Response.Response)
41571		if err != nil {
41572			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
41573		}
41574	}
41575	return
41576}
41577
41578// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
41579// results of a long-running operation.
41580type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
41581	azure.FutureAPI
41582	// Result returns the result of the asynchronous operation.
41583	// If the operation has not completed it will return an error.
41584	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
41585}
41586
41587// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41588func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
41589	var azFuture azure.Future
41590	if err := json.Unmarshal(body, &azFuture); err != nil {
41591		return err
41592	}
41593	future.FutureAPI = &azFuture
41594	future.Result = future.result
41595	return nil
41596}
41597
41598// result is the default implementation for VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result.
41599func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
41600	var done bool
41601	done, err = future.DoneWithContext(context.Background(), client)
41602	if err != nil {
41603		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
41604		return
41605	}
41606	if !done {
41607		vngc.Response.Response = future.Response()
41608		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
41609		return
41610	}
41611	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41612	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
41613		vngc, err = client.UpdateTagsResponder(vngc.Response.Response)
41614		if err != nil {
41615			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request")
41616		}
41617	}
41618	return
41619}
41620
41621// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway.
41622type VirtualNetworkGatewayIPConfiguration struct {
41623	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
41624	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
41625	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
41626	Name *string `json:"name,omitempty"`
41627	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
41628	Etag *string `json:"etag,omitempty"`
41629	// ID - Resource ID.
41630	ID *string `json:"id,omitempty"`
41631}
41632
41633// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
41634func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
41635	objectMap := make(map[string]interface{})
41636	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
41637		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
41638	}
41639	if vngic.Name != nil {
41640		objectMap["name"] = vngic.Name
41641	}
41642	if vngic.ID != nil {
41643		objectMap["id"] = vngic.ID
41644	}
41645	return json.Marshal(objectMap)
41646}
41647
41648// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
41649func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
41650	var m map[string]*json.RawMessage
41651	err := json.Unmarshal(body, &m)
41652	if err != nil {
41653		return err
41654	}
41655	for k, v := range m {
41656		switch k {
41657		case "properties":
41658			if v != nil {
41659				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
41660				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
41661				if err != nil {
41662					return err
41663				}
41664				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
41665			}
41666		case "name":
41667			if v != nil {
41668				var name string
41669				err = json.Unmarshal(*v, &name)
41670				if err != nil {
41671					return err
41672				}
41673				vngic.Name = &name
41674			}
41675		case "etag":
41676			if v != nil {
41677				var etag string
41678				err = json.Unmarshal(*v, &etag)
41679				if err != nil {
41680					return err
41681				}
41682				vngic.Etag = &etag
41683			}
41684		case "id":
41685			if v != nil {
41686				var ID string
41687				err = json.Unmarshal(*v, &ID)
41688				if err != nil {
41689					return err
41690				}
41691				vngic.ID = &ID
41692			}
41693		}
41694	}
41695
41696	return nil
41697}
41698
41699// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration.
41700type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
41701	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'IPAllocationMethodStatic', 'IPAllocationMethodDynamic'
41702	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
41703	// Subnet - The reference to the subnet resource.
41704	Subnet *SubResource `json:"subnet,omitempty"`
41705	// PublicIPAddress - The reference to the public IP resource.
41706	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
41707	// PrivateIPAddress - READ-ONLY; Private IP Address for this gateway.
41708	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
41709	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
41710	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
41711}
41712
41713// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
41714func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
41715	objectMap := make(map[string]interface{})
41716	if vngicpf.PrivateIPAllocationMethod != "" {
41717		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
41718	}
41719	if vngicpf.Subnet != nil {
41720		objectMap["subnet"] = vngicpf.Subnet
41721	}
41722	if vngicpf.PublicIPAddress != nil {
41723		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
41724	}
41725	return json.Marshal(objectMap)
41726}
41727
41728// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
41729// service call.
41730type VirtualNetworkGatewayListConnectionsResult struct {
41731	autorest.Response `json:"-"`
41732	// Value - A list of VirtualNetworkGatewayConnection resources that exists in a resource group.
41733	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
41734	// NextLink - READ-ONLY; The URL to get the next set of results.
41735	NextLink *string `json:"nextLink,omitempty"`
41736}
41737
41738// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
41739func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
41740	objectMap := make(map[string]interface{})
41741	if vnglcr.Value != nil {
41742		objectMap["value"] = vnglcr.Value
41743	}
41744	return json.Marshal(objectMap)
41745}
41746
41747// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
41748// VirtualNetworkGatewayConnectionListEntity values.
41749type VirtualNetworkGatewayListConnectionsResultIterator struct {
41750	i    int
41751	page VirtualNetworkGatewayListConnectionsResultPage
41752}
41753
41754// NextWithContext advances to the next value.  If there was an error making
41755// the request the iterator does not advance and the error is returned.
41756func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
41757	if tracing.IsEnabled() {
41758		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
41759		defer func() {
41760			sc := -1
41761			if iter.Response().Response.Response != nil {
41762				sc = iter.Response().Response.Response.StatusCode
41763			}
41764			tracing.EndSpan(ctx, sc, err)
41765		}()
41766	}
41767	iter.i++
41768	if iter.i < len(iter.page.Values()) {
41769		return nil
41770	}
41771	err = iter.page.NextWithContext(ctx)
41772	if err != nil {
41773		iter.i--
41774		return err
41775	}
41776	iter.i = 0
41777	return nil
41778}
41779
41780// Next advances to the next value.  If there was an error making
41781// the request the iterator does not advance and the error is returned.
41782// Deprecated: Use NextWithContext() instead.
41783func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
41784	return iter.NextWithContext(context.Background())
41785}
41786
41787// NotDone returns true if the enumeration should be started or is not yet complete.
41788func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
41789	return iter.page.NotDone() && iter.i < len(iter.page.Values())
41790}
41791
41792// Response returns the raw server response from the last page request.
41793func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
41794	return iter.page.Response()
41795}
41796
41797// Value returns the current value or a zero-initialized value if the
41798// iterator has advanced beyond the end of the collection.
41799func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
41800	if !iter.page.NotDone() {
41801		return VirtualNetworkGatewayConnectionListEntity{}
41802	}
41803	return iter.page.Values()[iter.i]
41804}
41805
41806// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
41807func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
41808	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
41809}
41810
41811// IsEmpty returns true if the ListResult contains no values.
41812func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
41813	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
41814}
41815
41816// hasNextLink returns true if the NextLink is not empty.
41817func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
41818	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
41819}
41820
41821// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
41822// It returns nil if no more results exist.
41823func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
41824	if !vnglcr.hasNextLink() {
41825		return nil, nil
41826	}
41827	return autorest.Prepare((&http.Request{}).WithContext(ctx),
41828		autorest.AsJSON(),
41829		autorest.AsGet(),
41830		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
41831}
41832
41833// VirtualNetworkGatewayListConnectionsResultPage contains a page of
41834// VirtualNetworkGatewayConnectionListEntity values.
41835type VirtualNetworkGatewayListConnectionsResultPage struct {
41836	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
41837	vnglcr VirtualNetworkGatewayListConnectionsResult
41838}
41839
41840// NextWithContext advances to the next page of values.  If there was an error making
41841// the request the page does not advance and the error is returned.
41842func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
41843	if tracing.IsEnabled() {
41844		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
41845		defer func() {
41846			sc := -1
41847			if page.Response().Response.Response != nil {
41848				sc = page.Response().Response.Response.StatusCode
41849			}
41850			tracing.EndSpan(ctx, sc, err)
41851		}()
41852	}
41853	for {
41854		next, err := page.fn(ctx, page.vnglcr)
41855		if err != nil {
41856			return err
41857		}
41858		page.vnglcr = next
41859		if !next.hasNextLink() || !next.IsEmpty() {
41860			break
41861		}
41862	}
41863	return nil
41864}
41865
41866// Next advances to the next page of values.  If there was an error making
41867// the request the page does not advance and the error is returned.
41868// Deprecated: Use NextWithContext() instead.
41869func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
41870	return page.NextWithContext(context.Background())
41871}
41872
41873// NotDone returns true if the page enumeration should be started or is not yet complete.
41874func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
41875	return !page.vnglcr.IsEmpty()
41876}
41877
41878// Response returns the raw server response from the last page request.
41879func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
41880	return page.vnglcr
41881}
41882
41883// Values returns the slice of values for the current page or nil if there are no values.
41884func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
41885	if page.vnglcr.IsEmpty() {
41886		return nil
41887	}
41888	return *page.vnglcr.Value
41889}
41890
41891// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
41892func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
41893	return VirtualNetworkGatewayListConnectionsResultPage{
41894		fn:     getNextPage,
41895		vnglcr: cur,
41896	}
41897}
41898
41899// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
41900type VirtualNetworkGatewayListResult struct {
41901	autorest.Response `json:"-"`
41902	// Value - A list of VirtualNetworkGateway resources that exists in a resource group.
41903	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
41904	// NextLink - READ-ONLY; The URL to get the next set of results.
41905	NextLink *string `json:"nextLink,omitempty"`
41906}
41907
41908// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
41909func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
41910	objectMap := make(map[string]interface{})
41911	if vnglr.Value != nil {
41912		objectMap["value"] = vnglr.Value
41913	}
41914	return json.Marshal(objectMap)
41915}
41916
41917// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
41918// values.
41919type VirtualNetworkGatewayListResultIterator struct {
41920	i    int
41921	page VirtualNetworkGatewayListResultPage
41922}
41923
41924// NextWithContext advances to the next value.  If there was an error making
41925// the request the iterator does not advance and the error is returned.
41926func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
41927	if tracing.IsEnabled() {
41928		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
41929		defer func() {
41930			sc := -1
41931			if iter.Response().Response.Response != nil {
41932				sc = iter.Response().Response.Response.StatusCode
41933			}
41934			tracing.EndSpan(ctx, sc, err)
41935		}()
41936	}
41937	iter.i++
41938	if iter.i < len(iter.page.Values()) {
41939		return nil
41940	}
41941	err = iter.page.NextWithContext(ctx)
41942	if err != nil {
41943		iter.i--
41944		return err
41945	}
41946	iter.i = 0
41947	return nil
41948}
41949
41950// Next advances to the next value.  If there was an error making
41951// the request the iterator does not advance and the error is returned.
41952// Deprecated: Use NextWithContext() instead.
41953func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
41954	return iter.NextWithContext(context.Background())
41955}
41956
41957// NotDone returns true if the enumeration should be started or is not yet complete.
41958func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
41959	return iter.page.NotDone() && iter.i < len(iter.page.Values())
41960}
41961
41962// Response returns the raw server response from the last page request.
41963func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
41964	return iter.page.Response()
41965}
41966
41967// Value returns the current value or a zero-initialized value if the
41968// iterator has advanced beyond the end of the collection.
41969func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
41970	if !iter.page.NotDone() {
41971		return VirtualNetworkGateway{}
41972	}
41973	return iter.page.Values()[iter.i]
41974}
41975
41976// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
41977func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
41978	return VirtualNetworkGatewayListResultIterator{page: page}
41979}
41980
41981// IsEmpty returns true if the ListResult contains no values.
41982func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
41983	return vnglr.Value == nil || len(*vnglr.Value) == 0
41984}
41985
41986// hasNextLink returns true if the NextLink is not empty.
41987func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
41988	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
41989}
41990
41991// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
41992// It returns nil if no more results exist.
41993func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
41994	if !vnglr.hasNextLink() {
41995		return nil, nil
41996	}
41997	return autorest.Prepare((&http.Request{}).WithContext(ctx),
41998		autorest.AsJSON(),
41999		autorest.AsGet(),
42000		autorest.WithBaseURL(to.String(vnglr.NextLink)))
42001}
42002
42003// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
42004type VirtualNetworkGatewayListResultPage struct {
42005	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
42006	vnglr VirtualNetworkGatewayListResult
42007}
42008
42009// NextWithContext advances to the next page of values.  If there was an error making
42010// the request the page does not advance and the error is returned.
42011func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
42012	if tracing.IsEnabled() {
42013		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
42014		defer func() {
42015			sc := -1
42016			if page.Response().Response.Response != nil {
42017				sc = page.Response().Response.Response.StatusCode
42018			}
42019			tracing.EndSpan(ctx, sc, err)
42020		}()
42021	}
42022	for {
42023		next, err := page.fn(ctx, page.vnglr)
42024		if err != nil {
42025			return err
42026		}
42027		page.vnglr = next
42028		if !next.hasNextLink() || !next.IsEmpty() {
42029			break
42030		}
42031	}
42032	return nil
42033}
42034
42035// Next advances to the next page of values.  If there was an error making
42036// the request the page does not advance and the error is returned.
42037// Deprecated: Use NextWithContext() instead.
42038func (page *VirtualNetworkGatewayListResultPage) Next() error {
42039	return page.NextWithContext(context.Background())
42040}
42041
42042// NotDone returns true if the page enumeration should be started or is not yet complete.
42043func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
42044	return !page.vnglr.IsEmpty()
42045}
42046
42047// Response returns the raw server response from the last page request.
42048func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
42049	return page.vnglr
42050}
42051
42052// Values returns the slice of values for the current page or nil if there are no values.
42053func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
42054	if page.vnglr.IsEmpty() {
42055		return nil
42056	}
42057	return *page.vnglr.Value
42058}
42059
42060// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
42061func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
42062	return VirtualNetworkGatewayListResultPage{
42063		fn:    getNextPage,
42064		vnglr: cur,
42065	}
42066}
42067
42068// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties.
42069type VirtualNetworkGatewayPropertiesFormat struct {
42070	// IPConfigurations - IP configurations for virtual network gateway.
42071	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
42072	// GatewayType - The type of this virtual network gateway. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute', 'VirtualNetworkGatewayTypeLocalGateway'
42073	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
42074	// VpnType - The type of this virtual network gateway. Possible values include: 'VpnTypePolicyBased', 'VpnTypeRouteBased'
42075	VpnType VpnType `json:"vpnType,omitempty"`
42076	// VpnGatewayGeneration - The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. Possible values include: 'VpnGatewayGenerationNone', 'VpnGatewayGenerationGeneration1', 'VpnGatewayGenerationGeneration2'
42077	VpnGatewayGeneration VpnGatewayGeneration `json:"vpnGatewayGeneration,omitempty"`
42078	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
42079	EnableBgp *bool `json:"enableBgp,omitempty"`
42080	// EnablePrivateIPAddress - Whether private IP needs to be enabled on this gateway for connections or not.
42081	EnablePrivateIPAddress *bool `json:"enablePrivateIpAddress,omitempty"`
42082	// ActiveActive - ActiveActive flag.
42083	ActiveActive *bool `json:"activeActive,omitempty"`
42084	// 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.
42085	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
42086	// Sku - The reference to the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
42087	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
42088	// VpnClientConfiguration - The reference to the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
42089	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
42090	// BgpSettings - Virtual network gateway's BGP speaker settings.
42091	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
42092	// 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.
42093	CustomRoutes *AddressSpace `json:"customRoutes,omitempty"`
42094	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway resource.
42095	ResourceGUID *string `json:"resourceGuid,omitempty"`
42096	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
42097	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
42098	// EnableDNSForwarding - Whether dns forwarding is enabled or not.
42099	EnableDNSForwarding *bool `json:"enableDnsForwarding,omitempty"`
42100	// InboundDNSForwardingEndpoint - READ-ONLY; The IP address allocated by the gateway to which dns requests can be sent.
42101	InboundDNSForwardingEndpoint *string `json:"inboundDnsForwardingEndpoint,omitempty"`
42102	// VNetExtendedLocationResourceID - Customer vnet resource id. VirtualNetworkGateway of type local gateway is associated with the customer vnet.
42103	VNetExtendedLocationResourceID *string `json:"vNetExtendedLocationResourceId,omitempty"`
42104}
42105
42106// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
42107func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
42108	objectMap := make(map[string]interface{})
42109	if vngpf.IPConfigurations != nil {
42110		objectMap["ipConfigurations"] = vngpf.IPConfigurations
42111	}
42112	if vngpf.GatewayType != "" {
42113		objectMap["gatewayType"] = vngpf.GatewayType
42114	}
42115	if vngpf.VpnType != "" {
42116		objectMap["vpnType"] = vngpf.VpnType
42117	}
42118	if vngpf.VpnGatewayGeneration != "" {
42119		objectMap["vpnGatewayGeneration"] = vngpf.VpnGatewayGeneration
42120	}
42121	if vngpf.EnableBgp != nil {
42122		objectMap["enableBgp"] = vngpf.EnableBgp
42123	}
42124	if vngpf.EnablePrivateIPAddress != nil {
42125		objectMap["enablePrivateIpAddress"] = vngpf.EnablePrivateIPAddress
42126	}
42127	if vngpf.ActiveActive != nil {
42128		objectMap["activeActive"] = vngpf.ActiveActive
42129	}
42130	if vngpf.GatewayDefaultSite != nil {
42131		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
42132	}
42133	if vngpf.Sku != nil {
42134		objectMap["sku"] = vngpf.Sku
42135	}
42136	if vngpf.VpnClientConfiguration != nil {
42137		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
42138	}
42139	if vngpf.BgpSettings != nil {
42140		objectMap["bgpSettings"] = vngpf.BgpSettings
42141	}
42142	if vngpf.CustomRoutes != nil {
42143		objectMap["customRoutes"] = vngpf.CustomRoutes
42144	}
42145	if vngpf.EnableDNSForwarding != nil {
42146		objectMap["enableDnsForwarding"] = vngpf.EnableDNSForwarding
42147	}
42148	if vngpf.VNetExtendedLocationResourceID != nil {
42149		objectMap["vNetExtendedLocationResourceId"] = vngpf.VNetExtendedLocationResourceID
42150	}
42151	return json.Marshal(objectMap)
42152}
42153
42154// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
42155// long-running operation.
42156type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
42157	azure.FutureAPI
42158	// Result returns the result of the asynchronous operation.
42159	// If the operation has not completed it will return an error.
42160	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
42161}
42162
42163// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42164func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
42165	var azFuture azure.Future
42166	if err := json.Unmarshal(body, &azFuture); err != nil {
42167		return err
42168	}
42169	future.FutureAPI = &azFuture
42170	future.Result = future.result
42171	return nil
42172}
42173
42174// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result.
42175func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
42176	var done bool
42177	done, err = future.DoneWithContext(context.Background(), client)
42178	if err != nil {
42179		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
42180		return
42181	}
42182	if !done {
42183		vng.Response.Response = future.Response()
42184		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
42185		return
42186	}
42187	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
42188	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
42189		vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
42190		if err != nil {
42191			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
42192		}
42193	}
42194	return
42195}
42196
42197// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
42198// long-running operation.
42199type VirtualNetworkGatewaysDeleteFuture struct {
42200	azure.FutureAPI
42201	// Result returns the result of the asynchronous operation.
42202	// If the operation has not completed it will return an error.
42203	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
42204}
42205
42206// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42207func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
42208	var azFuture azure.Future
42209	if err := json.Unmarshal(body, &azFuture); err != nil {
42210		return err
42211	}
42212	future.FutureAPI = &azFuture
42213	future.Result = future.result
42214	return nil
42215}
42216
42217// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result.
42218func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
42219	var done bool
42220	done, err = future.DoneWithContext(context.Background(), client)
42221	if err != nil {
42222		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
42223		return
42224	}
42225	if !done {
42226		ar.Response = future.Response()
42227		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
42228		return
42229	}
42230	ar.Response = future.Response()
42231	return
42232}
42233
42234// VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture an abstraction for monitoring
42235// and retrieving the results of a long-running operation.
42236type VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture struct {
42237	azure.FutureAPI
42238	// Result returns the result of the asynchronous operation.
42239	// If the operation has not completed it will return an error.
42240	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
42241}
42242
42243// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42244func (future *VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture) UnmarshalJSON(body []byte) error {
42245	var azFuture azure.Future
42246	if err := json.Unmarshal(body, &azFuture); err != nil {
42247		return err
42248	}
42249	future.FutureAPI = &azFuture
42250	future.Result = future.result
42251	return nil
42252}
42253
42254// result is the default implementation for VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture.Result.
42255func (future *VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
42256	var done bool
42257	done, err = future.DoneWithContext(context.Background(), client)
42258	if err != nil {
42259		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture", "Result", future.Response(), "Polling failure")
42260		return
42261	}
42262	if !done {
42263		ar.Response = future.Response()
42264		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture")
42265		return
42266	}
42267	ar.Response = future.Response()
42268	return
42269}
42270
42271// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
42272// results of a long-running operation.
42273type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
42274	azure.FutureAPI
42275	// Result returns the result of the asynchronous operation.
42276	// If the operation has not completed it will return an error.
42277	Result func(VirtualNetworkGatewaysClient) (String, error)
42278}
42279
42280// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42281func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error {
42282	var azFuture azure.Future
42283	if err := json.Unmarshal(body, &azFuture); err != nil {
42284		return err
42285	}
42286	future.FutureAPI = &azFuture
42287	future.Result = future.result
42288	return nil
42289}
42290
42291// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result.
42292func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
42293	var done bool
42294	done, err = future.DoneWithContext(context.Background(), client)
42295	if err != nil {
42296		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
42297		return
42298	}
42299	if !done {
42300		s.Response.Response = future.Response()
42301		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
42302		return
42303	}
42304	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
42305	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
42306		s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
42307		if err != nil {
42308			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
42309		}
42310	}
42311	return
42312}
42313
42314// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
42315// of a long-running operation.
42316type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
42317	azure.FutureAPI
42318	// Result returns the result of the asynchronous operation.
42319	// If the operation has not completed it will return an error.
42320	Result func(VirtualNetworkGatewaysClient) (String, error)
42321}
42322
42323// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42324func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
42325	var azFuture azure.Future
42326	if err := json.Unmarshal(body, &azFuture); err != nil {
42327		return err
42328	}
42329	future.FutureAPI = &azFuture
42330	future.Result = future.result
42331	return nil
42332}
42333
42334// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result.
42335func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
42336	var done bool
42337	done, err = future.DoneWithContext(context.Background(), client)
42338	if err != nil {
42339		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
42340		return
42341	}
42342	if !done {
42343		s.Response.Response = future.Response()
42344		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
42345		return
42346	}
42347	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
42348	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
42349		s, err = client.GenerateVpnProfileResponder(s.Response.Response)
42350		if err != nil {
42351			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
42352		}
42353	}
42354	return
42355}
42356
42357// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
42358// of a long-running operation.
42359type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
42360	azure.FutureAPI
42361	// Result returns the result of the asynchronous operation.
42362	// If the operation has not completed it will return an error.
42363	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
42364}
42365
42366// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42367func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
42368	var azFuture azure.Future
42369	if err := json.Unmarshal(body, &azFuture); err != nil {
42370		return err
42371	}
42372	future.FutureAPI = &azFuture
42373	future.Result = future.result
42374	return nil
42375}
42376
42377// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result.
42378func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
42379	var done bool
42380	done, err = future.DoneWithContext(context.Background(), client)
42381	if err != nil {
42382		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
42383		return
42384	}
42385	if !done {
42386		grlr.Response.Response = future.Response()
42387		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
42388		return
42389	}
42390	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
42391	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
42392		grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
42393		if err != nil {
42394			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
42395		}
42396	}
42397	return
42398}
42399
42400// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
42401// a long-running operation.
42402type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
42403	azure.FutureAPI
42404	// Result returns the result of the asynchronous operation.
42405	// If the operation has not completed it will return an error.
42406	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
42407}
42408
42409// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42410func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error {
42411	var azFuture azure.Future
42412	if err := json.Unmarshal(body, &azFuture); err != nil {
42413		return err
42414	}
42415	future.FutureAPI = &azFuture
42416	future.Result = future.result
42417	return nil
42418}
42419
42420// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result.
42421func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
42422	var done bool
42423	done, err = future.DoneWithContext(context.Background(), client)
42424	if err != nil {
42425		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
42426		return
42427	}
42428	if !done {
42429		bpslr.Response.Response = future.Response()
42430		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
42431		return
42432	}
42433	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
42434	if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
42435		bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
42436		if err != nil {
42437			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
42438		}
42439	}
42440	return
42441}
42442
42443// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
42444// a long-running operation.
42445type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
42446	azure.FutureAPI
42447	// Result returns the result of the asynchronous operation.
42448	// If the operation has not completed it will return an error.
42449	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
42450}
42451
42452// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42453func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
42454	var azFuture azure.Future
42455	if err := json.Unmarshal(body, &azFuture); err != nil {
42456		return err
42457	}
42458	future.FutureAPI = &azFuture
42459	future.Result = future.result
42460	return nil
42461}
42462
42463// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result.
42464func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
42465	var done bool
42466	done, err = future.DoneWithContext(context.Background(), client)
42467	if err != nil {
42468		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
42469		return
42470	}
42471	if !done {
42472		grlr.Response.Response = future.Response()
42473		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
42474		return
42475	}
42476	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
42477	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
42478		grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
42479		if err != nil {
42480			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
42481		}
42482	}
42483	return
42484}
42485
42486// VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture an abstraction for monitoring and retrieving
42487// the results of a long-running operation.
42488type VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture struct {
42489	azure.FutureAPI
42490	// Result returns the result of the asynchronous operation.
42491	// If the operation has not completed it will return an error.
42492	Result func(VirtualNetworkGatewaysClient) (VpnClientConnectionHealthDetailListResult, error)
42493}
42494
42495// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42496func (future *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture) UnmarshalJSON(body []byte) error {
42497	var azFuture azure.Future
42498	if err := json.Unmarshal(body, &azFuture); err != nil {
42499		return err
42500	}
42501	future.FutureAPI = &azFuture
42502	future.Result = future.result
42503	return nil
42504}
42505
42506// result is the default implementation for VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture.Result.
42507func (future *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture) result(client VirtualNetworkGatewaysClient) (vcchdlr VpnClientConnectionHealthDetailListResult, err error) {
42508	var done bool
42509	done, err = future.DoneWithContext(context.Background(), client)
42510	if err != nil {
42511		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", future.Response(), "Polling failure")
42512		return
42513	}
42514	if !done {
42515		vcchdlr.Response.Response = future.Response()
42516		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture")
42517		return
42518	}
42519	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
42520	if vcchdlr.Response.Response, err = future.GetResult(sender); err == nil && vcchdlr.Response.Response.StatusCode != http.StatusNoContent {
42521		vcchdlr, err = client.GetVpnclientConnectionHealthResponder(vcchdlr.Response.Response)
42522		if err != nil {
42523			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", vcchdlr.Response.Response, "Failure responding to request")
42524		}
42525	}
42526	return
42527}
42528
42529// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
42530// results of a long-running operation.
42531type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
42532	azure.FutureAPI
42533	// Result returns the result of the asynchronous operation.
42534	// If the operation has not completed it will return an error.
42535	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
42536}
42537
42538// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42539func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
42540	var azFuture azure.Future
42541	if err := json.Unmarshal(body, &azFuture); err != nil {
42542		return err
42543	}
42544	future.FutureAPI = &azFuture
42545	future.Result = future.result
42546	return nil
42547}
42548
42549// result is the default implementation for VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.Result.
42550func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
42551	var done bool
42552	done, err = future.DoneWithContext(context.Background(), client)
42553	if err != nil {
42554		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
42555		return
42556	}
42557	if !done {
42558		vcipp.Response.Response = future.Response()
42559		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
42560		return
42561	}
42562	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
42563	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
42564		vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
42565		if err != nil {
42566			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
42567		}
42568	}
42569	return
42570}
42571
42572// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
42573// results of a long-running operation.
42574type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
42575	azure.FutureAPI
42576	// Result returns the result of the asynchronous operation.
42577	// If the operation has not completed it will return an error.
42578	Result func(VirtualNetworkGatewaysClient) (String, error)
42579}
42580
42581// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42582func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error {
42583	var azFuture azure.Future
42584	if err := json.Unmarshal(body, &azFuture); err != nil {
42585		return err
42586	}
42587	future.FutureAPI = &azFuture
42588	future.Result = future.result
42589	return nil
42590}
42591
42592// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result.
42593func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
42594	var done bool
42595	done, err = future.DoneWithContext(context.Background(), client)
42596	if err != nil {
42597		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
42598		return
42599	}
42600	if !done {
42601		s.Response.Response = future.Response()
42602		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
42603		return
42604	}
42605	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
42606	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
42607		s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
42608		if err != nil {
42609			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
42610		}
42611	}
42612	return
42613}
42614
42615// VirtualNetworkGatewaySku virtualNetworkGatewaySku details.
42616type VirtualNetworkGatewaySku struct {
42617	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw4', 'VirtualNetworkGatewaySkuNameVpnGw5', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameVpnGw4AZ', 'VirtualNetworkGatewaySkuNameVpnGw5AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
42618	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
42619	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw4', 'VirtualNetworkGatewaySkuTierVpnGw5', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierVpnGw4AZ', 'VirtualNetworkGatewaySkuTierVpnGw5AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
42620	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
42621	// Capacity - READ-ONLY; The capacity.
42622	Capacity *int32 `json:"capacity,omitempty"`
42623}
42624
42625// MarshalJSON is the custom marshaler for VirtualNetworkGatewaySku.
42626func (vngs VirtualNetworkGatewaySku) MarshalJSON() ([]byte, error) {
42627	objectMap := make(map[string]interface{})
42628	if vngs.Name != "" {
42629		objectMap["name"] = vngs.Name
42630	}
42631	if vngs.Tier != "" {
42632		objectMap["tier"] = vngs.Tier
42633	}
42634	return json.Marshal(objectMap)
42635}
42636
42637// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
42638// long-running operation.
42639type VirtualNetworkGatewaysResetFuture struct {
42640	azure.FutureAPI
42641	// Result returns the result of the asynchronous operation.
42642	// If the operation has not completed it will return an error.
42643	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
42644}
42645
42646// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42647func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error {
42648	var azFuture azure.Future
42649	if err := json.Unmarshal(body, &azFuture); err != nil {
42650		return err
42651	}
42652	future.FutureAPI = &azFuture
42653	future.Result = future.result
42654	return nil
42655}
42656
42657// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result.
42658func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
42659	var done bool
42660	done, err = future.DoneWithContext(context.Background(), client)
42661	if err != nil {
42662		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
42663		return
42664	}
42665	if !done {
42666		vng.Response.Response = future.Response()
42667		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
42668		return
42669	}
42670	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
42671	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
42672		vng, err = client.ResetResponder(vng.Response.Response)
42673		if err != nil {
42674			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
42675		}
42676	}
42677	return
42678}
42679
42680// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
42681// results of a long-running operation.
42682type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
42683	azure.FutureAPI
42684	// Result returns the result of the asynchronous operation.
42685	// If the operation has not completed it will return an error.
42686	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
42687}
42688
42689// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42690func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) UnmarshalJSON(body []byte) error {
42691	var azFuture azure.Future
42692	if err := json.Unmarshal(body, &azFuture); err != nil {
42693		return err
42694	}
42695	future.FutureAPI = &azFuture
42696	future.Result = future.result
42697	return nil
42698}
42699
42700// result is the default implementation for VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.Result.
42701func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
42702	var done bool
42703	done, err = future.DoneWithContext(context.Background(), client)
42704	if err != nil {
42705		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture", "Result", future.Response(), "Polling failure")
42706		return
42707	}
42708	if !done {
42709		ar.Response = future.Response()
42710		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture")
42711		return
42712	}
42713	ar.Response = future.Response()
42714	return
42715}
42716
42717// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
42718// results of a long-running operation.
42719type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
42720	azure.FutureAPI
42721	// Result returns the result of the asynchronous operation.
42722	// If the operation has not completed it will return an error.
42723	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
42724}
42725
42726// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42727func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
42728	var azFuture azure.Future
42729	if err := json.Unmarshal(body, &azFuture); err != nil {
42730		return err
42731	}
42732	future.FutureAPI = &azFuture
42733	future.Result = future.result
42734	return nil
42735}
42736
42737// result is the default implementation for VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.Result.
42738func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
42739	var done bool
42740	done, err = future.DoneWithContext(context.Background(), client)
42741	if err != nil {
42742		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
42743		return
42744	}
42745	if !done {
42746		vcipp.Response.Response = future.Response()
42747		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
42748		return
42749	}
42750	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
42751	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
42752		vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
42753		if err != nil {
42754			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
42755		}
42756	}
42757	return
42758}
42759
42760// VirtualNetworkGatewaysStartPacketCaptureFuture an abstraction for monitoring and retrieving the results
42761// of a long-running operation.
42762type VirtualNetworkGatewaysStartPacketCaptureFuture struct {
42763	azure.FutureAPI
42764	// Result returns the result of the asynchronous operation.
42765	// If the operation has not completed it will return an error.
42766	Result func(VirtualNetworkGatewaysClient) (String, error)
42767}
42768
42769// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42770func (future *VirtualNetworkGatewaysStartPacketCaptureFuture) UnmarshalJSON(body []byte) error {
42771	var azFuture azure.Future
42772	if err := json.Unmarshal(body, &azFuture); err != nil {
42773		return err
42774	}
42775	future.FutureAPI = &azFuture
42776	future.Result = future.result
42777	return nil
42778}
42779
42780// result is the default implementation for VirtualNetworkGatewaysStartPacketCaptureFuture.Result.
42781func (future *VirtualNetworkGatewaysStartPacketCaptureFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
42782	var done bool
42783	done, err = future.DoneWithContext(context.Background(), client)
42784	if err != nil {
42785		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStartPacketCaptureFuture", "Result", future.Response(), "Polling failure")
42786		return
42787	}
42788	if !done {
42789		s.Response.Response = future.Response()
42790		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysStartPacketCaptureFuture")
42791		return
42792	}
42793	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
42794	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
42795		s, err = client.StartPacketCaptureResponder(s.Response.Response)
42796		if err != nil {
42797			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
42798		}
42799	}
42800	return
42801}
42802
42803// VirtualNetworkGatewaysStopPacketCaptureFuture an abstraction for monitoring and retrieving the results
42804// of a long-running operation.
42805type VirtualNetworkGatewaysStopPacketCaptureFuture struct {
42806	azure.FutureAPI
42807	// Result returns the result of the asynchronous operation.
42808	// If the operation has not completed it will return an error.
42809	Result func(VirtualNetworkGatewaysClient) (String, error)
42810}
42811
42812// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42813func (future *VirtualNetworkGatewaysStopPacketCaptureFuture) UnmarshalJSON(body []byte) error {
42814	var azFuture azure.Future
42815	if err := json.Unmarshal(body, &azFuture); err != nil {
42816		return err
42817	}
42818	future.FutureAPI = &azFuture
42819	future.Result = future.result
42820	return nil
42821}
42822
42823// result is the default implementation for VirtualNetworkGatewaysStopPacketCaptureFuture.Result.
42824func (future *VirtualNetworkGatewaysStopPacketCaptureFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
42825	var done bool
42826	done, err = future.DoneWithContext(context.Background(), client)
42827	if err != nil {
42828		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStopPacketCaptureFuture", "Result", future.Response(), "Polling failure")
42829		return
42830	}
42831	if !done {
42832		s.Response.Response = future.Response()
42833		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysStopPacketCaptureFuture")
42834		return
42835	}
42836	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
42837	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
42838		s, err = client.StopPacketCaptureResponder(s.Response.Response)
42839		if err != nil {
42840			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
42841		}
42842	}
42843	return
42844}
42845
42846// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
42847// long-running operation.
42848type VirtualNetworkGatewaysUpdateTagsFuture struct {
42849	azure.FutureAPI
42850	// Result returns the result of the asynchronous operation.
42851	// If the operation has not completed it will return an error.
42852	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
42853}
42854
42855// UnmarshalJSON is the custom unmarshaller for CreateFuture.
42856func (future *VirtualNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
42857	var azFuture azure.Future
42858	if err := json.Unmarshal(body, &azFuture); err != nil {
42859		return err
42860	}
42861	future.FutureAPI = &azFuture
42862	future.Result = future.result
42863	return nil
42864}
42865
42866// result is the default implementation for VirtualNetworkGatewaysUpdateTagsFuture.Result.
42867func (future *VirtualNetworkGatewaysUpdateTagsFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
42868	var done bool
42869	done, err = future.DoneWithContext(context.Background(), client)
42870	if err != nil {
42871		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
42872		return
42873	}
42874	if !done {
42875		vng.Response.Response = future.Response()
42876		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
42877		return
42878	}
42879	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
42880	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
42881		vng, err = client.UpdateTagsResponder(vng.Response.Response)
42882		if err != nil {
42883			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
42884		}
42885	}
42886	return
42887}
42888
42889// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
42890type VirtualNetworkListResult struct {
42891	autorest.Response `json:"-"`
42892	// Value - A list of VirtualNetwork resources in a resource group.
42893	Value *[]VirtualNetwork `json:"value,omitempty"`
42894	// NextLink - The URL to get the next set of results.
42895	NextLink *string `json:"nextLink,omitempty"`
42896}
42897
42898// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
42899type VirtualNetworkListResultIterator struct {
42900	i    int
42901	page VirtualNetworkListResultPage
42902}
42903
42904// NextWithContext advances to the next value.  If there was an error making
42905// the request the iterator does not advance and the error is returned.
42906func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
42907	if tracing.IsEnabled() {
42908		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
42909		defer func() {
42910			sc := -1
42911			if iter.Response().Response.Response != nil {
42912				sc = iter.Response().Response.Response.StatusCode
42913			}
42914			tracing.EndSpan(ctx, sc, err)
42915		}()
42916	}
42917	iter.i++
42918	if iter.i < len(iter.page.Values()) {
42919		return nil
42920	}
42921	err = iter.page.NextWithContext(ctx)
42922	if err != nil {
42923		iter.i--
42924		return err
42925	}
42926	iter.i = 0
42927	return nil
42928}
42929
42930// Next advances to the next value.  If there was an error making
42931// the request the iterator does not advance and the error is returned.
42932// Deprecated: Use NextWithContext() instead.
42933func (iter *VirtualNetworkListResultIterator) Next() error {
42934	return iter.NextWithContext(context.Background())
42935}
42936
42937// NotDone returns true if the enumeration should be started or is not yet complete.
42938func (iter VirtualNetworkListResultIterator) NotDone() bool {
42939	return iter.page.NotDone() && iter.i < len(iter.page.Values())
42940}
42941
42942// Response returns the raw server response from the last page request.
42943func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
42944	return iter.page.Response()
42945}
42946
42947// Value returns the current value or a zero-initialized value if the
42948// iterator has advanced beyond the end of the collection.
42949func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
42950	if !iter.page.NotDone() {
42951		return VirtualNetwork{}
42952	}
42953	return iter.page.Values()[iter.i]
42954}
42955
42956// Creates a new instance of the VirtualNetworkListResultIterator type.
42957func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
42958	return VirtualNetworkListResultIterator{page: page}
42959}
42960
42961// IsEmpty returns true if the ListResult contains no values.
42962func (vnlr VirtualNetworkListResult) IsEmpty() bool {
42963	return vnlr.Value == nil || len(*vnlr.Value) == 0
42964}
42965
42966// hasNextLink returns true if the NextLink is not empty.
42967func (vnlr VirtualNetworkListResult) hasNextLink() bool {
42968	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
42969}
42970
42971// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
42972// It returns nil if no more results exist.
42973func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
42974	if !vnlr.hasNextLink() {
42975		return nil, nil
42976	}
42977	return autorest.Prepare((&http.Request{}).WithContext(ctx),
42978		autorest.AsJSON(),
42979		autorest.AsGet(),
42980		autorest.WithBaseURL(to.String(vnlr.NextLink)))
42981}
42982
42983// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
42984type VirtualNetworkListResultPage struct {
42985	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
42986	vnlr VirtualNetworkListResult
42987}
42988
42989// NextWithContext advances to the next page of values.  If there was an error making
42990// the request the page does not advance and the error is returned.
42991func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
42992	if tracing.IsEnabled() {
42993		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
42994		defer func() {
42995			sc := -1
42996			if page.Response().Response.Response != nil {
42997				sc = page.Response().Response.Response.StatusCode
42998			}
42999			tracing.EndSpan(ctx, sc, err)
43000		}()
43001	}
43002	for {
43003		next, err := page.fn(ctx, page.vnlr)
43004		if err != nil {
43005			return err
43006		}
43007		page.vnlr = next
43008		if !next.hasNextLink() || !next.IsEmpty() {
43009			break
43010		}
43011	}
43012	return nil
43013}
43014
43015// Next advances to the next page of values.  If there was an error making
43016// the request the page does not advance and the error is returned.
43017// Deprecated: Use NextWithContext() instead.
43018func (page *VirtualNetworkListResultPage) Next() error {
43019	return page.NextWithContext(context.Background())
43020}
43021
43022// NotDone returns true if the page enumeration should be started or is not yet complete.
43023func (page VirtualNetworkListResultPage) NotDone() bool {
43024	return !page.vnlr.IsEmpty()
43025}
43026
43027// Response returns the raw server response from the last page request.
43028func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
43029	return page.vnlr
43030}
43031
43032// Values returns the slice of values for the current page or nil if there are no values.
43033func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
43034	if page.vnlr.IsEmpty() {
43035		return nil
43036	}
43037	return *page.vnlr.Value
43038}
43039
43040// Creates a new instance of the VirtualNetworkListResultPage type.
43041func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
43042	return VirtualNetworkListResultPage{
43043		fn:   getNextPage,
43044		vnlr: cur,
43045	}
43046}
43047
43048// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
43049type VirtualNetworkListUsageResult struct {
43050	autorest.Response `json:"-"`
43051	// Value - READ-ONLY; VirtualNetwork usage stats.
43052	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
43053	// NextLink - The URL to get the next set of results.
43054	NextLink *string `json:"nextLink,omitempty"`
43055}
43056
43057// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
43058func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
43059	objectMap := make(map[string]interface{})
43060	if vnlur.NextLink != nil {
43061		objectMap["nextLink"] = vnlur.NextLink
43062	}
43063	return json.Marshal(objectMap)
43064}
43065
43066// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
43067// values.
43068type VirtualNetworkListUsageResultIterator struct {
43069	i    int
43070	page VirtualNetworkListUsageResultPage
43071}
43072
43073// NextWithContext advances to the next value.  If there was an error making
43074// the request the iterator does not advance and the error is returned.
43075func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
43076	if tracing.IsEnabled() {
43077		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
43078		defer func() {
43079			sc := -1
43080			if iter.Response().Response.Response != nil {
43081				sc = iter.Response().Response.Response.StatusCode
43082			}
43083			tracing.EndSpan(ctx, sc, err)
43084		}()
43085	}
43086	iter.i++
43087	if iter.i < len(iter.page.Values()) {
43088		return nil
43089	}
43090	err = iter.page.NextWithContext(ctx)
43091	if err != nil {
43092		iter.i--
43093		return err
43094	}
43095	iter.i = 0
43096	return nil
43097}
43098
43099// Next advances to the next value.  If there was an error making
43100// the request the iterator does not advance and the error is returned.
43101// Deprecated: Use NextWithContext() instead.
43102func (iter *VirtualNetworkListUsageResultIterator) Next() error {
43103	return iter.NextWithContext(context.Background())
43104}
43105
43106// NotDone returns true if the enumeration should be started or is not yet complete.
43107func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
43108	return iter.page.NotDone() && iter.i < len(iter.page.Values())
43109}
43110
43111// Response returns the raw server response from the last page request.
43112func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
43113	return iter.page.Response()
43114}
43115
43116// Value returns the current value or a zero-initialized value if the
43117// iterator has advanced beyond the end of the collection.
43118func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
43119	if !iter.page.NotDone() {
43120		return VirtualNetworkUsage{}
43121	}
43122	return iter.page.Values()[iter.i]
43123}
43124
43125// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
43126func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
43127	return VirtualNetworkListUsageResultIterator{page: page}
43128}
43129
43130// IsEmpty returns true if the ListResult contains no values.
43131func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
43132	return vnlur.Value == nil || len(*vnlur.Value) == 0
43133}
43134
43135// hasNextLink returns true if the NextLink is not empty.
43136func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
43137	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
43138}
43139
43140// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
43141// It returns nil if no more results exist.
43142func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
43143	if !vnlur.hasNextLink() {
43144		return nil, nil
43145	}
43146	return autorest.Prepare((&http.Request{}).WithContext(ctx),
43147		autorest.AsJSON(),
43148		autorest.AsGet(),
43149		autorest.WithBaseURL(to.String(vnlur.NextLink)))
43150}
43151
43152// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
43153type VirtualNetworkListUsageResultPage struct {
43154	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
43155	vnlur VirtualNetworkListUsageResult
43156}
43157
43158// NextWithContext advances to the next page of values.  If there was an error making
43159// the request the page does not advance and the error is returned.
43160func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
43161	if tracing.IsEnabled() {
43162		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
43163		defer func() {
43164			sc := -1
43165			if page.Response().Response.Response != nil {
43166				sc = page.Response().Response.Response.StatusCode
43167			}
43168			tracing.EndSpan(ctx, sc, err)
43169		}()
43170	}
43171	for {
43172		next, err := page.fn(ctx, page.vnlur)
43173		if err != nil {
43174			return err
43175		}
43176		page.vnlur = next
43177		if !next.hasNextLink() || !next.IsEmpty() {
43178			break
43179		}
43180	}
43181	return nil
43182}
43183
43184// Next advances to the next page of values.  If there was an error making
43185// the request the page does not advance and the error is returned.
43186// Deprecated: Use NextWithContext() instead.
43187func (page *VirtualNetworkListUsageResultPage) Next() error {
43188	return page.NextWithContext(context.Background())
43189}
43190
43191// NotDone returns true if the page enumeration should be started or is not yet complete.
43192func (page VirtualNetworkListUsageResultPage) NotDone() bool {
43193	return !page.vnlur.IsEmpty()
43194}
43195
43196// Response returns the raw server response from the last page request.
43197func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
43198	return page.vnlur
43199}
43200
43201// Values returns the slice of values for the current page or nil if there are no values.
43202func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
43203	if page.vnlur.IsEmpty() {
43204		return nil
43205	}
43206	return *page.vnlur.Value
43207}
43208
43209// Creates a new instance of the VirtualNetworkListUsageResultPage type.
43210func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
43211	return VirtualNetworkListUsageResultPage{
43212		fn:    getNextPage,
43213		vnlur: cur,
43214	}
43215}
43216
43217// VirtualNetworkPeering peerings in a virtual network resource.
43218type VirtualNetworkPeering struct {
43219	autorest.Response `json:"-"`
43220	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
43221	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
43222	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
43223	Name *string `json:"name,omitempty"`
43224	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
43225	Etag *string `json:"etag,omitempty"`
43226	// Type - Resource type.
43227	Type *string `json:"type,omitempty"`
43228	// ID - Resource ID.
43229	ID *string `json:"id,omitempty"`
43230}
43231
43232// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
43233func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
43234	objectMap := make(map[string]interface{})
43235	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
43236		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
43237	}
43238	if vnp.Name != nil {
43239		objectMap["name"] = vnp.Name
43240	}
43241	if vnp.Type != nil {
43242		objectMap["type"] = vnp.Type
43243	}
43244	if vnp.ID != nil {
43245		objectMap["id"] = vnp.ID
43246	}
43247	return json.Marshal(objectMap)
43248}
43249
43250// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
43251func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
43252	var m map[string]*json.RawMessage
43253	err := json.Unmarshal(body, &m)
43254	if err != nil {
43255		return err
43256	}
43257	for k, v := range m {
43258		switch k {
43259		case "properties":
43260			if v != nil {
43261				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
43262				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
43263				if err != nil {
43264					return err
43265				}
43266				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
43267			}
43268		case "name":
43269			if v != nil {
43270				var name string
43271				err = json.Unmarshal(*v, &name)
43272				if err != nil {
43273					return err
43274				}
43275				vnp.Name = &name
43276			}
43277		case "etag":
43278			if v != nil {
43279				var etag string
43280				err = json.Unmarshal(*v, &etag)
43281				if err != nil {
43282					return err
43283				}
43284				vnp.Etag = &etag
43285			}
43286		case "type":
43287			if v != nil {
43288				var typeVar string
43289				err = json.Unmarshal(*v, &typeVar)
43290				if err != nil {
43291					return err
43292				}
43293				vnp.Type = &typeVar
43294			}
43295		case "id":
43296			if v != nil {
43297				var ID string
43298				err = json.Unmarshal(*v, &ID)
43299				if err != nil {
43300					return err
43301				}
43302				vnp.ID = &ID
43303			}
43304		}
43305	}
43306
43307	return nil
43308}
43309
43310// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
43311// belong to a virtual network.
43312type VirtualNetworkPeeringListResult struct {
43313	autorest.Response `json:"-"`
43314	// Value - The peerings in a virtual network.
43315	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
43316	// NextLink - The URL to get the next set of results.
43317	NextLink *string `json:"nextLink,omitempty"`
43318}
43319
43320// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
43321// values.
43322type VirtualNetworkPeeringListResultIterator struct {
43323	i    int
43324	page VirtualNetworkPeeringListResultPage
43325}
43326
43327// NextWithContext advances to the next value.  If there was an error making
43328// the request the iterator does not advance and the error is returned.
43329func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
43330	if tracing.IsEnabled() {
43331		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
43332		defer func() {
43333			sc := -1
43334			if iter.Response().Response.Response != nil {
43335				sc = iter.Response().Response.Response.StatusCode
43336			}
43337			tracing.EndSpan(ctx, sc, err)
43338		}()
43339	}
43340	iter.i++
43341	if iter.i < len(iter.page.Values()) {
43342		return nil
43343	}
43344	err = iter.page.NextWithContext(ctx)
43345	if err != nil {
43346		iter.i--
43347		return err
43348	}
43349	iter.i = 0
43350	return nil
43351}
43352
43353// Next advances to the next value.  If there was an error making
43354// the request the iterator does not advance and the error is returned.
43355// Deprecated: Use NextWithContext() instead.
43356func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
43357	return iter.NextWithContext(context.Background())
43358}
43359
43360// NotDone returns true if the enumeration should be started or is not yet complete.
43361func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
43362	return iter.page.NotDone() && iter.i < len(iter.page.Values())
43363}
43364
43365// Response returns the raw server response from the last page request.
43366func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
43367	return iter.page.Response()
43368}
43369
43370// Value returns the current value or a zero-initialized value if the
43371// iterator has advanced beyond the end of the collection.
43372func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
43373	if !iter.page.NotDone() {
43374		return VirtualNetworkPeering{}
43375	}
43376	return iter.page.Values()[iter.i]
43377}
43378
43379// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
43380func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
43381	return VirtualNetworkPeeringListResultIterator{page: page}
43382}
43383
43384// IsEmpty returns true if the ListResult contains no values.
43385func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
43386	return vnplr.Value == nil || len(*vnplr.Value) == 0
43387}
43388
43389// hasNextLink returns true if the NextLink is not empty.
43390func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
43391	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
43392}
43393
43394// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
43395// It returns nil if no more results exist.
43396func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
43397	if !vnplr.hasNextLink() {
43398		return nil, nil
43399	}
43400	return autorest.Prepare((&http.Request{}).WithContext(ctx),
43401		autorest.AsJSON(),
43402		autorest.AsGet(),
43403		autorest.WithBaseURL(to.String(vnplr.NextLink)))
43404}
43405
43406// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
43407type VirtualNetworkPeeringListResultPage struct {
43408	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
43409	vnplr VirtualNetworkPeeringListResult
43410}
43411
43412// NextWithContext advances to the next page of values.  If there was an error making
43413// the request the page does not advance and the error is returned.
43414func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
43415	if tracing.IsEnabled() {
43416		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
43417		defer func() {
43418			sc := -1
43419			if page.Response().Response.Response != nil {
43420				sc = page.Response().Response.Response.StatusCode
43421			}
43422			tracing.EndSpan(ctx, sc, err)
43423		}()
43424	}
43425	for {
43426		next, err := page.fn(ctx, page.vnplr)
43427		if err != nil {
43428			return err
43429		}
43430		page.vnplr = next
43431		if !next.hasNextLink() || !next.IsEmpty() {
43432			break
43433		}
43434	}
43435	return nil
43436}
43437
43438// Next advances to the next page of values.  If there was an error making
43439// the request the page does not advance and the error is returned.
43440// Deprecated: Use NextWithContext() instead.
43441func (page *VirtualNetworkPeeringListResultPage) Next() error {
43442	return page.NextWithContext(context.Background())
43443}
43444
43445// NotDone returns true if the page enumeration should be started or is not yet complete.
43446func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
43447	return !page.vnplr.IsEmpty()
43448}
43449
43450// Response returns the raw server response from the last page request.
43451func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
43452	return page.vnplr
43453}
43454
43455// Values returns the slice of values for the current page or nil if there are no values.
43456func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
43457	if page.vnplr.IsEmpty() {
43458		return nil
43459	}
43460	return *page.vnplr.Value
43461}
43462
43463// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
43464func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
43465	return VirtualNetworkPeeringListResultPage{
43466		fn:    getNextPage,
43467		vnplr: cur,
43468	}
43469}
43470
43471// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
43472type VirtualNetworkPeeringPropertiesFormat struct {
43473	// AllowVirtualNetworkAccess - Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
43474	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
43475	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
43476	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
43477	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
43478	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
43479	// 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.
43480	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
43481	// 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).
43482	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
43483	// RemoteAddressSpace - The reference to the remote virtual network address space.
43484	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
43485	// RemoteBgpCommunities - The reference to the remote virtual network's Bgp Communities.
43486	RemoteBgpCommunities *VirtualNetworkBgpCommunities `json:"remoteBgpCommunities,omitempty"`
43487	// PeeringState - The status of the virtual network peering. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
43488	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
43489	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network peering resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
43490	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
43491	// DoNotVerifyRemoteGateways - If we need to verify the provisioning state of the remote gateway.
43492	DoNotVerifyRemoteGateways *bool `json:"doNotVerifyRemoteGateways,omitempty"`
43493	// ResourceGUID - READ-ONLY; The resourceGuid property of the Virtual Network peering resource.
43494	ResourceGUID *string `json:"resourceGuid,omitempty"`
43495}
43496
43497// MarshalJSON is the custom marshaler for VirtualNetworkPeeringPropertiesFormat.
43498func (vnppf VirtualNetworkPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
43499	objectMap := make(map[string]interface{})
43500	if vnppf.AllowVirtualNetworkAccess != nil {
43501		objectMap["allowVirtualNetworkAccess"] = vnppf.AllowVirtualNetworkAccess
43502	}
43503	if vnppf.AllowForwardedTraffic != nil {
43504		objectMap["allowForwardedTraffic"] = vnppf.AllowForwardedTraffic
43505	}
43506	if vnppf.AllowGatewayTransit != nil {
43507		objectMap["allowGatewayTransit"] = vnppf.AllowGatewayTransit
43508	}
43509	if vnppf.UseRemoteGateways != nil {
43510		objectMap["useRemoteGateways"] = vnppf.UseRemoteGateways
43511	}
43512	if vnppf.RemoteVirtualNetwork != nil {
43513		objectMap["remoteVirtualNetwork"] = vnppf.RemoteVirtualNetwork
43514	}
43515	if vnppf.RemoteAddressSpace != nil {
43516		objectMap["remoteAddressSpace"] = vnppf.RemoteAddressSpace
43517	}
43518	if vnppf.RemoteBgpCommunities != nil {
43519		objectMap["remoteBgpCommunities"] = vnppf.RemoteBgpCommunities
43520	}
43521	if vnppf.PeeringState != "" {
43522		objectMap["peeringState"] = vnppf.PeeringState
43523	}
43524	if vnppf.DoNotVerifyRemoteGateways != nil {
43525		objectMap["doNotVerifyRemoteGateways"] = vnppf.DoNotVerifyRemoteGateways
43526	}
43527	return json.Marshal(objectMap)
43528}
43529
43530// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
43531// long-running operation.
43532type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
43533	azure.FutureAPI
43534	// Result returns the result of the asynchronous operation.
43535	// If the operation has not completed it will return an error.
43536	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
43537}
43538
43539// UnmarshalJSON is the custom unmarshaller for CreateFuture.
43540func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
43541	var azFuture azure.Future
43542	if err := json.Unmarshal(body, &azFuture); err != nil {
43543		return err
43544	}
43545	future.FutureAPI = &azFuture
43546	future.Result = future.result
43547	return nil
43548}
43549
43550// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result.
43551func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
43552	var done bool
43553	done, err = future.DoneWithContext(context.Background(), client)
43554	if err != nil {
43555		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
43556		return
43557	}
43558	if !done {
43559		vnp.Response.Response = future.Response()
43560		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
43561		return
43562	}
43563	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
43564	if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
43565		vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
43566		if err != nil {
43567			err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
43568		}
43569	}
43570	return
43571}
43572
43573// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
43574// long-running operation.
43575type VirtualNetworkPeeringsDeleteFuture struct {
43576	azure.FutureAPI
43577	// Result returns the result of the asynchronous operation.
43578	// If the operation has not completed it will return an error.
43579	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
43580}
43581
43582// UnmarshalJSON is the custom unmarshaller for CreateFuture.
43583func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
43584	var azFuture azure.Future
43585	if err := json.Unmarshal(body, &azFuture); err != nil {
43586		return err
43587	}
43588	future.FutureAPI = &azFuture
43589	future.Result = future.result
43590	return nil
43591}
43592
43593// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result.
43594func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
43595	var done bool
43596	done, err = future.DoneWithContext(context.Background(), client)
43597	if err != nil {
43598		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
43599		return
43600	}
43601	if !done {
43602		ar.Response = future.Response()
43603		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
43604		return
43605	}
43606	ar.Response = future.Response()
43607	return
43608}
43609
43610// VirtualNetworkPropertiesFormat properties of the virtual network.
43611type VirtualNetworkPropertiesFormat struct {
43612	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
43613	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
43614	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
43615	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
43616	// Subnets - A list of subnets in a Virtual Network.
43617	Subnets *[]Subnet `json:"subnets,omitempty"`
43618	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
43619	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
43620	// ResourceGUID - READ-ONLY; The resourceGuid property of the Virtual Network resource.
43621	ResourceGUID *string `json:"resourceGuid,omitempty"`
43622	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
43623	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
43624	// 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.
43625	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
43626	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
43627	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
43628	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
43629	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
43630	// BgpCommunities - Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET.
43631	BgpCommunities *VirtualNetworkBgpCommunities `json:"bgpCommunities,omitempty"`
43632	// IPAllocations - Array of IpAllocation which reference this VNET.
43633	IPAllocations *[]SubResource `json:"ipAllocations,omitempty"`
43634}
43635
43636// MarshalJSON is the custom marshaler for VirtualNetworkPropertiesFormat.
43637func (vnpf VirtualNetworkPropertiesFormat) MarshalJSON() ([]byte, error) {
43638	objectMap := make(map[string]interface{})
43639	if vnpf.AddressSpace != nil {
43640		objectMap["addressSpace"] = vnpf.AddressSpace
43641	}
43642	if vnpf.DhcpOptions != nil {
43643		objectMap["dhcpOptions"] = vnpf.DhcpOptions
43644	}
43645	if vnpf.Subnets != nil {
43646		objectMap["subnets"] = vnpf.Subnets
43647	}
43648	if vnpf.VirtualNetworkPeerings != nil {
43649		objectMap["virtualNetworkPeerings"] = vnpf.VirtualNetworkPeerings
43650	}
43651	if vnpf.EnableDdosProtection != nil {
43652		objectMap["enableDdosProtection"] = vnpf.EnableDdosProtection
43653	}
43654	if vnpf.EnableVMProtection != nil {
43655		objectMap["enableVmProtection"] = vnpf.EnableVMProtection
43656	}
43657	if vnpf.DdosProtectionPlan != nil {
43658		objectMap["ddosProtectionPlan"] = vnpf.DdosProtectionPlan
43659	}
43660	if vnpf.BgpCommunities != nil {
43661		objectMap["bgpCommunities"] = vnpf.BgpCommunities
43662	}
43663	if vnpf.IPAllocations != nil {
43664		objectMap["ipAllocations"] = vnpf.IPAllocations
43665	}
43666	return json.Marshal(objectMap)
43667}
43668
43669// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
43670// long-running operation.
43671type VirtualNetworksCreateOrUpdateFuture struct {
43672	azure.FutureAPI
43673	// Result returns the result of the asynchronous operation.
43674	// If the operation has not completed it will return an error.
43675	Result func(VirtualNetworksClient) (VirtualNetwork, error)
43676}
43677
43678// UnmarshalJSON is the custom unmarshaller for CreateFuture.
43679func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
43680	var azFuture azure.Future
43681	if err := json.Unmarshal(body, &azFuture); err != nil {
43682		return err
43683	}
43684	future.FutureAPI = &azFuture
43685	future.Result = future.result
43686	return nil
43687}
43688
43689// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result.
43690func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
43691	var done bool
43692	done, err = future.DoneWithContext(context.Background(), client)
43693	if err != nil {
43694		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
43695		return
43696	}
43697	if !done {
43698		vn.Response.Response = future.Response()
43699		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
43700		return
43701	}
43702	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
43703	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
43704		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
43705		if err != nil {
43706			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
43707		}
43708	}
43709	return
43710}
43711
43712// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
43713// operation.
43714type VirtualNetworksDeleteFuture struct {
43715	azure.FutureAPI
43716	// Result returns the result of the asynchronous operation.
43717	// If the operation has not completed it will return an error.
43718	Result func(VirtualNetworksClient) (autorest.Response, error)
43719}
43720
43721// UnmarshalJSON is the custom unmarshaller for CreateFuture.
43722func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
43723	var azFuture azure.Future
43724	if err := json.Unmarshal(body, &azFuture); err != nil {
43725		return err
43726	}
43727	future.FutureAPI = &azFuture
43728	future.Result = future.result
43729	return nil
43730}
43731
43732// result is the default implementation for VirtualNetworksDeleteFuture.Result.
43733func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
43734	var done bool
43735	done, err = future.DoneWithContext(context.Background(), client)
43736	if err != nil {
43737		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
43738		return
43739	}
43740	if !done {
43741		ar.Response = future.Response()
43742		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
43743		return
43744	}
43745	ar.Response = future.Response()
43746	return
43747}
43748
43749// VirtualNetworkTap virtual Network Tap resource.
43750type VirtualNetworkTap struct {
43751	autorest.Response `json:"-"`
43752	// VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties.
43753	*VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"`
43754	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
43755	Etag *string `json:"etag,omitempty"`
43756	// ID - Resource ID.
43757	ID *string `json:"id,omitempty"`
43758	// Name - READ-ONLY; Resource name.
43759	Name *string `json:"name,omitempty"`
43760	// Type - READ-ONLY; Resource type.
43761	Type *string `json:"type,omitempty"`
43762	// Location - Resource location.
43763	Location *string `json:"location,omitempty"`
43764	// Tags - Resource tags.
43765	Tags map[string]*string `json:"tags"`
43766}
43767
43768// MarshalJSON is the custom marshaler for VirtualNetworkTap.
43769func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) {
43770	objectMap := make(map[string]interface{})
43771	if vnt.VirtualNetworkTapPropertiesFormat != nil {
43772		objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat
43773	}
43774	if vnt.ID != nil {
43775		objectMap["id"] = vnt.ID
43776	}
43777	if vnt.Location != nil {
43778		objectMap["location"] = vnt.Location
43779	}
43780	if vnt.Tags != nil {
43781		objectMap["tags"] = vnt.Tags
43782	}
43783	return json.Marshal(objectMap)
43784}
43785
43786// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct.
43787func (vnt *VirtualNetworkTap) UnmarshalJSON(body []byte) error {
43788	var m map[string]*json.RawMessage
43789	err := json.Unmarshal(body, &m)
43790	if err != nil {
43791		return err
43792	}
43793	for k, v := range m {
43794		switch k {
43795		case "properties":
43796			if v != nil {
43797				var virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat
43798				err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat)
43799				if err != nil {
43800					return err
43801				}
43802				vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat
43803			}
43804		case "etag":
43805			if v != nil {
43806				var etag string
43807				err = json.Unmarshal(*v, &etag)
43808				if err != nil {
43809					return err
43810				}
43811				vnt.Etag = &etag
43812			}
43813		case "id":
43814			if v != nil {
43815				var ID string
43816				err = json.Unmarshal(*v, &ID)
43817				if err != nil {
43818					return err
43819				}
43820				vnt.ID = &ID
43821			}
43822		case "name":
43823			if v != nil {
43824				var name string
43825				err = json.Unmarshal(*v, &name)
43826				if err != nil {
43827					return err
43828				}
43829				vnt.Name = &name
43830			}
43831		case "type":
43832			if v != nil {
43833				var typeVar string
43834				err = json.Unmarshal(*v, &typeVar)
43835				if err != nil {
43836					return err
43837				}
43838				vnt.Type = &typeVar
43839			}
43840		case "location":
43841			if v != nil {
43842				var location string
43843				err = json.Unmarshal(*v, &location)
43844				if err != nil {
43845					return err
43846				}
43847				vnt.Location = &location
43848			}
43849		case "tags":
43850			if v != nil {
43851				var tags map[string]*string
43852				err = json.Unmarshal(*v, &tags)
43853				if err != nil {
43854					return err
43855				}
43856				vnt.Tags = tags
43857			}
43858		}
43859	}
43860
43861	return nil
43862}
43863
43864// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call.
43865type VirtualNetworkTapListResult struct {
43866	autorest.Response `json:"-"`
43867	// Value - A list of VirtualNetworkTaps in a resource group.
43868	Value *[]VirtualNetworkTap `json:"value,omitempty"`
43869	// NextLink - The URL to get the next set of results.
43870	NextLink *string `json:"nextLink,omitempty"`
43871}
43872
43873// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values.
43874type VirtualNetworkTapListResultIterator struct {
43875	i    int
43876	page VirtualNetworkTapListResultPage
43877}
43878
43879// NextWithContext advances to the next value.  If there was an error making
43880// the request the iterator does not advance and the error is returned.
43881func (iter *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) {
43882	if tracing.IsEnabled() {
43883		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.NextWithContext")
43884		defer func() {
43885			sc := -1
43886			if iter.Response().Response.Response != nil {
43887				sc = iter.Response().Response.Response.StatusCode
43888			}
43889			tracing.EndSpan(ctx, sc, err)
43890		}()
43891	}
43892	iter.i++
43893	if iter.i < len(iter.page.Values()) {
43894		return nil
43895	}
43896	err = iter.page.NextWithContext(ctx)
43897	if err != nil {
43898		iter.i--
43899		return err
43900	}
43901	iter.i = 0
43902	return nil
43903}
43904
43905// Next advances to the next value.  If there was an error making
43906// the request the iterator does not advance and the error is returned.
43907// Deprecated: Use NextWithContext() instead.
43908func (iter *VirtualNetworkTapListResultIterator) Next() error {
43909	return iter.NextWithContext(context.Background())
43910}
43911
43912// NotDone returns true if the enumeration should be started or is not yet complete.
43913func (iter VirtualNetworkTapListResultIterator) NotDone() bool {
43914	return iter.page.NotDone() && iter.i < len(iter.page.Values())
43915}
43916
43917// Response returns the raw server response from the last page request.
43918func (iter VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult {
43919	return iter.page.Response()
43920}
43921
43922// Value returns the current value or a zero-initialized value if the
43923// iterator has advanced beyond the end of the collection.
43924func (iter VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap {
43925	if !iter.page.NotDone() {
43926		return VirtualNetworkTap{}
43927	}
43928	return iter.page.Values()[iter.i]
43929}
43930
43931// Creates a new instance of the VirtualNetworkTapListResultIterator type.
43932func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator {
43933	return VirtualNetworkTapListResultIterator{page: page}
43934}
43935
43936// IsEmpty returns true if the ListResult contains no values.
43937func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
43938	return vntlr.Value == nil || len(*vntlr.Value) == 0
43939}
43940
43941// hasNextLink returns true if the NextLink is not empty.
43942func (vntlr VirtualNetworkTapListResult) hasNextLink() bool {
43943	return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0
43944}
43945
43946// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results.
43947// It returns nil if no more results exist.
43948func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) {
43949	if !vntlr.hasNextLink() {
43950		return nil, nil
43951	}
43952	return autorest.Prepare((&http.Request{}).WithContext(ctx),
43953		autorest.AsJSON(),
43954		autorest.AsGet(),
43955		autorest.WithBaseURL(to.String(vntlr.NextLink)))
43956}
43957
43958// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values.
43959type VirtualNetworkTapListResultPage struct {
43960	fn    func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
43961	vntlr VirtualNetworkTapListResult
43962}
43963
43964// NextWithContext advances to the next page of values.  If there was an error making
43965// the request the page does not advance and the error is returned.
43966func (page *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) {
43967	if tracing.IsEnabled() {
43968		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.NextWithContext")
43969		defer func() {
43970			sc := -1
43971			if page.Response().Response.Response != nil {
43972				sc = page.Response().Response.Response.StatusCode
43973			}
43974			tracing.EndSpan(ctx, sc, err)
43975		}()
43976	}
43977	for {
43978		next, err := page.fn(ctx, page.vntlr)
43979		if err != nil {
43980			return err
43981		}
43982		page.vntlr = next
43983		if !next.hasNextLink() || !next.IsEmpty() {
43984			break
43985		}
43986	}
43987	return nil
43988}
43989
43990// Next advances to the next page of values.  If there was an error making
43991// the request the page does not advance and the error is returned.
43992// Deprecated: Use NextWithContext() instead.
43993func (page *VirtualNetworkTapListResultPage) Next() error {
43994	return page.NextWithContext(context.Background())
43995}
43996
43997// NotDone returns true if the page enumeration should be started or is not yet complete.
43998func (page VirtualNetworkTapListResultPage) NotDone() bool {
43999	return !page.vntlr.IsEmpty()
44000}
44001
44002// Response returns the raw server response from the last page request.
44003func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult {
44004	return page.vntlr
44005}
44006
44007// Values returns the slice of values for the current page or nil if there are no values.
44008func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap {
44009	if page.vntlr.IsEmpty() {
44010		return nil
44011	}
44012	return *page.vntlr.Value
44013}
44014
44015// Creates a new instance of the VirtualNetworkTapListResultPage type.
44016func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage {
44017	return VirtualNetworkTapListResultPage{
44018		fn:    getNextPage,
44019		vntlr: cur,
44020	}
44021}
44022
44023// VirtualNetworkTapPropertiesFormat virtual Network Tap properties.
44024type VirtualNetworkTapPropertiesFormat struct {
44025	// NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
44026	NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"`
44027	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network tap resource.
44028	ResourceGUID *string `json:"resourceGuid,omitempty"`
44029	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
44030	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
44031	// DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap.
44032	DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"`
44033	// DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap.
44034	DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"`
44035	// DestinationPort - The VXLAN destination port that will receive the tapped traffic.
44036	DestinationPort *int32 `json:"destinationPort,omitempty"`
44037}
44038
44039// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat.
44040func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) {
44041	objectMap := make(map[string]interface{})
44042	if vntpf.DestinationNetworkInterfaceIPConfiguration != nil {
44043		objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration
44044	}
44045	if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil {
44046		objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration
44047	}
44048	if vntpf.DestinationPort != nil {
44049		objectMap["destinationPort"] = vntpf.DestinationPort
44050	}
44051	return json.Marshal(objectMap)
44052}
44053
44054// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
44055// long-running operation.
44056type VirtualNetworkTapsCreateOrUpdateFuture struct {
44057	azure.FutureAPI
44058	// Result returns the result of the asynchronous operation.
44059	// If the operation has not completed it will return an error.
44060	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
44061}
44062
44063// UnmarshalJSON is the custom unmarshaller for CreateFuture.
44064func (future *VirtualNetworkTapsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
44065	var azFuture azure.Future
44066	if err := json.Unmarshal(body, &azFuture); err != nil {
44067		return err
44068	}
44069	future.FutureAPI = &azFuture
44070	future.Result = future.result
44071	return nil
44072}
44073
44074// result is the default implementation for VirtualNetworkTapsCreateOrUpdateFuture.Result.
44075func (future *VirtualNetworkTapsCreateOrUpdateFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
44076	var done bool
44077	done, err = future.DoneWithContext(context.Background(), client)
44078	if err != nil {
44079		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
44080		return
44081	}
44082	if !done {
44083		vnt.Response.Response = future.Response()
44084		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsCreateOrUpdateFuture")
44085		return
44086	}
44087	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
44088	if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
44089		vnt, err = client.CreateOrUpdateResponder(vnt.Response.Response)
44090		if err != nil {
44091			err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", vnt.Response.Response, "Failure responding to request")
44092		}
44093	}
44094	return
44095}
44096
44097// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a
44098// long-running operation.
44099type VirtualNetworkTapsDeleteFuture struct {
44100	azure.FutureAPI
44101	// Result returns the result of the asynchronous operation.
44102	// If the operation has not completed it will return an error.
44103	Result func(VirtualNetworkTapsClient) (autorest.Response, error)
44104}
44105
44106// UnmarshalJSON is the custom unmarshaller for CreateFuture.
44107func (future *VirtualNetworkTapsDeleteFuture) UnmarshalJSON(body []byte) error {
44108	var azFuture azure.Future
44109	if err := json.Unmarshal(body, &azFuture); err != nil {
44110		return err
44111	}
44112	future.FutureAPI = &azFuture
44113	future.Result = future.result
44114	return nil
44115}
44116
44117// result is the default implementation for VirtualNetworkTapsDeleteFuture.Result.
44118func (future *VirtualNetworkTapsDeleteFuture) result(client VirtualNetworkTapsClient) (ar autorest.Response, err error) {
44119	var done bool
44120	done, err = future.DoneWithContext(context.Background(), client)
44121	if err != nil {
44122		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsDeleteFuture", "Result", future.Response(), "Polling failure")
44123		return
44124	}
44125	if !done {
44126		ar.Response = future.Response()
44127		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsDeleteFuture")
44128		return
44129	}
44130	ar.Response = future.Response()
44131	return
44132}
44133
44134// VirtualNetworkUsage usage details for subnet.
44135type VirtualNetworkUsage struct {
44136	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
44137	CurrentValue *float64 `json:"currentValue,omitempty"`
44138	// ID - READ-ONLY; Subnet identifier.
44139	ID *string `json:"id,omitempty"`
44140	// Limit - READ-ONLY; Indicates the size of the subnet.
44141	Limit *float64 `json:"limit,omitempty"`
44142	// Name - READ-ONLY; The name containing common and localized value for usage.
44143	Name *VirtualNetworkUsageName `json:"name,omitempty"`
44144	// Unit - READ-ONLY; Usage units. Returns 'Count'.
44145	Unit *string `json:"unit,omitempty"`
44146}
44147
44148// MarshalJSON is the custom marshaler for VirtualNetworkUsage.
44149func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) {
44150	objectMap := make(map[string]interface{})
44151	return json.Marshal(objectMap)
44152}
44153
44154// VirtualNetworkUsageName usage strings container.
44155type VirtualNetworkUsageName struct {
44156	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
44157	LocalizedValue *string `json:"localizedValue,omitempty"`
44158	// Value - READ-ONLY; Subnet size and usage string.
44159	Value *string `json:"value,omitempty"`
44160}
44161
44162// MarshalJSON is the custom marshaler for VirtualNetworkUsageName.
44163func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) {
44164	objectMap := make(map[string]interface{})
44165	return json.Marshal(objectMap)
44166}
44167
44168// VirtualRouter virtualRouter Resource.
44169type VirtualRouter struct {
44170	autorest.Response `json:"-"`
44171	// VirtualRouterPropertiesFormat - Properties of the Virtual Router.
44172	*VirtualRouterPropertiesFormat `json:"properties,omitempty"`
44173	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
44174	Etag *string `json:"etag,omitempty"`
44175	// ID - Resource ID.
44176	ID *string `json:"id,omitempty"`
44177	// Name - READ-ONLY; Resource name.
44178	Name *string `json:"name,omitempty"`
44179	// Type - READ-ONLY; Resource type.
44180	Type *string `json:"type,omitempty"`
44181	// Location - Resource location.
44182	Location *string `json:"location,omitempty"`
44183	// Tags - Resource tags.
44184	Tags map[string]*string `json:"tags"`
44185}
44186
44187// MarshalJSON is the custom marshaler for VirtualRouter.
44188func (vr VirtualRouter) MarshalJSON() ([]byte, error) {
44189	objectMap := make(map[string]interface{})
44190	if vr.VirtualRouterPropertiesFormat != nil {
44191		objectMap["properties"] = vr.VirtualRouterPropertiesFormat
44192	}
44193	if vr.ID != nil {
44194		objectMap["id"] = vr.ID
44195	}
44196	if vr.Location != nil {
44197		objectMap["location"] = vr.Location
44198	}
44199	if vr.Tags != nil {
44200		objectMap["tags"] = vr.Tags
44201	}
44202	return json.Marshal(objectMap)
44203}
44204
44205// UnmarshalJSON is the custom unmarshaler for VirtualRouter struct.
44206func (vr *VirtualRouter) UnmarshalJSON(body []byte) error {
44207	var m map[string]*json.RawMessage
44208	err := json.Unmarshal(body, &m)
44209	if err != nil {
44210		return err
44211	}
44212	for k, v := range m {
44213		switch k {
44214		case "properties":
44215			if v != nil {
44216				var virtualRouterPropertiesFormat VirtualRouterPropertiesFormat
44217				err = json.Unmarshal(*v, &virtualRouterPropertiesFormat)
44218				if err != nil {
44219					return err
44220				}
44221				vr.VirtualRouterPropertiesFormat = &virtualRouterPropertiesFormat
44222			}
44223		case "etag":
44224			if v != nil {
44225				var etag string
44226				err = json.Unmarshal(*v, &etag)
44227				if err != nil {
44228					return err
44229				}
44230				vr.Etag = &etag
44231			}
44232		case "id":
44233			if v != nil {
44234				var ID string
44235				err = json.Unmarshal(*v, &ID)
44236				if err != nil {
44237					return err
44238				}
44239				vr.ID = &ID
44240			}
44241		case "name":
44242			if v != nil {
44243				var name string
44244				err = json.Unmarshal(*v, &name)
44245				if err != nil {
44246					return err
44247				}
44248				vr.Name = &name
44249			}
44250		case "type":
44251			if v != nil {
44252				var typeVar string
44253				err = json.Unmarshal(*v, &typeVar)
44254				if err != nil {
44255					return err
44256				}
44257				vr.Type = &typeVar
44258			}
44259		case "location":
44260			if v != nil {
44261				var location string
44262				err = json.Unmarshal(*v, &location)
44263				if err != nil {
44264					return err
44265				}
44266				vr.Location = &location
44267			}
44268		case "tags":
44269			if v != nil {
44270				var tags map[string]*string
44271				err = json.Unmarshal(*v, &tags)
44272				if err != nil {
44273					return err
44274				}
44275				vr.Tags = tags
44276			}
44277		}
44278	}
44279
44280	return nil
44281}
44282
44283// VirtualRouterListResult response for ListVirtualRouters API service call.
44284type VirtualRouterListResult struct {
44285	autorest.Response `json:"-"`
44286	// Value - List of Virtual Routers.
44287	Value *[]VirtualRouter `json:"value,omitempty"`
44288	// NextLink - URL to get the next set of results.
44289	NextLink *string `json:"nextLink,omitempty"`
44290}
44291
44292// VirtualRouterListResultIterator provides access to a complete listing of VirtualRouter values.
44293type VirtualRouterListResultIterator struct {
44294	i    int
44295	page VirtualRouterListResultPage
44296}
44297
44298// NextWithContext advances to the next value.  If there was an error making
44299// the request the iterator does not advance and the error is returned.
44300func (iter *VirtualRouterListResultIterator) NextWithContext(ctx context.Context) (err error) {
44301	if tracing.IsEnabled() {
44302		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterListResultIterator.NextWithContext")
44303		defer func() {
44304			sc := -1
44305			if iter.Response().Response.Response != nil {
44306				sc = iter.Response().Response.Response.StatusCode
44307			}
44308			tracing.EndSpan(ctx, sc, err)
44309		}()
44310	}
44311	iter.i++
44312	if iter.i < len(iter.page.Values()) {
44313		return nil
44314	}
44315	err = iter.page.NextWithContext(ctx)
44316	if err != nil {
44317		iter.i--
44318		return err
44319	}
44320	iter.i = 0
44321	return nil
44322}
44323
44324// Next advances to the next value.  If there was an error making
44325// the request the iterator does not advance and the error is returned.
44326// Deprecated: Use NextWithContext() instead.
44327func (iter *VirtualRouterListResultIterator) Next() error {
44328	return iter.NextWithContext(context.Background())
44329}
44330
44331// NotDone returns true if the enumeration should be started or is not yet complete.
44332func (iter VirtualRouterListResultIterator) NotDone() bool {
44333	return iter.page.NotDone() && iter.i < len(iter.page.Values())
44334}
44335
44336// Response returns the raw server response from the last page request.
44337func (iter VirtualRouterListResultIterator) Response() VirtualRouterListResult {
44338	return iter.page.Response()
44339}
44340
44341// Value returns the current value or a zero-initialized value if the
44342// iterator has advanced beyond the end of the collection.
44343func (iter VirtualRouterListResultIterator) Value() VirtualRouter {
44344	if !iter.page.NotDone() {
44345		return VirtualRouter{}
44346	}
44347	return iter.page.Values()[iter.i]
44348}
44349
44350// Creates a new instance of the VirtualRouterListResultIterator type.
44351func NewVirtualRouterListResultIterator(page VirtualRouterListResultPage) VirtualRouterListResultIterator {
44352	return VirtualRouterListResultIterator{page: page}
44353}
44354
44355// IsEmpty returns true if the ListResult contains no values.
44356func (vrlr VirtualRouterListResult) IsEmpty() bool {
44357	return vrlr.Value == nil || len(*vrlr.Value) == 0
44358}
44359
44360// hasNextLink returns true if the NextLink is not empty.
44361func (vrlr VirtualRouterListResult) hasNextLink() bool {
44362	return vrlr.NextLink != nil && len(*vrlr.NextLink) != 0
44363}
44364
44365// virtualRouterListResultPreparer prepares a request to retrieve the next set of results.
44366// It returns nil if no more results exist.
44367func (vrlr VirtualRouterListResult) virtualRouterListResultPreparer(ctx context.Context) (*http.Request, error) {
44368	if !vrlr.hasNextLink() {
44369		return nil, nil
44370	}
44371	return autorest.Prepare((&http.Request{}).WithContext(ctx),
44372		autorest.AsJSON(),
44373		autorest.AsGet(),
44374		autorest.WithBaseURL(to.String(vrlr.NextLink)))
44375}
44376
44377// VirtualRouterListResultPage contains a page of VirtualRouter values.
44378type VirtualRouterListResultPage struct {
44379	fn   func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error)
44380	vrlr VirtualRouterListResult
44381}
44382
44383// NextWithContext advances to the next page of values.  If there was an error making
44384// the request the page does not advance and the error is returned.
44385func (page *VirtualRouterListResultPage) NextWithContext(ctx context.Context) (err error) {
44386	if tracing.IsEnabled() {
44387		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterListResultPage.NextWithContext")
44388		defer func() {
44389			sc := -1
44390			if page.Response().Response.Response != nil {
44391				sc = page.Response().Response.Response.StatusCode
44392			}
44393			tracing.EndSpan(ctx, sc, err)
44394		}()
44395	}
44396	for {
44397		next, err := page.fn(ctx, page.vrlr)
44398		if err != nil {
44399			return err
44400		}
44401		page.vrlr = next
44402		if !next.hasNextLink() || !next.IsEmpty() {
44403			break
44404		}
44405	}
44406	return nil
44407}
44408
44409// Next advances to the next page of values.  If there was an error making
44410// the request the page does not advance and the error is returned.
44411// Deprecated: Use NextWithContext() instead.
44412func (page *VirtualRouterListResultPage) Next() error {
44413	return page.NextWithContext(context.Background())
44414}
44415
44416// NotDone returns true if the page enumeration should be started or is not yet complete.
44417func (page VirtualRouterListResultPage) NotDone() bool {
44418	return !page.vrlr.IsEmpty()
44419}
44420
44421// Response returns the raw server response from the last page request.
44422func (page VirtualRouterListResultPage) Response() VirtualRouterListResult {
44423	return page.vrlr
44424}
44425
44426// Values returns the slice of values for the current page or nil if there are no values.
44427func (page VirtualRouterListResultPage) Values() []VirtualRouter {
44428	if page.vrlr.IsEmpty() {
44429		return nil
44430	}
44431	return *page.vrlr.Value
44432}
44433
44434// Creates a new instance of the VirtualRouterListResultPage type.
44435func NewVirtualRouterListResultPage(cur VirtualRouterListResult, getNextPage func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error)) VirtualRouterListResultPage {
44436	return VirtualRouterListResultPage{
44437		fn:   getNextPage,
44438		vrlr: cur,
44439	}
44440}
44441
44442// VirtualRouterPeering virtual Router Peering resource.
44443type VirtualRouterPeering struct {
44444	autorest.Response `json:"-"`
44445	// VirtualRouterPeeringProperties - The properties of the Virtual Router Peering.
44446	*VirtualRouterPeeringProperties `json:"properties,omitempty"`
44447	// Name - Name of the virtual router peering that is unique within a virtual router.
44448	Name *string `json:"name,omitempty"`
44449	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
44450	Etag *string `json:"etag,omitempty"`
44451	// Type - READ-ONLY; Peering type.
44452	Type *string `json:"type,omitempty"`
44453	// ID - Resource ID.
44454	ID *string `json:"id,omitempty"`
44455}
44456
44457// MarshalJSON is the custom marshaler for VirtualRouterPeering.
44458func (vrp VirtualRouterPeering) MarshalJSON() ([]byte, error) {
44459	objectMap := make(map[string]interface{})
44460	if vrp.VirtualRouterPeeringProperties != nil {
44461		objectMap["properties"] = vrp.VirtualRouterPeeringProperties
44462	}
44463	if vrp.Name != nil {
44464		objectMap["name"] = vrp.Name
44465	}
44466	if vrp.ID != nil {
44467		objectMap["id"] = vrp.ID
44468	}
44469	return json.Marshal(objectMap)
44470}
44471
44472// UnmarshalJSON is the custom unmarshaler for VirtualRouterPeering struct.
44473func (vrp *VirtualRouterPeering) UnmarshalJSON(body []byte) error {
44474	var m map[string]*json.RawMessage
44475	err := json.Unmarshal(body, &m)
44476	if err != nil {
44477		return err
44478	}
44479	for k, v := range m {
44480		switch k {
44481		case "properties":
44482			if v != nil {
44483				var virtualRouterPeeringProperties VirtualRouterPeeringProperties
44484				err = json.Unmarshal(*v, &virtualRouterPeeringProperties)
44485				if err != nil {
44486					return err
44487				}
44488				vrp.VirtualRouterPeeringProperties = &virtualRouterPeeringProperties
44489			}
44490		case "name":
44491			if v != nil {
44492				var name string
44493				err = json.Unmarshal(*v, &name)
44494				if err != nil {
44495					return err
44496				}
44497				vrp.Name = &name
44498			}
44499		case "etag":
44500			if v != nil {
44501				var etag string
44502				err = json.Unmarshal(*v, &etag)
44503				if err != nil {
44504					return err
44505				}
44506				vrp.Etag = &etag
44507			}
44508		case "type":
44509			if v != nil {
44510				var typeVar string
44511				err = json.Unmarshal(*v, &typeVar)
44512				if err != nil {
44513					return err
44514				}
44515				vrp.Type = &typeVar
44516			}
44517		case "id":
44518			if v != nil {
44519				var ID string
44520				err = json.Unmarshal(*v, &ID)
44521				if err != nil {
44522					return err
44523				}
44524				vrp.ID = &ID
44525			}
44526		}
44527	}
44528
44529	return nil
44530}
44531
44532// VirtualRouterPeeringListResult response for ListVirtualRouterPeerings API service call.
44533type VirtualRouterPeeringListResult struct {
44534	autorest.Response `json:"-"`
44535	// Value - List of VirtualRouterPeerings in a VirtualRouter.
44536	Value *[]VirtualRouterPeering `json:"value,omitempty"`
44537	// NextLink - URL to get the next set of results.
44538	NextLink *string `json:"nextLink,omitempty"`
44539}
44540
44541// VirtualRouterPeeringListResultIterator provides access to a complete listing of VirtualRouterPeering
44542// values.
44543type VirtualRouterPeeringListResultIterator struct {
44544	i    int
44545	page VirtualRouterPeeringListResultPage
44546}
44547
44548// NextWithContext advances to the next value.  If there was an error making
44549// the request the iterator does not advance and the error is returned.
44550func (iter *VirtualRouterPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
44551	if tracing.IsEnabled() {
44552		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringListResultIterator.NextWithContext")
44553		defer func() {
44554			sc := -1
44555			if iter.Response().Response.Response != nil {
44556				sc = iter.Response().Response.Response.StatusCode
44557			}
44558			tracing.EndSpan(ctx, sc, err)
44559		}()
44560	}
44561	iter.i++
44562	if iter.i < len(iter.page.Values()) {
44563		return nil
44564	}
44565	err = iter.page.NextWithContext(ctx)
44566	if err != nil {
44567		iter.i--
44568		return err
44569	}
44570	iter.i = 0
44571	return nil
44572}
44573
44574// Next advances to the next value.  If there was an error making
44575// the request the iterator does not advance and the error is returned.
44576// Deprecated: Use NextWithContext() instead.
44577func (iter *VirtualRouterPeeringListResultIterator) Next() error {
44578	return iter.NextWithContext(context.Background())
44579}
44580
44581// NotDone returns true if the enumeration should be started or is not yet complete.
44582func (iter VirtualRouterPeeringListResultIterator) NotDone() bool {
44583	return iter.page.NotDone() && iter.i < len(iter.page.Values())
44584}
44585
44586// Response returns the raw server response from the last page request.
44587func (iter VirtualRouterPeeringListResultIterator) Response() VirtualRouterPeeringListResult {
44588	return iter.page.Response()
44589}
44590
44591// Value returns the current value or a zero-initialized value if the
44592// iterator has advanced beyond the end of the collection.
44593func (iter VirtualRouterPeeringListResultIterator) Value() VirtualRouterPeering {
44594	if !iter.page.NotDone() {
44595		return VirtualRouterPeering{}
44596	}
44597	return iter.page.Values()[iter.i]
44598}
44599
44600// Creates a new instance of the VirtualRouterPeeringListResultIterator type.
44601func NewVirtualRouterPeeringListResultIterator(page VirtualRouterPeeringListResultPage) VirtualRouterPeeringListResultIterator {
44602	return VirtualRouterPeeringListResultIterator{page: page}
44603}
44604
44605// IsEmpty returns true if the ListResult contains no values.
44606func (vrplr VirtualRouterPeeringListResult) IsEmpty() bool {
44607	return vrplr.Value == nil || len(*vrplr.Value) == 0
44608}
44609
44610// hasNextLink returns true if the NextLink is not empty.
44611func (vrplr VirtualRouterPeeringListResult) hasNextLink() bool {
44612	return vrplr.NextLink != nil && len(*vrplr.NextLink) != 0
44613}
44614
44615// virtualRouterPeeringListResultPreparer prepares a request to retrieve the next set of results.
44616// It returns nil if no more results exist.
44617func (vrplr VirtualRouterPeeringListResult) virtualRouterPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
44618	if !vrplr.hasNextLink() {
44619		return nil, nil
44620	}
44621	return autorest.Prepare((&http.Request{}).WithContext(ctx),
44622		autorest.AsJSON(),
44623		autorest.AsGet(),
44624		autorest.WithBaseURL(to.String(vrplr.NextLink)))
44625}
44626
44627// VirtualRouterPeeringListResultPage contains a page of VirtualRouterPeering values.
44628type VirtualRouterPeeringListResultPage struct {
44629	fn    func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error)
44630	vrplr VirtualRouterPeeringListResult
44631}
44632
44633// NextWithContext advances to the next page of values.  If there was an error making
44634// the request the page does not advance and the error is returned.
44635func (page *VirtualRouterPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
44636	if tracing.IsEnabled() {
44637		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringListResultPage.NextWithContext")
44638		defer func() {
44639			sc := -1
44640			if page.Response().Response.Response != nil {
44641				sc = page.Response().Response.Response.StatusCode
44642			}
44643			tracing.EndSpan(ctx, sc, err)
44644		}()
44645	}
44646	for {
44647		next, err := page.fn(ctx, page.vrplr)
44648		if err != nil {
44649			return err
44650		}
44651		page.vrplr = next
44652		if !next.hasNextLink() || !next.IsEmpty() {
44653			break
44654		}
44655	}
44656	return nil
44657}
44658
44659// Next advances to the next page of values.  If there was an error making
44660// the request the page does not advance and the error is returned.
44661// Deprecated: Use NextWithContext() instead.
44662func (page *VirtualRouterPeeringListResultPage) Next() error {
44663	return page.NextWithContext(context.Background())
44664}
44665
44666// NotDone returns true if the page enumeration should be started or is not yet complete.
44667func (page VirtualRouterPeeringListResultPage) NotDone() bool {
44668	return !page.vrplr.IsEmpty()
44669}
44670
44671// Response returns the raw server response from the last page request.
44672func (page VirtualRouterPeeringListResultPage) Response() VirtualRouterPeeringListResult {
44673	return page.vrplr
44674}
44675
44676// Values returns the slice of values for the current page or nil if there are no values.
44677func (page VirtualRouterPeeringListResultPage) Values() []VirtualRouterPeering {
44678	if page.vrplr.IsEmpty() {
44679		return nil
44680	}
44681	return *page.vrplr.Value
44682}
44683
44684// Creates a new instance of the VirtualRouterPeeringListResultPage type.
44685func NewVirtualRouterPeeringListResultPage(cur VirtualRouterPeeringListResult, getNextPage func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error)) VirtualRouterPeeringListResultPage {
44686	return VirtualRouterPeeringListResultPage{
44687		fn:    getNextPage,
44688		vrplr: cur,
44689	}
44690}
44691
44692// VirtualRouterPeeringProperties properties of the rule group.
44693type VirtualRouterPeeringProperties struct {
44694	// PeerAsn - Peer ASN.
44695	PeerAsn *int64 `json:"peerAsn,omitempty"`
44696	// PeerIP - Peer IP.
44697	PeerIP *string `json:"peerIp,omitempty"`
44698	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
44699	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
44700}
44701
44702// MarshalJSON is the custom marshaler for VirtualRouterPeeringProperties.
44703func (vrpp VirtualRouterPeeringProperties) MarshalJSON() ([]byte, error) {
44704	objectMap := make(map[string]interface{})
44705	if vrpp.PeerAsn != nil {
44706		objectMap["peerAsn"] = vrpp.PeerAsn
44707	}
44708	if vrpp.PeerIP != nil {
44709		objectMap["peerIp"] = vrpp.PeerIP
44710	}
44711	return json.Marshal(objectMap)
44712}
44713
44714// VirtualRouterPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
44715// long-running operation.
44716type VirtualRouterPeeringsCreateOrUpdateFuture struct {
44717	azure.FutureAPI
44718	// Result returns the result of the asynchronous operation.
44719	// If the operation has not completed it will return an error.
44720	Result func(VirtualRouterPeeringsClient) (VirtualRouterPeering, error)
44721}
44722
44723// UnmarshalJSON is the custom unmarshaller for CreateFuture.
44724func (future *VirtualRouterPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
44725	var azFuture azure.Future
44726	if err := json.Unmarshal(body, &azFuture); err != nil {
44727		return err
44728	}
44729	future.FutureAPI = &azFuture
44730	future.Result = future.result
44731	return nil
44732}
44733
44734// result is the default implementation for VirtualRouterPeeringsCreateOrUpdateFuture.Result.
44735func (future *VirtualRouterPeeringsCreateOrUpdateFuture) result(client VirtualRouterPeeringsClient) (vrp VirtualRouterPeering, err error) {
44736	var done bool
44737	done, err = future.DoneWithContext(context.Background(), client)
44738	if err != nil {
44739		err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
44740		return
44741	}
44742	if !done {
44743		vrp.Response.Response = future.Response()
44744		err = azure.NewAsyncOpIncompleteError("network.VirtualRouterPeeringsCreateOrUpdateFuture")
44745		return
44746	}
44747	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
44748	if vrp.Response.Response, err = future.GetResult(sender); err == nil && vrp.Response.Response.StatusCode != http.StatusNoContent {
44749		vrp, err = client.CreateOrUpdateResponder(vrp.Response.Response)
44750		if err != nil {
44751			err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsCreateOrUpdateFuture", "Result", vrp.Response.Response, "Failure responding to request")
44752		}
44753	}
44754	return
44755}
44756
44757// VirtualRouterPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
44758// long-running operation.
44759type VirtualRouterPeeringsDeleteFuture struct {
44760	azure.FutureAPI
44761	// Result returns the result of the asynchronous operation.
44762	// If the operation has not completed it will return an error.
44763	Result func(VirtualRouterPeeringsClient) (autorest.Response, error)
44764}
44765
44766// UnmarshalJSON is the custom unmarshaller for CreateFuture.
44767func (future *VirtualRouterPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
44768	var azFuture azure.Future
44769	if err := json.Unmarshal(body, &azFuture); err != nil {
44770		return err
44771	}
44772	future.FutureAPI = &azFuture
44773	future.Result = future.result
44774	return nil
44775}
44776
44777// result is the default implementation for VirtualRouterPeeringsDeleteFuture.Result.
44778func (future *VirtualRouterPeeringsDeleteFuture) result(client VirtualRouterPeeringsClient) (ar autorest.Response, err error) {
44779	var done bool
44780	done, err = future.DoneWithContext(context.Background(), client)
44781	if err != nil {
44782		err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
44783		return
44784	}
44785	if !done {
44786		ar.Response = future.Response()
44787		err = azure.NewAsyncOpIncompleteError("network.VirtualRouterPeeringsDeleteFuture")
44788		return
44789	}
44790	ar.Response = future.Response()
44791	return
44792}
44793
44794// VirtualRouterPropertiesFormat virtual Router definition.
44795type VirtualRouterPropertiesFormat struct {
44796	// VirtualRouterAsn - VirtualRouter ASN.
44797	VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"`
44798	// VirtualRouterIps - VirtualRouter IPs.
44799	VirtualRouterIps *[]string `json:"virtualRouterIps,omitempty"`
44800	// HostedSubnet - The Subnet on which VirtualRouter is hosted.
44801	HostedSubnet *SubResource `json:"hostedSubnet,omitempty"`
44802	// HostedGateway - The Gateway on which VirtualRouter is hosted.
44803	HostedGateway *SubResource `json:"hostedGateway,omitempty"`
44804	// Peerings - READ-ONLY; List of references to VirtualRouterPeerings.
44805	Peerings *[]SubResource `json:"peerings,omitempty"`
44806	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
44807	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
44808}
44809
44810// MarshalJSON is the custom marshaler for VirtualRouterPropertiesFormat.
44811func (vrpf VirtualRouterPropertiesFormat) MarshalJSON() ([]byte, error) {
44812	objectMap := make(map[string]interface{})
44813	if vrpf.VirtualRouterAsn != nil {
44814		objectMap["virtualRouterAsn"] = vrpf.VirtualRouterAsn
44815	}
44816	if vrpf.VirtualRouterIps != nil {
44817		objectMap["virtualRouterIps"] = vrpf.VirtualRouterIps
44818	}
44819	if vrpf.HostedSubnet != nil {
44820		objectMap["hostedSubnet"] = vrpf.HostedSubnet
44821	}
44822	if vrpf.HostedGateway != nil {
44823		objectMap["hostedGateway"] = vrpf.HostedGateway
44824	}
44825	return json.Marshal(objectMap)
44826}
44827
44828// VirtualRoutersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
44829// long-running operation.
44830type VirtualRoutersCreateOrUpdateFuture struct {
44831	azure.FutureAPI
44832	// Result returns the result of the asynchronous operation.
44833	// If the operation has not completed it will return an error.
44834	Result func(VirtualRoutersClient) (VirtualRouter, error)
44835}
44836
44837// UnmarshalJSON is the custom unmarshaller for CreateFuture.
44838func (future *VirtualRoutersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
44839	var azFuture azure.Future
44840	if err := json.Unmarshal(body, &azFuture); err != nil {
44841		return err
44842	}
44843	future.FutureAPI = &azFuture
44844	future.Result = future.result
44845	return nil
44846}
44847
44848// result is the default implementation for VirtualRoutersCreateOrUpdateFuture.Result.
44849func (future *VirtualRoutersCreateOrUpdateFuture) result(client VirtualRoutersClient) (vr VirtualRouter, err error) {
44850	var done bool
44851	done, err = future.DoneWithContext(context.Background(), client)
44852	if err != nil {
44853		err = autorest.NewErrorWithError(err, "network.VirtualRoutersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
44854		return
44855	}
44856	if !done {
44857		vr.Response.Response = future.Response()
44858		err = azure.NewAsyncOpIncompleteError("network.VirtualRoutersCreateOrUpdateFuture")
44859		return
44860	}
44861	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
44862	if vr.Response.Response, err = future.GetResult(sender); err == nil && vr.Response.Response.StatusCode != http.StatusNoContent {
44863		vr, err = client.CreateOrUpdateResponder(vr.Response.Response)
44864		if err != nil {
44865			err = autorest.NewErrorWithError(err, "network.VirtualRoutersCreateOrUpdateFuture", "Result", vr.Response.Response, "Failure responding to request")
44866		}
44867	}
44868	return
44869}
44870
44871// VirtualRoutersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
44872// operation.
44873type VirtualRoutersDeleteFuture struct {
44874	azure.FutureAPI
44875	// Result returns the result of the asynchronous operation.
44876	// If the operation has not completed it will return an error.
44877	Result func(VirtualRoutersClient) (autorest.Response, error)
44878}
44879
44880// UnmarshalJSON is the custom unmarshaller for CreateFuture.
44881func (future *VirtualRoutersDeleteFuture) UnmarshalJSON(body []byte) error {
44882	var azFuture azure.Future
44883	if err := json.Unmarshal(body, &azFuture); err != nil {
44884		return err
44885	}
44886	future.FutureAPI = &azFuture
44887	future.Result = future.result
44888	return nil
44889}
44890
44891// result is the default implementation for VirtualRoutersDeleteFuture.Result.
44892func (future *VirtualRoutersDeleteFuture) result(client VirtualRoutersClient) (ar autorest.Response, err error) {
44893	var done bool
44894	done, err = future.DoneWithContext(context.Background(), client)
44895	if err != nil {
44896		err = autorest.NewErrorWithError(err, "network.VirtualRoutersDeleteFuture", "Result", future.Response(), "Polling failure")
44897		return
44898	}
44899	if !done {
44900		ar.Response = future.Response()
44901		err = azure.NewAsyncOpIncompleteError("network.VirtualRoutersDeleteFuture")
44902		return
44903	}
44904	ar.Response = future.Response()
44905	return
44906}
44907
44908// VirtualWAN virtualWAN Resource.
44909type VirtualWAN struct {
44910	autorest.Response `json:"-"`
44911	// VirtualWanProperties - Properties of the virtual WAN.
44912	*VirtualWanProperties `json:"properties,omitempty"`
44913	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
44914	Etag *string `json:"etag,omitempty"`
44915	// ID - Resource ID.
44916	ID *string `json:"id,omitempty"`
44917	// Name - READ-ONLY; Resource name.
44918	Name *string `json:"name,omitempty"`
44919	// Type - READ-ONLY; Resource type.
44920	Type *string `json:"type,omitempty"`
44921	// Location - Resource location.
44922	Location *string `json:"location,omitempty"`
44923	// Tags - Resource tags.
44924	Tags map[string]*string `json:"tags"`
44925}
44926
44927// MarshalJSON is the custom marshaler for VirtualWAN.
44928func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
44929	objectMap := make(map[string]interface{})
44930	if vw.VirtualWanProperties != nil {
44931		objectMap["properties"] = vw.VirtualWanProperties
44932	}
44933	if vw.ID != nil {
44934		objectMap["id"] = vw.ID
44935	}
44936	if vw.Location != nil {
44937		objectMap["location"] = vw.Location
44938	}
44939	if vw.Tags != nil {
44940		objectMap["tags"] = vw.Tags
44941	}
44942	return json.Marshal(objectMap)
44943}
44944
44945// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
44946func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
44947	var m map[string]*json.RawMessage
44948	err := json.Unmarshal(body, &m)
44949	if err != nil {
44950		return err
44951	}
44952	for k, v := range m {
44953		switch k {
44954		case "properties":
44955			if v != nil {
44956				var virtualWanProperties VirtualWanProperties
44957				err = json.Unmarshal(*v, &virtualWanProperties)
44958				if err != nil {
44959					return err
44960				}
44961				vw.VirtualWanProperties = &virtualWanProperties
44962			}
44963		case "etag":
44964			if v != nil {
44965				var etag string
44966				err = json.Unmarshal(*v, &etag)
44967				if err != nil {
44968					return err
44969				}
44970				vw.Etag = &etag
44971			}
44972		case "id":
44973			if v != nil {
44974				var ID string
44975				err = json.Unmarshal(*v, &ID)
44976				if err != nil {
44977					return err
44978				}
44979				vw.ID = &ID
44980			}
44981		case "name":
44982			if v != nil {
44983				var name string
44984				err = json.Unmarshal(*v, &name)
44985				if err != nil {
44986					return err
44987				}
44988				vw.Name = &name
44989			}
44990		case "type":
44991			if v != nil {
44992				var typeVar string
44993				err = json.Unmarshal(*v, &typeVar)
44994				if err != nil {
44995					return err
44996				}
44997				vw.Type = &typeVar
44998			}
44999		case "location":
45000			if v != nil {
45001				var location string
45002				err = json.Unmarshal(*v, &location)
45003				if err != nil {
45004					return err
45005				}
45006				vw.Location = &location
45007			}
45008		case "tags":
45009			if v != nil {
45010				var tags map[string]*string
45011				err = json.Unmarshal(*v, &tags)
45012				if err != nil {
45013					return err
45014				}
45015				vw.Tags = tags
45016			}
45017		}
45018	}
45019
45020	return nil
45021}
45022
45023// VirtualWanProperties parameters for VirtualWAN.
45024type VirtualWanProperties struct {
45025	// DisableVpnEncryption - Vpn encryption to be disabled or not.
45026	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
45027	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
45028	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
45029	// VpnSites - READ-ONLY; List of VpnSites in the VirtualWAN.
45030	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
45031	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
45032	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
45033	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
45034	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
45035	// Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone'
45036	Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"`
45037	// ProvisioningState - READ-ONLY; The provisioning state of the virtual WAN resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
45038	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
45039	// Type - The type of the VirtualWAN.
45040	Type *string `json:"type,omitempty"`
45041}
45042
45043// MarshalJSON is the custom marshaler for VirtualWanProperties.
45044func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
45045	objectMap := make(map[string]interface{})
45046	if vwp.DisableVpnEncryption != nil {
45047		objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
45048	}
45049	if vwp.AllowBranchToBranchTraffic != nil {
45050		objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic
45051	}
45052	if vwp.AllowVnetToVnetTraffic != nil {
45053		objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic
45054	}
45055	if vwp.Office365LocalBreakoutCategory != "" {
45056		objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory
45057	}
45058	if vwp.Type != nil {
45059		objectMap["type"] = vwp.Type
45060	}
45061	return json.Marshal(objectMap)
45062}
45063
45064// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
45065// long-running operation.
45066type VirtualWansCreateOrUpdateFuture struct {
45067	azure.FutureAPI
45068	// Result returns the result of the asynchronous operation.
45069	// If the operation has not completed it will return an error.
45070	Result func(VirtualWansClient) (VirtualWAN, error)
45071}
45072
45073// UnmarshalJSON is the custom unmarshaller for CreateFuture.
45074func (future *VirtualWansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
45075	var azFuture azure.Future
45076	if err := json.Unmarshal(body, &azFuture); err != nil {
45077		return err
45078	}
45079	future.FutureAPI = &azFuture
45080	future.Result = future.result
45081	return nil
45082}
45083
45084// result is the default implementation for VirtualWansCreateOrUpdateFuture.Result.
45085func (future *VirtualWansCreateOrUpdateFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
45086	var done bool
45087	done, err = future.DoneWithContext(context.Background(), client)
45088	if err != nil {
45089		err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
45090		return
45091	}
45092	if !done {
45093		vw.Response.Response = future.Response()
45094		err = azure.NewAsyncOpIncompleteError("network.VirtualWansCreateOrUpdateFuture")
45095		return
45096	}
45097	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
45098	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
45099		vw, err = client.CreateOrUpdateResponder(vw.Response.Response)
45100		if err != nil {
45101			err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request")
45102		}
45103	}
45104	return
45105}
45106
45107// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
45108// operation.
45109type VirtualWansDeleteFuture struct {
45110	azure.FutureAPI
45111	// Result returns the result of the asynchronous operation.
45112	// If the operation has not completed it will return an error.
45113	Result func(VirtualWansClient) (autorest.Response, error)
45114}
45115
45116// UnmarshalJSON is the custom unmarshaller for CreateFuture.
45117func (future *VirtualWansDeleteFuture) UnmarshalJSON(body []byte) error {
45118	var azFuture azure.Future
45119	if err := json.Unmarshal(body, &azFuture); err != nil {
45120		return err
45121	}
45122	future.FutureAPI = &azFuture
45123	future.Result = future.result
45124	return nil
45125}
45126
45127// result is the default implementation for VirtualWansDeleteFuture.Result.
45128func (future *VirtualWansDeleteFuture) result(client VirtualWansClient) (ar autorest.Response, err error) {
45129	var done bool
45130	done, err = future.DoneWithContext(context.Background(), client)
45131	if err != nil {
45132		err = autorest.NewErrorWithError(err, "network.VirtualWansDeleteFuture", "Result", future.Response(), "Polling failure")
45133		return
45134	}
45135	if !done {
45136		ar.Response = future.Response()
45137		err = azure.NewAsyncOpIncompleteError("network.VirtualWansDeleteFuture")
45138		return
45139	}
45140	ar.Response = future.Response()
45141	return
45142}
45143
45144// VirtualWanSecurityProvider collection of SecurityProviders.
45145type VirtualWanSecurityProvider struct {
45146	// Name - Name of the security provider.
45147	Name *string `json:"name,omitempty"`
45148	// URL - Url of the security provider.
45149	URL *string `json:"url,omitempty"`
45150	// Type - Name of the security provider. Possible values include: 'VirtualWanSecurityProviderTypeExternal', 'VirtualWanSecurityProviderTypeNative'
45151	Type VirtualWanSecurityProviderType `json:"type,omitempty"`
45152}
45153
45154// VirtualWanSecurityProviders collection of SecurityProviders.
45155type VirtualWanSecurityProviders struct {
45156	autorest.Response `json:"-"`
45157	// SupportedProviders - List of VirtualWAN security providers.
45158	SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"`
45159}
45160
45161// VirtualWanVpnProfileParameters virtual Wan Vpn profile parameters Vpn profile generation.
45162type VirtualWanVpnProfileParameters struct {
45163	// VpnServerConfigurationResourceID - VpnServerConfiguration partial resource uri with which VirtualWan is associated to.
45164	VpnServerConfigurationResourceID *string `json:"vpnServerConfigurationResourceId,omitempty"`
45165	// AuthenticationMethod - VPN client authentication method. Possible values include: 'AuthenticationMethodEAPTLS', 'AuthenticationMethodEAPMSCHAPv2'
45166	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
45167}
45168
45169// VM describes a Virtual Machine.
45170type VM struct {
45171	// ID - Resource ID.
45172	ID *string `json:"id,omitempty"`
45173	// Name - READ-ONLY; Resource name.
45174	Name *string `json:"name,omitempty"`
45175	// Type - READ-ONLY; Resource type.
45176	Type *string `json:"type,omitempty"`
45177	// Location - Resource location.
45178	Location *string `json:"location,omitempty"`
45179	// Tags - Resource tags.
45180	Tags map[string]*string `json:"tags"`
45181}
45182
45183// MarshalJSON is the custom marshaler for VM.
45184func (vVar VM) MarshalJSON() ([]byte, error) {
45185	objectMap := make(map[string]interface{})
45186	if vVar.ID != nil {
45187		objectMap["id"] = vVar.ID
45188	}
45189	if vVar.Location != nil {
45190		objectMap["location"] = vVar.Location
45191	}
45192	if vVar.Tags != nil {
45193		objectMap["tags"] = vVar.Tags
45194	}
45195	return json.Marshal(objectMap)
45196}
45197
45198// VnetRoute list of routes that control routing from VirtualHub into a virtual network connection.
45199type VnetRoute struct {
45200	// StaticRoutes - List of all Static Routes.
45201	StaticRoutes *[]StaticRoute `json:"staticRoutes,omitempty"`
45202}
45203
45204// VpnClientConfiguration vpnClientConfiguration for P2S client.
45205type VpnClientConfiguration struct {
45206	// VpnClientAddressPool - The reference to the address space resource which represents Address space for P2S VpnClient.
45207	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
45208	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
45209	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
45210	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
45211	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
45212	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
45213	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
45214	// VpnAuthenticationTypes - VPN authentication types for the virtual network gateway..
45215	VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"`
45216	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
45217	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
45218	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
45219	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
45220	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
45221	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
45222	// RadiusServers - The radiusServers property for multiple radius server configuration.
45223	RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"`
45224	// AadTenant - The AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
45225	AadTenant *string `json:"aadTenant,omitempty"`
45226	// AadAudience - The AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
45227	AadAudience *string `json:"aadAudience,omitempty"`
45228	// AadIssuer - The AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
45229	AadIssuer *string `json:"aadIssuer,omitempty"`
45230}
45231
45232// VpnClientConnectionHealth vpnClientConnectionHealth properties.
45233type VpnClientConnectionHealth struct {
45234	// TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection.
45235	TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"`
45236	// TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection.
45237	TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"`
45238	// VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway.
45239	VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"`
45240	// AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients.
45241	AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"`
45242}
45243
45244// MarshalJSON is the custom marshaler for VpnClientConnectionHealth.
45245func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) {
45246	objectMap := make(map[string]interface{})
45247	if vcch.VpnClientConnectionsCount != nil {
45248		objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount
45249	}
45250	if vcch.AllocatedIPAddresses != nil {
45251		objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses
45252	}
45253	return json.Marshal(objectMap)
45254}
45255
45256// VpnClientConnectionHealthDetail VPN client connection health detail.
45257type VpnClientConnectionHealthDetail struct {
45258	// VpnConnectionID - READ-ONLY; The vpn client Id.
45259	VpnConnectionID *string `json:"vpnConnectionId,omitempty"`
45260	// VpnConnectionDuration - READ-ONLY; The duration time of a connected vpn client.
45261	VpnConnectionDuration *int64 `json:"vpnConnectionDuration,omitempty"`
45262	// VpnConnectionTime - READ-ONLY; The start time of a connected vpn client.
45263	VpnConnectionTime *string `json:"vpnConnectionTime,omitempty"`
45264	// PublicIPAddress - READ-ONLY; The public Ip of a connected vpn client.
45265	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
45266	// PrivateIPAddress - READ-ONLY; The assigned private Ip of a connected vpn client.
45267	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
45268	// VpnUserName - READ-ONLY; The user name of a connected vpn client.
45269	VpnUserName *string `json:"vpnUserName,omitempty"`
45270	// MaxBandwidth - READ-ONLY; The max band width.
45271	MaxBandwidth *int64 `json:"maxBandwidth,omitempty"`
45272	// EgressPacketsTransferred - READ-ONLY; The egress packets per second.
45273	EgressPacketsTransferred *int64 `json:"egressPacketsTransferred,omitempty"`
45274	// EgressBytesTransferred - READ-ONLY; The egress bytes per second.
45275	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
45276	// IngressPacketsTransferred - READ-ONLY; The ingress packets per second.
45277	IngressPacketsTransferred *int64 `json:"ingressPacketsTransferred,omitempty"`
45278	// IngressBytesTransferred - READ-ONLY; The ingress bytes per second.
45279	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
45280	// MaxPacketsPerSecond - READ-ONLY; The max packets transferred per second.
45281	MaxPacketsPerSecond *int64 `json:"maxPacketsPerSecond,omitempty"`
45282}
45283
45284// MarshalJSON is the custom marshaler for VpnClientConnectionHealthDetail.
45285func (vcchd VpnClientConnectionHealthDetail) MarshalJSON() ([]byte, error) {
45286	objectMap := make(map[string]interface{})
45287	return json.Marshal(objectMap)
45288}
45289
45290// VpnClientConnectionHealthDetailListResult list of virtual network gateway vpn client connection health.
45291type VpnClientConnectionHealthDetailListResult struct {
45292	autorest.Response `json:"-"`
45293	// Value - List of vpn client connection health.
45294	Value *[]VpnClientConnectionHealthDetail `json:"value,omitempty"`
45295}
45296
45297// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
45298type VpnClientIPsecParameters struct {
45299	autorest.Response `json:"-"`
45300	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
45301	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
45302	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
45303	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
45304	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
45305	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
45306	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
45307	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
45308	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'IkeEncryptionDES', 'IkeEncryptionDES3', 'IkeEncryptionAES128', 'IkeEncryptionAES192', 'IkeEncryptionAES256', 'IkeEncryptionGCMAES256', 'IkeEncryptionGCMAES128'
45309	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
45310	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
45311	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
45312	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'DhGroupNone', 'DhGroupDHGroup1', 'DhGroupDHGroup2', 'DhGroupDHGroup14', 'DhGroupDHGroup2048', 'DhGroupECP256', 'DhGroupECP384', 'DhGroupDHGroup24'
45313	DhGroup DhGroup `json:"dhGroup,omitempty"`
45314	// 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'
45315	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
45316}
45317
45318// VpnClientParameters vpn Client Parameters for package generation.
45319type VpnClientParameters struct {
45320	// ProcessorArchitecture - VPN client Processor Architecture. Possible values include: 'ProcessorArchitectureAmd64', 'ProcessorArchitectureX86'
45321	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
45322	// AuthenticationMethod - VPN client authentication method. Possible values include: 'AuthenticationMethodEAPTLS', 'AuthenticationMethodEAPMSCHAPv2'
45323	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
45324	// 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.
45325	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
45326	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
45327	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
45328}
45329
45330// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
45331type VpnClientRevokedCertificate struct {
45332	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
45333	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
45334	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
45335	Name *string `json:"name,omitempty"`
45336	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
45337	Etag *string `json:"etag,omitempty"`
45338	// ID - Resource ID.
45339	ID *string `json:"id,omitempty"`
45340}
45341
45342// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
45343func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
45344	objectMap := make(map[string]interface{})
45345	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
45346		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
45347	}
45348	if vcrc.Name != nil {
45349		objectMap["name"] = vcrc.Name
45350	}
45351	if vcrc.ID != nil {
45352		objectMap["id"] = vcrc.ID
45353	}
45354	return json.Marshal(objectMap)
45355}
45356
45357// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
45358func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
45359	var m map[string]*json.RawMessage
45360	err := json.Unmarshal(body, &m)
45361	if err != nil {
45362		return err
45363	}
45364	for k, v := range m {
45365		switch k {
45366		case "properties":
45367			if v != nil {
45368				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
45369				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
45370				if err != nil {
45371					return err
45372				}
45373				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
45374			}
45375		case "name":
45376			if v != nil {
45377				var name string
45378				err = json.Unmarshal(*v, &name)
45379				if err != nil {
45380					return err
45381				}
45382				vcrc.Name = &name
45383			}
45384		case "etag":
45385			if v != nil {
45386				var etag string
45387				err = json.Unmarshal(*v, &etag)
45388				if err != nil {
45389					return err
45390				}
45391				vcrc.Etag = &etag
45392			}
45393		case "id":
45394			if v != nil {
45395				var ID string
45396				err = json.Unmarshal(*v, &ID)
45397				if err != nil {
45398					return err
45399				}
45400				vcrc.ID = &ID
45401			}
45402		}
45403	}
45404
45405	return nil
45406}
45407
45408// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
45409// network gateway.
45410type VpnClientRevokedCertificatePropertiesFormat struct {
45411	// Thumbprint - The revoked VPN client certificate thumbprint.
45412	Thumbprint *string `json:"thumbprint,omitempty"`
45413	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
45414	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
45415}
45416
45417// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
45418func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
45419	objectMap := make(map[string]interface{})
45420	if vcrcpf.Thumbprint != nil {
45421		objectMap["thumbprint"] = vcrcpf.Thumbprint
45422	}
45423	return json.Marshal(objectMap)
45424}
45425
45426// VpnClientRootCertificate VPN client root certificate of virtual network gateway.
45427type VpnClientRootCertificate struct {
45428	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
45429	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
45430	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
45431	Name *string `json:"name,omitempty"`
45432	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
45433	Etag *string `json:"etag,omitempty"`
45434	// ID - Resource ID.
45435	ID *string `json:"id,omitempty"`
45436}
45437
45438// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
45439func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
45440	objectMap := make(map[string]interface{})
45441	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
45442		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
45443	}
45444	if vcrc.Name != nil {
45445		objectMap["name"] = vcrc.Name
45446	}
45447	if vcrc.ID != nil {
45448		objectMap["id"] = vcrc.ID
45449	}
45450	return json.Marshal(objectMap)
45451}
45452
45453// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
45454func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
45455	var m map[string]*json.RawMessage
45456	err := json.Unmarshal(body, &m)
45457	if err != nil {
45458		return err
45459	}
45460	for k, v := range m {
45461		switch k {
45462		case "properties":
45463			if v != nil {
45464				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
45465				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
45466				if err != nil {
45467					return err
45468				}
45469				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
45470			}
45471		case "name":
45472			if v != nil {
45473				var name string
45474				err = json.Unmarshal(*v, &name)
45475				if err != nil {
45476					return err
45477				}
45478				vcrc.Name = &name
45479			}
45480		case "etag":
45481			if v != nil {
45482				var etag string
45483				err = json.Unmarshal(*v, &etag)
45484				if err != nil {
45485					return err
45486				}
45487				vcrc.Etag = &etag
45488			}
45489		case "id":
45490			if v != nil {
45491				var ID string
45492				err = json.Unmarshal(*v, &ID)
45493				if err != nil {
45494					return err
45495				}
45496				vcrc.ID = &ID
45497			}
45498		}
45499	}
45500
45501	return nil
45502}
45503
45504// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway.
45505type VpnClientRootCertificatePropertiesFormat struct {
45506	// PublicCertData - The certificate public data.
45507	PublicCertData *string `json:"publicCertData,omitempty"`
45508	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
45509	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
45510}
45511
45512// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
45513func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
45514	objectMap := make(map[string]interface{})
45515	if vcrcpf.PublicCertData != nil {
45516		objectMap["publicCertData"] = vcrcpf.PublicCertData
45517	}
45518	return json.Marshal(objectMap)
45519}
45520
45521// VpnConnection vpnConnection Resource.
45522type VpnConnection struct {
45523	autorest.Response `json:"-"`
45524	// VpnConnectionProperties - Properties of the VPN connection.
45525	*VpnConnectionProperties `json:"properties,omitempty"`
45526	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
45527	Name *string `json:"name,omitempty"`
45528	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
45529	Etag *string `json:"etag,omitempty"`
45530	// ID - Resource ID.
45531	ID *string `json:"id,omitempty"`
45532}
45533
45534// MarshalJSON is the custom marshaler for VpnConnection.
45535func (vc VpnConnection) MarshalJSON() ([]byte, error) {
45536	objectMap := make(map[string]interface{})
45537	if vc.VpnConnectionProperties != nil {
45538		objectMap["properties"] = vc.VpnConnectionProperties
45539	}
45540	if vc.Name != nil {
45541		objectMap["name"] = vc.Name
45542	}
45543	if vc.ID != nil {
45544		objectMap["id"] = vc.ID
45545	}
45546	return json.Marshal(objectMap)
45547}
45548
45549// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
45550func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
45551	var m map[string]*json.RawMessage
45552	err := json.Unmarshal(body, &m)
45553	if err != nil {
45554		return err
45555	}
45556	for k, v := range m {
45557		switch k {
45558		case "properties":
45559			if v != nil {
45560				var vpnConnectionProperties VpnConnectionProperties
45561				err = json.Unmarshal(*v, &vpnConnectionProperties)
45562				if err != nil {
45563					return err
45564				}
45565				vc.VpnConnectionProperties = &vpnConnectionProperties
45566			}
45567		case "name":
45568			if v != nil {
45569				var name string
45570				err = json.Unmarshal(*v, &name)
45571				if err != nil {
45572					return err
45573				}
45574				vc.Name = &name
45575			}
45576		case "etag":
45577			if v != nil {
45578				var etag string
45579				err = json.Unmarshal(*v, &etag)
45580				if err != nil {
45581					return err
45582				}
45583				vc.Etag = &etag
45584			}
45585		case "id":
45586			if v != nil {
45587				var ID string
45588				err = json.Unmarshal(*v, &ID)
45589				if err != nil {
45590					return err
45591				}
45592				vc.ID = &ID
45593			}
45594		}
45595	}
45596
45597	return nil
45598}
45599
45600// VpnConnectionPacketCaptureStartParameters vpn Connection packet capture parameters supplied to start
45601// packet capture on gateway connection.
45602type VpnConnectionPacketCaptureStartParameters struct {
45603	// FilterData - Start Packet capture parameters on vpn connection.
45604	FilterData *string `json:"filterData,omitempty"`
45605	// LinkConnectionNames - List of site link connection names.
45606	LinkConnectionNames *[]string `json:"linkConnectionNames,omitempty"`
45607}
45608
45609// VpnConnectionPacketCaptureStopParameters vpn Connection packet capture parameters supplied to stop
45610// packet capture on gateway connection.
45611type VpnConnectionPacketCaptureStopParameters struct {
45612	// SasURL - SAS url for packet capture on vpn connection.
45613	SasURL *string `json:"sasUrl,omitempty"`
45614	// LinkConnectionNames - List of site link connection names.
45615	LinkConnectionNames *[]string `json:"linkConnectionNames,omitempty"`
45616}
45617
45618// VpnConnectionProperties parameters for VpnConnection.
45619type VpnConnectionProperties struct {
45620	// RemoteVpnSite - Id of the connected vpn site.
45621	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
45622	// RoutingWeight - Routing weight for vpn connection.
45623	RoutingWeight *int32 `json:"routingWeight,omitempty"`
45624	// DpdTimeoutSeconds - DPD timeout in seconds for vpn connection.
45625	DpdTimeoutSeconds *int32 `json:"dpdTimeoutSeconds,omitempty"`
45626	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
45627	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
45628	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'VirtualNetworkGatewayConnectionProtocolIKEv2', 'VirtualNetworkGatewayConnectionProtocolIKEv1'
45629	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
45630	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
45631	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
45632	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
45633	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
45634	// ConnectionBandwidth - Expected bandwidth in MBPS.
45635	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
45636	// SharedKey - SharedKey for the vpn connection.
45637	SharedKey *string `json:"sharedKey,omitempty"`
45638	// EnableBgp - EnableBgp flag.
45639	EnableBgp *bool `json:"enableBgp,omitempty"`
45640	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
45641	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
45642	// IpsecPolicies - The IPSec Policies to be considered by this connection.
45643	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
45644	// TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection.
45645	TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"`
45646	// EnableRateLimiting - EnableBgp flag.
45647	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
45648	// EnableInternetSecurity - Enable internet security.
45649	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
45650	// UseLocalAzureIPAddress - Use local azure ip to initiate connection.
45651	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
45652	// ProvisioningState - READ-ONLY; The provisioning state of the VPN connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
45653	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
45654	// VpnLinkConnections - List of all vpn site link connections to the gateway.
45655	VpnLinkConnections *[]VpnSiteLinkConnection `json:"vpnLinkConnections,omitempty"`
45656	// RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection.
45657	RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"`
45658}
45659
45660// MarshalJSON is the custom marshaler for VpnConnectionProperties.
45661func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
45662	objectMap := make(map[string]interface{})
45663	if vcp.RemoteVpnSite != nil {
45664		objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
45665	}
45666	if vcp.RoutingWeight != nil {
45667		objectMap["routingWeight"] = vcp.RoutingWeight
45668	}
45669	if vcp.DpdTimeoutSeconds != nil {
45670		objectMap["dpdTimeoutSeconds"] = vcp.DpdTimeoutSeconds
45671	}
45672	if vcp.ConnectionStatus != "" {
45673		objectMap["connectionStatus"] = vcp.ConnectionStatus
45674	}
45675	if vcp.VpnConnectionProtocolType != "" {
45676		objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType
45677	}
45678	if vcp.ConnectionBandwidth != nil {
45679		objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth
45680	}
45681	if vcp.SharedKey != nil {
45682		objectMap["sharedKey"] = vcp.SharedKey
45683	}
45684	if vcp.EnableBgp != nil {
45685		objectMap["enableBgp"] = vcp.EnableBgp
45686	}
45687	if vcp.UsePolicyBasedTrafficSelectors != nil {
45688		objectMap["usePolicyBasedTrafficSelectors"] = vcp.UsePolicyBasedTrafficSelectors
45689	}
45690	if vcp.IpsecPolicies != nil {
45691		objectMap["ipsecPolicies"] = vcp.IpsecPolicies
45692	}
45693	if vcp.TrafficSelectorPolicies != nil {
45694		objectMap["trafficSelectorPolicies"] = vcp.TrafficSelectorPolicies
45695	}
45696	if vcp.EnableRateLimiting != nil {
45697		objectMap["enableRateLimiting"] = vcp.EnableRateLimiting
45698	}
45699	if vcp.EnableInternetSecurity != nil {
45700		objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity
45701	}
45702	if vcp.UseLocalAzureIPAddress != nil {
45703		objectMap["useLocalAzureIpAddress"] = vcp.UseLocalAzureIPAddress
45704	}
45705	if vcp.VpnLinkConnections != nil {
45706		objectMap["vpnLinkConnections"] = vcp.VpnLinkConnections
45707	}
45708	if vcp.RoutingConfiguration != nil {
45709		objectMap["routingConfiguration"] = vcp.RoutingConfiguration
45710	}
45711	return json.Marshal(objectMap)
45712}
45713
45714// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
45715// long-running operation.
45716type VpnConnectionsCreateOrUpdateFuture struct {
45717	azure.FutureAPI
45718	// Result returns the result of the asynchronous operation.
45719	// If the operation has not completed it will return an error.
45720	Result func(VpnConnectionsClient) (VpnConnection, error)
45721}
45722
45723// UnmarshalJSON is the custom unmarshaller for CreateFuture.
45724func (future *VpnConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
45725	var azFuture azure.Future
45726	if err := json.Unmarshal(body, &azFuture); err != nil {
45727		return err
45728	}
45729	future.FutureAPI = &azFuture
45730	future.Result = future.result
45731	return nil
45732}
45733
45734// result is the default implementation for VpnConnectionsCreateOrUpdateFuture.Result.
45735func (future *VpnConnectionsCreateOrUpdateFuture) result(client VpnConnectionsClient) (vc VpnConnection, err error) {
45736	var done bool
45737	done, err = future.DoneWithContext(context.Background(), client)
45738	if err != nil {
45739		err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
45740		return
45741	}
45742	if !done {
45743		vc.Response.Response = future.Response()
45744		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture")
45745		return
45746	}
45747	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
45748	if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
45749		vc, err = client.CreateOrUpdateResponder(vc.Response.Response)
45750		if err != nil {
45751			err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
45752		}
45753	}
45754	return
45755}
45756
45757// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
45758// operation.
45759type VpnConnectionsDeleteFuture struct {
45760	azure.FutureAPI
45761	// Result returns the result of the asynchronous operation.
45762	// If the operation has not completed it will return an error.
45763	Result func(VpnConnectionsClient) (autorest.Response, error)
45764}
45765
45766// UnmarshalJSON is the custom unmarshaller for CreateFuture.
45767func (future *VpnConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
45768	var azFuture azure.Future
45769	if err := json.Unmarshal(body, &azFuture); err != nil {
45770		return err
45771	}
45772	future.FutureAPI = &azFuture
45773	future.Result = future.result
45774	return nil
45775}
45776
45777// result is the default implementation for VpnConnectionsDeleteFuture.Result.
45778func (future *VpnConnectionsDeleteFuture) result(client VpnConnectionsClient) (ar autorest.Response, err error) {
45779	var done bool
45780	done, err = future.DoneWithContext(context.Background(), client)
45781	if err != nil {
45782		err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
45783		return
45784	}
45785	if !done {
45786		ar.Response = future.Response()
45787		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture")
45788		return
45789	}
45790	ar.Response = future.Response()
45791	return
45792}
45793
45794// VpnConnectionsStartPacketCaptureFuture an abstraction for monitoring and retrieving the results of a
45795// long-running operation.
45796type VpnConnectionsStartPacketCaptureFuture struct {
45797	azure.FutureAPI
45798	// Result returns the result of the asynchronous operation.
45799	// If the operation has not completed it will return an error.
45800	Result func(VpnConnectionsClient) (String, error)
45801}
45802
45803// UnmarshalJSON is the custom unmarshaller for CreateFuture.
45804func (future *VpnConnectionsStartPacketCaptureFuture) UnmarshalJSON(body []byte) error {
45805	var azFuture azure.Future
45806	if err := json.Unmarshal(body, &azFuture); err != nil {
45807		return err
45808	}
45809	future.FutureAPI = &azFuture
45810	future.Result = future.result
45811	return nil
45812}
45813
45814// result is the default implementation for VpnConnectionsStartPacketCaptureFuture.Result.
45815func (future *VpnConnectionsStartPacketCaptureFuture) result(client VpnConnectionsClient) (s String, err error) {
45816	var done bool
45817	done, err = future.DoneWithContext(context.Background(), client)
45818	if err != nil {
45819		err = autorest.NewErrorWithError(err, "network.VpnConnectionsStartPacketCaptureFuture", "Result", future.Response(), "Polling failure")
45820		return
45821	}
45822	if !done {
45823		s.Response.Response = future.Response()
45824		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsStartPacketCaptureFuture")
45825		return
45826	}
45827	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
45828	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
45829		s, err = client.StartPacketCaptureResponder(s.Response.Response)
45830		if err != nil {
45831			err = autorest.NewErrorWithError(err, "network.VpnConnectionsStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
45832		}
45833	}
45834	return
45835}
45836
45837// VpnConnectionsStopPacketCaptureFuture an abstraction for monitoring and retrieving the results of a
45838// long-running operation.
45839type VpnConnectionsStopPacketCaptureFuture struct {
45840	azure.FutureAPI
45841	// Result returns the result of the asynchronous operation.
45842	// If the operation has not completed it will return an error.
45843	Result func(VpnConnectionsClient) (String, error)
45844}
45845
45846// UnmarshalJSON is the custom unmarshaller for CreateFuture.
45847func (future *VpnConnectionsStopPacketCaptureFuture) UnmarshalJSON(body []byte) error {
45848	var azFuture azure.Future
45849	if err := json.Unmarshal(body, &azFuture); err != nil {
45850		return err
45851	}
45852	future.FutureAPI = &azFuture
45853	future.Result = future.result
45854	return nil
45855}
45856
45857// result is the default implementation for VpnConnectionsStopPacketCaptureFuture.Result.
45858func (future *VpnConnectionsStopPacketCaptureFuture) result(client VpnConnectionsClient) (s String, err error) {
45859	var done bool
45860	done, err = future.DoneWithContext(context.Background(), client)
45861	if err != nil {
45862		err = autorest.NewErrorWithError(err, "network.VpnConnectionsStopPacketCaptureFuture", "Result", future.Response(), "Polling failure")
45863		return
45864	}
45865	if !done {
45866		s.Response.Response = future.Response()
45867		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsStopPacketCaptureFuture")
45868		return
45869	}
45870	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
45871	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
45872		s, err = client.StopPacketCaptureResponder(s.Response.Response)
45873		if err != nil {
45874			err = autorest.NewErrorWithError(err, "network.VpnConnectionsStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
45875		}
45876	}
45877	return
45878}
45879
45880// VpnDeviceScriptParameters vpn device configuration script generation parameters.
45881type VpnDeviceScriptParameters struct {
45882	// Vendor - The vendor for the vpn device.
45883	Vendor *string `json:"vendor,omitempty"`
45884	// DeviceFamily - The device family for the vpn device.
45885	DeviceFamily *string `json:"deviceFamily,omitempty"`
45886	// FirmwareVersion - The firmware version for the vpn device.
45887	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
45888}
45889
45890// VpnGateway vpnGateway Resource.
45891type VpnGateway struct {
45892	autorest.Response `json:"-"`
45893	// VpnGatewayProperties - Properties of the VPN gateway.
45894	*VpnGatewayProperties `json:"properties,omitempty"`
45895	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
45896	Etag *string `json:"etag,omitempty"`
45897	// ID - Resource ID.
45898	ID *string `json:"id,omitempty"`
45899	// Name - READ-ONLY; Resource name.
45900	Name *string `json:"name,omitempty"`
45901	// Type - READ-ONLY; Resource type.
45902	Type *string `json:"type,omitempty"`
45903	// Location - Resource location.
45904	Location *string `json:"location,omitempty"`
45905	// Tags - Resource tags.
45906	Tags map[string]*string `json:"tags"`
45907}
45908
45909// MarshalJSON is the custom marshaler for VpnGateway.
45910func (vg VpnGateway) MarshalJSON() ([]byte, error) {
45911	objectMap := make(map[string]interface{})
45912	if vg.VpnGatewayProperties != nil {
45913		objectMap["properties"] = vg.VpnGatewayProperties
45914	}
45915	if vg.ID != nil {
45916		objectMap["id"] = vg.ID
45917	}
45918	if vg.Location != nil {
45919		objectMap["location"] = vg.Location
45920	}
45921	if vg.Tags != nil {
45922		objectMap["tags"] = vg.Tags
45923	}
45924	return json.Marshal(objectMap)
45925}
45926
45927// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
45928func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
45929	var m map[string]*json.RawMessage
45930	err := json.Unmarshal(body, &m)
45931	if err != nil {
45932		return err
45933	}
45934	for k, v := range m {
45935		switch k {
45936		case "properties":
45937			if v != nil {
45938				var vpnGatewayProperties VpnGatewayProperties
45939				err = json.Unmarshal(*v, &vpnGatewayProperties)
45940				if err != nil {
45941					return err
45942				}
45943				vg.VpnGatewayProperties = &vpnGatewayProperties
45944			}
45945		case "etag":
45946			if v != nil {
45947				var etag string
45948				err = json.Unmarshal(*v, &etag)
45949				if err != nil {
45950					return err
45951				}
45952				vg.Etag = &etag
45953			}
45954		case "id":
45955			if v != nil {
45956				var ID string
45957				err = json.Unmarshal(*v, &ID)
45958				if err != nil {
45959					return err
45960				}
45961				vg.ID = &ID
45962			}
45963		case "name":
45964			if v != nil {
45965				var name string
45966				err = json.Unmarshal(*v, &name)
45967				if err != nil {
45968					return err
45969				}
45970				vg.Name = &name
45971			}
45972		case "type":
45973			if v != nil {
45974				var typeVar string
45975				err = json.Unmarshal(*v, &typeVar)
45976				if err != nil {
45977					return err
45978				}
45979				vg.Type = &typeVar
45980			}
45981		case "location":
45982			if v != nil {
45983				var location string
45984				err = json.Unmarshal(*v, &location)
45985				if err != nil {
45986					return err
45987				}
45988				vg.Location = &location
45989			}
45990		case "tags":
45991			if v != nil {
45992				var tags map[string]*string
45993				err = json.Unmarshal(*v, &tags)
45994				if err != nil {
45995					return err
45996				}
45997				vg.Tags = tags
45998			}
45999		}
46000	}
46001
46002	return nil
46003}
46004
46005// VpnGatewayIPConfiguration IP Configuration of a VPN Gateway Resource.
46006type VpnGatewayIPConfiguration struct {
46007	// ID - The identifier of the IP configuration for a VPN Gateway.
46008	ID *string `json:"id,omitempty"`
46009	// PublicIPAddress - The public IP address of this IP configuration.
46010	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
46011	// PrivateIPAddress - The private IP address of this IP configuration.
46012	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
46013}
46014
46015// VpnGatewayNatRule vpnGatewayNatRule Resource.
46016type VpnGatewayNatRule struct {
46017	autorest.Response `json:"-"`
46018	// VpnGatewayNatRuleProperties - Properties of the VpnGateway NAT rule.
46019	*VpnGatewayNatRuleProperties `json:"properties,omitempty"`
46020	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
46021	Name *string `json:"name,omitempty"`
46022	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
46023	Etag *string `json:"etag,omitempty"`
46024	// Type - READ-ONLY; Resource type.
46025	Type *string `json:"type,omitempty"`
46026	// ID - Resource ID.
46027	ID *string `json:"id,omitempty"`
46028}
46029
46030// MarshalJSON is the custom marshaler for VpnGatewayNatRule.
46031func (vgnr VpnGatewayNatRule) MarshalJSON() ([]byte, error) {
46032	objectMap := make(map[string]interface{})
46033	if vgnr.VpnGatewayNatRuleProperties != nil {
46034		objectMap["properties"] = vgnr.VpnGatewayNatRuleProperties
46035	}
46036	if vgnr.Name != nil {
46037		objectMap["name"] = vgnr.Name
46038	}
46039	if vgnr.ID != nil {
46040		objectMap["id"] = vgnr.ID
46041	}
46042	return json.Marshal(objectMap)
46043}
46044
46045// UnmarshalJSON is the custom unmarshaler for VpnGatewayNatRule struct.
46046func (vgnr *VpnGatewayNatRule) UnmarshalJSON(body []byte) error {
46047	var m map[string]*json.RawMessage
46048	err := json.Unmarshal(body, &m)
46049	if err != nil {
46050		return err
46051	}
46052	for k, v := range m {
46053		switch k {
46054		case "properties":
46055			if v != nil {
46056				var vpnGatewayNatRuleProperties VpnGatewayNatRuleProperties
46057				err = json.Unmarshal(*v, &vpnGatewayNatRuleProperties)
46058				if err != nil {
46059					return err
46060				}
46061				vgnr.VpnGatewayNatRuleProperties = &vpnGatewayNatRuleProperties
46062			}
46063		case "name":
46064			if v != nil {
46065				var name string
46066				err = json.Unmarshal(*v, &name)
46067				if err != nil {
46068					return err
46069				}
46070				vgnr.Name = &name
46071			}
46072		case "etag":
46073			if v != nil {
46074				var etag string
46075				err = json.Unmarshal(*v, &etag)
46076				if err != nil {
46077					return err
46078				}
46079				vgnr.Etag = &etag
46080			}
46081		case "type":
46082			if v != nil {
46083				var typeVar string
46084				err = json.Unmarshal(*v, &typeVar)
46085				if err != nil {
46086					return err
46087				}
46088				vgnr.Type = &typeVar
46089			}
46090		case "id":
46091			if v != nil {
46092				var ID string
46093				err = json.Unmarshal(*v, &ID)
46094				if err != nil {
46095					return err
46096				}
46097				vgnr.ID = &ID
46098			}
46099		}
46100	}
46101
46102	return nil
46103}
46104
46105// VpnGatewayNatRuleProperties parameters for VpnGatewayNatRule.
46106type VpnGatewayNatRuleProperties struct {
46107	// ProvisioningState - READ-ONLY; The provisioning state of the NAT Rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
46108	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
46109	// Type - The type of NAT rule for VPN NAT. Possible values include: 'VpnNatRuleTypeStatic', 'VpnNatRuleTypeDynamic'
46110	Type VpnNatRuleType `json:"type,omitempty"`
46111	// Mode - The Source NAT direction of a VPN NAT. Possible values include: 'VpnNatRuleModeEgressSnat', 'VpnNatRuleModeIngressSnat'
46112	Mode VpnNatRuleMode `json:"mode,omitempty"`
46113	// InternalMappings - The private IP address internal mapping for NAT.
46114	InternalMappings *[]VpnNatRuleMapping `json:"internalMappings,omitempty"`
46115	// ExternalMappings - The private IP address external mapping for NAT.
46116	ExternalMappings *[]VpnNatRuleMapping `json:"externalMappings,omitempty"`
46117	// IPConfigurationID - The IP Configuration ID this NAT rule applies to.
46118	IPConfigurationID *string `json:"ipConfigurationId,omitempty"`
46119	// EgressVpnSiteLinkConnections - READ-ONLY; List of egress VpnSiteLinkConnections.
46120	EgressVpnSiteLinkConnections *[]SubResource `json:"egressVpnSiteLinkConnections,omitempty"`
46121	// IngressVpnSiteLinkConnections - READ-ONLY; List of ingress VpnSiteLinkConnections.
46122	IngressVpnSiteLinkConnections *[]SubResource `json:"ingressVpnSiteLinkConnections,omitempty"`
46123}
46124
46125// MarshalJSON is the custom marshaler for VpnGatewayNatRuleProperties.
46126func (vgnrp VpnGatewayNatRuleProperties) MarshalJSON() ([]byte, error) {
46127	objectMap := make(map[string]interface{})
46128	if vgnrp.Type != "" {
46129		objectMap["type"] = vgnrp.Type
46130	}
46131	if vgnrp.Mode != "" {
46132		objectMap["mode"] = vgnrp.Mode
46133	}
46134	if vgnrp.InternalMappings != nil {
46135		objectMap["internalMappings"] = vgnrp.InternalMappings
46136	}
46137	if vgnrp.ExternalMappings != nil {
46138		objectMap["externalMappings"] = vgnrp.ExternalMappings
46139	}
46140	if vgnrp.IPConfigurationID != nil {
46141		objectMap["ipConfigurationId"] = vgnrp.IPConfigurationID
46142	}
46143	return json.Marshal(objectMap)
46144}
46145
46146// VpnGatewayPacketCaptureStartParameters start packet capture parameters.
46147type VpnGatewayPacketCaptureStartParameters struct {
46148	// FilterData - Start Packet capture parameters on vpn gateway.
46149	FilterData *string `json:"filterData,omitempty"`
46150}
46151
46152// VpnGatewayPacketCaptureStopParameters stop packet capture parameters.
46153type VpnGatewayPacketCaptureStopParameters struct {
46154	// SasURL - SAS url for packet capture on vpn gateway.
46155	SasURL *string `json:"sasUrl,omitempty"`
46156}
46157
46158// VpnGatewayProperties parameters for VpnGateway.
46159type VpnGatewayProperties struct {
46160	// VirtualHub - The VirtualHub to which the gateway belongs.
46161	VirtualHub *SubResource `json:"virtualHub,omitempty"`
46162	// Connections - List of all vpn connections to the gateway.
46163	Connections *[]VpnConnection `json:"connections,omitempty"`
46164	// BgpSettings - Local network gateway's BGP speaker settings.
46165	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
46166	// ProvisioningState - READ-ONLY; The provisioning state of the VPN gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
46167	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
46168	// VpnGatewayScaleUnit - The scale unit for this vpn gateway.
46169	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
46170	// IPConfigurations - READ-ONLY; List of all IPs configured on the gateway.
46171	IPConfigurations *[]VpnGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
46172	// IsRoutingPreferenceInternet - Enable Routing Preference property for the Public IP Interface of the VpnGateway.
46173	IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"`
46174	// NatRules - List of all the nat Rules associated with the gateway.
46175	NatRules *[]VpnGatewayNatRule `json:"natRules,omitempty"`
46176}
46177
46178// MarshalJSON is the custom marshaler for VpnGatewayProperties.
46179func (vgp VpnGatewayProperties) MarshalJSON() ([]byte, error) {
46180	objectMap := make(map[string]interface{})
46181	if vgp.VirtualHub != nil {
46182		objectMap["virtualHub"] = vgp.VirtualHub
46183	}
46184	if vgp.Connections != nil {
46185		objectMap["connections"] = vgp.Connections
46186	}
46187	if vgp.BgpSettings != nil {
46188		objectMap["bgpSettings"] = vgp.BgpSettings
46189	}
46190	if vgp.VpnGatewayScaleUnit != nil {
46191		objectMap["vpnGatewayScaleUnit"] = vgp.VpnGatewayScaleUnit
46192	}
46193	if vgp.IsRoutingPreferenceInternet != nil {
46194		objectMap["isRoutingPreferenceInternet"] = vgp.IsRoutingPreferenceInternet
46195	}
46196	if vgp.NatRules != nil {
46197		objectMap["natRules"] = vgp.NatRules
46198	}
46199	return json.Marshal(objectMap)
46200}
46201
46202// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
46203// long-running operation.
46204type VpnGatewaysCreateOrUpdateFuture struct {
46205	azure.FutureAPI
46206	// Result returns the result of the asynchronous operation.
46207	// If the operation has not completed it will return an error.
46208	Result func(VpnGatewaysClient) (VpnGateway, error)
46209}
46210
46211// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46212func (future *VpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
46213	var azFuture azure.Future
46214	if err := json.Unmarshal(body, &azFuture); err != nil {
46215		return err
46216	}
46217	future.FutureAPI = &azFuture
46218	future.Result = future.result
46219	return nil
46220}
46221
46222// result is the default implementation for VpnGatewaysCreateOrUpdateFuture.Result.
46223func (future *VpnGatewaysCreateOrUpdateFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
46224	var done bool
46225	done, err = future.DoneWithContext(context.Background(), client)
46226	if err != nil {
46227		err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
46228		return
46229	}
46230	if !done {
46231		vg.Response.Response = future.Response()
46232		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture")
46233		return
46234	}
46235	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
46236	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
46237		vg, err = client.CreateOrUpdateResponder(vg.Response.Response)
46238		if err != nil {
46239			err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request")
46240		}
46241	}
46242	return
46243}
46244
46245// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
46246// operation.
46247type VpnGatewaysDeleteFuture struct {
46248	azure.FutureAPI
46249	// Result returns the result of the asynchronous operation.
46250	// If the operation has not completed it will return an error.
46251	Result func(VpnGatewaysClient) (autorest.Response, error)
46252}
46253
46254// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46255func (future *VpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
46256	var azFuture azure.Future
46257	if err := json.Unmarshal(body, &azFuture); err != nil {
46258		return err
46259	}
46260	future.FutureAPI = &azFuture
46261	future.Result = future.result
46262	return nil
46263}
46264
46265// result is the default implementation for VpnGatewaysDeleteFuture.Result.
46266func (future *VpnGatewaysDeleteFuture) result(client VpnGatewaysClient) (ar autorest.Response, err error) {
46267	var done bool
46268	done, err = future.DoneWithContext(context.Background(), client)
46269	if err != nil {
46270		err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
46271		return
46272	}
46273	if !done {
46274		ar.Response = future.Response()
46275		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture")
46276		return
46277	}
46278	ar.Response = future.Response()
46279	return
46280}
46281
46282// VpnGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running
46283// operation.
46284type VpnGatewaysResetFuture struct {
46285	azure.FutureAPI
46286	// Result returns the result of the asynchronous operation.
46287	// If the operation has not completed it will return an error.
46288	Result func(VpnGatewaysClient) (VpnGateway, error)
46289}
46290
46291// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46292func (future *VpnGatewaysResetFuture) UnmarshalJSON(body []byte) error {
46293	var azFuture azure.Future
46294	if err := json.Unmarshal(body, &azFuture); err != nil {
46295		return err
46296	}
46297	future.FutureAPI = &azFuture
46298	future.Result = future.result
46299	return nil
46300}
46301
46302// result is the default implementation for VpnGatewaysResetFuture.Result.
46303func (future *VpnGatewaysResetFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
46304	var done bool
46305	done, err = future.DoneWithContext(context.Background(), client)
46306	if err != nil {
46307		err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", future.Response(), "Polling failure")
46308		return
46309	}
46310	if !done {
46311		vg.Response.Response = future.Response()
46312		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysResetFuture")
46313		return
46314	}
46315	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
46316	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
46317		vg, err = client.ResetResponder(vg.Response.Response)
46318		if err != nil {
46319			err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", vg.Response.Response, "Failure responding to request")
46320		}
46321	}
46322	return
46323}
46324
46325// VpnGatewaysStartPacketCaptureFuture an abstraction for monitoring and retrieving the results of a
46326// long-running operation.
46327type VpnGatewaysStartPacketCaptureFuture struct {
46328	azure.FutureAPI
46329	// Result returns the result of the asynchronous operation.
46330	// If the operation has not completed it will return an error.
46331	Result func(VpnGatewaysClient) (String, error)
46332}
46333
46334// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46335func (future *VpnGatewaysStartPacketCaptureFuture) UnmarshalJSON(body []byte) error {
46336	var azFuture azure.Future
46337	if err := json.Unmarshal(body, &azFuture); err != nil {
46338		return err
46339	}
46340	future.FutureAPI = &azFuture
46341	future.Result = future.result
46342	return nil
46343}
46344
46345// result is the default implementation for VpnGatewaysStartPacketCaptureFuture.Result.
46346func (future *VpnGatewaysStartPacketCaptureFuture) result(client VpnGatewaysClient) (s String, err error) {
46347	var done bool
46348	done, err = future.DoneWithContext(context.Background(), client)
46349	if err != nil {
46350		err = autorest.NewErrorWithError(err, "network.VpnGatewaysStartPacketCaptureFuture", "Result", future.Response(), "Polling failure")
46351		return
46352	}
46353	if !done {
46354		s.Response.Response = future.Response()
46355		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysStartPacketCaptureFuture")
46356		return
46357	}
46358	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
46359	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
46360		s, err = client.StartPacketCaptureResponder(s.Response.Response)
46361		if err != nil {
46362			err = autorest.NewErrorWithError(err, "network.VpnGatewaysStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
46363		}
46364	}
46365	return
46366}
46367
46368// VpnGatewaysStopPacketCaptureFuture an abstraction for monitoring and retrieving the results of a
46369// long-running operation.
46370type VpnGatewaysStopPacketCaptureFuture struct {
46371	azure.FutureAPI
46372	// Result returns the result of the asynchronous operation.
46373	// If the operation has not completed it will return an error.
46374	Result func(VpnGatewaysClient) (String, error)
46375}
46376
46377// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46378func (future *VpnGatewaysStopPacketCaptureFuture) UnmarshalJSON(body []byte) error {
46379	var azFuture azure.Future
46380	if err := json.Unmarshal(body, &azFuture); err != nil {
46381		return err
46382	}
46383	future.FutureAPI = &azFuture
46384	future.Result = future.result
46385	return nil
46386}
46387
46388// result is the default implementation for VpnGatewaysStopPacketCaptureFuture.Result.
46389func (future *VpnGatewaysStopPacketCaptureFuture) result(client VpnGatewaysClient) (s String, err error) {
46390	var done bool
46391	done, err = future.DoneWithContext(context.Background(), client)
46392	if err != nil {
46393		err = autorest.NewErrorWithError(err, "network.VpnGatewaysStopPacketCaptureFuture", "Result", future.Response(), "Polling failure")
46394		return
46395	}
46396	if !done {
46397		s.Response.Response = future.Response()
46398		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysStopPacketCaptureFuture")
46399		return
46400	}
46401	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
46402	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
46403		s, err = client.StopPacketCaptureResponder(s.Response.Response)
46404		if err != nil {
46405			err = autorest.NewErrorWithError(err, "network.VpnGatewaysStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
46406		}
46407	}
46408	return
46409}
46410
46411// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
46412// operation.
46413type VpnGatewaysUpdateTagsFuture struct {
46414	azure.FutureAPI
46415	// Result returns the result of the asynchronous operation.
46416	// If the operation has not completed it will return an error.
46417	Result func(VpnGatewaysClient) (VpnGateway, error)
46418}
46419
46420// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46421func (future *VpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
46422	var azFuture azure.Future
46423	if err := json.Unmarshal(body, &azFuture); err != nil {
46424		return err
46425	}
46426	future.FutureAPI = &azFuture
46427	future.Result = future.result
46428	return nil
46429}
46430
46431// result is the default implementation for VpnGatewaysUpdateTagsFuture.Result.
46432func (future *VpnGatewaysUpdateTagsFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
46433	var done bool
46434	done, err = future.DoneWithContext(context.Background(), client)
46435	if err != nil {
46436		err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
46437		return
46438	}
46439	if !done {
46440		vg.Response.Response = future.Response()
46441		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysUpdateTagsFuture")
46442		return
46443	}
46444	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
46445	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
46446		vg, err = client.UpdateTagsResponder(vg.Response.Response)
46447		if err != nil {
46448			err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", vg.Response.Response, "Failure responding to request")
46449		}
46450	}
46451	return
46452}
46453
46454// VpnLinkBgpSettings BGP settings details for a link.
46455type VpnLinkBgpSettings struct {
46456	// Asn - The BGP speaker's ASN.
46457	Asn *int64 `json:"asn,omitempty"`
46458	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
46459	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
46460}
46461
46462// VpnLinkConnectionsGetIkeSasFuture an abstraction for monitoring and retrieving the results of a
46463// long-running operation.
46464type VpnLinkConnectionsGetIkeSasFuture struct {
46465	azure.FutureAPI
46466	// Result returns the result of the asynchronous operation.
46467	// If the operation has not completed it will return an error.
46468	Result func(VpnLinkConnectionsClient) (String, error)
46469}
46470
46471// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46472func (future *VpnLinkConnectionsGetIkeSasFuture) UnmarshalJSON(body []byte) error {
46473	var azFuture azure.Future
46474	if err := json.Unmarshal(body, &azFuture); err != nil {
46475		return err
46476	}
46477	future.FutureAPI = &azFuture
46478	future.Result = future.result
46479	return nil
46480}
46481
46482// result is the default implementation for VpnLinkConnectionsGetIkeSasFuture.Result.
46483func (future *VpnLinkConnectionsGetIkeSasFuture) result(client VpnLinkConnectionsClient) (s String, err error) {
46484	var done bool
46485	done, err = future.DoneWithContext(context.Background(), client)
46486	if err != nil {
46487		err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsGetIkeSasFuture", "Result", future.Response(), "Polling failure")
46488		return
46489	}
46490	if !done {
46491		s.Response.Response = future.Response()
46492		err = azure.NewAsyncOpIncompleteError("network.VpnLinkConnectionsGetIkeSasFuture")
46493		return
46494	}
46495	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
46496	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
46497		s, err = client.GetIkeSasResponder(s.Response.Response)
46498		if err != nil {
46499			err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsGetIkeSasFuture", "Result", s.Response.Response, "Failure responding to request")
46500		}
46501	}
46502	return
46503}
46504
46505// VpnLinkConnectionsResetConnectionFuture an abstraction for monitoring and retrieving the results of a
46506// long-running operation.
46507type VpnLinkConnectionsResetConnectionFuture struct {
46508	azure.FutureAPI
46509	// Result returns the result of the asynchronous operation.
46510	// If the operation has not completed it will return an error.
46511	Result func(VpnLinkConnectionsClient) (autorest.Response, error)
46512}
46513
46514// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46515func (future *VpnLinkConnectionsResetConnectionFuture) UnmarshalJSON(body []byte) error {
46516	var azFuture azure.Future
46517	if err := json.Unmarshal(body, &azFuture); err != nil {
46518		return err
46519	}
46520	future.FutureAPI = &azFuture
46521	future.Result = future.result
46522	return nil
46523}
46524
46525// result is the default implementation for VpnLinkConnectionsResetConnectionFuture.Result.
46526func (future *VpnLinkConnectionsResetConnectionFuture) result(client VpnLinkConnectionsClient) (ar autorest.Response, err error) {
46527	var done bool
46528	done, err = future.DoneWithContext(context.Background(), client)
46529	if err != nil {
46530		err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsResetConnectionFuture", "Result", future.Response(), "Polling failure")
46531		return
46532	}
46533	if !done {
46534		ar.Response = future.Response()
46535		err = azure.NewAsyncOpIncompleteError("network.VpnLinkConnectionsResetConnectionFuture")
46536		return
46537	}
46538	ar.Response = future.Response()
46539	return
46540}
46541
46542// VpnLinkProviderProperties list of properties of a link provider.
46543type VpnLinkProviderProperties struct {
46544	// LinkProviderName - Name of the link provider.
46545	LinkProviderName *string `json:"linkProviderName,omitempty"`
46546	// LinkSpeedInMbps - Link speed.
46547	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
46548}
46549
46550// VpnNatRuleMapping vpn NatRule mapping.
46551type VpnNatRuleMapping struct {
46552	// AddressSpace - Address space for Vpn NatRule mapping.
46553	AddressSpace *string `json:"addressSpace,omitempty"`
46554}
46555
46556// VpnPacketCaptureStartParameters start packet capture parameters on virtual network gateway.
46557type VpnPacketCaptureStartParameters struct {
46558	// FilterData - Start Packet capture parameters.
46559	FilterData *string `json:"filterData,omitempty"`
46560}
46561
46562// VpnPacketCaptureStopParameters stop packet capture parameters.
46563type VpnPacketCaptureStopParameters struct {
46564	// SasURL - SAS url for packet capture on virtual network gateway.
46565	SasURL *string `json:"sasUrl,omitempty"`
46566}
46567
46568// VpnProfileResponse vpn Profile Response for package generation.
46569type VpnProfileResponse struct {
46570	autorest.Response `json:"-"`
46571	// ProfileURL - URL to the VPN profile.
46572	ProfileURL *string `json:"profileUrl,omitempty"`
46573}
46574
46575// VpnServerConfigRadiusClientRootCertificate properties of the Radius client root certificate of
46576// VpnServerConfiguration.
46577type VpnServerConfigRadiusClientRootCertificate struct {
46578	// Name - The certificate name.
46579	Name *string `json:"name,omitempty"`
46580	// Thumbprint - The Radius client root certificate thumbprint.
46581	Thumbprint *string `json:"thumbprint,omitempty"`
46582}
46583
46584// VpnServerConfigRadiusServerRootCertificate properties of Radius Server root certificate of
46585// VpnServerConfiguration.
46586type VpnServerConfigRadiusServerRootCertificate struct {
46587	// Name - The certificate name.
46588	Name *string `json:"name,omitempty"`
46589	// PublicCertData - The certificate public data.
46590	PublicCertData *string `json:"publicCertData,omitempty"`
46591}
46592
46593// VpnServerConfiguration vpnServerConfiguration Resource.
46594type VpnServerConfiguration struct {
46595	autorest.Response `json:"-"`
46596	// VpnServerConfigurationProperties - Properties of the P2SVpnServer configuration.
46597	*VpnServerConfigurationProperties `json:"properties,omitempty"`
46598	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
46599	Etag *string `json:"etag,omitempty"`
46600	// ID - Resource ID.
46601	ID *string `json:"id,omitempty"`
46602	// Name - READ-ONLY; Resource name.
46603	Name *string `json:"name,omitempty"`
46604	// Type - READ-ONLY; Resource type.
46605	Type *string `json:"type,omitempty"`
46606	// Location - Resource location.
46607	Location *string `json:"location,omitempty"`
46608	// Tags - Resource tags.
46609	Tags map[string]*string `json:"tags"`
46610}
46611
46612// MarshalJSON is the custom marshaler for VpnServerConfiguration.
46613func (vsc VpnServerConfiguration) MarshalJSON() ([]byte, error) {
46614	objectMap := make(map[string]interface{})
46615	if vsc.VpnServerConfigurationProperties != nil {
46616		objectMap["properties"] = vsc.VpnServerConfigurationProperties
46617	}
46618	if vsc.ID != nil {
46619		objectMap["id"] = vsc.ID
46620	}
46621	if vsc.Location != nil {
46622		objectMap["location"] = vsc.Location
46623	}
46624	if vsc.Tags != nil {
46625		objectMap["tags"] = vsc.Tags
46626	}
46627	return json.Marshal(objectMap)
46628}
46629
46630// UnmarshalJSON is the custom unmarshaler for VpnServerConfiguration struct.
46631func (vsc *VpnServerConfiguration) UnmarshalJSON(body []byte) error {
46632	var m map[string]*json.RawMessage
46633	err := json.Unmarshal(body, &m)
46634	if err != nil {
46635		return err
46636	}
46637	for k, v := range m {
46638		switch k {
46639		case "properties":
46640			if v != nil {
46641				var vpnServerConfigurationProperties VpnServerConfigurationProperties
46642				err = json.Unmarshal(*v, &vpnServerConfigurationProperties)
46643				if err != nil {
46644					return err
46645				}
46646				vsc.VpnServerConfigurationProperties = &vpnServerConfigurationProperties
46647			}
46648		case "etag":
46649			if v != nil {
46650				var etag string
46651				err = json.Unmarshal(*v, &etag)
46652				if err != nil {
46653					return err
46654				}
46655				vsc.Etag = &etag
46656			}
46657		case "id":
46658			if v != nil {
46659				var ID string
46660				err = json.Unmarshal(*v, &ID)
46661				if err != nil {
46662					return err
46663				}
46664				vsc.ID = &ID
46665			}
46666		case "name":
46667			if v != nil {
46668				var name string
46669				err = json.Unmarshal(*v, &name)
46670				if err != nil {
46671					return err
46672				}
46673				vsc.Name = &name
46674			}
46675		case "type":
46676			if v != nil {
46677				var typeVar string
46678				err = json.Unmarshal(*v, &typeVar)
46679				if err != nil {
46680					return err
46681				}
46682				vsc.Type = &typeVar
46683			}
46684		case "location":
46685			if v != nil {
46686				var location string
46687				err = json.Unmarshal(*v, &location)
46688				if err != nil {
46689					return err
46690				}
46691				vsc.Location = &location
46692			}
46693		case "tags":
46694			if v != nil {
46695				var tags map[string]*string
46696				err = json.Unmarshal(*v, &tags)
46697				if err != nil {
46698					return err
46699				}
46700				vsc.Tags = tags
46701			}
46702		}
46703	}
46704
46705	return nil
46706}
46707
46708// VpnServerConfigurationProperties parameters for VpnServerConfiguration.
46709type VpnServerConfigurationProperties struct {
46710	// Name - The name of the VpnServerConfiguration that is unique within a resource group.
46711	Name *string `json:"name,omitempty"`
46712	// VpnProtocols - VPN protocols for the VpnServerConfiguration.
46713	VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"`
46714	// VpnAuthenticationTypes - VPN authentication types for the VpnServerConfiguration.
46715	VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"`
46716	// VpnClientRootCertificates - VPN client root certificate of VpnServerConfiguration.
46717	VpnClientRootCertificates *[]VpnServerConfigVpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
46718	// VpnClientRevokedCertificates - VPN client revoked certificate of VpnServerConfiguration.
46719	VpnClientRevokedCertificates *[]VpnServerConfigVpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
46720	// RadiusServerRootCertificates - Radius Server root certificate of VpnServerConfiguration.
46721	RadiusServerRootCertificates *[]VpnServerConfigRadiusServerRootCertificate `json:"radiusServerRootCertificates,omitempty"`
46722	// RadiusClientRootCertificates - Radius client root certificate of VpnServerConfiguration.
46723	RadiusClientRootCertificates *[]VpnServerConfigRadiusClientRootCertificate `json:"radiusClientRootCertificates,omitempty"`
46724	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for VpnServerConfiguration.
46725	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
46726	// RadiusServerAddress - The radius server address property of the VpnServerConfiguration resource for point to site client connection.
46727	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
46728	// RadiusServerSecret - The radius secret property of the VpnServerConfiguration resource for point to site client connection.
46729	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
46730	// RadiusServers - Multiple Radius Server configuration for VpnServerConfiguration.
46731	RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"`
46732	// AadAuthenticationParameters - The set of aad vpn authentication parameters.
46733	AadAuthenticationParameters *AadAuthenticationParameters `json:"aadAuthenticationParameters,omitempty"`
46734	// ProvisioningState - READ-ONLY; The provisioning state of the VpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
46735	ProvisioningState *string `json:"provisioningState,omitempty"`
46736	// P2SVpnGateways - READ-ONLY; List of references to P2SVpnGateways.
46737	P2SVpnGateways *[]P2SVpnGateway `json:"p2SVpnGateways,omitempty"`
46738	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
46739	Etag *string `json:"etag,omitempty"`
46740}
46741
46742// MarshalJSON is the custom marshaler for VpnServerConfigurationProperties.
46743func (vscp VpnServerConfigurationProperties) MarshalJSON() ([]byte, error) {
46744	objectMap := make(map[string]interface{})
46745	if vscp.Name != nil {
46746		objectMap["name"] = vscp.Name
46747	}
46748	if vscp.VpnProtocols != nil {
46749		objectMap["vpnProtocols"] = vscp.VpnProtocols
46750	}
46751	if vscp.VpnAuthenticationTypes != nil {
46752		objectMap["vpnAuthenticationTypes"] = vscp.VpnAuthenticationTypes
46753	}
46754	if vscp.VpnClientRootCertificates != nil {
46755		objectMap["vpnClientRootCertificates"] = vscp.VpnClientRootCertificates
46756	}
46757	if vscp.VpnClientRevokedCertificates != nil {
46758		objectMap["vpnClientRevokedCertificates"] = vscp.VpnClientRevokedCertificates
46759	}
46760	if vscp.RadiusServerRootCertificates != nil {
46761		objectMap["radiusServerRootCertificates"] = vscp.RadiusServerRootCertificates
46762	}
46763	if vscp.RadiusClientRootCertificates != nil {
46764		objectMap["radiusClientRootCertificates"] = vscp.RadiusClientRootCertificates
46765	}
46766	if vscp.VpnClientIpsecPolicies != nil {
46767		objectMap["vpnClientIpsecPolicies"] = vscp.VpnClientIpsecPolicies
46768	}
46769	if vscp.RadiusServerAddress != nil {
46770		objectMap["radiusServerAddress"] = vscp.RadiusServerAddress
46771	}
46772	if vscp.RadiusServerSecret != nil {
46773		objectMap["radiusServerSecret"] = vscp.RadiusServerSecret
46774	}
46775	if vscp.RadiusServers != nil {
46776		objectMap["radiusServers"] = vscp.RadiusServers
46777	}
46778	if vscp.AadAuthenticationParameters != nil {
46779		objectMap["aadAuthenticationParameters"] = vscp.AadAuthenticationParameters
46780	}
46781	return json.Marshal(objectMap)
46782}
46783
46784// VpnServerConfigurationsAssociatedWithVirtualWanListFuture an abstraction for monitoring and retrieving
46785// the results of a long-running operation.
46786type VpnServerConfigurationsAssociatedWithVirtualWanListFuture struct {
46787	azure.FutureAPI
46788	// Result returns the result of the asynchronous operation.
46789	// If the operation has not completed it will return an error.
46790	Result func(VpnServerConfigurationsAssociatedWithVirtualWanClient) (VpnServerConfigurationsResponse, error)
46791}
46792
46793// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46794func (future *VpnServerConfigurationsAssociatedWithVirtualWanListFuture) UnmarshalJSON(body []byte) error {
46795	var azFuture azure.Future
46796	if err := json.Unmarshal(body, &azFuture); err != nil {
46797		return err
46798	}
46799	future.FutureAPI = &azFuture
46800	future.Result = future.result
46801	return nil
46802}
46803
46804// result is the default implementation for VpnServerConfigurationsAssociatedWithVirtualWanListFuture.Result.
46805func (future *VpnServerConfigurationsAssociatedWithVirtualWanListFuture) result(client VpnServerConfigurationsAssociatedWithVirtualWanClient) (vscr VpnServerConfigurationsResponse, err error) {
46806	var done bool
46807	done, err = future.DoneWithContext(context.Background(), client)
46808	if err != nil {
46809		err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture", "Result", future.Response(), "Polling failure")
46810		return
46811	}
46812	if !done {
46813		vscr.Response.Response = future.Response()
46814		err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture")
46815		return
46816	}
46817	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
46818	if vscr.Response.Response, err = future.GetResult(sender); err == nil && vscr.Response.Response.StatusCode != http.StatusNoContent {
46819		vscr, err = client.ListResponder(vscr.Response.Response)
46820		if err != nil {
46821			err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture", "Result", vscr.Response.Response, "Failure responding to request")
46822		}
46823	}
46824	return
46825}
46826
46827// VpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
46828// a long-running operation.
46829type VpnServerConfigurationsCreateOrUpdateFuture struct {
46830	azure.FutureAPI
46831	// Result returns the result of the asynchronous operation.
46832	// If the operation has not completed it will return an error.
46833	Result func(VpnServerConfigurationsClient) (VpnServerConfiguration, error)
46834}
46835
46836// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46837func (future *VpnServerConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
46838	var azFuture azure.Future
46839	if err := json.Unmarshal(body, &azFuture); err != nil {
46840		return err
46841	}
46842	future.FutureAPI = &azFuture
46843	future.Result = future.result
46844	return nil
46845}
46846
46847// result is the default implementation for VpnServerConfigurationsCreateOrUpdateFuture.Result.
46848func (future *VpnServerConfigurationsCreateOrUpdateFuture) result(client VpnServerConfigurationsClient) (vsc VpnServerConfiguration, err error) {
46849	var done bool
46850	done, err = future.DoneWithContext(context.Background(), client)
46851	if err != nil {
46852		err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
46853		return
46854	}
46855	if !done {
46856		vsc.Response.Response = future.Response()
46857		err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsCreateOrUpdateFuture")
46858		return
46859	}
46860	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
46861	if vsc.Response.Response, err = future.GetResult(sender); err == nil && vsc.Response.Response.StatusCode != http.StatusNoContent {
46862		vsc, err = client.CreateOrUpdateResponder(vsc.Response.Response)
46863		if err != nil {
46864			err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsCreateOrUpdateFuture", "Result", vsc.Response.Response, "Failure responding to request")
46865		}
46866	}
46867	return
46868}
46869
46870// VpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
46871// long-running operation.
46872type VpnServerConfigurationsDeleteFuture struct {
46873	azure.FutureAPI
46874	// Result returns the result of the asynchronous operation.
46875	// If the operation has not completed it will return an error.
46876	Result func(VpnServerConfigurationsClient) (autorest.Response, error)
46877}
46878
46879// UnmarshalJSON is the custom unmarshaller for CreateFuture.
46880func (future *VpnServerConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
46881	var azFuture azure.Future
46882	if err := json.Unmarshal(body, &azFuture); err != nil {
46883		return err
46884	}
46885	future.FutureAPI = &azFuture
46886	future.Result = future.result
46887	return nil
46888}
46889
46890// result is the default implementation for VpnServerConfigurationsDeleteFuture.Result.
46891func (future *VpnServerConfigurationsDeleteFuture) result(client VpnServerConfigurationsClient) (ar autorest.Response, err error) {
46892	var done bool
46893	done, err = future.DoneWithContext(context.Background(), client)
46894	if err != nil {
46895		err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
46896		return
46897	}
46898	if !done {
46899		ar.Response = future.Response()
46900		err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsDeleteFuture")
46901		return
46902	}
46903	ar.Response = future.Response()
46904	return
46905}
46906
46907// VpnServerConfigurationsResponse vpnServerConfigurations list associated with VirtualWan Response.
46908type VpnServerConfigurationsResponse struct {
46909	autorest.Response `json:"-"`
46910	// VpnServerConfigurationResourceIds - List of VpnServerConfigurations associated with VirtualWan.
46911	VpnServerConfigurationResourceIds *[]string `json:"vpnServerConfigurationResourceIds,omitempty"`
46912}
46913
46914// VpnServerConfigVpnClientRevokedCertificate properties of the revoked VPN client certificate of
46915// VpnServerConfiguration.
46916type VpnServerConfigVpnClientRevokedCertificate struct {
46917	// Name - The certificate name.
46918	Name *string `json:"name,omitempty"`
46919	// Thumbprint - The revoked VPN client certificate thumbprint.
46920	Thumbprint *string `json:"thumbprint,omitempty"`
46921}
46922
46923// VpnServerConfigVpnClientRootCertificate properties of VPN client root certificate of
46924// VpnServerConfiguration.
46925type VpnServerConfigVpnClientRootCertificate struct {
46926	// Name - The certificate name.
46927	Name *string `json:"name,omitempty"`
46928	// PublicCertData - The certificate public data.
46929	PublicCertData *string `json:"publicCertData,omitempty"`
46930}
46931
46932// VpnSite vpnSite Resource.
46933type VpnSite struct {
46934	autorest.Response `json:"-"`
46935	// VpnSiteProperties - Properties of the VPN site.
46936	*VpnSiteProperties `json:"properties,omitempty"`
46937	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
46938	Etag *string `json:"etag,omitempty"`
46939	// ID - Resource ID.
46940	ID *string `json:"id,omitempty"`
46941	// Name - READ-ONLY; Resource name.
46942	Name *string `json:"name,omitempty"`
46943	// Type - READ-ONLY; Resource type.
46944	Type *string `json:"type,omitempty"`
46945	// Location - Resource location.
46946	Location *string `json:"location,omitempty"`
46947	// Tags - Resource tags.
46948	Tags map[string]*string `json:"tags"`
46949}
46950
46951// MarshalJSON is the custom marshaler for VpnSite.
46952func (vs VpnSite) MarshalJSON() ([]byte, error) {
46953	objectMap := make(map[string]interface{})
46954	if vs.VpnSiteProperties != nil {
46955		objectMap["properties"] = vs.VpnSiteProperties
46956	}
46957	if vs.ID != nil {
46958		objectMap["id"] = vs.ID
46959	}
46960	if vs.Location != nil {
46961		objectMap["location"] = vs.Location
46962	}
46963	if vs.Tags != nil {
46964		objectMap["tags"] = vs.Tags
46965	}
46966	return json.Marshal(objectMap)
46967}
46968
46969// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
46970func (vs *VpnSite) UnmarshalJSON(body []byte) error {
46971	var m map[string]*json.RawMessage
46972	err := json.Unmarshal(body, &m)
46973	if err != nil {
46974		return err
46975	}
46976	for k, v := range m {
46977		switch k {
46978		case "properties":
46979			if v != nil {
46980				var vpnSiteProperties VpnSiteProperties
46981				err = json.Unmarshal(*v, &vpnSiteProperties)
46982				if err != nil {
46983					return err
46984				}
46985				vs.VpnSiteProperties = &vpnSiteProperties
46986			}
46987		case "etag":
46988			if v != nil {
46989				var etag string
46990				err = json.Unmarshal(*v, &etag)
46991				if err != nil {
46992					return err
46993				}
46994				vs.Etag = &etag
46995			}
46996		case "id":
46997			if v != nil {
46998				var ID string
46999				err = json.Unmarshal(*v, &ID)
47000				if err != nil {
47001					return err
47002				}
47003				vs.ID = &ID
47004			}
47005		case "name":
47006			if v != nil {
47007				var name string
47008				err = json.Unmarshal(*v, &name)
47009				if err != nil {
47010					return err
47011				}
47012				vs.Name = &name
47013			}
47014		case "type":
47015			if v != nil {
47016				var typeVar string
47017				err = json.Unmarshal(*v, &typeVar)
47018				if err != nil {
47019					return err
47020				}
47021				vs.Type = &typeVar
47022			}
47023		case "location":
47024			if v != nil {
47025				var location string
47026				err = json.Unmarshal(*v, &location)
47027				if err != nil {
47028					return err
47029				}
47030				vs.Location = &location
47031			}
47032		case "tags":
47033			if v != nil {
47034				var tags map[string]*string
47035				err = json.Unmarshal(*v, &tags)
47036				if err != nil {
47037					return err
47038				}
47039				vs.Tags = tags
47040			}
47041		}
47042	}
47043
47044	return nil
47045}
47046
47047// VpnSiteID vpnSite Resource.
47048type VpnSiteID struct {
47049	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
47050	VpnSite *string `json:"vpnSite,omitempty"`
47051}
47052
47053// MarshalJSON is the custom marshaler for VpnSiteID.
47054func (vsi VpnSiteID) MarshalJSON() ([]byte, error) {
47055	objectMap := make(map[string]interface{})
47056	return json.Marshal(objectMap)
47057}
47058
47059// VpnSiteLink vpnSiteLink Resource.
47060type VpnSiteLink struct {
47061	autorest.Response `json:"-"`
47062	// VpnSiteLinkProperties - Properties of the VPN site link.
47063	*VpnSiteLinkProperties `json:"properties,omitempty"`
47064	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
47065	Etag *string `json:"etag,omitempty"`
47066	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
47067	Name *string `json:"name,omitempty"`
47068	// Type - READ-ONLY; Resource type.
47069	Type *string `json:"type,omitempty"`
47070	// ID - Resource ID.
47071	ID *string `json:"id,omitempty"`
47072}
47073
47074// MarshalJSON is the custom marshaler for VpnSiteLink.
47075func (vsl VpnSiteLink) MarshalJSON() ([]byte, error) {
47076	objectMap := make(map[string]interface{})
47077	if vsl.VpnSiteLinkProperties != nil {
47078		objectMap["properties"] = vsl.VpnSiteLinkProperties
47079	}
47080	if vsl.Name != nil {
47081		objectMap["name"] = vsl.Name
47082	}
47083	if vsl.ID != nil {
47084		objectMap["id"] = vsl.ID
47085	}
47086	return json.Marshal(objectMap)
47087}
47088
47089// UnmarshalJSON is the custom unmarshaler for VpnSiteLink struct.
47090func (vsl *VpnSiteLink) UnmarshalJSON(body []byte) error {
47091	var m map[string]*json.RawMessage
47092	err := json.Unmarshal(body, &m)
47093	if err != nil {
47094		return err
47095	}
47096	for k, v := range m {
47097		switch k {
47098		case "properties":
47099			if v != nil {
47100				var vpnSiteLinkProperties VpnSiteLinkProperties
47101				err = json.Unmarshal(*v, &vpnSiteLinkProperties)
47102				if err != nil {
47103					return err
47104				}
47105				vsl.VpnSiteLinkProperties = &vpnSiteLinkProperties
47106			}
47107		case "etag":
47108			if v != nil {
47109				var etag string
47110				err = json.Unmarshal(*v, &etag)
47111				if err != nil {
47112					return err
47113				}
47114				vsl.Etag = &etag
47115			}
47116		case "name":
47117			if v != nil {
47118				var name string
47119				err = json.Unmarshal(*v, &name)
47120				if err != nil {
47121					return err
47122				}
47123				vsl.Name = &name
47124			}
47125		case "type":
47126			if v != nil {
47127				var typeVar string
47128				err = json.Unmarshal(*v, &typeVar)
47129				if err != nil {
47130					return err
47131				}
47132				vsl.Type = &typeVar
47133			}
47134		case "id":
47135			if v != nil {
47136				var ID string
47137				err = json.Unmarshal(*v, &ID)
47138				if err != nil {
47139					return err
47140				}
47141				vsl.ID = &ID
47142			}
47143		}
47144	}
47145
47146	return nil
47147}
47148
47149// VpnSiteLinkConnection vpnSiteLinkConnection Resource.
47150type VpnSiteLinkConnection struct {
47151	autorest.Response `json:"-"`
47152	// VpnSiteLinkConnectionProperties - Properties of the VPN site link connection.
47153	*VpnSiteLinkConnectionProperties `json:"properties,omitempty"`
47154	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
47155	Name *string `json:"name,omitempty"`
47156	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
47157	Etag *string `json:"etag,omitempty"`
47158	// Type - READ-ONLY; Resource type.
47159	Type *string `json:"type,omitempty"`
47160	// ID - Resource ID.
47161	ID *string `json:"id,omitempty"`
47162}
47163
47164// MarshalJSON is the custom marshaler for VpnSiteLinkConnection.
47165func (vslc VpnSiteLinkConnection) MarshalJSON() ([]byte, error) {
47166	objectMap := make(map[string]interface{})
47167	if vslc.VpnSiteLinkConnectionProperties != nil {
47168		objectMap["properties"] = vslc.VpnSiteLinkConnectionProperties
47169	}
47170	if vslc.Name != nil {
47171		objectMap["name"] = vslc.Name
47172	}
47173	if vslc.ID != nil {
47174		objectMap["id"] = vslc.ID
47175	}
47176	return json.Marshal(objectMap)
47177}
47178
47179// UnmarshalJSON is the custom unmarshaler for VpnSiteLinkConnection struct.
47180func (vslc *VpnSiteLinkConnection) UnmarshalJSON(body []byte) error {
47181	var m map[string]*json.RawMessage
47182	err := json.Unmarshal(body, &m)
47183	if err != nil {
47184		return err
47185	}
47186	for k, v := range m {
47187		switch k {
47188		case "properties":
47189			if v != nil {
47190				var vpnSiteLinkConnectionProperties VpnSiteLinkConnectionProperties
47191				err = json.Unmarshal(*v, &vpnSiteLinkConnectionProperties)
47192				if err != nil {
47193					return err
47194				}
47195				vslc.VpnSiteLinkConnectionProperties = &vpnSiteLinkConnectionProperties
47196			}
47197		case "name":
47198			if v != nil {
47199				var name string
47200				err = json.Unmarshal(*v, &name)
47201				if err != nil {
47202					return err
47203				}
47204				vslc.Name = &name
47205			}
47206		case "etag":
47207			if v != nil {
47208				var etag string
47209				err = json.Unmarshal(*v, &etag)
47210				if err != nil {
47211					return err
47212				}
47213				vslc.Etag = &etag
47214			}
47215		case "type":
47216			if v != nil {
47217				var typeVar string
47218				err = json.Unmarshal(*v, &typeVar)
47219				if err != nil {
47220					return err
47221				}
47222				vslc.Type = &typeVar
47223			}
47224		case "id":
47225			if v != nil {
47226				var ID string
47227				err = json.Unmarshal(*v, &ID)
47228				if err != nil {
47229					return err
47230				}
47231				vslc.ID = &ID
47232			}
47233		}
47234	}
47235
47236	return nil
47237}
47238
47239// VpnSiteLinkConnectionProperties parameters for VpnConnection.
47240type VpnSiteLinkConnectionProperties struct {
47241	// VpnSiteLink - Id of the connected vpn site link.
47242	VpnSiteLink *SubResource `json:"vpnSiteLink,omitempty"`
47243	// RoutingWeight - Routing weight for vpn connection.
47244	RoutingWeight *int32 `json:"routingWeight,omitempty"`
47245	// VpnLinkConnectionMode - Vpn link connection mode. Possible values include: 'VpnLinkConnectionModeDefault', 'VpnLinkConnectionModeResponderOnly', 'VpnLinkConnectionModeInitiatorOnly'
47246	VpnLinkConnectionMode VpnLinkConnectionMode `json:"vpnLinkConnectionMode,omitempty"`
47247	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
47248	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
47249	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'VirtualNetworkGatewayConnectionProtocolIKEv2', 'VirtualNetworkGatewayConnectionProtocolIKEv1'
47250	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
47251	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
47252	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
47253	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
47254	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
47255	// ConnectionBandwidth - Expected bandwidth in MBPS.
47256	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
47257	// SharedKey - SharedKey for the vpn connection.
47258	SharedKey *string `json:"sharedKey,omitempty"`
47259	// EnableBgp - EnableBgp flag.
47260	EnableBgp *bool `json:"enableBgp,omitempty"`
47261	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
47262	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
47263	// IpsecPolicies - The IPSec Policies to be considered by this connection.
47264	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
47265	// EnableRateLimiting - EnableBgp flag.
47266	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
47267	// UseLocalAzureIPAddress - Use local azure ip to initiate connection.
47268	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
47269	// ProvisioningState - READ-ONLY; The provisioning state of the VPN site link connection resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
47270	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
47271	// IngressNatRules - List of ingress NatRules.
47272	IngressNatRules *[]SubResource `json:"ingressNatRules,omitempty"`
47273	// EgressNatRules - List of egress NatRules.
47274	EgressNatRules *[]SubResource `json:"egressNatRules,omitempty"`
47275}
47276
47277// MarshalJSON is the custom marshaler for VpnSiteLinkConnectionProperties.
47278func (vslcp VpnSiteLinkConnectionProperties) MarshalJSON() ([]byte, error) {
47279	objectMap := make(map[string]interface{})
47280	if vslcp.VpnSiteLink != nil {
47281		objectMap["vpnSiteLink"] = vslcp.VpnSiteLink
47282	}
47283	if vslcp.RoutingWeight != nil {
47284		objectMap["routingWeight"] = vslcp.RoutingWeight
47285	}
47286	if vslcp.VpnLinkConnectionMode != "" {
47287		objectMap["vpnLinkConnectionMode"] = vslcp.VpnLinkConnectionMode
47288	}
47289	if vslcp.ConnectionStatus != "" {
47290		objectMap["connectionStatus"] = vslcp.ConnectionStatus
47291	}
47292	if vslcp.VpnConnectionProtocolType != "" {
47293		objectMap["vpnConnectionProtocolType"] = vslcp.VpnConnectionProtocolType
47294	}
47295	if vslcp.ConnectionBandwidth != nil {
47296		objectMap["connectionBandwidth"] = vslcp.ConnectionBandwidth
47297	}
47298	if vslcp.SharedKey != nil {
47299		objectMap["sharedKey"] = vslcp.SharedKey
47300	}
47301	if vslcp.EnableBgp != nil {
47302		objectMap["enableBgp"] = vslcp.EnableBgp
47303	}
47304	if vslcp.UsePolicyBasedTrafficSelectors != nil {
47305		objectMap["usePolicyBasedTrafficSelectors"] = vslcp.UsePolicyBasedTrafficSelectors
47306	}
47307	if vslcp.IpsecPolicies != nil {
47308		objectMap["ipsecPolicies"] = vslcp.IpsecPolicies
47309	}
47310	if vslcp.EnableRateLimiting != nil {
47311		objectMap["enableRateLimiting"] = vslcp.EnableRateLimiting
47312	}
47313	if vslcp.UseLocalAzureIPAddress != nil {
47314		objectMap["useLocalAzureIpAddress"] = vslcp.UseLocalAzureIPAddress
47315	}
47316	if vslcp.IngressNatRules != nil {
47317		objectMap["ingressNatRules"] = vslcp.IngressNatRules
47318	}
47319	if vslcp.EgressNatRules != nil {
47320		objectMap["egressNatRules"] = vslcp.EgressNatRules
47321	}
47322	return json.Marshal(objectMap)
47323}
47324
47325// VpnSiteLinkProperties parameters for VpnSite.
47326type VpnSiteLinkProperties struct {
47327	// LinkProperties - The link provider properties.
47328	LinkProperties *VpnLinkProviderProperties `json:"linkProperties,omitempty"`
47329	// IPAddress - The ip-address for the vpn-site-link.
47330	IPAddress *string `json:"ipAddress,omitempty"`
47331	// Fqdn - FQDN of vpn-site-link.
47332	Fqdn *string `json:"fqdn,omitempty"`
47333	// BgpProperties - The set of bgp properties.
47334	BgpProperties *VpnLinkBgpSettings `json:"bgpProperties,omitempty"`
47335	// ProvisioningState - READ-ONLY; The provisioning state of the VPN site link resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
47336	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
47337}
47338
47339// MarshalJSON is the custom marshaler for VpnSiteLinkProperties.
47340func (vslp VpnSiteLinkProperties) MarshalJSON() ([]byte, error) {
47341	objectMap := make(map[string]interface{})
47342	if vslp.LinkProperties != nil {
47343		objectMap["linkProperties"] = vslp.LinkProperties
47344	}
47345	if vslp.IPAddress != nil {
47346		objectMap["ipAddress"] = vslp.IPAddress
47347	}
47348	if vslp.Fqdn != nil {
47349		objectMap["fqdn"] = vslp.Fqdn
47350	}
47351	if vslp.BgpProperties != nil {
47352		objectMap["bgpProperties"] = vslp.BgpProperties
47353	}
47354	return json.Marshal(objectMap)
47355}
47356
47357// VpnSiteProperties parameters for VpnSite.
47358type VpnSiteProperties struct {
47359	// VirtualWan - The VirtualWAN to which the vpnSite belongs.
47360	VirtualWan *SubResource `json:"virtualWan,omitempty"`
47361	// DeviceProperties - The device properties.
47362	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
47363	// IPAddress - The ip-address for the vpn-site.
47364	IPAddress *string `json:"ipAddress,omitempty"`
47365	// SiteKey - The key for vpn-site that can be used for connections.
47366	SiteKey *string `json:"siteKey,omitempty"`
47367	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
47368	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
47369	// BgpProperties - The set of bgp properties.
47370	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
47371	// ProvisioningState - READ-ONLY; The provisioning state of the VPN site resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
47372	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
47373	// IsSecuritySite - IsSecuritySite flag.
47374	IsSecuritySite *bool `json:"isSecuritySite,omitempty"`
47375	// VpnSiteLinks - List of all vpn site links.
47376	VpnSiteLinks *[]VpnSiteLink `json:"vpnSiteLinks,omitempty"`
47377	// O365Policy - Office365 Policy.
47378	O365Policy *O365PolicyProperties `json:"o365Policy,omitempty"`
47379}
47380
47381// MarshalJSON is the custom marshaler for VpnSiteProperties.
47382func (vsp VpnSiteProperties) MarshalJSON() ([]byte, error) {
47383	objectMap := make(map[string]interface{})
47384	if vsp.VirtualWan != nil {
47385		objectMap["virtualWan"] = vsp.VirtualWan
47386	}
47387	if vsp.DeviceProperties != nil {
47388		objectMap["deviceProperties"] = vsp.DeviceProperties
47389	}
47390	if vsp.IPAddress != nil {
47391		objectMap["ipAddress"] = vsp.IPAddress
47392	}
47393	if vsp.SiteKey != nil {
47394		objectMap["siteKey"] = vsp.SiteKey
47395	}
47396	if vsp.AddressSpace != nil {
47397		objectMap["addressSpace"] = vsp.AddressSpace
47398	}
47399	if vsp.BgpProperties != nil {
47400		objectMap["bgpProperties"] = vsp.BgpProperties
47401	}
47402	if vsp.IsSecuritySite != nil {
47403		objectMap["isSecuritySite"] = vsp.IsSecuritySite
47404	}
47405	if vsp.VpnSiteLinks != nil {
47406		objectMap["vpnSiteLinks"] = vsp.VpnSiteLinks
47407	}
47408	if vsp.O365Policy != nil {
47409		objectMap["o365Policy"] = vsp.O365Policy
47410	}
47411	return json.Marshal(objectMap)
47412}
47413
47414// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
47415// long-running operation.
47416type VpnSitesConfigurationDownloadFuture struct {
47417	azure.FutureAPI
47418	// Result returns the result of the asynchronous operation.
47419	// If the operation has not completed it will return an error.
47420	Result func(VpnSitesConfigurationClient) (autorest.Response, error)
47421}
47422
47423// UnmarshalJSON is the custom unmarshaller for CreateFuture.
47424func (future *VpnSitesConfigurationDownloadFuture) UnmarshalJSON(body []byte) error {
47425	var azFuture azure.Future
47426	if err := json.Unmarshal(body, &azFuture); err != nil {
47427		return err
47428	}
47429	future.FutureAPI = &azFuture
47430	future.Result = future.result
47431	return nil
47432}
47433
47434// result is the default implementation for VpnSitesConfigurationDownloadFuture.Result.
47435func (future *VpnSitesConfigurationDownloadFuture) result(client VpnSitesConfigurationClient) (ar autorest.Response, err error) {
47436	var done bool
47437	done, err = future.DoneWithContext(context.Background(), client)
47438	if err != nil {
47439		err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure")
47440		return
47441	}
47442	if !done {
47443		ar.Response = future.Response()
47444		err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture")
47445		return
47446	}
47447	ar.Response = future.Response()
47448	return
47449}
47450
47451// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
47452// operation.
47453type VpnSitesCreateOrUpdateFuture struct {
47454	azure.FutureAPI
47455	// Result returns the result of the asynchronous operation.
47456	// If the operation has not completed it will return an error.
47457	Result func(VpnSitesClient) (VpnSite, error)
47458}
47459
47460// UnmarshalJSON is the custom unmarshaller for CreateFuture.
47461func (future *VpnSitesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
47462	var azFuture azure.Future
47463	if err := json.Unmarshal(body, &azFuture); err != nil {
47464		return err
47465	}
47466	future.FutureAPI = &azFuture
47467	future.Result = future.result
47468	return nil
47469}
47470
47471// result is the default implementation for VpnSitesCreateOrUpdateFuture.Result.
47472func (future *VpnSitesCreateOrUpdateFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
47473	var done bool
47474	done, err = future.DoneWithContext(context.Background(), client)
47475	if err != nil {
47476		err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
47477		return
47478	}
47479	if !done {
47480		vs.Response.Response = future.Response()
47481		err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture")
47482		return
47483	}
47484	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
47485	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
47486		vs, err = client.CreateOrUpdateResponder(vs.Response.Response)
47487		if err != nil {
47488			err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request")
47489		}
47490	}
47491	return
47492}
47493
47494// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
47495// operation.
47496type VpnSitesDeleteFuture struct {
47497	azure.FutureAPI
47498	// Result returns the result of the asynchronous operation.
47499	// If the operation has not completed it will return an error.
47500	Result func(VpnSitesClient) (autorest.Response, error)
47501}
47502
47503// UnmarshalJSON is the custom unmarshaller for CreateFuture.
47504func (future *VpnSitesDeleteFuture) UnmarshalJSON(body []byte) error {
47505	var azFuture azure.Future
47506	if err := json.Unmarshal(body, &azFuture); err != nil {
47507		return err
47508	}
47509	future.FutureAPI = &azFuture
47510	future.Result = future.result
47511	return nil
47512}
47513
47514// result is the default implementation for VpnSitesDeleteFuture.Result.
47515func (future *VpnSitesDeleteFuture) result(client VpnSitesClient) (ar autorest.Response, err error) {
47516	var done bool
47517	done, err = future.DoneWithContext(context.Background(), client)
47518	if err != nil {
47519		err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure")
47520		return
47521	}
47522	if !done {
47523		ar.Response = future.Response()
47524		err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture")
47525		return
47526	}
47527	ar.Response = future.Response()
47528	return
47529}
47530
47531// Watcher network watcher in a resource group.
47532type Watcher struct {
47533	autorest.Response `json:"-"`
47534	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
47535	Etag *string `json:"etag,omitempty"`
47536	// WatcherPropertiesFormat - Properties of the network watcher.
47537	*WatcherPropertiesFormat `json:"properties,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 Watcher.
47551func (w Watcher) MarshalJSON() ([]byte, error) {
47552	objectMap := make(map[string]interface{})
47553	if w.WatcherPropertiesFormat != nil {
47554		objectMap["properties"] = w.WatcherPropertiesFormat
47555	}
47556	if w.ID != nil {
47557		objectMap["id"] = w.ID
47558	}
47559	if w.Location != nil {
47560		objectMap["location"] = w.Location
47561	}
47562	if w.Tags != nil {
47563		objectMap["tags"] = w.Tags
47564	}
47565	return json.Marshal(objectMap)
47566}
47567
47568// UnmarshalJSON is the custom unmarshaler for Watcher struct.
47569func (w *Watcher) 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 "etag":
47578			if v != nil {
47579				var etag string
47580				err = json.Unmarshal(*v, &etag)
47581				if err != nil {
47582					return err
47583				}
47584				w.Etag = &etag
47585			}
47586		case "properties":
47587			if v != nil {
47588				var watcherPropertiesFormat WatcherPropertiesFormat
47589				err = json.Unmarshal(*v, &watcherPropertiesFormat)
47590				if err != nil {
47591					return err
47592				}
47593				w.WatcherPropertiesFormat = &watcherPropertiesFormat
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				w.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				w.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				w.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				w.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				w.Tags = tags
47639			}
47640		}
47641	}
47642
47643	return nil
47644}
47645
47646// WatcherListResult response for ListNetworkWatchers API service call.
47647type WatcherListResult struct {
47648	autorest.Response `json:"-"`
47649	// Value - List of network watcher resources.
47650	Value *[]Watcher `json:"value,omitempty"`
47651}
47652
47653// WatcherPropertiesFormat the network watcher properties.
47654type WatcherPropertiesFormat struct {
47655	// ProvisioningState - READ-ONLY; The provisioning state of the network watcher resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
47656	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
47657}
47658
47659// MarshalJSON is the custom marshaler for WatcherPropertiesFormat.
47660func (wpf WatcherPropertiesFormat) MarshalJSON() ([]byte, error) {
47661	objectMap := make(map[string]interface{})
47662	return json.Marshal(objectMap)
47663}
47664
47665// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
47666// long-running operation.
47667type WatchersCheckConnectivityFuture struct {
47668	azure.FutureAPI
47669	// Result returns the result of the asynchronous operation.
47670	// If the operation has not completed it will return an error.
47671	Result func(WatchersClient) (ConnectivityInformation, error)
47672}
47673
47674// UnmarshalJSON is the custom unmarshaller for CreateFuture.
47675func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error {
47676	var azFuture azure.Future
47677	if err := json.Unmarshal(body, &azFuture); err != nil {
47678		return err
47679	}
47680	future.FutureAPI = &azFuture
47681	future.Result = future.result
47682	return nil
47683}
47684
47685// result is the default implementation for WatchersCheckConnectivityFuture.Result.
47686func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) {
47687	var done bool
47688	done, err = future.DoneWithContext(context.Background(), client)
47689	if err != nil {
47690		err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
47691		return
47692	}
47693	if !done {
47694		ci.Response.Response = future.Response()
47695		err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
47696		return
47697	}
47698	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
47699	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
47700		ci, err = client.CheckConnectivityResponder(ci.Response.Response)
47701		if err != nil {
47702			err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
47703		}
47704	}
47705	return
47706}
47707
47708// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
47709// operation.
47710type WatchersDeleteFuture struct {
47711	azure.FutureAPI
47712	// Result returns the result of the asynchronous operation.
47713	// If the operation has not completed it will return an error.
47714	Result func(WatchersClient) (autorest.Response, error)
47715}
47716
47717// UnmarshalJSON is the custom unmarshaller for CreateFuture.
47718func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error {
47719	var azFuture azure.Future
47720	if err := json.Unmarshal(body, &azFuture); err != nil {
47721		return err
47722	}
47723	future.FutureAPI = &azFuture
47724	future.Result = future.result
47725	return nil
47726}
47727
47728// result is the default implementation for WatchersDeleteFuture.Result.
47729func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) {
47730	var done bool
47731	done, err = future.DoneWithContext(context.Background(), client)
47732	if err != nil {
47733		err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
47734		return
47735	}
47736	if !done {
47737		ar.Response = future.Response()
47738		err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
47739		return
47740	}
47741	ar.Response = future.Response()
47742	return
47743}
47744
47745// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
47746// long-running operation.
47747type WatchersGetAzureReachabilityReportFuture struct {
47748	azure.FutureAPI
47749	// Result returns the result of the asynchronous operation.
47750	// If the operation has not completed it will return an error.
47751	Result func(WatchersClient) (AzureReachabilityReport, error)
47752}
47753
47754// UnmarshalJSON is the custom unmarshaller for CreateFuture.
47755func (future *WatchersGetAzureReachabilityReportFuture) UnmarshalJSON(body []byte) error {
47756	var azFuture azure.Future
47757	if err := json.Unmarshal(body, &azFuture); err != nil {
47758		return err
47759	}
47760	future.FutureAPI = &azFuture
47761	future.Result = future.result
47762	return nil
47763}
47764
47765// result is the default implementation for WatchersGetAzureReachabilityReportFuture.Result.
47766func (future *WatchersGetAzureReachabilityReportFuture) result(client WatchersClient) (arr AzureReachabilityReport, err error) {
47767	var done bool
47768	done, err = future.DoneWithContext(context.Background(), client)
47769	if err != nil {
47770		err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
47771		return
47772	}
47773	if !done {
47774		arr.Response.Response = future.Response()
47775		err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
47776		return
47777	}
47778	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
47779	if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
47780		arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
47781		if err != nil {
47782			err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
47783		}
47784	}
47785	return
47786}
47787
47788// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
47789// long-running operation.
47790type WatchersGetFlowLogStatusFuture struct {
47791	azure.FutureAPI
47792	// Result returns the result of the asynchronous operation.
47793	// If the operation has not completed it will return an error.
47794	Result func(WatchersClient) (FlowLogInformation, error)
47795}
47796
47797// UnmarshalJSON is the custom unmarshaller for CreateFuture.
47798func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error {
47799	var azFuture azure.Future
47800	if err := json.Unmarshal(body, &azFuture); err != nil {
47801		return err
47802	}
47803	future.FutureAPI = &azFuture
47804	future.Result = future.result
47805	return nil
47806}
47807
47808// result is the default implementation for WatchersGetFlowLogStatusFuture.Result.
47809func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
47810	var done bool
47811	done, err = future.DoneWithContext(context.Background(), client)
47812	if err != nil {
47813		err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
47814		return
47815	}
47816	if !done {
47817		fli.Response.Response = future.Response()
47818		err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
47819		return
47820	}
47821	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
47822	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
47823		fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
47824		if err != nil {
47825			err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
47826		}
47827	}
47828	return
47829}
47830
47831// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
47832// of a long-running operation.
47833type WatchersGetNetworkConfigurationDiagnosticFuture struct {
47834	azure.FutureAPI
47835	// Result returns the result of the asynchronous operation.
47836	// If the operation has not completed it will return an error.
47837	Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
47838}
47839
47840// UnmarshalJSON is the custom unmarshaller for CreateFuture.
47841func (future *WatchersGetNetworkConfigurationDiagnosticFuture) UnmarshalJSON(body []byte) error {
47842	var azFuture azure.Future
47843	if err := json.Unmarshal(body, &azFuture); err != nil {
47844		return err
47845	}
47846	future.FutureAPI = &azFuture
47847	future.Result = future.result
47848	return nil
47849}
47850
47851// result is the default implementation for WatchersGetNetworkConfigurationDiagnosticFuture.Result.
47852func (future *WatchersGetNetworkConfigurationDiagnosticFuture) result(client WatchersClient) (cdr ConfigurationDiagnosticResponse, err error) {
47853	var done bool
47854	done, err = future.DoneWithContext(context.Background(), client)
47855	if err != nil {
47856		err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", future.Response(), "Polling failure")
47857		return
47858	}
47859	if !done {
47860		cdr.Response.Response = future.Response()
47861		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNetworkConfigurationDiagnosticFuture")
47862		return
47863	}
47864	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
47865	if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent {
47866		cdr, err = client.GetNetworkConfigurationDiagnosticResponder(cdr.Response.Response)
47867		if err != nil {
47868			err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", cdr.Response.Response, "Failure responding to request")
47869		}
47870	}
47871	return
47872}
47873
47874// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
47875// operation.
47876type WatchersGetNextHopFuture struct {
47877	azure.FutureAPI
47878	// Result returns the result of the asynchronous operation.
47879	// If the operation has not completed it will return an error.
47880	Result func(WatchersClient) (NextHopResult, error)
47881}
47882
47883// UnmarshalJSON is the custom unmarshaller for CreateFuture.
47884func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error {
47885	var azFuture azure.Future
47886	if err := json.Unmarshal(body, &azFuture); err != nil {
47887		return err
47888	}
47889	future.FutureAPI = &azFuture
47890	future.Result = future.result
47891	return nil
47892}
47893
47894// result is the default implementation for WatchersGetNextHopFuture.Result.
47895func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) {
47896	var done bool
47897	done, err = future.DoneWithContext(context.Background(), client)
47898	if err != nil {
47899		err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
47900		return
47901	}
47902	if !done {
47903		nhr.Response.Response = future.Response()
47904		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
47905		return
47906	}
47907	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
47908	if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
47909		nhr, err = client.GetNextHopResponder(nhr.Response.Response)
47910		if err != nil {
47911			err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
47912		}
47913	}
47914	return
47915}
47916
47917// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
47918// long-running operation.
47919type WatchersGetTroubleshootingFuture struct {
47920	azure.FutureAPI
47921	// Result returns the result of the asynchronous operation.
47922	// If the operation has not completed it will return an error.
47923	Result func(WatchersClient) (TroubleshootingResult, error)
47924}
47925
47926// UnmarshalJSON is the custom unmarshaller for CreateFuture.
47927func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error {
47928	var azFuture azure.Future
47929	if err := json.Unmarshal(body, &azFuture); err != nil {
47930		return err
47931	}
47932	future.FutureAPI = &azFuture
47933	future.Result = future.result
47934	return nil
47935}
47936
47937// result is the default implementation for WatchersGetTroubleshootingFuture.Result.
47938func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
47939	var done bool
47940	done, err = future.DoneWithContext(context.Background(), client)
47941	if err != nil {
47942		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
47943		return
47944	}
47945	if !done {
47946		tr.Response.Response = future.Response()
47947		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
47948		return
47949	}
47950	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
47951	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
47952		tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
47953		if err != nil {
47954			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
47955		}
47956	}
47957	return
47958}
47959
47960// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
47961// long-running operation.
47962type WatchersGetTroubleshootingResultFuture struct {
47963	azure.FutureAPI
47964	// Result returns the result of the asynchronous operation.
47965	// If the operation has not completed it will return an error.
47966	Result func(WatchersClient) (TroubleshootingResult, error)
47967}
47968
47969// UnmarshalJSON is the custom unmarshaller for CreateFuture.
47970func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error {
47971	var azFuture azure.Future
47972	if err := json.Unmarshal(body, &azFuture); err != nil {
47973		return err
47974	}
47975	future.FutureAPI = &azFuture
47976	future.Result = future.result
47977	return nil
47978}
47979
47980// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result.
47981func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
47982	var done bool
47983	done, err = future.DoneWithContext(context.Background(), client)
47984	if err != nil {
47985		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
47986		return
47987	}
47988	if !done {
47989		tr.Response.Response = future.Response()
47990		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
47991		return
47992	}
47993	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
47994	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
47995		tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
47996		if err != nil {
47997			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
47998		}
47999	}
48000	return
48001}
48002
48003// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
48004// long-running operation.
48005type WatchersGetVMSecurityRulesFuture struct {
48006	azure.FutureAPI
48007	// Result returns the result of the asynchronous operation.
48008	// If the operation has not completed it will return an error.
48009	Result func(WatchersClient) (SecurityGroupViewResult, error)
48010}
48011
48012// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48013func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error {
48014	var azFuture azure.Future
48015	if err := json.Unmarshal(body, &azFuture); err != nil {
48016		return err
48017	}
48018	future.FutureAPI = &azFuture
48019	future.Result = future.result
48020	return nil
48021}
48022
48023// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result.
48024func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
48025	var done bool
48026	done, err = future.DoneWithContext(context.Background(), client)
48027	if err != nil {
48028		err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
48029		return
48030	}
48031	if !done {
48032		sgvr.Response.Response = future.Response()
48033		err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
48034		return
48035	}
48036	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
48037	if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
48038		sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
48039		if err != nil {
48040			err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
48041		}
48042	}
48043	return
48044}
48045
48046// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
48047// long-running operation.
48048type WatchersListAvailableProvidersFuture struct {
48049	azure.FutureAPI
48050	// Result returns the result of the asynchronous operation.
48051	// If the operation has not completed it will return an error.
48052	Result func(WatchersClient) (AvailableProvidersList, error)
48053}
48054
48055// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48056func (future *WatchersListAvailableProvidersFuture) UnmarshalJSON(body []byte) error {
48057	var azFuture azure.Future
48058	if err := json.Unmarshal(body, &azFuture); err != nil {
48059		return err
48060	}
48061	future.FutureAPI = &azFuture
48062	future.Result = future.result
48063	return nil
48064}
48065
48066// result is the default implementation for WatchersListAvailableProvidersFuture.Result.
48067func (future *WatchersListAvailableProvidersFuture) result(client WatchersClient) (apl AvailableProvidersList, err error) {
48068	var done bool
48069	done, err = future.DoneWithContext(context.Background(), client)
48070	if err != nil {
48071		err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
48072		return
48073	}
48074	if !done {
48075		apl.Response.Response = future.Response()
48076		err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
48077		return
48078	}
48079	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
48080	if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
48081		apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
48082		if err != nil {
48083			err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
48084		}
48085	}
48086	return
48087}
48088
48089// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
48090// long-running operation.
48091type WatchersSetFlowLogConfigurationFuture struct {
48092	azure.FutureAPI
48093	// Result returns the result of the asynchronous operation.
48094	// If the operation has not completed it will return an error.
48095	Result func(WatchersClient) (FlowLogInformation, error)
48096}
48097
48098// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48099func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error {
48100	var azFuture azure.Future
48101	if err := json.Unmarshal(body, &azFuture); err != nil {
48102		return err
48103	}
48104	future.FutureAPI = &azFuture
48105	future.Result = future.result
48106	return nil
48107}
48108
48109// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result.
48110func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
48111	var done bool
48112	done, err = future.DoneWithContext(context.Background(), client)
48113	if err != nil {
48114		err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
48115		return
48116	}
48117	if !done {
48118		fli.Response.Response = future.Response()
48119		err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
48120		return
48121	}
48122	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
48123	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
48124		fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
48125		if err != nil {
48126			err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
48127		}
48128	}
48129	return
48130}
48131
48132// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
48133// operation.
48134type WatchersVerifyIPFlowFuture struct {
48135	azure.FutureAPI
48136	// Result returns the result of the asynchronous operation.
48137	// If the operation has not completed it will return an error.
48138	Result func(WatchersClient) (VerificationIPFlowResult, error)
48139}
48140
48141// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48142func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error {
48143	var azFuture azure.Future
48144	if err := json.Unmarshal(body, &azFuture); err != nil {
48145		return err
48146	}
48147	future.FutureAPI = &azFuture
48148	future.Result = future.result
48149	return nil
48150}
48151
48152// result is the default implementation for WatchersVerifyIPFlowFuture.Result.
48153func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
48154	var done bool
48155	done, err = future.DoneWithContext(context.Background(), client)
48156	if err != nil {
48157		err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
48158		return
48159	}
48160	if !done {
48161		vifr.Response.Response = future.Response()
48162		err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
48163		return
48164	}
48165	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
48166	if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
48167		vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
48168		if err != nil {
48169			err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
48170		}
48171	}
48172	return
48173}
48174
48175// WebApplicationFirewallCustomRule defines contents of a web application rule.
48176type WebApplicationFirewallCustomRule struct {
48177	// Name - The name of the resource that is unique within a policy. This name can be used to access the resource.
48178	Name *string `json:"name,omitempty"`
48179	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
48180	Etag *string `json:"etag,omitempty"`
48181	// Priority - Priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
48182	Priority *int32 `json:"priority,omitempty"`
48183	// RuleType - The rule type. Possible values include: 'WebApplicationFirewallRuleTypeMatchRule', 'WebApplicationFirewallRuleTypeInvalid'
48184	RuleType WebApplicationFirewallRuleType `json:"ruleType,omitempty"`
48185	// MatchConditions - List of match conditions.
48186	MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"`
48187	// Action - Type of Actions. Possible values include: 'WebApplicationFirewallActionAllow', 'WebApplicationFirewallActionBlock', 'WebApplicationFirewallActionLog'
48188	Action WebApplicationFirewallAction `json:"action,omitempty"`
48189}
48190
48191// MarshalJSON is the custom marshaler for WebApplicationFirewallCustomRule.
48192func (wafcr WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) {
48193	objectMap := make(map[string]interface{})
48194	if wafcr.Name != nil {
48195		objectMap["name"] = wafcr.Name
48196	}
48197	if wafcr.Priority != nil {
48198		objectMap["priority"] = wafcr.Priority
48199	}
48200	if wafcr.RuleType != "" {
48201		objectMap["ruleType"] = wafcr.RuleType
48202	}
48203	if wafcr.MatchConditions != nil {
48204		objectMap["matchConditions"] = wafcr.MatchConditions
48205	}
48206	if wafcr.Action != "" {
48207		objectMap["action"] = wafcr.Action
48208	}
48209	return json.Marshal(objectMap)
48210}
48211
48212// WebApplicationFirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
48213// long-running operation.
48214type WebApplicationFirewallPoliciesDeleteFuture struct {
48215	azure.FutureAPI
48216	// Result returns the result of the asynchronous operation.
48217	// If the operation has not completed it will return an error.
48218	Result func(WebApplicationFirewallPoliciesClient) (autorest.Response, error)
48219}
48220
48221// UnmarshalJSON is the custom unmarshaller for CreateFuture.
48222func (future *WebApplicationFirewallPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
48223	var azFuture azure.Future
48224	if err := json.Unmarshal(body, &azFuture); err != nil {
48225		return err
48226	}
48227	future.FutureAPI = &azFuture
48228	future.Result = future.result
48229	return nil
48230}
48231
48232// result is the default implementation for WebApplicationFirewallPoliciesDeleteFuture.Result.
48233func (future *WebApplicationFirewallPoliciesDeleteFuture) result(client WebApplicationFirewallPoliciesClient) (ar autorest.Response, err error) {
48234	var done bool
48235	done, err = future.DoneWithContext(context.Background(), client)
48236	if err != nil {
48237		err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
48238		return
48239	}
48240	if !done {
48241		ar.Response = future.Response()
48242		err = azure.NewAsyncOpIncompleteError("network.WebApplicationFirewallPoliciesDeleteFuture")
48243		return
48244	}
48245	ar.Response = future.Response()
48246	return
48247}
48248
48249// WebApplicationFirewallPolicy defines web application firewall policy.
48250type WebApplicationFirewallPolicy struct {
48251	autorest.Response `json:"-"`
48252	// WebApplicationFirewallPolicyPropertiesFormat - Properties of the web application firewall policy.
48253	*WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"`
48254	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
48255	Etag *string `json:"etag,omitempty"`
48256	// ID - Resource ID.
48257	ID *string `json:"id,omitempty"`
48258	// Name - READ-ONLY; Resource name.
48259	Name *string `json:"name,omitempty"`
48260	// Type - READ-ONLY; Resource type.
48261	Type *string `json:"type,omitempty"`
48262	// Location - Resource location.
48263	Location *string `json:"location,omitempty"`
48264	// Tags - Resource tags.
48265	Tags map[string]*string `json:"tags"`
48266}
48267
48268// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicy.
48269func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) {
48270	objectMap := make(map[string]interface{})
48271	if wafp.WebApplicationFirewallPolicyPropertiesFormat != nil {
48272		objectMap["properties"] = wafp.WebApplicationFirewallPolicyPropertiesFormat
48273	}
48274	if wafp.ID != nil {
48275		objectMap["id"] = wafp.ID
48276	}
48277	if wafp.Location != nil {
48278		objectMap["location"] = wafp.Location
48279	}
48280	if wafp.Tags != nil {
48281		objectMap["tags"] = wafp.Tags
48282	}
48283	return json.Marshal(objectMap)
48284}
48285
48286// UnmarshalJSON is the custom unmarshaler for WebApplicationFirewallPolicy struct.
48287func (wafp *WebApplicationFirewallPolicy) UnmarshalJSON(body []byte) error {
48288	var m map[string]*json.RawMessage
48289	err := json.Unmarshal(body, &m)
48290	if err != nil {
48291		return err
48292	}
48293	for k, v := range m {
48294		switch k {
48295		case "properties":
48296			if v != nil {
48297				var webApplicationFirewallPolicyPropertiesFormat WebApplicationFirewallPolicyPropertiesFormat
48298				err = json.Unmarshal(*v, &webApplicationFirewallPolicyPropertiesFormat)
48299				if err != nil {
48300					return err
48301				}
48302				wafp.WebApplicationFirewallPolicyPropertiesFormat = &webApplicationFirewallPolicyPropertiesFormat
48303			}
48304		case "etag":
48305			if v != nil {
48306				var etag string
48307				err = json.Unmarshal(*v, &etag)
48308				if err != nil {
48309					return err
48310				}
48311				wafp.Etag = &etag
48312			}
48313		case "id":
48314			if v != nil {
48315				var ID string
48316				err = json.Unmarshal(*v, &ID)
48317				if err != nil {
48318					return err
48319				}
48320				wafp.ID = &ID
48321			}
48322		case "name":
48323			if v != nil {
48324				var name string
48325				err = json.Unmarshal(*v, &name)
48326				if err != nil {
48327					return err
48328				}
48329				wafp.Name = &name
48330			}
48331		case "type":
48332			if v != nil {
48333				var typeVar string
48334				err = json.Unmarshal(*v, &typeVar)
48335				if err != nil {
48336					return err
48337				}
48338				wafp.Type = &typeVar
48339			}
48340		case "location":
48341			if v != nil {
48342				var location string
48343				err = json.Unmarshal(*v, &location)
48344				if err != nil {
48345					return err
48346				}
48347				wafp.Location = &location
48348			}
48349		case "tags":
48350			if v != nil {
48351				var tags map[string]*string
48352				err = json.Unmarshal(*v, &tags)
48353				if err != nil {
48354					return err
48355				}
48356				wafp.Tags = tags
48357			}
48358		}
48359	}
48360
48361	return nil
48362}
48363
48364// WebApplicationFirewallPolicyListResult result of the request to list WebApplicationFirewallPolicies. It
48365// contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results.
48366type WebApplicationFirewallPolicyListResult struct {
48367	autorest.Response `json:"-"`
48368	// Value - READ-ONLY; List of WebApplicationFirewallPolicies within a resource group.
48369	Value *[]WebApplicationFirewallPolicy `json:"value,omitempty"`
48370	// NextLink - READ-ONLY; URL to get the next set of WebApplicationFirewallPolicy objects if there are any.
48371	NextLink *string `json:"nextLink,omitempty"`
48372}
48373
48374// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyListResult.
48375func (wafplr WebApplicationFirewallPolicyListResult) MarshalJSON() ([]byte, error) {
48376	objectMap := make(map[string]interface{})
48377	return json.Marshal(objectMap)
48378}
48379
48380// WebApplicationFirewallPolicyListResultIterator provides access to a complete listing of
48381// WebApplicationFirewallPolicy values.
48382type WebApplicationFirewallPolicyListResultIterator struct {
48383	i    int
48384	page WebApplicationFirewallPolicyListResultPage
48385}
48386
48387// NextWithContext advances to the next value.  If there was an error making
48388// the request the iterator does not advance and the error is returned.
48389func (iter *WebApplicationFirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
48390	if tracing.IsEnabled() {
48391		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultIterator.NextWithContext")
48392		defer func() {
48393			sc := -1
48394			if iter.Response().Response.Response != nil {
48395				sc = iter.Response().Response.Response.StatusCode
48396			}
48397			tracing.EndSpan(ctx, sc, err)
48398		}()
48399	}
48400	iter.i++
48401	if iter.i < len(iter.page.Values()) {
48402		return nil
48403	}
48404	err = iter.page.NextWithContext(ctx)
48405	if err != nil {
48406		iter.i--
48407		return err
48408	}
48409	iter.i = 0
48410	return nil
48411}
48412
48413// Next advances to the next value.  If there was an error making
48414// the request the iterator does not advance and the error is returned.
48415// Deprecated: Use NextWithContext() instead.
48416func (iter *WebApplicationFirewallPolicyListResultIterator) Next() error {
48417	return iter.NextWithContext(context.Background())
48418}
48419
48420// NotDone returns true if the enumeration should be started or is not yet complete.
48421func (iter WebApplicationFirewallPolicyListResultIterator) NotDone() bool {
48422	return iter.page.NotDone() && iter.i < len(iter.page.Values())
48423}
48424
48425// Response returns the raw server response from the last page request.
48426func (iter WebApplicationFirewallPolicyListResultIterator) Response() WebApplicationFirewallPolicyListResult {
48427	return iter.page.Response()
48428}
48429
48430// Value returns the current value or a zero-initialized value if the
48431// iterator has advanced beyond the end of the collection.
48432func (iter WebApplicationFirewallPolicyListResultIterator) Value() WebApplicationFirewallPolicy {
48433	if !iter.page.NotDone() {
48434		return WebApplicationFirewallPolicy{}
48435	}
48436	return iter.page.Values()[iter.i]
48437}
48438
48439// Creates a new instance of the WebApplicationFirewallPolicyListResultIterator type.
48440func NewWebApplicationFirewallPolicyListResultIterator(page WebApplicationFirewallPolicyListResultPage) WebApplicationFirewallPolicyListResultIterator {
48441	return WebApplicationFirewallPolicyListResultIterator{page: page}
48442}
48443
48444// IsEmpty returns true if the ListResult contains no values.
48445func (wafplr WebApplicationFirewallPolicyListResult) IsEmpty() bool {
48446	return wafplr.Value == nil || len(*wafplr.Value) == 0
48447}
48448
48449// hasNextLink returns true if the NextLink is not empty.
48450func (wafplr WebApplicationFirewallPolicyListResult) hasNextLink() bool {
48451	return wafplr.NextLink != nil && len(*wafplr.NextLink) != 0
48452}
48453
48454// webApplicationFirewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
48455// It returns nil if no more results exist.
48456func (wafplr WebApplicationFirewallPolicyListResult) webApplicationFirewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
48457	if !wafplr.hasNextLink() {
48458		return nil, nil
48459	}
48460	return autorest.Prepare((&http.Request{}).WithContext(ctx),
48461		autorest.AsJSON(),
48462		autorest.AsGet(),
48463		autorest.WithBaseURL(to.String(wafplr.NextLink)))
48464}
48465
48466// WebApplicationFirewallPolicyListResultPage contains a page of WebApplicationFirewallPolicy values.
48467type WebApplicationFirewallPolicyListResultPage struct {
48468	fn     func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)
48469	wafplr WebApplicationFirewallPolicyListResult
48470}
48471
48472// NextWithContext advances to the next page of values.  If there was an error making
48473// the request the page does not advance and the error is returned.
48474func (page *WebApplicationFirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
48475	if tracing.IsEnabled() {
48476		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultPage.NextWithContext")
48477		defer func() {
48478			sc := -1
48479			if page.Response().Response.Response != nil {
48480				sc = page.Response().Response.Response.StatusCode
48481			}
48482			tracing.EndSpan(ctx, sc, err)
48483		}()
48484	}
48485	for {
48486		next, err := page.fn(ctx, page.wafplr)
48487		if err != nil {
48488			return err
48489		}
48490		page.wafplr = next
48491		if !next.hasNextLink() || !next.IsEmpty() {
48492			break
48493		}
48494	}
48495	return nil
48496}
48497
48498// Next advances to the next page of values.  If there was an error making
48499// the request the page does not advance and the error is returned.
48500// Deprecated: Use NextWithContext() instead.
48501func (page *WebApplicationFirewallPolicyListResultPage) Next() error {
48502	return page.NextWithContext(context.Background())
48503}
48504
48505// NotDone returns true if the page enumeration should be started or is not yet complete.
48506func (page WebApplicationFirewallPolicyListResultPage) NotDone() bool {
48507	return !page.wafplr.IsEmpty()
48508}
48509
48510// Response returns the raw server response from the last page request.
48511func (page WebApplicationFirewallPolicyListResultPage) Response() WebApplicationFirewallPolicyListResult {
48512	return page.wafplr
48513}
48514
48515// Values returns the slice of values for the current page or nil if there are no values.
48516func (page WebApplicationFirewallPolicyListResultPage) Values() []WebApplicationFirewallPolicy {
48517	if page.wafplr.IsEmpty() {
48518		return nil
48519	}
48520	return *page.wafplr.Value
48521}
48522
48523// Creates a new instance of the WebApplicationFirewallPolicyListResultPage type.
48524func NewWebApplicationFirewallPolicyListResultPage(cur WebApplicationFirewallPolicyListResult, getNextPage func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)) WebApplicationFirewallPolicyListResultPage {
48525	return WebApplicationFirewallPolicyListResultPage{
48526		fn:     getNextPage,
48527		wafplr: cur,
48528	}
48529}
48530
48531// WebApplicationFirewallPolicyPropertiesFormat defines web application firewall policy properties.
48532type WebApplicationFirewallPolicyPropertiesFormat struct {
48533	// PolicySettings - The PolicySettings for policy.
48534	PolicySettings *PolicySettings `json:"policySettings,omitempty"`
48535	// CustomRules - The custom rules inside the policy.
48536	CustomRules *[]WebApplicationFirewallCustomRule `json:"customRules,omitempty"`
48537	// ApplicationGateways - READ-ONLY; A collection of references to application gateways.
48538	ApplicationGateways *[]ApplicationGateway `json:"applicationGateways,omitempty"`
48539	// ProvisioningState - READ-ONLY; The provisioning state of the web application firewall policy resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
48540	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
48541	// ResourceState - READ-ONLY; Resource status of the policy. Possible values include: 'WebApplicationFirewallPolicyResourceStateCreating', 'WebApplicationFirewallPolicyResourceStateEnabling', 'WebApplicationFirewallPolicyResourceStateEnabled', 'WebApplicationFirewallPolicyResourceStateDisabling', 'WebApplicationFirewallPolicyResourceStateDisabled', 'WebApplicationFirewallPolicyResourceStateDeleting'
48542	ResourceState WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"`
48543	// ManagedRules - Describes the managedRules structure.
48544	ManagedRules *ManagedRulesDefinition `json:"managedRules,omitempty"`
48545	// HTTPListeners - READ-ONLY; A collection of references to application gateway http listeners.
48546	HTTPListeners *[]SubResource `json:"httpListeners,omitempty"`
48547	// PathBasedRules - READ-ONLY; A collection of references to application gateway path rules.
48548	PathBasedRules *[]SubResource `json:"pathBasedRules,omitempty"`
48549}
48550
48551// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyPropertiesFormat.
48552func (wafppf WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
48553	objectMap := make(map[string]interface{})
48554	if wafppf.PolicySettings != nil {
48555		objectMap["policySettings"] = wafppf.PolicySettings
48556	}
48557	if wafppf.CustomRules != nil {
48558		objectMap["customRules"] = wafppf.CustomRules
48559	}
48560	if wafppf.ManagedRules != nil {
48561		objectMap["managedRules"] = wafppf.ManagedRules
48562	}
48563	return json.Marshal(objectMap)
48564}
48565