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-03-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: 'Succeeded', 'Updating', 'Deleting', 'Failed'
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: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
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: 'Succeeded', 'Updating', 'Deleting', 'Failed'
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: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
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: 'HTTP', 'HTTPS'
842	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
843	// CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
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: 'Succeeded', 'Updating', 'Deleting', 'Failed'
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// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
915// be active for a specified time after the backend server got removed from the configuration.
916type ApplicationGatewayConnectionDraining struct {
917	// Enabled - Whether connection draining is enabled or not.
918	Enabled *bool `json:"enabled,omitempty"`
919	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
920	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
921}
922
923// ApplicationGatewayCustomError customer error of an application gateway.
924type ApplicationGatewayCustomError struct {
925	// StatusCode - Status code of the application gateway customer error. Possible values include: 'HTTPStatus403', 'HTTPStatus502'
926	StatusCode ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"`
927	// CustomErrorPageURL - Error page URL of the application gateway customer error.
928	CustomErrorPageURL *string `json:"customErrorPageUrl,omitempty"`
929}
930
931// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
932// rule group.
933type ApplicationGatewayFirewallDisabledRuleGroup struct {
934	// RuleGroupName - The name of the rule group that will be disabled.
935	RuleGroupName *string `json:"ruleGroupName,omitempty"`
936	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
937	Rules *[]int32 `json:"rules,omitempty"`
938}
939
940// ApplicationGatewayFirewallExclusion allow to exclude some variable satisfy the condition for the WAF
941// check.
942type ApplicationGatewayFirewallExclusion struct {
943	// MatchVariable - The variable to be excluded.
944	MatchVariable *string `json:"matchVariable,omitempty"`
945	// SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to.
946	SelectorMatchOperator *string `json:"selectorMatchOperator,omitempty"`
947	// Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
948	Selector *string `json:"selector,omitempty"`
949}
950
951// ApplicationGatewayFirewallRule a web application firewall rule.
952type ApplicationGatewayFirewallRule struct {
953	// RuleID - The identifier of the web application firewall rule.
954	RuleID *int32 `json:"ruleId,omitempty"`
955	// Description - The description of the web application firewall rule.
956	Description *string `json:"description,omitempty"`
957}
958
959// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
960type ApplicationGatewayFirewallRuleGroup struct {
961	// RuleGroupName - The name of the web application firewall rule group.
962	RuleGroupName *string `json:"ruleGroupName,omitempty"`
963	// Description - The description of the web application firewall rule group.
964	Description *string `json:"description,omitempty"`
965	// Rules - The rules of the web application firewall rule group.
966	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
967}
968
969// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
970type ApplicationGatewayFirewallRuleSet struct {
971	// ApplicationGatewayFirewallRuleSetPropertiesFormat - Properties of the application gateway firewall rule set.
972	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
973	// ID - Resource ID.
974	ID *string `json:"id,omitempty"`
975	// Name - READ-ONLY; Resource name.
976	Name *string `json:"name,omitempty"`
977	// Type - READ-ONLY; Resource type.
978	Type *string `json:"type,omitempty"`
979	// Location - Resource location.
980	Location *string `json:"location,omitempty"`
981	// Tags - Resource tags.
982	Tags map[string]*string `json:"tags"`
983}
984
985// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
986func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
987	objectMap := make(map[string]interface{})
988	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
989		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
990	}
991	if agfrs.ID != nil {
992		objectMap["id"] = agfrs.ID
993	}
994	if agfrs.Location != nil {
995		objectMap["location"] = agfrs.Location
996	}
997	if agfrs.Tags != nil {
998		objectMap["tags"] = agfrs.Tags
999	}
1000	return json.Marshal(objectMap)
1001}
1002
1003// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
1004func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
1005	var m map[string]*json.RawMessage
1006	err := json.Unmarshal(body, &m)
1007	if err != nil {
1008		return err
1009	}
1010	for k, v := range m {
1011		switch k {
1012		case "properties":
1013			if v != nil {
1014				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
1015				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
1016				if err != nil {
1017					return err
1018				}
1019				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
1020			}
1021		case "id":
1022			if v != nil {
1023				var ID string
1024				err = json.Unmarshal(*v, &ID)
1025				if err != nil {
1026					return err
1027				}
1028				agfrs.ID = &ID
1029			}
1030		case "name":
1031			if v != nil {
1032				var name string
1033				err = json.Unmarshal(*v, &name)
1034				if err != nil {
1035					return err
1036				}
1037				agfrs.Name = &name
1038			}
1039		case "type":
1040			if v != nil {
1041				var typeVar string
1042				err = json.Unmarshal(*v, &typeVar)
1043				if err != nil {
1044					return err
1045				}
1046				agfrs.Type = &typeVar
1047			}
1048		case "location":
1049			if v != nil {
1050				var location string
1051				err = json.Unmarshal(*v, &location)
1052				if err != nil {
1053					return err
1054				}
1055				agfrs.Location = &location
1056			}
1057		case "tags":
1058			if v != nil {
1059				var tags map[string]*string
1060				err = json.Unmarshal(*v, &tags)
1061				if err != nil {
1062					return err
1063				}
1064				agfrs.Tags = tags
1065			}
1066		}
1067	}
1068
1069	return nil
1070}
1071
1072// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
1073type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
1074	// ProvisioningState - READ-ONLY; The provisioning state of the web application firewall rule set. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1075	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1076	// RuleSetType - The type of the web application firewall rule set.
1077	RuleSetType *string `json:"ruleSetType,omitempty"`
1078	// RuleSetVersion - The version of the web application firewall rule set type.
1079	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
1080	// RuleGroups - The rule groups of the web application firewall rule set.
1081	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
1082}
1083
1084// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSetPropertiesFormat.
1085func (agfrspf ApplicationGatewayFirewallRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) {
1086	objectMap := make(map[string]interface{})
1087	if agfrspf.RuleSetType != nil {
1088		objectMap["ruleSetType"] = agfrspf.RuleSetType
1089	}
1090	if agfrspf.RuleSetVersion != nil {
1091		objectMap["ruleSetVersion"] = agfrspf.RuleSetVersion
1092	}
1093	if agfrspf.RuleGroups != nil {
1094		objectMap["ruleGroups"] = agfrspf.RuleGroups
1095	}
1096	return json.Marshal(objectMap)
1097}
1098
1099// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
1100type ApplicationGatewayFrontendIPConfiguration struct {
1101	// ApplicationGatewayFrontendIPConfigurationPropertiesFormat - Properties of the application gateway frontend IP configuration.
1102	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1103	// Name - Name of the frontend IP configuration that is unique within an Application Gateway.
1104	Name *string `json:"name,omitempty"`
1105	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1106	Etag *string `json:"etag,omitempty"`
1107	// Type - READ-ONLY; Type of the resource.
1108	Type *string `json:"type,omitempty"`
1109	// ID - Resource ID.
1110	ID *string `json:"id,omitempty"`
1111}
1112
1113// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
1114func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
1115	objectMap := make(map[string]interface{})
1116	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
1117		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1118	}
1119	if agfic.Name != nil {
1120		objectMap["name"] = agfic.Name
1121	}
1122	if agfic.ID != nil {
1123		objectMap["id"] = agfic.ID
1124	}
1125	return json.Marshal(objectMap)
1126}
1127
1128// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
1129func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
1130	var m map[string]*json.RawMessage
1131	err := json.Unmarshal(body, &m)
1132	if err != nil {
1133		return err
1134	}
1135	for k, v := range m {
1136		switch k {
1137		case "properties":
1138			if v != nil {
1139				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1140				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
1141				if err != nil {
1142					return err
1143				}
1144				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
1145			}
1146		case "name":
1147			if v != nil {
1148				var name string
1149				err = json.Unmarshal(*v, &name)
1150				if err != nil {
1151					return err
1152				}
1153				agfic.Name = &name
1154			}
1155		case "etag":
1156			if v != nil {
1157				var etag string
1158				err = json.Unmarshal(*v, &etag)
1159				if err != nil {
1160					return err
1161				}
1162				agfic.Etag = &etag
1163			}
1164		case "type":
1165			if v != nil {
1166				var typeVar string
1167				err = json.Unmarshal(*v, &typeVar)
1168				if err != nil {
1169					return err
1170				}
1171				agfic.Type = &typeVar
1172			}
1173		case "id":
1174			if v != nil {
1175				var ID string
1176				err = json.Unmarshal(*v, &ID)
1177				if err != nil {
1178					return err
1179				}
1180				agfic.ID = &ID
1181			}
1182		}
1183	}
1184
1185	return nil
1186}
1187
1188// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
1189// application gateway.
1190type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
1191	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
1192	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
1193	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
1194	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
1195	// Subnet - Reference to the subnet resource.
1196	Subnet *SubResource `json:"subnet,omitempty"`
1197	// PublicIPAddress - Reference to the PublicIP resource.
1198	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
1199	// ProvisioningState - READ-ONLY; The provisioning state of the frontend IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1200	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1201}
1202
1203// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfigurationPropertiesFormat.
1204func (agficpf ApplicationGatewayFrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
1205	objectMap := make(map[string]interface{})
1206	if agficpf.PrivateIPAddress != nil {
1207		objectMap["privateIPAddress"] = agficpf.PrivateIPAddress
1208	}
1209	if agficpf.PrivateIPAllocationMethod != "" {
1210		objectMap["privateIPAllocationMethod"] = agficpf.PrivateIPAllocationMethod
1211	}
1212	if agficpf.Subnet != nil {
1213		objectMap["subnet"] = agficpf.Subnet
1214	}
1215	if agficpf.PublicIPAddress != nil {
1216		objectMap["publicIPAddress"] = agficpf.PublicIPAddress
1217	}
1218	return json.Marshal(objectMap)
1219}
1220
1221// ApplicationGatewayFrontendPort frontend port of an application gateway.
1222type ApplicationGatewayFrontendPort struct {
1223	// ApplicationGatewayFrontendPortPropertiesFormat - Properties of the application gateway frontend port.
1224	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
1225	// Name - Name of the frontend port that is unique within an Application Gateway.
1226	Name *string `json:"name,omitempty"`
1227	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1228	Etag *string `json:"etag,omitempty"`
1229	// Type - READ-ONLY; Type of the resource.
1230	Type *string `json:"type,omitempty"`
1231	// ID - Resource ID.
1232	ID *string `json:"id,omitempty"`
1233}
1234
1235// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
1236func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
1237	objectMap := make(map[string]interface{})
1238	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
1239		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
1240	}
1241	if agfp.Name != nil {
1242		objectMap["name"] = agfp.Name
1243	}
1244	if agfp.ID != nil {
1245		objectMap["id"] = agfp.ID
1246	}
1247	return json.Marshal(objectMap)
1248}
1249
1250// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
1251func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
1252	var m map[string]*json.RawMessage
1253	err := json.Unmarshal(body, &m)
1254	if err != nil {
1255		return err
1256	}
1257	for k, v := range m {
1258		switch k {
1259		case "properties":
1260			if v != nil {
1261				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
1262				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
1263				if err != nil {
1264					return err
1265				}
1266				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
1267			}
1268		case "name":
1269			if v != nil {
1270				var name string
1271				err = json.Unmarshal(*v, &name)
1272				if err != nil {
1273					return err
1274				}
1275				agfp.Name = &name
1276			}
1277		case "etag":
1278			if v != nil {
1279				var etag string
1280				err = json.Unmarshal(*v, &etag)
1281				if err != nil {
1282					return err
1283				}
1284				agfp.Etag = &etag
1285			}
1286		case "type":
1287			if v != nil {
1288				var typeVar string
1289				err = json.Unmarshal(*v, &typeVar)
1290				if err != nil {
1291					return err
1292				}
1293				agfp.Type = &typeVar
1294			}
1295		case "id":
1296			if v != nil {
1297				var ID string
1298				err = json.Unmarshal(*v, &ID)
1299				if err != nil {
1300					return err
1301				}
1302				agfp.ID = &ID
1303			}
1304		}
1305	}
1306
1307	return nil
1308}
1309
1310// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1311type ApplicationGatewayFrontendPortPropertiesFormat struct {
1312	// Port - Frontend port.
1313	Port *int32 `json:"port,omitempty"`
1314	// ProvisioningState - READ-ONLY; The provisioning state of the frontend port resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1315	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1316}
1317
1318// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPortPropertiesFormat.
1319func (agfppf ApplicationGatewayFrontendPortPropertiesFormat) MarshalJSON() ([]byte, error) {
1320	objectMap := make(map[string]interface{})
1321	if agfppf.Port != nil {
1322		objectMap["port"] = agfppf.Port
1323	}
1324	return json.Marshal(objectMap)
1325}
1326
1327// ApplicationGatewayHeaderConfiguration header configuration of the Actions set in Application Gateway.
1328type ApplicationGatewayHeaderConfiguration struct {
1329	// HeaderName - Header name of the header configuration.
1330	HeaderName *string `json:"headerName,omitempty"`
1331	// HeaderValue - Header value of the header configuration.
1332	HeaderValue *string `json:"headerValue,omitempty"`
1333}
1334
1335// ApplicationGatewayHTTPListener http listener of an application gateway.
1336type ApplicationGatewayHTTPListener struct {
1337	// ApplicationGatewayHTTPListenerPropertiesFormat - Properties of the application gateway HTTP listener.
1338	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1339	// Name - Name of the HTTP listener that is unique within an Application Gateway.
1340	Name *string `json:"name,omitempty"`
1341	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1342	Etag *string `json:"etag,omitempty"`
1343	// Type - READ-ONLY; Type of the resource.
1344	Type *string `json:"type,omitempty"`
1345	// ID - Resource ID.
1346	ID *string `json:"id,omitempty"`
1347}
1348
1349// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
1350func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1351	objectMap := make(map[string]interface{})
1352	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1353		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1354	}
1355	if aghl.Name != nil {
1356		objectMap["name"] = aghl.Name
1357	}
1358	if aghl.ID != nil {
1359		objectMap["id"] = aghl.ID
1360	}
1361	return json.Marshal(objectMap)
1362}
1363
1364// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1365func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1366	var m map[string]*json.RawMessage
1367	err := json.Unmarshal(body, &m)
1368	if err != nil {
1369		return err
1370	}
1371	for k, v := range m {
1372		switch k {
1373		case "properties":
1374			if v != nil {
1375				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1376				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1377				if err != nil {
1378					return err
1379				}
1380				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1381			}
1382		case "name":
1383			if v != nil {
1384				var name string
1385				err = json.Unmarshal(*v, &name)
1386				if err != nil {
1387					return err
1388				}
1389				aghl.Name = &name
1390			}
1391		case "etag":
1392			if v != nil {
1393				var etag string
1394				err = json.Unmarshal(*v, &etag)
1395				if err != nil {
1396					return err
1397				}
1398				aghl.Etag = &etag
1399			}
1400		case "type":
1401			if v != nil {
1402				var typeVar string
1403				err = json.Unmarshal(*v, &typeVar)
1404				if err != nil {
1405					return err
1406				}
1407				aghl.Type = &typeVar
1408			}
1409		case "id":
1410			if v != nil {
1411				var ID string
1412				err = json.Unmarshal(*v, &ID)
1413				if err != nil {
1414					return err
1415				}
1416				aghl.ID = &ID
1417			}
1418		}
1419	}
1420
1421	return nil
1422}
1423
1424// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1425type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1426	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1427	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1428	// FrontendPort - Frontend port resource of an application gateway.
1429	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1430	// Protocol - Protocol of the HTTP listener. Possible values include: 'HTTP', 'HTTPS'
1431	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1432	// HostName - Host name of HTTP listener.
1433	HostName *string `json:"hostName,omitempty"`
1434	// SslCertificate - SSL certificate resource of an application gateway.
1435	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1436	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1437	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1438	// ProvisioningState - READ-ONLY; The provisioning state of the HTTP listener resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1439	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1440	// CustomErrorConfigurations - Custom error configurations of the HTTP listener.
1441	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1442	// FirewallPolicy - Reference to the FirewallPolicy resource.
1443	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
1444	// HostNames - List of Host names for HTTP Listener that allows special wildcard characters as well.
1445	HostNames *[]string `json:"hostNames,omitempty"`
1446}
1447
1448// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListenerPropertiesFormat.
1449func (aghlpf ApplicationGatewayHTTPListenerPropertiesFormat) MarshalJSON() ([]byte, error) {
1450	objectMap := make(map[string]interface{})
1451	if aghlpf.FrontendIPConfiguration != nil {
1452		objectMap["frontendIPConfiguration"] = aghlpf.FrontendIPConfiguration
1453	}
1454	if aghlpf.FrontendPort != nil {
1455		objectMap["frontendPort"] = aghlpf.FrontendPort
1456	}
1457	if aghlpf.Protocol != "" {
1458		objectMap["protocol"] = aghlpf.Protocol
1459	}
1460	if aghlpf.HostName != nil {
1461		objectMap["hostName"] = aghlpf.HostName
1462	}
1463	if aghlpf.SslCertificate != nil {
1464		objectMap["sslCertificate"] = aghlpf.SslCertificate
1465	}
1466	if aghlpf.RequireServerNameIndication != nil {
1467		objectMap["requireServerNameIndication"] = aghlpf.RequireServerNameIndication
1468	}
1469	if aghlpf.CustomErrorConfigurations != nil {
1470		objectMap["customErrorConfigurations"] = aghlpf.CustomErrorConfigurations
1471	}
1472	if aghlpf.FirewallPolicy != nil {
1473		objectMap["firewallPolicy"] = aghlpf.FirewallPolicy
1474	}
1475	if aghlpf.HostNames != nil {
1476		objectMap["hostNames"] = aghlpf.HostNames
1477	}
1478	return json.Marshal(objectMap)
1479}
1480
1481// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
1482// private IP configuration is allowed.
1483type ApplicationGatewayIPConfiguration struct {
1484	// ApplicationGatewayIPConfigurationPropertiesFormat - Properties of the application gateway IP configuration.
1485	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1486	// Name - Name of the IP configuration that is unique within an Application Gateway.
1487	Name *string `json:"name,omitempty"`
1488	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1489	Etag *string `json:"etag,omitempty"`
1490	// Type - READ-ONLY; Type of the resource.
1491	Type *string `json:"type,omitempty"`
1492	// ID - Resource ID.
1493	ID *string `json:"id,omitempty"`
1494}
1495
1496// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1497func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1498	objectMap := make(map[string]interface{})
1499	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1500		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1501	}
1502	if agic.Name != nil {
1503		objectMap["name"] = agic.Name
1504	}
1505	if agic.ID != nil {
1506		objectMap["id"] = agic.ID
1507	}
1508	return json.Marshal(objectMap)
1509}
1510
1511// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1512func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1513	var m map[string]*json.RawMessage
1514	err := json.Unmarshal(body, &m)
1515	if err != nil {
1516		return err
1517	}
1518	for k, v := range m {
1519		switch k {
1520		case "properties":
1521			if v != nil {
1522				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1523				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1524				if err != nil {
1525					return err
1526				}
1527				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1528			}
1529		case "name":
1530			if v != nil {
1531				var name string
1532				err = json.Unmarshal(*v, &name)
1533				if err != nil {
1534					return err
1535				}
1536				agic.Name = &name
1537			}
1538		case "etag":
1539			if v != nil {
1540				var etag string
1541				err = json.Unmarshal(*v, &etag)
1542				if err != nil {
1543					return err
1544				}
1545				agic.Etag = &etag
1546			}
1547		case "type":
1548			if v != nil {
1549				var typeVar string
1550				err = json.Unmarshal(*v, &typeVar)
1551				if err != nil {
1552					return err
1553				}
1554				agic.Type = &typeVar
1555			}
1556		case "id":
1557			if v != nil {
1558				var ID string
1559				err = json.Unmarshal(*v, &ID)
1560				if err != nil {
1561					return err
1562				}
1563				agic.ID = &ID
1564			}
1565		}
1566	}
1567
1568	return nil
1569}
1570
1571// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
1572// gateway.
1573type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1574	// Subnet - Reference to the subnet resource. A subnet from where application gateway gets its private address.
1575	Subnet *SubResource `json:"subnet,omitempty"`
1576	// ProvisioningState - READ-ONLY; The provisioning state of the application gateway IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1577	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1578}
1579
1580// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfigurationPropertiesFormat.
1581func (agicpf ApplicationGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
1582	objectMap := make(map[string]interface{})
1583	if agicpf.Subnet != nil {
1584		objectMap["subnet"] = agicpf.Subnet
1585	}
1586	return json.Marshal(objectMap)
1587}
1588
1589// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1590type ApplicationGatewayListResult struct {
1591	autorest.Response `json:"-"`
1592	// Value - List of an application gateways in a resource group.
1593	Value *[]ApplicationGateway `json:"value,omitempty"`
1594	// NextLink - URL to get the next set of results.
1595	NextLink *string `json:"nextLink,omitempty"`
1596}
1597
1598// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1599type ApplicationGatewayListResultIterator struct {
1600	i    int
1601	page ApplicationGatewayListResultPage
1602}
1603
1604// NextWithContext advances to the next value.  If there was an error making
1605// the request the iterator does not advance and the error is returned.
1606func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
1607	if tracing.IsEnabled() {
1608		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
1609		defer func() {
1610			sc := -1
1611			if iter.Response().Response.Response != nil {
1612				sc = iter.Response().Response.Response.StatusCode
1613			}
1614			tracing.EndSpan(ctx, sc, err)
1615		}()
1616	}
1617	iter.i++
1618	if iter.i < len(iter.page.Values()) {
1619		return nil
1620	}
1621	err = iter.page.NextWithContext(ctx)
1622	if err != nil {
1623		iter.i--
1624		return err
1625	}
1626	iter.i = 0
1627	return nil
1628}
1629
1630// Next advances to the next value.  If there was an error making
1631// the request the iterator does not advance and the error is returned.
1632// Deprecated: Use NextWithContext() instead.
1633func (iter *ApplicationGatewayListResultIterator) Next() error {
1634	return iter.NextWithContext(context.Background())
1635}
1636
1637// NotDone returns true if the enumeration should be started or is not yet complete.
1638func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1639	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1640}
1641
1642// Response returns the raw server response from the last page request.
1643func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1644	return iter.page.Response()
1645}
1646
1647// Value returns the current value or a zero-initialized value if the
1648// iterator has advanced beyond the end of the collection.
1649func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1650	if !iter.page.NotDone() {
1651		return ApplicationGateway{}
1652	}
1653	return iter.page.Values()[iter.i]
1654}
1655
1656// Creates a new instance of the ApplicationGatewayListResultIterator type.
1657func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
1658	return ApplicationGatewayListResultIterator{page: page}
1659}
1660
1661// IsEmpty returns true if the ListResult contains no values.
1662func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1663	return aglr.Value == nil || len(*aglr.Value) == 0
1664}
1665
1666// hasNextLink returns true if the NextLink is not empty.
1667func (aglr ApplicationGatewayListResult) hasNextLink() bool {
1668	return aglr.NextLink != nil && len(*aglr.NextLink) != 0
1669}
1670
1671// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1672// It returns nil if no more results exist.
1673func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
1674	if !aglr.hasNextLink() {
1675		return nil, nil
1676	}
1677	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1678		autorest.AsJSON(),
1679		autorest.AsGet(),
1680		autorest.WithBaseURL(to.String(aglr.NextLink)))
1681}
1682
1683// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1684type ApplicationGatewayListResultPage struct {
1685	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1686	aglr ApplicationGatewayListResult
1687}
1688
1689// NextWithContext advances to the next page of values.  If there was an error making
1690// the request the page does not advance and the error is returned.
1691func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
1692	if tracing.IsEnabled() {
1693		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
1694		defer func() {
1695			sc := -1
1696			if page.Response().Response.Response != nil {
1697				sc = page.Response().Response.Response.StatusCode
1698			}
1699			tracing.EndSpan(ctx, sc, err)
1700		}()
1701	}
1702	for {
1703		next, err := page.fn(ctx, page.aglr)
1704		if err != nil {
1705			return err
1706		}
1707		page.aglr = next
1708		if !next.hasNextLink() || !next.IsEmpty() {
1709			break
1710		}
1711	}
1712	return nil
1713}
1714
1715// Next advances to the next page of values.  If there was an error making
1716// the request the page does not advance and the error is returned.
1717// Deprecated: Use NextWithContext() instead.
1718func (page *ApplicationGatewayListResultPage) Next() error {
1719	return page.NextWithContext(context.Background())
1720}
1721
1722// NotDone returns true if the page enumeration should be started or is not yet complete.
1723func (page ApplicationGatewayListResultPage) NotDone() bool {
1724	return !page.aglr.IsEmpty()
1725}
1726
1727// Response returns the raw server response from the last page request.
1728func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1729	return page.aglr
1730}
1731
1732// Values returns the slice of values for the current page or nil if there are no values.
1733func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1734	if page.aglr.IsEmpty() {
1735		return nil
1736	}
1737	return *page.aglr.Value
1738}
1739
1740// Creates a new instance of the ApplicationGatewayListResultPage type.
1741func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
1742	return ApplicationGatewayListResultPage{
1743		fn:   getNextPage,
1744		aglr: cur,
1745	}
1746}
1747
1748// ApplicationGatewayOnDemandProbe details of on demand test probe request.
1749type ApplicationGatewayOnDemandProbe struct {
1750	// Protocol - The protocol used for the probe. Possible values include: 'HTTP', 'HTTPS'
1751	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1752	// Host - Host name to send the probe to.
1753	Host *string `json:"host,omitempty"`
1754	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>.
1755	Path *string `json:"path,omitempty"`
1756	// 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.
1757	Timeout *int32 `json:"timeout,omitempty"`
1758	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1759	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1760	// Match - Criterion for classifying a healthy probe response.
1761	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1762	// BackendAddressPool - Reference to backend pool of application gateway to which probe request will be sent.
1763	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1764	// BackendHTTPSettings - Reference to backend http setting of application gateway to be used for test probe.
1765	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1766}
1767
1768// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1769type ApplicationGatewayPathRule struct {
1770	// ApplicationGatewayPathRulePropertiesFormat - Properties of the application gateway path rule.
1771	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1772	// Name - Name of the path rule that is unique within an Application Gateway.
1773	Name *string `json:"name,omitempty"`
1774	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1775	Etag *string `json:"etag,omitempty"`
1776	// Type - READ-ONLY; Type of the resource.
1777	Type *string `json:"type,omitempty"`
1778	// ID - Resource ID.
1779	ID *string `json:"id,omitempty"`
1780}
1781
1782// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1783func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1784	objectMap := make(map[string]interface{})
1785	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1786		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1787	}
1788	if agpr.Name != nil {
1789		objectMap["name"] = agpr.Name
1790	}
1791	if agpr.ID != nil {
1792		objectMap["id"] = agpr.ID
1793	}
1794	return json.Marshal(objectMap)
1795}
1796
1797// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1798func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1799	var m map[string]*json.RawMessage
1800	err := json.Unmarshal(body, &m)
1801	if err != nil {
1802		return err
1803	}
1804	for k, v := range m {
1805		switch k {
1806		case "properties":
1807			if v != nil {
1808				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1809				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1810				if err != nil {
1811					return err
1812				}
1813				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1814			}
1815		case "name":
1816			if v != nil {
1817				var name string
1818				err = json.Unmarshal(*v, &name)
1819				if err != nil {
1820					return err
1821				}
1822				agpr.Name = &name
1823			}
1824		case "etag":
1825			if v != nil {
1826				var etag string
1827				err = json.Unmarshal(*v, &etag)
1828				if err != nil {
1829					return err
1830				}
1831				agpr.Etag = &etag
1832			}
1833		case "type":
1834			if v != nil {
1835				var typeVar string
1836				err = json.Unmarshal(*v, &typeVar)
1837				if err != nil {
1838					return err
1839				}
1840				agpr.Type = &typeVar
1841			}
1842		case "id":
1843			if v != nil {
1844				var ID string
1845				err = json.Unmarshal(*v, &ID)
1846				if err != nil {
1847					return err
1848				}
1849				agpr.ID = &ID
1850			}
1851		}
1852	}
1853
1854	return nil
1855}
1856
1857// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
1858type ApplicationGatewayPathRulePropertiesFormat struct {
1859	// Paths - Path rules of URL path map.
1860	Paths *[]string `json:"paths,omitempty"`
1861	// BackendAddressPool - Backend address pool resource of URL path map path rule.
1862	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1863	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
1864	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1865	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
1866	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
1867	// RewriteRuleSet - Rewrite rule set resource of URL path map path rule.
1868	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
1869	// ProvisioningState - READ-ONLY; The provisioning state of the path rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1870	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1871	// FirewallPolicy - Reference to the FirewallPolicy resource.
1872	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
1873}
1874
1875// MarshalJSON is the custom marshaler for ApplicationGatewayPathRulePropertiesFormat.
1876func (agprpf ApplicationGatewayPathRulePropertiesFormat) MarshalJSON() ([]byte, error) {
1877	objectMap := make(map[string]interface{})
1878	if agprpf.Paths != nil {
1879		objectMap["paths"] = agprpf.Paths
1880	}
1881	if agprpf.BackendAddressPool != nil {
1882		objectMap["backendAddressPool"] = agprpf.BackendAddressPool
1883	}
1884	if agprpf.BackendHTTPSettings != nil {
1885		objectMap["backendHttpSettings"] = agprpf.BackendHTTPSettings
1886	}
1887	if agprpf.RedirectConfiguration != nil {
1888		objectMap["redirectConfiguration"] = agprpf.RedirectConfiguration
1889	}
1890	if agprpf.RewriteRuleSet != nil {
1891		objectMap["rewriteRuleSet"] = agprpf.RewriteRuleSet
1892	}
1893	if agprpf.FirewallPolicy != nil {
1894		objectMap["firewallPolicy"] = agprpf.FirewallPolicy
1895	}
1896	return json.Marshal(objectMap)
1897}
1898
1899// ApplicationGatewayProbe probe of the application gateway.
1900type ApplicationGatewayProbe struct {
1901	// ApplicationGatewayProbePropertiesFormat - Properties of the application gateway probe.
1902	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
1903	// Name - Name of the probe that is unique within an Application Gateway.
1904	Name *string `json:"name,omitempty"`
1905	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1906	Etag *string `json:"etag,omitempty"`
1907	// Type - READ-ONLY; Type of the resource.
1908	Type *string `json:"type,omitempty"`
1909	// ID - Resource ID.
1910	ID *string `json:"id,omitempty"`
1911}
1912
1913// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
1914func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
1915	objectMap := make(map[string]interface{})
1916	if agp.ApplicationGatewayProbePropertiesFormat != nil {
1917		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
1918	}
1919	if agp.Name != nil {
1920		objectMap["name"] = agp.Name
1921	}
1922	if agp.ID != nil {
1923		objectMap["id"] = agp.ID
1924	}
1925	return json.Marshal(objectMap)
1926}
1927
1928// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
1929func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
1930	var m map[string]*json.RawMessage
1931	err := json.Unmarshal(body, &m)
1932	if err != nil {
1933		return err
1934	}
1935	for k, v := range m {
1936		switch k {
1937		case "properties":
1938			if v != nil {
1939				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
1940				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
1941				if err != nil {
1942					return err
1943				}
1944				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
1945			}
1946		case "name":
1947			if v != nil {
1948				var name string
1949				err = json.Unmarshal(*v, &name)
1950				if err != nil {
1951					return err
1952				}
1953				agp.Name = &name
1954			}
1955		case "etag":
1956			if v != nil {
1957				var etag string
1958				err = json.Unmarshal(*v, &etag)
1959				if err != nil {
1960					return err
1961				}
1962				agp.Etag = &etag
1963			}
1964		case "type":
1965			if v != nil {
1966				var typeVar string
1967				err = json.Unmarshal(*v, &typeVar)
1968				if err != nil {
1969					return err
1970				}
1971				agp.Type = &typeVar
1972			}
1973		case "id":
1974			if v != nil {
1975				var ID string
1976				err = json.Unmarshal(*v, &ID)
1977				if err != nil {
1978					return err
1979				}
1980				agp.ID = &ID
1981			}
1982		}
1983	}
1984
1985	return nil
1986}
1987
1988// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match.
1989type ApplicationGatewayProbeHealthResponseMatch struct {
1990	// Body - Body that must be contained in the health response. Default value is empty.
1991	Body *string `json:"body,omitempty"`
1992	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
1993	StatusCodes *[]string `json:"statusCodes,omitempty"`
1994}
1995
1996// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
1997type ApplicationGatewayProbePropertiesFormat struct {
1998	// Protocol - The protocol used for the probe. Possible values include: 'HTTP', 'HTTPS'
1999	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
2000	// Host - Host name to send the probe to.
2001	Host *string `json:"host,omitempty"`
2002	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>.
2003	Path *string `json:"path,omitempty"`
2004	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
2005	Interval *int32 `json:"interval,omitempty"`
2006	// 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.
2007	Timeout *int32 `json:"timeout,omitempty"`
2008	// 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.
2009	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
2010	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
2011	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
2012	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
2013	MinServers *int32 `json:"minServers,omitempty"`
2014	// Match - Criterion for classifying a healthy probe response.
2015	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
2016	// ProvisioningState - READ-ONLY; The provisioning state of the probe resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2017	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2018	// 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.
2019	Port *int32 `json:"port,omitempty"`
2020}
2021
2022// MarshalJSON is the custom marshaler for ApplicationGatewayProbePropertiesFormat.
2023func (agppf ApplicationGatewayProbePropertiesFormat) MarshalJSON() ([]byte, error) {
2024	objectMap := make(map[string]interface{})
2025	if agppf.Protocol != "" {
2026		objectMap["protocol"] = agppf.Protocol
2027	}
2028	if agppf.Host != nil {
2029		objectMap["host"] = agppf.Host
2030	}
2031	if agppf.Path != nil {
2032		objectMap["path"] = agppf.Path
2033	}
2034	if agppf.Interval != nil {
2035		objectMap["interval"] = agppf.Interval
2036	}
2037	if agppf.Timeout != nil {
2038		objectMap["timeout"] = agppf.Timeout
2039	}
2040	if agppf.UnhealthyThreshold != nil {
2041		objectMap["unhealthyThreshold"] = agppf.UnhealthyThreshold
2042	}
2043	if agppf.PickHostNameFromBackendHTTPSettings != nil {
2044		objectMap["pickHostNameFromBackendHttpSettings"] = agppf.PickHostNameFromBackendHTTPSettings
2045	}
2046	if agppf.MinServers != nil {
2047		objectMap["minServers"] = agppf.MinServers
2048	}
2049	if agppf.Match != nil {
2050		objectMap["match"] = agppf.Match
2051	}
2052	if agppf.Port != nil {
2053		objectMap["port"] = agppf.Port
2054	}
2055	return json.Marshal(objectMap)
2056}
2057
2058// ApplicationGatewayPropertiesFormat properties of the application gateway.
2059type ApplicationGatewayPropertiesFormat struct {
2060	// Sku - SKU of the application gateway resource.
2061	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
2062	// SslPolicy - SSL policy of the application gateway resource.
2063	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
2064	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
2065	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
2066	// 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).
2067	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
2068	// 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).
2069	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
2070	// 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).
2071	TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"`
2072	// 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).
2073	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
2074	// 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).
2075	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
2076	// 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).
2077	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
2078	// Probes - Probes of the application gateway resource.
2079	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
2080	// 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).
2081	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
2082	// 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).
2083	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
2084	// 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).
2085	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
2086	// 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).
2087	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
2088	// RequestRoutingRules - Request routing rules of the application gateway resource.
2089	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
2090	// RewriteRuleSets - Rewrite rules for the application gateway resource.
2091	RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"`
2092	// 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).
2093	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
2094	// WebApplicationFirewallConfiguration - Web application firewall configuration.
2095	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
2096	// FirewallPolicy - Reference to the FirewallPolicy resource.
2097	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
2098	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
2099	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
2100	// EnableFips - Whether FIPS is enabled on the application gateway resource.
2101	EnableFips *bool `json:"enableFips,omitempty"`
2102	// AutoscaleConfiguration - Autoscale Configuration.
2103	AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"`
2104	// ResourceGUID - READ-ONLY; The resource GUID property of the application gateway resource.
2105	ResourceGUID *string `json:"resourceGuid,omitempty"`
2106	// ProvisioningState - READ-ONLY; The provisioning state of the application gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2107	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2108	// CustomErrorConfigurations - Custom error configurations of the application gateway resource.
2109	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
2110	// ForceFirewallPolicyAssociation - If true, associates a firewall policy with an application gateway regardless whether the policy differs from the WAF Config.
2111	ForceFirewallPolicyAssociation *bool `json:"forceFirewallPolicyAssociation,omitempty"`
2112}
2113
2114// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
2115func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
2116	objectMap := make(map[string]interface{})
2117	if agpf.Sku != nil {
2118		objectMap["sku"] = agpf.Sku
2119	}
2120	if agpf.SslPolicy != nil {
2121		objectMap["sslPolicy"] = agpf.SslPolicy
2122	}
2123	if agpf.GatewayIPConfigurations != nil {
2124		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
2125	}
2126	if agpf.AuthenticationCertificates != nil {
2127		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
2128	}
2129	if agpf.TrustedRootCertificates != nil {
2130		objectMap["trustedRootCertificates"] = agpf.TrustedRootCertificates
2131	}
2132	if agpf.SslCertificates != nil {
2133		objectMap["sslCertificates"] = agpf.SslCertificates
2134	}
2135	if agpf.FrontendIPConfigurations != nil {
2136		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
2137	}
2138	if agpf.FrontendPorts != nil {
2139		objectMap["frontendPorts"] = agpf.FrontendPorts
2140	}
2141	if agpf.Probes != nil {
2142		objectMap["probes"] = agpf.Probes
2143	}
2144	if agpf.BackendAddressPools != nil {
2145		objectMap["backendAddressPools"] = agpf.BackendAddressPools
2146	}
2147	if agpf.BackendHTTPSettingsCollection != nil {
2148		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
2149	}
2150	if agpf.HTTPListeners != nil {
2151		objectMap["httpListeners"] = agpf.HTTPListeners
2152	}
2153	if agpf.URLPathMaps != nil {
2154		objectMap["urlPathMaps"] = agpf.URLPathMaps
2155	}
2156	if agpf.RequestRoutingRules != nil {
2157		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
2158	}
2159	if agpf.RewriteRuleSets != nil {
2160		objectMap["rewriteRuleSets"] = agpf.RewriteRuleSets
2161	}
2162	if agpf.RedirectConfigurations != nil {
2163		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
2164	}
2165	if agpf.WebApplicationFirewallConfiguration != nil {
2166		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
2167	}
2168	if agpf.FirewallPolicy != nil {
2169		objectMap["firewallPolicy"] = agpf.FirewallPolicy
2170	}
2171	if agpf.EnableHTTP2 != nil {
2172		objectMap["enableHttp2"] = agpf.EnableHTTP2
2173	}
2174	if agpf.EnableFips != nil {
2175		objectMap["enableFips"] = agpf.EnableFips
2176	}
2177	if agpf.AutoscaleConfiguration != nil {
2178		objectMap["autoscaleConfiguration"] = agpf.AutoscaleConfiguration
2179	}
2180	if agpf.CustomErrorConfigurations != nil {
2181		objectMap["customErrorConfigurations"] = agpf.CustomErrorConfigurations
2182	}
2183	if agpf.ForceFirewallPolicyAssociation != nil {
2184		objectMap["forceFirewallPolicyAssociation"] = agpf.ForceFirewallPolicyAssociation
2185	}
2186	return json.Marshal(objectMap)
2187}
2188
2189// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
2190type ApplicationGatewayRedirectConfiguration struct {
2191	// ApplicationGatewayRedirectConfigurationPropertiesFormat - Properties of the application gateway redirect configuration.
2192	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
2193	// Name - Name of the redirect configuration that is unique within an Application Gateway.
2194	Name *string `json:"name,omitempty"`
2195	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2196	Etag *string `json:"etag,omitempty"`
2197	// Type - READ-ONLY; Type of the resource.
2198	Type *string `json:"type,omitempty"`
2199	// ID - Resource ID.
2200	ID *string `json:"id,omitempty"`
2201}
2202
2203// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
2204func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
2205	objectMap := make(map[string]interface{})
2206	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
2207		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
2208	}
2209	if agrc.Name != nil {
2210		objectMap["name"] = agrc.Name
2211	}
2212	if agrc.ID != nil {
2213		objectMap["id"] = agrc.ID
2214	}
2215	return json.Marshal(objectMap)
2216}
2217
2218// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
2219func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
2220	var m map[string]*json.RawMessage
2221	err := json.Unmarshal(body, &m)
2222	if err != nil {
2223		return err
2224	}
2225	for k, v := range m {
2226		switch k {
2227		case "properties":
2228			if v != nil {
2229				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
2230				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
2231				if err != nil {
2232					return err
2233				}
2234				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
2235			}
2236		case "name":
2237			if v != nil {
2238				var name string
2239				err = json.Unmarshal(*v, &name)
2240				if err != nil {
2241					return err
2242				}
2243				agrc.Name = &name
2244			}
2245		case "etag":
2246			if v != nil {
2247				var etag string
2248				err = json.Unmarshal(*v, &etag)
2249				if err != nil {
2250					return err
2251				}
2252				agrc.Etag = &etag
2253			}
2254		case "type":
2255			if v != nil {
2256				var typeVar string
2257				err = json.Unmarshal(*v, &typeVar)
2258				if err != nil {
2259					return err
2260				}
2261				agrc.Type = &typeVar
2262			}
2263		case "id":
2264			if v != nil {
2265				var ID string
2266				err = json.Unmarshal(*v, &ID)
2267				if err != nil {
2268					return err
2269				}
2270				agrc.ID = &ID
2271			}
2272		}
2273	}
2274
2275	return nil
2276}
2277
2278// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
2279// application gateway.
2280type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
2281	// RedirectType - HTTP redirection type. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
2282	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
2283	// TargetListener - Reference to a listener to redirect the request to.
2284	TargetListener *SubResource `json:"targetListener,omitempty"`
2285	// TargetURL - Url to redirect the request to.
2286	TargetURL *string `json:"targetUrl,omitempty"`
2287	// IncludePath - Include path in the redirected url.
2288	IncludePath *bool `json:"includePath,omitempty"`
2289	// IncludeQueryString - Include query string in the redirected url.
2290	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
2291	// RequestRoutingRules - Request routing specifying redirect configuration.
2292	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
2293	// URLPathMaps - Url path maps specifying default redirect configuration.
2294	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
2295	// PathRules - Path rules specifying redirect configuration.
2296	PathRules *[]SubResource `json:"pathRules,omitempty"`
2297}
2298
2299// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
2300type ApplicationGatewayRequestRoutingRule struct {
2301	// ApplicationGatewayRequestRoutingRulePropertiesFormat - Properties of the application gateway request routing rule.
2302	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
2303	// Name - Name of the request routing rule that is unique within an Application Gateway.
2304	Name *string `json:"name,omitempty"`
2305	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2306	Etag *string `json:"etag,omitempty"`
2307	// Type - READ-ONLY; Type of the resource.
2308	Type *string `json:"type,omitempty"`
2309	// ID - Resource ID.
2310	ID *string `json:"id,omitempty"`
2311}
2312
2313// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
2314func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
2315	objectMap := make(map[string]interface{})
2316	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
2317		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
2318	}
2319	if agrrr.Name != nil {
2320		objectMap["name"] = agrrr.Name
2321	}
2322	if agrrr.ID != nil {
2323		objectMap["id"] = agrrr.ID
2324	}
2325	return json.Marshal(objectMap)
2326}
2327
2328// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
2329func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
2330	var m map[string]*json.RawMessage
2331	err := json.Unmarshal(body, &m)
2332	if err != nil {
2333		return err
2334	}
2335	for k, v := range m {
2336		switch k {
2337		case "properties":
2338			if v != nil {
2339				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
2340				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
2341				if err != nil {
2342					return err
2343				}
2344				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
2345			}
2346		case "name":
2347			if v != nil {
2348				var name string
2349				err = json.Unmarshal(*v, &name)
2350				if err != nil {
2351					return err
2352				}
2353				agrrr.Name = &name
2354			}
2355		case "etag":
2356			if v != nil {
2357				var etag string
2358				err = json.Unmarshal(*v, &etag)
2359				if err != nil {
2360					return err
2361				}
2362				agrrr.Etag = &etag
2363			}
2364		case "type":
2365			if v != nil {
2366				var typeVar string
2367				err = json.Unmarshal(*v, &typeVar)
2368				if err != nil {
2369					return err
2370				}
2371				agrrr.Type = &typeVar
2372			}
2373		case "id":
2374			if v != nil {
2375				var ID string
2376				err = json.Unmarshal(*v, &ID)
2377				if err != nil {
2378					return err
2379				}
2380				agrrr.ID = &ID
2381			}
2382		}
2383	}
2384
2385	return nil
2386}
2387
2388// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
2389// application gateway.
2390type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
2391	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
2392	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
2393	// Priority - Priority of the request routing rule.
2394	Priority *int32 `json:"priority,omitempty"`
2395	// BackendAddressPool - Backend address pool resource of the application gateway.
2396	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2397	// BackendHTTPSettings - Backend http settings resource of the application gateway.
2398	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2399	// HTTPListener - Http listener resource of the application gateway.
2400	HTTPListener *SubResource `json:"httpListener,omitempty"`
2401	// URLPathMap - URL path map resource of the application gateway.
2402	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2403	// RewriteRuleSet - Rewrite Rule Set resource in Basic rule of the application gateway.
2404	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
2405	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2406	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2407	// ProvisioningState - READ-ONLY; The provisioning state of the request routing rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2408	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2409}
2410
2411// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRulePropertiesFormat.
2412func (agrrrpf ApplicationGatewayRequestRoutingRulePropertiesFormat) MarshalJSON() ([]byte, error) {
2413	objectMap := make(map[string]interface{})
2414	if agrrrpf.RuleType != "" {
2415		objectMap["ruleType"] = agrrrpf.RuleType
2416	}
2417	if agrrrpf.Priority != nil {
2418		objectMap["priority"] = agrrrpf.Priority
2419	}
2420	if agrrrpf.BackendAddressPool != nil {
2421		objectMap["backendAddressPool"] = agrrrpf.BackendAddressPool
2422	}
2423	if agrrrpf.BackendHTTPSettings != nil {
2424		objectMap["backendHttpSettings"] = agrrrpf.BackendHTTPSettings
2425	}
2426	if agrrrpf.HTTPListener != nil {
2427		objectMap["httpListener"] = agrrrpf.HTTPListener
2428	}
2429	if agrrrpf.URLPathMap != nil {
2430		objectMap["urlPathMap"] = agrrrpf.URLPathMap
2431	}
2432	if agrrrpf.RewriteRuleSet != nil {
2433		objectMap["rewriteRuleSet"] = agrrrpf.RewriteRuleSet
2434	}
2435	if agrrrpf.RedirectConfiguration != nil {
2436		objectMap["redirectConfiguration"] = agrrrpf.RedirectConfiguration
2437	}
2438	return json.Marshal(objectMap)
2439}
2440
2441// ApplicationGatewayRewriteRule rewrite rule of an application gateway.
2442type ApplicationGatewayRewriteRule struct {
2443	// Name - Name of the rewrite rule that is unique within an Application Gateway.
2444	Name *string `json:"name,omitempty"`
2445	// RuleSequence - Rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet.
2446	RuleSequence *int32 `json:"ruleSequence,omitempty"`
2447	// Conditions - Conditions based on which the action set execution will be evaluated.
2448	Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"`
2449	// ActionSet - Set of actions to be done as part of the rewrite Rule.
2450	ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"`
2451}
2452
2453// ApplicationGatewayRewriteRuleActionSet set of actions in the Rewrite Rule in Application Gateway.
2454type ApplicationGatewayRewriteRuleActionSet struct {
2455	// RequestHeaderConfigurations - Request Header Actions in the Action Set.
2456	RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"`
2457	// ResponseHeaderConfigurations - Response Header Actions in the Action Set.
2458	ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"`
2459	// URLConfiguration - Url Configuration Action in the Action Set.
2460	URLConfiguration *ApplicationGatewayURLConfiguration `json:"urlConfiguration,omitempty"`
2461}
2462
2463// ApplicationGatewayRewriteRuleCondition set of conditions in the Rewrite Rule in Application Gateway.
2464type ApplicationGatewayRewriteRuleCondition struct {
2465	// Variable - The condition parameter of the RewriteRuleCondition.
2466	Variable *string `json:"variable,omitempty"`
2467	// Pattern - The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition.
2468	Pattern *string `json:"pattern,omitempty"`
2469	// IgnoreCase - Setting this paramter to truth value with force the pattern to do a case in-sensitive comparison.
2470	IgnoreCase *bool `json:"ignoreCase,omitempty"`
2471	// Negate - Setting this value as truth will force to check the negation of the condition given by the user.
2472	Negate *bool `json:"negate,omitempty"`
2473}
2474
2475// ApplicationGatewayRewriteRuleSet rewrite rule set of an application gateway.
2476type ApplicationGatewayRewriteRuleSet struct {
2477	// ApplicationGatewayRewriteRuleSetPropertiesFormat - Properties of the application gateway rewrite rule set.
2478	*ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"`
2479	// Name - Name of the rewrite rule set that is unique within an Application Gateway.
2480	Name *string `json:"name,omitempty"`
2481	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2482	Etag *string `json:"etag,omitempty"`
2483	// ID - Resource ID.
2484	ID *string `json:"id,omitempty"`
2485}
2486
2487// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSet.
2488func (agrrs ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) {
2489	objectMap := make(map[string]interface{})
2490	if agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat != nil {
2491		objectMap["properties"] = agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat
2492	}
2493	if agrrs.Name != nil {
2494		objectMap["name"] = agrrs.Name
2495	}
2496	if agrrs.ID != nil {
2497		objectMap["id"] = agrrs.ID
2498	}
2499	return json.Marshal(objectMap)
2500}
2501
2502// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRewriteRuleSet struct.
2503func (agrrs *ApplicationGatewayRewriteRuleSet) UnmarshalJSON(body []byte) error {
2504	var m map[string]*json.RawMessage
2505	err := json.Unmarshal(body, &m)
2506	if err != nil {
2507		return err
2508	}
2509	for k, v := range m {
2510		switch k {
2511		case "properties":
2512			if v != nil {
2513				var applicationGatewayRewriteRuleSetPropertiesFormat ApplicationGatewayRewriteRuleSetPropertiesFormat
2514				err = json.Unmarshal(*v, &applicationGatewayRewriteRuleSetPropertiesFormat)
2515				if err != nil {
2516					return err
2517				}
2518				agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat = &applicationGatewayRewriteRuleSetPropertiesFormat
2519			}
2520		case "name":
2521			if v != nil {
2522				var name string
2523				err = json.Unmarshal(*v, &name)
2524				if err != nil {
2525					return err
2526				}
2527				agrrs.Name = &name
2528			}
2529		case "etag":
2530			if v != nil {
2531				var etag string
2532				err = json.Unmarshal(*v, &etag)
2533				if err != nil {
2534					return err
2535				}
2536				agrrs.Etag = &etag
2537			}
2538		case "id":
2539			if v != nil {
2540				var ID string
2541				err = json.Unmarshal(*v, &ID)
2542				if err != nil {
2543					return err
2544				}
2545				agrrs.ID = &ID
2546			}
2547		}
2548	}
2549
2550	return nil
2551}
2552
2553// ApplicationGatewayRewriteRuleSetPropertiesFormat properties of rewrite rule set of the application
2554// gateway.
2555type ApplicationGatewayRewriteRuleSetPropertiesFormat struct {
2556	// RewriteRules - Rewrite rules in the rewrite rule set.
2557	RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"`
2558	// ProvisioningState - READ-ONLY; The provisioning state of the rewrite rule set resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2559	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2560}
2561
2562// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSetPropertiesFormat.
2563func (agrrspf ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) {
2564	objectMap := make(map[string]interface{})
2565	if agrrspf.RewriteRules != nil {
2566		objectMap["rewriteRules"] = agrrspf.RewriteRules
2567	}
2568	return json.Marshal(objectMap)
2569}
2570
2571// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2572// long-running operation.
2573type ApplicationGatewaysBackendHealthFuture struct {
2574	azure.FutureAPI
2575	// Result returns the result of the asynchronous operation.
2576	// If the operation has not completed it will return an error.
2577	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2578}
2579
2580// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2581func (future *ApplicationGatewaysBackendHealthFuture) UnmarshalJSON(body []byte) error {
2582	var azFuture azure.Future
2583	if err := json.Unmarshal(body, &azFuture); err != nil {
2584		return err
2585	}
2586	future.FutureAPI = &azFuture
2587	future.Result = future.result
2588	return nil
2589}
2590
2591// result is the default implementation for ApplicationGatewaysBackendHealthFuture.Result.
2592func (future *ApplicationGatewaysBackendHealthFuture) result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
2593	var done bool
2594	done, err = future.DoneWithContext(context.Background(), client)
2595	if err != nil {
2596		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
2597		return
2598	}
2599	if !done {
2600		agbh.Response.Response = future.Response()
2601		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
2602		return
2603	}
2604	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2605	if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
2606		agbh, err = client.BackendHealthResponder(agbh.Response.Response)
2607		if err != nil {
2608			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
2609		}
2610	}
2611	return
2612}
2613
2614// ApplicationGatewaysBackendHealthOnDemandFuture an abstraction for monitoring and retrieving the results
2615// of a long-running operation.
2616type ApplicationGatewaysBackendHealthOnDemandFuture struct {
2617	azure.FutureAPI
2618	// Result returns the result of the asynchronous operation.
2619	// If the operation has not completed it will return an error.
2620	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealthOnDemand, error)
2621}
2622
2623// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2624func (future *ApplicationGatewaysBackendHealthOnDemandFuture) UnmarshalJSON(body []byte) error {
2625	var azFuture azure.Future
2626	if err := json.Unmarshal(body, &azFuture); err != nil {
2627		return err
2628	}
2629	future.FutureAPI = &azFuture
2630	future.Result = future.result
2631	return nil
2632}
2633
2634// result is the default implementation for ApplicationGatewaysBackendHealthOnDemandFuture.Result.
2635func (future *ApplicationGatewaysBackendHealthOnDemandFuture) result(client ApplicationGatewaysClient) (agbhod ApplicationGatewayBackendHealthOnDemand, err error) {
2636	var done bool
2637	done, err = future.DoneWithContext(context.Background(), client)
2638	if err != nil {
2639		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", future.Response(), "Polling failure")
2640		return
2641	}
2642	if !done {
2643		agbhod.Response.Response = future.Response()
2644		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthOnDemandFuture")
2645		return
2646	}
2647	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2648	if agbhod.Response.Response, err = future.GetResult(sender); err == nil && agbhod.Response.Response.StatusCode != http.StatusNoContent {
2649		agbhod, err = client.BackendHealthOnDemandResponder(agbhod.Response.Response)
2650		if err != nil {
2651			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", agbhod.Response.Response, "Failure responding to request")
2652		}
2653	}
2654	return
2655}
2656
2657// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2658// long-running operation.
2659type ApplicationGatewaysCreateOrUpdateFuture struct {
2660	azure.FutureAPI
2661	// Result returns the result of the asynchronous operation.
2662	// If the operation has not completed it will return an error.
2663	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2664}
2665
2666// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2667func (future *ApplicationGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2668	var azFuture azure.Future
2669	if err := json.Unmarshal(body, &azFuture); err != nil {
2670		return err
2671	}
2672	future.FutureAPI = &azFuture
2673	future.Result = future.result
2674	return nil
2675}
2676
2677// result is the default implementation for ApplicationGatewaysCreateOrUpdateFuture.Result.
2678func (future *ApplicationGatewaysCreateOrUpdateFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2679	var done bool
2680	done, err = future.DoneWithContext(context.Background(), client)
2681	if err != nil {
2682		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2683		return
2684	}
2685	if !done {
2686		ag.Response.Response = future.Response()
2687		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
2688		return
2689	}
2690	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2691	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2692		ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
2693		if err != nil {
2694			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
2695		}
2696	}
2697	return
2698}
2699
2700// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2701// long-running operation.
2702type ApplicationGatewaysDeleteFuture struct {
2703	azure.FutureAPI
2704	// Result returns the result of the asynchronous operation.
2705	// If the operation has not completed it will return an error.
2706	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2707}
2708
2709// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2710func (future *ApplicationGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
2711	var azFuture azure.Future
2712	if err := json.Unmarshal(body, &azFuture); err != nil {
2713		return err
2714	}
2715	future.FutureAPI = &azFuture
2716	future.Result = future.result
2717	return nil
2718}
2719
2720// result is the default implementation for ApplicationGatewaysDeleteFuture.Result.
2721func (future *ApplicationGatewaysDeleteFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2722	var done bool
2723	done, err = future.DoneWithContext(context.Background(), client)
2724	if err != nil {
2725		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
2726		return
2727	}
2728	if !done {
2729		ar.Response = future.Response()
2730		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
2731		return
2732	}
2733	ar.Response = future.Response()
2734	return
2735}
2736
2737// ApplicationGatewaySku SKU of an application gateway.
2738type ApplicationGatewaySku struct {
2739	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
2740	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2741	// Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
2742	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2743	// Capacity - Capacity (instance count) of an application gateway.
2744	Capacity *int32 `json:"capacity,omitempty"`
2745}
2746
2747// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2748type ApplicationGatewaySslCertificate struct {
2749	// ApplicationGatewaySslCertificatePropertiesFormat - Properties of the application gateway SSL certificate.
2750	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2751	// Name - Name of the SSL certificate that is unique within an Application Gateway.
2752	Name *string `json:"name,omitempty"`
2753	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2754	Etag *string `json:"etag,omitempty"`
2755	// Type - READ-ONLY; Type of the resource.
2756	Type *string `json:"type,omitempty"`
2757	// ID - Resource ID.
2758	ID *string `json:"id,omitempty"`
2759}
2760
2761// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2762func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2763	objectMap := make(map[string]interface{})
2764	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2765		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2766	}
2767	if agsc.Name != nil {
2768		objectMap["name"] = agsc.Name
2769	}
2770	if agsc.ID != nil {
2771		objectMap["id"] = agsc.ID
2772	}
2773	return json.Marshal(objectMap)
2774}
2775
2776// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2777func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2778	var m map[string]*json.RawMessage
2779	err := json.Unmarshal(body, &m)
2780	if err != nil {
2781		return err
2782	}
2783	for k, v := range m {
2784		switch k {
2785		case "properties":
2786			if v != nil {
2787				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2788				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2789				if err != nil {
2790					return err
2791				}
2792				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2793			}
2794		case "name":
2795			if v != nil {
2796				var name string
2797				err = json.Unmarshal(*v, &name)
2798				if err != nil {
2799					return err
2800				}
2801				agsc.Name = &name
2802			}
2803		case "etag":
2804			if v != nil {
2805				var etag string
2806				err = json.Unmarshal(*v, &etag)
2807				if err != nil {
2808					return err
2809				}
2810				agsc.Etag = &etag
2811			}
2812		case "type":
2813			if v != nil {
2814				var typeVar string
2815				err = json.Unmarshal(*v, &typeVar)
2816				if err != nil {
2817					return err
2818				}
2819				agsc.Type = &typeVar
2820			}
2821		case "id":
2822			if v != nil {
2823				var ID string
2824				err = json.Unmarshal(*v, &ID)
2825				if err != nil {
2826					return err
2827				}
2828				agsc.ID = &ID
2829			}
2830		}
2831	}
2832
2833	return nil
2834}
2835
2836// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2837// gateway.
2838type ApplicationGatewaySslCertificatePropertiesFormat struct {
2839	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2840	Data *string `json:"data,omitempty"`
2841	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2842	Password *string `json:"password,omitempty"`
2843	// PublicCertData - READ-ONLY; Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2844	PublicCertData *string `json:"publicCertData,omitempty"`
2845	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2846	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2847	// ProvisioningState - READ-ONLY; The provisioning state of the SSL certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2848	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2849}
2850
2851// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificatePropertiesFormat.
2852func (agscpf ApplicationGatewaySslCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
2853	objectMap := make(map[string]interface{})
2854	if agscpf.Data != nil {
2855		objectMap["data"] = agscpf.Data
2856	}
2857	if agscpf.Password != nil {
2858		objectMap["password"] = agscpf.Password
2859	}
2860	if agscpf.KeyVaultSecretID != nil {
2861		objectMap["keyVaultSecretId"] = agscpf.KeyVaultSecretID
2862	}
2863	return json.Marshal(objectMap)
2864}
2865
2866// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2867type ApplicationGatewaySslPolicy struct {
2868	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2869	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2870	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2871	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2872	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2873	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2874	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2875	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2876	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2877	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2878}
2879
2880// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy.
2881type ApplicationGatewaySslPredefinedPolicy struct {
2882	autorest.Response `json:"-"`
2883	// Name - Name of the Ssl predefined policy.
2884	Name *string `json:"name,omitempty"`
2885	// ApplicationGatewaySslPredefinedPolicyPropertiesFormat - Properties of the application gateway SSL predefined policy.
2886	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2887	// ID - Resource ID.
2888	ID *string `json:"id,omitempty"`
2889}
2890
2891// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2892func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2893	objectMap := make(map[string]interface{})
2894	if agspp.Name != nil {
2895		objectMap["name"] = agspp.Name
2896	}
2897	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2898		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2899	}
2900	if agspp.ID != nil {
2901		objectMap["id"] = agspp.ID
2902	}
2903	return json.Marshal(objectMap)
2904}
2905
2906// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2907func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2908	var m map[string]*json.RawMessage
2909	err := json.Unmarshal(body, &m)
2910	if err != nil {
2911		return err
2912	}
2913	for k, v := range m {
2914		switch k {
2915		case "name":
2916			if v != nil {
2917				var name string
2918				err = json.Unmarshal(*v, &name)
2919				if err != nil {
2920					return err
2921				}
2922				agspp.Name = &name
2923			}
2924		case "properties":
2925			if v != nil {
2926				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2927				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2928				if err != nil {
2929					return err
2930				}
2931				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2932			}
2933		case "id":
2934			if v != nil {
2935				var ID string
2936				err = json.Unmarshal(*v, &ID)
2937				if err != nil {
2938					return err
2939				}
2940				agspp.ID = &ID
2941			}
2942		}
2943	}
2944
2945	return nil
2946}
2947
2948// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2949// ApplicationGatewaySslPredefinedPolicy.
2950type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2951	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2952	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2953	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2954	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2955}
2956
2957// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2958// long-running operation.
2959type ApplicationGatewaysStartFuture struct {
2960	azure.FutureAPI
2961	// Result returns the result of the asynchronous operation.
2962	// If the operation has not completed it will return an error.
2963	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2964}
2965
2966// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2967func (future *ApplicationGatewaysStartFuture) UnmarshalJSON(body []byte) error {
2968	var azFuture azure.Future
2969	if err := json.Unmarshal(body, &azFuture); err != nil {
2970		return err
2971	}
2972	future.FutureAPI = &azFuture
2973	future.Result = future.result
2974	return nil
2975}
2976
2977// result is the default implementation for ApplicationGatewaysStartFuture.Result.
2978func (future *ApplicationGatewaysStartFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2979	var done bool
2980	done, err = future.DoneWithContext(context.Background(), client)
2981	if err != nil {
2982		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
2983		return
2984	}
2985	if !done {
2986		ar.Response = future.Response()
2987		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
2988		return
2989	}
2990	ar.Response = future.Response()
2991	return
2992}
2993
2994// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2995// operation.
2996type ApplicationGatewaysStopFuture struct {
2997	azure.FutureAPI
2998	// Result returns the result of the asynchronous operation.
2999	// If the operation has not completed it will return an error.
3000	Result func(ApplicationGatewaysClient) (autorest.Response, error)
3001}
3002
3003// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3004func (future *ApplicationGatewaysStopFuture) UnmarshalJSON(body []byte) error {
3005	var azFuture azure.Future
3006	if err := json.Unmarshal(body, &azFuture); err != nil {
3007		return err
3008	}
3009	future.FutureAPI = &azFuture
3010	future.Result = future.result
3011	return nil
3012}
3013
3014// result is the default implementation for ApplicationGatewaysStopFuture.Result.
3015func (future *ApplicationGatewaysStopFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
3016	var done bool
3017	done, err = future.DoneWithContext(context.Background(), client)
3018	if err != nil {
3019		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
3020		return
3021	}
3022	if !done {
3023		ar.Response = future.Response()
3024		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
3025		return
3026	}
3027	ar.Response = future.Response()
3028	return
3029}
3030
3031// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway.
3032type ApplicationGatewayTrustedRootCertificate struct {
3033	// ApplicationGatewayTrustedRootCertificatePropertiesFormat - Properties of the application gateway trusted root certificate.
3034	*ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"`
3035	// Name - Name of the trusted root certificate that is unique within an Application Gateway.
3036	Name *string `json:"name,omitempty"`
3037	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3038	Etag *string `json:"etag,omitempty"`
3039	// Type - READ-ONLY; Type of the resource.
3040	Type *string `json:"type,omitempty"`
3041	// ID - Resource ID.
3042	ID *string `json:"id,omitempty"`
3043}
3044
3045// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificate.
3046func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) {
3047	objectMap := make(map[string]interface{})
3048	if agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat != nil {
3049		objectMap["properties"] = agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat
3050	}
3051	if agtrc.Name != nil {
3052		objectMap["name"] = agtrc.Name
3053	}
3054	if agtrc.ID != nil {
3055		objectMap["id"] = agtrc.ID
3056	}
3057	return json.Marshal(objectMap)
3058}
3059
3060// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedRootCertificate struct.
3061func (agtrc *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(body []byte) error {
3062	var m map[string]*json.RawMessage
3063	err := json.Unmarshal(body, &m)
3064	if err != nil {
3065		return err
3066	}
3067	for k, v := range m {
3068		switch k {
3069		case "properties":
3070			if v != nil {
3071				var applicationGatewayTrustedRootCertificatePropertiesFormat ApplicationGatewayTrustedRootCertificatePropertiesFormat
3072				err = json.Unmarshal(*v, &applicationGatewayTrustedRootCertificatePropertiesFormat)
3073				if err != nil {
3074					return err
3075				}
3076				agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat = &applicationGatewayTrustedRootCertificatePropertiesFormat
3077			}
3078		case "name":
3079			if v != nil {
3080				var name string
3081				err = json.Unmarshal(*v, &name)
3082				if err != nil {
3083					return err
3084				}
3085				agtrc.Name = &name
3086			}
3087		case "etag":
3088			if v != nil {
3089				var etag string
3090				err = json.Unmarshal(*v, &etag)
3091				if err != nil {
3092					return err
3093				}
3094				agtrc.Etag = &etag
3095			}
3096		case "type":
3097			if v != nil {
3098				var typeVar string
3099				err = json.Unmarshal(*v, &typeVar)
3100				if err != nil {
3101					return err
3102				}
3103				agtrc.Type = &typeVar
3104			}
3105		case "id":
3106			if v != nil {
3107				var ID string
3108				err = json.Unmarshal(*v, &ID)
3109				if err != nil {
3110					return err
3111				}
3112				agtrc.ID = &ID
3113			}
3114		}
3115	}
3116
3117	return nil
3118}
3119
3120// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an
3121// application gateway.
3122type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct {
3123	// Data - Certificate public data.
3124	Data *string `json:"data,omitempty"`
3125	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
3126	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
3127	// ProvisioningState - READ-ONLY; The provisioning state of the trusted root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3128	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3129}
3130
3131// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificatePropertiesFormat.
3132func (agtrcpf ApplicationGatewayTrustedRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
3133	objectMap := make(map[string]interface{})
3134	if agtrcpf.Data != nil {
3135		objectMap["data"] = agtrcpf.Data
3136	}
3137	if agtrcpf.KeyVaultSecretID != nil {
3138		objectMap["keyVaultSecretId"] = agtrcpf.KeyVaultSecretID
3139	}
3140	return json.Marshal(objectMap)
3141}
3142
3143// ApplicationGatewayURLConfiguration url configuration of the Actions set in Application Gateway.
3144type ApplicationGatewayURLConfiguration struct {
3145	// ModifiedPath - Url path which user has provided for url rewrite. Null means no path will be updated. Default value is null.
3146	ModifiedPath *string `json:"modifiedPath,omitempty"`
3147	// ModifiedQueryString - Query string which user has provided for url rewrite. Null means no query string will be updated. Default value is null.
3148	ModifiedQueryString *string `json:"modifiedQueryString,omitempty"`
3149	// 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.
3150	Reroute *bool `json:"reroute,omitempty"`
3151}
3152
3153// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
3154// PathBasedRouting.
3155type ApplicationGatewayURLPathMap struct {
3156	// ApplicationGatewayURLPathMapPropertiesFormat - Properties of the application gateway URL path map.
3157	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
3158	// Name - Name of the URL path map that is unique within an Application Gateway.
3159	Name *string `json:"name,omitempty"`
3160	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3161	Etag *string `json:"etag,omitempty"`
3162	// Type - READ-ONLY; Type of the resource.
3163	Type *string `json:"type,omitempty"`
3164	// ID - Resource ID.
3165	ID *string `json:"id,omitempty"`
3166}
3167
3168// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
3169func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
3170	objectMap := make(map[string]interface{})
3171	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
3172		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
3173	}
3174	if agupm.Name != nil {
3175		objectMap["name"] = agupm.Name
3176	}
3177	if agupm.ID != nil {
3178		objectMap["id"] = agupm.ID
3179	}
3180	return json.Marshal(objectMap)
3181}
3182
3183// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
3184func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
3185	var m map[string]*json.RawMessage
3186	err := json.Unmarshal(body, &m)
3187	if err != nil {
3188		return err
3189	}
3190	for k, v := range m {
3191		switch k {
3192		case "properties":
3193			if v != nil {
3194				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
3195				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
3196				if err != nil {
3197					return err
3198				}
3199				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
3200			}
3201		case "name":
3202			if v != nil {
3203				var name string
3204				err = json.Unmarshal(*v, &name)
3205				if err != nil {
3206					return err
3207				}
3208				agupm.Name = &name
3209			}
3210		case "etag":
3211			if v != nil {
3212				var etag string
3213				err = json.Unmarshal(*v, &etag)
3214				if err != nil {
3215					return err
3216				}
3217				agupm.Etag = &etag
3218			}
3219		case "type":
3220			if v != nil {
3221				var typeVar string
3222				err = json.Unmarshal(*v, &typeVar)
3223				if err != nil {
3224					return err
3225				}
3226				agupm.Type = &typeVar
3227			}
3228		case "id":
3229			if v != nil {
3230				var ID string
3231				err = json.Unmarshal(*v, &ID)
3232				if err != nil {
3233					return err
3234				}
3235				agupm.ID = &ID
3236			}
3237		}
3238	}
3239
3240	return nil
3241}
3242
3243// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
3244type ApplicationGatewayURLPathMapPropertiesFormat struct {
3245	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
3246	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
3247	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
3248	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
3249	// DefaultRewriteRuleSet - Default Rewrite rule set resource of URL path map.
3250	DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"`
3251	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
3252	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
3253	// PathRules - Path rule of URL path map resource.
3254	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
3255	// ProvisioningState - READ-ONLY; The provisioning state of the URL path map resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3256	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3257}
3258
3259// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMapPropertiesFormat.
3260func (agupmpf ApplicationGatewayURLPathMapPropertiesFormat) MarshalJSON() ([]byte, error) {
3261	objectMap := make(map[string]interface{})
3262	if agupmpf.DefaultBackendAddressPool != nil {
3263		objectMap["defaultBackendAddressPool"] = agupmpf.DefaultBackendAddressPool
3264	}
3265	if agupmpf.DefaultBackendHTTPSettings != nil {
3266		objectMap["defaultBackendHttpSettings"] = agupmpf.DefaultBackendHTTPSettings
3267	}
3268	if agupmpf.DefaultRewriteRuleSet != nil {
3269		objectMap["defaultRewriteRuleSet"] = agupmpf.DefaultRewriteRuleSet
3270	}
3271	if agupmpf.DefaultRedirectConfiguration != nil {
3272		objectMap["defaultRedirectConfiguration"] = agupmpf.DefaultRedirectConfiguration
3273	}
3274	if agupmpf.PathRules != nil {
3275		objectMap["pathRules"] = agupmpf.PathRules
3276	}
3277	return json.Marshal(objectMap)
3278}
3279
3280// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
3281// configuration.
3282type ApplicationGatewayWebApplicationFirewallConfiguration struct {
3283	// Enabled - Whether the web application firewall is enabled or not.
3284	Enabled *bool `json:"enabled,omitempty"`
3285	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
3286	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
3287	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
3288	RuleSetType *string `json:"ruleSetType,omitempty"`
3289	// RuleSetVersion - The version of the rule set type.
3290	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
3291	// DisabledRuleGroups - The disabled rule groups.
3292	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
3293	// RequestBodyCheck - Whether allow WAF to check request Body.
3294	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
3295	// MaxRequestBodySize - Maximum request body size for WAF.
3296	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
3297	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
3298	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
3299	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
3300	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
3301	// Exclusions - The exclusion list.
3302	Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"`
3303}
3304
3305// ApplicationRuleCondition rule condition of type application.
3306type ApplicationRuleCondition struct {
3307	// SourceAddresses - List of source IP addresses for this rule.
3308	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
3309	// DestinationAddresses - List of destination IP addresses or Service Tags.
3310	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
3311	// Protocols - Array of Application Protocols.
3312	Protocols *[]FirewallPolicyRuleConditionApplicationProtocol `json:"protocols,omitempty"`
3313	// TargetFqdns - List of FQDNs for this rule condition.
3314	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
3315	// FqdnTags - List of FQDN Tags for this rule condition.
3316	FqdnTags *[]string `json:"fqdnTags,omitempty"`
3317	// SourceIPGroups - List of source IpGroups for this rule.
3318	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
3319	// Name - Name of the rule condition.
3320	Name *string `json:"name,omitempty"`
3321	// Description - Description of the rule condition.
3322	Description *string `json:"description,omitempty"`
3323	// RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNatRuleCondition', 'RuleConditionTypeNetworkRuleCondition'
3324	RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"`
3325}
3326
3327// MarshalJSON is the custom marshaler for ApplicationRuleCondition.
3328func (arc ApplicationRuleCondition) MarshalJSON() ([]byte, error) {
3329	arc.RuleConditionType = RuleConditionTypeApplicationRuleCondition
3330	objectMap := make(map[string]interface{})
3331	if arc.SourceAddresses != nil {
3332		objectMap["sourceAddresses"] = arc.SourceAddresses
3333	}
3334	if arc.DestinationAddresses != nil {
3335		objectMap["destinationAddresses"] = arc.DestinationAddresses
3336	}
3337	if arc.Protocols != nil {
3338		objectMap["protocols"] = arc.Protocols
3339	}
3340	if arc.TargetFqdns != nil {
3341		objectMap["targetFqdns"] = arc.TargetFqdns
3342	}
3343	if arc.FqdnTags != nil {
3344		objectMap["fqdnTags"] = arc.FqdnTags
3345	}
3346	if arc.SourceIPGroups != nil {
3347		objectMap["sourceIpGroups"] = arc.SourceIPGroups
3348	}
3349	if arc.Name != nil {
3350		objectMap["name"] = arc.Name
3351	}
3352	if arc.Description != nil {
3353		objectMap["description"] = arc.Description
3354	}
3355	if arc.RuleConditionType != "" {
3356		objectMap["ruleConditionType"] = arc.RuleConditionType
3357	}
3358	return json.Marshal(objectMap)
3359}
3360
3361// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
3362func (arc ApplicationRuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) {
3363	return &arc, true
3364}
3365
3366// AsNatRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
3367func (arc ApplicationRuleCondition) AsNatRuleCondition() (*NatRuleCondition, bool) {
3368	return nil, false
3369}
3370
3371// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
3372func (arc ApplicationRuleCondition) AsRuleCondition() (*RuleCondition, bool) {
3373	return nil, false
3374}
3375
3376// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
3377func (arc ApplicationRuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) {
3378	return nil, false
3379}
3380
3381// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
3382func (arc ApplicationRuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) {
3383	return &arc, true
3384}
3385
3386// ApplicationSecurityGroup an application security group in a resource group.
3387type ApplicationSecurityGroup struct {
3388	autorest.Response `json:"-"`
3389	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
3390	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
3391	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3392	Etag *string `json:"etag,omitempty"`
3393	// ID - Resource ID.
3394	ID *string `json:"id,omitempty"`
3395	// Name - READ-ONLY; Resource name.
3396	Name *string `json:"name,omitempty"`
3397	// Type - READ-ONLY; Resource type.
3398	Type *string `json:"type,omitempty"`
3399	// Location - Resource location.
3400	Location *string `json:"location,omitempty"`
3401	// Tags - Resource tags.
3402	Tags map[string]*string `json:"tags"`
3403}
3404
3405// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
3406func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
3407	objectMap := make(map[string]interface{})
3408	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
3409		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
3410	}
3411	if asg.ID != nil {
3412		objectMap["id"] = asg.ID
3413	}
3414	if asg.Location != nil {
3415		objectMap["location"] = asg.Location
3416	}
3417	if asg.Tags != nil {
3418		objectMap["tags"] = asg.Tags
3419	}
3420	return json.Marshal(objectMap)
3421}
3422
3423// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
3424func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
3425	var m map[string]*json.RawMessage
3426	err := json.Unmarshal(body, &m)
3427	if err != nil {
3428		return err
3429	}
3430	for k, v := range m {
3431		switch k {
3432		case "properties":
3433			if v != nil {
3434				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
3435				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
3436				if err != nil {
3437					return err
3438				}
3439				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
3440			}
3441		case "etag":
3442			if v != nil {
3443				var etag string
3444				err = json.Unmarshal(*v, &etag)
3445				if err != nil {
3446					return err
3447				}
3448				asg.Etag = &etag
3449			}
3450		case "id":
3451			if v != nil {
3452				var ID string
3453				err = json.Unmarshal(*v, &ID)
3454				if err != nil {
3455					return err
3456				}
3457				asg.ID = &ID
3458			}
3459		case "name":
3460			if v != nil {
3461				var name string
3462				err = json.Unmarshal(*v, &name)
3463				if err != nil {
3464					return err
3465				}
3466				asg.Name = &name
3467			}
3468		case "type":
3469			if v != nil {
3470				var typeVar string
3471				err = json.Unmarshal(*v, &typeVar)
3472				if err != nil {
3473					return err
3474				}
3475				asg.Type = &typeVar
3476			}
3477		case "location":
3478			if v != nil {
3479				var location string
3480				err = json.Unmarshal(*v, &location)
3481				if err != nil {
3482					return err
3483				}
3484				asg.Location = &location
3485			}
3486		case "tags":
3487			if v != nil {
3488				var tags map[string]*string
3489				err = json.Unmarshal(*v, &tags)
3490				if err != nil {
3491					return err
3492				}
3493				asg.Tags = tags
3494			}
3495		}
3496	}
3497
3498	return nil
3499}
3500
3501// ApplicationSecurityGroupListResult a list of application security groups.
3502type ApplicationSecurityGroupListResult struct {
3503	autorest.Response `json:"-"`
3504	// Value - A list of application security groups.
3505	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
3506	// NextLink - READ-ONLY; The URL to get the next set of results.
3507	NextLink *string `json:"nextLink,omitempty"`
3508}
3509
3510// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
3511func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
3512	objectMap := make(map[string]interface{})
3513	if asglr.Value != nil {
3514		objectMap["value"] = asglr.Value
3515	}
3516	return json.Marshal(objectMap)
3517}
3518
3519// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
3520// ApplicationSecurityGroup values.
3521type ApplicationSecurityGroupListResultIterator struct {
3522	i    int
3523	page ApplicationSecurityGroupListResultPage
3524}
3525
3526// NextWithContext advances to the next value.  If there was an error making
3527// the request the iterator does not advance and the error is returned.
3528func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
3529	if tracing.IsEnabled() {
3530		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
3531		defer func() {
3532			sc := -1
3533			if iter.Response().Response.Response != nil {
3534				sc = iter.Response().Response.Response.StatusCode
3535			}
3536			tracing.EndSpan(ctx, sc, err)
3537		}()
3538	}
3539	iter.i++
3540	if iter.i < len(iter.page.Values()) {
3541		return nil
3542	}
3543	err = iter.page.NextWithContext(ctx)
3544	if err != nil {
3545		iter.i--
3546		return err
3547	}
3548	iter.i = 0
3549	return nil
3550}
3551
3552// Next advances to the next value.  If there was an error making
3553// the request the iterator does not advance and the error is returned.
3554// Deprecated: Use NextWithContext() instead.
3555func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
3556	return iter.NextWithContext(context.Background())
3557}
3558
3559// NotDone returns true if the enumeration should be started or is not yet complete.
3560func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
3561	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3562}
3563
3564// Response returns the raw server response from the last page request.
3565func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
3566	return iter.page.Response()
3567}
3568
3569// Value returns the current value or a zero-initialized value if the
3570// iterator has advanced beyond the end of the collection.
3571func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
3572	if !iter.page.NotDone() {
3573		return ApplicationSecurityGroup{}
3574	}
3575	return iter.page.Values()[iter.i]
3576}
3577
3578// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
3579func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
3580	return ApplicationSecurityGroupListResultIterator{page: page}
3581}
3582
3583// IsEmpty returns true if the ListResult contains no values.
3584func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
3585	return asglr.Value == nil || len(*asglr.Value) == 0
3586}
3587
3588// hasNextLink returns true if the NextLink is not empty.
3589func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
3590	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
3591}
3592
3593// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
3594// It returns nil if no more results exist.
3595func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
3596	if !asglr.hasNextLink() {
3597		return nil, nil
3598	}
3599	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3600		autorest.AsJSON(),
3601		autorest.AsGet(),
3602		autorest.WithBaseURL(to.String(asglr.NextLink)))
3603}
3604
3605// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
3606type ApplicationSecurityGroupListResultPage struct {
3607	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
3608	asglr ApplicationSecurityGroupListResult
3609}
3610
3611// NextWithContext advances to the next page of values.  If there was an error making
3612// the request the page does not advance and the error is returned.
3613func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
3614	if tracing.IsEnabled() {
3615		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
3616		defer func() {
3617			sc := -1
3618			if page.Response().Response.Response != nil {
3619				sc = page.Response().Response.Response.StatusCode
3620			}
3621			tracing.EndSpan(ctx, sc, err)
3622		}()
3623	}
3624	for {
3625		next, err := page.fn(ctx, page.asglr)
3626		if err != nil {
3627			return err
3628		}
3629		page.asglr = next
3630		if !next.hasNextLink() || !next.IsEmpty() {
3631			break
3632		}
3633	}
3634	return nil
3635}
3636
3637// Next advances to the next page of values.  If there was an error making
3638// the request the page does not advance and the error is returned.
3639// Deprecated: Use NextWithContext() instead.
3640func (page *ApplicationSecurityGroupListResultPage) Next() error {
3641	return page.NextWithContext(context.Background())
3642}
3643
3644// NotDone returns true if the page enumeration should be started or is not yet complete.
3645func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
3646	return !page.asglr.IsEmpty()
3647}
3648
3649// Response returns the raw server response from the last page request.
3650func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
3651	return page.asglr
3652}
3653
3654// Values returns the slice of values for the current page or nil if there are no values.
3655func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
3656	if page.asglr.IsEmpty() {
3657		return nil
3658	}
3659	return *page.asglr.Value
3660}
3661
3662// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
3663func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
3664	return ApplicationSecurityGroupListResultPage{
3665		fn:    getNextPage,
3666		asglr: cur,
3667	}
3668}
3669
3670// ApplicationSecurityGroupPropertiesFormat application security group properties.
3671type ApplicationSecurityGroupPropertiesFormat struct {
3672	// 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.
3673	ResourceGUID *string `json:"resourceGuid,omitempty"`
3674	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3675	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3676}
3677
3678// MarshalJSON is the custom marshaler for ApplicationSecurityGroupPropertiesFormat.
3679func (asgpf ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
3680	objectMap := make(map[string]interface{})
3681	return json.Marshal(objectMap)
3682}
3683
3684// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
3685// of a long-running operation.
3686type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
3687	azure.FutureAPI
3688	// Result returns the result of the asynchronous operation.
3689	// If the operation has not completed it will return an error.
3690	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3691}
3692
3693// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3694func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3695	var azFuture azure.Future
3696	if err := json.Unmarshal(body, &azFuture); err != nil {
3697		return err
3698	}
3699	future.FutureAPI = &azFuture
3700	future.Result = future.result
3701	return nil
3702}
3703
3704// result is the default implementation for ApplicationSecurityGroupsCreateOrUpdateFuture.Result.
3705func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
3706	var done bool
3707	done, err = future.DoneWithContext(context.Background(), client)
3708	if err != nil {
3709		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3710		return
3711	}
3712	if !done {
3713		asg.Response.Response = future.Response()
3714		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
3715		return
3716	}
3717	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3718	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3719		asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
3720		if err != nil {
3721			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
3722		}
3723	}
3724	return
3725}
3726
3727// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
3728// long-running operation.
3729type ApplicationSecurityGroupsDeleteFuture struct {
3730	azure.FutureAPI
3731	// Result returns the result of the asynchronous operation.
3732	// If the operation has not completed it will return an error.
3733	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
3734}
3735
3736// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3737func (future *ApplicationSecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
3738	var azFuture azure.Future
3739	if err := json.Unmarshal(body, &azFuture); err != nil {
3740		return err
3741	}
3742	future.FutureAPI = &azFuture
3743	future.Result = future.result
3744	return nil
3745}
3746
3747// result is the default implementation for ApplicationSecurityGroupsDeleteFuture.Result.
3748func (future *ApplicationSecurityGroupsDeleteFuture) result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
3749	var done bool
3750	done, err = future.DoneWithContext(context.Background(), client)
3751	if err != nil {
3752		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
3753		return
3754	}
3755	if !done {
3756		ar.Response = future.Response()
3757		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
3758		return
3759	}
3760	ar.Response = future.Response()
3761	return
3762}
3763
3764// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
3765// that belongs to an ExpressRouteCircuit.
3766type AuthorizationListResult struct {
3767	autorest.Response `json:"-"`
3768	// Value - The authorizations in an ExpressRoute Circuit.
3769	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
3770	// NextLink - The URL to get the next set of results.
3771	NextLink *string `json:"nextLink,omitempty"`
3772}
3773
3774// AuthorizationListResultIterator provides access to a complete listing of
3775// ExpressRouteCircuitAuthorization values.
3776type AuthorizationListResultIterator struct {
3777	i    int
3778	page AuthorizationListResultPage
3779}
3780
3781// NextWithContext advances to the next value.  If there was an error making
3782// the request the iterator does not advance and the error is returned.
3783func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3784	if tracing.IsEnabled() {
3785		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
3786		defer func() {
3787			sc := -1
3788			if iter.Response().Response.Response != nil {
3789				sc = iter.Response().Response.Response.StatusCode
3790			}
3791			tracing.EndSpan(ctx, sc, err)
3792		}()
3793	}
3794	iter.i++
3795	if iter.i < len(iter.page.Values()) {
3796		return nil
3797	}
3798	err = iter.page.NextWithContext(ctx)
3799	if err != nil {
3800		iter.i--
3801		return err
3802	}
3803	iter.i = 0
3804	return nil
3805}
3806
3807// Next advances to the next value.  If there was an error making
3808// the request the iterator does not advance and the error is returned.
3809// Deprecated: Use NextWithContext() instead.
3810func (iter *AuthorizationListResultIterator) Next() error {
3811	return iter.NextWithContext(context.Background())
3812}
3813
3814// NotDone returns true if the enumeration should be started or is not yet complete.
3815func (iter AuthorizationListResultIterator) NotDone() bool {
3816	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3817}
3818
3819// Response returns the raw server response from the last page request.
3820func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
3821	return iter.page.Response()
3822}
3823
3824// Value returns the current value or a zero-initialized value if the
3825// iterator has advanced beyond the end of the collection.
3826func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
3827	if !iter.page.NotDone() {
3828		return ExpressRouteCircuitAuthorization{}
3829	}
3830	return iter.page.Values()[iter.i]
3831}
3832
3833// Creates a new instance of the AuthorizationListResultIterator type.
3834func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
3835	return AuthorizationListResultIterator{page: page}
3836}
3837
3838// IsEmpty returns true if the ListResult contains no values.
3839func (alr AuthorizationListResult) IsEmpty() bool {
3840	return alr.Value == nil || len(*alr.Value) == 0
3841}
3842
3843// hasNextLink returns true if the NextLink is not empty.
3844func (alr AuthorizationListResult) hasNextLink() bool {
3845	return alr.NextLink != nil && len(*alr.NextLink) != 0
3846}
3847
3848// authorizationListResultPreparer prepares a request to retrieve the next set of results.
3849// It returns nil if no more results exist.
3850func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
3851	if !alr.hasNextLink() {
3852		return nil, nil
3853	}
3854	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3855		autorest.AsJSON(),
3856		autorest.AsGet(),
3857		autorest.WithBaseURL(to.String(alr.NextLink)))
3858}
3859
3860// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
3861type AuthorizationListResultPage struct {
3862	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
3863	alr AuthorizationListResult
3864}
3865
3866// NextWithContext advances to the next page of values.  If there was an error making
3867// the request the page does not advance and the error is returned.
3868func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
3869	if tracing.IsEnabled() {
3870		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
3871		defer func() {
3872			sc := -1
3873			if page.Response().Response.Response != nil {
3874				sc = page.Response().Response.Response.StatusCode
3875			}
3876			tracing.EndSpan(ctx, sc, err)
3877		}()
3878	}
3879	for {
3880		next, err := page.fn(ctx, page.alr)
3881		if err != nil {
3882			return err
3883		}
3884		page.alr = next
3885		if !next.hasNextLink() || !next.IsEmpty() {
3886			break
3887		}
3888	}
3889	return nil
3890}
3891
3892// Next advances to the next page of values.  If there was an error making
3893// the request the page does not advance and the error is returned.
3894// Deprecated: Use NextWithContext() instead.
3895func (page *AuthorizationListResultPage) Next() error {
3896	return page.NextWithContext(context.Background())
3897}
3898
3899// NotDone returns true if the page enumeration should be started or is not yet complete.
3900func (page AuthorizationListResultPage) NotDone() bool {
3901	return !page.alr.IsEmpty()
3902}
3903
3904// Response returns the raw server response from the last page request.
3905func (page AuthorizationListResultPage) Response() AuthorizationListResult {
3906	return page.alr
3907}
3908
3909// Values returns the slice of values for the current page or nil if there are no values.
3910func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
3911	if page.alr.IsEmpty() {
3912		return nil
3913	}
3914	return *page.alr.Value
3915}
3916
3917// Creates a new instance of the AuthorizationListResultPage type.
3918func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
3919	return AuthorizationListResultPage{
3920		fn:  getNextPage,
3921		alr: cur,
3922	}
3923}
3924
3925// AuthorizationPropertiesFormat properties of ExpressRouteCircuitAuthorization.
3926type AuthorizationPropertiesFormat struct {
3927	// AuthorizationKey - The authorization key.
3928	AuthorizationKey *string `json:"authorizationKey,omitempty"`
3929	// AuthorizationUseStatus - The authorization use status. Possible values include: 'Available', 'InUse'
3930	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
3931	// ProvisioningState - READ-ONLY; The provisioning state of the authorization resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3932	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3933}
3934
3935// MarshalJSON is the custom marshaler for AuthorizationPropertiesFormat.
3936func (apf AuthorizationPropertiesFormat) MarshalJSON() ([]byte, error) {
3937	objectMap := make(map[string]interface{})
3938	if apf.AuthorizationKey != nil {
3939		objectMap["authorizationKey"] = apf.AuthorizationKey
3940	}
3941	if apf.AuthorizationUseStatus != "" {
3942		objectMap["authorizationUseStatus"] = apf.AuthorizationUseStatus
3943	}
3944	return json.Marshal(objectMap)
3945}
3946
3947// AutoApprovedPrivateLinkService the information of an AutoApprovedPrivateLinkService.
3948type AutoApprovedPrivateLinkService struct {
3949	// PrivateLinkService - The id of the private link service resource.
3950	PrivateLinkService *string `json:"privateLinkService,omitempty"`
3951}
3952
3953// AutoApprovedPrivateLinkServicesResult an array of private link service id that can be linked to a
3954// private end point with auto approved.
3955type AutoApprovedPrivateLinkServicesResult struct {
3956	autorest.Response `json:"-"`
3957	// Value - An array of auto approved private link service.
3958	Value *[]AutoApprovedPrivateLinkService `json:"value,omitempty"`
3959	// NextLink - READ-ONLY; The URL to get the next set of results.
3960	NextLink *string `json:"nextLink,omitempty"`
3961}
3962
3963// MarshalJSON is the custom marshaler for AutoApprovedPrivateLinkServicesResult.
3964func (aaplsr AutoApprovedPrivateLinkServicesResult) MarshalJSON() ([]byte, error) {
3965	objectMap := make(map[string]interface{})
3966	if aaplsr.Value != nil {
3967		objectMap["value"] = aaplsr.Value
3968	}
3969	return json.Marshal(objectMap)
3970}
3971
3972// AutoApprovedPrivateLinkServicesResultIterator provides access to a complete listing of
3973// AutoApprovedPrivateLinkService values.
3974type AutoApprovedPrivateLinkServicesResultIterator struct {
3975	i    int
3976	page AutoApprovedPrivateLinkServicesResultPage
3977}
3978
3979// NextWithContext advances to the next value.  If there was an error making
3980// the request the iterator does not advance and the error is returned.
3981func (iter *AutoApprovedPrivateLinkServicesResultIterator) NextWithContext(ctx context.Context) (err error) {
3982	if tracing.IsEnabled() {
3983		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultIterator.NextWithContext")
3984		defer func() {
3985			sc := -1
3986			if iter.Response().Response.Response != nil {
3987				sc = iter.Response().Response.Response.StatusCode
3988			}
3989			tracing.EndSpan(ctx, sc, err)
3990		}()
3991	}
3992	iter.i++
3993	if iter.i < len(iter.page.Values()) {
3994		return nil
3995	}
3996	err = iter.page.NextWithContext(ctx)
3997	if err != nil {
3998		iter.i--
3999		return err
4000	}
4001	iter.i = 0
4002	return nil
4003}
4004
4005// Next advances to the next value.  If there was an error making
4006// the request the iterator does not advance and the error is returned.
4007// Deprecated: Use NextWithContext() instead.
4008func (iter *AutoApprovedPrivateLinkServicesResultIterator) Next() error {
4009	return iter.NextWithContext(context.Background())
4010}
4011
4012// NotDone returns true if the enumeration should be started or is not yet complete.
4013func (iter AutoApprovedPrivateLinkServicesResultIterator) NotDone() bool {
4014	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4015}
4016
4017// Response returns the raw server response from the last page request.
4018func (iter AutoApprovedPrivateLinkServicesResultIterator) Response() AutoApprovedPrivateLinkServicesResult {
4019	return iter.page.Response()
4020}
4021
4022// Value returns the current value or a zero-initialized value if the
4023// iterator has advanced beyond the end of the collection.
4024func (iter AutoApprovedPrivateLinkServicesResultIterator) Value() AutoApprovedPrivateLinkService {
4025	if !iter.page.NotDone() {
4026		return AutoApprovedPrivateLinkService{}
4027	}
4028	return iter.page.Values()[iter.i]
4029}
4030
4031// Creates a new instance of the AutoApprovedPrivateLinkServicesResultIterator type.
4032func NewAutoApprovedPrivateLinkServicesResultIterator(page AutoApprovedPrivateLinkServicesResultPage) AutoApprovedPrivateLinkServicesResultIterator {
4033	return AutoApprovedPrivateLinkServicesResultIterator{page: page}
4034}
4035
4036// IsEmpty returns true if the ListResult contains no values.
4037func (aaplsr AutoApprovedPrivateLinkServicesResult) IsEmpty() bool {
4038	return aaplsr.Value == nil || len(*aaplsr.Value) == 0
4039}
4040
4041// hasNextLink returns true if the NextLink is not empty.
4042func (aaplsr AutoApprovedPrivateLinkServicesResult) hasNextLink() bool {
4043	return aaplsr.NextLink != nil && len(*aaplsr.NextLink) != 0
4044}
4045
4046// autoApprovedPrivateLinkServicesResultPreparer prepares a request to retrieve the next set of results.
4047// It returns nil if no more results exist.
4048func (aaplsr AutoApprovedPrivateLinkServicesResult) autoApprovedPrivateLinkServicesResultPreparer(ctx context.Context) (*http.Request, error) {
4049	if !aaplsr.hasNextLink() {
4050		return nil, nil
4051	}
4052	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4053		autorest.AsJSON(),
4054		autorest.AsGet(),
4055		autorest.WithBaseURL(to.String(aaplsr.NextLink)))
4056}
4057
4058// AutoApprovedPrivateLinkServicesResultPage contains a page of AutoApprovedPrivateLinkService values.
4059type AutoApprovedPrivateLinkServicesResultPage struct {
4060	fn     func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)
4061	aaplsr AutoApprovedPrivateLinkServicesResult
4062}
4063
4064// NextWithContext advances to the next page of values.  If there was an error making
4065// the request the page does not advance and the error is returned.
4066func (page *AutoApprovedPrivateLinkServicesResultPage) NextWithContext(ctx context.Context) (err error) {
4067	if tracing.IsEnabled() {
4068		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultPage.NextWithContext")
4069		defer func() {
4070			sc := -1
4071			if page.Response().Response.Response != nil {
4072				sc = page.Response().Response.Response.StatusCode
4073			}
4074			tracing.EndSpan(ctx, sc, err)
4075		}()
4076	}
4077	for {
4078		next, err := page.fn(ctx, page.aaplsr)
4079		if err != nil {
4080			return err
4081		}
4082		page.aaplsr = next
4083		if !next.hasNextLink() || !next.IsEmpty() {
4084			break
4085		}
4086	}
4087	return nil
4088}
4089
4090// Next advances to the next page of values.  If there was an error making
4091// the request the page does not advance and the error is returned.
4092// Deprecated: Use NextWithContext() instead.
4093func (page *AutoApprovedPrivateLinkServicesResultPage) Next() error {
4094	return page.NextWithContext(context.Background())
4095}
4096
4097// NotDone returns true if the page enumeration should be started or is not yet complete.
4098func (page AutoApprovedPrivateLinkServicesResultPage) NotDone() bool {
4099	return !page.aaplsr.IsEmpty()
4100}
4101
4102// Response returns the raw server response from the last page request.
4103func (page AutoApprovedPrivateLinkServicesResultPage) Response() AutoApprovedPrivateLinkServicesResult {
4104	return page.aaplsr
4105}
4106
4107// Values returns the slice of values for the current page or nil if there are no values.
4108func (page AutoApprovedPrivateLinkServicesResultPage) Values() []AutoApprovedPrivateLinkService {
4109	if page.aaplsr.IsEmpty() {
4110		return nil
4111	}
4112	return *page.aaplsr.Value
4113}
4114
4115// Creates a new instance of the AutoApprovedPrivateLinkServicesResultPage type.
4116func NewAutoApprovedPrivateLinkServicesResultPage(cur AutoApprovedPrivateLinkServicesResult, getNextPage func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)) AutoApprovedPrivateLinkServicesResultPage {
4117	return AutoApprovedPrivateLinkServicesResultPage{
4118		fn:     getNextPage,
4119		aaplsr: cur,
4120	}
4121}
4122
4123// Availability availability of the metric.
4124type Availability struct {
4125	// TimeGrain - The time grain of the availability.
4126	TimeGrain *string `json:"timeGrain,omitempty"`
4127	// Retention - The retention of the availability.
4128	Retention *string `json:"retention,omitempty"`
4129	// BlobDuration - Duration of the availability blob.
4130	BlobDuration *string `json:"blobDuration,omitempty"`
4131}
4132
4133// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a
4134// subnet.
4135type AvailableDelegation struct {
4136	// Name - The name of the AvailableDelegation resource.
4137	Name *string `json:"name,omitempty"`
4138	// ID - A unique identifier of the AvailableDelegation resource.
4139	ID *string `json:"id,omitempty"`
4140	// Type - Resource type.
4141	Type *string `json:"type,omitempty"`
4142	// ServiceName - The name of the service and resource.
4143	ServiceName *string `json:"serviceName,omitempty"`
4144	// Actions - The actions permitted to the service upon delegation.
4145	Actions *[]string `json:"actions,omitempty"`
4146}
4147
4148// AvailableDelegationsResult an array of available delegations.
4149type AvailableDelegationsResult struct {
4150	autorest.Response `json:"-"`
4151	// Value - An array of available delegations.
4152	Value *[]AvailableDelegation `json:"value,omitempty"`
4153	// NextLink - READ-ONLY; The URL to get the next set of results.
4154	NextLink *string `json:"nextLink,omitempty"`
4155}
4156
4157// MarshalJSON is the custom marshaler for AvailableDelegationsResult.
4158func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) {
4159	objectMap := make(map[string]interface{})
4160	if adr.Value != nil {
4161		objectMap["value"] = adr.Value
4162	}
4163	return json.Marshal(objectMap)
4164}
4165
4166// AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values.
4167type AvailableDelegationsResultIterator struct {
4168	i    int
4169	page AvailableDelegationsResultPage
4170}
4171
4172// NextWithContext advances to the next value.  If there was an error making
4173// the request the iterator does not advance and the error is returned.
4174func (iter *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) {
4175	if tracing.IsEnabled() {
4176		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.NextWithContext")
4177		defer func() {
4178			sc := -1
4179			if iter.Response().Response.Response != nil {
4180				sc = iter.Response().Response.Response.StatusCode
4181			}
4182			tracing.EndSpan(ctx, sc, err)
4183		}()
4184	}
4185	iter.i++
4186	if iter.i < len(iter.page.Values()) {
4187		return nil
4188	}
4189	err = iter.page.NextWithContext(ctx)
4190	if err != nil {
4191		iter.i--
4192		return err
4193	}
4194	iter.i = 0
4195	return nil
4196}
4197
4198// Next advances to the next value.  If there was an error making
4199// the request the iterator does not advance and the error is returned.
4200// Deprecated: Use NextWithContext() instead.
4201func (iter *AvailableDelegationsResultIterator) Next() error {
4202	return iter.NextWithContext(context.Background())
4203}
4204
4205// NotDone returns true if the enumeration should be started or is not yet complete.
4206func (iter AvailableDelegationsResultIterator) NotDone() bool {
4207	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4208}
4209
4210// Response returns the raw server response from the last page request.
4211func (iter AvailableDelegationsResultIterator) Response() AvailableDelegationsResult {
4212	return iter.page.Response()
4213}
4214
4215// Value returns the current value or a zero-initialized value if the
4216// iterator has advanced beyond the end of the collection.
4217func (iter AvailableDelegationsResultIterator) Value() AvailableDelegation {
4218	if !iter.page.NotDone() {
4219		return AvailableDelegation{}
4220	}
4221	return iter.page.Values()[iter.i]
4222}
4223
4224// Creates a new instance of the AvailableDelegationsResultIterator type.
4225func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator {
4226	return AvailableDelegationsResultIterator{page: page}
4227}
4228
4229// IsEmpty returns true if the ListResult contains no values.
4230func (adr AvailableDelegationsResult) IsEmpty() bool {
4231	return adr.Value == nil || len(*adr.Value) == 0
4232}
4233
4234// hasNextLink returns true if the NextLink is not empty.
4235func (adr AvailableDelegationsResult) hasNextLink() bool {
4236	return adr.NextLink != nil && len(*adr.NextLink) != 0
4237}
4238
4239// availableDelegationsResultPreparer prepares a request to retrieve the next set of results.
4240// It returns nil if no more results exist.
4241func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) {
4242	if !adr.hasNextLink() {
4243		return nil, nil
4244	}
4245	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4246		autorest.AsJSON(),
4247		autorest.AsGet(),
4248		autorest.WithBaseURL(to.String(adr.NextLink)))
4249}
4250
4251// AvailableDelegationsResultPage contains a page of AvailableDelegation values.
4252type AvailableDelegationsResultPage struct {
4253	fn  func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)
4254	adr AvailableDelegationsResult
4255}
4256
4257// NextWithContext advances to the next page of values.  If there was an error making
4258// the request the page does not advance and the error is returned.
4259func (page *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) {
4260	if tracing.IsEnabled() {
4261		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.NextWithContext")
4262		defer func() {
4263			sc := -1
4264			if page.Response().Response.Response != nil {
4265				sc = page.Response().Response.Response.StatusCode
4266			}
4267			tracing.EndSpan(ctx, sc, err)
4268		}()
4269	}
4270	for {
4271		next, err := page.fn(ctx, page.adr)
4272		if err != nil {
4273			return err
4274		}
4275		page.adr = next
4276		if !next.hasNextLink() || !next.IsEmpty() {
4277			break
4278		}
4279	}
4280	return nil
4281}
4282
4283// Next advances to the next page of values.  If there was an error making
4284// the request the page does not advance and the error is returned.
4285// Deprecated: Use NextWithContext() instead.
4286func (page *AvailableDelegationsResultPage) Next() error {
4287	return page.NextWithContext(context.Background())
4288}
4289
4290// NotDone returns true if the page enumeration should be started or is not yet complete.
4291func (page AvailableDelegationsResultPage) NotDone() bool {
4292	return !page.adr.IsEmpty()
4293}
4294
4295// Response returns the raw server response from the last page request.
4296func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult {
4297	return page.adr
4298}
4299
4300// Values returns the slice of values for the current page or nil if there are no values.
4301func (page AvailableDelegationsResultPage) Values() []AvailableDelegation {
4302	if page.adr.IsEmpty() {
4303		return nil
4304	}
4305	return *page.adr.Value
4306}
4307
4308// Creates a new instance of the AvailableDelegationsResultPage type.
4309func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage {
4310	return AvailableDelegationsResultPage{
4311		fn:  getNextPage,
4312		adr: cur,
4313	}
4314}
4315
4316// AvailablePrivateEndpointType the information of an AvailablePrivateEndpointType.
4317type AvailablePrivateEndpointType struct {
4318	// Name - The name of the service and resource.
4319	Name *string `json:"name,omitempty"`
4320	// ID - A unique identifier of the AvailablePrivateEndpoint Type resource.
4321	ID *string `json:"id,omitempty"`
4322	// Type - Resource type.
4323	Type *string `json:"type,omitempty"`
4324	// ResourceName - The name of the service and resource.
4325	ResourceName *string `json:"resourceName,omitempty"`
4326}
4327
4328// AvailablePrivateEndpointTypesResult an array of available PrivateEndpoint types.
4329type AvailablePrivateEndpointTypesResult struct {
4330	autorest.Response `json:"-"`
4331	// Value - An array of available privateEndpoint type.
4332	Value *[]AvailablePrivateEndpointType `json:"value,omitempty"`
4333	// NextLink - READ-ONLY; The URL to get the next set of results.
4334	NextLink *string `json:"nextLink,omitempty"`
4335}
4336
4337// MarshalJSON is the custom marshaler for AvailablePrivateEndpointTypesResult.
4338func (apetr AvailablePrivateEndpointTypesResult) MarshalJSON() ([]byte, error) {
4339	objectMap := make(map[string]interface{})
4340	if apetr.Value != nil {
4341		objectMap["value"] = apetr.Value
4342	}
4343	return json.Marshal(objectMap)
4344}
4345
4346// AvailablePrivateEndpointTypesResultIterator provides access to a complete listing of
4347// AvailablePrivateEndpointType values.
4348type AvailablePrivateEndpointTypesResultIterator struct {
4349	i    int
4350	page AvailablePrivateEndpointTypesResultPage
4351}
4352
4353// NextWithContext advances to the next value.  If there was an error making
4354// the request the iterator does not advance and the error is returned.
4355func (iter *AvailablePrivateEndpointTypesResultIterator) NextWithContext(ctx context.Context) (err error) {
4356	if tracing.IsEnabled() {
4357		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultIterator.NextWithContext")
4358		defer func() {
4359			sc := -1
4360			if iter.Response().Response.Response != nil {
4361				sc = iter.Response().Response.Response.StatusCode
4362			}
4363			tracing.EndSpan(ctx, sc, err)
4364		}()
4365	}
4366	iter.i++
4367	if iter.i < len(iter.page.Values()) {
4368		return nil
4369	}
4370	err = iter.page.NextWithContext(ctx)
4371	if err != nil {
4372		iter.i--
4373		return err
4374	}
4375	iter.i = 0
4376	return nil
4377}
4378
4379// Next advances to the next value.  If there was an error making
4380// the request the iterator does not advance and the error is returned.
4381// Deprecated: Use NextWithContext() instead.
4382func (iter *AvailablePrivateEndpointTypesResultIterator) Next() error {
4383	return iter.NextWithContext(context.Background())
4384}
4385
4386// NotDone returns true if the enumeration should be started or is not yet complete.
4387func (iter AvailablePrivateEndpointTypesResultIterator) NotDone() bool {
4388	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4389}
4390
4391// Response returns the raw server response from the last page request.
4392func (iter AvailablePrivateEndpointTypesResultIterator) Response() AvailablePrivateEndpointTypesResult {
4393	return iter.page.Response()
4394}
4395
4396// Value returns the current value or a zero-initialized value if the
4397// iterator has advanced beyond the end of the collection.
4398func (iter AvailablePrivateEndpointTypesResultIterator) Value() AvailablePrivateEndpointType {
4399	if !iter.page.NotDone() {
4400		return AvailablePrivateEndpointType{}
4401	}
4402	return iter.page.Values()[iter.i]
4403}
4404
4405// Creates a new instance of the AvailablePrivateEndpointTypesResultIterator type.
4406func NewAvailablePrivateEndpointTypesResultIterator(page AvailablePrivateEndpointTypesResultPage) AvailablePrivateEndpointTypesResultIterator {
4407	return AvailablePrivateEndpointTypesResultIterator{page: page}
4408}
4409
4410// IsEmpty returns true if the ListResult contains no values.
4411func (apetr AvailablePrivateEndpointTypesResult) IsEmpty() bool {
4412	return apetr.Value == nil || len(*apetr.Value) == 0
4413}
4414
4415// hasNextLink returns true if the NextLink is not empty.
4416func (apetr AvailablePrivateEndpointTypesResult) hasNextLink() bool {
4417	return apetr.NextLink != nil && len(*apetr.NextLink) != 0
4418}
4419
4420// availablePrivateEndpointTypesResultPreparer prepares a request to retrieve the next set of results.
4421// It returns nil if no more results exist.
4422func (apetr AvailablePrivateEndpointTypesResult) availablePrivateEndpointTypesResultPreparer(ctx context.Context) (*http.Request, error) {
4423	if !apetr.hasNextLink() {
4424		return nil, nil
4425	}
4426	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4427		autorest.AsJSON(),
4428		autorest.AsGet(),
4429		autorest.WithBaseURL(to.String(apetr.NextLink)))
4430}
4431
4432// AvailablePrivateEndpointTypesResultPage contains a page of AvailablePrivateEndpointType values.
4433type AvailablePrivateEndpointTypesResultPage struct {
4434	fn    func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)
4435	apetr AvailablePrivateEndpointTypesResult
4436}
4437
4438// NextWithContext advances to the next page of values.  If there was an error making
4439// the request the page does not advance and the error is returned.
4440func (page *AvailablePrivateEndpointTypesResultPage) NextWithContext(ctx context.Context) (err error) {
4441	if tracing.IsEnabled() {
4442		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultPage.NextWithContext")
4443		defer func() {
4444			sc := -1
4445			if page.Response().Response.Response != nil {
4446				sc = page.Response().Response.Response.StatusCode
4447			}
4448			tracing.EndSpan(ctx, sc, err)
4449		}()
4450	}
4451	for {
4452		next, err := page.fn(ctx, page.apetr)
4453		if err != nil {
4454			return err
4455		}
4456		page.apetr = next
4457		if !next.hasNextLink() || !next.IsEmpty() {
4458			break
4459		}
4460	}
4461	return nil
4462}
4463
4464// Next advances to the next page of values.  If there was an error making
4465// the request the page does not advance and the error is returned.
4466// Deprecated: Use NextWithContext() instead.
4467func (page *AvailablePrivateEndpointTypesResultPage) Next() error {
4468	return page.NextWithContext(context.Background())
4469}
4470
4471// NotDone returns true if the page enumeration should be started or is not yet complete.
4472func (page AvailablePrivateEndpointTypesResultPage) NotDone() bool {
4473	return !page.apetr.IsEmpty()
4474}
4475
4476// Response returns the raw server response from the last page request.
4477func (page AvailablePrivateEndpointTypesResultPage) Response() AvailablePrivateEndpointTypesResult {
4478	return page.apetr
4479}
4480
4481// Values returns the slice of values for the current page or nil if there are no values.
4482func (page AvailablePrivateEndpointTypesResultPage) Values() []AvailablePrivateEndpointType {
4483	if page.apetr.IsEmpty() {
4484		return nil
4485	}
4486	return *page.apetr.Value
4487}
4488
4489// Creates a new instance of the AvailablePrivateEndpointTypesResultPage type.
4490func NewAvailablePrivateEndpointTypesResultPage(cur AvailablePrivateEndpointTypesResult, getNextPage func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)) AvailablePrivateEndpointTypesResultPage {
4491	return AvailablePrivateEndpointTypesResultPage{
4492		fn:    getNextPage,
4493		apetr: cur,
4494	}
4495}
4496
4497// AvailableProvidersList list of available countries with details.
4498type AvailableProvidersList struct {
4499	autorest.Response `json:"-"`
4500	// Countries - List of available countries.
4501	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
4502}
4503
4504// AvailableProvidersListCity city or town details.
4505type AvailableProvidersListCity struct {
4506	// CityName - The city or town name.
4507	CityName *string `json:"cityName,omitempty"`
4508	// Providers - A list of Internet service providers.
4509	Providers *[]string `json:"providers,omitempty"`
4510}
4511
4512// AvailableProvidersListCountry country details.
4513type AvailableProvidersListCountry struct {
4514	// CountryName - The country name.
4515	CountryName *string `json:"countryName,omitempty"`
4516	// Providers - A list of Internet service providers.
4517	Providers *[]string `json:"providers,omitempty"`
4518	// States - List of available states in the country.
4519	States *[]AvailableProvidersListState `json:"states,omitempty"`
4520}
4521
4522// AvailableProvidersListParameters constraints that determine the list of available Internet service
4523// providers.
4524type AvailableProvidersListParameters struct {
4525	// AzureLocations - A list of Azure regions.
4526	AzureLocations *[]string `json:"azureLocations,omitempty"`
4527	// Country - The country for available providers list.
4528	Country *string `json:"country,omitempty"`
4529	// State - The state for available providers list.
4530	State *string `json:"state,omitempty"`
4531	// City - The city or town for available providers list.
4532	City *string `json:"city,omitempty"`
4533}
4534
4535// AvailableProvidersListState state details.
4536type AvailableProvidersListState struct {
4537	// StateName - The state name.
4538	StateName *string `json:"stateName,omitempty"`
4539	// Providers - A list of Internet service providers.
4540	Providers *[]string `json:"providers,omitempty"`
4541	// Cities - List of available cities or towns in the state.
4542	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
4543}
4544
4545// AvailableServiceAlias the available service alias.
4546type AvailableServiceAlias struct {
4547	// Name - The name of the service alias.
4548	Name *string `json:"name,omitempty"`
4549	// ID - The ID of the service alias.
4550	ID *string `json:"id,omitempty"`
4551	// Type - The type of the resource.
4552	Type *string `json:"type,omitempty"`
4553	// ResourceName - The resource name of the service alias.
4554	ResourceName *string `json:"resourceName,omitempty"`
4555}
4556
4557// AvailableServiceAliasesResult an array of available service aliases.
4558type AvailableServiceAliasesResult struct {
4559	autorest.Response `json:"-"`
4560	// Value - An array of available service aliases.
4561	Value *[]AvailableServiceAlias `json:"value,omitempty"`
4562	// NextLink - READ-ONLY; The URL to get the next set of results.
4563	NextLink *string `json:"nextLink,omitempty"`
4564}
4565
4566// MarshalJSON is the custom marshaler for AvailableServiceAliasesResult.
4567func (asar AvailableServiceAliasesResult) MarshalJSON() ([]byte, error) {
4568	objectMap := make(map[string]interface{})
4569	if asar.Value != nil {
4570		objectMap["value"] = asar.Value
4571	}
4572	return json.Marshal(objectMap)
4573}
4574
4575// AvailableServiceAliasesResultIterator provides access to a complete listing of AvailableServiceAlias
4576// values.
4577type AvailableServiceAliasesResultIterator struct {
4578	i    int
4579	page AvailableServiceAliasesResultPage
4580}
4581
4582// NextWithContext advances to the next value.  If there was an error making
4583// the request the iterator does not advance and the error is returned.
4584func (iter *AvailableServiceAliasesResultIterator) NextWithContext(ctx context.Context) (err error) {
4585	if tracing.IsEnabled() {
4586		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesResultIterator.NextWithContext")
4587		defer func() {
4588			sc := -1
4589			if iter.Response().Response.Response != nil {
4590				sc = iter.Response().Response.Response.StatusCode
4591			}
4592			tracing.EndSpan(ctx, sc, err)
4593		}()
4594	}
4595	iter.i++
4596	if iter.i < len(iter.page.Values()) {
4597		return nil
4598	}
4599	err = iter.page.NextWithContext(ctx)
4600	if err != nil {
4601		iter.i--
4602		return err
4603	}
4604	iter.i = 0
4605	return nil
4606}
4607
4608// Next advances to the next value.  If there was an error making
4609// the request the iterator does not advance and the error is returned.
4610// Deprecated: Use NextWithContext() instead.
4611func (iter *AvailableServiceAliasesResultIterator) Next() error {
4612	return iter.NextWithContext(context.Background())
4613}
4614
4615// NotDone returns true if the enumeration should be started or is not yet complete.
4616func (iter AvailableServiceAliasesResultIterator) NotDone() bool {
4617	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4618}
4619
4620// Response returns the raw server response from the last page request.
4621func (iter AvailableServiceAliasesResultIterator) Response() AvailableServiceAliasesResult {
4622	return iter.page.Response()
4623}
4624
4625// Value returns the current value or a zero-initialized value if the
4626// iterator has advanced beyond the end of the collection.
4627func (iter AvailableServiceAliasesResultIterator) Value() AvailableServiceAlias {
4628	if !iter.page.NotDone() {
4629		return AvailableServiceAlias{}
4630	}
4631	return iter.page.Values()[iter.i]
4632}
4633
4634// Creates a new instance of the AvailableServiceAliasesResultIterator type.
4635func NewAvailableServiceAliasesResultIterator(page AvailableServiceAliasesResultPage) AvailableServiceAliasesResultIterator {
4636	return AvailableServiceAliasesResultIterator{page: page}
4637}
4638
4639// IsEmpty returns true if the ListResult contains no values.
4640func (asar AvailableServiceAliasesResult) IsEmpty() bool {
4641	return asar.Value == nil || len(*asar.Value) == 0
4642}
4643
4644// hasNextLink returns true if the NextLink is not empty.
4645func (asar AvailableServiceAliasesResult) hasNextLink() bool {
4646	return asar.NextLink != nil && len(*asar.NextLink) != 0
4647}
4648
4649// availableServiceAliasesResultPreparer prepares a request to retrieve the next set of results.
4650// It returns nil if no more results exist.
4651func (asar AvailableServiceAliasesResult) availableServiceAliasesResultPreparer(ctx context.Context) (*http.Request, error) {
4652	if !asar.hasNextLink() {
4653		return nil, nil
4654	}
4655	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4656		autorest.AsJSON(),
4657		autorest.AsGet(),
4658		autorest.WithBaseURL(to.String(asar.NextLink)))
4659}
4660
4661// AvailableServiceAliasesResultPage contains a page of AvailableServiceAlias values.
4662type AvailableServiceAliasesResultPage struct {
4663	fn   func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error)
4664	asar AvailableServiceAliasesResult
4665}
4666
4667// NextWithContext advances to the next page of values.  If there was an error making
4668// the request the page does not advance and the error is returned.
4669func (page *AvailableServiceAliasesResultPage) NextWithContext(ctx context.Context) (err error) {
4670	if tracing.IsEnabled() {
4671		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesResultPage.NextWithContext")
4672		defer func() {
4673			sc := -1
4674			if page.Response().Response.Response != nil {
4675				sc = page.Response().Response.Response.StatusCode
4676			}
4677			tracing.EndSpan(ctx, sc, err)
4678		}()
4679	}
4680	for {
4681		next, err := page.fn(ctx, page.asar)
4682		if err != nil {
4683			return err
4684		}
4685		page.asar = next
4686		if !next.hasNextLink() || !next.IsEmpty() {
4687			break
4688		}
4689	}
4690	return nil
4691}
4692
4693// Next advances to the next page of values.  If there was an error making
4694// the request the page does not advance and the error is returned.
4695// Deprecated: Use NextWithContext() instead.
4696func (page *AvailableServiceAliasesResultPage) Next() error {
4697	return page.NextWithContext(context.Background())
4698}
4699
4700// NotDone returns true if the page enumeration should be started or is not yet complete.
4701func (page AvailableServiceAliasesResultPage) NotDone() bool {
4702	return !page.asar.IsEmpty()
4703}
4704
4705// Response returns the raw server response from the last page request.
4706func (page AvailableServiceAliasesResultPage) Response() AvailableServiceAliasesResult {
4707	return page.asar
4708}
4709
4710// Values returns the slice of values for the current page or nil if there are no values.
4711func (page AvailableServiceAliasesResultPage) Values() []AvailableServiceAlias {
4712	if page.asar.IsEmpty() {
4713		return nil
4714	}
4715	return *page.asar.Value
4716}
4717
4718// Creates a new instance of the AvailableServiceAliasesResultPage type.
4719func NewAvailableServiceAliasesResultPage(cur AvailableServiceAliasesResult, getNextPage func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error)) AvailableServiceAliasesResultPage {
4720	return AvailableServiceAliasesResultPage{
4721		fn:   getNextPage,
4722		asar: cur,
4723	}
4724}
4725
4726// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
4727// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
4728// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
4729// operation succeeded, the response body includes the HTTP status code for the successful request. If the
4730// asynchronous operation failed, the response body includes the HTTP status code for the failed request
4731// and error information regarding the failure.
4732type AzureAsyncOperationResult struct {
4733	// Status - Status of the Azure async operation. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
4734	Status OperationStatus `json:"status,omitempty"`
4735	// Error - Details of the error occurred during specified asynchronous operation.
4736	Error *Error `json:"error,omitempty"`
4737}
4738
4739// AzureFirewall azure Firewall resource.
4740type AzureFirewall struct {
4741	autorest.Response `json:"-"`
4742	// AzureFirewallPropertiesFormat - Properties of the azure firewall.
4743	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
4744	// Zones - A list of availability zones denoting where the resource needs to come from.
4745	Zones *[]string `json:"zones,omitempty"`
4746	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4747	Etag *string `json:"etag,omitempty"`
4748	// ID - Resource ID.
4749	ID *string `json:"id,omitempty"`
4750	// Name - READ-ONLY; Resource name.
4751	Name *string `json:"name,omitempty"`
4752	// Type - READ-ONLY; Resource type.
4753	Type *string `json:"type,omitempty"`
4754	// Location - Resource location.
4755	Location *string `json:"location,omitempty"`
4756	// Tags - Resource tags.
4757	Tags map[string]*string `json:"tags"`
4758}
4759
4760// MarshalJSON is the custom marshaler for AzureFirewall.
4761func (af AzureFirewall) MarshalJSON() ([]byte, error) {
4762	objectMap := make(map[string]interface{})
4763	if af.AzureFirewallPropertiesFormat != nil {
4764		objectMap["properties"] = af.AzureFirewallPropertiesFormat
4765	}
4766	if af.Zones != nil {
4767		objectMap["zones"] = af.Zones
4768	}
4769	if af.ID != nil {
4770		objectMap["id"] = af.ID
4771	}
4772	if af.Location != nil {
4773		objectMap["location"] = af.Location
4774	}
4775	if af.Tags != nil {
4776		objectMap["tags"] = af.Tags
4777	}
4778	return json.Marshal(objectMap)
4779}
4780
4781// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
4782func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
4783	var m map[string]*json.RawMessage
4784	err := json.Unmarshal(body, &m)
4785	if err != nil {
4786		return err
4787	}
4788	for k, v := range m {
4789		switch k {
4790		case "properties":
4791			if v != nil {
4792				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
4793				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
4794				if err != nil {
4795					return err
4796				}
4797				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
4798			}
4799		case "zones":
4800			if v != nil {
4801				var zones []string
4802				err = json.Unmarshal(*v, &zones)
4803				if err != nil {
4804					return err
4805				}
4806				af.Zones = &zones
4807			}
4808		case "etag":
4809			if v != nil {
4810				var etag string
4811				err = json.Unmarshal(*v, &etag)
4812				if err != nil {
4813					return err
4814				}
4815				af.Etag = &etag
4816			}
4817		case "id":
4818			if v != nil {
4819				var ID string
4820				err = json.Unmarshal(*v, &ID)
4821				if err != nil {
4822					return err
4823				}
4824				af.ID = &ID
4825			}
4826		case "name":
4827			if v != nil {
4828				var name string
4829				err = json.Unmarshal(*v, &name)
4830				if err != nil {
4831					return err
4832				}
4833				af.Name = &name
4834			}
4835		case "type":
4836			if v != nil {
4837				var typeVar string
4838				err = json.Unmarshal(*v, &typeVar)
4839				if err != nil {
4840					return err
4841				}
4842				af.Type = &typeVar
4843			}
4844		case "location":
4845			if v != nil {
4846				var location string
4847				err = json.Unmarshal(*v, &location)
4848				if err != nil {
4849					return err
4850				}
4851				af.Location = &location
4852			}
4853		case "tags":
4854			if v != nil {
4855				var tags map[string]*string
4856				err = json.Unmarshal(*v, &tags)
4857				if err != nil {
4858					return err
4859				}
4860				af.Tags = tags
4861			}
4862		}
4863	}
4864
4865	return nil
4866}
4867
4868// AzureFirewallApplicationRule properties of an application rule.
4869type AzureFirewallApplicationRule struct {
4870	// Name - Name of the application rule.
4871	Name *string `json:"name,omitempty"`
4872	// Description - Description of the rule.
4873	Description *string `json:"description,omitempty"`
4874	// SourceAddresses - List of source IP addresses for this rule.
4875	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4876	// Protocols - Array of ApplicationRuleProtocols.
4877	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
4878	// TargetFqdns - List of FQDNs for this rule.
4879	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
4880	// FqdnTags - List of FQDN Tags for this rule.
4881	FqdnTags *[]string `json:"fqdnTags,omitempty"`
4882	// SourceIPGroups - List of source IpGroups for this rule.
4883	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
4884}
4885
4886// AzureFirewallApplicationRuleCollection application rule collection resource.
4887type AzureFirewallApplicationRuleCollection struct {
4888	// AzureFirewallApplicationRuleCollectionPropertiesFormat - Properties of the azure firewall application rule collection.
4889	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
4890	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
4891	Name *string `json:"name,omitempty"`
4892	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4893	Etag *string `json:"etag,omitempty"`
4894	// ID - Resource ID.
4895	ID *string `json:"id,omitempty"`
4896}
4897
4898// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
4899func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
4900	objectMap := make(map[string]interface{})
4901	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
4902		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
4903	}
4904	if afarc.Name != nil {
4905		objectMap["name"] = afarc.Name
4906	}
4907	if afarc.ID != nil {
4908		objectMap["id"] = afarc.ID
4909	}
4910	return json.Marshal(objectMap)
4911}
4912
4913// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
4914func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
4915	var m map[string]*json.RawMessage
4916	err := json.Unmarshal(body, &m)
4917	if err != nil {
4918		return err
4919	}
4920	for k, v := range m {
4921		switch k {
4922		case "properties":
4923			if v != nil {
4924				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
4925				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
4926				if err != nil {
4927					return err
4928				}
4929				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
4930			}
4931		case "name":
4932			if v != nil {
4933				var name string
4934				err = json.Unmarshal(*v, &name)
4935				if err != nil {
4936					return err
4937				}
4938				afarc.Name = &name
4939			}
4940		case "etag":
4941			if v != nil {
4942				var etag string
4943				err = json.Unmarshal(*v, &etag)
4944				if err != nil {
4945					return err
4946				}
4947				afarc.Etag = &etag
4948			}
4949		case "id":
4950			if v != nil {
4951				var ID string
4952				err = json.Unmarshal(*v, &ID)
4953				if err != nil {
4954					return err
4955				}
4956				afarc.ID = &ID
4957			}
4958		}
4959	}
4960
4961	return nil
4962}
4963
4964// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
4965type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
4966	// Priority - Priority of the application rule collection resource.
4967	Priority *int32 `json:"priority,omitempty"`
4968	// Action - The action type of a rule collection.
4969	Action *AzureFirewallRCAction `json:"action,omitempty"`
4970	// Rules - Collection of rules used by a application rule collection.
4971	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
4972	// ProvisioningState - READ-ONLY; The provisioning state of the application rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4973	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4974}
4975
4976// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollectionPropertiesFormat.
4977func (afarcpf AzureFirewallApplicationRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) {
4978	objectMap := make(map[string]interface{})
4979	if afarcpf.Priority != nil {
4980		objectMap["priority"] = afarcpf.Priority
4981	}
4982	if afarcpf.Action != nil {
4983		objectMap["action"] = afarcpf.Action
4984	}
4985	if afarcpf.Rules != nil {
4986		objectMap["rules"] = afarcpf.Rules
4987	}
4988	return json.Marshal(objectMap)
4989}
4990
4991// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
4992type AzureFirewallApplicationRuleProtocol struct {
4993	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS', 'AzureFirewallApplicationRuleProtocolTypeMssql'
4994	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
4995	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
4996	Port *int32 `json:"port,omitempty"`
4997}
4998
4999// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource.
5000type AzureFirewallFqdnTag struct {
5001	// AzureFirewallFqdnTagPropertiesFormat - Properties of the azure firewall FQDN tag.
5002	*AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"`
5003	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5004	Etag *string `json:"etag,omitempty"`
5005	// ID - Resource ID.
5006	ID *string `json:"id,omitempty"`
5007	// Name - READ-ONLY; Resource name.
5008	Name *string `json:"name,omitempty"`
5009	// Type - READ-ONLY; Resource type.
5010	Type *string `json:"type,omitempty"`
5011	// Location - Resource location.
5012	Location *string `json:"location,omitempty"`
5013	// Tags - Resource tags.
5014	Tags map[string]*string `json:"tags"`
5015}
5016
5017// MarshalJSON is the custom marshaler for AzureFirewallFqdnTag.
5018func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) {
5019	objectMap := make(map[string]interface{})
5020	if afft.AzureFirewallFqdnTagPropertiesFormat != nil {
5021		objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat
5022	}
5023	if afft.ID != nil {
5024		objectMap["id"] = afft.ID
5025	}
5026	if afft.Location != nil {
5027		objectMap["location"] = afft.Location
5028	}
5029	if afft.Tags != nil {
5030		objectMap["tags"] = afft.Tags
5031	}
5032	return json.Marshal(objectMap)
5033}
5034
5035// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct.
5036func (afft *AzureFirewallFqdnTag) UnmarshalJSON(body []byte) error {
5037	var m map[string]*json.RawMessage
5038	err := json.Unmarshal(body, &m)
5039	if err != nil {
5040		return err
5041	}
5042	for k, v := range m {
5043		switch k {
5044		case "properties":
5045			if v != nil {
5046				var azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat
5047				err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat)
5048				if err != nil {
5049					return err
5050				}
5051				afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat
5052			}
5053		case "etag":
5054			if v != nil {
5055				var etag string
5056				err = json.Unmarshal(*v, &etag)
5057				if err != nil {
5058					return err
5059				}
5060				afft.Etag = &etag
5061			}
5062		case "id":
5063			if v != nil {
5064				var ID string
5065				err = json.Unmarshal(*v, &ID)
5066				if err != nil {
5067					return err
5068				}
5069				afft.ID = &ID
5070			}
5071		case "name":
5072			if v != nil {
5073				var name string
5074				err = json.Unmarshal(*v, &name)
5075				if err != nil {
5076					return err
5077				}
5078				afft.Name = &name
5079			}
5080		case "type":
5081			if v != nil {
5082				var typeVar string
5083				err = json.Unmarshal(*v, &typeVar)
5084				if err != nil {
5085					return err
5086				}
5087				afft.Type = &typeVar
5088			}
5089		case "location":
5090			if v != nil {
5091				var location string
5092				err = json.Unmarshal(*v, &location)
5093				if err != nil {
5094					return err
5095				}
5096				afft.Location = &location
5097			}
5098		case "tags":
5099			if v != nil {
5100				var tags map[string]*string
5101				err = json.Unmarshal(*v, &tags)
5102				if err != nil {
5103					return err
5104				}
5105				afft.Tags = tags
5106			}
5107		}
5108	}
5109
5110	return nil
5111}
5112
5113// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call.
5114type AzureFirewallFqdnTagListResult struct {
5115	autorest.Response `json:"-"`
5116	// Value - List of Azure Firewall FQDN Tags in a resource group.
5117	Value *[]AzureFirewallFqdnTag `json:"value,omitempty"`
5118	// NextLink - URL to get the next set of results.
5119	NextLink *string `json:"nextLink,omitempty"`
5120}
5121
5122// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag
5123// values.
5124type AzureFirewallFqdnTagListResultIterator struct {
5125	i    int
5126	page AzureFirewallFqdnTagListResultPage
5127}
5128
5129// NextWithContext advances to the next value.  If there was an error making
5130// the request the iterator does not advance and the error is returned.
5131func (iter *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) {
5132	if tracing.IsEnabled() {
5133		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.NextWithContext")
5134		defer func() {
5135			sc := -1
5136			if iter.Response().Response.Response != nil {
5137				sc = iter.Response().Response.Response.StatusCode
5138			}
5139			tracing.EndSpan(ctx, sc, err)
5140		}()
5141	}
5142	iter.i++
5143	if iter.i < len(iter.page.Values()) {
5144		return nil
5145	}
5146	err = iter.page.NextWithContext(ctx)
5147	if err != nil {
5148		iter.i--
5149		return err
5150	}
5151	iter.i = 0
5152	return nil
5153}
5154
5155// Next advances to the next value.  If there was an error making
5156// the request the iterator does not advance and the error is returned.
5157// Deprecated: Use NextWithContext() instead.
5158func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
5159	return iter.NextWithContext(context.Background())
5160}
5161
5162// NotDone returns true if the enumeration should be started or is not yet complete.
5163func (iter AzureFirewallFqdnTagListResultIterator) NotDone() bool {
5164	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5165}
5166
5167// Response returns the raw server response from the last page request.
5168func (iter AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult {
5169	return iter.page.Response()
5170}
5171
5172// Value returns the current value or a zero-initialized value if the
5173// iterator has advanced beyond the end of the collection.
5174func (iter AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag {
5175	if !iter.page.NotDone() {
5176		return AzureFirewallFqdnTag{}
5177	}
5178	return iter.page.Values()[iter.i]
5179}
5180
5181// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type.
5182func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator {
5183	return AzureFirewallFqdnTagListResultIterator{page: page}
5184}
5185
5186// IsEmpty returns true if the ListResult contains no values.
5187func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
5188	return afftlr.Value == nil || len(*afftlr.Value) == 0
5189}
5190
5191// hasNextLink returns true if the NextLink is not empty.
5192func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool {
5193	return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0
5194}
5195
5196// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results.
5197// It returns nil if no more results exist.
5198func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) {
5199	if !afftlr.hasNextLink() {
5200		return nil, nil
5201	}
5202	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5203		autorest.AsJSON(),
5204		autorest.AsGet(),
5205		autorest.WithBaseURL(to.String(afftlr.NextLink)))
5206}
5207
5208// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values.
5209type AzureFirewallFqdnTagListResultPage struct {
5210	fn     func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
5211	afftlr AzureFirewallFqdnTagListResult
5212}
5213
5214// NextWithContext advances to the next page of values.  If there was an error making
5215// the request the page does not advance and the error is returned.
5216func (page *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) {
5217	if tracing.IsEnabled() {
5218		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.NextWithContext")
5219		defer func() {
5220			sc := -1
5221			if page.Response().Response.Response != nil {
5222				sc = page.Response().Response.Response.StatusCode
5223			}
5224			tracing.EndSpan(ctx, sc, err)
5225		}()
5226	}
5227	for {
5228		next, err := page.fn(ctx, page.afftlr)
5229		if err != nil {
5230			return err
5231		}
5232		page.afftlr = next
5233		if !next.hasNextLink() || !next.IsEmpty() {
5234			break
5235		}
5236	}
5237	return nil
5238}
5239
5240// Next advances to the next page of values.  If there was an error making
5241// the request the page does not advance and the error is returned.
5242// Deprecated: Use NextWithContext() instead.
5243func (page *AzureFirewallFqdnTagListResultPage) Next() error {
5244	return page.NextWithContext(context.Background())
5245}
5246
5247// NotDone returns true if the page enumeration should be started or is not yet complete.
5248func (page AzureFirewallFqdnTagListResultPage) NotDone() bool {
5249	return !page.afftlr.IsEmpty()
5250}
5251
5252// Response returns the raw server response from the last page request.
5253func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult {
5254	return page.afftlr
5255}
5256
5257// Values returns the slice of values for the current page or nil if there are no values.
5258func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag {
5259	if page.afftlr.IsEmpty() {
5260		return nil
5261	}
5262	return *page.afftlr.Value
5263}
5264
5265// Creates a new instance of the AzureFirewallFqdnTagListResultPage type.
5266func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage {
5267	return AzureFirewallFqdnTagListResultPage{
5268		fn:     getNextPage,
5269		afftlr: cur,
5270	}
5271}
5272
5273// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties.
5274type AzureFirewallFqdnTagPropertiesFormat struct {
5275	// ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall FQDN tag resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5276	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5277	// FqdnTagName - READ-ONLY; The name of this FQDN Tag.
5278	FqdnTagName *string `json:"fqdnTagName,omitempty"`
5279}
5280
5281// MarshalJSON is the custom marshaler for AzureFirewallFqdnTagPropertiesFormat.
5282func (afftpf AzureFirewallFqdnTagPropertiesFormat) MarshalJSON() ([]byte, error) {
5283	objectMap := make(map[string]interface{})
5284	return json.Marshal(objectMap)
5285}
5286
5287// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
5288type AzureFirewallIPConfiguration struct {
5289	// AzureFirewallIPConfigurationPropertiesFormat - Properties of the azure firewall IP configuration.
5290	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
5291	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
5292	Name *string `json:"name,omitempty"`
5293	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5294	Etag *string `json:"etag,omitempty"`
5295	// Type - READ-ONLY; Type of the resource.
5296	Type *string `json:"type,omitempty"`
5297	// ID - Resource ID.
5298	ID *string `json:"id,omitempty"`
5299}
5300
5301// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
5302func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
5303	objectMap := make(map[string]interface{})
5304	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
5305		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
5306	}
5307	if afic.Name != nil {
5308		objectMap["name"] = afic.Name
5309	}
5310	if afic.ID != nil {
5311		objectMap["id"] = afic.ID
5312	}
5313	return json.Marshal(objectMap)
5314}
5315
5316// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
5317func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
5318	var m map[string]*json.RawMessage
5319	err := json.Unmarshal(body, &m)
5320	if err != nil {
5321		return err
5322	}
5323	for k, v := range m {
5324		switch k {
5325		case "properties":
5326			if v != nil {
5327				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
5328				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
5329				if err != nil {
5330					return err
5331				}
5332				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
5333			}
5334		case "name":
5335			if v != nil {
5336				var name string
5337				err = json.Unmarshal(*v, &name)
5338				if err != nil {
5339					return err
5340				}
5341				afic.Name = &name
5342			}
5343		case "etag":
5344			if v != nil {
5345				var etag string
5346				err = json.Unmarshal(*v, &etag)
5347				if err != nil {
5348					return err
5349				}
5350				afic.Etag = &etag
5351			}
5352		case "type":
5353			if v != nil {
5354				var typeVar string
5355				err = json.Unmarshal(*v, &typeVar)
5356				if err != nil {
5357					return err
5358				}
5359				afic.Type = &typeVar
5360			}
5361		case "id":
5362			if v != nil {
5363				var ID string
5364				err = json.Unmarshal(*v, &ID)
5365				if err != nil {
5366					return err
5367				}
5368				afic.ID = &ID
5369			}
5370		}
5371	}
5372
5373	return nil
5374}
5375
5376// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
5377type AzureFirewallIPConfigurationPropertiesFormat struct {
5378	// PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
5379	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
5380	// Subnet - Reference to the subnet resource. This resource must be named 'AzureFirewallSubnet' or 'AzureFirewallManagementSubnet'.
5381	Subnet *SubResource `json:"subnet,omitempty"`
5382	// PublicIPAddress - Reference to the PublicIP resource. This field is a mandatory input if subnet is not null.
5383	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
5384	// ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5385	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5386}
5387
5388// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat.
5389func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
5390	objectMap := make(map[string]interface{})
5391	if aficpf.Subnet != nil {
5392		objectMap["subnet"] = aficpf.Subnet
5393	}
5394	if aficpf.PublicIPAddress != nil {
5395		objectMap["publicIPAddress"] = aficpf.PublicIPAddress
5396	}
5397	return json.Marshal(objectMap)
5398}
5399
5400// AzureFirewallIPGroups ipGroups associated with azure firewall.
5401type AzureFirewallIPGroups struct {
5402	// ID - READ-ONLY; Resource ID.
5403	ID *string `json:"id,omitempty"`
5404	// ChangeNumber - READ-ONLY; The iteration number.
5405	ChangeNumber *string `json:"changeNumber,omitempty"`
5406}
5407
5408// MarshalJSON is the custom marshaler for AzureFirewallIPGroups.
5409func (afig AzureFirewallIPGroups) MarshalJSON() ([]byte, error) {
5410	objectMap := make(map[string]interface{})
5411	return json.Marshal(objectMap)
5412}
5413
5414// AzureFirewallListResult response for ListAzureFirewalls API service call.
5415type AzureFirewallListResult struct {
5416	autorest.Response `json:"-"`
5417	// Value - List of Azure Firewalls in a resource group.
5418	Value *[]AzureFirewall `json:"value,omitempty"`
5419	// NextLink - URL to get the next set of results.
5420	NextLink *string `json:"nextLink,omitempty"`
5421}
5422
5423// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
5424type AzureFirewallListResultIterator struct {
5425	i    int
5426	page AzureFirewallListResultPage
5427}
5428
5429// NextWithContext advances to the next value.  If there was an error making
5430// the request the iterator does not advance and the error is returned.
5431func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
5432	if tracing.IsEnabled() {
5433		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
5434		defer func() {
5435			sc := -1
5436			if iter.Response().Response.Response != nil {
5437				sc = iter.Response().Response.Response.StatusCode
5438			}
5439			tracing.EndSpan(ctx, sc, err)
5440		}()
5441	}
5442	iter.i++
5443	if iter.i < len(iter.page.Values()) {
5444		return nil
5445	}
5446	err = iter.page.NextWithContext(ctx)
5447	if err != nil {
5448		iter.i--
5449		return err
5450	}
5451	iter.i = 0
5452	return nil
5453}
5454
5455// Next advances to the next value.  If there was an error making
5456// the request the iterator does not advance and the error is returned.
5457// Deprecated: Use NextWithContext() instead.
5458func (iter *AzureFirewallListResultIterator) Next() error {
5459	return iter.NextWithContext(context.Background())
5460}
5461
5462// NotDone returns true if the enumeration should be started or is not yet complete.
5463func (iter AzureFirewallListResultIterator) NotDone() bool {
5464	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5465}
5466
5467// Response returns the raw server response from the last page request.
5468func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
5469	return iter.page.Response()
5470}
5471
5472// Value returns the current value or a zero-initialized value if the
5473// iterator has advanced beyond the end of the collection.
5474func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
5475	if !iter.page.NotDone() {
5476		return AzureFirewall{}
5477	}
5478	return iter.page.Values()[iter.i]
5479}
5480
5481// Creates a new instance of the AzureFirewallListResultIterator type.
5482func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
5483	return AzureFirewallListResultIterator{page: page}
5484}
5485
5486// IsEmpty returns true if the ListResult contains no values.
5487func (aflr AzureFirewallListResult) IsEmpty() bool {
5488	return aflr.Value == nil || len(*aflr.Value) == 0
5489}
5490
5491// hasNextLink returns true if the NextLink is not empty.
5492func (aflr AzureFirewallListResult) hasNextLink() bool {
5493	return aflr.NextLink != nil && len(*aflr.NextLink) != 0
5494}
5495
5496// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
5497// It returns nil if no more results exist.
5498func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
5499	if !aflr.hasNextLink() {
5500		return nil, nil
5501	}
5502	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5503		autorest.AsJSON(),
5504		autorest.AsGet(),
5505		autorest.WithBaseURL(to.String(aflr.NextLink)))
5506}
5507
5508// AzureFirewallListResultPage contains a page of AzureFirewall values.
5509type AzureFirewallListResultPage struct {
5510	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
5511	aflr AzureFirewallListResult
5512}
5513
5514// NextWithContext advances to the next page of values.  If there was an error making
5515// the request the page does not advance and the error is returned.
5516func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
5517	if tracing.IsEnabled() {
5518		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
5519		defer func() {
5520			sc := -1
5521			if page.Response().Response.Response != nil {
5522				sc = page.Response().Response.Response.StatusCode
5523			}
5524			tracing.EndSpan(ctx, sc, err)
5525		}()
5526	}
5527	for {
5528		next, err := page.fn(ctx, page.aflr)
5529		if err != nil {
5530			return err
5531		}
5532		page.aflr = next
5533		if !next.hasNextLink() || !next.IsEmpty() {
5534			break
5535		}
5536	}
5537	return nil
5538}
5539
5540// Next advances to the next page of values.  If there was an error making
5541// the request the page does not advance and the error is returned.
5542// Deprecated: Use NextWithContext() instead.
5543func (page *AzureFirewallListResultPage) Next() error {
5544	return page.NextWithContext(context.Background())
5545}
5546
5547// NotDone returns true if the page enumeration should be started or is not yet complete.
5548func (page AzureFirewallListResultPage) NotDone() bool {
5549	return !page.aflr.IsEmpty()
5550}
5551
5552// Response returns the raw server response from the last page request.
5553func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
5554	return page.aflr
5555}
5556
5557// Values returns the slice of values for the current page or nil if there are no values.
5558func (page AzureFirewallListResultPage) Values() []AzureFirewall {
5559	if page.aflr.IsEmpty() {
5560		return nil
5561	}
5562	return *page.aflr.Value
5563}
5564
5565// Creates a new instance of the AzureFirewallListResultPage type.
5566func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
5567	return AzureFirewallListResultPage{
5568		fn:   getNextPage,
5569		aflr: cur,
5570	}
5571}
5572
5573// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action.
5574type AzureFirewallNatRCAction struct {
5575	// Type - The type of action. Possible values include: 'Snat', 'Dnat'
5576	Type AzureFirewallNatRCActionType `json:"type,omitempty"`
5577}
5578
5579// AzureFirewallNatRule properties of a NAT rule.
5580type AzureFirewallNatRule struct {
5581	// Name - Name of the NAT rule.
5582	Name *string `json:"name,omitempty"`
5583	// Description - Description of the rule.
5584	Description *string `json:"description,omitempty"`
5585	// SourceAddresses - List of source IP addresses for this rule.
5586	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
5587	// DestinationAddresses - List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags.
5588	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
5589	// DestinationPorts - List of destination ports.
5590	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
5591	// Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule.
5592	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
5593	// TranslatedAddress - The translated address for this NAT rule.
5594	TranslatedAddress *string `json:"translatedAddress,omitempty"`
5595	// TranslatedPort - The translated port for this NAT rule.
5596	TranslatedPort *string `json:"translatedPort,omitempty"`
5597	// TranslatedFqdn - The translated FQDN for this NAT rule.
5598	TranslatedFqdn *string `json:"translatedFqdn,omitempty"`
5599	// SourceIPGroups - List of source IpGroups for this rule.
5600	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
5601}
5602
5603// AzureFirewallNatRuleCollection NAT rule collection resource.
5604type AzureFirewallNatRuleCollection struct {
5605	// AzureFirewallNatRuleCollectionProperties - Properties of the azure firewall NAT rule collection.
5606	*AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"`
5607	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
5608	Name *string `json:"name,omitempty"`
5609	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5610	Etag *string `json:"etag,omitempty"`
5611	// ID - Resource ID.
5612	ID *string `json:"id,omitempty"`
5613}
5614
5615// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection.
5616func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) {
5617	objectMap := make(map[string]interface{})
5618	if afnrc.AzureFirewallNatRuleCollectionProperties != nil {
5619		objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties
5620	}
5621	if afnrc.Name != nil {
5622		objectMap["name"] = afnrc.Name
5623	}
5624	if afnrc.ID != nil {
5625		objectMap["id"] = afnrc.ID
5626	}
5627	return json.Marshal(objectMap)
5628}
5629
5630// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct.
5631func (afnrc *AzureFirewallNatRuleCollection) UnmarshalJSON(body []byte) error {
5632	var m map[string]*json.RawMessage
5633	err := json.Unmarshal(body, &m)
5634	if err != nil {
5635		return err
5636	}
5637	for k, v := range m {
5638		switch k {
5639		case "properties":
5640			if v != nil {
5641				var azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties
5642				err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties)
5643				if err != nil {
5644					return err
5645				}
5646				afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties
5647			}
5648		case "name":
5649			if v != nil {
5650				var name string
5651				err = json.Unmarshal(*v, &name)
5652				if err != nil {
5653					return err
5654				}
5655				afnrc.Name = &name
5656			}
5657		case "etag":
5658			if v != nil {
5659				var etag string
5660				err = json.Unmarshal(*v, &etag)
5661				if err != nil {
5662					return err
5663				}
5664				afnrc.Etag = &etag
5665			}
5666		case "id":
5667			if v != nil {
5668				var ID string
5669				err = json.Unmarshal(*v, &ID)
5670				if err != nil {
5671					return err
5672				}
5673				afnrc.ID = &ID
5674			}
5675		}
5676	}
5677
5678	return nil
5679}
5680
5681// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection.
5682type AzureFirewallNatRuleCollectionProperties struct {
5683	// Priority - Priority of the NAT rule collection resource.
5684	Priority *int32 `json:"priority,omitempty"`
5685	// Action - The action type of a NAT rule collection.
5686	Action *AzureFirewallNatRCAction `json:"action,omitempty"`
5687	// Rules - Collection of rules used by a NAT rule collection.
5688	Rules *[]AzureFirewallNatRule `json:"rules,omitempty"`
5689	// ProvisioningState - READ-ONLY; The provisioning state of the NAT rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5690	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5691}
5692
5693// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollectionProperties.
5694func (afnrcp AzureFirewallNatRuleCollectionProperties) MarshalJSON() ([]byte, error) {
5695	objectMap := make(map[string]interface{})
5696	if afnrcp.Priority != nil {
5697		objectMap["priority"] = afnrcp.Priority
5698	}
5699	if afnrcp.Action != nil {
5700		objectMap["action"] = afnrcp.Action
5701	}
5702	if afnrcp.Rules != nil {
5703		objectMap["rules"] = afnrcp.Rules
5704	}
5705	return json.Marshal(objectMap)
5706}
5707
5708// AzureFirewallNetworkRule properties of the network rule.
5709type AzureFirewallNetworkRule struct {
5710	// Name - Name of the network rule.
5711	Name *string `json:"name,omitempty"`
5712	// Description - Description of the rule.
5713	Description *string `json:"description,omitempty"`
5714	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
5715	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
5716	// SourceAddresses - List of source IP addresses for this rule.
5717	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
5718	// DestinationAddresses - List of destination IP addresses.
5719	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
5720	// DestinationPorts - List of destination ports.
5721	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
5722	// DestinationFqdns - List of destination FQDNs.
5723	DestinationFqdns *[]string `json:"destinationFqdns,omitempty"`
5724	// SourceIPGroups - List of source IpGroups for this rule.
5725	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
5726	// DestinationIPGroups - List of destination IpGroups for this rule.
5727	DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"`
5728}
5729
5730// AzureFirewallNetworkRuleCollection network rule collection resource.
5731type AzureFirewallNetworkRuleCollection struct {
5732	// AzureFirewallNetworkRuleCollectionPropertiesFormat - Properties of the azure firewall network rule collection.
5733	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
5734	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
5735	Name *string `json:"name,omitempty"`
5736	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5737	Etag *string `json:"etag,omitempty"`
5738	// ID - Resource ID.
5739	ID *string `json:"id,omitempty"`
5740}
5741
5742// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
5743func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
5744	objectMap := make(map[string]interface{})
5745	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
5746		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
5747	}
5748	if afnrc.Name != nil {
5749		objectMap["name"] = afnrc.Name
5750	}
5751	if afnrc.ID != nil {
5752		objectMap["id"] = afnrc.ID
5753	}
5754	return json.Marshal(objectMap)
5755}
5756
5757// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
5758func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
5759	var m map[string]*json.RawMessage
5760	err := json.Unmarshal(body, &m)
5761	if err != nil {
5762		return err
5763	}
5764	for k, v := range m {
5765		switch k {
5766		case "properties":
5767			if v != nil {
5768				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
5769				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
5770				if err != nil {
5771					return err
5772				}
5773				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
5774			}
5775		case "name":
5776			if v != nil {
5777				var name string
5778				err = json.Unmarshal(*v, &name)
5779				if err != nil {
5780					return err
5781				}
5782				afnrc.Name = &name
5783			}
5784		case "etag":
5785			if v != nil {
5786				var etag string
5787				err = json.Unmarshal(*v, &etag)
5788				if err != nil {
5789					return err
5790				}
5791				afnrc.Etag = &etag
5792			}
5793		case "id":
5794			if v != nil {
5795				var ID string
5796				err = json.Unmarshal(*v, &ID)
5797				if err != nil {
5798					return err
5799				}
5800				afnrc.ID = &ID
5801			}
5802		}
5803	}
5804
5805	return nil
5806}
5807
5808// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
5809type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
5810	// Priority - Priority of the network rule collection resource.
5811	Priority *int32 `json:"priority,omitempty"`
5812	// Action - The action type of a rule collection.
5813	Action *AzureFirewallRCAction `json:"action,omitempty"`
5814	// Rules - Collection of rules used by a network rule collection.
5815	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
5816	// ProvisioningState - READ-ONLY; The provisioning state of the network rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5817	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5818}
5819
5820// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollectionPropertiesFormat.
5821func (afnrcpf AzureFirewallNetworkRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) {
5822	objectMap := make(map[string]interface{})
5823	if afnrcpf.Priority != nil {
5824		objectMap["priority"] = afnrcpf.Priority
5825	}
5826	if afnrcpf.Action != nil {
5827		objectMap["action"] = afnrcpf.Action
5828	}
5829	if afnrcpf.Rules != nil {
5830		objectMap["rules"] = afnrcpf.Rules
5831	}
5832	return json.Marshal(objectMap)
5833}
5834
5835// AzureFirewallPropertiesFormat properties of the Azure Firewall.
5836type AzureFirewallPropertiesFormat struct {
5837	// ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall.
5838	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
5839	// NatRuleCollections - Collection of NAT rule collections used by Azure Firewall.
5840	NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"`
5841	// NetworkRuleCollections - Collection of network rule collections used by Azure Firewall.
5842	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
5843	// IPConfigurations - IP configuration of the Azure Firewall resource.
5844	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
5845	// ManagementIPConfiguration - IP configuration of the Azure Firewall used for management traffic.
5846	ManagementIPConfiguration *AzureFirewallIPConfiguration `json:"managementIpConfiguration,omitempty"`
5847	// ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5848	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5849	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
5850	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
5851	// VirtualHub - The virtualHub to which the firewall belongs.
5852	VirtualHub *SubResource `json:"virtualHub,omitempty"`
5853	// FirewallPolicy - The firewallPolicy associated with this azure firewall.
5854	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
5855	// HubIPAddresses - READ-ONLY; IP addresses associated with AzureFirewall.
5856	HubIPAddresses *HubIPAddresses `json:"hubIpAddresses,omitempty"`
5857	// IPGroups - READ-ONLY; IpGroups associated with AzureFirewall.
5858	IPGroups *[]AzureFirewallIPGroups `json:"ipGroups,omitempty"`
5859	// Sku - The Azure Firewall Resource SKU.
5860	Sku *AzureFirewallSku `json:"sku,omitempty"`
5861	// AdditionalProperties - The additional properties used to further config this azure firewall.
5862	AdditionalProperties map[string]*string `json:"additionalProperties"`
5863}
5864
5865// MarshalJSON is the custom marshaler for AzureFirewallPropertiesFormat.
5866func (afpf AzureFirewallPropertiesFormat) MarshalJSON() ([]byte, error) {
5867	objectMap := make(map[string]interface{})
5868	if afpf.ApplicationRuleCollections != nil {
5869		objectMap["applicationRuleCollections"] = afpf.ApplicationRuleCollections
5870	}
5871	if afpf.NatRuleCollections != nil {
5872		objectMap["natRuleCollections"] = afpf.NatRuleCollections
5873	}
5874	if afpf.NetworkRuleCollections != nil {
5875		objectMap["networkRuleCollections"] = afpf.NetworkRuleCollections
5876	}
5877	if afpf.IPConfigurations != nil {
5878		objectMap["ipConfigurations"] = afpf.IPConfigurations
5879	}
5880	if afpf.ManagementIPConfiguration != nil {
5881		objectMap["managementIpConfiguration"] = afpf.ManagementIPConfiguration
5882	}
5883	if afpf.ThreatIntelMode != "" {
5884		objectMap["threatIntelMode"] = afpf.ThreatIntelMode
5885	}
5886	if afpf.VirtualHub != nil {
5887		objectMap["virtualHub"] = afpf.VirtualHub
5888	}
5889	if afpf.FirewallPolicy != nil {
5890		objectMap["firewallPolicy"] = afpf.FirewallPolicy
5891	}
5892	if afpf.Sku != nil {
5893		objectMap["sku"] = afpf.Sku
5894	}
5895	if afpf.AdditionalProperties != nil {
5896		objectMap["additionalProperties"] = afpf.AdditionalProperties
5897	}
5898	return json.Marshal(objectMap)
5899}
5900
5901// AzureFirewallPublicIPAddress public IP Address associated with azure firewall.
5902type AzureFirewallPublicIPAddress struct {
5903	// Address - Public IP Address value.
5904	Address *string `json:"address,omitempty"`
5905}
5906
5907// AzureFirewallRCAction properties of the AzureFirewallRCAction.
5908type AzureFirewallRCAction struct {
5909	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
5910	Type AzureFirewallRCActionType `json:"type,omitempty"`
5911}
5912
5913// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5914// long-running operation.
5915type AzureFirewallsCreateOrUpdateFuture struct {
5916	azure.FutureAPI
5917	// Result returns the result of the asynchronous operation.
5918	// If the operation has not completed it will return an error.
5919	Result func(AzureFirewallsClient) (AzureFirewall, error)
5920}
5921
5922// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5923func (future *AzureFirewallsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5924	var azFuture azure.Future
5925	if err := json.Unmarshal(body, &azFuture); err != nil {
5926		return err
5927	}
5928	future.FutureAPI = &azFuture
5929	future.Result = future.result
5930	return nil
5931}
5932
5933// result is the default implementation for AzureFirewallsCreateOrUpdateFuture.Result.
5934func (future *AzureFirewallsCreateOrUpdateFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) {
5935	var done bool
5936	done, err = future.DoneWithContext(context.Background(), client)
5937	if err != nil {
5938		err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5939		return
5940	}
5941	if !done {
5942		af.Response.Response = future.Response()
5943		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture")
5944		return
5945	}
5946	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5947	if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
5948		af, err = client.CreateOrUpdateResponder(af.Response.Response)
5949		if err != nil {
5950			err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request")
5951		}
5952	}
5953	return
5954}
5955
5956// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5957// operation.
5958type AzureFirewallsDeleteFuture struct {
5959	azure.FutureAPI
5960	// Result returns the result of the asynchronous operation.
5961	// If the operation has not completed it will return an error.
5962	Result func(AzureFirewallsClient) (autorest.Response, error)
5963}
5964
5965// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5966func (future *AzureFirewallsDeleteFuture) UnmarshalJSON(body []byte) error {
5967	var azFuture azure.Future
5968	if err := json.Unmarshal(body, &azFuture); err != nil {
5969		return err
5970	}
5971	future.FutureAPI = &azFuture
5972	future.Result = future.result
5973	return nil
5974}
5975
5976// result is the default implementation for AzureFirewallsDeleteFuture.Result.
5977func (future *AzureFirewallsDeleteFuture) result(client AzureFirewallsClient) (ar autorest.Response, err error) {
5978	var done bool
5979	done, err = future.DoneWithContext(context.Background(), client)
5980	if err != nil {
5981		err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure")
5982		return
5983	}
5984	if !done {
5985		ar.Response = future.Response()
5986		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture")
5987		return
5988	}
5989	ar.Response = future.Response()
5990	return
5991}
5992
5993// AzureFirewallSku SKU of an Azure Firewall.
5994type AzureFirewallSku struct {
5995	// Name - Name of an Azure Firewall SKU. Possible values include: 'AZFWVNet', 'AZFWHub'
5996	Name AzureFirewallSkuName `json:"name,omitempty"`
5997	// Tier - Tier of an Azure Firewall. Possible values include: 'Standard'
5998	Tier AzureFirewallSkuTier `json:"tier,omitempty"`
5999}
6000
6001// AzureFirewallsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
6002// long-running operation.
6003type AzureFirewallsUpdateTagsFuture struct {
6004	azure.FutureAPI
6005	// Result returns the result of the asynchronous operation.
6006	// If the operation has not completed it will return an error.
6007	Result func(AzureFirewallsClient) (AzureFirewall, error)
6008}
6009
6010// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6011func (future *AzureFirewallsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
6012	var azFuture azure.Future
6013	if err := json.Unmarshal(body, &azFuture); err != nil {
6014		return err
6015	}
6016	future.FutureAPI = &azFuture
6017	future.Result = future.result
6018	return nil
6019}
6020
6021// result is the default implementation for AzureFirewallsUpdateTagsFuture.Result.
6022func (future *AzureFirewallsUpdateTagsFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) {
6023	var done bool
6024	done, err = future.DoneWithContext(context.Background(), client)
6025	if err != nil {
6026		err = autorest.NewErrorWithError(err, "network.AzureFirewallsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
6027		return
6028	}
6029	if !done {
6030		af.Response.Response = future.Response()
6031		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsUpdateTagsFuture")
6032		return
6033	}
6034	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6035	if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
6036		af, err = client.UpdateTagsResponder(af.Response.Response)
6037		if err != nil {
6038			err = autorest.NewErrorWithError(err, "network.AzureFirewallsUpdateTagsFuture", "Result", af.Response.Response, "Failure responding to request")
6039		}
6040	}
6041	return
6042}
6043
6044// AzureReachabilityReport azure reachability report details.
6045type AzureReachabilityReport struct {
6046	autorest.Response `json:"-"`
6047	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
6048	AggregationLevel *string `json:"aggregationLevel,omitempty"`
6049	// ProviderLocation - Parameters that define a geographic location.
6050	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
6051	// ReachabilityReport - List of Azure reachability report items.
6052	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
6053}
6054
6055// AzureReachabilityReportItem azure reachability report details for a given provider location.
6056type AzureReachabilityReportItem struct {
6057	// Provider - The Internet service provider.
6058	Provider *string `json:"provider,omitempty"`
6059	// AzureLocation - The Azure region.
6060	AzureLocation *string `json:"azureLocation,omitempty"`
6061	// Latencies - List of latency details for each of the time series.
6062	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
6063}
6064
6065// AzureReachabilityReportLatencyInfo details on latency for a time series.
6066type AzureReachabilityReportLatencyInfo struct {
6067	// TimeStamp - The time stamp.
6068	TimeStamp *date.Time `json:"timeStamp,omitempty"`
6069	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
6070	Score *int32 `json:"score,omitempty"`
6071}
6072
6073// AzureReachabilityReportLocation parameters that define a geographic location.
6074type AzureReachabilityReportLocation struct {
6075	// Country - The name of the country.
6076	Country *string `json:"country,omitempty"`
6077	// State - The name of the state.
6078	State *string `json:"state,omitempty"`
6079	// City - The name of the city or town.
6080	City *string `json:"city,omitempty"`
6081}
6082
6083// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
6084type AzureReachabilityReportParameters struct {
6085	// ProviderLocation - Parameters that define a geographic location.
6086	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
6087	// Providers - List of Internet service providers.
6088	Providers *[]string `json:"providers,omitempty"`
6089	// AzureLocations - Optional Azure regions to scope the query to.
6090	AzureLocations *[]string `json:"azureLocations,omitempty"`
6091	// StartTime - The start time for the Azure reachability report.
6092	StartTime *date.Time `json:"startTime,omitempty"`
6093	// EndTime - The end time for the Azure reachability report.
6094	EndTime *date.Time `json:"endTime,omitempty"`
6095}
6096
6097// BackendAddressPool pool of backend IP addresses.
6098type BackendAddressPool struct {
6099	autorest.Response `json:"-"`
6100	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
6101	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
6102	// 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.
6103	Name *string `json:"name,omitempty"`
6104	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6105	Etag *string `json:"etag,omitempty"`
6106	// Type - READ-ONLY; Type of the resource.
6107	Type *string `json:"type,omitempty"`
6108	// ID - Resource ID.
6109	ID *string `json:"id,omitempty"`
6110}
6111
6112// MarshalJSON is the custom marshaler for BackendAddressPool.
6113func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
6114	objectMap := make(map[string]interface{})
6115	if bap.BackendAddressPoolPropertiesFormat != nil {
6116		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
6117	}
6118	if bap.Name != nil {
6119		objectMap["name"] = bap.Name
6120	}
6121	if bap.ID != nil {
6122		objectMap["id"] = bap.ID
6123	}
6124	return json.Marshal(objectMap)
6125}
6126
6127// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
6128func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
6129	var m map[string]*json.RawMessage
6130	err := json.Unmarshal(body, &m)
6131	if err != nil {
6132		return err
6133	}
6134	for k, v := range m {
6135		switch k {
6136		case "properties":
6137			if v != nil {
6138				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
6139				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
6140				if err != nil {
6141					return err
6142				}
6143				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
6144			}
6145		case "name":
6146			if v != nil {
6147				var name string
6148				err = json.Unmarshal(*v, &name)
6149				if err != nil {
6150					return err
6151				}
6152				bap.Name = &name
6153			}
6154		case "etag":
6155			if v != nil {
6156				var etag string
6157				err = json.Unmarshal(*v, &etag)
6158				if err != nil {
6159					return err
6160				}
6161				bap.Etag = &etag
6162			}
6163		case "type":
6164			if v != nil {
6165				var typeVar string
6166				err = json.Unmarshal(*v, &typeVar)
6167				if err != nil {
6168					return err
6169				}
6170				bap.Type = &typeVar
6171			}
6172		case "id":
6173			if v != nil {
6174				var ID string
6175				err = json.Unmarshal(*v, &ID)
6176				if err != nil {
6177					return err
6178				}
6179				bap.ID = &ID
6180			}
6181		}
6182	}
6183
6184	return nil
6185}
6186
6187// BackendAddressPoolPropertiesFormat properties of the backend address pool.
6188type BackendAddressPoolPropertiesFormat struct {
6189	// BackendIPConfigurations - READ-ONLY; An array of references to IP addresses defined in network interfaces.
6190	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
6191	// LoadBalancingRules - READ-ONLY; An array of references to load balancing rules that use this backend address pool.
6192	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
6193	// OutboundRule - READ-ONLY; A reference to an outbound rule that uses this backend address pool.
6194	OutboundRule *SubResource `json:"outboundRule,omitempty"`
6195	// OutboundRules - READ-ONLY; An array of references to outbound rules that use this backend address pool.
6196	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
6197	// ProvisioningState - READ-ONLY; The provisioning state of the backend address pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6198	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6199}
6200
6201// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
6202func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
6203	objectMap := make(map[string]interface{})
6204	return json.Marshal(objectMap)
6205}
6206
6207// BastionActiveSession the session detail for a target.
6208type BastionActiveSession struct {
6209	// SessionID - READ-ONLY; A unique id for the session.
6210	SessionID *string `json:"sessionId,omitempty"`
6211	// StartTime - READ-ONLY; The time when the session started.
6212	StartTime interface{} `json:"startTime,omitempty"`
6213	// TargetSubscriptionID - READ-ONLY; The subscription id for the target virtual machine.
6214	TargetSubscriptionID *string `json:"targetSubscriptionId,omitempty"`
6215	// ResourceType - READ-ONLY; The type of the resource.
6216	ResourceType *string `json:"resourceType,omitempty"`
6217	// TargetHostName - READ-ONLY; The host name of the target.
6218	TargetHostName *string `json:"targetHostName,omitempty"`
6219	// TargetResourceGroup - READ-ONLY; The resource group of the target.
6220	TargetResourceGroup *string `json:"targetResourceGroup,omitempty"`
6221	// UserName - READ-ONLY; The user name who is active on this session.
6222	UserName *string `json:"userName,omitempty"`
6223	// TargetIPAddress - READ-ONLY; The IP Address of the target.
6224	TargetIPAddress *string `json:"targetIpAddress,omitempty"`
6225	// Protocol - READ-ONLY; The protocol used to connect to the target. Possible values include: 'SSH', 'RDP'
6226	Protocol BastionConnectProtocol `json:"protocol,omitempty"`
6227	// TargetResourceID - READ-ONLY; The resource id of the target.
6228	TargetResourceID *string `json:"targetResourceId,omitempty"`
6229	// SessionDurationInMins - READ-ONLY; Duration in mins the session has been active.
6230	SessionDurationInMins *float64 `json:"sessionDurationInMins,omitempty"`
6231}
6232
6233// MarshalJSON is the custom marshaler for BastionActiveSession.
6234func (bas BastionActiveSession) MarshalJSON() ([]byte, error) {
6235	objectMap := make(map[string]interface{})
6236	return json.Marshal(objectMap)
6237}
6238
6239// BastionActiveSessionListResult response for GetActiveSessions.
6240type BastionActiveSessionListResult struct {
6241	autorest.Response `json:"-"`
6242	// Value - List of active sessions on the bastion.
6243	Value *[]BastionActiveSession `json:"value,omitempty"`
6244	// NextLink - The URL to get the next set of results.
6245	NextLink *string `json:"nextLink,omitempty"`
6246}
6247
6248// BastionActiveSessionListResultIterator provides access to a complete listing of BastionActiveSession
6249// values.
6250type BastionActiveSessionListResultIterator struct {
6251	i    int
6252	page BastionActiveSessionListResultPage
6253}
6254
6255// NextWithContext advances to the next value.  If there was an error making
6256// the request the iterator does not advance and the error is returned.
6257func (iter *BastionActiveSessionListResultIterator) NextWithContext(ctx context.Context) (err error) {
6258	if tracing.IsEnabled() {
6259		ctx = tracing.StartSpan(ctx, fqdn+"/BastionActiveSessionListResultIterator.NextWithContext")
6260		defer func() {
6261			sc := -1
6262			if iter.Response().Response.Response != nil {
6263				sc = iter.Response().Response.Response.StatusCode
6264			}
6265			tracing.EndSpan(ctx, sc, err)
6266		}()
6267	}
6268	iter.i++
6269	if iter.i < len(iter.page.Values()) {
6270		return nil
6271	}
6272	err = iter.page.NextWithContext(ctx)
6273	if err != nil {
6274		iter.i--
6275		return err
6276	}
6277	iter.i = 0
6278	return nil
6279}
6280
6281// Next advances to the next value.  If there was an error making
6282// the request the iterator does not advance and the error is returned.
6283// Deprecated: Use NextWithContext() instead.
6284func (iter *BastionActiveSessionListResultIterator) Next() error {
6285	return iter.NextWithContext(context.Background())
6286}
6287
6288// NotDone returns true if the enumeration should be started or is not yet complete.
6289func (iter BastionActiveSessionListResultIterator) NotDone() bool {
6290	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6291}
6292
6293// Response returns the raw server response from the last page request.
6294func (iter BastionActiveSessionListResultIterator) Response() BastionActiveSessionListResult {
6295	return iter.page.Response()
6296}
6297
6298// Value returns the current value or a zero-initialized value if the
6299// iterator has advanced beyond the end of the collection.
6300func (iter BastionActiveSessionListResultIterator) Value() BastionActiveSession {
6301	if !iter.page.NotDone() {
6302		return BastionActiveSession{}
6303	}
6304	return iter.page.Values()[iter.i]
6305}
6306
6307// Creates a new instance of the BastionActiveSessionListResultIterator type.
6308func NewBastionActiveSessionListResultIterator(page BastionActiveSessionListResultPage) BastionActiveSessionListResultIterator {
6309	return BastionActiveSessionListResultIterator{page: page}
6310}
6311
6312// IsEmpty returns true if the ListResult contains no values.
6313func (baslr BastionActiveSessionListResult) IsEmpty() bool {
6314	return baslr.Value == nil || len(*baslr.Value) == 0
6315}
6316
6317// hasNextLink returns true if the NextLink is not empty.
6318func (baslr BastionActiveSessionListResult) hasNextLink() bool {
6319	return baslr.NextLink != nil && len(*baslr.NextLink) != 0
6320}
6321
6322// bastionActiveSessionListResultPreparer prepares a request to retrieve the next set of results.
6323// It returns nil if no more results exist.
6324func (baslr BastionActiveSessionListResult) bastionActiveSessionListResultPreparer(ctx context.Context) (*http.Request, error) {
6325	if !baslr.hasNextLink() {
6326		return nil, nil
6327	}
6328	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6329		autorest.AsJSON(),
6330		autorest.AsGet(),
6331		autorest.WithBaseURL(to.String(baslr.NextLink)))
6332}
6333
6334// BastionActiveSessionListResultPage contains a page of BastionActiveSession values.
6335type BastionActiveSessionListResultPage struct {
6336	fn    func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error)
6337	baslr BastionActiveSessionListResult
6338}
6339
6340// NextWithContext advances to the next page of values.  If there was an error making
6341// the request the page does not advance and the error is returned.
6342func (page *BastionActiveSessionListResultPage) NextWithContext(ctx context.Context) (err error) {
6343	if tracing.IsEnabled() {
6344		ctx = tracing.StartSpan(ctx, fqdn+"/BastionActiveSessionListResultPage.NextWithContext")
6345		defer func() {
6346			sc := -1
6347			if page.Response().Response.Response != nil {
6348				sc = page.Response().Response.Response.StatusCode
6349			}
6350			tracing.EndSpan(ctx, sc, err)
6351		}()
6352	}
6353	for {
6354		next, err := page.fn(ctx, page.baslr)
6355		if err != nil {
6356			return err
6357		}
6358		page.baslr = next
6359		if !next.hasNextLink() || !next.IsEmpty() {
6360			break
6361		}
6362	}
6363	return nil
6364}
6365
6366// Next advances to the next page of values.  If there was an error making
6367// the request the page does not advance and the error is returned.
6368// Deprecated: Use NextWithContext() instead.
6369func (page *BastionActiveSessionListResultPage) Next() error {
6370	return page.NextWithContext(context.Background())
6371}
6372
6373// NotDone returns true if the page enumeration should be started or is not yet complete.
6374func (page BastionActiveSessionListResultPage) NotDone() bool {
6375	return !page.baslr.IsEmpty()
6376}
6377
6378// Response returns the raw server response from the last page request.
6379func (page BastionActiveSessionListResultPage) Response() BastionActiveSessionListResult {
6380	return page.baslr
6381}
6382
6383// Values returns the slice of values for the current page or nil if there are no values.
6384func (page BastionActiveSessionListResultPage) Values() []BastionActiveSession {
6385	if page.baslr.IsEmpty() {
6386		return nil
6387	}
6388	return *page.baslr.Value
6389}
6390
6391// Creates a new instance of the BastionActiveSessionListResultPage type.
6392func NewBastionActiveSessionListResultPage(cur BastionActiveSessionListResult, getNextPage func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error)) BastionActiveSessionListResultPage {
6393	return BastionActiveSessionListResultPage{
6394		fn:    getNextPage,
6395		baslr: cur,
6396	}
6397}
6398
6399// BastionHost bastion Host resource.
6400type BastionHost struct {
6401	autorest.Response `json:"-"`
6402	// BastionHostPropertiesFormat - Represents the bastion host resource.
6403	*BastionHostPropertiesFormat `json:"properties,omitempty"`
6404	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6405	Etag *string `json:"etag,omitempty"`
6406	// ID - Resource ID.
6407	ID *string `json:"id,omitempty"`
6408	// Name - READ-ONLY; Resource name.
6409	Name *string `json:"name,omitempty"`
6410	// Type - READ-ONLY; Resource type.
6411	Type *string `json:"type,omitempty"`
6412	// Location - Resource location.
6413	Location *string `json:"location,omitempty"`
6414	// Tags - Resource tags.
6415	Tags map[string]*string `json:"tags"`
6416}
6417
6418// MarshalJSON is the custom marshaler for BastionHost.
6419func (bh BastionHost) MarshalJSON() ([]byte, error) {
6420	objectMap := make(map[string]interface{})
6421	if bh.BastionHostPropertiesFormat != nil {
6422		objectMap["properties"] = bh.BastionHostPropertiesFormat
6423	}
6424	if bh.ID != nil {
6425		objectMap["id"] = bh.ID
6426	}
6427	if bh.Location != nil {
6428		objectMap["location"] = bh.Location
6429	}
6430	if bh.Tags != nil {
6431		objectMap["tags"] = bh.Tags
6432	}
6433	return json.Marshal(objectMap)
6434}
6435
6436// UnmarshalJSON is the custom unmarshaler for BastionHost struct.
6437func (bh *BastionHost) UnmarshalJSON(body []byte) error {
6438	var m map[string]*json.RawMessage
6439	err := json.Unmarshal(body, &m)
6440	if err != nil {
6441		return err
6442	}
6443	for k, v := range m {
6444		switch k {
6445		case "properties":
6446			if v != nil {
6447				var bastionHostPropertiesFormat BastionHostPropertiesFormat
6448				err = json.Unmarshal(*v, &bastionHostPropertiesFormat)
6449				if err != nil {
6450					return err
6451				}
6452				bh.BastionHostPropertiesFormat = &bastionHostPropertiesFormat
6453			}
6454		case "etag":
6455			if v != nil {
6456				var etag string
6457				err = json.Unmarshal(*v, &etag)
6458				if err != nil {
6459					return err
6460				}
6461				bh.Etag = &etag
6462			}
6463		case "id":
6464			if v != nil {
6465				var ID string
6466				err = json.Unmarshal(*v, &ID)
6467				if err != nil {
6468					return err
6469				}
6470				bh.ID = &ID
6471			}
6472		case "name":
6473			if v != nil {
6474				var name string
6475				err = json.Unmarshal(*v, &name)
6476				if err != nil {
6477					return err
6478				}
6479				bh.Name = &name
6480			}
6481		case "type":
6482			if v != nil {
6483				var typeVar string
6484				err = json.Unmarshal(*v, &typeVar)
6485				if err != nil {
6486					return err
6487				}
6488				bh.Type = &typeVar
6489			}
6490		case "location":
6491			if v != nil {
6492				var location string
6493				err = json.Unmarshal(*v, &location)
6494				if err != nil {
6495					return err
6496				}
6497				bh.Location = &location
6498			}
6499		case "tags":
6500			if v != nil {
6501				var tags map[string]*string
6502				err = json.Unmarshal(*v, &tags)
6503				if err != nil {
6504					return err
6505				}
6506				bh.Tags = tags
6507			}
6508		}
6509	}
6510
6511	return nil
6512}
6513
6514// BastionHostIPConfiguration IP configuration of an Bastion Host.
6515type BastionHostIPConfiguration struct {
6516	// BastionHostIPConfigurationPropertiesFormat - Represents the ip configuration associated with the resource.
6517	*BastionHostIPConfigurationPropertiesFormat `json:"properties,omitempty"`
6518	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
6519	Name *string `json:"name,omitempty"`
6520	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6521	Etag *string `json:"etag,omitempty"`
6522	// Type - READ-ONLY; Ip configuration type.
6523	Type *string `json:"type,omitempty"`
6524	// ID - Resource ID.
6525	ID *string `json:"id,omitempty"`
6526}
6527
6528// MarshalJSON is the custom marshaler for BastionHostIPConfiguration.
6529func (bhic BastionHostIPConfiguration) MarshalJSON() ([]byte, error) {
6530	objectMap := make(map[string]interface{})
6531	if bhic.BastionHostIPConfigurationPropertiesFormat != nil {
6532		objectMap["properties"] = bhic.BastionHostIPConfigurationPropertiesFormat
6533	}
6534	if bhic.Name != nil {
6535		objectMap["name"] = bhic.Name
6536	}
6537	if bhic.ID != nil {
6538		objectMap["id"] = bhic.ID
6539	}
6540	return json.Marshal(objectMap)
6541}
6542
6543// UnmarshalJSON is the custom unmarshaler for BastionHostIPConfiguration struct.
6544func (bhic *BastionHostIPConfiguration) UnmarshalJSON(body []byte) error {
6545	var m map[string]*json.RawMessage
6546	err := json.Unmarshal(body, &m)
6547	if err != nil {
6548		return err
6549	}
6550	for k, v := range m {
6551		switch k {
6552		case "properties":
6553			if v != nil {
6554				var bastionHostIPConfigurationPropertiesFormat BastionHostIPConfigurationPropertiesFormat
6555				err = json.Unmarshal(*v, &bastionHostIPConfigurationPropertiesFormat)
6556				if err != nil {
6557					return err
6558				}
6559				bhic.BastionHostIPConfigurationPropertiesFormat = &bastionHostIPConfigurationPropertiesFormat
6560			}
6561		case "name":
6562			if v != nil {
6563				var name string
6564				err = json.Unmarshal(*v, &name)
6565				if err != nil {
6566					return err
6567				}
6568				bhic.Name = &name
6569			}
6570		case "etag":
6571			if v != nil {
6572				var etag string
6573				err = json.Unmarshal(*v, &etag)
6574				if err != nil {
6575					return err
6576				}
6577				bhic.Etag = &etag
6578			}
6579		case "type":
6580			if v != nil {
6581				var typeVar string
6582				err = json.Unmarshal(*v, &typeVar)
6583				if err != nil {
6584					return err
6585				}
6586				bhic.Type = &typeVar
6587			}
6588		case "id":
6589			if v != nil {
6590				var ID string
6591				err = json.Unmarshal(*v, &ID)
6592				if err != nil {
6593					return err
6594				}
6595				bhic.ID = &ID
6596			}
6597		}
6598	}
6599
6600	return nil
6601}
6602
6603// BastionHostIPConfigurationPropertiesFormat properties of IP configuration of an Bastion Host.
6604type BastionHostIPConfigurationPropertiesFormat struct {
6605	// Subnet - Reference of the subnet resource.
6606	Subnet *SubResource `json:"subnet,omitempty"`
6607	// PublicIPAddress - Reference of the PublicIP resource.
6608	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
6609	// ProvisioningState - READ-ONLY; The provisioning state of the bastion host IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6610	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6611	// PrivateIPAllocationMethod - Private IP allocation method. Possible values include: 'Static', 'Dynamic'
6612	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
6613}
6614
6615// MarshalJSON is the custom marshaler for BastionHostIPConfigurationPropertiesFormat.
6616func (bhicpf BastionHostIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
6617	objectMap := make(map[string]interface{})
6618	if bhicpf.Subnet != nil {
6619		objectMap["subnet"] = bhicpf.Subnet
6620	}
6621	if bhicpf.PublicIPAddress != nil {
6622		objectMap["publicIPAddress"] = bhicpf.PublicIPAddress
6623	}
6624	if bhicpf.PrivateIPAllocationMethod != "" {
6625		objectMap["privateIPAllocationMethod"] = bhicpf.PrivateIPAllocationMethod
6626	}
6627	return json.Marshal(objectMap)
6628}
6629
6630// BastionHostListResult response for ListBastionHosts API service call.
6631type BastionHostListResult struct {
6632	autorest.Response `json:"-"`
6633	// Value - List of Bastion Hosts in a resource group.
6634	Value *[]BastionHost `json:"value,omitempty"`
6635	// NextLink - URL to get the next set of results.
6636	NextLink *string `json:"nextLink,omitempty"`
6637}
6638
6639// BastionHostListResultIterator provides access to a complete listing of BastionHost values.
6640type BastionHostListResultIterator struct {
6641	i    int
6642	page BastionHostListResultPage
6643}
6644
6645// NextWithContext advances to the next value.  If there was an error making
6646// the request the iterator does not advance and the error is returned.
6647func (iter *BastionHostListResultIterator) NextWithContext(ctx context.Context) (err error) {
6648	if tracing.IsEnabled() {
6649		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultIterator.NextWithContext")
6650		defer func() {
6651			sc := -1
6652			if iter.Response().Response.Response != nil {
6653				sc = iter.Response().Response.Response.StatusCode
6654			}
6655			tracing.EndSpan(ctx, sc, err)
6656		}()
6657	}
6658	iter.i++
6659	if iter.i < len(iter.page.Values()) {
6660		return nil
6661	}
6662	err = iter.page.NextWithContext(ctx)
6663	if err != nil {
6664		iter.i--
6665		return err
6666	}
6667	iter.i = 0
6668	return nil
6669}
6670
6671// Next advances to the next value.  If there was an error making
6672// the request the iterator does not advance and the error is returned.
6673// Deprecated: Use NextWithContext() instead.
6674func (iter *BastionHostListResultIterator) Next() error {
6675	return iter.NextWithContext(context.Background())
6676}
6677
6678// NotDone returns true if the enumeration should be started or is not yet complete.
6679func (iter BastionHostListResultIterator) NotDone() bool {
6680	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6681}
6682
6683// Response returns the raw server response from the last page request.
6684func (iter BastionHostListResultIterator) Response() BastionHostListResult {
6685	return iter.page.Response()
6686}
6687
6688// Value returns the current value or a zero-initialized value if the
6689// iterator has advanced beyond the end of the collection.
6690func (iter BastionHostListResultIterator) Value() BastionHost {
6691	if !iter.page.NotDone() {
6692		return BastionHost{}
6693	}
6694	return iter.page.Values()[iter.i]
6695}
6696
6697// Creates a new instance of the BastionHostListResultIterator type.
6698func NewBastionHostListResultIterator(page BastionHostListResultPage) BastionHostListResultIterator {
6699	return BastionHostListResultIterator{page: page}
6700}
6701
6702// IsEmpty returns true if the ListResult contains no values.
6703func (bhlr BastionHostListResult) IsEmpty() bool {
6704	return bhlr.Value == nil || len(*bhlr.Value) == 0
6705}
6706
6707// hasNextLink returns true if the NextLink is not empty.
6708func (bhlr BastionHostListResult) hasNextLink() bool {
6709	return bhlr.NextLink != nil && len(*bhlr.NextLink) != 0
6710}
6711
6712// bastionHostListResultPreparer prepares a request to retrieve the next set of results.
6713// It returns nil if no more results exist.
6714func (bhlr BastionHostListResult) bastionHostListResultPreparer(ctx context.Context) (*http.Request, error) {
6715	if !bhlr.hasNextLink() {
6716		return nil, nil
6717	}
6718	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6719		autorest.AsJSON(),
6720		autorest.AsGet(),
6721		autorest.WithBaseURL(to.String(bhlr.NextLink)))
6722}
6723
6724// BastionHostListResultPage contains a page of BastionHost values.
6725type BastionHostListResultPage struct {
6726	fn   func(context.Context, BastionHostListResult) (BastionHostListResult, error)
6727	bhlr BastionHostListResult
6728}
6729
6730// NextWithContext advances to the next page of values.  If there was an error making
6731// the request the page does not advance and the error is returned.
6732func (page *BastionHostListResultPage) NextWithContext(ctx context.Context) (err error) {
6733	if tracing.IsEnabled() {
6734		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultPage.NextWithContext")
6735		defer func() {
6736			sc := -1
6737			if page.Response().Response.Response != nil {
6738				sc = page.Response().Response.Response.StatusCode
6739			}
6740			tracing.EndSpan(ctx, sc, err)
6741		}()
6742	}
6743	for {
6744		next, err := page.fn(ctx, page.bhlr)
6745		if err != nil {
6746			return err
6747		}
6748		page.bhlr = next
6749		if !next.hasNextLink() || !next.IsEmpty() {
6750			break
6751		}
6752	}
6753	return nil
6754}
6755
6756// Next advances to the next page of values.  If there was an error making
6757// the request the page does not advance and the error is returned.
6758// Deprecated: Use NextWithContext() instead.
6759func (page *BastionHostListResultPage) Next() error {
6760	return page.NextWithContext(context.Background())
6761}
6762
6763// NotDone returns true if the page enumeration should be started or is not yet complete.
6764func (page BastionHostListResultPage) NotDone() bool {
6765	return !page.bhlr.IsEmpty()
6766}
6767
6768// Response returns the raw server response from the last page request.
6769func (page BastionHostListResultPage) Response() BastionHostListResult {
6770	return page.bhlr
6771}
6772
6773// Values returns the slice of values for the current page or nil if there are no values.
6774func (page BastionHostListResultPage) Values() []BastionHost {
6775	if page.bhlr.IsEmpty() {
6776		return nil
6777	}
6778	return *page.bhlr.Value
6779}
6780
6781// Creates a new instance of the BastionHostListResultPage type.
6782func NewBastionHostListResultPage(cur BastionHostListResult, getNextPage func(context.Context, BastionHostListResult) (BastionHostListResult, error)) BastionHostListResultPage {
6783	return BastionHostListResultPage{
6784		fn:   getNextPage,
6785		bhlr: cur,
6786	}
6787}
6788
6789// BastionHostPropertiesFormat properties of the Bastion Host.
6790type BastionHostPropertiesFormat struct {
6791	// IPConfigurations - IP configuration of the Bastion Host resource.
6792	IPConfigurations *[]BastionHostIPConfiguration `json:"ipConfigurations,omitempty"`
6793	// DNSName - FQDN for the endpoint on which bastion host is accessible.
6794	DNSName *string `json:"dnsName,omitempty"`
6795	// ProvisioningState - READ-ONLY; The provisioning state of the bastion host resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6796	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6797}
6798
6799// MarshalJSON is the custom marshaler for BastionHostPropertiesFormat.
6800func (bhpf BastionHostPropertiesFormat) MarshalJSON() ([]byte, error) {
6801	objectMap := make(map[string]interface{})
6802	if bhpf.IPConfigurations != nil {
6803		objectMap["ipConfigurations"] = bhpf.IPConfigurations
6804	}
6805	if bhpf.DNSName != nil {
6806		objectMap["dnsName"] = bhpf.DNSName
6807	}
6808	return json.Marshal(objectMap)
6809}
6810
6811// BastionHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6812// long-running operation.
6813type BastionHostsCreateOrUpdateFuture struct {
6814	azure.FutureAPI
6815	// Result returns the result of the asynchronous operation.
6816	// If the operation has not completed it will return an error.
6817	Result func(BastionHostsClient) (BastionHost, error)
6818}
6819
6820// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6821func (future *BastionHostsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6822	var azFuture azure.Future
6823	if err := json.Unmarshal(body, &azFuture); err != nil {
6824		return err
6825	}
6826	future.FutureAPI = &azFuture
6827	future.Result = future.result
6828	return nil
6829}
6830
6831// result is the default implementation for BastionHostsCreateOrUpdateFuture.Result.
6832func (future *BastionHostsCreateOrUpdateFuture) result(client BastionHostsClient) (bh BastionHost, err error) {
6833	var done bool
6834	done, err = future.DoneWithContext(context.Background(), client)
6835	if err != nil {
6836		err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6837		return
6838	}
6839	if !done {
6840		bh.Response.Response = future.Response()
6841		err = azure.NewAsyncOpIncompleteError("network.BastionHostsCreateOrUpdateFuture")
6842		return
6843	}
6844	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6845	if bh.Response.Response, err = future.GetResult(sender); err == nil && bh.Response.Response.StatusCode != http.StatusNoContent {
6846		bh, err = client.CreateOrUpdateResponder(bh.Response.Response)
6847		if err != nil {
6848			err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", bh.Response.Response, "Failure responding to request")
6849		}
6850	}
6851	return
6852}
6853
6854// BastionHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
6855// operation.
6856type BastionHostsDeleteFuture struct {
6857	azure.FutureAPI
6858	// Result returns the result of the asynchronous operation.
6859	// If the operation has not completed it will return an error.
6860	Result func(BastionHostsClient) (autorest.Response, error)
6861}
6862
6863// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6864func (future *BastionHostsDeleteFuture) UnmarshalJSON(body []byte) error {
6865	var azFuture azure.Future
6866	if err := json.Unmarshal(body, &azFuture); err != nil {
6867		return err
6868	}
6869	future.FutureAPI = &azFuture
6870	future.Result = future.result
6871	return nil
6872}
6873
6874// result is the default implementation for BastionHostsDeleteFuture.Result.
6875func (future *BastionHostsDeleteFuture) result(client BastionHostsClient) (ar autorest.Response, err error) {
6876	var done bool
6877	done, err = future.DoneWithContext(context.Background(), client)
6878	if err != nil {
6879		err = autorest.NewErrorWithError(err, "network.BastionHostsDeleteFuture", "Result", future.Response(), "Polling failure")
6880		return
6881	}
6882	if !done {
6883		ar.Response = future.Response()
6884		err = azure.NewAsyncOpIncompleteError("network.BastionHostsDeleteFuture")
6885		return
6886	}
6887	ar.Response = future.Response()
6888	return
6889}
6890
6891// BastionSessionDeleteResult response for DisconnectActiveSessions.
6892type BastionSessionDeleteResult struct {
6893	autorest.Response `json:"-"`
6894	// Value - List of sessions with their corresponding state.
6895	Value *[]BastionSessionState `json:"value,omitempty"`
6896	// NextLink - The URL to get the next set of results.
6897	NextLink *string `json:"nextLink,omitempty"`
6898}
6899
6900// BastionSessionDeleteResultIterator provides access to a complete listing of BastionSessionState values.
6901type BastionSessionDeleteResultIterator struct {
6902	i    int
6903	page BastionSessionDeleteResultPage
6904}
6905
6906// NextWithContext advances to the next value.  If there was an error making
6907// the request the iterator does not advance and the error is returned.
6908func (iter *BastionSessionDeleteResultIterator) NextWithContext(ctx context.Context) (err error) {
6909	if tracing.IsEnabled() {
6910		ctx = tracing.StartSpan(ctx, fqdn+"/BastionSessionDeleteResultIterator.NextWithContext")
6911		defer func() {
6912			sc := -1
6913			if iter.Response().Response.Response != nil {
6914				sc = iter.Response().Response.Response.StatusCode
6915			}
6916			tracing.EndSpan(ctx, sc, err)
6917		}()
6918	}
6919	iter.i++
6920	if iter.i < len(iter.page.Values()) {
6921		return nil
6922	}
6923	err = iter.page.NextWithContext(ctx)
6924	if err != nil {
6925		iter.i--
6926		return err
6927	}
6928	iter.i = 0
6929	return nil
6930}
6931
6932// Next advances to the next value.  If there was an error making
6933// the request the iterator does not advance and the error is returned.
6934// Deprecated: Use NextWithContext() instead.
6935func (iter *BastionSessionDeleteResultIterator) Next() error {
6936	return iter.NextWithContext(context.Background())
6937}
6938
6939// NotDone returns true if the enumeration should be started or is not yet complete.
6940func (iter BastionSessionDeleteResultIterator) NotDone() bool {
6941	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6942}
6943
6944// Response returns the raw server response from the last page request.
6945func (iter BastionSessionDeleteResultIterator) Response() BastionSessionDeleteResult {
6946	return iter.page.Response()
6947}
6948
6949// Value returns the current value or a zero-initialized value if the
6950// iterator has advanced beyond the end of the collection.
6951func (iter BastionSessionDeleteResultIterator) Value() BastionSessionState {
6952	if !iter.page.NotDone() {
6953		return BastionSessionState{}
6954	}
6955	return iter.page.Values()[iter.i]
6956}
6957
6958// Creates a new instance of the BastionSessionDeleteResultIterator type.
6959func NewBastionSessionDeleteResultIterator(page BastionSessionDeleteResultPage) BastionSessionDeleteResultIterator {
6960	return BastionSessionDeleteResultIterator{page: page}
6961}
6962
6963// IsEmpty returns true if the ListResult contains no values.
6964func (bsdr BastionSessionDeleteResult) IsEmpty() bool {
6965	return bsdr.Value == nil || len(*bsdr.Value) == 0
6966}
6967
6968// hasNextLink returns true if the NextLink is not empty.
6969func (bsdr BastionSessionDeleteResult) hasNextLink() bool {
6970	return bsdr.NextLink != nil && len(*bsdr.NextLink) != 0
6971}
6972
6973// bastionSessionDeleteResultPreparer prepares a request to retrieve the next set of results.
6974// It returns nil if no more results exist.
6975func (bsdr BastionSessionDeleteResult) bastionSessionDeleteResultPreparer(ctx context.Context) (*http.Request, error) {
6976	if !bsdr.hasNextLink() {
6977		return nil, nil
6978	}
6979	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6980		autorest.AsJSON(),
6981		autorest.AsGet(),
6982		autorest.WithBaseURL(to.String(bsdr.NextLink)))
6983}
6984
6985// BastionSessionDeleteResultPage contains a page of BastionSessionState values.
6986type BastionSessionDeleteResultPage struct {
6987	fn   func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error)
6988	bsdr BastionSessionDeleteResult
6989}
6990
6991// NextWithContext advances to the next page of values.  If there was an error making
6992// the request the page does not advance and the error is returned.
6993func (page *BastionSessionDeleteResultPage) NextWithContext(ctx context.Context) (err error) {
6994	if tracing.IsEnabled() {
6995		ctx = tracing.StartSpan(ctx, fqdn+"/BastionSessionDeleteResultPage.NextWithContext")
6996		defer func() {
6997			sc := -1
6998			if page.Response().Response.Response != nil {
6999				sc = page.Response().Response.Response.StatusCode
7000			}
7001			tracing.EndSpan(ctx, sc, err)
7002		}()
7003	}
7004	for {
7005		next, err := page.fn(ctx, page.bsdr)
7006		if err != nil {
7007			return err
7008		}
7009		page.bsdr = next
7010		if !next.hasNextLink() || !next.IsEmpty() {
7011			break
7012		}
7013	}
7014	return nil
7015}
7016
7017// Next advances to the next page of values.  If there was an error making
7018// the request the page does not advance and the error is returned.
7019// Deprecated: Use NextWithContext() instead.
7020func (page *BastionSessionDeleteResultPage) Next() error {
7021	return page.NextWithContext(context.Background())
7022}
7023
7024// NotDone returns true if the page enumeration should be started or is not yet complete.
7025func (page BastionSessionDeleteResultPage) NotDone() bool {
7026	return !page.bsdr.IsEmpty()
7027}
7028
7029// Response returns the raw server response from the last page request.
7030func (page BastionSessionDeleteResultPage) Response() BastionSessionDeleteResult {
7031	return page.bsdr
7032}
7033
7034// Values returns the slice of values for the current page or nil if there are no values.
7035func (page BastionSessionDeleteResultPage) Values() []BastionSessionState {
7036	if page.bsdr.IsEmpty() {
7037		return nil
7038	}
7039	return *page.bsdr.Value
7040}
7041
7042// Creates a new instance of the BastionSessionDeleteResultPage type.
7043func NewBastionSessionDeleteResultPage(cur BastionSessionDeleteResult, getNextPage func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error)) BastionSessionDeleteResultPage {
7044	return BastionSessionDeleteResultPage{
7045		fn:   getNextPage,
7046		bsdr: cur,
7047	}
7048}
7049
7050// BastionSessionState the session state detail for a target.
7051type BastionSessionState struct {
7052	// SessionID - READ-ONLY; A unique id for the session.
7053	SessionID *string `json:"sessionId,omitempty"`
7054	// Message - READ-ONLY; Used for extra information.
7055	Message *string `json:"message,omitempty"`
7056	// State - READ-ONLY; The state of the session. Disconnected/Failed/NotFound.
7057	State *string `json:"state,omitempty"`
7058}
7059
7060// MarshalJSON is the custom marshaler for BastionSessionState.
7061func (bss BastionSessionState) MarshalJSON() ([]byte, error) {
7062	objectMap := make(map[string]interface{})
7063	return json.Marshal(objectMap)
7064}
7065
7066// BastionShareableLink bastion Shareable Link.
7067type BastionShareableLink struct {
7068	// VM - Reference of the virtual machine resource.
7069	VM *VM `json:"vm,omitempty"`
7070	// Bsl - READ-ONLY; The unique Bastion Shareable Link to the virtual machine.
7071	Bsl *string `json:"bsl,omitempty"`
7072	// CreatedAt - READ-ONLY; The time when the link was created.
7073	CreatedAt *string `json:"createdAt,omitempty"`
7074	// Message - READ-ONLY; Optional field indicating the warning or error message related to the vm in case of partial failure.
7075	Message *string `json:"message,omitempty"`
7076}
7077
7078// MarshalJSON is the custom marshaler for BastionShareableLink.
7079func (bsl BastionShareableLink) MarshalJSON() ([]byte, error) {
7080	objectMap := make(map[string]interface{})
7081	if bsl.VM != nil {
7082		objectMap["vm"] = bsl.VM
7083	}
7084	return json.Marshal(objectMap)
7085}
7086
7087// BastionShareableLinkListRequest post request for all the Bastion Shareable Link endpoints.
7088type BastionShareableLinkListRequest struct {
7089	// Vms - List of VM references.
7090	Vms *[]BastionShareableLink `json:"vms,omitempty"`
7091}
7092
7093// BastionShareableLinkListResult response for all the Bastion Shareable Link endpoints.
7094type BastionShareableLinkListResult struct {
7095	autorest.Response `json:"-"`
7096	// Value - List of Bastion Shareable Links for the request.
7097	Value *[]BastionShareableLink `json:"value,omitempty"`
7098	// NextLink - The URL to get the next set of results.
7099	NextLink *string `json:"nextLink,omitempty"`
7100}
7101
7102// BastionShareableLinkListResultIterator provides access to a complete listing of BastionShareableLink
7103// values.
7104type BastionShareableLinkListResultIterator struct {
7105	i    int
7106	page BastionShareableLinkListResultPage
7107}
7108
7109// NextWithContext advances to the next value.  If there was an error making
7110// the request the iterator does not advance and the error is returned.
7111func (iter *BastionShareableLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
7112	if tracing.IsEnabled() {
7113		ctx = tracing.StartSpan(ctx, fqdn+"/BastionShareableLinkListResultIterator.NextWithContext")
7114		defer func() {
7115			sc := -1
7116			if iter.Response().Response.Response != nil {
7117				sc = iter.Response().Response.Response.StatusCode
7118			}
7119			tracing.EndSpan(ctx, sc, err)
7120		}()
7121	}
7122	iter.i++
7123	if iter.i < len(iter.page.Values()) {
7124		return nil
7125	}
7126	err = iter.page.NextWithContext(ctx)
7127	if err != nil {
7128		iter.i--
7129		return err
7130	}
7131	iter.i = 0
7132	return nil
7133}
7134
7135// Next advances to the next value.  If there was an error making
7136// the request the iterator does not advance and the error is returned.
7137// Deprecated: Use NextWithContext() instead.
7138func (iter *BastionShareableLinkListResultIterator) Next() error {
7139	return iter.NextWithContext(context.Background())
7140}
7141
7142// NotDone returns true if the enumeration should be started or is not yet complete.
7143func (iter BastionShareableLinkListResultIterator) NotDone() bool {
7144	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7145}
7146
7147// Response returns the raw server response from the last page request.
7148func (iter BastionShareableLinkListResultIterator) Response() BastionShareableLinkListResult {
7149	return iter.page.Response()
7150}
7151
7152// Value returns the current value or a zero-initialized value if the
7153// iterator has advanced beyond the end of the collection.
7154func (iter BastionShareableLinkListResultIterator) Value() BastionShareableLink {
7155	if !iter.page.NotDone() {
7156		return BastionShareableLink{}
7157	}
7158	return iter.page.Values()[iter.i]
7159}
7160
7161// Creates a new instance of the BastionShareableLinkListResultIterator type.
7162func NewBastionShareableLinkListResultIterator(page BastionShareableLinkListResultPage) BastionShareableLinkListResultIterator {
7163	return BastionShareableLinkListResultIterator{page: page}
7164}
7165
7166// IsEmpty returns true if the ListResult contains no values.
7167func (bsllr BastionShareableLinkListResult) IsEmpty() bool {
7168	return bsllr.Value == nil || len(*bsllr.Value) == 0
7169}
7170
7171// hasNextLink returns true if the NextLink is not empty.
7172func (bsllr BastionShareableLinkListResult) hasNextLink() bool {
7173	return bsllr.NextLink != nil && len(*bsllr.NextLink) != 0
7174}
7175
7176// bastionShareableLinkListResultPreparer prepares a request to retrieve the next set of results.
7177// It returns nil if no more results exist.
7178func (bsllr BastionShareableLinkListResult) bastionShareableLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
7179	if !bsllr.hasNextLink() {
7180		return nil, nil
7181	}
7182	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7183		autorest.AsJSON(),
7184		autorest.AsGet(),
7185		autorest.WithBaseURL(to.String(bsllr.NextLink)))
7186}
7187
7188// BastionShareableLinkListResultPage contains a page of BastionShareableLink values.
7189type BastionShareableLinkListResultPage struct {
7190	fn    func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error)
7191	bsllr BastionShareableLinkListResult
7192}
7193
7194// NextWithContext advances to the next page of values.  If there was an error making
7195// the request the page does not advance and the error is returned.
7196func (page *BastionShareableLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
7197	if tracing.IsEnabled() {
7198		ctx = tracing.StartSpan(ctx, fqdn+"/BastionShareableLinkListResultPage.NextWithContext")
7199		defer func() {
7200			sc := -1
7201			if page.Response().Response.Response != nil {
7202				sc = page.Response().Response.Response.StatusCode
7203			}
7204			tracing.EndSpan(ctx, sc, err)
7205		}()
7206	}
7207	for {
7208		next, err := page.fn(ctx, page.bsllr)
7209		if err != nil {
7210			return err
7211		}
7212		page.bsllr = next
7213		if !next.hasNextLink() || !next.IsEmpty() {
7214			break
7215		}
7216	}
7217	return nil
7218}
7219
7220// Next advances to the next page of values.  If there was an error making
7221// the request the page does not advance and the error is returned.
7222// Deprecated: Use NextWithContext() instead.
7223func (page *BastionShareableLinkListResultPage) Next() error {
7224	return page.NextWithContext(context.Background())
7225}
7226
7227// NotDone returns true if the page enumeration should be started or is not yet complete.
7228func (page BastionShareableLinkListResultPage) NotDone() bool {
7229	return !page.bsllr.IsEmpty()
7230}
7231
7232// Response returns the raw server response from the last page request.
7233func (page BastionShareableLinkListResultPage) Response() BastionShareableLinkListResult {
7234	return page.bsllr
7235}
7236
7237// Values returns the slice of values for the current page or nil if there are no values.
7238func (page BastionShareableLinkListResultPage) Values() []BastionShareableLink {
7239	if page.bsllr.IsEmpty() {
7240		return nil
7241	}
7242	return *page.bsllr.Value
7243}
7244
7245// Creates a new instance of the BastionShareableLinkListResultPage type.
7246func NewBastionShareableLinkListResultPage(cur BastionShareableLinkListResult, getNextPage func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error)) BastionShareableLinkListResultPage {
7247	return BastionShareableLinkListResultPage{
7248		fn:    getNextPage,
7249		bsllr: cur,
7250	}
7251}
7252
7253// BGPCommunity contains bgp community information offered in Service Community resources.
7254type BGPCommunity struct {
7255	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
7256	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
7257	// CommunityName - The name of the bgp community. e.g. Skype.
7258	CommunityName *string `json:"communityName,omitempty"`
7259	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
7260	CommunityValue *string `json:"communityValue,omitempty"`
7261	// CommunityPrefixes - The prefixes that the bgp community contains.
7262	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
7263	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
7264	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
7265	// ServiceGroup - The service group of the bgp community contains.
7266	ServiceGroup *string `json:"serviceGroup,omitempty"`
7267}
7268
7269// BgpPeerStatus BGP peer status details.
7270type BgpPeerStatus struct {
7271	// LocalAddress - READ-ONLY; The virtual network gateway's local address.
7272	LocalAddress *string `json:"localAddress,omitempty"`
7273	// Neighbor - READ-ONLY; The remote BGP peer.
7274	Neighbor *string `json:"neighbor,omitempty"`
7275	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer.
7276	Asn *int32 `json:"asn,omitempty"`
7277	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
7278	State BgpPeerState `json:"state,omitempty"`
7279	// ConnectedDuration - READ-ONLY; For how long the peering has been up.
7280	ConnectedDuration *string `json:"connectedDuration,omitempty"`
7281	// RoutesReceived - READ-ONLY; The number of routes learned from this peer.
7282	RoutesReceived *int64 `json:"routesReceived,omitempty"`
7283	// MessagesSent - READ-ONLY; The number of BGP messages sent.
7284	MessagesSent *int64 `json:"messagesSent,omitempty"`
7285	// MessagesReceived - READ-ONLY; The number of BGP messages received.
7286	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
7287}
7288
7289// MarshalJSON is the custom marshaler for BgpPeerStatus.
7290func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) {
7291	objectMap := make(map[string]interface{})
7292	return json.Marshal(objectMap)
7293}
7294
7295// BgpPeerStatusListResult response for list BGP peer status API service call.
7296type BgpPeerStatusListResult struct {
7297	autorest.Response `json:"-"`
7298	// Value - List of BGP peers.
7299	Value *[]BgpPeerStatus `json:"value,omitempty"`
7300}
7301
7302// BgpServiceCommunity service Community Properties.
7303type BgpServiceCommunity struct {
7304	// BgpServiceCommunityPropertiesFormat - Properties of the BGP service community.
7305	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
7306	// ID - Resource ID.
7307	ID *string `json:"id,omitempty"`
7308	// Name - READ-ONLY; Resource name.
7309	Name *string `json:"name,omitempty"`
7310	// Type - READ-ONLY; Resource type.
7311	Type *string `json:"type,omitempty"`
7312	// Location - Resource location.
7313	Location *string `json:"location,omitempty"`
7314	// Tags - Resource tags.
7315	Tags map[string]*string `json:"tags"`
7316}
7317
7318// MarshalJSON is the custom marshaler for BgpServiceCommunity.
7319func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
7320	objectMap := make(map[string]interface{})
7321	if bsc.BgpServiceCommunityPropertiesFormat != nil {
7322		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
7323	}
7324	if bsc.ID != nil {
7325		objectMap["id"] = bsc.ID
7326	}
7327	if bsc.Location != nil {
7328		objectMap["location"] = bsc.Location
7329	}
7330	if bsc.Tags != nil {
7331		objectMap["tags"] = bsc.Tags
7332	}
7333	return json.Marshal(objectMap)
7334}
7335
7336// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
7337func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
7338	var m map[string]*json.RawMessage
7339	err := json.Unmarshal(body, &m)
7340	if err != nil {
7341		return err
7342	}
7343	for k, v := range m {
7344		switch k {
7345		case "properties":
7346			if v != nil {
7347				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
7348				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
7349				if err != nil {
7350					return err
7351				}
7352				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
7353			}
7354		case "id":
7355			if v != nil {
7356				var ID string
7357				err = json.Unmarshal(*v, &ID)
7358				if err != nil {
7359					return err
7360				}
7361				bsc.ID = &ID
7362			}
7363		case "name":
7364			if v != nil {
7365				var name string
7366				err = json.Unmarshal(*v, &name)
7367				if err != nil {
7368					return err
7369				}
7370				bsc.Name = &name
7371			}
7372		case "type":
7373			if v != nil {
7374				var typeVar string
7375				err = json.Unmarshal(*v, &typeVar)
7376				if err != nil {
7377					return err
7378				}
7379				bsc.Type = &typeVar
7380			}
7381		case "location":
7382			if v != nil {
7383				var location string
7384				err = json.Unmarshal(*v, &location)
7385				if err != nil {
7386					return err
7387				}
7388				bsc.Location = &location
7389			}
7390		case "tags":
7391			if v != nil {
7392				var tags map[string]*string
7393				err = json.Unmarshal(*v, &tags)
7394				if err != nil {
7395					return err
7396				}
7397				bsc.Tags = tags
7398			}
7399		}
7400	}
7401
7402	return nil
7403}
7404
7405// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
7406type BgpServiceCommunityListResult struct {
7407	autorest.Response `json:"-"`
7408	// Value - A list of service community resources.
7409	Value *[]BgpServiceCommunity `json:"value,omitempty"`
7410	// NextLink - The URL to get the next set of results.
7411	NextLink *string `json:"nextLink,omitempty"`
7412}
7413
7414// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
7415// values.
7416type BgpServiceCommunityListResultIterator struct {
7417	i    int
7418	page BgpServiceCommunityListResultPage
7419}
7420
7421// NextWithContext advances to the next value.  If there was an error making
7422// the request the iterator does not advance and the error is returned.
7423func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
7424	if tracing.IsEnabled() {
7425		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
7426		defer func() {
7427			sc := -1
7428			if iter.Response().Response.Response != nil {
7429				sc = iter.Response().Response.Response.StatusCode
7430			}
7431			tracing.EndSpan(ctx, sc, err)
7432		}()
7433	}
7434	iter.i++
7435	if iter.i < len(iter.page.Values()) {
7436		return nil
7437	}
7438	err = iter.page.NextWithContext(ctx)
7439	if err != nil {
7440		iter.i--
7441		return err
7442	}
7443	iter.i = 0
7444	return nil
7445}
7446
7447// Next advances to the next value.  If there was an error making
7448// the request the iterator does not advance and the error is returned.
7449// Deprecated: Use NextWithContext() instead.
7450func (iter *BgpServiceCommunityListResultIterator) Next() error {
7451	return iter.NextWithContext(context.Background())
7452}
7453
7454// NotDone returns true if the enumeration should be started or is not yet complete.
7455func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
7456	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7457}
7458
7459// Response returns the raw server response from the last page request.
7460func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
7461	return iter.page.Response()
7462}
7463
7464// Value returns the current value or a zero-initialized value if the
7465// iterator has advanced beyond the end of the collection.
7466func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
7467	if !iter.page.NotDone() {
7468		return BgpServiceCommunity{}
7469	}
7470	return iter.page.Values()[iter.i]
7471}
7472
7473// Creates a new instance of the BgpServiceCommunityListResultIterator type.
7474func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
7475	return BgpServiceCommunityListResultIterator{page: page}
7476}
7477
7478// IsEmpty returns true if the ListResult contains no values.
7479func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
7480	return bsclr.Value == nil || len(*bsclr.Value) == 0
7481}
7482
7483// hasNextLink returns true if the NextLink is not empty.
7484func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
7485	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
7486}
7487
7488// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
7489// It returns nil if no more results exist.
7490func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
7491	if !bsclr.hasNextLink() {
7492		return nil, nil
7493	}
7494	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7495		autorest.AsJSON(),
7496		autorest.AsGet(),
7497		autorest.WithBaseURL(to.String(bsclr.NextLink)))
7498}
7499
7500// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
7501type BgpServiceCommunityListResultPage struct {
7502	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
7503	bsclr BgpServiceCommunityListResult
7504}
7505
7506// NextWithContext advances to the next page of values.  If there was an error making
7507// the request the page does not advance and the error is returned.
7508func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
7509	if tracing.IsEnabled() {
7510		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
7511		defer func() {
7512			sc := -1
7513			if page.Response().Response.Response != nil {
7514				sc = page.Response().Response.Response.StatusCode
7515			}
7516			tracing.EndSpan(ctx, sc, err)
7517		}()
7518	}
7519	for {
7520		next, err := page.fn(ctx, page.bsclr)
7521		if err != nil {
7522			return err
7523		}
7524		page.bsclr = next
7525		if !next.hasNextLink() || !next.IsEmpty() {
7526			break
7527		}
7528	}
7529	return nil
7530}
7531
7532// Next advances to the next page of values.  If there was an error making
7533// the request the page does not advance and the error is returned.
7534// Deprecated: Use NextWithContext() instead.
7535func (page *BgpServiceCommunityListResultPage) Next() error {
7536	return page.NextWithContext(context.Background())
7537}
7538
7539// NotDone returns true if the page enumeration should be started or is not yet complete.
7540func (page BgpServiceCommunityListResultPage) NotDone() bool {
7541	return !page.bsclr.IsEmpty()
7542}
7543
7544// Response returns the raw server response from the last page request.
7545func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
7546	return page.bsclr
7547}
7548
7549// Values returns the slice of values for the current page or nil if there are no values.
7550func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
7551	if page.bsclr.IsEmpty() {
7552		return nil
7553	}
7554	return *page.bsclr.Value
7555}
7556
7557// Creates a new instance of the BgpServiceCommunityListResultPage type.
7558func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
7559	return BgpServiceCommunityListResultPage{
7560		fn:    getNextPage,
7561		bsclr: cur,
7562	}
7563}
7564
7565// BgpServiceCommunityPropertiesFormat properties of Service Community.
7566type BgpServiceCommunityPropertiesFormat struct {
7567	// ServiceName - The name of the bgp community. e.g. Skype.
7568	ServiceName *string `json:"serviceName,omitempty"`
7569	// BgpCommunities - A list of bgp communities.
7570	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
7571}
7572
7573// BgpSettings BGP settings details.
7574type BgpSettings struct {
7575	// Asn - The BGP speaker's ASN.
7576	Asn *int64 `json:"asn,omitempty"`
7577	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
7578	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
7579	// PeerWeight - The weight added to routes learned from this BGP speaker.
7580	PeerWeight *int32 `json:"peerWeight,omitempty"`
7581	// BgpPeeringAddresses - BGP peering address with IP configuration ID for virtual network gateway.
7582	BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"`
7583}
7584
7585// CheckPrivateLinkServiceVisibilityRequest request body of the CheckPrivateLinkServiceVisibility API
7586// service call.
7587type CheckPrivateLinkServiceVisibilityRequest struct {
7588	// PrivateLinkServiceAlias - The alias of the private link service.
7589	PrivateLinkServiceAlias *string `json:"privateLinkServiceAlias,omitempty"`
7590}
7591
7592// CloudError an error response from the service.
7593type CloudError struct {
7594	// Error - Cloud error body.
7595	Error *CloudErrorBody `json:"error,omitempty"`
7596}
7597
7598// CloudErrorBody an error response from the service.
7599type CloudErrorBody struct {
7600	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
7601	Code *string `json:"code,omitempty"`
7602	// Message - A message describing the error, intended to be suitable for display in a user interface.
7603	Message *string `json:"message,omitempty"`
7604	// Target - The target of the particular error. For example, the name of the property in error.
7605	Target *string `json:"target,omitempty"`
7606	// Details - A list of additional details about the error.
7607	Details *[]CloudErrorBody `json:"details,omitempty"`
7608}
7609
7610// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
7611type ConfigurationDiagnosticParameters struct {
7612	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
7613	TargetResourceID *string `json:"targetResourceId,omitempty"`
7614	// VerbosityLevel - Verbosity level. Possible values include: 'Normal', 'Minimum', 'Full'
7615	VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"`
7616	// Profiles - List of network configuration diagnostic profiles.
7617	Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"`
7618}
7619
7620// ConfigurationDiagnosticProfile parameters to compare with network configuration.
7621type ConfigurationDiagnosticProfile struct {
7622	// Direction - The direction of the traffic. Possible values include: 'Inbound', 'Outbound'
7623	Direction Direction `json:"direction,omitempty"`
7624	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
7625	Protocol *string `json:"protocol,omitempty"`
7626	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
7627	Source *string `json:"source,omitempty"`
7628	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
7629	Destination *string `json:"destination,omitempty"`
7630	// DestinationPort - Traffic destination port. Accepted values are '*' and a single port in the range (0 - 65535).
7631	DestinationPort *string `json:"destinationPort,omitempty"`
7632}
7633
7634// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
7635type ConfigurationDiagnosticResponse struct {
7636	autorest.Response `json:"-"`
7637	// Results - READ-ONLY; List of network configuration diagnostic results.
7638	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
7639}
7640
7641// MarshalJSON is the custom marshaler for ConfigurationDiagnosticResponse.
7642func (cdr ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) {
7643	objectMap := make(map[string]interface{})
7644	return json.Marshal(objectMap)
7645}
7646
7647// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
7648// query.
7649type ConfigurationDiagnosticResult struct {
7650	// Profile - Network configuration diagnostic profile.
7651	Profile *ConfigurationDiagnosticProfile `json:"profile,omitempty"`
7652	// NetworkSecurityGroupResult - Network security group result.
7653	NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"`
7654}
7655
7656// ConnectionMonitor parameters that define the operation to create a connection monitor.
7657type ConnectionMonitor struct {
7658	// Location - Connection monitor location.
7659	Location *string `json:"location,omitempty"`
7660	// Tags - Connection monitor tags.
7661	Tags map[string]*string `json:"tags"`
7662	// ConnectionMonitorParameters - Properties of the connection monitor.
7663	*ConnectionMonitorParameters `json:"properties,omitempty"`
7664}
7665
7666// MarshalJSON is the custom marshaler for ConnectionMonitor.
7667func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
7668	objectMap := make(map[string]interface{})
7669	if cm.Location != nil {
7670		objectMap["location"] = cm.Location
7671	}
7672	if cm.Tags != nil {
7673		objectMap["tags"] = cm.Tags
7674	}
7675	if cm.ConnectionMonitorParameters != nil {
7676		objectMap["properties"] = cm.ConnectionMonitorParameters
7677	}
7678	return json.Marshal(objectMap)
7679}
7680
7681// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
7682func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
7683	var m map[string]*json.RawMessage
7684	err := json.Unmarshal(body, &m)
7685	if err != nil {
7686		return err
7687	}
7688	for k, v := range m {
7689		switch k {
7690		case "location":
7691			if v != nil {
7692				var location string
7693				err = json.Unmarshal(*v, &location)
7694				if err != nil {
7695					return err
7696				}
7697				cm.Location = &location
7698			}
7699		case "tags":
7700			if v != nil {
7701				var tags map[string]*string
7702				err = json.Unmarshal(*v, &tags)
7703				if err != nil {
7704					return err
7705				}
7706				cm.Tags = tags
7707			}
7708		case "properties":
7709			if v != nil {
7710				var connectionMonitorParameters ConnectionMonitorParameters
7711				err = json.Unmarshal(*v, &connectionMonitorParameters)
7712				if err != nil {
7713					return err
7714				}
7715				cm.ConnectionMonitorParameters = &connectionMonitorParameters
7716			}
7717		}
7718	}
7719
7720	return nil
7721}
7722
7723// ConnectionMonitorDestination describes the destination of connection monitor.
7724type ConnectionMonitorDestination struct {
7725	// ResourceID - The ID of the resource used as the destination by connection monitor.
7726	ResourceID *string `json:"resourceId,omitempty"`
7727	// Address - Address of the connection monitor destination (IP or domain name).
7728	Address *string `json:"address,omitempty"`
7729	// Port - The destination port used by connection monitor.
7730	Port *int32 `json:"port,omitempty"`
7731}
7732
7733// ConnectionMonitorEndpoint describes the connection monitor endpoint.
7734type ConnectionMonitorEndpoint struct {
7735	// Name - The name of the connection monitor endpoint.
7736	Name *string `json:"name,omitempty"`
7737	// ResourceID - Resource ID of the connection monitor endpoint.
7738	ResourceID *string `json:"resourceId,omitempty"`
7739	// Address - Address of the connection monitor endpoint (IP or domain name).
7740	Address *string `json:"address,omitempty"`
7741	// Filter - Filter for sub-items within the endpoint.
7742	Filter *ConnectionMonitorEndpointFilter `json:"filter,omitempty"`
7743}
7744
7745// ConnectionMonitorEndpointFilter describes the connection monitor endpoint filter.
7746type ConnectionMonitorEndpointFilter struct {
7747	// Type - The behavior of the endpoint filter. Currently only 'Include' is supported. Possible values include: 'Include'
7748	Type ConnectionMonitorEndpointFilterType `json:"type,omitempty"`
7749	// Items - List of items in the filter.
7750	Items *[]ConnectionMonitorEndpointFilterItem `json:"items,omitempty"`
7751}
7752
7753// ConnectionMonitorEndpointFilterItem describes the connection monitor endpoint filter item.
7754type ConnectionMonitorEndpointFilterItem struct {
7755	// Type - The type of item included in the filter. Currently only 'AgentAddress' is supported. Possible values include: 'AgentAddress'
7756	Type ConnectionMonitorEndpointFilterItemType `json:"type,omitempty"`
7757	// Address - The address of the filter item.
7758	Address *string `json:"address,omitempty"`
7759}
7760
7761// ConnectionMonitorHTTPConfiguration describes the HTTP configuration.
7762type ConnectionMonitorHTTPConfiguration struct {
7763	// Port - The port to connect to.
7764	Port *int32 `json:"port,omitempty"`
7765	// Method - The HTTP method to use. Possible values include: 'Get', 'Post'
7766	Method HTTPConfigurationMethod `json:"method,omitempty"`
7767	// Path - The path component of the URI. For instance, "/dir1/dir2".
7768	Path *string `json:"path,omitempty"`
7769	// RequestHeaders - The HTTP headers to transmit with the request.
7770	RequestHeaders *[]HTTPHeader `json:"requestHeaders,omitempty"`
7771	// ValidStatusCodeRanges - HTTP status codes to consider successful. For instance, "2xx,301-304,418".
7772	ValidStatusCodeRanges *[]string `json:"validStatusCodeRanges,omitempty"`
7773	// PreferHTTPS - Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit.
7774	PreferHTTPS *bool `json:"preferHTTPS,omitempty"`
7775}
7776
7777// ConnectionMonitorIcmpConfiguration describes the ICMP configuration.
7778type ConnectionMonitorIcmpConfiguration struct {
7779	// DisableTraceRoute - Value indicating whether path evaluation with trace route should be disabled.
7780	DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"`
7781}
7782
7783// ConnectionMonitorListResult list of connection monitors.
7784type ConnectionMonitorListResult struct {
7785	autorest.Response `json:"-"`
7786	// Value - Information about connection monitors.
7787	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
7788}
7789
7790// ConnectionMonitorOutput describes a connection monitor output destination.
7791type ConnectionMonitorOutput struct {
7792	// Type - Connection monitor output destination type. Currently, only "Workspace" is supported. Possible values include: 'Workspace'
7793	Type OutputType `json:"type,omitempty"`
7794	// WorkspaceSettings - Describes the settings for producing output into a log analytics workspace.
7795	WorkspaceSettings *ConnectionMonitorWorkspaceSettings `json:"workspaceSettings,omitempty"`
7796}
7797
7798// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
7799type ConnectionMonitorParameters struct {
7800	// Source - Describes the source of connection monitor.
7801	Source *ConnectionMonitorSource `json:"source,omitempty"`
7802	// Destination - Describes the destination of connection monitor.
7803	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
7804	// AutoStart - Determines if the connection monitor will start automatically once created.
7805	AutoStart *bool `json:"autoStart,omitempty"`
7806	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
7807	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
7808	// Endpoints - List of connection monitor endpoints.
7809	Endpoints *[]ConnectionMonitorEndpoint `json:"endpoints,omitempty"`
7810	// TestConfigurations - List of connection monitor test configurations.
7811	TestConfigurations *[]ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"`
7812	// TestGroups - List of connection monitor test groups.
7813	TestGroups *[]ConnectionMonitorTestGroup `json:"testGroups,omitempty"`
7814	// Outputs - List of connection monitor outputs.
7815	Outputs *[]ConnectionMonitorOutput `json:"outputs,omitempty"`
7816	// Notes - Optional notes to be associated with the connection monitor.
7817	Notes *string `json:"notes,omitempty"`
7818}
7819
7820// ConnectionMonitorQueryResult list of connection states snapshots.
7821type ConnectionMonitorQueryResult struct {
7822	autorest.Response `json:"-"`
7823	// SourceStatus - Status of connection monitor source. Possible values include: 'ConnectionMonitorSourceStatusUnknown', 'ConnectionMonitorSourceStatusActive', 'ConnectionMonitorSourceStatusInactive'
7824	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
7825	// States - Information about connection states.
7826	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
7827}
7828
7829// ConnectionMonitorResult information about the connection monitor.
7830type ConnectionMonitorResult struct {
7831	autorest.Response `json:"-"`
7832	// Name - READ-ONLY; Name of the connection monitor.
7833	Name *string `json:"name,omitempty"`
7834	// ID - READ-ONLY; ID of the connection monitor.
7835	ID *string `json:"id,omitempty"`
7836	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7837	Etag *string `json:"etag,omitempty"`
7838	// Type - READ-ONLY; Connection monitor type.
7839	Type *string `json:"type,omitempty"`
7840	// Location - Connection monitor location.
7841	Location *string `json:"location,omitempty"`
7842	// Tags - Connection monitor tags.
7843	Tags map[string]*string `json:"tags"`
7844	// ConnectionMonitorResultProperties - Properties of the connection monitor result.
7845	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
7846}
7847
7848// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
7849func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
7850	objectMap := make(map[string]interface{})
7851	if cmr.Location != nil {
7852		objectMap["location"] = cmr.Location
7853	}
7854	if cmr.Tags != nil {
7855		objectMap["tags"] = cmr.Tags
7856	}
7857	if cmr.ConnectionMonitorResultProperties != nil {
7858		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
7859	}
7860	return json.Marshal(objectMap)
7861}
7862
7863// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
7864func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
7865	var m map[string]*json.RawMessage
7866	err := json.Unmarshal(body, &m)
7867	if err != nil {
7868		return err
7869	}
7870	for k, v := range m {
7871		switch k {
7872		case "name":
7873			if v != nil {
7874				var name string
7875				err = json.Unmarshal(*v, &name)
7876				if err != nil {
7877					return err
7878				}
7879				cmr.Name = &name
7880			}
7881		case "id":
7882			if v != nil {
7883				var ID string
7884				err = json.Unmarshal(*v, &ID)
7885				if err != nil {
7886					return err
7887				}
7888				cmr.ID = &ID
7889			}
7890		case "etag":
7891			if v != nil {
7892				var etag string
7893				err = json.Unmarshal(*v, &etag)
7894				if err != nil {
7895					return err
7896				}
7897				cmr.Etag = &etag
7898			}
7899		case "type":
7900			if v != nil {
7901				var typeVar string
7902				err = json.Unmarshal(*v, &typeVar)
7903				if err != nil {
7904					return err
7905				}
7906				cmr.Type = &typeVar
7907			}
7908		case "location":
7909			if v != nil {
7910				var location string
7911				err = json.Unmarshal(*v, &location)
7912				if err != nil {
7913					return err
7914				}
7915				cmr.Location = &location
7916			}
7917		case "tags":
7918			if v != nil {
7919				var tags map[string]*string
7920				err = json.Unmarshal(*v, &tags)
7921				if err != nil {
7922					return err
7923				}
7924				cmr.Tags = tags
7925			}
7926		case "properties":
7927			if v != nil {
7928				var connectionMonitorResultProperties ConnectionMonitorResultProperties
7929				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
7930				if err != nil {
7931					return err
7932				}
7933				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
7934			}
7935		}
7936	}
7937
7938	return nil
7939}
7940
7941// ConnectionMonitorResultProperties describes the properties of a connection monitor.
7942type ConnectionMonitorResultProperties struct {
7943	// ProvisioningState - READ-ONLY; The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
7944	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
7945	// StartTime - READ-ONLY; The date and time when the connection monitor was started.
7946	StartTime *date.Time `json:"startTime,omitempty"`
7947	// MonitoringStatus - READ-ONLY; The monitoring status of the connection monitor.
7948	MonitoringStatus *string `json:"monitoringStatus,omitempty"`
7949	// ConnectionMonitorType - READ-ONLY; Type of connection monitor. Possible values include: 'MultiEndpoint', 'SingleSourceDestination'
7950	ConnectionMonitorType ConnectionMonitorType `json:"connectionMonitorType,omitempty"`
7951	// Source - Describes the source of connection monitor.
7952	Source *ConnectionMonitorSource `json:"source,omitempty"`
7953	// Destination - Describes the destination of connection monitor.
7954	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
7955	// AutoStart - Determines if the connection monitor will start automatically once created.
7956	AutoStart *bool `json:"autoStart,omitempty"`
7957	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
7958	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
7959	// Endpoints - List of connection monitor endpoints.
7960	Endpoints *[]ConnectionMonitorEndpoint `json:"endpoints,omitempty"`
7961	// TestConfigurations - List of connection monitor test configurations.
7962	TestConfigurations *[]ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"`
7963	// TestGroups - List of connection monitor test groups.
7964	TestGroups *[]ConnectionMonitorTestGroup `json:"testGroups,omitempty"`
7965	// Outputs - List of connection monitor outputs.
7966	Outputs *[]ConnectionMonitorOutput `json:"outputs,omitempty"`
7967	// Notes - Optional notes to be associated with the connection monitor.
7968	Notes *string `json:"notes,omitempty"`
7969}
7970
7971// MarshalJSON is the custom marshaler for ConnectionMonitorResultProperties.
7972func (cmrp ConnectionMonitorResultProperties) MarshalJSON() ([]byte, error) {
7973	objectMap := make(map[string]interface{})
7974	if cmrp.Source != nil {
7975		objectMap["source"] = cmrp.Source
7976	}
7977	if cmrp.Destination != nil {
7978		objectMap["destination"] = cmrp.Destination
7979	}
7980	if cmrp.AutoStart != nil {
7981		objectMap["autoStart"] = cmrp.AutoStart
7982	}
7983	if cmrp.MonitoringIntervalInSeconds != nil {
7984		objectMap["monitoringIntervalInSeconds"] = cmrp.MonitoringIntervalInSeconds
7985	}
7986	if cmrp.Endpoints != nil {
7987		objectMap["endpoints"] = cmrp.Endpoints
7988	}
7989	if cmrp.TestConfigurations != nil {
7990		objectMap["testConfigurations"] = cmrp.TestConfigurations
7991	}
7992	if cmrp.TestGroups != nil {
7993		objectMap["testGroups"] = cmrp.TestGroups
7994	}
7995	if cmrp.Outputs != nil {
7996		objectMap["outputs"] = cmrp.Outputs
7997	}
7998	if cmrp.Notes != nil {
7999		objectMap["notes"] = cmrp.Notes
8000	}
8001	return json.Marshal(objectMap)
8002}
8003
8004// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8005// long-running operation.
8006type ConnectionMonitorsCreateOrUpdateFuture struct {
8007	azure.FutureAPI
8008	// Result returns the result of the asynchronous operation.
8009	// If the operation has not completed it will return an error.
8010	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
8011}
8012
8013// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8014func (future *ConnectionMonitorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8015	var azFuture azure.Future
8016	if err := json.Unmarshal(body, &azFuture); err != nil {
8017		return err
8018	}
8019	future.FutureAPI = &azFuture
8020	future.Result = future.result
8021	return nil
8022}
8023
8024// result is the default implementation for ConnectionMonitorsCreateOrUpdateFuture.Result.
8025func (future *ConnectionMonitorsCreateOrUpdateFuture) result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
8026	var done bool
8027	done, err = future.DoneWithContext(context.Background(), client)
8028	if err != nil {
8029		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8030		return
8031	}
8032	if !done {
8033		cmr.Response.Response = future.Response()
8034		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
8035		return
8036	}
8037	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8038	if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
8039		cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
8040		if err != nil {
8041			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
8042		}
8043	}
8044	return
8045}
8046
8047// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
8048// long-running operation.
8049type ConnectionMonitorsDeleteFuture struct {
8050	azure.FutureAPI
8051	// Result returns the result of the asynchronous operation.
8052	// If the operation has not completed it will return an error.
8053	Result func(ConnectionMonitorsClient) (autorest.Response, error)
8054}
8055
8056// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8057func (future *ConnectionMonitorsDeleteFuture) UnmarshalJSON(body []byte) error {
8058	var azFuture azure.Future
8059	if err := json.Unmarshal(body, &azFuture); err != nil {
8060		return err
8061	}
8062	future.FutureAPI = &azFuture
8063	future.Result = future.result
8064	return nil
8065}
8066
8067// result is the default implementation for ConnectionMonitorsDeleteFuture.Result.
8068func (future *ConnectionMonitorsDeleteFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
8069	var done bool
8070	done, err = future.DoneWithContext(context.Background(), client)
8071	if err != nil {
8072		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
8073		return
8074	}
8075	if !done {
8076		ar.Response = future.Response()
8077		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
8078		return
8079	}
8080	ar.Response = future.Response()
8081	return
8082}
8083
8084// ConnectionMonitorSource describes the source of connection monitor.
8085type ConnectionMonitorSource struct {
8086	// ResourceID - The ID of the resource used as the source by connection monitor.
8087	ResourceID *string `json:"resourceId,omitempty"`
8088	// Port - The source port used by connection monitor.
8089	Port *int32 `json:"port,omitempty"`
8090}
8091
8092// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
8093// operation.
8094type ConnectionMonitorsQueryFuture struct {
8095	azure.FutureAPI
8096	// Result returns the result of the asynchronous operation.
8097	// If the operation has not completed it will return an error.
8098	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
8099}
8100
8101// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8102func (future *ConnectionMonitorsQueryFuture) UnmarshalJSON(body []byte) error {
8103	var azFuture azure.Future
8104	if err := json.Unmarshal(body, &azFuture); err != nil {
8105		return err
8106	}
8107	future.FutureAPI = &azFuture
8108	future.Result = future.result
8109	return nil
8110}
8111
8112// result is the default implementation for ConnectionMonitorsQueryFuture.Result.
8113func (future *ConnectionMonitorsQueryFuture) result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
8114	var done bool
8115	done, err = future.DoneWithContext(context.Background(), client)
8116	if err != nil {
8117		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
8118		return
8119	}
8120	if !done {
8121		cmqr.Response.Response = future.Response()
8122		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
8123		return
8124	}
8125	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8126	if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
8127		cmqr, err = client.QueryResponder(cmqr.Response.Response)
8128		if err != nil {
8129			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
8130		}
8131	}
8132	return
8133}
8134
8135// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
8136// operation.
8137type ConnectionMonitorsStartFuture struct {
8138	azure.FutureAPI
8139	// Result returns the result of the asynchronous operation.
8140	// If the operation has not completed it will return an error.
8141	Result func(ConnectionMonitorsClient) (autorest.Response, error)
8142}
8143
8144// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8145func (future *ConnectionMonitorsStartFuture) UnmarshalJSON(body []byte) error {
8146	var azFuture azure.Future
8147	if err := json.Unmarshal(body, &azFuture); err != nil {
8148		return err
8149	}
8150	future.FutureAPI = &azFuture
8151	future.Result = future.result
8152	return nil
8153}
8154
8155// result is the default implementation for ConnectionMonitorsStartFuture.Result.
8156func (future *ConnectionMonitorsStartFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
8157	var done bool
8158	done, err = future.DoneWithContext(context.Background(), client)
8159	if err != nil {
8160		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
8161		return
8162	}
8163	if !done {
8164		ar.Response = future.Response()
8165		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
8166		return
8167	}
8168	ar.Response = future.Response()
8169	return
8170}
8171
8172// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
8173// operation.
8174type ConnectionMonitorsStopFuture struct {
8175	azure.FutureAPI
8176	// Result returns the result of the asynchronous operation.
8177	// If the operation has not completed it will return an error.
8178	Result func(ConnectionMonitorsClient) (autorest.Response, error)
8179}
8180
8181// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8182func (future *ConnectionMonitorsStopFuture) UnmarshalJSON(body []byte) error {
8183	var azFuture azure.Future
8184	if err := json.Unmarshal(body, &azFuture); err != nil {
8185		return err
8186	}
8187	future.FutureAPI = &azFuture
8188	future.Result = future.result
8189	return nil
8190}
8191
8192// result is the default implementation for ConnectionMonitorsStopFuture.Result.
8193func (future *ConnectionMonitorsStopFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
8194	var done bool
8195	done, err = future.DoneWithContext(context.Background(), client)
8196	if err != nil {
8197		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
8198		return
8199	}
8200	if !done {
8201		ar.Response = future.Response()
8202		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
8203		return
8204	}
8205	ar.Response = future.Response()
8206	return
8207}
8208
8209// ConnectionMonitorSuccessThreshold describes the threshold for declaring a test successful.
8210type ConnectionMonitorSuccessThreshold struct {
8211	// ChecksFailedPercent - The maximum percentage of failed checks permitted for a test to evaluate as successful.
8212	ChecksFailedPercent *int32 `json:"checksFailedPercent,omitempty"`
8213	// RoundTripTimeMs - The maximum round-trip time in milliseconds permitted for a test to evaluate as successful.
8214	RoundTripTimeMs *int32 `json:"roundTripTimeMs,omitempty"`
8215}
8216
8217// ConnectionMonitorTCPConfiguration describes the TCP configuration.
8218type ConnectionMonitorTCPConfiguration struct {
8219	// Port - The port to connect to.
8220	Port *int32 `json:"port,omitempty"`
8221	// DisableTraceRoute - Value indicating whether path evaluation with trace route should be disabled.
8222	DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"`
8223}
8224
8225// ConnectionMonitorTestConfiguration describes a connection monitor test configuration.
8226type ConnectionMonitorTestConfiguration struct {
8227	// Name - The name of the connection monitor test configuration.
8228	Name *string `json:"name,omitempty"`
8229	// TestFrequencySec - The frequency of test evaluation, in seconds.
8230	TestFrequencySec *int32 `json:"testFrequencySec,omitempty"`
8231	// Protocol - The protocol to use in test evaluation. Possible values include: 'ConnectionMonitorTestConfigurationProtocolTCP', 'ConnectionMonitorTestConfigurationProtocolHTTP', 'ConnectionMonitorTestConfigurationProtocolIcmp'
8232	Protocol ConnectionMonitorTestConfigurationProtocol `json:"protocol,omitempty"`
8233	// 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'
8234	PreferredIPVersion PreferredIPVersion `json:"preferredIPVersion,omitempty"`
8235	// HTTPConfiguration - The parameters used to perform test evaluation over HTTP.
8236	HTTPConfiguration *ConnectionMonitorHTTPConfiguration `json:"httpConfiguration,omitempty"`
8237	// TCPConfiguration - The parameters used to perform test evaluation over TCP.
8238	TCPConfiguration *ConnectionMonitorTCPConfiguration `json:"tcpConfiguration,omitempty"`
8239	// IcmpConfiguration - The parameters used to perform test evaluation over ICMP.
8240	IcmpConfiguration *ConnectionMonitorIcmpConfiguration `json:"icmpConfiguration,omitempty"`
8241	// SuccessThreshold - The threshold for declaring a test successful.
8242	SuccessThreshold *ConnectionMonitorSuccessThreshold `json:"successThreshold,omitempty"`
8243}
8244
8245// ConnectionMonitorTestGroup describes the connection monitor test group.
8246type ConnectionMonitorTestGroup struct {
8247	// Name - The name of the connection monitor test group.
8248	Name *string `json:"name,omitempty"`
8249	// Disable - Value indicating whether test group is disabled.
8250	Disable *bool `json:"disable,omitempty"`
8251	// TestConfigurations - List of test configuration names.
8252	TestConfigurations *[]string `json:"testConfigurations,omitempty"`
8253	// Sources - List of source endpoint names.
8254	Sources *[]string `json:"sources,omitempty"`
8255	// Destinations - List of destination endpoint names.
8256	Destinations *[]string `json:"destinations,omitempty"`
8257}
8258
8259// ConnectionMonitorWorkspaceSettings describes the settings for producing output into a log analytics
8260// workspace.
8261type ConnectionMonitorWorkspaceSettings struct {
8262	// WorkspaceResourceID - Log analytics workspace resource ID.
8263	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
8264}
8265
8266// ConnectionResetSharedKey the virtual network connection reset shared key.
8267type ConnectionResetSharedKey struct {
8268	autorest.Response `json:"-"`
8269	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
8270	KeyLength *int32 `json:"keyLength,omitempty"`
8271}
8272
8273// ConnectionSharedKey response for GetConnectionSharedKey API service call.
8274type ConnectionSharedKey struct {
8275	autorest.Response `json:"-"`
8276	// Value - The virtual network connection shared key value.
8277	Value *string `json:"value,omitempty"`
8278	// ID - Resource ID.
8279	ID *string `json:"id,omitempty"`
8280}
8281
8282// ConnectionStateSnapshot connection state snapshot.
8283type ConnectionStateSnapshot struct {
8284	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
8285	ConnectionState ConnectionState `json:"connectionState,omitempty"`
8286	// StartTime - The start time of the connection snapshot.
8287	StartTime *date.Time `json:"startTime,omitempty"`
8288	// EndTime - The end time of the connection snapshot.
8289	EndTime *date.Time `json:"endTime,omitempty"`
8290	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
8291	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
8292	// AvgLatencyInMs - Average latency in ms.
8293	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
8294	// MinLatencyInMs - Minimum latency in ms.
8295	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
8296	// MaxLatencyInMs - Maximum latency in ms.
8297	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
8298	// ProbesSent - The number of sent probes.
8299	ProbesSent *int32 `json:"probesSent,omitempty"`
8300	// ProbesFailed - The number of failed probes.
8301	ProbesFailed *int32 `json:"probesFailed,omitempty"`
8302	// Hops - READ-ONLY; List of hops between the source and the destination.
8303	Hops *[]ConnectivityHop `json:"hops,omitempty"`
8304}
8305
8306// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
8307func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
8308	objectMap := make(map[string]interface{})
8309	if CSS.ConnectionState != "" {
8310		objectMap["connectionState"] = CSS.ConnectionState
8311	}
8312	if CSS.StartTime != nil {
8313		objectMap["startTime"] = CSS.StartTime
8314	}
8315	if CSS.EndTime != nil {
8316		objectMap["endTime"] = CSS.EndTime
8317	}
8318	if CSS.EvaluationState != "" {
8319		objectMap["evaluationState"] = CSS.EvaluationState
8320	}
8321	if CSS.AvgLatencyInMs != nil {
8322		objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
8323	}
8324	if CSS.MinLatencyInMs != nil {
8325		objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
8326	}
8327	if CSS.MaxLatencyInMs != nil {
8328		objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
8329	}
8330	if CSS.ProbesSent != nil {
8331		objectMap["probesSent"] = CSS.ProbesSent
8332	}
8333	if CSS.ProbesFailed != nil {
8334		objectMap["probesFailed"] = CSS.ProbesFailed
8335	}
8336	return json.Marshal(objectMap)
8337}
8338
8339// ConnectivityDestination parameters that define destination of connection.
8340type ConnectivityDestination struct {
8341	// ResourceID - The ID of the resource to which a connection attempt will be made.
8342	ResourceID *string `json:"resourceId,omitempty"`
8343	// Address - The IP address or URI the resource to which a connection attempt will be made.
8344	Address *string `json:"address,omitempty"`
8345	// Port - Port on which check connectivity will be performed.
8346	Port *int32 `json:"port,omitempty"`
8347}
8348
8349// ConnectivityHop information about a hop between the source and the destination.
8350type ConnectivityHop struct {
8351	// Type - READ-ONLY; The type of the hop.
8352	Type *string `json:"type,omitempty"`
8353	// ID - READ-ONLY; The ID of the hop.
8354	ID *string `json:"id,omitempty"`
8355	// Address - READ-ONLY; The IP address of the hop.
8356	Address *string `json:"address,omitempty"`
8357	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
8358	ResourceID *string `json:"resourceId,omitempty"`
8359	// NextHopIds - READ-ONLY; List of next hop identifiers.
8360	NextHopIds *[]string `json:"nextHopIds,omitempty"`
8361	// Issues - READ-ONLY; List of issues.
8362	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
8363}
8364
8365// MarshalJSON is the custom marshaler for ConnectivityHop.
8366func (ch ConnectivityHop) MarshalJSON() ([]byte, error) {
8367	objectMap := make(map[string]interface{})
8368	return json.Marshal(objectMap)
8369}
8370
8371// ConnectivityInformation information on the connectivity status.
8372type ConnectivityInformation struct {
8373	autorest.Response `json:"-"`
8374	// Hops - READ-ONLY; List of hops between the source and the destination.
8375	Hops *[]ConnectivityHop `json:"hops,omitempty"`
8376	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
8377	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
8378	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
8379	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
8380	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
8381	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
8382	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
8383	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
8384	// ProbesSent - READ-ONLY; Total number of probes sent.
8385	ProbesSent *int32 `json:"probesSent,omitempty"`
8386	// ProbesFailed - READ-ONLY; Number of failed probes.
8387	ProbesFailed *int32 `json:"probesFailed,omitempty"`
8388}
8389
8390// MarshalJSON is the custom marshaler for ConnectivityInformation.
8391func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) {
8392	objectMap := make(map[string]interface{})
8393	return json.Marshal(objectMap)
8394}
8395
8396// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
8397type ConnectivityIssue struct {
8398	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
8399	Origin Origin `json:"origin,omitempty"`
8400	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
8401	Severity Severity `json:"severity,omitempty"`
8402	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
8403	Type IssueType `json:"type,omitempty"`
8404	// Context - READ-ONLY; Provides additional context on the issue.
8405	Context *[]map[string]*string `json:"context,omitempty"`
8406}
8407
8408// MarshalJSON is the custom marshaler for ConnectivityIssue.
8409func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) {
8410	objectMap := make(map[string]interface{})
8411	return json.Marshal(objectMap)
8412}
8413
8414// ConnectivityParameters parameters that determine how the connectivity check will be performed.
8415type ConnectivityParameters struct {
8416	// Source - The source of the connection.
8417	Source *ConnectivitySource `json:"source,omitempty"`
8418	// Destination - The destination of connection.
8419	Destination *ConnectivityDestination `json:"destination,omitempty"`
8420	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
8421	Protocol Protocol `json:"protocol,omitempty"`
8422	// ProtocolConfiguration - Configuration of the protocol.
8423	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
8424	// PreferredIPVersion - Preferred IP version of the connection. Possible values include: 'IPv4', 'IPv6'
8425	PreferredIPVersion IPVersion `json:"preferredIPVersion,omitempty"`
8426}
8427
8428// ConnectivitySource parameters that define the source of the connection.
8429type ConnectivitySource struct {
8430	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
8431	ResourceID *string `json:"resourceId,omitempty"`
8432	// Port - The source port from which a connectivity check will be performed.
8433	Port *int32 `json:"port,omitempty"`
8434}
8435
8436// Container reference to container resource in remote resource provider.
8437type Container struct {
8438	// ID - Resource ID.
8439	ID *string `json:"id,omitempty"`
8440}
8441
8442// ContainerNetworkInterface container network interface child resource.
8443type ContainerNetworkInterface struct {
8444	// ContainerNetworkInterfacePropertiesFormat - Container network interface properties.
8445	*ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"`
8446	// Name - The name of the resource. This name can be used to access the resource.
8447	Name *string `json:"name,omitempty"`
8448	// Type - READ-ONLY; Sub Resource type.
8449	Type *string `json:"type,omitempty"`
8450	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8451	Etag *string `json:"etag,omitempty"`
8452	// ID - Resource ID.
8453	ID *string `json:"id,omitempty"`
8454}
8455
8456// MarshalJSON is the custom marshaler for ContainerNetworkInterface.
8457func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) {
8458	objectMap := make(map[string]interface{})
8459	if cni.ContainerNetworkInterfacePropertiesFormat != nil {
8460		objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat
8461	}
8462	if cni.Name != nil {
8463		objectMap["name"] = cni.Name
8464	}
8465	if cni.ID != nil {
8466		objectMap["id"] = cni.ID
8467	}
8468	return json.Marshal(objectMap)
8469}
8470
8471// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct.
8472func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error {
8473	var m map[string]*json.RawMessage
8474	err := json.Unmarshal(body, &m)
8475	if err != nil {
8476		return err
8477	}
8478	for k, v := range m {
8479		switch k {
8480		case "properties":
8481			if v != nil {
8482				var containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat
8483				err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat)
8484				if err != nil {
8485					return err
8486				}
8487				cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat
8488			}
8489		case "name":
8490			if v != nil {
8491				var name string
8492				err = json.Unmarshal(*v, &name)
8493				if err != nil {
8494					return err
8495				}
8496				cni.Name = &name
8497			}
8498		case "type":
8499			if v != nil {
8500				var typeVar string
8501				err = json.Unmarshal(*v, &typeVar)
8502				if err != nil {
8503					return err
8504				}
8505				cni.Type = &typeVar
8506			}
8507		case "etag":
8508			if v != nil {
8509				var etag string
8510				err = json.Unmarshal(*v, &etag)
8511				if err != nil {
8512					return err
8513				}
8514				cni.Etag = &etag
8515			}
8516		case "id":
8517			if v != nil {
8518				var ID string
8519				err = json.Unmarshal(*v, &ID)
8520				if err != nil {
8521					return err
8522				}
8523				cni.ID = &ID
8524			}
8525		}
8526	}
8527
8528	return nil
8529}
8530
8531// ContainerNetworkInterfaceConfiguration container network interface configuration child resource.
8532type ContainerNetworkInterfaceConfiguration struct {
8533	// ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties.
8534	*ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"`
8535	// Name - The name of the resource. This name can be used to access the resource.
8536	Name *string `json:"name,omitempty"`
8537	// Type - READ-ONLY; Sub Resource type.
8538	Type *string `json:"type,omitempty"`
8539	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8540	Etag *string `json:"etag,omitempty"`
8541	// ID - Resource ID.
8542	ID *string `json:"id,omitempty"`
8543}
8544
8545// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration.
8546func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
8547	objectMap := make(map[string]interface{})
8548	if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil {
8549		objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat
8550	}
8551	if cnic.Name != nil {
8552		objectMap["name"] = cnic.Name
8553	}
8554	if cnic.ID != nil {
8555		objectMap["id"] = cnic.ID
8556	}
8557	return json.Marshal(objectMap)
8558}
8559
8560// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct.
8561func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error {
8562	var m map[string]*json.RawMessage
8563	err := json.Unmarshal(body, &m)
8564	if err != nil {
8565		return err
8566	}
8567	for k, v := range m {
8568		switch k {
8569		case "properties":
8570			if v != nil {
8571				var containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat
8572				err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat)
8573				if err != nil {
8574					return err
8575				}
8576				cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat
8577			}
8578		case "name":
8579			if v != nil {
8580				var name string
8581				err = json.Unmarshal(*v, &name)
8582				if err != nil {
8583					return err
8584				}
8585				cnic.Name = &name
8586			}
8587		case "type":
8588			if v != nil {
8589				var typeVar string
8590				err = json.Unmarshal(*v, &typeVar)
8591				if err != nil {
8592					return err
8593				}
8594				cnic.Type = &typeVar
8595			}
8596		case "etag":
8597			if v != nil {
8598				var etag string
8599				err = json.Unmarshal(*v, &etag)
8600				if err != nil {
8601					return err
8602				}
8603				cnic.Etag = &etag
8604			}
8605		case "id":
8606			if v != nil {
8607				var ID string
8608				err = json.Unmarshal(*v, &ID)
8609				if err != nil {
8610					return err
8611				}
8612				cnic.ID = &ID
8613			}
8614		}
8615	}
8616
8617	return nil
8618}
8619
8620// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration
8621// properties.
8622type ContainerNetworkInterfaceConfigurationPropertiesFormat struct {
8623	// IPConfigurations - A list of ip configurations of the container network interface configuration.
8624	IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"`
8625	// ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration.
8626	ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"`
8627	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
8628	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8629}
8630
8631// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat.
8632func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
8633	objectMap := make(map[string]interface{})
8634	if cnicpf.IPConfigurations != nil {
8635		objectMap["ipConfigurations"] = cnicpf.IPConfigurations
8636	}
8637	if cnicpf.ContainerNetworkInterfaces != nil {
8638		objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces
8639	}
8640	return json.Marshal(objectMap)
8641}
8642
8643// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface.
8644type ContainerNetworkInterfaceIPConfiguration struct {
8645	// ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration.
8646	*ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
8647	// Name - The name of the resource. This name can be used to access the resource.
8648	Name *string `json:"name,omitempty"`
8649	// Type - READ-ONLY; Sub Resource type.
8650	Type *string `json:"type,omitempty"`
8651	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8652	Etag *string `json:"etag,omitempty"`
8653}
8654
8655// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration.
8656func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
8657	objectMap := make(map[string]interface{})
8658	if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil {
8659		objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat
8660	}
8661	if cniic.Name != nil {
8662		objectMap["name"] = cniic.Name
8663	}
8664	return json.Marshal(objectMap)
8665}
8666
8667// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct.
8668func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
8669	var m map[string]*json.RawMessage
8670	err := json.Unmarshal(body, &m)
8671	if err != nil {
8672		return err
8673	}
8674	for k, v := range m {
8675		switch k {
8676		case "properties":
8677			if v != nil {
8678				var containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat
8679				err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat)
8680				if err != nil {
8681					return err
8682				}
8683				cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat
8684			}
8685		case "name":
8686			if v != nil {
8687				var name string
8688				err = json.Unmarshal(*v, &name)
8689				if err != nil {
8690					return err
8691				}
8692				cniic.Name = &name
8693			}
8694		case "type":
8695			if v != nil {
8696				var typeVar string
8697				err = json.Unmarshal(*v, &typeVar)
8698				if err != nil {
8699					return err
8700				}
8701				cniic.Type = &typeVar
8702			}
8703		case "etag":
8704			if v != nil {
8705				var etag string
8706				err = json.Unmarshal(*v, &etag)
8707				if err != nil {
8708					return err
8709				}
8710				cniic.Etag = &etag
8711			}
8712		}
8713	}
8714
8715	return nil
8716}
8717
8718// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface
8719// IP configuration.
8720type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
8721	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
8722	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8723}
8724
8725// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfigurationPropertiesFormat.
8726func (cniicpf ContainerNetworkInterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
8727	objectMap := make(map[string]interface{})
8728	return json.Marshal(objectMap)
8729}
8730
8731// ContainerNetworkInterfacePropertiesFormat properties of container network interface.
8732type ContainerNetworkInterfacePropertiesFormat struct {
8733	// ContainerNetworkInterfaceConfiguration - READ-ONLY; Container network interface configuration from which this container network interface is created.
8734	ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"`
8735	// Container - Reference to the container to which this container network interface is attached.
8736	Container *Container `json:"container,omitempty"`
8737	// IPConfigurations - READ-ONLY; Reference to the ip configuration on this container nic.
8738	IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
8739	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
8740	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8741}
8742
8743// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat.
8744func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
8745	objectMap := make(map[string]interface{})
8746	if cnipf.Container != nil {
8747		objectMap["container"] = cnipf.Container
8748	}
8749	return json.Marshal(objectMap)
8750}
8751
8752// CustomDNSConfigPropertiesFormat contains custom Dns resolution configuration from customer.
8753type CustomDNSConfigPropertiesFormat struct {
8754	// Fqdn - Fqdn that resolves to private endpoint ip address.
8755	Fqdn *string `json:"fqdn,omitempty"`
8756	// IPAddresses - A list of private ip addresses of the private endpoint.
8757	IPAddresses *[]string `json:"ipAddresses,omitempty"`
8758}
8759
8760// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8761// long-running operation.
8762type DdosCustomPoliciesCreateOrUpdateFuture struct {
8763	azure.FutureAPI
8764	// Result returns the result of the asynchronous operation.
8765	// If the operation has not completed it will return an error.
8766	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
8767}
8768
8769// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8770func (future *DdosCustomPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8771	var azFuture azure.Future
8772	if err := json.Unmarshal(body, &azFuture); err != nil {
8773		return err
8774	}
8775	future.FutureAPI = &azFuture
8776	future.Result = future.result
8777	return nil
8778}
8779
8780// result is the default implementation for DdosCustomPoliciesCreateOrUpdateFuture.Result.
8781func (future *DdosCustomPoliciesCreateOrUpdateFuture) result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) {
8782	var done bool
8783	done, err = future.DoneWithContext(context.Background(), client)
8784	if err != nil {
8785		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8786		return
8787	}
8788	if !done {
8789		dcp.Response.Response = future.Response()
8790		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesCreateOrUpdateFuture")
8791		return
8792	}
8793	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8794	if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent {
8795		dcp, err = client.CreateOrUpdateResponder(dcp.Response.Response)
8796		if err != nil {
8797			err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", dcp.Response.Response, "Failure responding to request")
8798		}
8799	}
8800	return
8801}
8802
8803// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
8804// long-running operation.
8805type DdosCustomPoliciesDeleteFuture struct {
8806	azure.FutureAPI
8807	// Result returns the result of the asynchronous operation.
8808	// If the operation has not completed it will return an error.
8809	Result func(DdosCustomPoliciesClient) (autorest.Response, error)
8810}
8811
8812// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8813func (future *DdosCustomPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
8814	var azFuture azure.Future
8815	if err := json.Unmarshal(body, &azFuture); err != nil {
8816		return err
8817	}
8818	future.FutureAPI = &azFuture
8819	future.Result = future.result
8820	return nil
8821}
8822
8823// result is the default implementation for DdosCustomPoliciesDeleteFuture.Result.
8824func (future *DdosCustomPoliciesDeleteFuture) result(client DdosCustomPoliciesClient) (ar autorest.Response, err error) {
8825	var done bool
8826	done, err = future.DoneWithContext(context.Background(), client)
8827	if err != nil {
8828		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
8829		return
8830	}
8831	if !done {
8832		ar.Response = future.Response()
8833		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesDeleteFuture")
8834		return
8835	}
8836	ar.Response = future.Response()
8837	return
8838}
8839
8840// DdosCustomPolicy a DDoS custom policy in a resource group.
8841type DdosCustomPolicy struct {
8842	autorest.Response `json:"-"`
8843	// DdosCustomPolicyPropertiesFormat - Properties of the DDoS custom policy.
8844	*DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"`
8845	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8846	Etag *string `json:"etag,omitempty"`
8847	// ID - Resource ID.
8848	ID *string `json:"id,omitempty"`
8849	// Name - READ-ONLY; Resource name.
8850	Name *string `json:"name,omitempty"`
8851	// Type - READ-ONLY; Resource type.
8852	Type *string `json:"type,omitempty"`
8853	// Location - Resource location.
8854	Location *string `json:"location,omitempty"`
8855	// Tags - Resource tags.
8856	Tags map[string]*string `json:"tags"`
8857}
8858
8859// MarshalJSON is the custom marshaler for DdosCustomPolicy.
8860func (dcp DdosCustomPolicy) MarshalJSON() ([]byte, error) {
8861	objectMap := make(map[string]interface{})
8862	if dcp.DdosCustomPolicyPropertiesFormat != nil {
8863		objectMap["properties"] = dcp.DdosCustomPolicyPropertiesFormat
8864	}
8865	if dcp.ID != nil {
8866		objectMap["id"] = dcp.ID
8867	}
8868	if dcp.Location != nil {
8869		objectMap["location"] = dcp.Location
8870	}
8871	if dcp.Tags != nil {
8872		objectMap["tags"] = dcp.Tags
8873	}
8874	return json.Marshal(objectMap)
8875}
8876
8877// UnmarshalJSON is the custom unmarshaler for DdosCustomPolicy struct.
8878func (dcp *DdosCustomPolicy) UnmarshalJSON(body []byte) error {
8879	var m map[string]*json.RawMessage
8880	err := json.Unmarshal(body, &m)
8881	if err != nil {
8882		return err
8883	}
8884	for k, v := range m {
8885		switch k {
8886		case "properties":
8887			if v != nil {
8888				var ddosCustomPolicyPropertiesFormat DdosCustomPolicyPropertiesFormat
8889				err = json.Unmarshal(*v, &ddosCustomPolicyPropertiesFormat)
8890				if err != nil {
8891					return err
8892				}
8893				dcp.DdosCustomPolicyPropertiesFormat = &ddosCustomPolicyPropertiesFormat
8894			}
8895		case "etag":
8896			if v != nil {
8897				var etag string
8898				err = json.Unmarshal(*v, &etag)
8899				if err != nil {
8900					return err
8901				}
8902				dcp.Etag = &etag
8903			}
8904		case "id":
8905			if v != nil {
8906				var ID string
8907				err = json.Unmarshal(*v, &ID)
8908				if err != nil {
8909					return err
8910				}
8911				dcp.ID = &ID
8912			}
8913		case "name":
8914			if v != nil {
8915				var name string
8916				err = json.Unmarshal(*v, &name)
8917				if err != nil {
8918					return err
8919				}
8920				dcp.Name = &name
8921			}
8922		case "type":
8923			if v != nil {
8924				var typeVar string
8925				err = json.Unmarshal(*v, &typeVar)
8926				if err != nil {
8927					return err
8928				}
8929				dcp.Type = &typeVar
8930			}
8931		case "location":
8932			if v != nil {
8933				var location string
8934				err = json.Unmarshal(*v, &location)
8935				if err != nil {
8936					return err
8937				}
8938				dcp.Location = &location
8939			}
8940		case "tags":
8941			if v != nil {
8942				var tags map[string]*string
8943				err = json.Unmarshal(*v, &tags)
8944				if err != nil {
8945					return err
8946				}
8947				dcp.Tags = tags
8948			}
8949		}
8950	}
8951
8952	return nil
8953}
8954
8955// DdosCustomPolicyPropertiesFormat dDoS custom policy properties.
8956type DdosCustomPolicyPropertiesFormat struct {
8957	// 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.
8958	ResourceGUID *string `json:"resourceGuid,omitempty"`
8959	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS custom policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
8960	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8961	// PublicIPAddresses - READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only.
8962	PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"`
8963	// ProtocolCustomSettings - The protocol-specific DDoS policy customization parameters.
8964	ProtocolCustomSettings *[]ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"`
8965}
8966
8967// MarshalJSON is the custom marshaler for DdosCustomPolicyPropertiesFormat.
8968func (dcppf DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
8969	objectMap := make(map[string]interface{})
8970	if dcppf.ProtocolCustomSettings != nil {
8971		objectMap["protocolCustomSettings"] = dcppf.ProtocolCustomSettings
8972	}
8973	return json.Marshal(objectMap)
8974}
8975
8976// DdosProtectionPlan a DDoS protection plan in a resource group.
8977type DdosProtectionPlan struct {
8978	autorest.Response `json:"-"`
8979	// ID - READ-ONLY; Resource ID.
8980	ID *string `json:"id,omitempty"`
8981	// Name - READ-ONLY; Resource name.
8982	Name *string `json:"name,omitempty"`
8983	// Type - READ-ONLY; Resource type.
8984	Type *string `json:"type,omitempty"`
8985	// Location - Resource location.
8986	Location *string `json:"location,omitempty"`
8987	// Tags - Resource tags.
8988	Tags map[string]*string `json:"tags"`
8989	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
8990	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
8991	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8992	Etag *string `json:"etag,omitempty"`
8993}
8994
8995// MarshalJSON is the custom marshaler for DdosProtectionPlan.
8996func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
8997	objectMap := make(map[string]interface{})
8998	if dpp.Location != nil {
8999		objectMap["location"] = dpp.Location
9000	}
9001	if dpp.Tags != nil {
9002		objectMap["tags"] = dpp.Tags
9003	}
9004	if dpp.DdosProtectionPlanPropertiesFormat != nil {
9005		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
9006	}
9007	return json.Marshal(objectMap)
9008}
9009
9010// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
9011func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
9012	var m map[string]*json.RawMessage
9013	err := json.Unmarshal(body, &m)
9014	if err != nil {
9015		return err
9016	}
9017	for k, v := range m {
9018		switch k {
9019		case "id":
9020			if v != nil {
9021				var ID string
9022				err = json.Unmarshal(*v, &ID)
9023				if err != nil {
9024					return err
9025				}
9026				dpp.ID = &ID
9027			}
9028		case "name":
9029			if v != nil {
9030				var name string
9031				err = json.Unmarshal(*v, &name)
9032				if err != nil {
9033					return err
9034				}
9035				dpp.Name = &name
9036			}
9037		case "type":
9038			if v != nil {
9039				var typeVar string
9040				err = json.Unmarshal(*v, &typeVar)
9041				if err != nil {
9042					return err
9043				}
9044				dpp.Type = &typeVar
9045			}
9046		case "location":
9047			if v != nil {
9048				var location string
9049				err = json.Unmarshal(*v, &location)
9050				if err != nil {
9051					return err
9052				}
9053				dpp.Location = &location
9054			}
9055		case "tags":
9056			if v != nil {
9057				var tags map[string]*string
9058				err = json.Unmarshal(*v, &tags)
9059				if err != nil {
9060					return err
9061				}
9062				dpp.Tags = tags
9063			}
9064		case "properties":
9065			if v != nil {
9066				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
9067				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
9068				if err != nil {
9069					return err
9070				}
9071				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
9072			}
9073		case "etag":
9074			if v != nil {
9075				var etag string
9076				err = json.Unmarshal(*v, &etag)
9077				if err != nil {
9078					return err
9079				}
9080				dpp.Etag = &etag
9081			}
9082		}
9083	}
9084
9085	return nil
9086}
9087
9088// DdosProtectionPlanListResult a list of DDoS protection plans.
9089type DdosProtectionPlanListResult struct {
9090	autorest.Response `json:"-"`
9091	// Value - A list of DDoS protection plans.
9092	Value *[]DdosProtectionPlan `json:"value,omitempty"`
9093	// NextLink - READ-ONLY; The URL to get the next set of results.
9094	NextLink *string `json:"nextLink,omitempty"`
9095}
9096
9097// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
9098func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
9099	objectMap := make(map[string]interface{})
9100	if dpplr.Value != nil {
9101		objectMap["value"] = dpplr.Value
9102	}
9103	return json.Marshal(objectMap)
9104}
9105
9106// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
9107type DdosProtectionPlanListResultIterator struct {
9108	i    int
9109	page DdosProtectionPlanListResultPage
9110}
9111
9112// NextWithContext advances to the next value.  If there was an error making
9113// the request the iterator does not advance and the error is returned.
9114func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
9115	if tracing.IsEnabled() {
9116		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
9117		defer func() {
9118			sc := -1
9119			if iter.Response().Response.Response != nil {
9120				sc = iter.Response().Response.Response.StatusCode
9121			}
9122			tracing.EndSpan(ctx, sc, err)
9123		}()
9124	}
9125	iter.i++
9126	if iter.i < len(iter.page.Values()) {
9127		return nil
9128	}
9129	err = iter.page.NextWithContext(ctx)
9130	if err != nil {
9131		iter.i--
9132		return err
9133	}
9134	iter.i = 0
9135	return nil
9136}
9137
9138// Next advances to the next value.  If there was an error making
9139// the request the iterator does not advance and the error is returned.
9140// Deprecated: Use NextWithContext() instead.
9141func (iter *DdosProtectionPlanListResultIterator) Next() error {
9142	return iter.NextWithContext(context.Background())
9143}
9144
9145// NotDone returns true if the enumeration should be started or is not yet complete.
9146func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
9147	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9148}
9149
9150// Response returns the raw server response from the last page request.
9151func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
9152	return iter.page.Response()
9153}
9154
9155// Value returns the current value or a zero-initialized value if the
9156// iterator has advanced beyond the end of the collection.
9157func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
9158	if !iter.page.NotDone() {
9159		return DdosProtectionPlan{}
9160	}
9161	return iter.page.Values()[iter.i]
9162}
9163
9164// Creates a new instance of the DdosProtectionPlanListResultIterator type.
9165func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
9166	return DdosProtectionPlanListResultIterator{page: page}
9167}
9168
9169// IsEmpty returns true if the ListResult contains no values.
9170func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
9171	return dpplr.Value == nil || len(*dpplr.Value) == 0
9172}
9173
9174// hasNextLink returns true if the NextLink is not empty.
9175func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
9176	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
9177}
9178
9179// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
9180// It returns nil if no more results exist.
9181func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
9182	if !dpplr.hasNextLink() {
9183		return nil, nil
9184	}
9185	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9186		autorest.AsJSON(),
9187		autorest.AsGet(),
9188		autorest.WithBaseURL(to.String(dpplr.NextLink)))
9189}
9190
9191// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
9192type DdosProtectionPlanListResultPage struct {
9193	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
9194	dpplr DdosProtectionPlanListResult
9195}
9196
9197// NextWithContext advances to the next page of values.  If there was an error making
9198// the request the page does not advance and the error is returned.
9199func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
9200	if tracing.IsEnabled() {
9201		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
9202		defer func() {
9203			sc := -1
9204			if page.Response().Response.Response != nil {
9205				sc = page.Response().Response.Response.StatusCode
9206			}
9207			tracing.EndSpan(ctx, sc, err)
9208		}()
9209	}
9210	for {
9211		next, err := page.fn(ctx, page.dpplr)
9212		if err != nil {
9213			return err
9214		}
9215		page.dpplr = next
9216		if !next.hasNextLink() || !next.IsEmpty() {
9217			break
9218		}
9219	}
9220	return nil
9221}
9222
9223// Next advances to the next page of values.  If there was an error making
9224// the request the page does not advance and the error is returned.
9225// Deprecated: Use NextWithContext() instead.
9226func (page *DdosProtectionPlanListResultPage) Next() error {
9227	return page.NextWithContext(context.Background())
9228}
9229
9230// NotDone returns true if the page enumeration should be started or is not yet complete.
9231func (page DdosProtectionPlanListResultPage) NotDone() bool {
9232	return !page.dpplr.IsEmpty()
9233}
9234
9235// Response returns the raw server response from the last page request.
9236func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
9237	return page.dpplr
9238}
9239
9240// Values returns the slice of values for the current page or nil if there are no values.
9241func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
9242	if page.dpplr.IsEmpty() {
9243		return nil
9244	}
9245	return *page.dpplr.Value
9246}
9247
9248// Creates a new instance of the DdosProtectionPlanListResultPage type.
9249func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
9250	return DdosProtectionPlanListResultPage{
9251		fn:    getNextPage,
9252		dpplr: cur,
9253	}
9254}
9255
9256// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
9257type DdosProtectionPlanPropertiesFormat struct {
9258	// 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.
9259	ResourceGUID *string `json:"resourceGuid,omitempty"`
9260	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9261	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9262	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
9263	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
9264}
9265
9266// MarshalJSON is the custom marshaler for DdosProtectionPlanPropertiesFormat.
9267func (dpppf DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) {
9268	objectMap := make(map[string]interface{})
9269	return json.Marshal(objectMap)
9270}
9271
9272// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9273// long-running operation.
9274type DdosProtectionPlansCreateOrUpdateFuture struct {
9275	azure.FutureAPI
9276	// Result returns the result of the asynchronous operation.
9277	// If the operation has not completed it will return an error.
9278	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
9279}
9280
9281// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9282func (future *DdosProtectionPlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9283	var azFuture azure.Future
9284	if err := json.Unmarshal(body, &azFuture); err != nil {
9285		return err
9286	}
9287	future.FutureAPI = &azFuture
9288	future.Result = future.result
9289	return nil
9290}
9291
9292// result is the default implementation for DdosProtectionPlansCreateOrUpdateFuture.Result.
9293func (future *DdosProtectionPlansCreateOrUpdateFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
9294	var done bool
9295	done, err = future.DoneWithContext(context.Background(), client)
9296	if err != nil {
9297		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9298		return
9299	}
9300	if !done {
9301		dpp.Response.Response = future.Response()
9302		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
9303		return
9304	}
9305	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9306	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
9307		dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
9308		if err != nil {
9309			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
9310		}
9311	}
9312	return
9313}
9314
9315// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
9316// long-running operation.
9317type DdosProtectionPlansDeleteFuture struct {
9318	azure.FutureAPI
9319	// Result returns the result of the asynchronous operation.
9320	// If the operation has not completed it will return an error.
9321	Result func(DdosProtectionPlansClient) (autorest.Response, error)
9322}
9323
9324// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9325func (future *DdosProtectionPlansDeleteFuture) UnmarshalJSON(body []byte) error {
9326	var azFuture azure.Future
9327	if err := json.Unmarshal(body, &azFuture); err != nil {
9328		return err
9329	}
9330	future.FutureAPI = &azFuture
9331	future.Result = future.result
9332	return nil
9333}
9334
9335// result is the default implementation for DdosProtectionPlansDeleteFuture.Result.
9336func (future *DdosProtectionPlansDeleteFuture) result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
9337	var done bool
9338	done, err = future.DoneWithContext(context.Background(), client)
9339	if err != nil {
9340		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure")
9341		return
9342	}
9343	if !done {
9344		ar.Response = future.Response()
9345		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
9346		return
9347	}
9348	ar.Response = future.Response()
9349	return
9350}
9351
9352// DdosSettings contains the DDoS protection settings of the public IP.
9353type DdosSettings struct {
9354	// DdosCustomPolicy - The DDoS custom policy associated with the public IP.
9355	DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"`
9356	// 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'
9357	ProtectionCoverage DdosSettingsProtectionCoverage `json:"protectionCoverage,omitempty"`
9358	// ProtectedIP - Enables DDoS protection on the public IP.
9359	ProtectedIP *bool `json:"protectedIP,omitempty"`
9360}
9361
9362// Delegation details the service to which the subnet is delegated.
9363type Delegation struct {
9364	// ServiceDelegationPropertiesFormat - Properties of the subnet.
9365	*ServiceDelegationPropertiesFormat `json:"properties,omitempty"`
9366	// Name - The name of the resource that is unique within a subnet. This name can be used to access the resource.
9367	Name *string `json:"name,omitempty"`
9368	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9369	Etag *string `json:"etag,omitempty"`
9370	// ID - Resource ID.
9371	ID *string `json:"id,omitempty"`
9372}
9373
9374// MarshalJSON is the custom marshaler for Delegation.
9375func (d Delegation) MarshalJSON() ([]byte, error) {
9376	objectMap := make(map[string]interface{})
9377	if d.ServiceDelegationPropertiesFormat != nil {
9378		objectMap["properties"] = d.ServiceDelegationPropertiesFormat
9379	}
9380	if d.Name != nil {
9381		objectMap["name"] = d.Name
9382	}
9383	if d.ID != nil {
9384		objectMap["id"] = d.ID
9385	}
9386	return json.Marshal(objectMap)
9387}
9388
9389// UnmarshalJSON is the custom unmarshaler for Delegation struct.
9390func (d *Delegation) UnmarshalJSON(body []byte) error {
9391	var m map[string]*json.RawMessage
9392	err := json.Unmarshal(body, &m)
9393	if err != nil {
9394		return err
9395	}
9396	for k, v := range m {
9397		switch k {
9398		case "properties":
9399			if v != nil {
9400				var serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat
9401				err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat)
9402				if err != nil {
9403					return err
9404				}
9405				d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat
9406			}
9407		case "name":
9408			if v != nil {
9409				var name string
9410				err = json.Unmarshal(*v, &name)
9411				if err != nil {
9412					return err
9413				}
9414				d.Name = &name
9415			}
9416		case "etag":
9417			if v != nil {
9418				var etag string
9419				err = json.Unmarshal(*v, &etag)
9420				if err != nil {
9421					return err
9422				}
9423				d.Etag = &etag
9424			}
9425		case "id":
9426			if v != nil {
9427				var ID string
9428				err = json.Unmarshal(*v, &ID)
9429				if err != nil {
9430					return err
9431				}
9432				d.ID = &ID
9433			}
9434		}
9435	}
9436
9437	return nil
9438}
9439
9440// DeleteBastionShareableLinkFuture an abstraction for monitoring and retrieving the results of a
9441// long-running operation.
9442type DeleteBastionShareableLinkFuture struct {
9443	azure.FutureAPI
9444	// Result returns the result of the asynchronous operation.
9445	// If the operation has not completed it will return an error.
9446	Result func(BaseClient) (autorest.Response, error)
9447}
9448
9449// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9450func (future *DeleteBastionShareableLinkFuture) UnmarshalJSON(body []byte) error {
9451	var azFuture azure.Future
9452	if err := json.Unmarshal(body, &azFuture); err != nil {
9453		return err
9454	}
9455	future.FutureAPI = &azFuture
9456	future.Result = future.result
9457	return nil
9458}
9459
9460// result is the default implementation for DeleteBastionShareableLinkFuture.Result.
9461func (future *DeleteBastionShareableLinkFuture) result(client BaseClient) (ar autorest.Response, err error) {
9462	var done bool
9463	done, err = future.DoneWithContext(context.Background(), client)
9464	if err != nil {
9465		err = autorest.NewErrorWithError(err, "network.DeleteBastionShareableLinkFuture", "Result", future.Response(), "Polling failure")
9466		return
9467	}
9468	if !done {
9469		ar.Response = future.Response()
9470		err = azure.NewAsyncOpIncompleteError("network.DeleteBastionShareableLinkFuture")
9471		return
9472	}
9473	ar.Response = future.Response()
9474	return
9475}
9476
9477// DeviceProperties list of properties of the device.
9478type DeviceProperties struct {
9479	// DeviceVendor - Name of the device Vendor.
9480	DeviceVendor *string `json:"deviceVendor,omitempty"`
9481	// DeviceModel - Model of the device.
9482	DeviceModel *string `json:"deviceModel,omitempty"`
9483	// LinkSpeedInMbps - Link speed.
9484	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
9485}
9486
9487// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
9488// network. Standard DHCP option for a subnet overrides VNET DHCP options.
9489type DhcpOptions struct {
9490	// DNSServers - The list of DNS servers IP addresses.
9491	DNSServers *[]string `json:"dnsServers,omitempty"`
9492}
9493
9494// Dimension dimension of the metric.
9495type Dimension struct {
9496	// Name - The name of the dimension.
9497	Name *string `json:"name,omitempty"`
9498	// DisplayName - The display name of the dimension.
9499	DisplayName *string `json:"displayName,omitempty"`
9500	// InternalName - The internal name of the dimension.
9501	InternalName *string `json:"internalName,omitempty"`
9502}
9503
9504// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
9505type DNSNameAvailabilityResult struct {
9506	autorest.Response `json:"-"`
9507	// Available - Domain availability (True/False).
9508	Available *bool `json:"available,omitempty"`
9509}
9510
9511// EffectiveNetworkSecurityGroup effective network security group.
9512type EffectiveNetworkSecurityGroup struct {
9513	// NetworkSecurityGroup - The ID of network security group that is applied.
9514	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
9515	// Association - Associated resources.
9516	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
9517	// EffectiveSecurityRules - A collection of effective security rules.
9518	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
9519	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
9520	TagMap map[string][]string `json:"tagMap"`
9521}
9522
9523// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
9524func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
9525	objectMap := make(map[string]interface{})
9526	if ensg.NetworkSecurityGroup != nil {
9527		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
9528	}
9529	if ensg.Association != nil {
9530		objectMap["association"] = ensg.Association
9531	}
9532	if ensg.EffectiveSecurityRules != nil {
9533		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
9534	}
9535	if ensg.TagMap != nil {
9536		objectMap["tagMap"] = ensg.TagMap
9537	}
9538	return json.Marshal(objectMap)
9539}
9540
9541// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
9542type EffectiveNetworkSecurityGroupAssociation struct {
9543	// Subnet - The ID of the subnet if assigned.
9544	Subnet *SubResource `json:"subnet,omitempty"`
9545	// NetworkInterface - The ID of the network interface if assigned.
9546	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
9547}
9548
9549// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
9550// call.
9551type EffectiveNetworkSecurityGroupListResult struct {
9552	autorest.Response `json:"-"`
9553	// Value - A list of effective network security groups.
9554	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
9555	// NextLink - READ-ONLY; The URL to get the next set of results.
9556	NextLink *string `json:"nextLink,omitempty"`
9557}
9558
9559// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
9560func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
9561	objectMap := make(map[string]interface{})
9562	if ensglr.Value != nil {
9563		objectMap["value"] = ensglr.Value
9564	}
9565	return json.Marshal(objectMap)
9566}
9567
9568// EffectiveNetworkSecurityRule effective network security rules.
9569type EffectiveNetworkSecurityRule struct {
9570	// Name - The name of the security rule specified by the user (if created by the user).
9571	Name *string `json:"name,omitempty"`
9572	// Protocol - The network protocol this rule applies to. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
9573	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
9574	// SourcePortRange - The source port or range.
9575	SourcePortRange *string `json:"sourcePortRange,omitempty"`
9576	// DestinationPortRange - The destination port or range.
9577	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
9578	// 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 (*).
9579	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
9580	// 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 (*).
9581	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
9582	// SourceAddressPrefix - The source address prefix.
9583	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
9584	// DestinationAddressPrefix - The destination address prefix.
9585	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
9586	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
9587	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
9588	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
9589	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
9590	// ExpandedSourceAddressPrefix - The expanded source address prefix.
9591	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
9592	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
9593	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
9594	// Access - Whether network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
9595	Access SecurityRuleAccess `json:"access,omitempty"`
9596	// Priority - The priority of the rule.
9597	Priority *int32 `json:"priority,omitempty"`
9598	// Direction - The direction of the rule. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
9599	Direction SecurityRuleDirection `json:"direction,omitempty"`
9600}
9601
9602// EffectiveRoute effective Route.
9603type EffectiveRoute struct {
9604	// Name - The name of the user defined route. This is optional.
9605	Name *string `json:"name,omitempty"`
9606	// DisableBgpRoutePropagation - If true, on-premises routes are not propagated to the network interfaces in the subnet.
9607	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
9608	// Source - Who created the route. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
9609	Source EffectiveRouteSource `json:"source,omitempty"`
9610	// State - The value of effective route. Possible values include: 'Active', 'Invalid'
9611	State EffectiveRouteState `json:"state,omitempty"`
9612	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
9613	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
9614	// NextHopIPAddress - The IP address of the next hop of the effective route.
9615	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
9616	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
9617	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
9618}
9619
9620// EffectiveRouteListResult response for list effective route API service call.
9621type EffectiveRouteListResult struct {
9622	autorest.Response `json:"-"`
9623	// Value - A list of effective routes.
9624	Value *[]EffectiveRoute `json:"value,omitempty"`
9625	// NextLink - READ-ONLY; The URL to get the next set of results.
9626	NextLink *string `json:"nextLink,omitempty"`
9627}
9628
9629// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
9630func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
9631	objectMap := make(map[string]interface{})
9632	if erlr.Value != nil {
9633		objectMap["value"] = erlr.Value
9634	}
9635	return json.Marshal(objectMap)
9636}
9637
9638// EndpointServiceResult endpoint service.
9639type EndpointServiceResult struct {
9640	// Name - READ-ONLY; Name of the endpoint service.
9641	Name *string `json:"name,omitempty"`
9642	// Type - READ-ONLY; Type of the endpoint service.
9643	Type *string `json:"type,omitempty"`
9644	// ID - Resource ID.
9645	ID *string `json:"id,omitempty"`
9646}
9647
9648// MarshalJSON is the custom marshaler for EndpointServiceResult.
9649func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
9650	objectMap := make(map[string]interface{})
9651	if esr.ID != nil {
9652		objectMap["id"] = esr.ID
9653	}
9654	return json.Marshal(objectMap)
9655}
9656
9657// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
9658type EndpointServicesListResult struct {
9659	autorest.Response `json:"-"`
9660	// Value - List of available endpoint services in a region.
9661	Value *[]EndpointServiceResult `json:"value,omitempty"`
9662	// NextLink - The URL to get the next set of results.
9663	NextLink *string `json:"nextLink,omitempty"`
9664}
9665
9666// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
9667// values.
9668type EndpointServicesListResultIterator struct {
9669	i    int
9670	page EndpointServicesListResultPage
9671}
9672
9673// NextWithContext advances to the next value.  If there was an error making
9674// the request the iterator does not advance and the error is returned.
9675func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
9676	if tracing.IsEnabled() {
9677		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
9678		defer func() {
9679			sc := -1
9680			if iter.Response().Response.Response != nil {
9681				sc = iter.Response().Response.Response.StatusCode
9682			}
9683			tracing.EndSpan(ctx, sc, err)
9684		}()
9685	}
9686	iter.i++
9687	if iter.i < len(iter.page.Values()) {
9688		return nil
9689	}
9690	err = iter.page.NextWithContext(ctx)
9691	if err != nil {
9692		iter.i--
9693		return err
9694	}
9695	iter.i = 0
9696	return nil
9697}
9698
9699// Next advances to the next value.  If there was an error making
9700// the request the iterator does not advance and the error is returned.
9701// Deprecated: Use NextWithContext() instead.
9702func (iter *EndpointServicesListResultIterator) Next() error {
9703	return iter.NextWithContext(context.Background())
9704}
9705
9706// NotDone returns true if the enumeration should be started or is not yet complete.
9707func (iter EndpointServicesListResultIterator) NotDone() bool {
9708	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9709}
9710
9711// Response returns the raw server response from the last page request.
9712func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
9713	return iter.page.Response()
9714}
9715
9716// Value returns the current value or a zero-initialized value if the
9717// iterator has advanced beyond the end of the collection.
9718func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
9719	if !iter.page.NotDone() {
9720		return EndpointServiceResult{}
9721	}
9722	return iter.page.Values()[iter.i]
9723}
9724
9725// Creates a new instance of the EndpointServicesListResultIterator type.
9726func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
9727	return EndpointServicesListResultIterator{page: page}
9728}
9729
9730// IsEmpty returns true if the ListResult contains no values.
9731func (eslr EndpointServicesListResult) IsEmpty() bool {
9732	return eslr.Value == nil || len(*eslr.Value) == 0
9733}
9734
9735// hasNextLink returns true if the NextLink is not empty.
9736func (eslr EndpointServicesListResult) hasNextLink() bool {
9737	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
9738}
9739
9740// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
9741// It returns nil if no more results exist.
9742func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
9743	if !eslr.hasNextLink() {
9744		return nil, nil
9745	}
9746	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9747		autorest.AsJSON(),
9748		autorest.AsGet(),
9749		autorest.WithBaseURL(to.String(eslr.NextLink)))
9750}
9751
9752// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
9753type EndpointServicesListResultPage struct {
9754	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
9755	eslr EndpointServicesListResult
9756}
9757
9758// NextWithContext advances to the next page of values.  If there was an error making
9759// the request the page does not advance and the error is returned.
9760func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
9761	if tracing.IsEnabled() {
9762		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
9763		defer func() {
9764			sc := -1
9765			if page.Response().Response.Response != nil {
9766				sc = page.Response().Response.Response.StatusCode
9767			}
9768			tracing.EndSpan(ctx, sc, err)
9769		}()
9770	}
9771	for {
9772		next, err := page.fn(ctx, page.eslr)
9773		if err != nil {
9774			return err
9775		}
9776		page.eslr = next
9777		if !next.hasNextLink() || !next.IsEmpty() {
9778			break
9779		}
9780	}
9781	return nil
9782}
9783
9784// Next advances to the next page of values.  If there was an error making
9785// the request the page does not advance and the error is returned.
9786// Deprecated: Use NextWithContext() instead.
9787func (page *EndpointServicesListResultPage) Next() error {
9788	return page.NextWithContext(context.Background())
9789}
9790
9791// NotDone returns true if the page enumeration should be started or is not yet complete.
9792func (page EndpointServicesListResultPage) NotDone() bool {
9793	return !page.eslr.IsEmpty()
9794}
9795
9796// Response returns the raw server response from the last page request.
9797func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
9798	return page.eslr
9799}
9800
9801// Values returns the slice of values for the current page or nil if there are no values.
9802func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
9803	if page.eslr.IsEmpty() {
9804		return nil
9805	}
9806	return *page.eslr.Value
9807}
9808
9809// Creates a new instance of the EndpointServicesListResultPage type.
9810func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
9811	return EndpointServicesListResultPage{
9812		fn:   getNextPage,
9813		eslr: cur,
9814	}
9815}
9816
9817// Error common error representation.
9818type Error struct {
9819	// Code - Error code.
9820	Code *string `json:"code,omitempty"`
9821	// Message - Error message.
9822	Message *string `json:"message,omitempty"`
9823	// Target - Error target.
9824	Target *string `json:"target,omitempty"`
9825	// Details - Error details.
9826	Details *[]ErrorDetails `json:"details,omitempty"`
9827	// InnerError - Inner error message.
9828	InnerError *string `json:"innerError,omitempty"`
9829}
9830
9831// ErrorDetails common error details representation.
9832type ErrorDetails struct {
9833	// Code - Error code.
9834	Code *string `json:"code,omitempty"`
9835	// Target - Error target.
9836	Target *string `json:"target,omitempty"`
9837	// Message - Error message.
9838	Message *string `json:"message,omitempty"`
9839}
9840
9841// ErrorResponse the error object.
9842type ErrorResponse struct {
9843	// Error - The error details object.
9844	Error *ErrorDetails `json:"error,omitempty"`
9845}
9846
9847// EvaluatedNetworkSecurityGroup results of network security group evaluation.
9848type EvaluatedNetworkSecurityGroup struct {
9849	// NetworkSecurityGroupID - Network security group ID.
9850	NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
9851	// AppliedTo - Resource ID of nic or subnet to which network security group is applied.
9852	AppliedTo *string `json:"appliedTo,omitempty"`
9853	// MatchedRule - Matched network security rule.
9854	MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
9855	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
9856	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
9857}
9858
9859// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
9860func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
9861	objectMap := make(map[string]interface{})
9862	if ensg.NetworkSecurityGroupID != nil {
9863		objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
9864	}
9865	if ensg.AppliedTo != nil {
9866		objectMap["appliedTo"] = ensg.AppliedTo
9867	}
9868	if ensg.MatchedRule != nil {
9869		objectMap["matchedRule"] = ensg.MatchedRule
9870	}
9871	return json.Marshal(objectMap)
9872}
9873
9874// ExpressRouteCircuit expressRouteCircuit resource.
9875type ExpressRouteCircuit struct {
9876	autorest.Response `json:"-"`
9877	// Sku - The SKU.
9878	Sku *ExpressRouteCircuitSku `json:"sku,omitempty"`
9879	// ExpressRouteCircuitPropertiesFormat - Properties of the express route circuit.
9880	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
9881	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9882	Etag *string `json:"etag,omitempty"`
9883	// ID - Resource ID.
9884	ID *string `json:"id,omitempty"`
9885	// Name - READ-ONLY; Resource name.
9886	Name *string `json:"name,omitempty"`
9887	// Type - READ-ONLY; Resource type.
9888	Type *string `json:"type,omitempty"`
9889	// Location - Resource location.
9890	Location *string `json:"location,omitempty"`
9891	// Tags - Resource tags.
9892	Tags map[string]*string `json:"tags"`
9893}
9894
9895// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
9896func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
9897	objectMap := make(map[string]interface{})
9898	if erc.Sku != nil {
9899		objectMap["sku"] = erc.Sku
9900	}
9901	if erc.ExpressRouteCircuitPropertiesFormat != nil {
9902		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
9903	}
9904	if erc.ID != nil {
9905		objectMap["id"] = erc.ID
9906	}
9907	if erc.Location != nil {
9908		objectMap["location"] = erc.Location
9909	}
9910	if erc.Tags != nil {
9911		objectMap["tags"] = erc.Tags
9912	}
9913	return json.Marshal(objectMap)
9914}
9915
9916// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
9917func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
9918	var m map[string]*json.RawMessage
9919	err := json.Unmarshal(body, &m)
9920	if err != nil {
9921		return err
9922	}
9923	for k, v := range m {
9924		switch k {
9925		case "sku":
9926			if v != nil {
9927				var sku ExpressRouteCircuitSku
9928				err = json.Unmarshal(*v, &sku)
9929				if err != nil {
9930					return err
9931				}
9932				erc.Sku = &sku
9933			}
9934		case "properties":
9935			if v != nil {
9936				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
9937				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
9938				if err != nil {
9939					return err
9940				}
9941				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
9942			}
9943		case "etag":
9944			if v != nil {
9945				var etag string
9946				err = json.Unmarshal(*v, &etag)
9947				if err != nil {
9948					return err
9949				}
9950				erc.Etag = &etag
9951			}
9952		case "id":
9953			if v != nil {
9954				var ID string
9955				err = json.Unmarshal(*v, &ID)
9956				if err != nil {
9957					return err
9958				}
9959				erc.ID = &ID
9960			}
9961		case "name":
9962			if v != nil {
9963				var name string
9964				err = json.Unmarshal(*v, &name)
9965				if err != nil {
9966					return err
9967				}
9968				erc.Name = &name
9969			}
9970		case "type":
9971			if v != nil {
9972				var typeVar string
9973				err = json.Unmarshal(*v, &typeVar)
9974				if err != nil {
9975					return err
9976				}
9977				erc.Type = &typeVar
9978			}
9979		case "location":
9980			if v != nil {
9981				var location string
9982				err = json.Unmarshal(*v, &location)
9983				if err != nil {
9984					return err
9985				}
9986				erc.Location = &location
9987			}
9988		case "tags":
9989			if v != nil {
9990				var tags map[string]*string
9991				err = json.Unmarshal(*v, &tags)
9992				if err != nil {
9993					return err
9994				}
9995				erc.Tags = tags
9996			}
9997		}
9998	}
9999
10000	return nil
10001}
10002
10003// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
10004type ExpressRouteCircuitArpTable struct {
10005	// Age - Entry age in minutes.
10006	Age *int32 `json:"age,omitempty"`
10007	// Interface - Interface address.
10008	Interface *string `json:"interface,omitempty"`
10009	// IPAddress - The IP address.
10010	IPAddress *string `json:"ipAddress,omitempty"`
10011	// MacAddress - The MAC address.
10012	MacAddress *string `json:"macAddress,omitempty"`
10013}
10014
10015// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
10016type ExpressRouteCircuitAuthorization struct {
10017	autorest.Response `json:"-"`
10018	// AuthorizationPropertiesFormat - Properties of the express route circuit authorization.
10019	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
10020	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10021	Name *string `json:"name,omitempty"`
10022	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10023	Etag *string `json:"etag,omitempty"`
10024	// Type - READ-ONLY; Type of the resource.
10025	Type *string `json:"type,omitempty"`
10026	// ID - Resource ID.
10027	ID *string `json:"id,omitempty"`
10028}
10029
10030// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
10031func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
10032	objectMap := make(map[string]interface{})
10033	if erca.AuthorizationPropertiesFormat != nil {
10034		objectMap["properties"] = erca.AuthorizationPropertiesFormat
10035	}
10036	if erca.Name != nil {
10037		objectMap["name"] = erca.Name
10038	}
10039	if erca.ID != nil {
10040		objectMap["id"] = erca.ID
10041	}
10042	return json.Marshal(objectMap)
10043}
10044
10045// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
10046func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
10047	var m map[string]*json.RawMessage
10048	err := json.Unmarshal(body, &m)
10049	if err != nil {
10050		return err
10051	}
10052	for k, v := range m {
10053		switch k {
10054		case "properties":
10055			if v != nil {
10056				var authorizationPropertiesFormat AuthorizationPropertiesFormat
10057				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
10058				if err != nil {
10059					return err
10060				}
10061				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
10062			}
10063		case "name":
10064			if v != nil {
10065				var name string
10066				err = json.Unmarshal(*v, &name)
10067				if err != nil {
10068					return err
10069				}
10070				erca.Name = &name
10071			}
10072		case "etag":
10073			if v != nil {
10074				var etag string
10075				err = json.Unmarshal(*v, &etag)
10076				if err != nil {
10077					return err
10078				}
10079				erca.Etag = &etag
10080			}
10081		case "type":
10082			if v != nil {
10083				var typeVar string
10084				err = json.Unmarshal(*v, &typeVar)
10085				if err != nil {
10086					return err
10087				}
10088				erca.Type = &typeVar
10089			}
10090		case "id":
10091			if v != nil {
10092				var ID string
10093				err = json.Unmarshal(*v, &ID)
10094				if err != nil {
10095					return err
10096				}
10097				erca.ID = &ID
10098			}
10099		}
10100	}
10101
10102	return nil
10103}
10104
10105// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
10106// results of a long-running operation.
10107type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
10108	azure.FutureAPI
10109	// Result returns the result of the asynchronous operation.
10110	// If the operation has not completed it will return an error.
10111	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
10112}
10113
10114// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10115func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10116	var azFuture azure.Future
10117	if err := json.Unmarshal(body, &azFuture); err != nil {
10118		return err
10119	}
10120	future.FutureAPI = &azFuture
10121	future.Result = future.result
10122	return nil
10123}
10124
10125// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result.
10126func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
10127	var done bool
10128	done, err = future.DoneWithContext(context.Background(), client)
10129	if err != nil {
10130		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10131		return
10132	}
10133	if !done {
10134		erca.Response.Response = future.Response()
10135		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
10136		return
10137	}
10138	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10139	if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
10140		erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
10141		if err != nil {
10142			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
10143		}
10144	}
10145	return
10146}
10147
10148// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
10149// of a long-running operation.
10150type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
10151	azure.FutureAPI
10152	// Result returns the result of the asynchronous operation.
10153	// If the operation has not completed it will return an error.
10154	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
10155}
10156
10157// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10158func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error {
10159	var azFuture azure.Future
10160	if err := json.Unmarshal(body, &azFuture); err != nil {
10161		return err
10162	}
10163	future.FutureAPI = &azFuture
10164	future.Result = future.result
10165	return nil
10166}
10167
10168// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result.
10169func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
10170	var done bool
10171	done, err = future.DoneWithContext(context.Background(), client)
10172	if err != nil {
10173		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
10174		return
10175	}
10176	if !done {
10177		ar.Response = future.Response()
10178		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
10179		return
10180	}
10181	ar.Response = future.Response()
10182	return
10183}
10184
10185// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
10186// resource.
10187type ExpressRouteCircuitConnection struct {
10188	autorest.Response `json:"-"`
10189	// ExpressRouteCircuitConnectionPropertiesFormat - Properties of the express route circuit connection.
10190	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
10191	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10192	Name *string `json:"name,omitempty"`
10193	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10194	Etag *string `json:"etag,omitempty"`
10195	// Type - READ-ONLY; Type of the resource.
10196	Type *string `json:"type,omitempty"`
10197	// ID - Resource ID.
10198	ID *string `json:"id,omitempty"`
10199}
10200
10201// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
10202func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
10203	objectMap := make(map[string]interface{})
10204	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
10205		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
10206	}
10207	if ercc.Name != nil {
10208		objectMap["name"] = ercc.Name
10209	}
10210	if ercc.ID != nil {
10211		objectMap["id"] = ercc.ID
10212	}
10213	return json.Marshal(objectMap)
10214}
10215
10216// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
10217func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
10218	var m map[string]*json.RawMessage
10219	err := json.Unmarshal(body, &m)
10220	if err != nil {
10221		return err
10222	}
10223	for k, v := range m {
10224		switch k {
10225		case "properties":
10226			if v != nil {
10227				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
10228				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
10229				if err != nil {
10230					return err
10231				}
10232				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
10233			}
10234		case "name":
10235			if v != nil {
10236				var name string
10237				err = json.Unmarshal(*v, &name)
10238				if err != nil {
10239					return err
10240				}
10241				ercc.Name = &name
10242			}
10243		case "etag":
10244			if v != nil {
10245				var etag string
10246				err = json.Unmarshal(*v, &etag)
10247				if err != nil {
10248					return err
10249				}
10250				ercc.Etag = &etag
10251			}
10252		case "type":
10253			if v != nil {
10254				var typeVar string
10255				err = json.Unmarshal(*v, &typeVar)
10256				if err != nil {
10257					return err
10258				}
10259				ercc.Type = &typeVar
10260			}
10261		case "id":
10262			if v != nil {
10263				var ID string
10264				err = json.Unmarshal(*v, &ID)
10265				if err != nil {
10266					return err
10267				}
10268				ercc.ID = &ID
10269			}
10270		}
10271	}
10272
10273	return nil
10274}
10275
10276// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all
10277// global reach connections that belongs to a Private Peering for an ExpressRouteCircuit.
10278type ExpressRouteCircuitConnectionListResult struct {
10279	autorest.Response `json:"-"`
10280	// Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit.
10281	Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"`
10282	// NextLink - The URL to get the next set of results.
10283	NextLink *string `json:"nextLink,omitempty"`
10284}
10285
10286// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
10287// ExpressRouteCircuitConnection values.
10288type ExpressRouteCircuitConnectionListResultIterator struct {
10289	i    int
10290	page ExpressRouteCircuitConnectionListResultPage
10291}
10292
10293// NextWithContext advances to the next value.  If there was an error making
10294// the request the iterator does not advance and the error is returned.
10295func (iter *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
10296	if tracing.IsEnabled() {
10297		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.NextWithContext")
10298		defer func() {
10299			sc := -1
10300			if iter.Response().Response.Response != nil {
10301				sc = iter.Response().Response.Response.StatusCode
10302			}
10303			tracing.EndSpan(ctx, sc, err)
10304		}()
10305	}
10306	iter.i++
10307	if iter.i < len(iter.page.Values()) {
10308		return nil
10309	}
10310	err = iter.page.NextWithContext(ctx)
10311	if err != nil {
10312		iter.i--
10313		return err
10314	}
10315	iter.i = 0
10316	return nil
10317}
10318
10319// Next advances to the next value.  If there was an error making
10320// the request the iterator does not advance and the error is returned.
10321// Deprecated: Use NextWithContext() instead.
10322func (iter *ExpressRouteCircuitConnectionListResultIterator) Next() error {
10323	return iter.NextWithContext(context.Background())
10324}
10325
10326// NotDone returns true if the enumeration should be started or is not yet complete.
10327func (iter ExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
10328	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10329}
10330
10331// Response returns the raw server response from the last page request.
10332func (iter ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult {
10333	return iter.page.Response()
10334}
10335
10336// Value returns the current value or a zero-initialized value if the
10337// iterator has advanced beyond the end of the collection.
10338func (iter ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection {
10339	if !iter.page.NotDone() {
10340		return ExpressRouteCircuitConnection{}
10341	}
10342	return iter.page.Values()[iter.i]
10343}
10344
10345// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type.
10346func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator {
10347	return ExpressRouteCircuitConnectionListResultIterator{page: page}
10348}
10349
10350// IsEmpty returns true if the ListResult contains no values.
10351func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool {
10352	return ercclr.Value == nil || len(*ercclr.Value) == 0
10353}
10354
10355// hasNextLink returns true if the NextLink is not empty.
10356func (ercclr ExpressRouteCircuitConnectionListResult) hasNextLink() bool {
10357	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
10358}
10359
10360// expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
10361// It returns nil if no more results exist.
10362func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
10363	if !ercclr.hasNextLink() {
10364		return nil, nil
10365	}
10366	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10367		autorest.AsJSON(),
10368		autorest.AsGet(),
10369		autorest.WithBaseURL(to.String(ercclr.NextLink)))
10370}
10371
10372// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values.
10373type ExpressRouteCircuitConnectionListResultPage struct {
10374	fn     func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)
10375	ercclr ExpressRouteCircuitConnectionListResult
10376}
10377
10378// NextWithContext advances to the next page of values.  If there was an error making
10379// the request the page does not advance and the error is returned.
10380func (page *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
10381	if tracing.IsEnabled() {
10382		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.NextWithContext")
10383		defer func() {
10384			sc := -1
10385			if page.Response().Response.Response != nil {
10386				sc = page.Response().Response.Response.StatusCode
10387			}
10388			tracing.EndSpan(ctx, sc, err)
10389		}()
10390	}
10391	for {
10392		next, err := page.fn(ctx, page.ercclr)
10393		if err != nil {
10394			return err
10395		}
10396		page.ercclr = next
10397		if !next.hasNextLink() || !next.IsEmpty() {
10398			break
10399		}
10400	}
10401	return nil
10402}
10403
10404// Next advances to the next page of values.  If there was an error making
10405// the request the page does not advance and the error is returned.
10406// Deprecated: Use NextWithContext() instead.
10407func (page *ExpressRouteCircuitConnectionListResultPage) Next() error {
10408	return page.NextWithContext(context.Background())
10409}
10410
10411// NotDone returns true if the page enumeration should be started or is not yet complete.
10412func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool {
10413	return !page.ercclr.IsEmpty()
10414}
10415
10416// Response returns the raw server response from the last page request.
10417func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult {
10418	return page.ercclr
10419}
10420
10421// Values returns the slice of values for the current page or nil if there are no values.
10422func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection {
10423	if page.ercclr.IsEmpty() {
10424		return nil
10425	}
10426	return *page.ercclr.Value
10427}
10428
10429// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type.
10430func NewExpressRouteCircuitConnectionListResultPage(cur ExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage {
10431	return ExpressRouteCircuitConnectionListResultPage{
10432		fn:     getNextPage,
10433		ercclr: cur,
10434	}
10435}
10436
10437// ExpressRouteCircuitConnectionPropertiesFormat properties of the express route circuit connection.
10438type ExpressRouteCircuitConnectionPropertiesFormat struct {
10439	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
10440	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
10441	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
10442	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
10443	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
10444	AddressPrefix *string `json:"addressPrefix,omitempty"`
10445	// AuthorizationKey - The authorization key.
10446	AuthorizationKey *string `json:"authorizationKey,omitempty"`
10447	// Ipv6CircuitConnectionConfig - IPv6 Address PrefixProperties of the express route circuit connection.
10448	Ipv6CircuitConnectionConfig *Ipv6CircuitConnectionConfig `json:"ipv6CircuitConnectionConfig,omitempty"`
10449	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
10450	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
10451	// ProvisioningState - READ-ONLY; The provisioning state of the express route circuit connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10452	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10453}
10454
10455// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
10456func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
10457	objectMap := make(map[string]interface{})
10458	if erccpf.ExpressRouteCircuitPeering != nil {
10459		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
10460	}
10461	if erccpf.PeerExpressRouteCircuitPeering != nil {
10462		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
10463	}
10464	if erccpf.AddressPrefix != nil {
10465		objectMap["addressPrefix"] = erccpf.AddressPrefix
10466	}
10467	if erccpf.AuthorizationKey != nil {
10468		objectMap["authorizationKey"] = erccpf.AuthorizationKey
10469	}
10470	if erccpf.Ipv6CircuitConnectionConfig != nil {
10471		objectMap["ipv6CircuitConnectionConfig"] = erccpf.Ipv6CircuitConnectionConfig
10472	}
10473	if erccpf.CircuitConnectionStatus != "" {
10474		objectMap["circuitConnectionStatus"] = erccpf.CircuitConnectionStatus
10475	}
10476	return json.Marshal(objectMap)
10477}
10478
10479// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
10480// results of a long-running operation.
10481type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
10482	azure.FutureAPI
10483	// Result returns the result of the asynchronous operation.
10484	// If the operation has not completed it will return an error.
10485	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
10486}
10487
10488// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10489func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10490	var azFuture azure.Future
10491	if err := json.Unmarshal(body, &azFuture); err != nil {
10492		return err
10493	}
10494	future.FutureAPI = &azFuture
10495	future.Result = future.result
10496	return nil
10497}
10498
10499// result is the default implementation for ExpressRouteCircuitConnectionsCreateOrUpdateFuture.Result.
10500func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
10501	var done bool
10502	done, err = future.DoneWithContext(context.Background(), client)
10503	if err != nil {
10504		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10505		return
10506	}
10507	if !done {
10508		ercc.Response.Response = future.Response()
10509		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
10510		return
10511	}
10512	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10513	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
10514		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
10515		if err != nil {
10516			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
10517		}
10518	}
10519	return
10520}
10521
10522// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
10523// long-running operation.
10524type ExpressRouteCircuitConnectionsDeleteFuture struct {
10525	azure.FutureAPI
10526	// Result returns the result of the asynchronous operation.
10527	// If the operation has not completed it will return an error.
10528	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
10529}
10530
10531// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10532func (future *ExpressRouteCircuitConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
10533	var azFuture azure.Future
10534	if err := json.Unmarshal(body, &azFuture); err != nil {
10535		return err
10536	}
10537	future.FutureAPI = &azFuture
10538	future.Result = future.result
10539	return nil
10540}
10541
10542// result is the default implementation for ExpressRouteCircuitConnectionsDeleteFuture.Result.
10543func (future *ExpressRouteCircuitConnectionsDeleteFuture) result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
10544	var done bool
10545	done, err = future.DoneWithContext(context.Background(), client)
10546	if err != nil {
10547		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
10548		return
10549	}
10550	if !done {
10551		ar.Response = future.Response()
10552		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
10553		return
10554	}
10555	ar.Response = future.Response()
10556	return
10557}
10558
10559// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
10560type ExpressRouteCircuitListResult struct {
10561	autorest.Response `json:"-"`
10562	// Value - A list of ExpressRouteCircuits in a resource group.
10563	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
10564	// NextLink - The URL to get the next set of results.
10565	NextLink *string `json:"nextLink,omitempty"`
10566}
10567
10568// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
10569// values.
10570type ExpressRouteCircuitListResultIterator struct {
10571	i    int
10572	page ExpressRouteCircuitListResultPage
10573}
10574
10575// NextWithContext advances to the next value.  If there was an error making
10576// the request the iterator does not advance and the error is returned.
10577func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
10578	if tracing.IsEnabled() {
10579		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
10580		defer func() {
10581			sc := -1
10582			if iter.Response().Response.Response != nil {
10583				sc = iter.Response().Response.Response.StatusCode
10584			}
10585			tracing.EndSpan(ctx, sc, err)
10586		}()
10587	}
10588	iter.i++
10589	if iter.i < len(iter.page.Values()) {
10590		return nil
10591	}
10592	err = iter.page.NextWithContext(ctx)
10593	if err != nil {
10594		iter.i--
10595		return err
10596	}
10597	iter.i = 0
10598	return nil
10599}
10600
10601// Next advances to the next value.  If there was an error making
10602// the request the iterator does not advance and the error is returned.
10603// Deprecated: Use NextWithContext() instead.
10604func (iter *ExpressRouteCircuitListResultIterator) Next() error {
10605	return iter.NextWithContext(context.Background())
10606}
10607
10608// NotDone returns true if the enumeration should be started or is not yet complete.
10609func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
10610	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10611}
10612
10613// Response returns the raw server response from the last page request.
10614func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
10615	return iter.page.Response()
10616}
10617
10618// Value returns the current value or a zero-initialized value if the
10619// iterator has advanced beyond the end of the collection.
10620func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
10621	if !iter.page.NotDone() {
10622		return ExpressRouteCircuit{}
10623	}
10624	return iter.page.Values()[iter.i]
10625}
10626
10627// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
10628func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
10629	return ExpressRouteCircuitListResultIterator{page: page}
10630}
10631
10632// IsEmpty returns true if the ListResult contains no values.
10633func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
10634	return erclr.Value == nil || len(*erclr.Value) == 0
10635}
10636
10637// hasNextLink returns true if the NextLink is not empty.
10638func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
10639	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
10640}
10641
10642// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
10643// It returns nil if no more results exist.
10644func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
10645	if !erclr.hasNextLink() {
10646		return nil, nil
10647	}
10648	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10649		autorest.AsJSON(),
10650		autorest.AsGet(),
10651		autorest.WithBaseURL(to.String(erclr.NextLink)))
10652}
10653
10654// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
10655type ExpressRouteCircuitListResultPage struct {
10656	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
10657	erclr ExpressRouteCircuitListResult
10658}
10659
10660// NextWithContext advances to the next page of values.  If there was an error making
10661// the request the page does not advance and the error is returned.
10662func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
10663	if tracing.IsEnabled() {
10664		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
10665		defer func() {
10666			sc := -1
10667			if page.Response().Response.Response != nil {
10668				sc = page.Response().Response.Response.StatusCode
10669			}
10670			tracing.EndSpan(ctx, sc, err)
10671		}()
10672	}
10673	for {
10674		next, err := page.fn(ctx, page.erclr)
10675		if err != nil {
10676			return err
10677		}
10678		page.erclr = next
10679		if !next.hasNextLink() || !next.IsEmpty() {
10680			break
10681		}
10682	}
10683	return nil
10684}
10685
10686// Next advances to the next page of values.  If there was an error making
10687// the request the page does not advance and the error is returned.
10688// Deprecated: Use NextWithContext() instead.
10689func (page *ExpressRouteCircuitListResultPage) Next() error {
10690	return page.NextWithContext(context.Background())
10691}
10692
10693// NotDone returns true if the page enumeration should be started or is not yet complete.
10694func (page ExpressRouteCircuitListResultPage) NotDone() bool {
10695	return !page.erclr.IsEmpty()
10696}
10697
10698// Response returns the raw server response from the last page request.
10699func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
10700	return page.erclr
10701}
10702
10703// Values returns the slice of values for the current page or nil if there are no values.
10704func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
10705	if page.erclr.IsEmpty() {
10706		return nil
10707	}
10708	return *page.erclr.Value
10709}
10710
10711// Creates a new instance of the ExpressRouteCircuitListResultPage type.
10712func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
10713	return ExpressRouteCircuitListResultPage{
10714		fn:    getNextPage,
10715		erclr: cur,
10716	}
10717}
10718
10719// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
10720type ExpressRouteCircuitPeering struct {
10721	autorest.Response `json:"-"`
10722	// ExpressRouteCircuitPeeringPropertiesFormat - Properties of the express route circuit peering.
10723	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
10724	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10725	Name *string `json:"name,omitempty"`
10726	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10727	Etag *string `json:"etag,omitempty"`
10728	// Type - READ-ONLY; Type of the resource.
10729	Type *string `json:"type,omitempty"`
10730	// ID - Resource ID.
10731	ID *string `json:"id,omitempty"`
10732}
10733
10734// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
10735func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
10736	objectMap := make(map[string]interface{})
10737	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
10738		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
10739	}
10740	if ercp.Name != nil {
10741		objectMap["name"] = ercp.Name
10742	}
10743	if ercp.ID != nil {
10744		objectMap["id"] = ercp.ID
10745	}
10746	return json.Marshal(objectMap)
10747}
10748
10749// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
10750func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
10751	var m map[string]*json.RawMessage
10752	err := json.Unmarshal(body, &m)
10753	if err != nil {
10754		return err
10755	}
10756	for k, v := range m {
10757		switch k {
10758		case "properties":
10759			if v != nil {
10760				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
10761				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
10762				if err != nil {
10763					return err
10764				}
10765				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
10766			}
10767		case "name":
10768			if v != nil {
10769				var name string
10770				err = json.Unmarshal(*v, &name)
10771				if err != nil {
10772					return err
10773				}
10774				ercp.Name = &name
10775			}
10776		case "etag":
10777			if v != nil {
10778				var etag string
10779				err = json.Unmarshal(*v, &etag)
10780				if err != nil {
10781					return err
10782				}
10783				ercp.Etag = &etag
10784			}
10785		case "type":
10786			if v != nil {
10787				var typeVar string
10788				err = json.Unmarshal(*v, &typeVar)
10789				if err != nil {
10790					return err
10791				}
10792				ercp.Type = &typeVar
10793			}
10794		case "id":
10795			if v != nil {
10796				var ID string
10797				err = json.Unmarshal(*v, &ID)
10798				if err != nil {
10799					return err
10800				}
10801				ercp.ID = &ID
10802			}
10803		}
10804	}
10805
10806	return nil
10807}
10808
10809// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
10810type ExpressRouteCircuitPeeringConfig struct {
10811	// AdvertisedPublicPrefixes - The reference to AdvertisedPublicPrefixes.
10812	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
10813	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering.
10814	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
10815	// AdvertisedPublicPrefixesState - READ-ONLY; The advertised public prefix state of the Peering resource. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
10816	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
10817	// LegacyMode - The legacy mode of the peering.
10818	LegacyMode *int32 `json:"legacyMode,omitempty"`
10819	// CustomerASN - The CustomerASN of the peering.
10820	CustomerASN *int32 `json:"customerASN,omitempty"`
10821	// RoutingRegistryName - The RoutingRegistryName of the configuration.
10822	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
10823}
10824
10825// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringConfig.
10826func (ercpc ExpressRouteCircuitPeeringConfig) MarshalJSON() ([]byte, error) {
10827	objectMap := make(map[string]interface{})
10828	if ercpc.AdvertisedPublicPrefixes != nil {
10829		objectMap["advertisedPublicPrefixes"] = ercpc.AdvertisedPublicPrefixes
10830	}
10831	if ercpc.AdvertisedCommunities != nil {
10832		objectMap["advertisedCommunities"] = ercpc.AdvertisedCommunities
10833	}
10834	if ercpc.LegacyMode != nil {
10835		objectMap["legacyMode"] = ercpc.LegacyMode
10836	}
10837	if ercpc.CustomerASN != nil {
10838		objectMap["customerASN"] = ercpc.CustomerASN
10839	}
10840	if ercpc.RoutingRegistryName != nil {
10841		objectMap["routingRegistryName"] = ercpc.RoutingRegistryName
10842	}
10843	return json.Marshal(objectMap)
10844}
10845
10846// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier.
10847type ExpressRouteCircuitPeeringID struct {
10848	// ID - The ID of the ExpressRoute circuit peering.
10849	ID *string `json:"id,omitempty"`
10850}
10851
10852// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
10853// that belong to an ExpressRouteCircuit.
10854type ExpressRouteCircuitPeeringListResult struct {
10855	autorest.Response `json:"-"`
10856	// Value - The peerings in an express route circuit.
10857	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
10858	// NextLink - The URL to get the next set of results.
10859	NextLink *string `json:"nextLink,omitempty"`
10860}
10861
10862// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
10863// ExpressRouteCircuitPeering values.
10864type ExpressRouteCircuitPeeringListResultIterator struct {
10865	i    int
10866	page ExpressRouteCircuitPeeringListResultPage
10867}
10868
10869// NextWithContext advances to the next value.  If there was an error making
10870// the request the iterator does not advance and the error is returned.
10871func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
10872	if tracing.IsEnabled() {
10873		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
10874		defer func() {
10875			sc := -1
10876			if iter.Response().Response.Response != nil {
10877				sc = iter.Response().Response.Response.StatusCode
10878			}
10879			tracing.EndSpan(ctx, sc, err)
10880		}()
10881	}
10882	iter.i++
10883	if iter.i < len(iter.page.Values()) {
10884		return nil
10885	}
10886	err = iter.page.NextWithContext(ctx)
10887	if err != nil {
10888		iter.i--
10889		return err
10890	}
10891	iter.i = 0
10892	return nil
10893}
10894
10895// Next advances to the next value.  If there was an error making
10896// the request the iterator does not advance and the error is returned.
10897// Deprecated: Use NextWithContext() instead.
10898func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
10899	return iter.NextWithContext(context.Background())
10900}
10901
10902// NotDone returns true if the enumeration should be started or is not yet complete.
10903func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
10904	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10905}
10906
10907// Response returns the raw server response from the last page request.
10908func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
10909	return iter.page.Response()
10910}
10911
10912// Value returns the current value or a zero-initialized value if the
10913// iterator has advanced beyond the end of the collection.
10914func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
10915	if !iter.page.NotDone() {
10916		return ExpressRouteCircuitPeering{}
10917	}
10918	return iter.page.Values()[iter.i]
10919}
10920
10921// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
10922func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
10923	return ExpressRouteCircuitPeeringListResultIterator{page: page}
10924}
10925
10926// IsEmpty returns true if the ListResult contains no values.
10927func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
10928	return ercplr.Value == nil || len(*ercplr.Value) == 0
10929}
10930
10931// hasNextLink returns true if the NextLink is not empty.
10932func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
10933	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
10934}
10935
10936// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
10937// It returns nil if no more results exist.
10938func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
10939	if !ercplr.hasNextLink() {
10940		return nil, nil
10941	}
10942	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10943		autorest.AsJSON(),
10944		autorest.AsGet(),
10945		autorest.WithBaseURL(to.String(ercplr.NextLink)))
10946}
10947
10948// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
10949type ExpressRouteCircuitPeeringListResultPage struct {
10950	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
10951	ercplr ExpressRouteCircuitPeeringListResult
10952}
10953
10954// NextWithContext advances to the next page of values.  If there was an error making
10955// the request the page does not advance and the error is returned.
10956func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
10957	if tracing.IsEnabled() {
10958		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
10959		defer func() {
10960			sc := -1
10961			if page.Response().Response.Response != nil {
10962				sc = page.Response().Response.Response.StatusCode
10963			}
10964			tracing.EndSpan(ctx, sc, err)
10965		}()
10966	}
10967	for {
10968		next, err := page.fn(ctx, page.ercplr)
10969		if err != nil {
10970			return err
10971		}
10972		page.ercplr = next
10973		if !next.hasNextLink() || !next.IsEmpty() {
10974			break
10975		}
10976	}
10977	return nil
10978}
10979
10980// Next advances to the next page of values.  If there was an error making
10981// the request the page does not advance and the error is returned.
10982// Deprecated: Use NextWithContext() instead.
10983func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
10984	return page.NextWithContext(context.Background())
10985}
10986
10987// NotDone returns true if the page enumeration should be started or is not yet complete.
10988func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
10989	return !page.ercplr.IsEmpty()
10990}
10991
10992// Response returns the raw server response from the last page request.
10993func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
10994	return page.ercplr
10995}
10996
10997// Values returns the slice of values for the current page or nil if there are no values.
10998func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
10999	if page.ercplr.IsEmpty() {
11000		return nil
11001	}
11002	return *page.ercplr.Value
11003}
11004
11005// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
11006func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
11007	return ExpressRouteCircuitPeeringListResultPage{
11008		fn:     getNextPage,
11009		ercplr: cur,
11010	}
11011}
11012
11013// ExpressRouteCircuitPeeringPropertiesFormat properties of the express route circuit peering.
11014type ExpressRouteCircuitPeeringPropertiesFormat struct {
11015	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
11016	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
11017	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
11018	State ExpressRoutePeeringState `json:"state,omitempty"`
11019	// AzureASN - The Azure ASN.
11020	AzureASN *int32 `json:"azureASN,omitempty"`
11021	// PeerASN - The peer ASN.
11022	PeerASN *int64 `json:"peerASN,omitempty"`
11023	// PrimaryPeerAddressPrefix - The primary address prefix.
11024	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
11025	// SecondaryPeerAddressPrefix - The secondary address prefix.
11026	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
11027	// PrimaryAzurePort - The primary port.
11028	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
11029	// SecondaryAzurePort - The secondary port.
11030	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
11031	// SharedKey - The shared key.
11032	SharedKey *string `json:"sharedKey,omitempty"`
11033	// VlanID - The VLAN ID.
11034	VlanID *int32 `json:"vlanId,omitempty"`
11035	// MicrosoftPeeringConfig - The Microsoft peering configuration.
11036	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
11037	// Stats - The peering stats of express route circuit.
11038	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
11039	// ProvisioningState - READ-ONLY; The provisioning state of the express route circuit peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
11040	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11041	// GatewayManagerEtag - The GatewayManager Etag.
11042	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
11043	// LastModifiedBy - READ-ONLY; Who was the last to modify the peering.
11044	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
11045	// RouteFilter - The reference to the RouteFilter resource.
11046	RouteFilter *SubResource `json:"routeFilter,omitempty"`
11047	// Ipv6PeeringConfig - The IPv6 peering configuration.
11048	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
11049	// ExpressRouteConnection - The ExpressRoute connection.
11050	ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"`
11051	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
11052	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
11053	// PeeredConnections - READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit.
11054	PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"`
11055}
11056
11057// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringPropertiesFormat.
11058func (ercppf ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
11059	objectMap := make(map[string]interface{})
11060	if ercppf.PeeringType != "" {
11061		objectMap["peeringType"] = ercppf.PeeringType
11062	}
11063	if ercppf.State != "" {
11064		objectMap["state"] = ercppf.State
11065	}
11066	if ercppf.AzureASN != nil {
11067		objectMap["azureASN"] = ercppf.AzureASN
11068	}
11069	if ercppf.PeerASN != nil {
11070		objectMap["peerASN"] = ercppf.PeerASN
11071	}
11072	if ercppf.PrimaryPeerAddressPrefix != nil {
11073		objectMap["primaryPeerAddressPrefix"] = ercppf.PrimaryPeerAddressPrefix
11074	}
11075	if ercppf.SecondaryPeerAddressPrefix != nil {
11076		objectMap["secondaryPeerAddressPrefix"] = ercppf.SecondaryPeerAddressPrefix
11077	}
11078	if ercppf.PrimaryAzurePort != nil {
11079		objectMap["primaryAzurePort"] = ercppf.PrimaryAzurePort
11080	}
11081	if ercppf.SecondaryAzurePort != nil {
11082		objectMap["secondaryAzurePort"] = ercppf.SecondaryAzurePort
11083	}
11084	if ercppf.SharedKey != nil {
11085		objectMap["sharedKey"] = ercppf.SharedKey
11086	}
11087	if ercppf.VlanID != nil {
11088		objectMap["vlanId"] = ercppf.VlanID
11089	}
11090	if ercppf.MicrosoftPeeringConfig != nil {
11091		objectMap["microsoftPeeringConfig"] = ercppf.MicrosoftPeeringConfig
11092	}
11093	if ercppf.Stats != nil {
11094		objectMap["stats"] = ercppf.Stats
11095	}
11096	if ercppf.GatewayManagerEtag != nil {
11097		objectMap["gatewayManagerEtag"] = ercppf.GatewayManagerEtag
11098	}
11099	if ercppf.RouteFilter != nil {
11100		objectMap["routeFilter"] = ercppf.RouteFilter
11101	}
11102	if ercppf.Ipv6PeeringConfig != nil {
11103		objectMap["ipv6PeeringConfig"] = ercppf.Ipv6PeeringConfig
11104	}
11105	if ercppf.ExpressRouteConnection != nil {
11106		objectMap["expressRouteConnection"] = ercppf.ExpressRouteConnection
11107	}
11108	if ercppf.Connections != nil {
11109		objectMap["connections"] = ercppf.Connections
11110	}
11111	return json.Marshal(objectMap)
11112}
11113
11114// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
11115// of a long-running operation.
11116type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
11117	azure.FutureAPI
11118	// Result returns the result of the asynchronous operation.
11119	// If the operation has not completed it will return an error.
11120	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
11121}
11122
11123// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11124func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11125	var azFuture azure.Future
11126	if err := json.Unmarshal(body, &azFuture); err != nil {
11127		return err
11128	}
11129	future.FutureAPI = &azFuture
11130	future.Result = future.result
11131	return nil
11132}
11133
11134// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result.
11135func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
11136	var done bool
11137	done, err = future.DoneWithContext(context.Background(), client)
11138	if err != nil {
11139		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11140		return
11141	}
11142	if !done {
11143		ercp.Response.Response = future.Response()
11144		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
11145		return
11146	}
11147	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11148	if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
11149		ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
11150		if err != nil {
11151			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
11152		}
11153	}
11154	return
11155}
11156
11157// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
11158// long-running operation.
11159type ExpressRouteCircuitPeeringsDeleteFuture struct {
11160	azure.FutureAPI
11161	// Result returns the result of the asynchronous operation.
11162	// If the operation has not completed it will return an error.
11163	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
11164}
11165
11166// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11167func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
11168	var azFuture azure.Future
11169	if err := json.Unmarshal(body, &azFuture); err != nil {
11170		return err
11171	}
11172	future.FutureAPI = &azFuture
11173	future.Result = future.result
11174	return nil
11175}
11176
11177// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result.
11178func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
11179	var done bool
11180	done, err = future.DoneWithContext(context.Background(), client)
11181	if err != nil {
11182		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
11183		return
11184	}
11185	if !done {
11186		ar.Response = future.Response()
11187		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
11188		return
11189	}
11190	ar.Response = future.Response()
11191	return
11192}
11193
11194// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
11195type ExpressRouteCircuitPropertiesFormat struct {
11196	// AllowClassicOperations - Allow classic operations.
11197	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
11198	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
11199	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
11200	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
11201	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
11202	// Authorizations - The list of authorizations.
11203	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
11204	// Peerings - The list of peerings.
11205	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
11206	// ServiceKey - The ServiceKey.
11207	ServiceKey *string `json:"serviceKey,omitempty"`
11208	// ServiceProviderNotes - The ServiceProviderNotes.
11209	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
11210	// ServiceProviderProperties - The ServiceProviderProperties.
11211	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
11212	// ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.
11213	ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"`
11214	// BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.
11215	BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"`
11216	// Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation.
11217	Stag *int32 `json:"stag,omitempty"`
11218	// ProvisioningState - READ-ONLY; The provisioning state of the express route circuit resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
11219	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11220	// GatewayManagerEtag - The GatewayManager Etag.
11221	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
11222	// GlobalReachEnabled - Flag denoting global reach status.
11223	GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"`
11224}
11225
11226// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat.
11227func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) {
11228	objectMap := make(map[string]interface{})
11229	if ercpf.AllowClassicOperations != nil {
11230		objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations
11231	}
11232	if ercpf.CircuitProvisioningState != nil {
11233		objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState
11234	}
11235	if ercpf.ServiceProviderProvisioningState != "" {
11236		objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState
11237	}
11238	if ercpf.Authorizations != nil {
11239		objectMap["authorizations"] = ercpf.Authorizations
11240	}
11241	if ercpf.Peerings != nil {
11242		objectMap["peerings"] = ercpf.Peerings
11243	}
11244	if ercpf.ServiceKey != nil {
11245		objectMap["serviceKey"] = ercpf.ServiceKey
11246	}
11247	if ercpf.ServiceProviderNotes != nil {
11248		objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes
11249	}
11250	if ercpf.ServiceProviderProperties != nil {
11251		objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties
11252	}
11253	if ercpf.ExpressRoutePort != nil {
11254		objectMap["expressRoutePort"] = ercpf.ExpressRoutePort
11255	}
11256	if ercpf.BandwidthInGbps != nil {
11257		objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps
11258	}
11259	if ercpf.GatewayManagerEtag != nil {
11260		objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag
11261	}
11262	if ercpf.GlobalReachEnabled != nil {
11263		objectMap["globalReachEnabled"] = ercpf.GlobalReachEnabled
11264	}
11265	return json.Marshal(objectMap)
11266}
11267
11268// ExpressRouteCircuitReference reference to an express route circuit.
11269type ExpressRouteCircuitReference struct {
11270	// ID - Corresponding Express Route Circuit Id.
11271	ID *string `json:"id,omitempty"`
11272}
11273
11274// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit.
11275type ExpressRouteCircuitRoutesTable struct {
11276	// NetworkProperty - IP address of a network entity.
11277	NetworkProperty *string `json:"network,omitempty"`
11278	// NextHop - NextHop address.
11279	NextHop *string `json:"nextHop,omitempty"`
11280	// LocPrf - Local preference value as set with the set local-preference route-map configuration command.
11281	LocPrf *string `json:"locPrf,omitempty"`
11282	// Weight - Route Weight.
11283	Weight *int32 `json:"weight,omitempty"`
11284	// Path - Autonomous system paths to the destination network.
11285	Path *string `json:"path,omitempty"`
11286}
11287
11288// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
11289type ExpressRouteCircuitRoutesTableSummary struct {
11290	// Neighbor - IP address of the neighbor.
11291	Neighbor *string `json:"neighbor,omitempty"`
11292	// V - BGP version number spoken to the neighbor.
11293	V *int32 `json:"v,omitempty"`
11294	// As - Autonomous system number.
11295	As *int32 `json:"as,omitempty"`
11296	// 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.
11297	UpDown *string `json:"upDown,omitempty"`
11298	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
11299	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
11300}
11301
11302// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
11303// Circuits API.
11304type ExpressRouteCircuitsArpTableListResult struct {
11305	autorest.Response `json:"-"`
11306	// Value - A list of the ARP tables.
11307	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
11308	// NextLink - The URL to get the next set of results.
11309	NextLink *string `json:"nextLink,omitempty"`
11310}
11311
11312// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11313// long-running operation.
11314type ExpressRouteCircuitsCreateOrUpdateFuture struct {
11315	azure.FutureAPI
11316	// Result returns the result of the asynchronous operation.
11317	// If the operation has not completed it will return an error.
11318	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
11319}
11320
11321// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11322func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11323	var azFuture azure.Future
11324	if err := json.Unmarshal(body, &azFuture); err != nil {
11325		return err
11326	}
11327	future.FutureAPI = &azFuture
11328	future.Result = future.result
11329	return nil
11330}
11331
11332// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result.
11333func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
11334	var done bool
11335	done, err = future.DoneWithContext(context.Background(), client)
11336	if err != nil {
11337		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11338		return
11339	}
11340	if !done {
11341		erc.Response.Response = future.Response()
11342		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
11343		return
11344	}
11345	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11346	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
11347		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
11348		if err != nil {
11349			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
11350		}
11351	}
11352	return
11353}
11354
11355// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
11356// long-running operation.
11357type ExpressRouteCircuitsDeleteFuture struct {
11358	azure.FutureAPI
11359	// Result returns the result of the asynchronous operation.
11360	// If the operation has not completed it will return an error.
11361	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
11362}
11363
11364// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11365func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error {
11366	var azFuture azure.Future
11367	if err := json.Unmarshal(body, &azFuture); err != nil {
11368		return err
11369	}
11370	future.FutureAPI = &azFuture
11371	future.Result = future.result
11372	return nil
11373}
11374
11375// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result.
11376func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
11377	var done bool
11378	done, err = future.DoneWithContext(context.Background(), client)
11379	if err != nil {
11380		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
11381		return
11382	}
11383	if !done {
11384		ar.Response = future.Response()
11385		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
11386		return
11387	}
11388	ar.Response = future.Response()
11389	return
11390}
11391
11392// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
11393// ExpressRouteCircuit.
11394type ExpressRouteCircuitServiceProviderProperties struct {
11395	// ServiceProviderName - The serviceProviderName.
11396	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
11397	// PeeringLocation - The peering location.
11398	PeeringLocation *string `json:"peeringLocation,omitempty"`
11399	// BandwidthInMbps - The BandwidthInMbps.
11400	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
11401}
11402
11403// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
11404type ExpressRouteCircuitSku struct {
11405	// Name - The name of the SKU.
11406	Name *string `json:"name,omitempty"`
11407	// Tier - The tier of the SKU. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic', 'ExpressRouteCircuitSkuTierLocal'
11408	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
11409	// Family - The family of the SKU. Possible values include: 'UnlimitedData', 'MeteredData'
11410	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
11411}
11412
11413// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
11414// long-running operation.
11415type ExpressRouteCircuitsListArpTableFuture struct {
11416	azure.FutureAPI
11417	// Result returns the result of the asynchronous operation.
11418	// If the operation has not completed it will return an error.
11419	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
11420}
11421
11422// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11423func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error {
11424	var azFuture azure.Future
11425	if err := json.Unmarshal(body, &azFuture); err != nil {
11426		return err
11427	}
11428	future.FutureAPI = &azFuture
11429	future.Result = future.result
11430	return nil
11431}
11432
11433// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result.
11434func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
11435	var done bool
11436	done, err = future.DoneWithContext(context.Background(), client)
11437	if err != nil {
11438		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
11439		return
11440	}
11441	if !done {
11442		ercatlr.Response.Response = future.Response()
11443		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
11444		return
11445	}
11446	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11447	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
11448		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
11449		if err != nil {
11450			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
11451		}
11452	}
11453	return
11454}
11455
11456// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
11457// long-running operation.
11458type ExpressRouteCircuitsListRoutesTableFuture struct {
11459	azure.FutureAPI
11460	// Result returns the result of the asynchronous operation.
11461	// If the operation has not completed it will return an error.
11462	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
11463}
11464
11465// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11466func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
11467	var azFuture azure.Future
11468	if err := json.Unmarshal(body, &azFuture); err != nil {
11469		return err
11470	}
11471	future.FutureAPI = &azFuture
11472	future.Result = future.result
11473	return nil
11474}
11475
11476// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result.
11477func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
11478	var done bool
11479	done, err = future.DoneWithContext(context.Background(), client)
11480	if err != nil {
11481		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
11482		return
11483	}
11484	if !done {
11485		ercrtlr.Response.Response = future.Response()
11486		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
11487		return
11488	}
11489	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11490	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
11491		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
11492		if err != nil {
11493			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
11494		}
11495	}
11496	return
11497}
11498
11499// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
11500// results of a long-running operation.
11501type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
11502	azure.FutureAPI
11503	// Result returns the result of the asynchronous operation.
11504	// If the operation has not completed it will return an error.
11505	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
11506}
11507
11508// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11509func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
11510	var azFuture azure.Future
11511	if err := json.Unmarshal(body, &azFuture); err != nil {
11512		return err
11513	}
11514	future.FutureAPI = &azFuture
11515	future.Result = future.result
11516	return nil
11517}
11518
11519// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result.
11520func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
11521	var done bool
11522	done, err = future.DoneWithContext(context.Background(), client)
11523	if err != nil {
11524		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
11525		return
11526	}
11527	if !done {
11528		ercrtslr.Response.Response = future.Response()
11529		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
11530		return
11531	}
11532	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11533	if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
11534		ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
11535		if err != nil {
11536			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
11537		}
11538	}
11539	return
11540}
11541
11542// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
11543// Circuits API.
11544type ExpressRouteCircuitsRoutesTableListResult struct {
11545	autorest.Response `json:"-"`
11546	// Value - The list of routes table.
11547	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
11548	// NextLink - The URL to get the next set of results.
11549	NextLink *string `json:"nextLink,omitempty"`
11550}
11551
11552// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
11553// Express Route Circuits API.
11554type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
11555	autorest.Response `json:"-"`
11556	// Value - A list of the routes table.
11557	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
11558	// NextLink - The URL to get the next set of results.
11559	NextLink *string `json:"nextLink,omitempty"`
11560}
11561
11562// ExpressRouteCircuitStats contains stats associated with the peering.
11563type ExpressRouteCircuitStats struct {
11564	autorest.Response `json:"-"`
11565	// PrimarybytesIn - The Primary BytesIn of the peering.
11566	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
11567	// PrimarybytesOut - The primary BytesOut of the peering.
11568	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
11569	// SecondarybytesIn - The secondary BytesIn of the peering.
11570	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
11571	// SecondarybytesOut - The secondary BytesOut of the peering.
11572	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
11573}
11574
11575// ExpressRouteConnection expressRouteConnection resource.
11576type ExpressRouteConnection struct {
11577	autorest.Response `json:"-"`
11578	// ExpressRouteConnectionProperties - Properties of the express route connection.
11579	*ExpressRouteConnectionProperties `json:"properties,omitempty"`
11580	// Name - The name of the resource.
11581	Name *string `json:"name,omitempty"`
11582	// ID - Resource ID.
11583	ID *string `json:"id,omitempty"`
11584}
11585
11586// MarshalJSON is the custom marshaler for ExpressRouteConnection.
11587func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) {
11588	objectMap := make(map[string]interface{})
11589	if erc.ExpressRouteConnectionProperties != nil {
11590		objectMap["properties"] = erc.ExpressRouteConnectionProperties
11591	}
11592	if erc.Name != nil {
11593		objectMap["name"] = erc.Name
11594	}
11595	if erc.ID != nil {
11596		objectMap["id"] = erc.ID
11597	}
11598	return json.Marshal(objectMap)
11599}
11600
11601// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct.
11602func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error {
11603	var m map[string]*json.RawMessage
11604	err := json.Unmarshal(body, &m)
11605	if err != nil {
11606		return err
11607	}
11608	for k, v := range m {
11609		switch k {
11610		case "properties":
11611			if v != nil {
11612				var expressRouteConnectionProperties ExpressRouteConnectionProperties
11613				err = json.Unmarshal(*v, &expressRouteConnectionProperties)
11614				if err != nil {
11615					return err
11616				}
11617				erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties
11618			}
11619		case "name":
11620			if v != nil {
11621				var name string
11622				err = json.Unmarshal(*v, &name)
11623				if err != nil {
11624					return err
11625				}
11626				erc.Name = &name
11627			}
11628		case "id":
11629			if v != nil {
11630				var ID string
11631				err = json.Unmarshal(*v, &ID)
11632				if err != nil {
11633					return err
11634				}
11635				erc.ID = &ID
11636			}
11637		}
11638	}
11639
11640	return nil
11641}
11642
11643// ExpressRouteConnectionID the ID of the ExpressRouteConnection.
11644type ExpressRouteConnectionID struct {
11645	// ID - READ-ONLY; The ID of the ExpressRouteConnection.
11646	ID *string `json:"id,omitempty"`
11647}
11648
11649// MarshalJSON is the custom marshaler for ExpressRouteConnectionID.
11650func (erci ExpressRouteConnectionID) MarshalJSON() ([]byte, error) {
11651	objectMap := make(map[string]interface{})
11652	return json.Marshal(objectMap)
11653}
11654
11655// ExpressRouteConnectionList expressRouteConnection list.
11656type ExpressRouteConnectionList struct {
11657	autorest.Response `json:"-"`
11658	// Value - The list of ExpressRoute connections.
11659	Value *[]ExpressRouteConnection `json:"value,omitempty"`
11660}
11661
11662// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource.
11663type ExpressRouteConnectionProperties struct {
11664	// ProvisioningState - READ-ONLY; The provisioning state of the express route connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
11665	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11666	// ExpressRouteCircuitPeering - The ExpressRoute circuit peering.
11667	ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"`
11668	// AuthorizationKey - Authorization key to establish the connection.
11669	AuthorizationKey *string `json:"authorizationKey,omitempty"`
11670	// RoutingWeight - The routing weight associated to the connection.
11671	RoutingWeight *int32 `json:"routingWeight,omitempty"`
11672	// EnableInternetSecurity - Enable internet security.
11673	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
11674}
11675
11676// MarshalJSON is the custom marshaler for ExpressRouteConnectionProperties.
11677func (ercp ExpressRouteConnectionProperties) MarshalJSON() ([]byte, error) {
11678	objectMap := make(map[string]interface{})
11679	if ercp.ExpressRouteCircuitPeering != nil {
11680		objectMap["expressRouteCircuitPeering"] = ercp.ExpressRouteCircuitPeering
11681	}
11682	if ercp.AuthorizationKey != nil {
11683		objectMap["authorizationKey"] = ercp.AuthorizationKey
11684	}
11685	if ercp.RoutingWeight != nil {
11686		objectMap["routingWeight"] = ercp.RoutingWeight
11687	}
11688	if ercp.EnableInternetSecurity != nil {
11689		objectMap["enableInternetSecurity"] = ercp.EnableInternetSecurity
11690	}
11691	return json.Marshal(objectMap)
11692}
11693
11694// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
11695// a long-running operation.
11696type ExpressRouteConnectionsCreateOrUpdateFuture struct {
11697	azure.FutureAPI
11698	// Result returns the result of the asynchronous operation.
11699	// If the operation has not completed it will return an error.
11700	Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error)
11701}
11702
11703// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11704func (future *ExpressRouteConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11705	var azFuture azure.Future
11706	if err := json.Unmarshal(body, &azFuture); err != nil {
11707		return err
11708	}
11709	future.FutureAPI = &azFuture
11710	future.Result = future.result
11711	return nil
11712}
11713
11714// result is the default implementation for ExpressRouteConnectionsCreateOrUpdateFuture.Result.
11715func (future *ExpressRouteConnectionsCreateOrUpdateFuture) result(client ExpressRouteConnectionsClient) (erc ExpressRouteConnection, err error) {
11716	var done bool
11717	done, err = future.DoneWithContext(context.Background(), client)
11718	if err != nil {
11719		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11720		return
11721	}
11722	if !done {
11723		erc.Response.Response = future.Response()
11724		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsCreateOrUpdateFuture")
11725		return
11726	}
11727	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11728	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
11729		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
11730		if err != nil {
11731			err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
11732		}
11733	}
11734	return
11735}
11736
11737// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
11738// long-running operation.
11739type ExpressRouteConnectionsDeleteFuture struct {
11740	azure.FutureAPI
11741	// Result returns the result of the asynchronous operation.
11742	// If the operation has not completed it will return an error.
11743	Result func(ExpressRouteConnectionsClient) (autorest.Response, error)
11744}
11745
11746// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11747func (future *ExpressRouteConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
11748	var azFuture azure.Future
11749	if err := json.Unmarshal(body, &azFuture); err != nil {
11750		return err
11751	}
11752	future.FutureAPI = &azFuture
11753	future.Result = future.result
11754	return nil
11755}
11756
11757// result is the default implementation for ExpressRouteConnectionsDeleteFuture.Result.
11758func (future *ExpressRouteConnectionsDeleteFuture) result(client ExpressRouteConnectionsClient) (ar autorest.Response, err error) {
11759	var done bool
11760	done, err = future.DoneWithContext(context.Background(), client)
11761	if err != nil {
11762		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
11763		return
11764	}
11765	if !done {
11766		ar.Response = future.Response()
11767		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsDeleteFuture")
11768		return
11769	}
11770	ar.Response = future.Response()
11771	return
11772}
11773
11774// ExpressRouteCrossConnection expressRouteCrossConnection resource.
11775type ExpressRouteCrossConnection struct {
11776	autorest.Response `json:"-"`
11777	// ExpressRouteCrossConnectionProperties - Properties of the express route cross connection.
11778	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
11779	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11780	Etag *string `json:"etag,omitempty"`
11781	// ID - Resource ID.
11782	ID *string `json:"id,omitempty"`
11783	// Name - READ-ONLY; Resource name.
11784	Name *string `json:"name,omitempty"`
11785	// Type - READ-ONLY; Resource type.
11786	Type *string `json:"type,omitempty"`
11787	// Location - Resource location.
11788	Location *string `json:"location,omitempty"`
11789	// Tags - Resource tags.
11790	Tags map[string]*string `json:"tags"`
11791}
11792
11793// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
11794func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
11795	objectMap := make(map[string]interface{})
11796	if ercc.ExpressRouteCrossConnectionProperties != nil {
11797		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
11798	}
11799	if ercc.ID != nil {
11800		objectMap["id"] = ercc.ID
11801	}
11802	if ercc.Location != nil {
11803		objectMap["location"] = ercc.Location
11804	}
11805	if ercc.Tags != nil {
11806		objectMap["tags"] = ercc.Tags
11807	}
11808	return json.Marshal(objectMap)
11809}
11810
11811// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
11812func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
11813	var m map[string]*json.RawMessage
11814	err := json.Unmarshal(body, &m)
11815	if err != nil {
11816		return err
11817	}
11818	for k, v := range m {
11819		switch k {
11820		case "properties":
11821			if v != nil {
11822				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
11823				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
11824				if err != nil {
11825					return err
11826				}
11827				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
11828			}
11829		case "etag":
11830			if v != nil {
11831				var etag string
11832				err = json.Unmarshal(*v, &etag)
11833				if err != nil {
11834					return err
11835				}
11836				ercc.Etag = &etag
11837			}
11838		case "id":
11839			if v != nil {
11840				var ID string
11841				err = json.Unmarshal(*v, &ID)
11842				if err != nil {
11843					return err
11844				}
11845				ercc.ID = &ID
11846			}
11847		case "name":
11848			if v != nil {
11849				var name string
11850				err = json.Unmarshal(*v, &name)
11851				if err != nil {
11852					return err
11853				}
11854				ercc.Name = &name
11855			}
11856		case "type":
11857			if v != nil {
11858				var typeVar string
11859				err = json.Unmarshal(*v, &typeVar)
11860				if err != nil {
11861					return err
11862				}
11863				ercc.Type = &typeVar
11864			}
11865		case "location":
11866			if v != nil {
11867				var location string
11868				err = json.Unmarshal(*v, &location)
11869				if err != nil {
11870					return err
11871				}
11872				ercc.Location = &location
11873			}
11874		case "tags":
11875			if v != nil {
11876				var tags map[string]*string
11877				err = json.Unmarshal(*v, &tags)
11878				if err != nil {
11879					return err
11880				}
11881				ercc.Tags = tags
11882			}
11883		}
11884	}
11885
11886	return nil
11887}
11888
11889// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
11890type ExpressRouteCrossConnectionListResult struct {
11891	autorest.Response `json:"-"`
11892	// Value - A list of ExpressRouteCrossConnection resources.
11893	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
11894	// NextLink - READ-ONLY; The URL to get the next set of results.
11895	NextLink *string `json:"nextLink,omitempty"`
11896}
11897
11898// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
11899func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
11900	objectMap := make(map[string]interface{})
11901	if ercclr.Value != nil {
11902		objectMap["value"] = ercclr.Value
11903	}
11904	return json.Marshal(objectMap)
11905}
11906
11907// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
11908// ExpressRouteCrossConnection values.
11909type ExpressRouteCrossConnectionListResultIterator struct {
11910	i    int
11911	page ExpressRouteCrossConnectionListResultPage
11912}
11913
11914// NextWithContext advances to the next value.  If there was an error making
11915// the request the iterator does not advance and the error is returned.
11916func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
11917	if tracing.IsEnabled() {
11918		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
11919		defer func() {
11920			sc := -1
11921			if iter.Response().Response.Response != nil {
11922				sc = iter.Response().Response.Response.StatusCode
11923			}
11924			tracing.EndSpan(ctx, sc, err)
11925		}()
11926	}
11927	iter.i++
11928	if iter.i < len(iter.page.Values()) {
11929		return nil
11930	}
11931	err = iter.page.NextWithContext(ctx)
11932	if err != nil {
11933		iter.i--
11934		return err
11935	}
11936	iter.i = 0
11937	return nil
11938}
11939
11940// Next advances to the next value.  If there was an error making
11941// the request the iterator does not advance and the error is returned.
11942// Deprecated: Use NextWithContext() instead.
11943func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
11944	return iter.NextWithContext(context.Background())
11945}
11946
11947// NotDone returns true if the enumeration should be started or is not yet complete.
11948func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
11949	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11950}
11951
11952// Response returns the raw server response from the last page request.
11953func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
11954	return iter.page.Response()
11955}
11956
11957// Value returns the current value or a zero-initialized value if the
11958// iterator has advanced beyond the end of the collection.
11959func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
11960	if !iter.page.NotDone() {
11961		return ExpressRouteCrossConnection{}
11962	}
11963	return iter.page.Values()[iter.i]
11964}
11965
11966// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
11967func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
11968	return ExpressRouteCrossConnectionListResultIterator{page: page}
11969}
11970
11971// IsEmpty returns true if the ListResult contains no values.
11972func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
11973	return ercclr.Value == nil || len(*ercclr.Value) == 0
11974}
11975
11976// hasNextLink returns true if the NextLink is not empty.
11977func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
11978	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
11979}
11980
11981// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
11982// It returns nil if no more results exist.
11983func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
11984	if !ercclr.hasNextLink() {
11985		return nil, nil
11986	}
11987	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11988		autorest.AsJSON(),
11989		autorest.AsGet(),
11990		autorest.WithBaseURL(to.String(ercclr.NextLink)))
11991}
11992
11993// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
11994type ExpressRouteCrossConnectionListResultPage struct {
11995	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
11996	ercclr ExpressRouteCrossConnectionListResult
11997}
11998
11999// NextWithContext advances to the next page of values.  If there was an error making
12000// the request the page does not advance and the error is returned.
12001func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
12002	if tracing.IsEnabled() {
12003		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
12004		defer func() {
12005			sc := -1
12006			if page.Response().Response.Response != nil {
12007				sc = page.Response().Response.Response.StatusCode
12008			}
12009			tracing.EndSpan(ctx, sc, err)
12010		}()
12011	}
12012	for {
12013		next, err := page.fn(ctx, page.ercclr)
12014		if err != nil {
12015			return err
12016		}
12017		page.ercclr = next
12018		if !next.hasNextLink() || !next.IsEmpty() {
12019			break
12020		}
12021	}
12022	return nil
12023}
12024
12025// Next advances to the next page of values.  If there was an error making
12026// the request the page does not advance and the error is returned.
12027// Deprecated: Use NextWithContext() instead.
12028func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
12029	return page.NextWithContext(context.Background())
12030}
12031
12032// NotDone returns true if the page enumeration should be started or is not yet complete.
12033func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
12034	return !page.ercclr.IsEmpty()
12035}
12036
12037// Response returns the raw server response from the last page request.
12038func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
12039	return page.ercclr
12040}
12041
12042// Values returns the slice of values for the current page or nil if there are no values.
12043func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
12044	if page.ercclr.IsEmpty() {
12045		return nil
12046	}
12047	return *page.ercclr.Value
12048}
12049
12050// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
12051func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
12052	return ExpressRouteCrossConnectionListResultPage{
12053		fn:     getNextPage,
12054		ercclr: cur,
12055	}
12056}
12057
12058// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
12059type ExpressRouteCrossConnectionPeering struct {
12060	autorest.Response `json:"-"`
12061	// ExpressRouteCrossConnectionPeeringProperties - Properties of the express route cross connection peering.
12062	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
12063	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12064	Name *string `json:"name,omitempty"`
12065	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12066	Etag *string `json:"etag,omitempty"`
12067	// ID - Resource ID.
12068	ID *string `json:"id,omitempty"`
12069}
12070
12071// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
12072func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
12073	objectMap := make(map[string]interface{})
12074	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
12075		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
12076	}
12077	if erccp.Name != nil {
12078		objectMap["name"] = erccp.Name
12079	}
12080	if erccp.ID != nil {
12081		objectMap["id"] = erccp.ID
12082	}
12083	return json.Marshal(objectMap)
12084}
12085
12086// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
12087func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
12088	var m map[string]*json.RawMessage
12089	err := json.Unmarshal(body, &m)
12090	if err != nil {
12091		return err
12092	}
12093	for k, v := range m {
12094		switch k {
12095		case "properties":
12096			if v != nil {
12097				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
12098				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
12099				if err != nil {
12100					return err
12101				}
12102				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
12103			}
12104		case "name":
12105			if v != nil {
12106				var name string
12107				err = json.Unmarshal(*v, &name)
12108				if err != nil {
12109					return err
12110				}
12111				erccp.Name = &name
12112			}
12113		case "etag":
12114			if v != nil {
12115				var etag string
12116				err = json.Unmarshal(*v, &etag)
12117				if err != nil {
12118					return err
12119				}
12120				erccp.Etag = &etag
12121			}
12122		case "id":
12123			if v != nil {
12124				var ID string
12125				err = json.Unmarshal(*v, &ID)
12126				if err != nil {
12127					return err
12128				}
12129				erccp.ID = &ID
12130			}
12131		}
12132	}
12133
12134	return nil
12135}
12136
12137// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
12138// that belong to an ExpressRouteCrossConnection.
12139type ExpressRouteCrossConnectionPeeringList struct {
12140	autorest.Response `json:"-"`
12141	// Value - The peerings in an express route cross connection.
12142	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
12143	// NextLink - READ-ONLY; The URL to get the next set of results.
12144	NextLink *string `json:"nextLink,omitempty"`
12145}
12146
12147// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
12148func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
12149	objectMap := make(map[string]interface{})
12150	if erccpl.Value != nil {
12151		objectMap["value"] = erccpl.Value
12152	}
12153	return json.Marshal(objectMap)
12154}
12155
12156// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
12157// ExpressRouteCrossConnectionPeering values.
12158type ExpressRouteCrossConnectionPeeringListIterator struct {
12159	i    int
12160	page ExpressRouteCrossConnectionPeeringListPage
12161}
12162
12163// NextWithContext advances to the next value.  If there was an error making
12164// the request the iterator does not advance and the error is returned.
12165func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
12166	if tracing.IsEnabled() {
12167		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
12168		defer func() {
12169			sc := -1
12170			if iter.Response().Response.Response != nil {
12171				sc = iter.Response().Response.Response.StatusCode
12172			}
12173			tracing.EndSpan(ctx, sc, err)
12174		}()
12175	}
12176	iter.i++
12177	if iter.i < len(iter.page.Values()) {
12178		return nil
12179	}
12180	err = iter.page.NextWithContext(ctx)
12181	if err != nil {
12182		iter.i--
12183		return err
12184	}
12185	iter.i = 0
12186	return nil
12187}
12188
12189// Next advances to the next value.  If there was an error making
12190// the request the iterator does not advance and the error is returned.
12191// Deprecated: Use NextWithContext() instead.
12192func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
12193	return iter.NextWithContext(context.Background())
12194}
12195
12196// NotDone returns true if the enumeration should be started or is not yet complete.
12197func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
12198	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12199}
12200
12201// Response returns the raw server response from the last page request.
12202func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
12203	return iter.page.Response()
12204}
12205
12206// Value returns the current value or a zero-initialized value if the
12207// iterator has advanced beyond the end of the collection.
12208func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
12209	if !iter.page.NotDone() {
12210		return ExpressRouteCrossConnectionPeering{}
12211	}
12212	return iter.page.Values()[iter.i]
12213}
12214
12215// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
12216func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
12217	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
12218}
12219
12220// IsEmpty returns true if the ListResult contains no values.
12221func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
12222	return erccpl.Value == nil || len(*erccpl.Value) == 0
12223}
12224
12225// hasNextLink returns true if the NextLink is not empty.
12226func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
12227	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
12228}
12229
12230// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
12231// It returns nil if no more results exist.
12232func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
12233	if !erccpl.hasNextLink() {
12234		return nil, nil
12235	}
12236	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12237		autorest.AsJSON(),
12238		autorest.AsGet(),
12239		autorest.WithBaseURL(to.String(erccpl.NextLink)))
12240}
12241
12242// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
12243type ExpressRouteCrossConnectionPeeringListPage struct {
12244	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
12245	erccpl ExpressRouteCrossConnectionPeeringList
12246}
12247
12248// NextWithContext advances to the next page of values.  If there was an error making
12249// the request the page does not advance and the error is returned.
12250func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
12251	if tracing.IsEnabled() {
12252		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
12253		defer func() {
12254			sc := -1
12255			if page.Response().Response.Response != nil {
12256				sc = page.Response().Response.Response.StatusCode
12257			}
12258			tracing.EndSpan(ctx, sc, err)
12259		}()
12260	}
12261	for {
12262		next, err := page.fn(ctx, page.erccpl)
12263		if err != nil {
12264			return err
12265		}
12266		page.erccpl = next
12267		if !next.hasNextLink() || !next.IsEmpty() {
12268			break
12269		}
12270	}
12271	return nil
12272}
12273
12274// Next advances to the next page of values.  If there was an error making
12275// the request the page does not advance and the error is returned.
12276// Deprecated: Use NextWithContext() instead.
12277func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
12278	return page.NextWithContext(context.Background())
12279}
12280
12281// NotDone returns true if the page enumeration should be started or is not yet complete.
12282func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
12283	return !page.erccpl.IsEmpty()
12284}
12285
12286// Response returns the raw server response from the last page request.
12287func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
12288	return page.erccpl
12289}
12290
12291// Values returns the slice of values for the current page or nil if there are no values.
12292func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
12293	if page.erccpl.IsEmpty() {
12294		return nil
12295	}
12296	return *page.erccpl.Value
12297}
12298
12299// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
12300func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
12301	return ExpressRouteCrossConnectionPeeringListPage{
12302		fn:     getNextPage,
12303		erccpl: cur,
12304	}
12305}
12306
12307// ExpressRouteCrossConnectionPeeringProperties properties of express route cross connection peering.
12308type ExpressRouteCrossConnectionPeeringProperties struct {
12309	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
12310	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
12311	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
12312	State ExpressRoutePeeringState `json:"state,omitempty"`
12313	// AzureASN - READ-ONLY; The Azure ASN.
12314	AzureASN *int32 `json:"azureASN,omitempty"`
12315	// PeerASN - The peer ASN.
12316	PeerASN *int64 `json:"peerASN,omitempty"`
12317	// PrimaryPeerAddressPrefix - The primary address prefix.
12318	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
12319	// SecondaryPeerAddressPrefix - The secondary address prefix.
12320	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
12321	// PrimaryAzurePort - READ-ONLY; The primary port.
12322	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
12323	// SecondaryAzurePort - READ-ONLY; The secondary port.
12324	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
12325	// SharedKey - The shared key.
12326	SharedKey *string `json:"sharedKey,omitempty"`
12327	// VlanID - The VLAN ID.
12328	VlanID *int32 `json:"vlanId,omitempty"`
12329	// MicrosoftPeeringConfig - The Microsoft peering configuration.
12330	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
12331	// ProvisioningState - READ-ONLY; The provisioning state of the express route cross connection peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12332	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12333	// GatewayManagerEtag - The GatewayManager Etag.
12334	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
12335	// LastModifiedBy - READ-ONLY; Who was the last to modify the peering.
12336	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
12337	// Ipv6PeeringConfig - The IPv6 peering configuration.
12338	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
12339}
12340
12341// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
12342func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
12343	objectMap := make(map[string]interface{})
12344	if erccpp.PeeringType != "" {
12345		objectMap["peeringType"] = erccpp.PeeringType
12346	}
12347	if erccpp.State != "" {
12348		objectMap["state"] = erccpp.State
12349	}
12350	if erccpp.PeerASN != nil {
12351		objectMap["peerASN"] = erccpp.PeerASN
12352	}
12353	if erccpp.PrimaryPeerAddressPrefix != nil {
12354		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
12355	}
12356	if erccpp.SecondaryPeerAddressPrefix != nil {
12357		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
12358	}
12359	if erccpp.SharedKey != nil {
12360		objectMap["sharedKey"] = erccpp.SharedKey
12361	}
12362	if erccpp.VlanID != nil {
12363		objectMap["vlanId"] = erccpp.VlanID
12364	}
12365	if erccpp.MicrosoftPeeringConfig != nil {
12366		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
12367	}
12368	if erccpp.GatewayManagerEtag != nil {
12369		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
12370	}
12371	if erccpp.Ipv6PeeringConfig != nil {
12372		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
12373	}
12374	return json.Marshal(objectMap)
12375}
12376
12377// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
12378// results of a long-running operation.
12379type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
12380	azure.FutureAPI
12381	// Result returns the result of the asynchronous operation.
12382	// If the operation has not completed it will return an error.
12383	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
12384}
12385
12386// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12387func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12388	var azFuture azure.Future
12389	if err := json.Unmarshal(body, &azFuture); err != nil {
12390		return err
12391	}
12392	future.FutureAPI = &azFuture
12393	future.Result = future.result
12394	return nil
12395}
12396
12397// result is the default implementation for ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.Result.
12398func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
12399	var done bool
12400	done, err = future.DoneWithContext(context.Background(), client)
12401	if err != nil {
12402		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12403		return
12404	}
12405	if !done {
12406		erccp.Response.Response = future.Response()
12407		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
12408		return
12409	}
12410	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12411	if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
12412		erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
12413		if err != nil {
12414			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
12415		}
12416	}
12417	return
12418}
12419
12420// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
12421// of a long-running operation.
12422type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
12423	azure.FutureAPI
12424	// Result returns the result of the asynchronous operation.
12425	// If the operation has not completed it will return an error.
12426	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
12427}
12428
12429// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12430func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
12431	var azFuture azure.Future
12432	if err := json.Unmarshal(body, &azFuture); err != nil {
12433		return err
12434	}
12435	future.FutureAPI = &azFuture
12436	future.Result = future.result
12437	return nil
12438}
12439
12440// result is the default implementation for ExpressRouteCrossConnectionPeeringsDeleteFuture.Result.
12441func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
12442	var done bool
12443	done, err = future.DoneWithContext(context.Background(), client)
12444	if err != nil {
12445		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
12446		return
12447	}
12448	if !done {
12449		ar.Response = future.Response()
12450		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
12451		return
12452	}
12453	ar.Response = future.Response()
12454	return
12455}
12456
12457// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
12458type ExpressRouteCrossConnectionProperties struct {
12459	// PrimaryAzurePort - READ-ONLY; The name of the primary port.
12460	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
12461	// SecondaryAzurePort - READ-ONLY; The name of the secondary port.
12462	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
12463	// STag - READ-ONLY; The identifier of the circuit traffic.
12464	STag *int32 `json:"sTag,omitempty"`
12465	// PeeringLocation - The peering location of the ExpressRoute circuit.
12466	PeeringLocation *string `json:"peeringLocation,omitempty"`
12467	// BandwidthInMbps - The circuit bandwidth In Mbps.
12468	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
12469	// ExpressRouteCircuit - The ExpressRouteCircuit.
12470	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
12471	// ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
12472	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
12473	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
12474	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
12475	// ProvisioningState - READ-ONLY; The provisioning state of the express route cross connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12476	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12477	// Peerings - The list of peerings.
12478	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
12479}
12480
12481// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
12482func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
12483	objectMap := make(map[string]interface{})
12484	if erccp.PeeringLocation != nil {
12485		objectMap["peeringLocation"] = erccp.PeeringLocation
12486	}
12487	if erccp.BandwidthInMbps != nil {
12488		objectMap["bandwidthInMbps"] = erccp.BandwidthInMbps
12489	}
12490	if erccp.ExpressRouteCircuit != nil {
12491		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
12492	}
12493	if erccp.ServiceProviderProvisioningState != "" {
12494		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
12495	}
12496	if erccp.ServiceProviderNotes != nil {
12497		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
12498	}
12499	if erccp.Peerings != nil {
12500		objectMap["peerings"] = erccp.Peerings
12501	}
12502	return json.Marshal(objectMap)
12503}
12504
12505// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
12506type ExpressRouteCrossConnectionRoutesTableSummary struct {
12507	// Neighbor - IP address of Neighbor router.
12508	Neighbor *string `json:"neighbor,omitempty"`
12509	// Asn - Autonomous system number.
12510	Asn *int32 `json:"asn,omitempty"`
12511	// 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.
12512	UpDown *string `json:"upDown,omitempty"`
12513	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
12514	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
12515}
12516
12517// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
12518// results of a long-running operation.
12519type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
12520	azure.FutureAPI
12521	// Result returns the result of the asynchronous operation.
12522	// If the operation has not completed it will return an error.
12523	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
12524}
12525
12526// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12527func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12528	var azFuture azure.Future
12529	if err := json.Unmarshal(body, &azFuture); err != nil {
12530		return err
12531	}
12532	future.FutureAPI = &azFuture
12533	future.Result = future.result
12534	return nil
12535}
12536
12537// result is the default implementation for ExpressRouteCrossConnectionsCreateOrUpdateFuture.Result.
12538func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
12539	var done bool
12540	done, err = future.DoneWithContext(context.Background(), client)
12541	if err != nil {
12542		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12543		return
12544	}
12545	if !done {
12546		ercc.Response.Response = future.Response()
12547		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
12548		return
12549	}
12550	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12551	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
12552		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
12553		if err != nil {
12554			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
12555		}
12556	}
12557	return
12558}
12559
12560// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
12561// of a long-running operation.
12562type ExpressRouteCrossConnectionsListArpTableFuture struct {
12563	azure.FutureAPI
12564	// Result returns the result of the asynchronous operation.
12565	// If the operation has not completed it will return an error.
12566	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
12567}
12568
12569// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12570func (future *ExpressRouteCrossConnectionsListArpTableFuture) UnmarshalJSON(body []byte) error {
12571	var azFuture azure.Future
12572	if err := json.Unmarshal(body, &azFuture); err != nil {
12573		return err
12574	}
12575	future.FutureAPI = &azFuture
12576	future.Result = future.result
12577	return nil
12578}
12579
12580// result is the default implementation for ExpressRouteCrossConnectionsListArpTableFuture.Result.
12581func (future *ExpressRouteCrossConnectionsListArpTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
12582	var done bool
12583	done, err = future.DoneWithContext(context.Background(), client)
12584	if err != nil {
12585		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure")
12586		return
12587	}
12588	if !done {
12589		ercatlr.Response.Response = future.Response()
12590		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
12591		return
12592	}
12593	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12594	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
12595		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
12596		if err != nil {
12597			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
12598		}
12599	}
12600	return
12601}
12602
12603// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
12604// results of a long-running operation.
12605type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
12606	azure.FutureAPI
12607	// Result returns the result of the asynchronous operation.
12608	// If the operation has not completed it will return an error.
12609	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
12610}
12611
12612// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12613func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
12614	var azFuture azure.Future
12615	if err := json.Unmarshal(body, &azFuture); err != nil {
12616		return err
12617	}
12618	future.FutureAPI = &azFuture
12619	future.Result = future.result
12620	return nil
12621}
12622
12623// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableFuture.Result.
12624func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
12625	var done bool
12626	done, err = future.DoneWithContext(context.Background(), client)
12627	if err != nil {
12628		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
12629		return
12630	}
12631	if !done {
12632		ercrtlr.Response.Response = future.Response()
12633		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
12634		return
12635	}
12636	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12637	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
12638		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
12639		if err != nil {
12640			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
12641		}
12642	}
12643	return
12644}
12645
12646// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
12647// the results of a long-running operation.
12648type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
12649	azure.FutureAPI
12650	// Result returns the result of the asynchronous operation.
12651	// If the operation has not completed it will return an error.
12652	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
12653}
12654
12655// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12656func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
12657	var azFuture azure.Future
12658	if err := json.Unmarshal(body, &azFuture); err != nil {
12659		return err
12660	}
12661	future.FutureAPI = &azFuture
12662	future.Result = future.result
12663	return nil
12664}
12665
12666// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.Result.
12667func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
12668	var done bool
12669	done, err = future.DoneWithContext(context.Background(), client)
12670	if err != nil {
12671		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
12672		return
12673	}
12674	if !done {
12675		erccrtslr.Response.Response = future.Response()
12676		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
12677		return
12678	}
12679	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12680	if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
12681		erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
12682		if err != nil {
12683			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
12684		}
12685	}
12686	return
12687}
12688
12689// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
12690// the Express Route Cross Connections.
12691type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
12692	autorest.Response `json:"-"`
12693	// Value - A list of the routes table.
12694	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
12695	// NextLink - READ-ONLY; The URL to get the next set of results.
12696	NextLink *string `json:"nextLink,omitempty"`
12697}
12698
12699// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
12700func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
12701	objectMap := make(map[string]interface{})
12702	if erccrtslr.Value != nil {
12703		objectMap["value"] = erccrtslr.Value
12704	}
12705	return json.Marshal(objectMap)
12706}
12707
12708// ExpressRouteGateway expressRoute gateway resource.
12709type ExpressRouteGateway struct {
12710	autorest.Response `json:"-"`
12711	// ExpressRouteGatewayProperties - Properties of the express route gateway.
12712	*ExpressRouteGatewayProperties `json:"properties,omitempty"`
12713	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12714	Etag *string `json:"etag,omitempty"`
12715	// ID - Resource ID.
12716	ID *string `json:"id,omitempty"`
12717	// Name - READ-ONLY; Resource name.
12718	Name *string `json:"name,omitempty"`
12719	// Type - READ-ONLY; Resource type.
12720	Type *string `json:"type,omitempty"`
12721	// Location - Resource location.
12722	Location *string `json:"location,omitempty"`
12723	// Tags - Resource tags.
12724	Tags map[string]*string `json:"tags"`
12725}
12726
12727// MarshalJSON is the custom marshaler for ExpressRouteGateway.
12728func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) {
12729	objectMap := make(map[string]interface{})
12730	if erg.ExpressRouteGatewayProperties != nil {
12731		objectMap["properties"] = erg.ExpressRouteGatewayProperties
12732	}
12733	if erg.ID != nil {
12734		objectMap["id"] = erg.ID
12735	}
12736	if erg.Location != nil {
12737		objectMap["location"] = erg.Location
12738	}
12739	if erg.Tags != nil {
12740		objectMap["tags"] = erg.Tags
12741	}
12742	return json.Marshal(objectMap)
12743}
12744
12745// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct.
12746func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error {
12747	var m map[string]*json.RawMessage
12748	err := json.Unmarshal(body, &m)
12749	if err != nil {
12750		return err
12751	}
12752	for k, v := range m {
12753		switch k {
12754		case "properties":
12755			if v != nil {
12756				var expressRouteGatewayProperties ExpressRouteGatewayProperties
12757				err = json.Unmarshal(*v, &expressRouteGatewayProperties)
12758				if err != nil {
12759					return err
12760				}
12761				erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties
12762			}
12763		case "etag":
12764			if v != nil {
12765				var etag string
12766				err = json.Unmarshal(*v, &etag)
12767				if err != nil {
12768					return err
12769				}
12770				erg.Etag = &etag
12771			}
12772		case "id":
12773			if v != nil {
12774				var ID string
12775				err = json.Unmarshal(*v, &ID)
12776				if err != nil {
12777					return err
12778				}
12779				erg.ID = &ID
12780			}
12781		case "name":
12782			if v != nil {
12783				var name string
12784				err = json.Unmarshal(*v, &name)
12785				if err != nil {
12786					return err
12787				}
12788				erg.Name = &name
12789			}
12790		case "type":
12791			if v != nil {
12792				var typeVar string
12793				err = json.Unmarshal(*v, &typeVar)
12794				if err != nil {
12795					return err
12796				}
12797				erg.Type = &typeVar
12798			}
12799		case "location":
12800			if v != nil {
12801				var location string
12802				err = json.Unmarshal(*v, &location)
12803				if err != nil {
12804					return err
12805				}
12806				erg.Location = &location
12807			}
12808		case "tags":
12809			if v != nil {
12810				var tags map[string]*string
12811				err = json.Unmarshal(*v, &tags)
12812				if err != nil {
12813					return err
12814				}
12815				erg.Tags = tags
12816			}
12817		}
12818	}
12819
12820	return nil
12821}
12822
12823// ExpressRouteGatewayList list of ExpressRoute gateways.
12824type ExpressRouteGatewayList struct {
12825	autorest.Response `json:"-"`
12826	// Value - List of ExpressRoute gateways.
12827	Value *[]ExpressRouteGateway `json:"value,omitempty"`
12828}
12829
12830// ExpressRouteGatewayProperties expressRoute gateway resource properties.
12831type ExpressRouteGatewayProperties struct {
12832	// AutoScaleConfiguration - Configuration for auto scaling.
12833	AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"`
12834	// ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway.
12835	ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"`
12836	// ProvisioningState - READ-ONLY; The provisioning state of the express route gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12837	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12838	// VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed.
12839	VirtualHub *VirtualHubID `json:"virtualHub,omitempty"`
12840}
12841
12842// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties.
12843func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) {
12844	objectMap := make(map[string]interface{})
12845	if ergp.AutoScaleConfiguration != nil {
12846		objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration
12847	}
12848	if ergp.VirtualHub != nil {
12849		objectMap["virtualHub"] = ergp.VirtualHub
12850	}
12851	return json.Marshal(objectMap)
12852}
12853
12854// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling.
12855type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct {
12856	// Bounds - Minimum and maximum number of scale units to deploy.
12857	Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"`
12858}
12859
12860// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to
12861// deploy.
12862type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct {
12863	// Min - Minimum number of scale units deployed for ExpressRoute gateway.
12864	Min *int32 `json:"min,omitempty"`
12865	// Max - Maximum number of scale units deployed for ExpressRoute gateway.
12866	Max *int32 `json:"max,omitempty"`
12867}
12868
12869// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12870// long-running operation.
12871type ExpressRouteGatewaysCreateOrUpdateFuture struct {
12872	azure.FutureAPI
12873	// Result returns the result of the asynchronous operation.
12874	// If the operation has not completed it will return an error.
12875	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
12876}
12877
12878// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12879func (future *ExpressRouteGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12880	var azFuture azure.Future
12881	if err := json.Unmarshal(body, &azFuture); err != nil {
12882		return err
12883	}
12884	future.FutureAPI = &azFuture
12885	future.Result = future.result
12886	return nil
12887}
12888
12889// result is the default implementation for ExpressRouteGatewaysCreateOrUpdateFuture.Result.
12890func (future *ExpressRouteGatewaysCreateOrUpdateFuture) result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) {
12891	var done bool
12892	done, err = future.DoneWithContext(context.Background(), client)
12893	if err != nil {
12894		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12895		return
12896	}
12897	if !done {
12898		erg.Response.Response = future.Response()
12899		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysCreateOrUpdateFuture")
12900		return
12901	}
12902	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12903	if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent {
12904		erg, err = client.CreateOrUpdateResponder(erg.Response.Response)
12905		if err != nil {
12906			err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", erg.Response.Response, "Failure responding to request")
12907		}
12908	}
12909	return
12910}
12911
12912// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
12913// long-running operation.
12914type ExpressRouteGatewaysDeleteFuture struct {
12915	azure.FutureAPI
12916	// Result returns the result of the asynchronous operation.
12917	// If the operation has not completed it will return an error.
12918	Result func(ExpressRouteGatewaysClient) (autorest.Response, error)
12919}
12920
12921// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12922func (future *ExpressRouteGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
12923	var azFuture azure.Future
12924	if err := json.Unmarshal(body, &azFuture); err != nil {
12925		return err
12926	}
12927	future.FutureAPI = &azFuture
12928	future.Result = future.result
12929	return nil
12930}
12931
12932// result is the default implementation for ExpressRouteGatewaysDeleteFuture.Result.
12933func (future *ExpressRouteGatewaysDeleteFuture) result(client ExpressRouteGatewaysClient) (ar autorest.Response, err error) {
12934	var done bool
12935	done, err = future.DoneWithContext(context.Background(), client)
12936	if err != nil {
12937		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
12938		return
12939	}
12940	if !done {
12941		ar.Response = future.Response()
12942		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysDeleteFuture")
12943		return
12944	}
12945	ar.Response = future.Response()
12946	return
12947}
12948
12949// ExpressRouteLink expressRouteLink child resource definition.
12950type ExpressRouteLink struct {
12951	autorest.Response `json:"-"`
12952	// ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties.
12953	*ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"`
12954	// Name - Name of child port resource that is unique among child port resources of the parent.
12955	Name *string `json:"name,omitempty"`
12956	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12957	Etag *string `json:"etag,omitempty"`
12958	// ID - Resource ID.
12959	ID *string `json:"id,omitempty"`
12960}
12961
12962// MarshalJSON is the custom marshaler for ExpressRouteLink.
12963func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) {
12964	objectMap := make(map[string]interface{})
12965	if erl.ExpressRouteLinkPropertiesFormat != nil {
12966		objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat
12967	}
12968	if erl.Name != nil {
12969		objectMap["name"] = erl.Name
12970	}
12971	if erl.ID != nil {
12972		objectMap["id"] = erl.ID
12973	}
12974	return json.Marshal(objectMap)
12975}
12976
12977// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct.
12978func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error {
12979	var m map[string]*json.RawMessage
12980	err := json.Unmarshal(body, &m)
12981	if err != nil {
12982		return err
12983	}
12984	for k, v := range m {
12985		switch k {
12986		case "properties":
12987			if v != nil {
12988				var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat
12989				err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat)
12990				if err != nil {
12991					return err
12992				}
12993				erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat
12994			}
12995		case "name":
12996			if v != nil {
12997				var name string
12998				err = json.Unmarshal(*v, &name)
12999				if err != nil {
13000					return err
13001				}
13002				erl.Name = &name
13003			}
13004		case "etag":
13005			if v != nil {
13006				var etag string
13007				err = json.Unmarshal(*v, &etag)
13008				if err != nil {
13009					return err
13010				}
13011				erl.Etag = &etag
13012			}
13013		case "id":
13014			if v != nil {
13015				var ID string
13016				err = json.Unmarshal(*v, &ID)
13017				if err != nil {
13018					return err
13019				}
13020				erl.ID = &ID
13021			}
13022		}
13023	}
13024
13025	return nil
13026}
13027
13028// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call.
13029type ExpressRouteLinkListResult struct {
13030	autorest.Response `json:"-"`
13031	// Value - The list of ExpressRouteLink sub-resources.
13032	Value *[]ExpressRouteLink `json:"value,omitempty"`
13033	// NextLink - The URL to get the next set of results.
13034	NextLink *string `json:"nextLink,omitempty"`
13035}
13036
13037// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values.
13038type ExpressRouteLinkListResultIterator struct {
13039	i    int
13040	page ExpressRouteLinkListResultPage
13041}
13042
13043// NextWithContext advances to the next value.  If there was an error making
13044// the request the iterator does not advance and the error is returned.
13045func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
13046	if tracing.IsEnabled() {
13047		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext")
13048		defer func() {
13049			sc := -1
13050			if iter.Response().Response.Response != nil {
13051				sc = iter.Response().Response.Response.StatusCode
13052			}
13053			tracing.EndSpan(ctx, sc, err)
13054		}()
13055	}
13056	iter.i++
13057	if iter.i < len(iter.page.Values()) {
13058		return nil
13059	}
13060	err = iter.page.NextWithContext(ctx)
13061	if err != nil {
13062		iter.i--
13063		return err
13064	}
13065	iter.i = 0
13066	return nil
13067}
13068
13069// Next advances to the next value.  If there was an error making
13070// the request the iterator does not advance and the error is returned.
13071// Deprecated: Use NextWithContext() instead.
13072func (iter *ExpressRouteLinkListResultIterator) Next() error {
13073	return iter.NextWithContext(context.Background())
13074}
13075
13076// NotDone returns true if the enumeration should be started or is not yet complete.
13077func (iter ExpressRouteLinkListResultIterator) NotDone() bool {
13078	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13079}
13080
13081// Response returns the raw server response from the last page request.
13082func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult {
13083	return iter.page.Response()
13084}
13085
13086// Value returns the current value or a zero-initialized value if the
13087// iterator has advanced beyond the end of the collection.
13088func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink {
13089	if !iter.page.NotDone() {
13090		return ExpressRouteLink{}
13091	}
13092	return iter.page.Values()[iter.i]
13093}
13094
13095// Creates a new instance of the ExpressRouteLinkListResultIterator type.
13096func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator {
13097	return ExpressRouteLinkListResultIterator{page: page}
13098}
13099
13100// IsEmpty returns true if the ListResult contains no values.
13101func (erllr ExpressRouteLinkListResult) IsEmpty() bool {
13102	return erllr.Value == nil || len(*erllr.Value) == 0
13103}
13104
13105// hasNextLink returns true if the NextLink is not empty.
13106func (erllr ExpressRouteLinkListResult) hasNextLink() bool {
13107	return erllr.NextLink != nil && len(*erllr.NextLink) != 0
13108}
13109
13110// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results.
13111// It returns nil if no more results exist.
13112func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
13113	if !erllr.hasNextLink() {
13114		return nil, nil
13115	}
13116	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13117		autorest.AsJSON(),
13118		autorest.AsGet(),
13119		autorest.WithBaseURL(to.String(erllr.NextLink)))
13120}
13121
13122// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values.
13123type ExpressRouteLinkListResultPage struct {
13124	fn    func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)
13125	erllr ExpressRouteLinkListResult
13126}
13127
13128// NextWithContext advances to the next page of values.  If there was an error making
13129// the request the page does not advance and the error is returned.
13130func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
13131	if tracing.IsEnabled() {
13132		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext")
13133		defer func() {
13134			sc := -1
13135			if page.Response().Response.Response != nil {
13136				sc = page.Response().Response.Response.StatusCode
13137			}
13138			tracing.EndSpan(ctx, sc, err)
13139		}()
13140	}
13141	for {
13142		next, err := page.fn(ctx, page.erllr)
13143		if err != nil {
13144			return err
13145		}
13146		page.erllr = next
13147		if !next.hasNextLink() || !next.IsEmpty() {
13148			break
13149		}
13150	}
13151	return nil
13152}
13153
13154// Next advances to the next page of values.  If there was an error making
13155// the request the page does not advance and the error is returned.
13156// Deprecated: Use NextWithContext() instead.
13157func (page *ExpressRouteLinkListResultPage) Next() error {
13158	return page.NextWithContext(context.Background())
13159}
13160
13161// NotDone returns true if the page enumeration should be started or is not yet complete.
13162func (page ExpressRouteLinkListResultPage) NotDone() bool {
13163	return !page.erllr.IsEmpty()
13164}
13165
13166// Response returns the raw server response from the last page request.
13167func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult {
13168	return page.erllr
13169}
13170
13171// Values returns the slice of values for the current page or nil if there are no values.
13172func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink {
13173	if page.erllr.IsEmpty() {
13174		return nil
13175	}
13176	return *page.erllr.Value
13177}
13178
13179// Creates a new instance of the ExpressRouteLinkListResultPage type.
13180func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage {
13181	return ExpressRouteLinkListResultPage{
13182		fn:    getNextPage,
13183		erllr: cur,
13184	}
13185}
13186
13187// ExpressRouteLinkMacSecConfig expressRouteLink Mac Security Configuration.
13188type ExpressRouteLinkMacSecConfig struct {
13189	// CknSecretIdentifier - Keyvault Secret Identifier URL containing Mac security CKN key.
13190	CknSecretIdentifier *string `json:"cknSecretIdentifier,omitempty"`
13191	// CakSecretIdentifier - Keyvault Secret Identifier URL containing Mac security CAK key.
13192	CakSecretIdentifier *string `json:"cakSecretIdentifier,omitempty"`
13193	// Cipher - Mac security cipher. Possible values include: 'GcmAes128', 'GcmAes256'
13194	Cipher ExpressRouteLinkMacSecCipher `json:"cipher,omitempty"`
13195}
13196
13197// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources.
13198type ExpressRouteLinkPropertiesFormat struct {
13199	// RouterName - READ-ONLY; Name of Azure router associated with physical port.
13200	RouterName *string `json:"routerName,omitempty"`
13201	// InterfaceName - READ-ONLY; Name of Azure router interface.
13202	InterfaceName *string `json:"interfaceName,omitempty"`
13203	// PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port.
13204	PatchPanelID *string `json:"patchPanelId,omitempty"`
13205	// RackID - READ-ONLY; Mapping of physical patch panel to rack.
13206	RackID *string `json:"rackId,omitempty"`
13207	// ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'LC', 'SC'
13208	ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"`
13209	// AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled'
13210	AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"`
13211	// ProvisioningState - READ-ONLY; The provisioning state of the express route link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
13212	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13213	// MacSecConfig - MacSec configuration.
13214	MacSecConfig *ExpressRouteLinkMacSecConfig `json:"macSecConfig,omitempty"`
13215}
13216
13217// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat.
13218func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
13219	objectMap := make(map[string]interface{})
13220	if erlpf.AdminState != "" {
13221		objectMap["adminState"] = erlpf.AdminState
13222	}
13223	if erlpf.MacSecConfig != nil {
13224		objectMap["macSecConfig"] = erlpf.MacSecConfig
13225	}
13226	return json.Marshal(objectMap)
13227}
13228
13229// ExpressRoutePort expressRoutePort resource definition.
13230type ExpressRoutePort struct {
13231	autorest.Response `json:"-"`
13232	// ExpressRoutePortPropertiesFormat - ExpressRoutePort properties.
13233	*ExpressRoutePortPropertiesFormat `json:"properties,omitempty"`
13234	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
13235	Etag *string `json:"etag,omitempty"`
13236	// Identity - The identity of ExpressRoutePort, if configured.
13237	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
13238	// ID - Resource ID.
13239	ID *string `json:"id,omitempty"`
13240	// Name - READ-ONLY; Resource name.
13241	Name *string `json:"name,omitempty"`
13242	// Type - READ-ONLY; Resource type.
13243	Type *string `json:"type,omitempty"`
13244	// Location - Resource location.
13245	Location *string `json:"location,omitempty"`
13246	// Tags - Resource tags.
13247	Tags map[string]*string `json:"tags"`
13248}
13249
13250// MarshalJSON is the custom marshaler for ExpressRoutePort.
13251func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) {
13252	objectMap := make(map[string]interface{})
13253	if erp.ExpressRoutePortPropertiesFormat != nil {
13254		objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat
13255	}
13256	if erp.Identity != nil {
13257		objectMap["identity"] = erp.Identity
13258	}
13259	if erp.ID != nil {
13260		objectMap["id"] = erp.ID
13261	}
13262	if erp.Location != nil {
13263		objectMap["location"] = erp.Location
13264	}
13265	if erp.Tags != nil {
13266		objectMap["tags"] = erp.Tags
13267	}
13268	return json.Marshal(objectMap)
13269}
13270
13271// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct.
13272func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error {
13273	var m map[string]*json.RawMessage
13274	err := json.Unmarshal(body, &m)
13275	if err != nil {
13276		return err
13277	}
13278	for k, v := range m {
13279		switch k {
13280		case "properties":
13281			if v != nil {
13282				var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat
13283				err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat)
13284				if err != nil {
13285					return err
13286				}
13287				erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat
13288			}
13289		case "etag":
13290			if v != nil {
13291				var etag string
13292				err = json.Unmarshal(*v, &etag)
13293				if err != nil {
13294					return err
13295				}
13296				erp.Etag = &etag
13297			}
13298		case "identity":
13299			if v != nil {
13300				var identity ManagedServiceIdentity
13301				err = json.Unmarshal(*v, &identity)
13302				if err != nil {
13303					return err
13304				}
13305				erp.Identity = &identity
13306			}
13307		case "id":
13308			if v != nil {
13309				var ID string
13310				err = json.Unmarshal(*v, &ID)
13311				if err != nil {
13312					return err
13313				}
13314				erp.ID = &ID
13315			}
13316		case "name":
13317			if v != nil {
13318				var name string
13319				err = json.Unmarshal(*v, &name)
13320				if err != nil {
13321					return err
13322				}
13323				erp.Name = &name
13324			}
13325		case "type":
13326			if v != nil {
13327				var typeVar string
13328				err = json.Unmarshal(*v, &typeVar)
13329				if err != nil {
13330					return err
13331				}
13332				erp.Type = &typeVar
13333			}
13334		case "location":
13335			if v != nil {
13336				var location string
13337				err = json.Unmarshal(*v, &location)
13338				if err != nil {
13339					return err
13340				}
13341				erp.Location = &location
13342			}
13343		case "tags":
13344			if v != nil {
13345				var tags map[string]*string
13346				err = json.Unmarshal(*v, &tags)
13347				if err != nil {
13348					return err
13349				}
13350				erp.Tags = tags
13351			}
13352		}
13353	}
13354
13355	return nil
13356}
13357
13358// ExpressRoutePortListResult response for ListExpressRoutePorts API service call.
13359type ExpressRoutePortListResult struct {
13360	autorest.Response `json:"-"`
13361	// Value - A list of ExpressRoutePort resources.
13362	Value *[]ExpressRoutePort `json:"value,omitempty"`
13363	// NextLink - The URL to get the next set of results.
13364	NextLink *string `json:"nextLink,omitempty"`
13365}
13366
13367// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values.
13368type ExpressRoutePortListResultIterator struct {
13369	i    int
13370	page ExpressRoutePortListResultPage
13371}
13372
13373// NextWithContext advances to the next value.  If there was an error making
13374// the request the iterator does not advance and the error is returned.
13375func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) {
13376	if tracing.IsEnabled() {
13377		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext")
13378		defer func() {
13379			sc := -1
13380			if iter.Response().Response.Response != nil {
13381				sc = iter.Response().Response.Response.StatusCode
13382			}
13383			tracing.EndSpan(ctx, sc, err)
13384		}()
13385	}
13386	iter.i++
13387	if iter.i < len(iter.page.Values()) {
13388		return nil
13389	}
13390	err = iter.page.NextWithContext(ctx)
13391	if err != nil {
13392		iter.i--
13393		return err
13394	}
13395	iter.i = 0
13396	return nil
13397}
13398
13399// Next advances to the next value.  If there was an error making
13400// the request the iterator does not advance and the error is returned.
13401// Deprecated: Use NextWithContext() instead.
13402func (iter *ExpressRoutePortListResultIterator) Next() error {
13403	return iter.NextWithContext(context.Background())
13404}
13405
13406// NotDone returns true if the enumeration should be started or is not yet complete.
13407func (iter ExpressRoutePortListResultIterator) NotDone() bool {
13408	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13409}
13410
13411// Response returns the raw server response from the last page request.
13412func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult {
13413	return iter.page.Response()
13414}
13415
13416// Value returns the current value or a zero-initialized value if the
13417// iterator has advanced beyond the end of the collection.
13418func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort {
13419	if !iter.page.NotDone() {
13420		return ExpressRoutePort{}
13421	}
13422	return iter.page.Values()[iter.i]
13423}
13424
13425// Creates a new instance of the ExpressRoutePortListResultIterator type.
13426func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator {
13427	return ExpressRoutePortListResultIterator{page: page}
13428}
13429
13430// IsEmpty returns true if the ListResult contains no values.
13431func (erplr ExpressRoutePortListResult) IsEmpty() bool {
13432	return erplr.Value == nil || len(*erplr.Value) == 0
13433}
13434
13435// hasNextLink returns true if the NextLink is not empty.
13436func (erplr ExpressRoutePortListResult) hasNextLink() bool {
13437	return erplr.NextLink != nil && len(*erplr.NextLink) != 0
13438}
13439
13440// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results.
13441// It returns nil if no more results exist.
13442func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) {
13443	if !erplr.hasNextLink() {
13444		return nil, nil
13445	}
13446	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13447		autorest.AsJSON(),
13448		autorest.AsGet(),
13449		autorest.WithBaseURL(to.String(erplr.NextLink)))
13450}
13451
13452// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values.
13453type ExpressRoutePortListResultPage struct {
13454	fn    func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)
13455	erplr ExpressRoutePortListResult
13456}
13457
13458// NextWithContext advances to the next page of values.  If there was an error making
13459// the request the page does not advance and the error is returned.
13460func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) {
13461	if tracing.IsEnabled() {
13462		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext")
13463		defer func() {
13464			sc := -1
13465			if page.Response().Response.Response != nil {
13466				sc = page.Response().Response.Response.StatusCode
13467			}
13468			tracing.EndSpan(ctx, sc, err)
13469		}()
13470	}
13471	for {
13472		next, err := page.fn(ctx, page.erplr)
13473		if err != nil {
13474			return err
13475		}
13476		page.erplr = next
13477		if !next.hasNextLink() || !next.IsEmpty() {
13478			break
13479		}
13480	}
13481	return nil
13482}
13483
13484// Next advances to the next page of values.  If there was an error making
13485// the request the page does not advance and the error is returned.
13486// Deprecated: Use NextWithContext() instead.
13487func (page *ExpressRoutePortListResultPage) Next() error {
13488	return page.NextWithContext(context.Background())
13489}
13490
13491// NotDone returns true if the page enumeration should be started or is not yet complete.
13492func (page ExpressRoutePortListResultPage) NotDone() bool {
13493	return !page.erplr.IsEmpty()
13494}
13495
13496// Response returns the raw server response from the last page request.
13497func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult {
13498	return page.erplr
13499}
13500
13501// Values returns the slice of values for the current page or nil if there are no values.
13502func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort {
13503	if page.erplr.IsEmpty() {
13504		return nil
13505	}
13506	return *page.erplr.Value
13507}
13508
13509// Creates a new instance of the ExpressRoutePortListResultPage type.
13510func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage {
13511	return ExpressRoutePortListResultPage{
13512		fn:    getNextPage,
13513		erplr: cur,
13514	}
13515}
13516
13517// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources.
13518type ExpressRoutePortPropertiesFormat struct {
13519	// PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically.
13520	PeeringLocation *string `json:"peeringLocation,omitempty"`
13521	// BandwidthInGbps - Bandwidth of procured ports in Gbps.
13522	BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"`
13523	// ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths.
13524	ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"`
13525	// Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s).
13526	Mtu *string `json:"mtu,omitempty"`
13527	// Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ'
13528	Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"`
13529	// EtherType - READ-ONLY; Ether type of the physical port.
13530	EtherType *string `json:"etherType,omitempty"`
13531	// AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization.
13532	AllocationDate *string `json:"allocationDate,omitempty"`
13533	// Links - The set of physical links of the ExpressRoutePort resource.
13534	Links *[]ExpressRouteLink `json:"links,omitempty"`
13535	// Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource.
13536	Circuits *[]SubResource `json:"circuits,omitempty"`
13537	// ProvisioningState - READ-ONLY; The provisioning state of the express route port resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
13538	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13539	// ResourceGUID - READ-ONLY; The resource GUID property of the express route port resource.
13540	ResourceGUID *string `json:"resourceGuid,omitempty"`
13541}
13542
13543// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat.
13544func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) {
13545	objectMap := make(map[string]interface{})
13546	if erppf.PeeringLocation != nil {
13547		objectMap["peeringLocation"] = erppf.PeeringLocation
13548	}
13549	if erppf.BandwidthInGbps != nil {
13550		objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps
13551	}
13552	if erppf.Encapsulation != "" {
13553		objectMap["encapsulation"] = erppf.Encapsulation
13554	}
13555	if erppf.Links != nil {
13556		objectMap["links"] = erppf.Links
13557	}
13558	return json.Marshal(objectMap)
13559}
13560
13561// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13562// long-running operation.
13563type ExpressRoutePortsCreateOrUpdateFuture struct {
13564	azure.FutureAPI
13565	// Result returns the result of the asynchronous operation.
13566	// If the operation has not completed it will return an error.
13567	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
13568}
13569
13570// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13571func (future *ExpressRoutePortsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13572	var azFuture azure.Future
13573	if err := json.Unmarshal(body, &azFuture); err != nil {
13574		return err
13575	}
13576	future.FutureAPI = &azFuture
13577	future.Result = future.result
13578	return nil
13579}
13580
13581// result is the default implementation for ExpressRoutePortsCreateOrUpdateFuture.Result.
13582func (future *ExpressRoutePortsCreateOrUpdateFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
13583	var done bool
13584	done, err = future.DoneWithContext(context.Background(), client)
13585	if err != nil {
13586		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13587		return
13588	}
13589	if !done {
13590		erp.Response.Response = future.Response()
13591		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsCreateOrUpdateFuture")
13592		return
13593	}
13594	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13595	if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
13596		erp, err = client.CreateOrUpdateResponder(erp.Response.Response)
13597		if err != nil {
13598			err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", erp.Response.Response, "Failure responding to request")
13599		}
13600	}
13601	return
13602}
13603
13604// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13605// operation.
13606type ExpressRoutePortsDeleteFuture struct {
13607	azure.FutureAPI
13608	// Result returns the result of the asynchronous operation.
13609	// If the operation has not completed it will return an error.
13610	Result func(ExpressRoutePortsClient) (autorest.Response, error)
13611}
13612
13613// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13614func (future *ExpressRoutePortsDeleteFuture) UnmarshalJSON(body []byte) error {
13615	var azFuture azure.Future
13616	if err := json.Unmarshal(body, &azFuture); err != nil {
13617		return err
13618	}
13619	future.FutureAPI = &azFuture
13620	future.Result = future.result
13621	return nil
13622}
13623
13624// result is the default implementation for ExpressRoutePortsDeleteFuture.Result.
13625func (future *ExpressRoutePortsDeleteFuture) result(client ExpressRoutePortsClient) (ar autorest.Response, err error) {
13626	var done bool
13627	done, err = future.DoneWithContext(context.Background(), client)
13628	if err != nil {
13629		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsDeleteFuture", "Result", future.Response(), "Polling failure")
13630		return
13631	}
13632	if !done {
13633		ar.Response = future.Response()
13634		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsDeleteFuture")
13635		return
13636	}
13637	ar.Response = future.Response()
13638	return
13639}
13640
13641// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
13642type ExpressRoutePortsLocation struct {
13643	autorest.Response `json:"-"`
13644	// ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties.
13645	*ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"`
13646	// ID - Resource ID.
13647	ID *string `json:"id,omitempty"`
13648	// Name - READ-ONLY; Resource name.
13649	Name *string `json:"name,omitempty"`
13650	// Type - READ-ONLY; Resource type.
13651	Type *string `json:"type,omitempty"`
13652	// Location - Resource location.
13653	Location *string `json:"location,omitempty"`
13654	// Tags - Resource tags.
13655	Tags map[string]*string `json:"tags"`
13656}
13657
13658// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation.
13659func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) {
13660	objectMap := make(map[string]interface{})
13661	if erpl.ExpressRoutePortsLocationPropertiesFormat != nil {
13662		objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat
13663	}
13664	if erpl.ID != nil {
13665		objectMap["id"] = erpl.ID
13666	}
13667	if erpl.Location != nil {
13668		objectMap["location"] = erpl.Location
13669	}
13670	if erpl.Tags != nil {
13671		objectMap["tags"] = erpl.Tags
13672	}
13673	return json.Marshal(objectMap)
13674}
13675
13676// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct.
13677func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error {
13678	var m map[string]*json.RawMessage
13679	err := json.Unmarshal(body, &m)
13680	if err != nil {
13681		return err
13682	}
13683	for k, v := range m {
13684		switch k {
13685		case "properties":
13686			if v != nil {
13687				var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat
13688				err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat)
13689				if err != nil {
13690					return err
13691				}
13692				erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat
13693			}
13694		case "id":
13695			if v != nil {
13696				var ID string
13697				err = json.Unmarshal(*v, &ID)
13698				if err != nil {
13699					return err
13700				}
13701				erpl.ID = &ID
13702			}
13703		case "name":
13704			if v != nil {
13705				var name string
13706				err = json.Unmarshal(*v, &name)
13707				if err != nil {
13708					return err
13709				}
13710				erpl.Name = &name
13711			}
13712		case "type":
13713			if v != nil {
13714				var typeVar string
13715				err = json.Unmarshal(*v, &typeVar)
13716				if err != nil {
13717					return err
13718				}
13719				erpl.Type = &typeVar
13720			}
13721		case "location":
13722			if v != nil {
13723				var location string
13724				err = json.Unmarshal(*v, &location)
13725				if err != nil {
13726					return err
13727				}
13728				erpl.Location = &location
13729			}
13730		case "tags":
13731			if v != nil {
13732				var tags map[string]*string
13733				err = json.Unmarshal(*v, &tags)
13734				if err != nil {
13735					return err
13736				}
13737				erpl.Tags = tags
13738			}
13739		}
13740	}
13741
13742	return nil
13743}
13744
13745// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths.
13746type ExpressRoutePortsLocationBandwidths struct {
13747	// OfferName - READ-ONLY; Bandwidth descriptive name.
13748	OfferName *string `json:"offerName,omitempty"`
13749	// ValueInGbps - READ-ONLY; Bandwidth value in Gbps.
13750	ValueInGbps *int32 `json:"valueInGbps,omitempty"`
13751}
13752
13753// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationBandwidths.
13754func (erplb ExpressRoutePortsLocationBandwidths) MarshalJSON() ([]byte, error) {
13755	objectMap := make(map[string]interface{})
13756	return json.Marshal(objectMap)
13757}
13758
13759// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
13760type ExpressRoutePortsLocationListResult struct {
13761	autorest.Response `json:"-"`
13762	// Value - The list of all ExpressRoutePort peering locations.
13763	Value *[]ExpressRoutePortsLocation `json:"value,omitempty"`
13764	// NextLink - The URL to get the next set of results.
13765	NextLink *string `json:"nextLink,omitempty"`
13766}
13767
13768// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of
13769// ExpressRoutePortsLocation values.
13770type ExpressRoutePortsLocationListResultIterator struct {
13771	i    int
13772	page ExpressRoutePortsLocationListResultPage
13773}
13774
13775// NextWithContext advances to the next value.  If there was an error making
13776// the request the iterator does not advance and the error is returned.
13777func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
13778	if tracing.IsEnabled() {
13779		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext")
13780		defer func() {
13781			sc := -1
13782			if iter.Response().Response.Response != nil {
13783				sc = iter.Response().Response.Response.StatusCode
13784			}
13785			tracing.EndSpan(ctx, sc, err)
13786		}()
13787	}
13788	iter.i++
13789	if iter.i < len(iter.page.Values()) {
13790		return nil
13791	}
13792	err = iter.page.NextWithContext(ctx)
13793	if err != nil {
13794		iter.i--
13795		return err
13796	}
13797	iter.i = 0
13798	return nil
13799}
13800
13801// Next advances to the next value.  If there was an error making
13802// the request the iterator does not advance and the error is returned.
13803// Deprecated: Use NextWithContext() instead.
13804func (iter *ExpressRoutePortsLocationListResultIterator) Next() error {
13805	return iter.NextWithContext(context.Background())
13806}
13807
13808// NotDone returns true if the enumeration should be started or is not yet complete.
13809func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool {
13810	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13811}
13812
13813// Response returns the raw server response from the last page request.
13814func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult {
13815	return iter.page.Response()
13816}
13817
13818// Value returns the current value or a zero-initialized value if the
13819// iterator has advanced beyond the end of the collection.
13820func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation {
13821	if !iter.page.NotDone() {
13822		return ExpressRoutePortsLocation{}
13823	}
13824	return iter.page.Values()[iter.i]
13825}
13826
13827// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type.
13828func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator {
13829	return ExpressRoutePortsLocationListResultIterator{page: page}
13830}
13831
13832// IsEmpty returns true if the ListResult contains no values.
13833func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool {
13834	return erpllr.Value == nil || len(*erpllr.Value) == 0
13835}
13836
13837// hasNextLink returns true if the NextLink is not empty.
13838func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool {
13839	return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0
13840}
13841
13842// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results.
13843// It returns nil if no more results exist.
13844func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) {
13845	if !erpllr.hasNextLink() {
13846		return nil, nil
13847	}
13848	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13849		autorest.AsJSON(),
13850		autorest.AsGet(),
13851		autorest.WithBaseURL(to.String(erpllr.NextLink)))
13852}
13853
13854// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values.
13855type ExpressRoutePortsLocationListResultPage struct {
13856	fn     func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)
13857	erpllr ExpressRoutePortsLocationListResult
13858}
13859
13860// NextWithContext advances to the next page of values.  If there was an error making
13861// the request the page does not advance and the error is returned.
13862func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) {
13863	if tracing.IsEnabled() {
13864		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext")
13865		defer func() {
13866			sc := -1
13867			if page.Response().Response.Response != nil {
13868				sc = page.Response().Response.Response.StatusCode
13869			}
13870			tracing.EndSpan(ctx, sc, err)
13871		}()
13872	}
13873	for {
13874		next, err := page.fn(ctx, page.erpllr)
13875		if err != nil {
13876			return err
13877		}
13878		page.erpllr = next
13879		if !next.hasNextLink() || !next.IsEmpty() {
13880			break
13881		}
13882	}
13883	return nil
13884}
13885
13886// Next advances to the next page of values.  If there was an error making
13887// the request the page does not advance and the error is returned.
13888// Deprecated: Use NextWithContext() instead.
13889func (page *ExpressRoutePortsLocationListResultPage) Next() error {
13890	return page.NextWithContext(context.Background())
13891}
13892
13893// NotDone returns true if the page enumeration should be started or is not yet complete.
13894func (page ExpressRoutePortsLocationListResultPage) NotDone() bool {
13895	return !page.erpllr.IsEmpty()
13896}
13897
13898// Response returns the raw server response from the last page request.
13899func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult {
13900	return page.erpllr
13901}
13902
13903// Values returns the slice of values for the current page or nil if there are no values.
13904func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation {
13905	if page.erpllr.IsEmpty() {
13906		return nil
13907	}
13908	return *page.erpllr.Value
13909}
13910
13911// Creates a new instance of the ExpressRoutePortsLocationListResultPage type.
13912func NewExpressRoutePortsLocationListResultPage(cur ExpressRoutePortsLocationListResult, getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage {
13913	return ExpressRoutePortsLocationListResultPage{
13914		fn:     getNextPage,
13915		erpllr: cur,
13916	}
13917}
13918
13919// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location
13920// resources.
13921type ExpressRoutePortsLocationPropertiesFormat struct {
13922	// Address - READ-ONLY; Address of peering location.
13923	Address *string `json:"address,omitempty"`
13924	// Contact - READ-ONLY; Contact details of peering locations.
13925	Contact *string `json:"contact,omitempty"`
13926	// AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths.
13927	AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"`
13928	// ProvisioningState - READ-ONLY; The provisioning state of the express route port location resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
13929	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13930}
13931
13932// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat.
13933func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) {
13934	objectMap := make(map[string]interface{})
13935	if erplpf.AvailableBandwidths != nil {
13936		objectMap["availableBandwidths"] = erplpf.AvailableBandwidths
13937	}
13938	return json.Marshal(objectMap)
13939}
13940
13941// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
13942type ExpressRouteServiceProvider struct {
13943	// ExpressRouteServiceProviderPropertiesFormat - Properties of the express route service provider.
13944	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
13945	// ID - Resource ID.
13946	ID *string `json:"id,omitempty"`
13947	// Name - READ-ONLY; Resource name.
13948	Name *string `json:"name,omitempty"`
13949	// Type - READ-ONLY; Resource type.
13950	Type *string `json:"type,omitempty"`
13951	// Location - Resource location.
13952	Location *string `json:"location,omitempty"`
13953	// Tags - Resource tags.
13954	Tags map[string]*string `json:"tags"`
13955}
13956
13957// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
13958func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
13959	objectMap := make(map[string]interface{})
13960	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
13961		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
13962	}
13963	if ersp.ID != nil {
13964		objectMap["id"] = ersp.ID
13965	}
13966	if ersp.Location != nil {
13967		objectMap["location"] = ersp.Location
13968	}
13969	if ersp.Tags != nil {
13970		objectMap["tags"] = ersp.Tags
13971	}
13972	return json.Marshal(objectMap)
13973}
13974
13975// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
13976func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
13977	var m map[string]*json.RawMessage
13978	err := json.Unmarshal(body, &m)
13979	if err != nil {
13980		return err
13981	}
13982	for k, v := range m {
13983		switch k {
13984		case "properties":
13985			if v != nil {
13986				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
13987				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
13988				if err != nil {
13989					return err
13990				}
13991				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
13992			}
13993		case "id":
13994			if v != nil {
13995				var ID string
13996				err = json.Unmarshal(*v, &ID)
13997				if err != nil {
13998					return err
13999				}
14000				ersp.ID = &ID
14001			}
14002		case "name":
14003			if v != nil {
14004				var name string
14005				err = json.Unmarshal(*v, &name)
14006				if err != nil {
14007					return err
14008				}
14009				ersp.Name = &name
14010			}
14011		case "type":
14012			if v != nil {
14013				var typeVar string
14014				err = json.Unmarshal(*v, &typeVar)
14015				if err != nil {
14016					return err
14017				}
14018				ersp.Type = &typeVar
14019			}
14020		case "location":
14021			if v != nil {
14022				var location string
14023				err = json.Unmarshal(*v, &location)
14024				if err != nil {
14025					return err
14026				}
14027				ersp.Location = &location
14028			}
14029		case "tags":
14030			if v != nil {
14031				var tags map[string]*string
14032				err = json.Unmarshal(*v, &tags)
14033				if err != nil {
14034					return err
14035				}
14036				ersp.Tags = tags
14037			}
14038		}
14039	}
14040
14041	return nil
14042}
14043
14044// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
14045// resources.
14046type ExpressRouteServiceProviderBandwidthsOffered struct {
14047	// OfferName - The OfferName.
14048	OfferName *string `json:"offerName,omitempty"`
14049	// ValueInMbps - The ValueInMbps.
14050	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
14051}
14052
14053// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
14054type ExpressRouteServiceProviderListResult struct {
14055	autorest.Response `json:"-"`
14056	// Value - A list of ExpressRouteResourceProvider resources.
14057	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
14058	// NextLink - The URL to get the next set of results.
14059	NextLink *string `json:"nextLink,omitempty"`
14060}
14061
14062// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
14063// ExpressRouteServiceProvider values.
14064type ExpressRouteServiceProviderListResultIterator struct {
14065	i    int
14066	page ExpressRouteServiceProviderListResultPage
14067}
14068
14069// NextWithContext advances to the next value.  If there was an error making
14070// the request the iterator does not advance and the error is returned.
14071func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
14072	if tracing.IsEnabled() {
14073		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
14074		defer func() {
14075			sc := -1
14076			if iter.Response().Response.Response != nil {
14077				sc = iter.Response().Response.Response.StatusCode
14078			}
14079			tracing.EndSpan(ctx, sc, err)
14080		}()
14081	}
14082	iter.i++
14083	if iter.i < len(iter.page.Values()) {
14084		return nil
14085	}
14086	err = iter.page.NextWithContext(ctx)
14087	if err != nil {
14088		iter.i--
14089		return err
14090	}
14091	iter.i = 0
14092	return nil
14093}
14094
14095// Next advances to the next value.  If there was an error making
14096// the request the iterator does not advance and the error is returned.
14097// Deprecated: Use NextWithContext() instead.
14098func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
14099	return iter.NextWithContext(context.Background())
14100}
14101
14102// NotDone returns true if the enumeration should be started or is not yet complete.
14103func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
14104	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14105}
14106
14107// Response returns the raw server response from the last page request.
14108func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
14109	return iter.page.Response()
14110}
14111
14112// Value returns the current value or a zero-initialized value if the
14113// iterator has advanced beyond the end of the collection.
14114func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
14115	if !iter.page.NotDone() {
14116		return ExpressRouteServiceProvider{}
14117	}
14118	return iter.page.Values()[iter.i]
14119}
14120
14121// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
14122func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
14123	return ExpressRouteServiceProviderListResultIterator{page: page}
14124}
14125
14126// IsEmpty returns true if the ListResult contains no values.
14127func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
14128	return ersplr.Value == nil || len(*ersplr.Value) == 0
14129}
14130
14131// hasNextLink returns true if the NextLink is not empty.
14132func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
14133	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
14134}
14135
14136// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
14137// It returns nil if no more results exist.
14138func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
14139	if !ersplr.hasNextLink() {
14140		return nil, nil
14141	}
14142	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14143		autorest.AsJSON(),
14144		autorest.AsGet(),
14145		autorest.WithBaseURL(to.String(ersplr.NextLink)))
14146}
14147
14148// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
14149type ExpressRouteServiceProviderListResultPage struct {
14150	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
14151	ersplr ExpressRouteServiceProviderListResult
14152}
14153
14154// NextWithContext advances to the next page of values.  If there was an error making
14155// the request the page does not advance and the error is returned.
14156func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
14157	if tracing.IsEnabled() {
14158		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
14159		defer func() {
14160			sc := -1
14161			if page.Response().Response.Response != nil {
14162				sc = page.Response().Response.Response.StatusCode
14163			}
14164			tracing.EndSpan(ctx, sc, err)
14165		}()
14166	}
14167	for {
14168		next, err := page.fn(ctx, page.ersplr)
14169		if err != nil {
14170			return err
14171		}
14172		page.ersplr = next
14173		if !next.hasNextLink() || !next.IsEmpty() {
14174			break
14175		}
14176	}
14177	return nil
14178}
14179
14180// Next advances to the next page of values.  If there was an error making
14181// the request the page does not advance and the error is returned.
14182// Deprecated: Use NextWithContext() instead.
14183func (page *ExpressRouteServiceProviderListResultPage) Next() error {
14184	return page.NextWithContext(context.Background())
14185}
14186
14187// NotDone returns true if the page enumeration should be started or is not yet complete.
14188func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
14189	return !page.ersplr.IsEmpty()
14190}
14191
14192// Response returns the raw server response from the last page request.
14193func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
14194	return page.ersplr
14195}
14196
14197// Values returns the slice of values for the current page or nil if there are no values.
14198func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
14199	if page.ersplr.IsEmpty() {
14200		return nil
14201	}
14202	return *page.ersplr.Value
14203}
14204
14205// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
14206func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
14207	return ExpressRouteServiceProviderListResultPage{
14208		fn:     getNextPage,
14209		ersplr: cur,
14210	}
14211}
14212
14213// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
14214type ExpressRouteServiceProviderPropertiesFormat struct {
14215	// PeeringLocations - A list of peering locations.
14216	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
14217	// BandwidthsOffered - A list of bandwidths offered.
14218	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
14219	// ProvisioningState - READ-ONLY; The provisioning state of the express route service provider resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
14220	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14221}
14222
14223// MarshalJSON is the custom marshaler for ExpressRouteServiceProviderPropertiesFormat.
14224func (ersppf ExpressRouteServiceProviderPropertiesFormat) MarshalJSON() ([]byte, error) {
14225	objectMap := make(map[string]interface{})
14226	if ersppf.PeeringLocations != nil {
14227		objectMap["peeringLocations"] = ersppf.PeeringLocations
14228	}
14229	if ersppf.BandwidthsOffered != nil {
14230		objectMap["bandwidthsOffered"] = ersppf.BandwidthsOffered
14231	}
14232	return json.Marshal(objectMap)
14233}
14234
14235// FirewallPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14236// long-running operation.
14237type FirewallPoliciesCreateOrUpdateFuture struct {
14238	azure.FutureAPI
14239	// Result returns the result of the asynchronous operation.
14240	// If the operation has not completed it will return an error.
14241	Result func(FirewallPoliciesClient) (FirewallPolicy, error)
14242}
14243
14244// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14245func (future *FirewallPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14246	var azFuture azure.Future
14247	if err := json.Unmarshal(body, &azFuture); err != nil {
14248		return err
14249	}
14250	future.FutureAPI = &azFuture
14251	future.Result = future.result
14252	return nil
14253}
14254
14255// result is the default implementation for FirewallPoliciesCreateOrUpdateFuture.Result.
14256func (future *FirewallPoliciesCreateOrUpdateFuture) result(client FirewallPoliciesClient) (fp FirewallPolicy, err error) {
14257	var done bool
14258	done, err = future.DoneWithContext(context.Background(), client)
14259	if err != nil {
14260		err = autorest.NewErrorWithError(err, "network.FirewallPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14261		return
14262	}
14263	if !done {
14264		fp.Response.Response = future.Response()
14265		err = azure.NewAsyncOpIncompleteError("network.FirewallPoliciesCreateOrUpdateFuture")
14266		return
14267	}
14268	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14269	if fp.Response.Response, err = future.GetResult(sender); err == nil && fp.Response.Response.StatusCode != http.StatusNoContent {
14270		fp, err = client.CreateOrUpdateResponder(fp.Response.Response)
14271		if err != nil {
14272			err = autorest.NewErrorWithError(err, "network.FirewallPoliciesCreateOrUpdateFuture", "Result", fp.Response.Response, "Failure responding to request")
14273		}
14274	}
14275	return
14276}
14277
14278// FirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14279// operation.
14280type FirewallPoliciesDeleteFuture struct {
14281	azure.FutureAPI
14282	// Result returns the result of the asynchronous operation.
14283	// If the operation has not completed it will return an error.
14284	Result func(FirewallPoliciesClient) (autorest.Response, error)
14285}
14286
14287// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14288func (future *FirewallPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
14289	var azFuture azure.Future
14290	if err := json.Unmarshal(body, &azFuture); err != nil {
14291		return err
14292	}
14293	future.FutureAPI = &azFuture
14294	future.Result = future.result
14295	return nil
14296}
14297
14298// result is the default implementation for FirewallPoliciesDeleteFuture.Result.
14299func (future *FirewallPoliciesDeleteFuture) result(client FirewallPoliciesClient) (ar autorest.Response, err error) {
14300	var done bool
14301	done, err = future.DoneWithContext(context.Background(), client)
14302	if err != nil {
14303		err = autorest.NewErrorWithError(err, "network.FirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
14304		return
14305	}
14306	if !done {
14307		ar.Response = future.Response()
14308		err = azure.NewAsyncOpIncompleteError("network.FirewallPoliciesDeleteFuture")
14309		return
14310	}
14311	ar.Response = future.Response()
14312	return
14313}
14314
14315// FirewallPolicy firewallPolicy Resource.
14316type FirewallPolicy struct {
14317	autorest.Response `json:"-"`
14318	// FirewallPolicyPropertiesFormat - Properties of the firewall policy.
14319	*FirewallPolicyPropertiesFormat `json:"properties,omitempty"`
14320	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
14321	Etag *string `json:"etag,omitempty"`
14322	// ID - Resource ID.
14323	ID *string `json:"id,omitempty"`
14324	// Name - READ-ONLY; Resource name.
14325	Name *string `json:"name,omitempty"`
14326	// Type - READ-ONLY; Resource type.
14327	Type *string `json:"type,omitempty"`
14328	// Location - Resource location.
14329	Location *string `json:"location,omitempty"`
14330	// Tags - Resource tags.
14331	Tags map[string]*string `json:"tags"`
14332}
14333
14334// MarshalJSON is the custom marshaler for FirewallPolicy.
14335func (fp FirewallPolicy) MarshalJSON() ([]byte, error) {
14336	objectMap := make(map[string]interface{})
14337	if fp.FirewallPolicyPropertiesFormat != nil {
14338		objectMap["properties"] = fp.FirewallPolicyPropertiesFormat
14339	}
14340	if fp.ID != nil {
14341		objectMap["id"] = fp.ID
14342	}
14343	if fp.Location != nil {
14344		objectMap["location"] = fp.Location
14345	}
14346	if fp.Tags != nil {
14347		objectMap["tags"] = fp.Tags
14348	}
14349	return json.Marshal(objectMap)
14350}
14351
14352// UnmarshalJSON is the custom unmarshaler for FirewallPolicy struct.
14353func (fp *FirewallPolicy) UnmarshalJSON(body []byte) error {
14354	var m map[string]*json.RawMessage
14355	err := json.Unmarshal(body, &m)
14356	if err != nil {
14357		return err
14358	}
14359	for k, v := range m {
14360		switch k {
14361		case "properties":
14362			if v != nil {
14363				var firewallPolicyPropertiesFormat FirewallPolicyPropertiesFormat
14364				err = json.Unmarshal(*v, &firewallPolicyPropertiesFormat)
14365				if err != nil {
14366					return err
14367				}
14368				fp.FirewallPolicyPropertiesFormat = &firewallPolicyPropertiesFormat
14369			}
14370		case "etag":
14371			if v != nil {
14372				var etag string
14373				err = json.Unmarshal(*v, &etag)
14374				if err != nil {
14375					return err
14376				}
14377				fp.Etag = &etag
14378			}
14379		case "id":
14380			if v != nil {
14381				var ID string
14382				err = json.Unmarshal(*v, &ID)
14383				if err != nil {
14384					return err
14385				}
14386				fp.ID = &ID
14387			}
14388		case "name":
14389			if v != nil {
14390				var name string
14391				err = json.Unmarshal(*v, &name)
14392				if err != nil {
14393					return err
14394				}
14395				fp.Name = &name
14396			}
14397		case "type":
14398			if v != nil {
14399				var typeVar string
14400				err = json.Unmarshal(*v, &typeVar)
14401				if err != nil {
14402					return err
14403				}
14404				fp.Type = &typeVar
14405			}
14406		case "location":
14407			if v != nil {
14408				var location string
14409				err = json.Unmarshal(*v, &location)
14410				if err != nil {
14411					return err
14412				}
14413				fp.Location = &location
14414			}
14415		case "tags":
14416			if v != nil {
14417				var tags map[string]*string
14418				err = json.Unmarshal(*v, &tags)
14419				if err != nil {
14420					return err
14421				}
14422				fp.Tags = tags
14423			}
14424		}
14425	}
14426
14427	return nil
14428}
14429
14430// FirewallPolicyFilterRule firewall Policy Filter Rule.
14431type FirewallPolicyFilterRule struct {
14432	// Action - The action type of a Filter rule.
14433	Action *FirewallPolicyFilterRuleAction `json:"action,omitempty"`
14434	// RuleConditions - Collection of rule conditions used by a rule.
14435	RuleConditions *[]BasicFirewallPolicyRuleCondition `json:"ruleConditions,omitempty"`
14436	// Name - The name of the rule.
14437	Name *string `json:"name,omitempty"`
14438	// Priority - Priority of the Firewall Policy Rule resource.
14439	Priority *int32 `json:"priority,omitempty"`
14440	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule'
14441	RuleType RuleType `json:"ruleType,omitempty"`
14442}
14443
14444// MarshalJSON is the custom marshaler for FirewallPolicyFilterRule.
14445func (fpfr FirewallPolicyFilterRule) MarshalJSON() ([]byte, error) {
14446	fpfr.RuleType = RuleTypeFirewallPolicyFilterRule
14447	objectMap := make(map[string]interface{})
14448	if fpfr.Action != nil {
14449		objectMap["action"] = fpfr.Action
14450	}
14451	if fpfr.RuleConditions != nil {
14452		objectMap["ruleConditions"] = fpfr.RuleConditions
14453	}
14454	if fpfr.Name != nil {
14455		objectMap["name"] = fpfr.Name
14456	}
14457	if fpfr.Priority != nil {
14458		objectMap["priority"] = fpfr.Priority
14459	}
14460	if fpfr.RuleType != "" {
14461		objectMap["ruleType"] = fpfr.RuleType
14462	}
14463	return json.Marshal(objectMap)
14464}
14465
14466// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
14467func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) {
14468	return nil, false
14469}
14470
14471// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
14472func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) {
14473	return &fpfr, true
14474}
14475
14476// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
14477func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
14478	return nil, false
14479}
14480
14481// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
14482func (fpfr FirewallPolicyFilterRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
14483	return &fpfr, true
14484}
14485
14486// UnmarshalJSON is the custom unmarshaler for FirewallPolicyFilterRule struct.
14487func (fpfr *FirewallPolicyFilterRule) UnmarshalJSON(body []byte) error {
14488	var m map[string]*json.RawMessage
14489	err := json.Unmarshal(body, &m)
14490	if err != nil {
14491		return err
14492	}
14493	for k, v := range m {
14494		switch k {
14495		case "action":
14496			if v != nil {
14497				var action FirewallPolicyFilterRuleAction
14498				err = json.Unmarshal(*v, &action)
14499				if err != nil {
14500					return err
14501				}
14502				fpfr.Action = &action
14503			}
14504		case "ruleConditions":
14505			if v != nil {
14506				ruleConditions, err := unmarshalBasicFirewallPolicyRuleConditionArray(*v)
14507				if err != nil {
14508					return err
14509				}
14510				fpfr.RuleConditions = &ruleConditions
14511			}
14512		case "name":
14513			if v != nil {
14514				var name string
14515				err = json.Unmarshal(*v, &name)
14516				if err != nil {
14517					return err
14518				}
14519				fpfr.Name = &name
14520			}
14521		case "priority":
14522			if v != nil {
14523				var priority int32
14524				err = json.Unmarshal(*v, &priority)
14525				if err != nil {
14526					return err
14527				}
14528				fpfr.Priority = &priority
14529			}
14530		case "ruleType":
14531			if v != nil {
14532				var ruleType RuleType
14533				err = json.Unmarshal(*v, &ruleType)
14534				if err != nil {
14535					return err
14536				}
14537				fpfr.RuleType = ruleType
14538			}
14539		}
14540	}
14541
14542	return nil
14543}
14544
14545// FirewallPolicyFilterRuleAction properties of the FirewallPolicyFilterRuleAction.
14546type FirewallPolicyFilterRuleAction struct {
14547	// Type - The type of action. Possible values include: 'FirewallPolicyFilterRuleActionTypeAllow', 'FirewallPolicyFilterRuleActionTypeDeny'
14548	Type FirewallPolicyFilterRuleActionType `json:"type,omitempty"`
14549}
14550
14551// FirewallPolicyListResult response for ListFirewallPolicies API service call.
14552type FirewallPolicyListResult struct {
14553	autorest.Response `json:"-"`
14554	// Value - List of Firewall Policies in a resource group.
14555	Value *[]FirewallPolicy `json:"value,omitempty"`
14556	// NextLink - URL to get the next set of results.
14557	NextLink *string `json:"nextLink,omitempty"`
14558}
14559
14560// FirewallPolicyListResultIterator provides access to a complete listing of FirewallPolicy values.
14561type FirewallPolicyListResultIterator struct {
14562	i    int
14563	page FirewallPolicyListResultPage
14564}
14565
14566// NextWithContext advances to the next value.  If there was an error making
14567// the request the iterator does not advance and the error is returned.
14568func (iter *FirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
14569	if tracing.IsEnabled() {
14570		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultIterator.NextWithContext")
14571		defer func() {
14572			sc := -1
14573			if iter.Response().Response.Response != nil {
14574				sc = iter.Response().Response.Response.StatusCode
14575			}
14576			tracing.EndSpan(ctx, sc, err)
14577		}()
14578	}
14579	iter.i++
14580	if iter.i < len(iter.page.Values()) {
14581		return nil
14582	}
14583	err = iter.page.NextWithContext(ctx)
14584	if err != nil {
14585		iter.i--
14586		return err
14587	}
14588	iter.i = 0
14589	return nil
14590}
14591
14592// Next advances to the next value.  If there was an error making
14593// the request the iterator does not advance and the error is returned.
14594// Deprecated: Use NextWithContext() instead.
14595func (iter *FirewallPolicyListResultIterator) Next() error {
14596	return iter.NextWithContext(context.Background())
14597}
14598
14599// NotDone returns true if the enumeration should be started or is not yet complete.
14600func (iter FirewallPolicyListResultIterator) NotDone() bool {
14601	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14602}
14603
14604// Response returns the raw server response from the last page request.
14605func (iter FirewallPolicyListResultIterator) Response() FirewallPolicyListResult {
14606	return iter.page.Response()
14607}
14608
14609// Value returns the current value or a zero-initialized value if the
14610// iterator has advanced beyond the end of the collection.
14611func (iter FirewallPolicyListResultIterator) Value() FirewallPolicy {
14612	if !iter.page.NotDone() {
14613		return FirewallPolicy{}
14614	}
14615	return iter.page.Values()[iter.i]
14616}
14617
14618// Creates a new instance of the FirewallPolicyListResultIterator type.
14619func NewFirewallPolicyListResultIterator(page FirewallPolicyListResultPage) FirewallPolicyListResultIterator {
14620	return FirewallPolicyListResultIterator{page: page}
14621}
14622
14623// IsEmpty returns true if the ListResult contains no values.
14624func (fplr FirewallPolicyListResult) IsEmpty() bool {
14625	return fplr.Value == nil || len(*fplr.Value) == 0
14626}
14627
14628// hasNextLink returns true if the NextLink is not empty.
14629func (fplr FirewallPolicyListResult) hasNextLink() bool {
14630	return fplr.NextLink != nil && len(*fplr.NextLink) != 0
14631}
14632
14633// firewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
14634// It returns nil if no more results exist.
14635func (fplr FirewallPolicyListResult) firewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
14636	if !fplr.hasNextLink() {
14637		return nil, nil
14638	}
14639	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14640		autorest.AsJSON(),
14641		autorest.AsGet(),
14642		autorest.WithBaseURL(to.String(fplr.NextLink)))
14643}
14644
14645// FirewallPolicyListResultPage contains a page of FirewallPolicy values.
14646type FirewallPolicyListResultPage struct {
14647	fn   func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)
14648	fplr FirewallPolicyListResult
14649}
14650
14651// NextWithContext advances to the next page of values.  If there was an error making
14652// the request the page does not advance and the error is returned.
14653func (page *FirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
14654	if tracing.IsEnabled() {
14655		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultPage.NextWithContext")
14656		defer func() {
14657			sc := -1
14658			if page.Response().Response.Response != nil {
14659				sc = page.Response().Response.Response.StatusCode
14660			}
14661			tracing.EndSpan(ctx, sc, err)
14662		}()
14663	}
14664	for {
14665		next, err := page.fn(ctx, page.fplr)
14666		if err != nil {
14667			return err
14668		}
14669		page.fplr = next
14670		if !next.hasNextLink() || !next.IsEmpty() {
14671			break
14672		}
14673	}
14674	return nil
14675}
14676
14677// Next advances to the next page of values.  If there was an error making
14678// the request the page does not advance and the error is returned.
14679// Deprecated: Use NextWithContext() instead.
14680func (page *FirewallPolicyListResultPage) Next() error {
14681	return page.NextWithContext(context.Background())
14682}
14683
14684// NotDone returns true if the page enumeration should be started or is not yet complete.
14685func (page FirewallPolicyListResultPage) NotDone() bool {
14686	return !page.fplr.IsEmpty()
14687}
14688
14689// Response returns the raw server response from the last page request.
14690func (page FirewallPolicyListResultPage) Response() FirewallPolicyListResult {
14691	return page.fplr
14692}
14693
14694// Values returns the slice of values for the current page or nil if there are no values.
14695func (page FirewallPolicyListResultPage) Values() []FirewallPolicy {
14696	if page.fplr.IsEmpty() {
14697		return nil
14698	}
14699	return *page.fplr.Value
14700}
14701
14702// Creates a new instance of the FirewallPolicyListResultPage type.
14703func NewFirewallPolicyListResultPage(cur FirewallPolicyListResult, getNextPage func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)) FirewallPolicyListResultPage {
14704	return FirewallPolicyListResultPage{
14705		fn:   getNextPage,
14706		fplr: cur,
14707	}
14708}
14709
14710// FirewallPolicyNatRule firewall Policy NAT Rule.
14711type FirewallPolicyNatRule struct {
14712	// Action - The action type of a Nat rule.
14713	Action *FirewallPolicyNatRuleAction `json:"action,omitempty"`
14714	// TranslatedAddress - The translated address for this NAT rule.
14715	TranslatedAddress *string `json:"translatedAddress,omitempty"`
14716	// TranslatedPort - The translated port for this NAT rule.
14717	TranslatedPort *string `json:"translatedPort,omitempty"`
14718	// RuleCondition - The match conditions for incoming traffic.
14719	RuleCondition BasicFirewallPolicyRuleCondition `json:"ruleCondition,omitempty"`
14720	// Name - The name of the rule.
14721	Name *string `json:"name,omitempty"`
14722	// Priority - Priority of the Firewall Policy Rule resource.
14723	Priority *int32 `json:"priority,omitempty"`
14724	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule'
14725	RuleType RuleType `json:"ruleType,omitempty"`
14726}
14727
14728// MarshalJSON is the custom marshaler for FirewallPolicyNatRule.
14729func (fpnr FirewallPolicyNatRule) MarshalJSON() ([]byte, error) {
14730	fpnr.RuleType = RuleTypeFirewallPolicyNatRule
14731	objectMap := make(map[string]interface{})
14732	if fpnr.Action != nil {
14733		objectMap["action"] = fpnr.Action
14734	}
14735	if fpnr.TranslatedAddress != nil {
14736		objectMap["translatedAddress"] = fpnr.TranslatedAddress
14737	}
14738	if fpnr.TranslatedPort != nil {
14739		objectMap["translatedPort"] = fpnr.TranslatedPort
14740	}
14741	objectMap["ruleCondition"] = fpnr.RuleCondition
14742	if fpnr.Name != nil {
14743		objectMap["name"] = fpnr.Name
14744	}
14745	if fpnr.Priority != nil {
14746		objectMap["priority"] = fpnr.Priority
14747	}
14748	if fpnr.RuleType != "" {
14749		objectMap["ruleType"] = fpnr.RuleType
14750	}
14751	return json.Marshal(objectMap)
14752}
14753
14754// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
14755func (fpnr FirewallPolicyNatRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) {
14756	return &fpnr, true
14757}
14758
14759// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
14760func (fpnr FirewallPolicyNatRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) {
14761	return nil, false
14762}
14763
14764// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
14765func (fpnr FirewallPolicyNatRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
14766	return nil, false
14767}
14768
14769// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
14770func (fpnr FirewallPolicyNatRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
14771	return &fpnr, true
14772}
14773
14774// UnmarshalJSON is the custom unmarshaler for FirewallPolicyNatRule struct.
14775func (fpnr *FirewallPolicyNatRule) UnmarshalJSON(body []byte) error {
14776	var m map[string]*json.RawMessage
14777	err := json.Unmarshal(body, &m)
14778	if err != nil {
14779		return err
14780	}
14781	for k, v := range m {
14782		switch k {
14783		case "action":
14784			if v != nil {
14785				var action FirewallPolicyNatRuleAction
14786				err = json.Unmarshal(*v, &action)
14787				if err != nil {
14788					return err
14789				}
14790				fpnr.Action = &action
14791			}
14792		case "translatedAddress":
14793			if v != nil {
14794				var translatedAddress string
14795				err = json.Unmarshal(*v, &translatedAddress)
14796				if err != nil {
14797					return err
14798				}
14799				fpnr.TranslatedAddress = &translatedAddress
14800			}
14801		case "translatedPort":
14802			if v != nil {
14803				var translatedPort string
14804				err = json.Unmarshal(*v, &translatedPort)
14805				if err != nil {
14806					return err
14807				}
14808				fpnr.TranslatedPort = &translatedPort
14809			}
14810		case "ruleCondition":
14811			if v != nil {
14812				ruleCondition, err := unmarshalBasicFirewallPolicyRuleCondition(*v)
14813				if err != nil {
14814					return err
14815				}
14816				fpnr.RuleCondition = ruleCondition
14817			}
14818		case "name":
14819			if v != nil {
14820				var name string
14821				err = json.Unmarshal(*v, &name)
14822				if err != nil {
14823					return err
14824				}
14825				fpnr.Name = &name
14826			}
14827		case "priority":
14828			if v != nil {
14829				var priority int32
14830				err = json.Unmarshal(*v, &priority)
14831				if err != nil {
14832					return err
14833				}
14834				fpnr.Priority = &priority
14835			}
14836		case "ruleType":
14837			if v != nil {
14838				var ruleType RuleType
14839				err = json.Unmarshal(*v, &ruleType)
14840				if err != nil {
14841					return err
14842				}
14843				fpnr.RuleType = ruleType
14844			}
14845		}
14846	}
14847
14848	return nil
14849}
14850
14851// FirewallPolicyNatRuleAction properties of the FirewallPolicyNatRuleAction.
14852type FirewallPolicyNatRuleAction struct {
14853	// Type - The type of action. Possible values include: 'DNAT'
14854	Type FirewallPolicyNatRuleActionType `json:"type,omitempty"`
14855}
14856
14857// FirewallPolicyPropertiesFormat firewall Policy definition.
14858type FirewallPolicyPropertiesFormat struct {
14859	// RuleGroups - READ-ONLY; List of references to FirewallPolicyRuleGroups.
14860	RuleGroups *[]SubResource `json:"ruleGroups,omitempty"`
14861	// ProvisioningState - READ-ONLY; The provisioning state of the firewall policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
14862	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14863	// BasePolicy - The parent firewall policy from which rules are inherited.
14864	BasePolicy *SubResource `json:"basePolicy,omitempty"`
14865	// Firewalls - READ-ONLY; List of references to Azure Firewalls that this Firewall Policy is associated with.
14866	Firewalls *[]SubResource `json:"firewalls,omitempty"`
14867	// ChildPolicies - READ-ONLY; List of references to Child Firewall Policies.
14868	ChildPolicies *[]SubResource `json:"childPolicies,omitempty"`
14869	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
14870	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
14871}
14872
14873// MarshalJSON is the custom marshaler for FirewallPolicyPropertiesFormat.
14874func (fppf FirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
14875	objectMap := make(map[string]interface{})
14876	if fppf.BasePolicy != nil {
14877		objectMap["basePolicy"] = fppf.BasePolicy
14878	}
14879	if fppf.ThreatIntelMode != "" {
14880		objectMap["threatIntelMode"] = fppf.ThreatIntelMode
14881	}
14882	return json.Marshal(objectMap)
14883}
14884
14885// BasicFirewallPolicyRule properties of the rule.
14886type BasicFirewallPolicyRule interface {
14887	AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool)
14888	AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool)
14889	AsFirewallPolicyRule() (*FirewallPolicyRule, bool)
14890}
14891
14892// FirewallPolicyRule properties of the rule.
14893type FirewallPolicyRule struct {
14894	// Name - The name of the rule.
14895	Name *string `json:"name,omitempty"`
14896	// Priority - Priority of the Firewall Policy Rule resource.
14897	Priority *int32 `json:"priority,omitempty"`
14898	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule'
14899	RuleType RuleType `json:"ruleType,omitempty"`
14900}
14901
14902func unmarshalBasicFirewallPolicyRule(body []byte) (BasicFirewallPolicyRule, error) {
14903	var m map[string]interface{}
14904	err := json.Unmarshal(body, &m)
14905	if err != nil {
14906		return nil, err
14907	}
14908
14909	switch m["ruleType"] {
14910	case string(RuleTypeFirewallPolicyNatRule):
14911		var fpnr FirewallPolicyNatRule
14912		err := json.Unmarshal(body, &fpnr)
14913		return fpnr, err
14914	case string(RuleTypeFirewallPolicyFilterRule):
14915		var fpfr FirewallPolicyFilterRule
14916		err := json.Unmarshal(body, &fpfr)
14917		return fpfr, err
14918	default:
14919		var fpr FirewallPolicyRule
14920		err := json.Unmarshal(body, &fpr)
14921		return fpr, err
14922	}
14923}
14924func unmarshalBasicFirewallPolicyRuleArray(body []byte) ([]BasicFirewallPolicyRule, error) {
14925	var rawMessages []*json.RawMessage
14926	err := json.Unmarshal(body, &rawMessages)
14927	if err != nil {
14928		return nil, err
14929	}
14930
14931	fprArray := make([]BasicFirewallPolicyRule, len(rawMessages))
14932
14933	for index, rawMessage := range rawMessages {
14934		fpr, err := unmarshalBasicFirewallPolicyRule(*rawMessage)
14935		if err != nil {
14936			return nil, err
14937		}
14938		fprArray[index] = fpr
14939	}
14940	return fprArray, nil
14941}
14942
14943// MarshalJSON is the custom marshaler for FirewallPolicyRule.
14944func (fpr FirewallPolicyRule) MarshalJSON() ([]byte, error) {
14945	fpr.RuleType = RuleTypeFirewallPolicyRule
14946	objectMap := make(map[string]interface{})
14947	if fpr.Name != nil {
14948		objectMap["name"] = fpr.Name
14949	}
14950	if fpr.Priority != nil {
14951		objectMap["priority"] = fpr.Priority
14952	}
14953	if fpr.RuleType != "" {
14954		objectMap["ruleType"] = fpr.RuleType
14955	}
14956	return json.Marshal(objectMap)
14957}
14958
14959// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
14960func (fpr FirewallPolicyRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) {
14961	return nil, false
14962}
14963
14964// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
14965func (fpr FirewallPolicyRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) {
14966	return nil, false
14967}
14968
14969// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
14970func (fpr FirewallPolicyRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
14971	return &fpr, true
14972}
14973
14974// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
14975func (fpr FirewallPolicyRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
14976	return &fpr, true
14977}
14978
14979// BasicFirewallPolicyRuleCondition properties of a rule.
14980type BasicFirewallPolicyRuleCondition interface {
14981	AsApplicationRuleCondition() (*ApplicationRuleCondition, bool)
14982	AsNatRuleCondition() (*NatRuleCondition, bool)
14983	AsRuleCondition() (*RuleCondition, bool)
14984	AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool)
14985}
14986
14987// FirewallPolicyRuleCondition properties of a rule.
14988type FirewallPolicyRuleCondition struct {
14989	// Name - Name of the rule condition.
14990	Name *string `json:"name,omitempty"`
14991	// Description - Description of the rule condition.
14992	Description *string `json:"description,omitempty"`
14993	// RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNatRuleCondition', 'RuleConditionTypeNetworkRuleCondition'
14994	RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"`
14995}
14996
14997func unmarshalBasicFirewallPolicyRuleCondition(body []byte) (BasicFirewallPolicyRuleCondition, error) {
14998	var m map[string]interface{}
14999	err := json.Unmarshal(body, &m)
15000	if err != nil {
15001		return nil, err
15002	}
15003
15004	switch m["ruleConditionType"] {
15005	case string(RuleConditionTypeApplicationRuleCondition):
15006		var arc ApplicationRuleCondition
15007		err := json.Unmarshal(body, &arc)
15008		return arc, err
15009	case string(RuleConditionTypeNatRuleCondition):
15010		var nrc NatRuleCondition
15011		err := json.Unmarshal(body, &nrc)
15012		return nrc, err
15013	case string(RuleConditionTypeNetworkRuleCondition):
15014		var rc RuleCondition
15015		err := json.Unmarshal(body, &rc)
15016		return rc, err
15017	default:
15018		var fprc FirewallPolicyRuleCondition
15019		err := json.Unmarshal(body, &fprc)
15020		return fprc, err
15021	}
15022}
15023func unmarshalBasicFirewallPolicyRuleConditionArray(body []byte) ([]BasicFirewallPolicyRuleCondition, error) {
15024	var rawMessages []*json.RawMessage
15025	err := json.Unmarshal(body, &rawMessages)
15026	if err != nil {
15027		return nil, err
15028	}
15029
15030	fprcArray := make([]BasicFirewallPolicyRuleCondition, len(rawMessages))
15031
15032	for index, rawMessage := range rawMessages {
15033		fprc, err := unmarshalBasicFirewallPolicyRuleCondition(*rawMessage)
15034		if err != nil {
15035			return nil, err
15036		}
15037		fprcArray[index] = fprc
15038	}
15039	return fprcArray, nil
15040}
15041
15042// MarshalJSON is the custom marshaler for FirewallPolicyRuleCondition.
15043func (fprc FirewallPolicyRuleCondition) MarshalJSON() ([]byte, error) {
15044	fprc.RuleConditionType = RuleConditionTypeFirewallPolicyRuleCondition
15045	objectMap := make(map[string]interface{})
15046	if fprc.Name != nil {
15047		objectMap["name"] = fprc.Name
15048	}
15049	if fprc.Description != nil {
15050		objectMap["description"] = fprc.Description
15051	}
15052	if fprc.RuleConditionType != "" {
15053		objectMap["ruleConditionType"] = fprc.RuleConditionType
15054	}
15055	return json.Marshal(objectMap)
15056}
15057
15058// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
15059func (fprc FirewallPolicyRuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) {
15060	return nil, false
15061}
15062
15063// AsNatRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
15064func (fprc FirewallPolicyRuleCondition) AsNatRuleCondition() (*NatRuleCondition, bool) {
15065	return nil, false
15066}
15067
15068// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
15069func (fprc FirewallPolicyRuleCondition) AsRuleCondition() (*RuleCondition, bool) {
15070	return nil, false
15071}
15072
15073// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
15074func (fprc FirewallPolicyRuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) {
15075	return &fprc, true
15076}
15077
15078// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
15079func (fprc FirewallPolicyRuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) {
15080	return &fprc, true
15081}
15082
15083// FirewallPolicyRuleConditionApplicationProtocol properties of the application rule protocol.
15084type FirewallPolicyRuleConditionApplicationProtocol struct {
15085	// ProtocolType - Protocol type. Possible values include: 'FirewallPolicyRuleConditionApplicationProtocolTypeHTTP', 'FirewallPolicyRuleConditionApplicationProtocolTypeHTTPS'
15086	ProtocolType FirewallPolicyRuleConditionApplicationProtocolType `json:"protocolType,omitempty"`
15087	// Port - Port number for the protocol, cannot be greater than 64000.
15088	Port *int32 `json:"port,omitempty"`
15089}
15090
15091// FirewallPolicyRuleGroup rule Group resource.
15092type FirewallPolicyRuleGroup struct {
15093	autorest.Response `json:"-"`
15094	// FirewallPolicyRuleGroupProperties - The properties of the firewall policy rule group.
15095	*FirewallPolicyRuleGroupProperties `json:"properties,omitempty"`
15096	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15097	Name *string `json:"name,omitempty"`
15098	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15099	Etag *string `json:"etag,omitempty"`
15100	// Type - READ-ONLY; Rule Group type.
15101	Type *string `json:"type,omitempty"`
15102	// ID - Resource ID.
15103	ID *string `json:"id,omitempty"`
15104}
15105
15106// MarshalJSON is the custom marshaler for FirewallPolicyRuleGroup.
15107func (fprg FirewallPolicyRuleGroup) MarshalJSON() ([]byte, error) {
15108	objectMap := make(map[string]interface{})
15109	if fprg.FirewallPolicyRuleGroupProperties != nil {
15110		objectMap["properties"] = fprg.FirewallPolicyRuleGroupProperties
15111	}
15112	if fprg.Name != nil {
15113		objectMap["name"] = fprg.Name
15114	}
15115	if fprg.ID != nil {
15116		objectMap["id"] = fprg.ID
15117	}
15118	return json.Marshal(objectMap)
15119}
15120
15121// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleGroup struct.
15122func (fprg *FirewallPolicyRuleGroup) UnmarshalJSON(body []byte) error {
15123	var m map[string]*json.RawMessage
15124	err := json.Unmarshal(body, &m)
15125	if err != nil {
15126		return err
15127	}
15128	for k, v := range m {
15129		switch k {
15130		case "properties":
15131			if v != nil {
15132				var firewallPolicyRuleGroupProperties FirewallPolicyRuleGroupProperties
15133				err = json.Unmarshal(*v, &firewallPolicyRuleGroupProperties)
15134				if err != nil {
15135					return err
15136				}
15137				fprg.FirewallPolicyRuleGroupProperties = &firewallPolicyRuleGroupProperties
15138			}
15139		case "name":
15140			if v != nil {
15141				var name string
15142				err = json.Unmarshal(*v, &name)
15143				if err != nil {
15144					return err
15145				}
15146				fprg.Name = &name
15147			}
15148		case "etag":
15149			if v != nil {
15150				var etag string
15151				err = json.Unmarshal(*v, &etag)
15152				if err != nil {
15153					return err
15154				}
15155				fprg.Etag = &etag
15156			}
15157		case "type":
15158			if v != nil {
15159				var typeVar string
15160				err = json.Unmarshal(*v, &typeVar)
15161				if err != nil {
15162					return err
15163				}
15164				fprg.Type = &typeVar
15165			}
15166		case "id":
15167			if v != nil {
15168				var ID string
15169				err = json.Unmarshal(*v, &ID)
15170				if err != nil {
15171					return err
15172				}
15173				fprg.ID = &ID
15174			}
15175		}
15176	}
15177
15178	return nil
15179}
15180
15181// FirewallPolicyRuleGroupListResult response for ListFirewallPolicyRuleGroups API service call.
15182type FirewallPolicyRuleGroupListResult struct {
15183	autorest.Response `json:"-"`
15184	// Value - List of FirewallPolicyRuleGroups in a FirewallPolicy.
15185	Value *[]FirewallPolicyRuleGroup `json:"value,omitempty"`
15186	// NextLink - URL to get the next set of results.
15187	NextLink *string `json:"nextLink,omitempty"`
15188}
15189
15190// FirewallPolicyRuleGroupListResultIterator provides access to a complete listing of
15191// FirewallPolicyRuleGroup values.
15192type FirewallPolicyRuleGroupListResultIterator struct {
15193	i    int
15194	page FirewallPolicyRuleGroupListResultPage
15195}
15196
15197// NextWithContext advances to the next value.  If there was an error making
15198// the request the iterator does not advance and the error is returned.
15199func (iter *FirewallPolicyRuleGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
15200	if tracing.IsEnabled() {
15201		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupListResultIterator.NextWithContext")
15202		defer func() {
15203			sc := -1
15204			if iter.Response().Response.Response != nil {
15205				sc = iter.Response().Response.Response.StatusCode
15206			}
15207			tracing.EndSpan(ctx, sc, err)
15208		}()
15209	}
15210	iter.i++
15211	if iter.i < len(iter.page.Values()) {
15212		return nil
15213	}
15214	err = iter.page.NextWithContext(ctx)
15215	if err != nil {
15216		iter.i--
15217		return err
15218	}
15219	iter.i = 0
15220	return nil
15221}
15222
15223// Next advances to the next value.  If there was an error making
15224// the request the iterator does not advance and the error is returned.
15225// Deprecated: Use NextWithContext() instead.
15226func (iter *FirewallPolicyRuleGroupListResultIterator) Next() error {
15227	return iter.NextWithContext(context.Background())
15228}
15229
15230// NotDone returns true if the enumeration should be started or is not yet complete.
15231func (iter FirewallPolicyRuleGroupListResultIterator) NotDone() bool {
15232	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15233}
15234
15235// Response returns the raw server response from the last page request.
15236func (iter FirewallPolicyRuleGroupListResultIterator) Response() FirewallPolicyRuleGroupListResult {
15237	return iter.page.Response()
15238}
15239
15240// Value returns the current value or a zero-initialized value if the
15241// iterator has advanced beyond the end of the collection.
15242func (iter FirewallPolicyRuleGroupListResultIterator) Value() FirewallPolicyRuleGroup {
15243	if !iter.page.NotDone() {
15244		return FirewallPolicyRuleGroup{}
15245	}
15246	return iter.page.Values()[iter.i]
15247}
15248
15249// Creates a new instance of the FirewallPolicyRuleGroupListResultIterator type.
15250func NewFirewallPolicyRuleGroupListResultIterator(page FirewallPolicyRuleGroupListResultPage) FirewallPolicyRuleGroupListResultIterator {
15251	return FirewallPolicyRuleGroupListResultIterator{page: page}
15252}
15253
15254// IsEmpty returns true if the ListResult contains no values.
15255func (fprglr FirewallPolicyRuleGroupListResult) IsEmpty() bool {
15256	return fprglr.Value == nil || len(*fprglr.Value) == 0
15257}
15258
15259// hasNextLink returns true if the NextLink is not empty.
15260func (fprglr FirewallPolicyRuleGroupListResult) hasNextLink() bool {
15261	return fprglr.NextLink != nil && len(*fprglr.NextLink) != 0
15262}
15263
15264// firewallPolicyRuleGroupListResultPreparer prepares a request to retrieve the next set of results.
15265// It returns nil if no more results exist.
15266func (fprglr FirewallPolicyRuleGroupListResult) firewallPolicyRuleGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
15267	if !fprglr.hasNextLink() {
15268		return nil, nil
15269	}
15270	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15271		autorest.AsJSON(),
15272		autorest.AsGet(),
15273		autorest.WithBaseURL(to.String(fprglr.NextLink)))
15274}
15275
15276// FirewallPolicyRuleGroupListResultPage contains a page of FirewallPolicyRuleGroup values.
15277type FirewallPolicyRuleGroupListResultPage struct {
15278	fn     func(context.Context, FirewallPolicyRuleGroupListResult) (FirewallPolicyRuleGroupListResult, error)
15279	fprglr FirewallPolicyRuleGroupListResult
15280}
15281
15282// NextWithContext advances to the next page of values.  If there was an error making
15283// the request the page does not advance and the error is returned.
15284func (page *FirewallPolicyRuleGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
15285	if tracing.IsEnabled() {
15286		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupListResultPage.NextWithContext")
15287		defer func() {
15288			sc := -1
15289			if page.Response().Response.Response != nil {
15290				sc = page.Response().Response.Response.StatusCode
15291			}
15292			tracing.EndSpan(ctx, sc, err)
15293		}()
15294	}
15295	for {
15296		next, err := page.fn(ctx, page.fprglr)
15297		if err != nil {
15298			return err
15299		}
15300		page.fprglr = next
15301		if !next.hasNextLink() || !next.IsEmpty() {
15302			break
15303		}
15304	}
15305	return nil
15306}
15307
15308// Next advances to the next page of values.  If there was an error making
15309// the request the page does not advance and the error is returned.
15310// Deprecated: Use NextWithContext() instead.
15311func (page *FirewallPolicyRuleGroupListResultPage) Next() error {
15312	return page.NextWithContext(context.Background())
15313}
15314
15315// NotDone returns true if the page enumeration should be started or is not yet complete.
15316func (page FirewallPolicyRuleGroupListResultPage) NotDone() bool {
15317	return !page.fprglr.IsEmpty()
15318}
15319
15320// Response returns the raw server response from the last page request.
15321func (page FirewallPolicyRuleGroupListResultPage) Response() FirewallPolicyRuleGroupListResult {
15322	return page.fprglr
15323}
15324
15325// Values returns the slice of values for the current page or nil if there are no values.
15326func (page FirewallPolicyRuleGroupListResultPage) Values() []FirewallPolicyRuleGroup {
15327	if page.fprglr.IsEmpty() {
15328		return nil
15329	}
15330	return *page.fprglr.Value
15331}
15332
15333// Creates a new instance of the FirewallPolicyRuleGroupListResultPage type.
15334func NewFirewallPolicyRuleGroupListResultPage(cur FirewallPolicyRuleGroupListResult, getNextPage func(context.Context, FirewallPolicyRuleGroupListResult) (FirewallPolicyRuleGroupListResult, error)) FirewallPolicyRuleGroupListResultPage {
15335	return FirewallPolicyRuleGroupListResultPage{
15336		fn:     getNextPage,
15337		fprglr: cur,
15338	}
15339}
15340
15341// FirewallPolicyRuleGroupProperties properties of the rule group.
15342type FirewallPolicyRuleGroupProperties struct {
15343	// Priority - Priority of the Firewall Policy Rule Group resource.
15344	Priority *int32 `json:"priority,omitempty"`
15345	// Rules - Group of Firewall Policy rules.
15346	Rules *[]BasicFirewallPolicyRule `json:"rules,omitempty"`
15347	// ProvisioningState - READ-ONLY; The provisioning state of the firewall policy rule group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
15348	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15349}
15350
15351// MarshalJSON is the custom marshaler for FirewallPolicyRuleGroupProperties.
15352func (fprgp FirewallPolicyRuleGroupProperties) MarshalJSON() ([]byte, error) {
15353	objectMap := make(map[string]interface{})
15354	if fprgp.Priority != nil {
15355		objectMap["priority"] = fprgp.Priority
15356	}
15357	if fprgp.Rules != nil {
15358		objectMap["rules"] = fprgp.Rules
15359	}
15360	return json.Marshal(objectMap)
15361}
15362
15363// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleGroupProperties struct.
15364func (fprgp *FirewallPolicyRuleGroupProperties) UnmarshalJSON(body []byte) error {
15365	var m map[string]*json.RawMessage
15366	err := json.Unmarshal(body, &m)
15367	if err != nil {
15368		return err
15369	}
15370	for k, v := range m {
15371		switch k {
15372		case "priority":
15373			if v != nil {
15374				var priority int32
15375				err = json.Unmarshal(*v, &priority)
15376				if err != nil {
15377					return err
15378				}
15379				fprgp.Priority = &priority
15380			}
15381		case "rules":
15382			if v != nil {
15383				rules, err := unmarshalBasicFirewallPolicyRuleArray(*v)
15384				if err != nil {
15385					return err
15386				}
15387				fprgp.Rules = &rules
15388			}
15389		case "provisioningState":
15390			if v != nil {
15391				var provisioningState ProvisioningState
15392				err = json.Unmarshal(*v, &provisioningState)
15393				if err != nil {
15394					return err
15395				}
15396				fprgp.ProvisioningState = provisioningState
15397			}
15398		}
15399	}
15400
15401	return nil
15402}
15403
15404// FirewallPolicyRuleGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
15405// a long-running operation.
15406type FirewallPolicyRuleGroupsCreateOrUpdateFuture struct {
15407	azure.FutureAPI
15408	// Result returns the result of the asynchronous operation.
15409	// If the operation has not completed it will return an error.
15410	Result func(FirewallPolicyRuleGroupsClient) (FirewallPolicyRuleGroup, error)
15411}
15412
15413// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15414func (future *FirewallPolicyRuleGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
15415	var azFuture azure.Future
15416	if err := json.Unmarshal(body, &azFuture); err != nil {
15417		return err
15418	}
15419	future.FutureAPI = &azFuture
15420	future.Result = future.result
15421	return nil
15422}
15423
15424// result is the default implementation for FirewallPolicyRuleGroupsCreateOrUpdateFuture.Result.
15425func (future *FirewallPolicyRuleGroupsCreateOrUpdateFuture) result(client FirewallPolicyRuleGroupsClient) (fprg FirewallPolicyRuleGroup, err error) {
15426	var done bool
15427	done, err = future.DoneWithContext(context.Background(), client)
15428	if err != nil {
15429		err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15430		return
15431	}
15432	if !done {
15433		fprg.Response.Response = future.Response()
15434		err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleGroupsCreateOrUpdateFuture")
15435		return
15436	}
15437	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15438	if fprg.Response.Response, err = future.GetResult(sender); err == nil && fprg.Response.Response.StatusCode != http.StatusNoContent {
15439		fprg, err = client.CreateOrUpdateResponder(fprg.Response.Response)
15440		if err != nil {
15441			err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsCreateOrUpdateFuture", "Result", fprg.Response.Response, "Failure responding to request")
15442		}
15443	}
15444	return
15445}
15446
15447// FirewallPolicyRuleGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
15448// long-running operation.
15449type FirewallPolicyRuleGroupsDeleteFuture struct {
15450	azure.FutureAPI
15451	// Result returns the result of the asynchronous operation.
15452	// If the operation has not completed it will return an error.
15453	Result func(FirewallPolicyRuleGroupsClient) (autorest.Response, error)
15454}
15455
15456// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15457func (future *FirewallPolicyRuleGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
15458	var azFuture azure.Future
15459	if err := json.Unmarshal(body, &azFuture); err != nil {
15460		return err
15461	}
15462	future.FutureAPI = &azFuture
15463	future.Result = future.result
15464	return nil
15465}
15466
15467// result is the default implementation for FirewallPolicyRuleGroupsDeleteFuture.Result.
15468func (future *FirewallPolicyRuleGroupsDeleteFuture) result(client FirewallPolicyRuleGroupsClient) (ar autorest.Response, err error) {
15469	var done bool
15470	done, err = future.DoneWithContext(context.Background(), client)
15471	if err != nil {
15472		err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
15473		return
15474	}
15475	if !done {
15476		ar.Response = future.Response()
15477		err = azure.NewAsyncOpIncompleteError("network.FirewallPolicyRuleGroupsDeleteFuture")
15478		return
15479	}
15480	ar.Response = future.Response()
15481	return
15482}
15483
15484// FlowLog a flow log resource.
15485type FlowLog struct {
15486	autorest.Response `json:"-"`
15487	// FlowLogPropertiesFormat - Properties of the flow log.
15488	*FlowLogPropertiesFormat `json:"properties,omitempty"`
15489	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15490	Etag *string `json:"etag,omitempty"`
15491	// ID - Resource ID.
15492	ID *string `json:"id,omitempty"`
15493	// Name - READ-ONLY; Resource name.
15494	Name *string `json:"name,omitempty"`
15495	// Type - READ-ONLY; Resource type.
15496	Type *string `json:"type,omitempty"`
15497	// Location - Resource location.
15498	Location *string `json:"location,omitempty"`
15499	// Tags - Resource tags.
15500	Tags map[string]*string `json:"tags"`
15501}
15502
15503// MarshalJSON is the custom marshaler for FlowLog.
15504func (fl FlowLog) MarshalJSON() ([]byte, error) {
15505	objectMap := make(map[string]interface{})
15506	if fl.FlowLogPropertiesFormat != nil {
15507		objectMap["properties"] = fl.FlowLogPropertiesFormat
15508	}
15509	if fl.ID != nil {
15510		objectMap["id"] = fl.ID
15511	}
15512	if fl.Location != nil {
15513		objectMap["location"] = fl.Location
15514	}
15515	if fl.Tags != nil {
15516		objectMap["tags"] = fl.Tags
15517	}
15518	return json.Marshal(objectMap)
15519}
15520
15521// UnmarshalJSON is the custom unmarshaler for FlowLog struct.
15522func (fl *FlowLog) UnmarshalJSON(body []byte) error {
15523	var m map[string]*json.RawMessage
15524	err := json.Unmarshal(body, &m)
15525	if err != nil {
15526		return err
15527	}
15528	for k, v := range m {
15529		switch k {
15530		case "properties":
15531			if v != nil {
15532				var flowLogPropertiesFormat FlowLogPropertiesFormat
15533				err = json.Unmarshal(*v, &flowLogPropertiesFormat)
15534				if err != nil {
15535					return err
15536				}
15537				fl.FlowLogPropertiesFormat = &flowLogPropertiesFormat
15538			}
15539		case "etag":
15540			if v != nil {
15541				var etag string
15542				err = json.Unmarshal(*v, &etag)
15543				if err != nil {
15544					return err
15545				}
15546				fl.Etag = &etag
15547			}
15548		case "id":
15549			if v != nil {
15550				var ID string
15551				err = json.Unmarshal(*v, &ID)
15552				if err != nil {
15553					return err
15554				}
15555				fl.ID = &ID
15556			}
15557		case "name":
15558			if v != nil {
15559				var name string
15560				err = json.Unmarshal(*v, &name)
15561				if err != nil {
15562					return err
15563				}
15564				fl.Name = &name
15565			}
15566		case "type":
15567			if v != nil {
15568				var typeVar string
15569				err = json.Unmarshal(*v, &typeVar)
15570				if err != nil {
15571					return err
15572				}
15573				fl.Type = &typeVar
15574			}
15575		case "location":
15576			if v != nil {
15577				var location string
15578				err = json.Unmarshal(*v, &location)
15579				if err != nil {
15580					return err
15581				}
15582				fl.Location = &location
15583			}
15584		case "tags":
15585			if v != nil {
15586				var tags map[string]*string
15587				err = json.Unmarshal(*v, &tags)
15588				if err != nil {
15589					return err
15590				}
15591				fl.Tags = tags
15592			}
15593		}
15594	}
15595
15596	return nil
15597}
15598
15599// FlowLogFormatParameters parameters that define the flow log format.
15600type FlowLogFormatParameters struct {
15601	// Type - The file type of flow log. Possible values include: 'JSON'
15602	Type FlowLogFormatType `json:"type,omitempty"`
15603	// Version - The version (revision) of the flow log.
15604	Version *int32 `json:"version,omitempty"`
15605}
15606
15607// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
15608type FlowLogInformation struct {
15609	autorest.Response `json:"-"`
15610	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
15611	TargetResourceID *string `json:"targetResourceId,omitempty"`
15612	// FlowLogProperties - Properties of the flow log.
15613	*FlowLogProperties `json:"properties,omitempty"`
15614	// FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
15615	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
15616}
15617
15618// MarshalJSON is the custom marshaler for FlowLogInformation.
15619func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
15620	objectMap := make(map[string]interface{})
15621	if fli.TargetResourceID != nil {
15622		objectMap["targetResourceId"] = fli.TargetResourceID
15623	}
15624	if fli.FlowLogProperties != nil {
15625		objectMap["properties"] = fli.FlowLogProperties
15626	}
15627	if fli.FlowAnalyticsConfiguration != nil {
15628		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
15629	}
15630	return json.Marshal(objectMap)
15631}
15632
15633// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
15634func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
15635	var m map[string]*json.RawMessage
15636	err := json.Unmarshal(body, &m)
15637	if err != nil {
15638		return err
15639	}
15640	for k, v := range m {
15641		switch k {
15642		case "targetResourceId":
15643			if v != nil {
15644				var targetResourceID string
15645				err = json.Unmarshal(*v, &targetResourceID)
15646				if err != nil {
15647					return err
15648				}
15649				fli.TargetResourceID = &targetResourceID
15650			}
15651		case "properties":
15652			if v != nil {
15653				var flowLogProperties FlowLogProperties
15654				err = json.Unmarshal(*v, &flowLogProperties)
15655				if err != nil {
15656					return err
15657				}
15658				fli.FlowLogProperties = &flowLogProperties
15659			}
15660		case "flowAnalyticsConfiguration":
15661			if v != nil {
15662				var flowAnalyticsConfiguration TrafficAnalyticsProperties
15663				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
15664				if err != nil {
15665					return err
15666				}
15667				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
15668			}
15669		}
15670	}
15671
15672	return nil
15673}
15674
15675// FlowLogListResult list of flow logs.
15676type FlowLogListResult struct {
15677	autorest.Response `json:"-"`
15678	// Value - Information about flow log resource.
15679	Value *[]FlowLog `json:"value,omitempty"`
15680	// NextLink - READ-ONLY; The URL to get the next set of results.
15681	NextLink *string `json:"nextLink,omitempty"`
15682}
15683
15684// MarshalJSON is the custom marshaler for FlowLogListResult.
15685func (fllr FlowLogListResult) MarshalJSON() ([]byte, error) {
15686	objectMap := make(map[string]interface{})
15687	if fllr.Value != nil {
15688		objectMap["value"] = fllr.Value
15689	}
15690	return json.Marshal(objectMap)
15691}
15692
15693// FlowLogListResultIterator provides access to a complete listing of FlowLog values.
15694type FlowLogListResultIterator struct {
15695	i    int
15696	page FlowLogListResultPage
15697}
15698
15699// NextWithContext advances to the next value.  If there was an error making
15700// the request the iterator does not advance and the error is returned.
15701func (iter *FlowLogListResultIterator) NextWithContext(ctx context.Context) (err error) {
15702	if tracing.IsEnabled() {
15703		ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogListResultIterator.NextWithContext")
15704		defer func() {
15705			sc := -1
15706			if iter.Response().Response.Response != nil {
15707				sc = iter.Response().Response.Response.StatusCode
15708			}
15709			tracing.EndSpan(ctx, sc, err)
15710		}()
15711	}
15712	iter.i++
15713	if iter.i < len(iter.page.Values()) {
15714		return nil
15715	}
15716	err = iter.page.NextWithContext(ctx)
15717	if err != nil {
15718		iter.i--
15719		return err
15720	}
15721	iter.i = 0
15722	return nil
15723}
15724
15725// Next advances to the next value.  If there was an error making
15726// the request the iterator does not advance and the error is returned.
15727// Deprecated: Use NextWithContext() instead.
15728func (iter *FlowLogListResultIterator) Next() error {
15729	return iter.NextWithContext(context.Background())
15730}
15731
15732// NotDone returns true if the enumeration should be started or is not yet complete.
15733func (iter FlowLogListResultIterator) NotDone() bool {
15734	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15735}
15736
15737// Response returns the raw server response from the last page request.
15738func (iter FlowLogListResultIterator) Response() FlowLogListResult {
15739	return iter.page.Response()
15740}
15741
15742// Value returns the current value or a zero-initialized value if the
15743// iterator has advanced beyond the end of the collection.
15744func (iter FlowLogListResultIterator) Value() FlowLog {
15745	if !iter.page.NotDone() {
15746		return FlowLog{}
15747	}
15748	return iter.page.Values()[iter.i]
15749}
15750
15751// Creates a new instance of the FlowLogListResultIterator type.
15752func NewFlowLogListResultIterator(page FlowLogListResultPage) FlowLogListResultIterator {
15753	return FlowLogListResultIterator{page: page}
15754}
15755
15756// IsEmpty returns true if the ListResult contains no values.
15757func (fllr FlowLogListResult) IsEmpty() bool {
15758	return fllr.Value == nil || len(*fllr.Value) == 0
15759}
15760
15761// hasNextLink returns true if the NextLink is not empty.
15762func (fllr FlowLogListResult) hasNextLink() bool {
15763	return fllr.NextLink != nil && len(*fllr.NextLink) != 0
15764}
15765
15766// flowLogListResultPreparer prepares a request to retrieve the next set of results.
15767// It returns nil if no more results exist.
15768func (fllr FlowLogListResult) flowLogListResultPreparer(ctx context.Context) (*http.Request, error) {
15769	if !fllr.hasNextLink() {
15770		return nil, nil
15771	}
15772	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15773		autorest.AsJSON(),
15774		autorest.AsGet(),
15775		autorest.WithBaseURL(to.String(fllr.NextLink)))
15776}
15777
15778// FlowLogListResultPage contains a page of FlowLog values.
15779type FlowLogListResultPage struct {
15780	fn   func(context.Context, FlowLogListResult) (FlowLogListResult, error)
15781	fllr FlowLogListResult
15782}
15783
15784// NextWithContext advances to the next page of values.  If there was an error making
15785// the request the page does not advance and the error is returned.
15786func (page *FlowLogListResultPage) NextWithContext(ctx context.Context) (err error) {
15787	if tracing.IsEnabled() {
15788		ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogListResultPage.NextWithContext")
15789		defer func() {
15790			sc := -1
15791			if page.Response().Response.Response != nil {
15792				sc = page.Response().Response.Response.StatusCode
15793			}
15794			tracing.EndSpan(ctx, sc, err)
15795		}()
15796	}
15797	for {
15798		next, err := page.fn(ctx, page.fllr)
15799		if err != nil {
15800			return err
15801		}
15802		page.fllr = next
15803		if !next.hasNextLink() || !next.IsEmpty() {
15804			break
15805		}
15806	}
15807	return nil
15808}
15809
15810// Next advances to the next page of values.  If there was an error making
15811// the request the page does not advance and the error is returned.
15812// Deprecated: Use NextWithContext() instead.
15813func (page *FlowLogListResultPage) Next() error {
15814	return page.NextWithContext(context.Background())
15815}
15816
15817// NotDone returns true if the page enumeration should be started or is not yet complete.
15818func (page FlowLogListResultPage) NotDone() bool {
15819	return !page.fllr.IsEmpty()
15820}
15821
15822// Response returns the raw server response from the last page request.
15823func (page FlowLogListResultPage) Response() FlowLogListResult {
15824	return page.fllr
15825}
15826
15827// Values returns the slice of values for the current page or nil if there are no values.
15828func (page FlowLogListResultPage) Values() []FlowLog {
15829	if page.fllr.IsEmpty() {
15830		return nil
15831	}
15832	return *page.fllr.Value
15833}
15834
15835// Creates a new instance of the FlowLogListResultPage type.
15836func NewFlowLogListResultPage(cur FlowLogListResult, getNextPage func(context.Context, FlowLogListResult) (FlowLogListResult, error)) FlowLogListResultPage {
15837	return FlowLogListResultPage{
15838		fn:   getNextPage,
15839		fllr: cur,
15840	}
15841}
15842
15843// FlowLogProperties parameters that define the configuration of flow log.
15844type FlowLogProperties struct {
15845	// StorageID - ID of the storage account which is used to store the flow log.
15846	StorageID *string `json:"storageId,omitempty"`
15847	// Enabled - Flag to enable/disable flow logging.
15848	Enabled *bool `json:"enabled,omitempty"`
15849	// RetentionPolicy - Parameters that define the retention policy for flow log.
15850	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
15851	// Format - Parameters that define the flow log format.
15852	Format *FlowLogFormatParameters `json:"format,omitempty"`
15853}
15854
15855// FlowLogPropertiesFormat parameters that define the configuration of flow log.
15856type FlowLogPropertiesFormat struct {
15857	// TargetResourceID - ID of network security group to which flow log will be applied.
15858	TargetResourceID *string `json:"targetResourceId,omitempty"`
15859	// TargetResourceGUID - READ-ONLY; Guid of network security group to which flow log will be applied.
15860	TargetResourceGUID *string `json:"targetResourceGuid,omitempty"`
15861	// StorageID - ID of the storage account which is used to store the flow log.
15862	StorageID *string `json:"storageId,omitempty"`
15863	// Enabled - Flag to enable/disable flow logging.
15864	Enabled *bool `json:"enabled,omitempty"`
15865	// RetentionPolicy - Parameters that define the retention policy for flow log.
15866	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
15867	// Format - Parameters that define the flow log format.
15868	Format *FlowLogFormatParameters `json:"format,omitempty"`
15869	// FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
15870	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
15871	// ProvisioningState - READ-ONLY; The provisioning state of the flow log. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
15872	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15873}
15874
15875// MarshalJSON is the custom marshaler for FlowLogPropertiesFormat.
15876func (flpf FlowLogPropertiesFormat) MarshalJSON() ([]byte, error) {
15877	objectMap := make(map[string]interface{})
15878	if flpf.TargetResourceID != nil {
15879		objectMap["targetResourceId"] = flpf.TargetResourceID
15880	}
15881	if flpf.StorageID != nil {
15882		objectMap["storageId"] = flpf.StorageID
15883	}
15884	if flpf.Enabled != nil {
15885		objectMap["enabled"] = flpf.Enabled
15886	}
15887	if flpf.RetentionPolicy != nil {
15888		objectMap["retentionPolicy"] = flpf.RetentionPolicy
15889	}
15890	if flpf.Format != nil {
15891		objectMap["format"] = flpf.Format
15892	}
15893	if flpf.FlowAnalyticsConfiguration != nil {
15894		objectMap["flowAnalyticsConfiguration"] = flpf.FlowAnalyticsConfiguration
15895	}
15896	return json.Marshal(objectMap)
15897}
15898
15899// FlowLogsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
15900// operation.
15901type FlowLogsCreateOrUpdateFuture struct {
15902	azure.FutureAPI
15903	// Result returns the result of the asynchronous operation.
15904	// If the operation has not completed it will return an error.
15905	Result func(FlowLogsClient) (FlowLog, error)
15906}
15907
15908// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15909func (future *FlowLogsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
15910	var azFuture azure.Future
15911	if err := json.Unmarshal(body, &azFuture); err != nil {
15912		return err
15913	}
15914	future.FutureAPI = &azFuture
15915	future.Result = future.result
15916	return nil
15917}
15918
15919// result is the default implementation for FlowLogsCreateOrUpdateFuture.Result.
15920func (future *FlowLogsCreateOrUpdateFuture) result(client FlowLogsClient) (fl FlowLog, err error) {
15921	var done bool
15922	done, err = future.DoneWithContext(context.Background(), client)
15923	if err != nil {
15924		err = autorest.NewErrorWithError(err, "network.FlowLogsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15925		return
15926	}
15927	if !done {
15928		fl.Response.Response = future.Response()
15929		err = azure.NewAsyncOpIncompleteError("network.FlowLogsCreateOrUpdateFuture")
15930		return
15931	}
15932	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15933	if fl.Response.Response, err = future.GetResult(sender); err == nil && fl.Response.Response.StatusCode != http.StatusNoContent {
15934		fl, err = client.CreateOrUpdateResponder(fl.Response.Response)
15935		if err != nil {
15936			err = autorest.NewErrorWithError(err, "network.FlowLogsCreateOrUpdateFuture", "Result", fl.Response.Response, "Failure responding to request")
15937		}
15938	}
15939	return
15940}
15941
15942// FlowLogsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15943// operation.
15944type FlowLogsDeleteFuture struct {
15945	azure.FutureAPI
15946	// Result returns the result of the asynchronous operation.
15947	// If the operation has not completed it will return an error.
15948	Result func(FlowLogsClient) (autorest.Response, error)
15949}
15950
15951// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15952func (future *FlowLogsDeleteFuture) UnmarshalJSON(body []byte) error {
15953	var azFuture azure.Future
15954	if err := json.Unmarshal(body, &azFuture); err != nil {
15955		return err
15956	}
15957	future.FutureAPI = &azFuture
15958	future.Result = future.result
15959	return nil
15960}
15961
15962// result is the default implementation for FlowLogsDeleteFuture.Result.
15963func (future *FlowLogsDeleteFuture) result(client FlowLogsClient) (ar autorest.Response, err error) {
15964	var done bool
15965	done, err = future.DoneWithContext(context.Background(), client)
15966	if err != nil {
15967		err = autorest.NewErrorWithError(err, "network.FlowLogsDeleteFuture", "Result", future.Response(), "Polling failure")
15968		return
15969	}
15970	if !done {
15971		ar.Response = future.Response()
15972		err = azure.NewAsyncOpIncompleteError("network.FlowLogsDeleteFuture")
15973		return
15974	}
15975	ar.Response = future.Response()
15976	return
15977}
15978
15979// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
15980// (optional) status.
15981type FlowLogStatusParameters struct {
15982	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
15983	TargetResourceID *string `json:"targetResourceId,omitempty"`
15984}
15985
15986// FrontendIPConfiguration frontend IP address of the load balancer.
15987type FrontendIPConfiguration struct {
15988	autorest.Response `json:"-"`
15989	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
15990	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
15991	// 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.
15992	Name *string `json:"name,omitempty"`
15993	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15994	Etag *string `json:"etag,omitempty"`
15995	// Type - READ-ONLY; Type of the resource.
15996	Type *string `json:"type,omitempty"`
15997	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
15998	Zones *[]string `json:"zones,omitempty"`
15999	// ID - Resource ID.
16000	ID *string `json:"id,omitempty"`
16001}
16002
16003// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
16004func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
16005	objectMap := make(map[string]interface{})
16006	if fic.FrontendIPConfigurationPropertiesFormat != nil {
16007		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
16008	}
16009	if fic.Name != nil {
16010		objectMap["name"] = fic.Name
16011	}
16012	if fic.Zones != nil {
16013		objectMap["zones"] = fic.Zones
16014	}
16015	if fic.ID != nil {
16016		objectMap["id"] = fic.ID
16017	}
16018	return json.Marshal(objectMap)
16019}
16020
16021// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
16022func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
16023	var m map[string]*json.RawMessage
16024	err := json.Unmarshal(body, &m)
16025	if err != nil {
16026		return err
16027	}
16028	for k, v := range m {
16029		switch k {
16030		case "properties":
16031			if v != nil {
16032				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
16033				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
16034				if err != nil {
16035					return err
16036				}
16037				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
16038			}
16039		case "name":
16040			if v != nil {
16041				var name string
16042				err = json.Unmarshal(*v, &name)
16043				if err != nil {
16044					return err
16045				}
16046				fic.Name = &name
16047			}
16048		case "etag":
16049			if v != nil {
16050				var etag string
16051				err = json.Unmarshal(*v, &etag)
16052				if err != nil {
16053					return err
16054				}
16055				fic.Etag = &etag
16056			}
16057		case "type":
16058			if v != nil {
16059				var typeVar string
16060				err = json.Unmarshal(*v, &typeVar)
16061				if err != nil {
16062					return err
16063				}
16064				fic.Type = &typeVar
16065			}
16066		case "zones":
16067			if v != nil {
16068				var zones []string
16069				err = json.Unmarshal(*v, &zones)
16070				if err != nil {
16071					return err
16072				}
16073				fic.Zones = &zones
16074			}
16075		case "id":
16076			if v != nil {
16077				var ID string
16078				err = json.Unmarshal(*v, &ID)
16079				if err != nil {
16080					return err
16081				}
16082				fic.ID = &ID
16083			}
16084		}
16085	}
16086
16087	return nil
16088}
16089
16090// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
16091type FrontendIPConfigurationPropertiesFormat struct {
16092	// InboundNatRules - READ-ONLY; An array of references to inbound rules that use this frontend IP.
16093	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
16094	// InboundNatPools - READ-ONLY; An array of references to inbound pools that use this frontend IP.
16095	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
16096	// OutboundRules - READ-ONLY; An array of references to outbound rules that use this frontend IP.
16097	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
16098	// LoadBalancingRules - READ-ONLY; An array of references to load balancing rules that use this frontend IP.
16099	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
16100	// PrivateIPAddress - The private IP address of the IP configuration.
16101	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
16102	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values include: 'Static', 'Dynamic'
16103	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
16104	// PrivateIPAddressVersion - Whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPv4', 'IPv6'
16105	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
16106	// Subnet - The reference to the subnet resource.
16107	Subnet *Subnet `json:"subnet,omitempty"`
16108	// PublicIPAddress - The reference to the Public IP resource.
16109	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
16110	// PublicIPPrefix - The reference to the Public IP Prefix resource.
16111	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
16112	// ProvisioningState - READ-ONLY; The provisioning state of the frontend IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
16113	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16114}
16115
16116// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
16117func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
16118	objectMap := make(map[string]interface{})
16119	if ficpf.PrivateIPAddress != nil {
16120		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
16121	}
16122	if ficpf.PrivateIPAllocationMethod != "" {
16123		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
16124	}
16125	if ficpf.PrivateIPAddressVersion != "" {
16126		objectMap["privateIPAddressVersion"] = ficpf.PrivateIPAddressVersion
16127	}
16128	if ficpf.Subnet != nil {
16129		objectMap["subnet"] = ficpf.Subnet
16130	}
16131	if ficpf.PublicIPAddress != nil {
16132		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
16133	}
16134	if ficpf.PublicIPPrefix != nil {
16135		objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix
16136	}
16137	return json.Marshal(objectMap)
16138}
16139
16140// GatewayRoute gateway routing details.
16141type GatewayRoute struct {
16142	// LocalAddress - READ-ONLY; The gateway's local address.
16143	LocalAddress *string `json:"localAddress,omitempty"`
16144	// NetworkProperty - READ-ONLY; The route's network prefix.
16145	NetworkProperty *string `json:"network,omitempty"`
16146	// NextHop - READ-ONLY; The route's next hop.
16147	NextHop *string `json:"nextHop,omitempty"`
16148	// SourcePeer - READ-ONLY; The peer this route was learned from.
16149	SourcePeer *string `json:"sourcePeer,omitempty"`
16150	// Origin - READ-ONLY; The source this route was learned from.
16151	Origin *string `json:"origin,omitempty"`
16152	// AsPath - READ-ONLY; The route's AS path sequence.
16153	AsPath *string `json:"asPath,omitempty"`
16154	// Weight - READ-ONLY; The route's weight.
16155	Weight *int32 `json:"weight,omitempty"`
16156}
16157
16158// MarshalJSON is the custom marshaler for GatewayRoute.
16159func (gr GatewayRoute) MarshalJSON() ([]byte, error) {
16160	objectMap := make(map[string]interface{})
16161	return json.Marshal(objectMap)
16162}
16163
16164// GatewayRouteListResult list of virtual network gateway routes.
16165type GatewayRouteListResult struct {
16166	autorest.Response `json:"-"`
16167	// Value - List of gateway routes.
16168	Value *[]GatewayRoute `json:"value,omitempty"`
16169}
16170
16171// GeneratevirtualwanvpnserverconfigurationvpnprofileFuture an abstraction for monitoring and retrieving
16172// the results of a long-running operation.
16173type GeneratevirtualwanvpnserverconfigurationvpnprofileFuture struct {
16174	azure.FutureAPI
16175	// Result returns the result of the asynchronous operation.
16176	// If the operation has not completed it will return an error.
16177	Result func(BaseClient) (VpnProfileResponse, error)
16178}
16179
16180// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16181func (future *GeneratevirtualwanvpnserverconfigurationvpnprofileFuture) UnmarshalJSON(body []byte) error {
16182	var azFuture azure.Future
16183	if err := json.Unmarshal(body, &azFuture); err != nil {
16184		return err
16185	}
16186	future.FutureAPI = &azFuture
16187	future.Result = future.result
16188	return nil
16189}
16190
16191// result is the default implementation for GeneratevirtualwanvpnserverconfigurationvpnprofileFuture.Result.
16192func (future *GeneratevirtualwanvpnserverconfigurationvpnprofileFuture) result(client BaseClient) (vpr VpnProfileResponse, err error) {
16193	var done bool
16194	done, err = future.DoneWithContext(context.Background(), client)
16195	if err != nil {
16196		err = autorest.NewErrorWithError(err, "network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture", "Result", future.Response(), "Polling failure")
16197		return
16198	}
16199	if !done {
16200		vpr.Response.Response = future.Response()
16201		err = azure.NewAsyncOpIncompleteError("network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture")
16202		return
16203	}
16204	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16205	if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent {
16206		vpr, err = client.GeneratevirtualwanvpnserverconfigurationvpnprofileResponder(vpr.Response.Response)
16207		if err != nil {
16208			err = autorest.NewErrorWithError(err, "network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture", "Result", vpr.Response.Response, "Failure responding to request")
16209		}
16210	}
16211	return
16212}
16213
16214// GetActiveSessionsAllFuture an abstraction for monitoring and retrieving the results of a long-running
16215// operation.
16216type GetActiveSessionsAllFuture struct {
16217	azure.FutureAPI
16218	// Result returns the result of the asynchronous operation.
16219	// If the operation has not completed it will return an error.
16220	Result func(BaseClient) (BastionActiveSessionListResultPage, error)
16221}
16222
16223// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16224func (future *GetActiveSessionsAllFuture) UnmarshalJSON(body []byte) error {
16225	var azFuture azure.Future
16226	if err := json.Unmarshal(body, &azFuture); err != nil {
16227		return err
16228	}
16229	future.FutureAPI = &azFuture
16230	future.Result = future.result
16231	return nil
16232}
16233
16234// result is the default implementation for GetActiveSessionsAllFuture.Result.
16235func (future *GetActiveSessionsAllFuture) result(client BaseClient) (baslrp BastionActiveSessionListResultPage, err error) {
16236	var done bool
16237	done, err = future.DoneWithContext(context.Background(), client)
16238	if err != nil {
16239		err = autorest.NewErrorWithError(err, "network.GetActiveSessionsAllFuture", "Result", future.Response(), "Polling failure")
16240		return
16241	}
16242	if !done {
16243		baslrp.baslr.Response.Response = future.Response()
16244		err = azure.NewAsyncOpIncompleteError("network.GetActiveSessionsAllFuture")
16245		return
16246	}
16247	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16248	if baslrp.baslr.Response.Response, err = future.GetResult(sender); err == nil && baslrp.baslr.Response.Response.StatusCode != http.StatusNoContent {
16249		baslrp, err = client.GetActiveSessionsResponder(baslrp.baslr.Response.Response)
16250		if err != nil {
16251			err = autorest.NewErrorWithError(err, "network.GetActiveSessionsAllFuture", "Result", baslrp.baslr.Response.Response, "Failure responding to request")
16252		}
16253	}
16254	return
16255}
16256
16257// GetActiveSessionsFuture an abstraction for monitoring and retrieving the results of a long-running
16258// operation.
16259type GetActiveSessionsFuture struct {
16260	azure.FutureAPI
16261	// Result returns the result of the asynchronous operation.
16262	// If the operation has not completed it will return an error.
16263	Result func(BaseClient) (BastionActiveSessionListResultPage, error)
16264}
16265
16266// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16267func (future *GetActiveSessionsFuture) UnmarshalJSON(body []byte) error {
16268	var azFuture azure.Future
16269	if err := json.Unmarshal(body, &azFuture); err != nil {
16270		return err
16271	}
16272	future.FutureAPI = &azFuture
16273	future.Result = future.result
16274	return nil
16275}
16276
16277// result is the default implementation for GetActiveSessionsFuture.Result.
16278func (future *GetActiveSessionsFuture) result(client BaseClient) (baslrp BastionActiveSessionListResultPage, err error) {
16279	var done bool
16280	done, err = future.DoneWithContext(context.Background(), client)
16281	if err != nil {
16282		err = autorest.NewErrorWithError(err, "network.GetActiveSessionsFuture", "Result", future.Response(), "Polling failure")
16283		return
16284	}
16285	if !done {
16286		baslrp.baslr.Response.Response = future.Response()
16287		err = azure.NewAsyncOpIncompleteError("network.GetActiveSessionsFuture")
16288		return
16289	}
16290	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16291	if baslrp.baslr.Response.Response, err = future.GetResult(sender); err == nil && baslrp.baslr.Response.Response.StatusCode != http.StatusNoContent {
16292		baslrp, err = client.GetActiveSessionsResponder(baslrp.baslr.Response.Response)
16293		if err != nil {
16294			err = autorest.NewErrorWithError(err, "network.GetActiveSessionsFuture", "Result", baslrp.baslr.Response.Response, "Failure responding to request")
16295		}
16296	}
16297	return
16298}
16299
16300// GetVpnSitesConfigurationRequest list of Vpn-Sites.
16301type GetVpnSitesConfigurationRequest struct {
16302	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
16303	VpnSites *[]string `json:"vpnSites,omitempty"`
16304	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites.
16305	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
16306}
16307
16308// HTTPConfiguration HTTP configuration of the connectivity check.
16309type HTTPConfiguration struct {
16310	// Method - HTTP method. Possible values include: 'HTTPMethodGet'
16311	Method HTTPMethod `json:"method,omitempty"`
16312	// Headers - List of HTTP headers.
16313	Headers *[]HTTPHeader `json:"headers,omitempty"`
16314	// ValidStatusCodes - Valid status codes.
16315	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
16316}
16317
16318// HTTPHeader the HTTP header.
16319type HTTPHeader struct {
16320	// Name - The name in HTTP header.
16321	Name *string `json:"name,omitempty"`
16322	// Value - The value in HTTP header.
16323	Value *string `json:"value,omitempty"`
16324}
16325
16326// HubIPAddresses IP addresses associated with azure firewall.
16327type HubIPAddresses struct {
16328	// PublicIPAddresses - List of Public IP addresses associated with azure firewall.
16329	PublicIPAddresses *[]AzureFirewallPublicIPAddress `json:"publicIPAddresses,omitempty"`
16330	// PrivateIPAddress - Private IP Address associated with azure firewall.
16331	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
16332}
16333
16334// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
16335type HubVirtualNetworkConnection struct {
16336	autorest.Response `json:"-"`
16337	// HubVirtualNetworkConnectionProperties - Properties of the hub virtual network connection.
16338	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
16339	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16340	Name *string `json:"name,omitempty"`
16341	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
16342	Etag *string `json:"etag,omitempty"`
16343	// ID - Resource ID.
16344	ID *string `json:"id,omitempty"`
16345}
16346
16347// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
16348func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
16349	objectMap := make(map[string]interface{})
16350	if hvnc.HubVirtualNetworkConnectionProperties != nil {
16351		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
16352	}
16353	if hvnc.Name != nil {
16354		objectMap["name"] = hvnc.Name
16355	}
16356	if hvnc.ID != nil {
16357		objectMap["id"] = hvnc.ID
16358	}
16359	return json.Marshal(objectMap)
16360}
16361
16362// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
16363func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
16364	var m map[string]*json.RawMessage
16365	err := json.Unmarshal(body, &m)
16366	if err != nil {
16367		return err
16368	}
16369	for k, v := range m {
16370		switch k {
16371		case "properties":
16372			if v != nil {
16373				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
16374				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
16375				if err != nil {
16376					return err
16377				}
16378				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
16379			}
16380		case "name":
16381			if v != nil {
16382				var name string
16383				err = json.Unmarshal(*v, &name)
16384				if err != nil {
16385					return err
16386				}
16387				hvnc.Name = &name
16388			}
16389		case "etag":
16390			if v != nil {
16391				var etag string
16392				err = json.Unmarshal(*v, &etag)
16393				if err != nil {
16394					return err
16395				}
16396				hvnc.Etag = &etag
16397			}
16398		case "id":
16399			if v != nil {
16400				var ID string
16401				err = json.Unmarshal(*v, &ID)
16402				if err != nil {
16403					return err
16404				}
16405				hvnc.ID = &ID
16406			}
16407		}
16408	}
16409
16410	return nil
16411}
16412
16413// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection.
16414type HubVirtualNetworkConnectionProperties struct {
16415	// RemoteVirtualNetwork - Reference to the remote virtual network.
16416	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
16417	// AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not.
16418	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
16419	// AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways.
16420	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
16421	// EnableInternetSecurity - Enable internet security.
16422	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
16423	// ProvisioningState - READ-ONLY; The provisioning state of the hub virtual network connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
16424	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16425}
16426
16427// MarshalJSON is the custom marshaler for HubVirtualNetworkConnectionProperties.
16428func (hvncp HubVirtualNetworkConnectionProperties) MarshalJSON() ([]byte, error) {
16429	objectMap := make(map[string]interface{})
16430	if hvncp.RemoteVirtualNetwork != nil {
16431		objectMap["remoteVirtualNetwork"] = hvncp.RemoteVirtualNetwork
16432	}
16433	if hvncp.AllowHubToRemoteVnetTransit != nil {
16434		objectMap["allowHubToRemoteVnetTransit"] = hvncp.AllowHubToRemoteVnetTransit
16435	}
16436	if hvncp.AllowRemoteVnetToUseHubVnetGateways != nil {
16437		objectMap["allowRemoteVnetToUseHubVnetGateways"] = hvncp.AllowRemoteVnetToUseHubVnetGateways
16438	}
16439	if hvncp.EnableInternetSecurity != nil {
16440		objectMap["enableInternetSecurity"] = hvncp.EnableInternetSecurity
16441	}
16442	return json.Marshal(objectMap)
16443}
16444
16445// InboundNatPool inbound NAT pool of the load balancer.
16446type InboundNatPool struct {
16447	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
16448	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
16449	// 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.
16450	Name *string `json:"name,omitempty"`
16451	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
16452	Etag *string `json:"etag,omitempty"`
16453	// Type - READ-ONLY; Type of the resource.
16454	Type *string `json:"type,omitempty"`
16455	// ID - Resource ID.
16456	ID *string `json:"id,omitempty"`
16457}
16458
16459// MarshalJSON is the custom marshaler for InboundNatPool.
16460func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
16461	objectMap := make(map[string]interface{})
16462	if inp.InboundNatPoolPropertiesFormat != nil {
16463		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
16464	}
16465	if inp.Name != nil {
16466		objectMap["name"] = inp.Name
16467	}
16468	if inp.ID != nil {
16469		objectMap["id"] = inp.ID
16470	}
16471	return json.Marshal(objectMap)
16472}
16473
16474// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
16475func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
16476	var m map[string]*json.RawMessage
16477	err := json.Unmarshal(body, &m)
16478	if err != nil {
16479		return err
16480	}
16481	for k, v := range m {
16482		switch k {
16483		case "properties":
16484			if v != nil {
16485				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
16486				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
16487				if err != nil {
16488					return err
16489				}
16490				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
16491			}
16492		case "name":
16493			if v != nil {
16494				var name string
16495				err = json.Unmarshal(*v, &name)
16496				if err != nil {
16497					return err
16498				}
16499				inp.Name = &name
16500			}
16501		case "etag":
16502			if v != nil {
16503				var etag string
16504				err = json.Unmarshal(*v, &etag)
16505				if err != nil {
16506					return err
16507				}
16508				inp.Etag = &etag
16509			}
16510		case "type":
16511			if v != nil {
16512				var typeVar string
16513				err = json.Unmarshal(*v, &typeVar)
16514				if err != nil {
16515					return err
16516				}
16517				inp.Type = &typeVar
16518			}
16519		case "id":
16520			if v != nil {
16521				var ID string
16522				err = json.Unmarshal(*v, &ID)
16523				if err != nil {
16524					return err
16525				}
16526				inp.ID = &ID
16527			}
16528		}
16529	}
16530
16531	return nil
16532}
16533
16534// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
16535type InboundNatPoolPropertiesFormat struct {
16536	// FrontendIPConfiguration - A reference to frontend IP addresses.
16537	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
16538	// Protocol - The reference to the transport protocol used by the inbound NAT pool. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
16539	Protocol TransportProtocol `json:"protocol,omitempty"`
16540	// 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.
16541	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
16542	// 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.
16543	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
16544	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
16545	BackendPort *int32 `json:"backendPort,omitempty"`
16546	// 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.
16547	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
16548	// 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.
16549	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
16550	// 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.
16551	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
16552	// ProvisioningState - READ-ONLY; The provisioning state of the inbound NAT pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
16553	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16554}
16555
16556// MarshalJSON is the custom marshaler for InboundNatPoolPropertiesFormat.
16557func (inppf InboundNatPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
16558	objectMap := make(map[string]interface{})
16559	if inppf.FrontendIPConfiguration != nil {
16560		objectMap["frontendIPConfiguration"] = inppf.FrontendIPConfiguration
16561	}
16562	if inppf.Protocol != "" {
16563		objectMap["protocol"] = inppf.Protocol
16564	}
16565	if inppf.FrontendPortRangeStart != nil {
16566		objectMap["frontendPortRangeStart"] = inppf.FrontendPortRangeStart
16567	}
16568	if inppf.FrontendPortRangeEnd != nil {
16569		objectMap["frontendPortRangeEnd"] = inppf.FrontendPortRangeEnd
16570	}
16571	if inppf.BackendPort != nil {
16572		objectMap["backendPort"] = inppf.BackendPort
16573	}
16574	if inppf.IdleTimeoutInMinutes != nil {
16575		objectMap["idleTimeoutInMinutes"] = inppf.IdleTimeoutInMinutes
16576	}
16577	if inppf.EnableFloatingIP != nil {
16578		objectMap["enableFloatingIP"] = inppf.EnableFloatingIP
16579	}
16580	if inppf.EnableTCPReset != nil {
16581		objectMap["enableTcpReset"] = inppf.EnableTCPReset
16582	}
16583	return json.Marshal(objectMap)
16584}
16585
16586// InboundNatRule inbound NAT rule of the load balancer.
16587type InboundNatRule struct {
16588	autorest.Response `json:"-"`
16589	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
16590	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
16591	// 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.
16592	Name *string `json:"name,omitempty"`
16593	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
16594	Etag *string `json:"etag,omitempty"`
16595	// Type - READ-ONLY; Type of the resource.
16596	Type *string `json:"type,omitempty"`
16597	// ID - Resource ID.
16598	ID *string `json:"id,omitempty"`
16599}
16600
16601// MarshalJSON is the custom marshaler for InboundNatRule.
16602func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
16603	objectMap := make(map[string]interface{})
16604	if inr.InboundNatRulePropertiesFormat != nil {
16605		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
16606	}
16607	if inr.Name != nil {
16608		objectMap["name"] = inr.Name
16609	}
16610	if inr.ID != nil {
16611		objectMap["id"] = inr.ID
16612	}
16613	return json.Marshal(objectMap)
16614}
16615
16616// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
16617func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
16618	var m map[string]*json.RawMessage
16619	err := json.Unmarshal(body, &m)
16620	if err != nil {
16621		return err
16622	}
16623	for k, v := range m {
16624		switch k {
16625		case "properties":
16626			if v != nil {
16627				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
16628				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
16629				if err != nil {
16630					return err
16631				}
16632				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
16633			}
16634		case "name":
16635			if v != nil {
16636				var name string
16637				err = json.Unmarshal(*v, &name)
16638				if err != nil {
16639					return err
16640				}
16641				inr.Name = &name
16642			}
16643		case "etag":
16644			if v != nil {
16645				var etag string
16646				err = json.Unmarshal(*v, &etag)
16647				if err != nil {
16648					return err
16649				}
16650				inr.Etag = &etag
16651			}
16652		case "type":
16653			if v != nil {
16654				var typeVar string
16655				err = json.Unmarshal(*v, &typeVar)
16656				if err != nil {
16657					return err
16658				}
16659				inr.Type = &typeVar
16660			}
16661		case "id":
16662			if v != nil {
16663				var ID string
16664				err = json.Unmarshal(*v, &ID)
16665				if err != nil {
16666					return err
16667				}
16668				inr.ID = &ID
16669			}
16670		}
16671	}
16672
16673	return nil
16674}
16675
16676// InboundNatRuleListResult response for ListInboundNatRule API service call.
16677type InboundNatRuleListResult struct {
16678	autorest.Response `json:"-"`
16679	// Value - A list of inbound nat rules in a load balancer.
16680	Value *[]InboundNatRule `json:"value,omitempty"`
16681	// NextLink - READ-ONLY; The URL to get the next set of results.
16682	NextLink *string `json:"nextLink,omitempty"`
16683}
16684
16685// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
16686func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
16687	objectMap := make(map[string]interface{})
16688	if inrlr.Value != nil {
16689		objectMap["value"] = inrlr.Value
16690	}
16691	return json.Marshal(objectMap)
16692}
16693
16694// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
16695type InboundNatRuleListResultIterator struct {
16696	i    int
16697	page InboundNatRuleListResultPage
16698}
16699
16700// NextWithContext advances to the next value.  If there was an error making
16701// the request the iterator does not advance and the error is returned.
16702func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
16703	if tracing.IsEnabled() {
16704		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
16705		defer func() {
16706			sc := -1
16707			if iter.Response().Response.Response != nil {
16708				sc = iter.Response().Response.Response.StatusCode
16709			}
16710			tracing.EndSpan(ctx, sc, err)
16711		}()
16712	}
16713	iter.i++
16714	if iter.i < len(iter.page.Values()) {
16715		return nil
16716	}
16717	err = iter.page.NextWithContext(ctx)
16718	if err != nil {
16719		iter.i--
16720		return err
16721	}
16722	iter.i = 0
16723	return nil
16724}
16725
16726// Next advances to the next value.  If there was an error making
16727// the request the iterator does not advance and the error is returned.
16728// Deprecated: Use NextWithContext() instead.
16729func (iter *InboundNatRuleListResultIterator) Next() error {
16730	return iter.NextWithContext(context.Background())
16731}
16732
16733// NotDone returns true if the enumeration should be started or is not yet complete.
16734func (iter InboundNatRuleListResultIterator) NotDone() bool {
16735	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16736}
16737
16738// Response returns the raw server response from the last page request.
16739func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
16740	return iter.page.Response()
16741}
16742
16743// Value returns the current value or a zero-initialized value if the
16744// iterator has advanced beyond the end of the collection.
16745func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
16746	if !iter.page.NotDone() {
16747		return InboundNatRule{}
16748	}
16749	return iter.page.Values()[iter.i]
16750}
16751
16752// Creates a new instance of the InboundNatRuleListResultIterator type.
16753func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
16754	return InboundNatRuleListResultIterator{page: page}
16755}
16756
16757// IsEmpty returns true if the ListResult contains no values.
16758func (inrlr InboundNatRuleListResult) IsEmpty() bool {
16759	return inrlr.Value == nil || len(*inrlr.Value) == 0
16760}
16761
16762// hasNextLink returns true if the NextLink is not empty.
16763func (inrlr InboundNatRuleListResult) hasNextLink() bool {
16764	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
16765}
16766
16767// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
16768// It returns nil if no more results exist.
16769func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
16770	if !inrlr.hasNextLink() {
16771		return nil, nil
16772	}
16773	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16774		autorest.AsJSON(),
16775		autorest.AsGet(),
16776		autorest.WithBaseURL(to.String(inrlr.NextLink)))
16777}
16778
16779// InboundNatRuleListResultPage contains a page of InboundNatRule values.
16780type InboundNatRuleListResultPage struct {
16781	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
16782	inrlr InboundNatRuleListResult
16783}
16784
16785// NextWithContext advances to the next page of values.  If there was an error making
16786// the request the page does not advance and the error is returned.
16787func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
16788	if tracing.IsEnabled() {
16789		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
16790		defer func() {
16791			sc := -1
16792			if page.Response().Response.Response != nil {
16793				sc = page.Response().Response.Response.StatusCode
16794			}
16795			tracing.EndSpan(ctx, sc, err)
16796		}()
16797	}
16798	for {
16799		next, err := page.fn(ctx, page.inrlr)
16800		if err != nil {
16801			return err
16802		}
16803		page.inrlr = next
16804		if !next.hasNextLink() || !next.IsEmpty() {
16805			break
16806		}
16807	}
16808	return nil
16809}
16810
16811// Next advances to the next page of values.  If there was an error making
16812// the request the page does not advance and the error is returned.
16813// Deprecated: Use NextWithContext() instead.
16814func (page *InboundNatRuleListResultPage) Next() error {
16815	return page.NextWithContext(context.Background())
16816}
16817
16818// NotDone returns true if the page enumeration should be started or is not yet complete.
16819func (page InboundNatRuleListResultPage) NotDone() bool {
16820	return !page.inrlr.IsEmpty()
16821}
16822
16823// Response returns the raw server response from the last page request.
16824func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
16825	return page.inrlr
16826}
16827
16828// Values returns the slice of values for the current page or nil if there are no values.
16829func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
16830	if page.inrlr.IsEmpty() {
16831		return nil
16832	}
16833	return *page.inrlr.Value
16834}
16835
16836// Creates a new instance of the InboundNatRuleListResultPage type.
16837func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
16838	return InboundNatRuleListResultPage{
16839		fn:    getNextPage,
16840		inrlr: cur,
16841	}
16842}
16843
16844// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
16845type InboundNatRulePropertiesFormat struct {
16846	// FrontendIPConfiguration - A reference to frontend IP addresses.
16847	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
16848	// 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.
16849	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
16850	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
16851	Protocol TransportProtocol `json:"protocol,omitempty"`
16852	// 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.
16853	FrontendPort *int32 `json:"frontendPort,omitempty"`
16854	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
16855	BackendPort *int32 `json:"backendPort,omitempty"`
16856	// 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.
16857	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
16858	// 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.
16859	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
16860	// 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.
16861	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
16862	// ProvisioningState - READ-ONLY; The provisioning state of the inbound NAT rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
16863	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16864}
16865
16866// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
16867func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
16868	objectMap := make(map[string]interface{})
16869	if inrpf.FrontendIPConfiguration != nil {
16870		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
16871	}
16872	if inrpf.Protocol != "" {
16873		objectMap["protocol"] = inrpf.Protocol
16874	}
16875	if inrpf.FrontendPort != nil {
16876		objectMap["frontendPort"] = inrpf.FrontendPort
16877	}
16878	if inrpf.BackendPort != nil {
16879		objectMap["backendPort"] = inrpf.BackendPort
16880	}
16881	if inrpf.IdleTimeoutInMinutes != nil {
16882		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
16883	}
16884	if inrpf.EnableFloatingIP != nil {
16885		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
16886	}
16887	if inrpf.EnableTCPReset != nil {
16888		objectMap["enableTcpReset"] = inrpf.EnableTCPReset
16889	}
16890	return json.Marshal(objectMap)
16891}
16892
16893// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16894// long-running operation.
16895type InboundNatRulesCreateOrUpdateFuture struct {
16896	azure.FutureAPI
16897	// Result returns the result of the asynchronous operation.
16898	// If the operation has not completed it will return an error.
16899	Result func(InboundNatRulesClient) (InboundNatRule, error)
16900}
16901
16902// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16903func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16904	var azFuture azure.Future
16905	if err := json.Unmarshal(body, &azFuture); err != nil {
16906		return err
16907	}
16908	future.FutureAPI = &azFuture
16909	future.Result = future.result
16910	return nil
16911}
16912
16913// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result.
16914func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
16915	var done bool
16916	done, err = future.DoneWithContext(context.Background(), client)
16917	if err != nil {
16918		err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16919		return
16920	}
16921	if !done {
16922		inr.Response.Response = future.Response()
16923		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
16924		return
16925	}
16926	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16927	if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
16928		inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
16929		if err != nil {
16930			err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
16931		}
16932	}
16933	return
16934}
16935
16936// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16937// operation.
16938type InboundNatRulesDeleteFuture struct {
16939	azure.FutureAPI
16940	// Result returns the result of the asynchronous operation.
16941	// If the operation has not completed it will return an error.
16942	Result func(InboundNatRulesClient) (autorest.Response, error)
16943}
16944
16945// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16946func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
16947	var azFuture azure.Future
16948	if err := json.Unmarshal(body, &azFuture); err != nil {
16949		return err
16950	}
16951	future.FutureAPI = &azFuture
16952	future.Result = future.result
16953	return nil
16954}
16955
16956// result is the default implementation for InboundNatRulesDeleteFuture.Result.
16957func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) {
16958	var done bool
16959	done, err = future.DoneWithContext(context.Background(), client)
16960	if err != nil {
16961		err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
16962		return
16963	}
16964	if !done {
16965		ar.Response = future.Response()
16966		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
16967		return
16968	}
16969	ar.Response = future.Response()
16970	return
16971}
16972
16973// IntentPolicy network Intent Policy resource.
16974type IntentPolicy struct {
16975	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
16976	Etag *string `json:"etag,omitempty"`
16977	// ID - Resource ID.
16978	ID *string `json:"id,omitempty"`
16979	// Name - READ-ONLY; Resource name.
16980	Name *string `json:"name,omitempty"`
16981	// Type - READ-ONLY; Resource type.
16982	Type *string `json:"type,omitempty"`
16983	// Location - Resource location.
16984	Location *string `json:"location,omitempty"`
16985	// Tags - Resource tags.
16986	Tags map[string]*string `json:"tags"`
16987}
16988
16989// MarshalJSON is the custom marshaler for IntentPolicy.
16990func (IP IntentPolicy) MarshalJSON() ([]byte, error) {
16991	objectMap := make(map[string]interface{})
16992	if IP.ID != nil {
16993		objectMap["id"] = IP.ID
16994	}
16995	if IP.Location != nil {
16996		objectMap["location"] = IP.Location
16997	}
16998	if IP.Tags != nil {
16999		objectMap["tags"] = IP.Tags
17000	}
17001	return json.Marshal(objectMap)
17002}
17003
17004// IntentPolicyConfiguration details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest.
17005type IntentPolicyConfiguration struct {
17006	// NetworkIntentPolicyName - The name of the Network Intent Policy for storing in target subscription.
17007	NetworkIntentPolicyName *string `json:"networkIntentPolicyName,omitempty"`
17008	// SourceNetworkIntentPolicy - Source network intent policy.
17009	SourceNetworkIntentPolicy *IntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"`
17010}
17011
17012// Interface a network interface in a resource group.
17013type Interface struct {
17014	autorest.Response `json:"-"`
17015	// InterfacePropertiesFormat - Properties of the network interface.
17016	*InterfacePropertiesFormat `json:"properties,omitempty"`
17017	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
17018	Etag *string `json:"etag,omitempty"`
17019	// ID - Resource ID.
17020	ID *string `json:"id,omitempty"`
17021	// Name - READ-ONLY; Resource name.
17022	Name *string `json:"name,omitempty"`
17023	// Type - READ-ONLY; Resource type.
17024	Type *string `json:"type,omitempty"`
17025	// Location - Resource location.
17026	Location *string `json:"location,omitempty"`
17027	// Tags - Resource tags.
17028	Tags map[string]*string `json:"tags"`
17029}
17030
17031// MarshalJSON is the custom marshaler for Interface.
17032func (i Interface) MarshalJSON() ([]byte, error) {
17033	objectMap := make(map[string]interface{})
17034	if i.InterfacePropertiesFormat != nil {
17035		objectMap["properties"] = i.InterfacePropertiesFormat
17036	}
17037	if i.ID != nil {
17038		objectMap["id"] = i.ID
17039	}
17040	if i.Location != nil {
17041		objectMap["location"] = i.Location
17042	}
17043	if i.Tags != nil {
17044		objectMap["tags"] = i.Tags
17045	}
17046	return json.Marshal(objectMap)
17047}
17048
17049// UnmarshalJSON is the custom unmarshaler for Interface struct.
17050func (i *Interface) UnmarshalJSON(body []byte) error {
17051	var m map[string]*json.RawMessage
17052	err := json.Unmarshal(body, &m)
17053	if err != nil {
17054		return err
17055	}
17056	for k, v := range m {
17057		switch k {
17058		case "properties":
17059			if v != nil {
17060				var interfacePropertiesFormat InterfacePropertiesFormat
17061				err = json.Unmarshal(*v, &interfacePropertiesFormat)
17062				if err != nil {
17063					return err
17064				}
17065				i.InterfacePropertiesFormat = &interfacePropertiesFormat
17066			}
17067		case "etag":
17068			if v != nil {
17069				var etag string
17070				err = json.Unmarshal(*v, &etag)
17071				if err != nil {
17072					return err
17073				}
17074				i.Etag = &etag
17075			}
17076		case "id":
17077			if v != nil {
17078				var ID string
17079				err = json.Unmarshal(*v, &ID)
17080				if err != nil {
17081					return err
17082				}
17083				i.ID = &ID
17084			}
17085		case "name":
17086			if v != nil {
17087				var name string
17088				err = json.Unmarshal(*v, &name)
17089				if err != nil {
17090					return err
17091				}
17092				i.Name = &name
17093			}
17094		case "type":
17095			if v != nil {
17096				var typeVar string
17097				err = json.Unmarshal(*v, &typeVar)
17098				if err != nil {
17099					return err
17100				}
17101				i.Type = &typeVar
17102			}
17103		case "location":
17104			if v != nil {
17105				var location string
17106				err = json.Unmarshal(*v, &location)
17107				if err != nil {
17108					return err
17109				}
17110				i.Location = &location
17111			}
17112		case "tags":
17113			if v != nil {
17114				var tags map[string]*string
17115				err = json.Unmarshal(*v, &tags)
17116				if err != nil {
17117					return err
17118				}
17119				i.Tags = tags
17120			}
17121		}
17122	}
17123
17124	return nil
17125}
17126
17127// InterfaceAssociation network interface and its custom security rules.
17128type InterfaceAssociation struct {
17129	// ID - READ-ONLY; Network interface ID.
17130	ID *string `json:"id,omitempty"`
17131	// SecurityRules - Collection of custom security rules.
17132	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
17133}
17134
17135// MarshalJSON is the custom marshaler for InterfaceAssociation.
17136func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
17137	objectMap := make(map[string]interface{})
17138	if ia.SecurityRules != nil {
17139		objectMap["securityRules"] = ia.SecurityRules
17140	}
17141	return json.Marshal(objectMap)
17142}
17143
17144// InterfaceDNSSettings DNS settings of a network interface.
17145type InterfaceDNSSettings struct {
17146	// 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.
17147	DNSServers *[]string `json:"dnsServers,omitempty"`
17148	// 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.
17149	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
17150	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
17151	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
17152	// InternalFqdn - READ-ONLY; Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
17153	InternalFqdn *string `json:"internalFqdn,omitempty"`
17154	// 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.
17155	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
17156}
17157
17158// MarshalJSON is the custom marshaler for InterfaceDNSSettings.
17159func (ids InterfaceDNSSettings) MarshalJSON() ([]byte, error) {
17160	objectMap := make(map[string]interface{})
17161	if ids.DNSServers != nil {
17162		objectMap["dnsServers"] = ids.DNSServers
17163	}
17164	if ids.InternalDNSNameLabel != nil {
17165		objectMap["internalDnsNameLabel"] = ids.InternalDNSNameLabel
17166	}
17167	return json.Marshal(objectMap)
17168}
17169
17170// InterfaceIPConfiguration iPConfiguration in a network interface.
17171type InterfaceIPConfiguration struct {
17172	autorest.Response `json:"-"`
17173	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
17174	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
17175	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17176	Name *string `json:"name,omitempty"`
17177	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
17178	Etag *string `json:"etag,omitempty"`
17179	// ID - Resource ID.
17180	ID *string `json:"id,omitempty"`
17181}
17182
17183// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
17184func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
17185	objectMap := make(map[string]interface{})
17186	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
17187		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
17188	}
17189	if iic.Name != nil {
17190		objectMap["name"] = iic.Name
17191	}
17192	if iic.ID != nil {
17193		objectMap["id"] = iic.ID
17194	}
17195	return json.Marshal(objectMap)
17196}
17197
17198// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
17199func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
17200	var m map[string]*json.RawMessage
17201	err := json.Unmarshal(body, &m)
17202	if err != nil {
17203		return err
17204	}
17205	for k, v := range m {
17206		switch k {
17207		case "properties":
17208			if v != nil {
17209				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
17210				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
17211				if err != nil {
17212					return err
17213				}
17214				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
17215			}
17216		case "name":
17217			if v != nil {
17218				var name string
17219				err = json.Unmarshal(*v, &name)
17220				if err != nil {
17221					return err
17222				}
17223				iic.Name = &name
17224			}
17225		case "etag":
17226			if v != nil {
17227				var etag string
17228				err = json.Unmarshal(*v, &etag)
17229				if err != nil {
17230					return err
17231				}
17232				iic.Etag = &etag
17233			}
17234		case "id":
17235			if v != nil {
17236				var ID string
17237				err = json.Unmarshal(*v, &ID)
17238				if err != nil {
17239					return err
17240				}
17241				iic.ID = &ID
17242			}
17243		}
17244	}
17245
17246	return nil
17247}
17248
17249// InterfaceIPConfigurationListResult response for list ip configurations API service call.
17250type InterfaceIPConfigurationListResult struct {
17251	autorest.Response `json:"-"`
17252	// Value - A list of ip configurations.
17253	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
17254	// NextLink - READ-ONLY; The URL to get the next set of results.
17255	NextLink *string `json:"nextLink,omitempty"`
17256}
17257
17258// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
17259func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
17260	objectMap := make(map[string]interface{})
17261	if iiclr.Value != nil {
17262		objectMap["value"] = iiclr.Value
17263	}
17264	return json.Marshal(objectMap)
17265}
17266
17267// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
17268// InterfaceIPConfiguration values.
17269type InterfaceIPConfigurationListResultIterator struct {
17270	i    int
17271	page InterfaceIPConfigurationListResultPage
17272}
17273
17274// NextWithContext advances to the next value.  If there was an error making
17275// the request the iterator does not advance and the error is returned.
17276func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
17277	if tracing.IsEnabled() {
17278		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
17279		defer func() {
17280			sc := -1
17281			if iter.Response().Response.Response != nil {
17282				sc = iter.Response().Response.Response.StatusCode
17283			}
17284			tracing.EndSpan(ctx, sc, err)
17285		}()
17286	}
17287	iter.i++
17288	if iter.i < len(iter.page.Values()) {
17289		return nil
17290	}
17291	err = iter.page.NextWithContext(ctx)
17292	if err != nil {
17293		iter.i--
17294		return err
17295	}
17296	iter.i = 0
17297	return nil
17298}
17299
17300// Next advances to the next value.  If there was an error making
17301// the request the iterator does not advance and the error is returned.
17302// Deprecated: Use NextWithContext() instead.
17303func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
17304	return iter.NextWithContext(context.Background())
17305}
17306
17307// NotDone returns true if the enumeration should be started or is not yet complete.
17308func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
17309	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17310}
17311
17312// Response returns the raw server response from the last page request.
17313func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
17314	return iter.page.Response()
17315}
17316
17317// Value returns the current value or a zero-initialized value if the
17318// iterator has advanced beyond the end of the collection.
17319func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
17320	if !iter.page.NotDone() {
17321		return InterfaceIPConfiguration{}
17322	}
17323	return iter.page.Values()[iter.i]
17324}
17325
17326// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
17327func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
17328	return InterfaceIPConfigurationListResultIterator{page: page}
17329}
17330
17331// IsEmpty returns true if the ListResult contains no values.
17332func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
17333	return iiclr.Value == nil || len(*iiclr.Value) == 0
17334}
17335
17336// hasNextLink returns true if the NextLink is not empty.
17337func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
17338	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
17339}
17340
17341// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
17342// It returns nil if no more results exist.
17343func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
17344	if !iiclr.hasNextLink() {
17345		return nil, nil
17346	}
17347	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17348		autorest.AsJSON(),
17349		autorest.AsGet(),
17350		autorest.WithBaseURL(to.String(iiclr.NextLink)))
17351}
17352
17353// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
17354type InterfaceIPConfigurationListResultPage struct {
17355	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
17356	iiclr InterfaceIPConfigurationListResult
17357}
17358
17359// NextWithContext advances to the next page of values.  If there was an error making
17360// the request the page does not advance and the error is returned.
17361func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
17362	if tracing.IsEnabled() {
17363		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
17364		defer func() {
17365			sc := -1
17366			if page.Response().Response.Response != nil {
17367				sc = page.Response().Response.Response.StatusCode
17368			}
17369			tracing.EndSpan(ctx, sc, err)
17370		}()
17371	}
17372	for {
17373		next, err := page.fn(ctx, page.iiclr)
17374		if err != nil {
17375			return err
17376		}
17377		page.iiclr = next
17378		if !next.hasNextLink() || !next.IsEmpty() {
17379			break
17380		}
17381	}
17382	return nil
17383}
17384
17385// Next advances to the next page of values.  If there was an error making
17386// the request the page does not advance and the error is returned.
17387// Deprecated: Use NextWithContext() instead.
17388func (page *InterfaceIPConfigurationListResultPage) Next() error {
17389	return page.NextWithContext(context.Background())
17390}
17391
17392// NotDone returns true if the page enumeration should be started or is not yet complete.
17393func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
17394	return !page.iiclr.IsEmpty()
17395}
17396
17397// Response returns the raw server response from the last page request.
17398func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
17399	return page.iiclr
17400}
17401
17402// Values returns the slice of values for the current page or nil if there are no values.
17403func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
17404	if page.iiclr.IsEmpty() {
17405		return nil
17406	}
17407	return *page.iiclr.Value
17408}
17409
17410// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
17411func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
17412	return InterfaceIPConfigurationListResultPage{
17413		fn:    getNextPage,
17414		iiclr: cur,
17415	}
17416}
17417
17418// InterfaceIPConfigurationPrivateLinkConnectionProperties privateLinkConnection properties for the network
17419// interface.
17420type InterfaceIPConfigurationPrivateLinkConnectionProperties struct {
17421	// GroupID - READ-ONLY; The group ID for current private link connection.
17422	GroupID *string `json:"groupId,omitempty"`
17423	// RequiredMemberName - READ-ONLY; The required member name for current private link connection.
17424	RequiredMemberName *string `json:"requiredMemberName,omitempty"`
17425	// Fqdns - READ-ONLY; List of FQDNs for current private link connection.
17426	Fqdns *[]string `json:"fqdns,omitempty"`
17427}
17428
17429// MarshalJSON is the custom marshaler for InterfaceIPConfigurationPrivateLinkConnectionProperties.
17430func (iicplcp InterfaceIPConfigurationPrivateLinkConnectionProperties) MarshalJSON() ([]byte, error) {
17431	objectMap := make(map[string]interface{})
17432	return json.Marshal(objectMap)
17433}
17434
17435// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
17436type InterfaceIPConfigurationPropertiesFormat struct {
17437	// VirtualNetworkTaps - The reference to Virtual Network Taps.
17438	VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"`
17439	// ApplicationGatewayBackendAddressPools - The reference to ApplicationGatewayBackendAddressPool resource.
17440	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
17441	// LoadBalancerBackendAddressPools - The reference to LoadBalancerBackendAddressPool resource.
17442	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
17443	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
17444	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
17445	// PrivateIPAddress - Private IP address of the IP configuration.
17446	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
17447	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
17448	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
17449	// PrivateIPAddressVersion - Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPv4', 'IPv6'
17450	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
17451	// Subnet - Subnet bound to the IP configuration.
17452	Subnet *Subnet `json:"subnet,omitempty"`
17453	// Primary - Whether this is a primary customer address on the network interface.
17454	Primary *bool `json:"primary,omitempty"`
17455	// PublicIPAddress - Public IP address bound to the IP configuration.
17456	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
17457	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
17458	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
17459	// ProvisioningState - READ-ONLY; The provisioning state of the network interface IP configuration. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17460	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17461	// PrivateLinkConnectionProperties - READ-ONLY; PrivateLinkConnection properties for the network interface.
17462	PrivateLinkConnectionProperties *InterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"`
17463}
17464
17465// MarshalJSON is the custom marshaler for InterfaceIPConfigurationPropertiesFormat.
17466func (iicpf InterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
17467	objectMap := make(map[string]interface{})
17468	if iicpf.VirtualNetworkTaps != nil {
17469		objectMap["virtualNetworkTaps"] = iicpf.VirtualNetworkTaps
17470	}
17471	if iicpf.ApplicationGatewayBackendAddressPools != nil {
17472		objectMap["applicationGatewayBackendAddressPools"] = iicpf.ApplicationGatewayBackendAddressPools
17473	}
17474	if iicpf.LoadBalancerBackendAddressPools != nil {
17475		objectMap["loadBalancerBackendAddressPools"] = iicpf.LoadBalancerBackendAddressPools
17476	}
17477	if iicpf.LoadBalancerInboundNatRules != nil {
17478		objectMap["loadBalancerInboundNatRules"] = iicpf.LoadBalancerInboundNatRules
17479	}
17480	if iicpf.PrivateIPAddress != nil {
17481		objectMap["privateIPAddress"] = iicpf.PrivateIPAddress
17482	}
17483	if iicpf.PrivateIPAllocationMethod != "" {
17484		objectMap["privateIPAllocationMethod"] = iicpf.PrivateIPAllocationMethod
17485	}
17486	if iicpf.PrivateIPAddressVersion != "" {
17487		objectMap["privateIPAddressVersion"] = iicpf.PrivateIPAddressVersion
17488	}
17489	if iicpf.Subnet != nil {
17490		objectMap["subnet"] = iicpf.Subnet
17491	}
17492	if iicpf.Primary != nil {
17493		objectMap["primary"] = iicpf.Primary
17494	}
17495	if iicpf.PublicIPAddress != nil {
17496		objectMap["publicIPAddress"] = iicpf.PublicIPAddress
17497	}
17498	if iicpf.ApplicationSecurityGroups != nil {
17499		objectMap["applicationSecurityGroups"] = iicpf.ApplicationSecurityGroups
17500	}
17501	return json.Marshal(objectMap)
17502}
17503
17504// InterfaceListResult response for the ListNetworkInterface API service call.
17505type InterfaceListResult struct {
17506	autorest.Response `json:"-"`
17507	// Value - A list of network interfaces in a resource group.
17508	Value *[]Interface `json:"value,omitempty"`
17509	// NextLink - READ-ONLY; The URL to get the next set of results.
17510	NextLink *string `json:"nextLink,omitempty"`
17511}
17512
17513// MarshalJSON is the custom marshaler for InterfaceListResult.
17514func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
17515	objectMap := make(map[string]interface{})
17516	if ilr.Value != nil {
17517		objectMap["value"] = ilr.Value
17518	}
17519	return json.Marshal(objectMap)
17520}
17521
17522// InterfaceListResultIterator provides access to a complete listing of Interface values.
17523type InterfaceListResultIterator struct {
17524	i    int
17525	page InterfaceListResultPage
17526}
17527
17528// NextWithContext advances to the next value.  If there was an error making
17529// the request the iterator does not advance and the error is returned.
17530func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
17531	if tracing.IsEnabled() {
17532		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
17533		defer func() {
17534			sc := -1
17535			if iter.Response().Response.Response != nil {
17536				sc = iter.Response().Response.Response.StatusCode
17537			}
17538			tracing.EndSpan(ctx, sc, err)
17539		}()
17540	}
17541	iter.i++
17542	if iter.i < len(iter.page.Values()) {
17543		return nil
17544	}
17545	err = iter.page.NextWithContext(ctx)
17546	if err != nil {
17547		iter.i--
17548		return err
17549	}
17550	iter.i = 0
17551	return nil
17552}
17553
17554// Next advances to the next value.  If there was an error making
17555// the request the iterator does not advance and the error is returned.
17556// Deprecated: Use NextWithContext() instead.
17557func (iter *InterfaceListResultIterator) Next() error {
17558	return iter.NextWithContext(context.Background())
17559}
17560
17561// NotDone returns true if the enumeration should be started or is not yet complete.
17562func (iter InterfaceListResultIterator) NotDone() bool {
17563	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17564}
17565
17566// Response returns the raw server response from the last page request.
17567func (iter InterfaceListResultIterator) Response() InterfaceListResult {
17568	return iter.page.Response()
17569}
17570
17571// Value returns the current value or a zero-initialized value if the
17572// iterator has advanced beyond the end of the collection.
17573func (iter InterfaceListResultIterator) Value() Interface {
17574	if !iter.page.NotDone() {
17575		return Interface{}
17576	}
17577	return iter.page.Values()[iter.i]
17578}
17579
17580// Creates a new instance of the InterfaceListResultIterator type.
17581func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
17582	return InterfaceListResultIterator{page: page}
17583}
17584
17585// IsEmpty returns true if the ListResult contains no values.
17586func (ilr InterfaceListResult) IsEmpty() bool {
17587	return ilr.Value == nil || len(*ilr.Value) == 0
17588}
17589
17590// hasNextLink returns true if the NextLink is not empty.
17591func (ilr InterfaceListResult) hasNextLink() bool {
17592	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
17593}
17594
17595// interfaceListResultPreparer prepares a request to retrieve the next set of results.
17596// It returns nil if no more results exist.
17597func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
17598	if !ilr.hasNextLink() {
17599		return nil, nil
17600	}
17601	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17602		autorest.AsJSON(),
17603		autorest.AsGet(),
17604		autorest.WithBaseURL(to.String(ilr.NextLink)))
17605}
17606
17607// InterfaceListResultPage contains a page of Interface values.
17608type InterfaceListResultPage struct {
17609	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
17610	ilr InterfaceListResult
17611}
17612
17613// NextWithContext advances to the next page of values.  If there was an error making
17614// the request the page does not advance and the error is returned.
17615func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
17616	if tracing.IsEnabled() {
17617		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
17618		defer func() {
17619			sc := -1
17620			if page.Response().Response.Response != nil {
17621				sc = page.Response().Response.Response.StatusCode
17622			}
17623			tracing.EndSpan(ctx, sc, err)
17624		}()
17625	}
17626	for {
17627		next, err := page.fn(ctx, page.ilr)
17628		if err != nil {
17629			return err
17630		}
17631		page.ilr = next
17632		if !next.hasNextLink() || !next.IsEmpty() {
17633			break
17634		}
17635	}
17636	return nil
17637}
17638
17639// Next advances to the next page of values.  If there was an error making
17640// the request the page does not advance and the error is returned.
17641// Deprecated: Use NextWithContext() instead.
17642func (page *InterfaceListResultPage) Next() error {
17643	return page.NextWithContext(context.Background())
17644}
17645
17646// NotDone returns true if the page enumeration should be started or is not yet complete.
17647func (page InterfaceListResultPage) NotDone() bool {
17648	return !page.ilr.IsEmpty()
17649}
17650
17651// Response returns the raw server response from the last page request.
17652func (page InterfaceListResultPage) Response() InterfaceListResult {
17653	return page.ilr
17654}
17655
17656// Values returns the slice of values for the current page or nil if there are no values.
17657func (page InterfaceListResultPage) Values() []Interface {
17658	if page.ilr.IsEmpty() {
17659		return nil
17660	}
17661	return *page.ilr.Value
17662}
17663
17664// Creates a new instance of the InterfaceListResultPage type.
17665func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
17666	return InterfaceListResultPage{
17667		fn:  getNextPage,
17668		ilr: cur,
17669	}
17670}
17671
17672// InterfaceLoadBalancerListResult response for list ip configurations API service call.
17673type InterfaceLoadBalancerListResult struct {
17674	autorest.Response `json:"-"`
17675	// Value - A list of load balancers.
17676	Value *[]LoadBalancer `json:"value,omitempty"`
17677	// NextLink - READ-ONLY; The URL to get the next set of results.
17678	NextLink *string `json:"nextLink,omitempty"`
17679}
17680
17681// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
17682func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
17683	objectMap := make(map[string]interface{})
17684	if ilblr.Value != nil {
17685		objectMap["value"] = ilblr.Value
17686	}
17687	return json.Marshal(objectMap)
17688}
17689
17690// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
17691type InterfaceLoadBalancerListResultIterator struct {
17692	i    int
17693	page InterfaceLoadBalancerListResultPage
17694}
17695
17696// NextWithContext advances to the next value.  If there was an error making
17697// the request the iterator does not advance and the error is returned.
17698func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
17699	if tracing.IsEnabled() {
17700		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
17701		defer func() {
17702			sc := -1
17703			if iter.Response().Response.Response != nil {
17704				sc = iter.Response().Response.Response.StatusCode
17705			}
17706			tracing.EndSpan(ctx, sc, err)
17707		}()
17708	}
17709	iter.i++
17710	if iter.i < len(iter.page.Values()) {
17711		return nil
17712	}
17713	err = iter.page.NextWithContext(ctx)
17714	if err != nil {
17715		iter.i--
17716		return err
17717	}
17718	iter.i = 0
17719	return nil
17720}
17721
17722// Next advances to the next value.  If there was an error making
17723// the request the iterator does not advance and the error is returned.
17724// Deprecated: Use NextWithContext() instead.
17725func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
17726	return iter.NextWithContext(context.Background())
17727}
17728
17729// NotDone returns true if the enumeration should be started or is not yet complete.
17730func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
17731	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17732}
17733
17734// Response returns the raw server response from the last page request.
17735func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
17736	return iter.page.Response()
17737}
17738
17739// Value returns the current value or a zero-initialized value if the
17740// iterator has advanced beyond the end of the collection.
17741func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
17742	if !iter.page.NotDone() {
17743		return LoadBalancer{}
17744	}
17745	return iter.page.Values()[iter.i]
17746}
17747
17748// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
17749func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
17750	return InterfaceLoadBalancerListResultIterator{page: page}
17751}
17752
17753// IsEmpty returns true if the ListResult contains no values.
17754func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
17755	return ilblr.Value == nil || len(*ilblr.Value) == 0
17756}
17757
17758// hasNextLink returns true if the NextLink is not empty.
17759func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
17760	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
17761}
17762
17763// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
17764// It returns nil if no more results exist.
17765func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
17766	if !ilblr.hasNextLink() {
17767		return nil, nil
17768	}
17769	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17770		autorest.AsJSON(),
17771		autorest.AsGet(),
17772		autorest.WithBaseURL(to.String(ilblr.NextLink)))
17773}
17774
17775// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
17776type InterfaceLoadBalancerListResultPage struct {
17777	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
17778	ilblr InterfaceLoadBalancerListResult
17779}
17780
17781// NextWithContext advances to the next page of values.  If there was an error making
17782// the request the page does not advance and the error is returned.
17783func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
17784	if tracing.IsEnabled() {
17785		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
17786		defer func() {
17787			sc := -1
17788			if page.Response().Response.Response != nil {
17789				sc = page.Response().Response.Response.StatusCode
17790			}
17791			tracing.EndSpan(ctx, sc, err)
17792		}()
17793	}
17794	for {
17795		next, err := page.fn(ctx, page.ilblr)
17796		if err != nil {
17797			return err
17798		}
17799		page.ilblr = next
17800		if !next.hasNextLink() || !next.IsEmpty() {
17801			break
17802		}
17803	}
17804	return nil
17805}
17806
17807// Next advances to the next page of values.  If there was an error making
17808// the request the page does not advance and the error is returned.
17809// Deprecated: Use NextWithContext() instead.
17810func (page *InterfaceLoadBalancerListResultPage) Next() error {
17811	return page.NextWithContext(context.Background())
17812}
17813
17814// NotDone returns true if the page enumeration should be started or is not yet complete.
17815func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
17816	return !page.ilblr.IsEmpty()
17817}
17818
17819// Response returns the raw server response from the last page request.
17820func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
17821	return page.ilblr
17822}
17823
17824// Values returns the slice of values for the current page or nil if there are no values.
17825func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
17826	if page.ilblr.IsEmpty() {
17827		return nil
17828	}
17829	return *page.ilblr.Value
17830}
17831
17832// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
17833func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
17834	return InterfaceLoadBalancerListResultPage{
17835		fn:    getNextPage,
17836		ilblr: cur,
17837	}
17838}
17839
17840// InterfacePropertiesFormat networkInterface properties.
17841type InterfacePropertiesFormat struct {
17842	// VirtualMachine - READ-ONLY; The reference to a virtual machine.
17843	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
17844	// NetworkSecurityGroup - The reference to the NetworkSecurityGroup resource.
17845	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
17846	// PrivateEndpoint - READ-ONLY; A reference to the private endpoint to which the network interface is linked.
17847	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
17848	// IPConfigurations - A list of IPConfigurations of the network interface.
17849	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
17850	// TapConfigurations - READ-ONLY; A list of TapConfigurations of the network interface.
17851	TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"`
17852	// DNSSettings - The DNS settings in network interface.
17853	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
17854	// MacAddress - READ-ONLY; The MAC address of the network interface.
17855	MacAddress *string `json:"macAddress,omitempty"`
17856	// Primary - READ-ONLY; Whether this is a primary network interface on a virtual machine.
17857	Primary *bool `json:"primary,omitempty"`
17858	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
17859	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
17860	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
17861	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
17862	// HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources.
17863	HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"`
17864	// ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource.
17865	ResourceGUID *string `json:"resourceGuid,omitempty"`
17866	// ProvisioningState - READ-ONLY; The provisioning state of the network interface resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17867	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17868}
17869
17870// MarshalJSON is the custom marshaler for InterfacePropertiesFormat.
17871func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
17872	objectMap := make(map[string]interface{})
17873	if ipf.NetworkSecurityGroup != nil {
17874		objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup
17875	}
17876	if ipf.IPConfigurations != nil {
17877		objectMap["ipConfigurations"] = ipf.IPConfigurations
17878	}
17879	if ipf.DNSSettings != nil {
17880		objectMap["dnsSettings"] = ipf.DNSSettings
17881	}
17882	if ipf.EnableAcceleratedNetworking != nil {
17883		objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking
17884	}
17885	if ipf.EnableIPForwarding != nil {
17886		objectMap["enableIPForwarding"] = ipf.EnableIPForwarding
17887	}
17888	return json.Marshal(objectMap)
17889}
17890
17891// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17892// long-running operation.
17893type InterfacesCreateOrUpdateFuture struct {
17894	azure.FutureAPI
17895	// Result returns the result of the asynchronous operation.
17896	// If the operation has not completed it will return an error.
17897	Result func(InterfacesClient) (Interface, error)
17898}
17899
17900// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17901func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17902	var azFuture azure.Future
17903	if err := json.Unmarshal(body, &azFuture); err != nil {
17904		return err
17905	}
17906	future.FutureAPI = &azFuture
17907	future.Result = future.result
17908	return nil
17909}
17910
17911// result is the default implementation for InterfacesCreateOrUpdateFuture.Result.
17912func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) {
17913	var done bool
17914	done, err = future.DoneWithContext(context.Background(), client)
17915	if err != nil {
17916		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17917		return
17918	}
17919	if !done {
17920		i.Response.Response = future.Response()
17921		err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
17922		return
17923	}
17924	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17925	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
17926		i, err = client.CreateOrUpdateResponder(i.Response.Response)
17927		if err != nil {
17928			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
17929		}
17930	}
17931	return
17932}
17933
17934// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17935// operation.
17936type InterfacesDeleteFuture struct {
17937	azure.FutureAPI
17938	// Result returns the result of the asynchronous operation.
17939	// If the operation has not completed it will return an error.
17940	Result func(InterfacesClient) (autorest.Response, error)
17941}
17942
17943// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17944func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error {
17945	var azFuture azure.Future
17946	if err := json.Unmarshal(body, &azFuture); err != nil {
17947		return err
17948	}
17949	future.FutureAPI = &azFuture
17950	future.Result = future.result
17951	return nil
17952}
17953
17954// result is the default implementation for InterfacesDeleteFuture.Result.
17955func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) {
17956	var done bool
17957	done, err = future.DoneWithContext(context.Background(), client)
17958	if err != nil {
17959		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
17960		return
17961	}
17962	if !done {
17963		ar.Response = future.Response()
17964		err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
17965		return
17966	}
17967	ar.Response = future.Response()
17968	return
17969}
17970
17971// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
17972// long-running operation.
17973type InterfacesGetEffectiveRouteTableFuture struct {
17974	azure.FutureAPI
17975	// Result returns the result of the asynchronous operation.
17976	// If the operation has not completed it will return an error.
17977	Result func(InterfacesClient) (EffectiveRouteListResult, error)
17978}
17979
17980// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17981func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error {
17982	var azFuture azure.Future
17983	if err := json.Unmarshal(body, &azFuture); err != nil {
17984		return err
17985	}
17986	future.FutureAPI = &azFuture
17987	future.Result = future.result
17988	return nil
17989}
17990
17991// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result.
17992func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
17993	var done bool
17994	done, err = future.DoneWithContext(context.Background(), client)
17995	if err != nil {
17996		err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
17997		return
17998	}
17999	if !done {
18000		erlr.Response.Response = future.Response()
18001		err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
18002		return
18003	}
18004	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18005	if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
18006		erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
18007		if err != nil {
18008			err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
18009		}
18010	}
18011	return
18012}
18013
18014// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
18015// results of a long-running operation.
18016type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
18017	azure.FutureAPI
18018	// Result returns the result of the asynchronous operation.
18019	// If the operation has not completed it will return an error.
18020	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
18021}
18022
18023// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18024func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error {
18025	var azFuture azure.Future
18026	if err := json.Unmarshal(body, &azFuture); err != nil {
18027		return err
18028	}
18029	future.FutureAPI = &azFuture
18030	future.Result = future.result
18031	return nil
18032}
18033
18034// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result.
18035func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
18036	var done bool
18037	done, err = future.DoneWithContext(context.Background(), client)
18038	if err != nil {
18039		err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
18040		return
18041	}
18042	if !done {
18043		ensglr.Response.Response = future.Response()
18044		err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
18045		return
18046	}
18047	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18048	if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
18049		ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
18050		if err != nil {
18051			err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
18052		}
18053	}
18054	return
18055}
18056
18057// InterfaceTapConfiguration tap configuration in a Network Interface.
18058type InterfaceTapConfiguration struct {
18059	autorest.Response `json:"-"`
18060	// InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration.
18061	*InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"`
18062	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18063	Name *string `json:"name,omitempty"`
18064	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
18065	Etag *string `json:"etag,omitempty"`
18066	// Type - READ-ONLY; Sub Resource type.
18067	Type *string `json:"type,omitempty"`
18068	// ID - Resource ID.
18069	ID *string `json:"id,omitempty"`
18070}
18071
18072// MarshalJSON is the custom marshaler for InterfaceTapConfiguration.
18073func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) {
18074	objectMap := make(map[string]interface{})
18075	if itc.InterfaceTapConfigurationPropertiesFormat != nil {
18076		objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat
18077	}
18078	if itc.Name != nil {
18079		objectMap["name"] = itc.Name
18080	}
18081	if itc.ID != nil {
18082		objectMap["id"] = itc.ID
18083	}
18084	return json.Marshal(objectMap)
18085}
18086
18087// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct.
18088func (itc *InterfaceTapConfiguration) UnmarshalJSON(body []byte) error {
18089	var m map[string]*json.RawMessage
18090	err := json.Unmarshal(body, &m)
18091	if err != nil {
18092		return err
18093	}
18094	for k, v := range m {
18095		switch k {
18096		case "properties":
18097			if v != nil {
18098				var interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat
18099				err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat)
18100				if err != nil {
18101					return err
18102				}
18103				itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat
18104			}
18105		case "name":
18106			if v != nil {
18107				var name string
18108				err = json.Unmarshal(*v, &name)
18109				if err != nil {
18110					return err
18111				}
18112				itc.Name = &name
18113			}
18114		case "etag":
18115			if v != nil {
18116				var etag string
18117				err = json.Unmarshal(*v, &etag)
18118				if err != nil {
18119					return err
18120				}
18121				itc.Etag = &etag
18122			}
18123		case "type":
18124			if v != nil {
18125				var typeVar string
18126				err = json.Unmarshal(*v, &typeVar)
18127				if err != nil {
18128					return err
18129				}
18130				itc.Type = &typeVar
18131			}
18132		case "id":
18133			if v != nil {
18134				var ID string
18135				err = json.Unmarshal(*v, &ID)
18136				if err != nil {
18137					return err
18138				}
18139				itc.ID = &ID
18140			}
18141		}
18142	}
18143
18144	return nil
18145}
18146
18147// InterfaceTapConfigurationListResult response for list tap configurations API service call.
18148type InterfaceTapConfigurationListResult struct {
18149	autorest.Response `json:"-"`
18150	// Value - A list of tap configurations.
18151	Value *[]InterfaceTapConfiguration `json:"value,omitempty"`
18152	// NextLink - READ-ONLY; The URL to get the next set of results.
18153	NextLink *string `json:"nextLink,omitempty"`
18154}
18155
18156// MarshalJSON is the custom marshaler for InterfaceTapConfigurationListResult.
18157func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) {
18158	objectMap := make(map[string]interface{})
18159	if itclr.Value != nil {
18160		objectMap["value"] = itclr.Value
18161	}
18162	return json.Marshal(objectMap)
18163}
18164
18165// InterfaceTapConfigurationListResultIterator provides access to a complete listing of
18166// InterfaceTapConfiguration values.
18167type InterfaceTapConfigurationListResultIterator struct {
18168	i    int
18169	page InterfaceTapConfigurationListResultPage
18170}
18171
18172// NextWithContext advances to the next value.  If there was an error making
18173// the request the iterator does not advance and the error is returned.
18174func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
18175	if tracing.IsEnabled() {
18176		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.NextWithContext")
18177		defer func() {
18178			sc := -1
18179			if iter.Response().Response.Response != nil {
18180				sc = iter.Response().Response.Response.StatusCode
18181			}
18182			tracing.EndSpan(ctx, sc, err)
18183		}()
18184	}
18185	iter.i++
18186	if iter.i < len(iter.page.Values()) {
18187		return nil
18188	}
18189	err = iter.page.NextWithContext(ctx)
18190	if err != nil {
18191		iter.i--
18192		return err
18193	}
18194	iter.i = 0
18195	return nil
18196}
18197
18198// Next advances to the next value.  If there was an error making
18199// the request the iterator does not advance and the error is returned.
18200// Deprecated: Use NextWithContext() instead.
18201func (iter *InterfaceTapConfigurationListResultIterator) Next() error {
18202	return iter.NextWithContext(context.Background())
18203}
18204
18205// NotDone returns true if the enumeration should be started or is not yet complete.
18206func (iter InterfaceTapConfigurationListResultIterator) NotDone() bool {
18207	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18208}
18209
18210// Response returns the raw server response from the last page request.
18211func (iter InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult {
18212	return iter.page.Response()
18213}
18214
18215// Value returns the current value or a zero-initialized value if the
18216// iterator has advanced beyond the end of the collection.
18217func (iter InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration {
18218	if !iter.page.NotDone() {
18219		return InterfaceTapConfiguration{}
18220	}
18221	return iter.page.Values()[iter.i]
18222}
18223
18224// Creates a new instance of the InterfaceTapConfigurationListResultIterator type.
18225func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator {
18226	return InterfaceTapConfigurationListResultIterator{page: page}
18227}
18228
18229// IsEmpty returns true if the ListResult contains no values.
18230func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
18231	return itclr.Value == nil || len(*itclr.Value) == 0
18232}
18233
18234// hasNextLink returns true if the NextLink is not empty.
18235func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool {
18236	return itclr.NextLink != nil && len(*itclr.NextLink) != 0
18237}
18238
18239// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results.
18240// It returns nil if no more results exist.
18241func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
18242	if !itclr.hasNextLink() {
18243		return nil, nil
18244	}
18245	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18246		autorest.AsJSON(),
18247		autorest.AsGet(),
18248		autorest.WithBaseURL(to.String(itclr.NextLink)))
18249}
18250
18251// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values.
18252type InterfaceTapConfigurationListResultPage struct {
18253	fn    func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
18254	itclr InterfaceTapConfigurationListResult
18255}
18256
18257// NextWithContext advances to the next page of values.  If there was an error making
18258// the request the page does not advance and the error is returned.
18259func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
18260	if tracing.IsEnabled() {
18261		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext")
18262		defer func() {
18263			sc := -1
18264			if page.Response().Response.Response != nil {
18265				sc = page.Response().Response.Response.StatusCode
18266			}
18267			tracing.EndSpan(ctx, sc, err)
18268		}()
18269	}
18270	for {
18271		next, err := page.fn(ctx, page.itclr)
18272		if err != nil {
18273			return err
18274		}
18275		page.itclr = next
18276		if !next.hasNextLink() || !next.IsEmpty() {
18277			break
18278		}
18279	}
18280	return nil
18281}
18282
18283// Next advances to the next page of values.  If there was an error making
18284// the request the page does not advance and the error is returned.
18285// Deprecated: Use NextWithContext() instead.
18286func (page *InterfaceTapConfigurationListResultPage) Next() error {
18287	return page.NextWithContext(context.Background())
18288}
18289
18290// NotDone returns true if the page enumeration should be started or is not yet complete.
18291func (page InterfaceTapConfigurationListResultPage) NotDone() bool {
18292	return !page.itclr.IsEmpty()
18293}
18294
18295// Response returns the raw server response from the last page request.
18296func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult {
18297	return page.itclr
18298}
18299
18300// Values returns the slice of values for the current page or nil if there are no values.
18301func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration {
18302	if page.itclr.IsEmpty() {
18303		return nil
18304	}
18305	return *page.itclr.Value
18306}
18307
18308// Creates a new instance of the InterfaceTapConfigurationListResultPage type.
18309func NewInterfaceTapConfigurationListResultPage(cur InterfaceTapConfigurationListResult, getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage {
18310	return InterfaceTapConfigurationListResultPage{
18311		fn:    getNextPage,
18312		itclr: cur,
18313	}
18314}
18315
18316// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration.
18317type InterfaceTapConfigurationPropertiesFormat struct {
18318	// VirtualNetworkTap - The reference to the Virtual Network Tap resource.
18319	VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"`
18320	// ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
18321	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
18322}
18323
18324// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat.
18325func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
18326	objectMap := make(map[string]interface{})
18327	if itcpf.VirtualNetworkTap != nil {
18328		objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap
18329	}
18330	return json.Marshal(objectMap)
18331}
18332
18333// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
18334// of a long-running operation.
18335type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
18336	azure.FutureAPI
18337	// Result returns the result of the asynchronous operation.
18338	// If the operation has not completed it will return an error.
18339	Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error)
18340}
18341
18342// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18343func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
18344	var azFuture azure.Future
18345	if err := json.Unmarshal(body, &azFuture); err != nil {
18346		return err
18347	}
18348	future.FutureAPI = &azFuture
18349	future.Result = future.result
18350	return nil
18351}
18352
18353// result is the default implementation for InterfaceTapConfigurationsCreateOrUpdateFuture.Result.
18354func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) result(client InterfaceTapConfigurationsClient) (itc InterfaceTapConfiguration, err error) {
18355	var done bool
18356	done, err = future.DoneWithContext(context.Background(), client)
18357	if err != nil {
18358		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18359		return
18360	}
18361	if !done {
18362		itc.Response.Response = future.Response()
18363		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsCreateOrUpdateFuture")
18364		return
18365	}
18366	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18367	if itc.Response.Response, err = future.GetResult(sender); err == nil && itc.Response.Response.StatusCode != http.StatusNoContent {
18368		itc, err = client.CreateOrUpdateResponder(itc.Response.Response)
18369		if err != nil {
18370			err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", itc.Response.Response, "Failure responding to request")
18371		}
18372	}
18373	return
18374}
18375
18376// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
18377// long-running operation.
18378type InterfaceTapConfigurationsDeleteFuture struct {
18379	azure.FutureAPI
18380	// Result returns the result of the asynchronous operation.
18381	// If the operation has not completed it will return an error.
18382	Result func(InterfaceTapConfigurationsClient) (autorest.Response, error)
18383}
18384
18385// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18386func (future *InterfaceTapConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
18387	var azFuture azure.Future
18388	if err := json.Unmarshal(body, &azFuture); err != nil {
18389		return err
18390	}
18391	future.FutureAPI = &azFuture
18392	future.Result = future.result
18393	return nil
18394}
18395
18396// result is the default implementation for InterfaceTapConfigurationsDeleteFuture.Result.
18397func (future *InterfaceTapConfigurationsDeleteFuture) result(client InterfaceTapConfigurationsClient) (ar autorest.Response, err error) {
18398	var done bool
18399	done, err = future.DoneWithContext(context.Background(), client)
18400	if err != nil {
18401		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
18402		return
18403	}
18404	if !done {
18405		ar.Response = future.Response()
18406		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsDeleteFuture")
18407		return
18408	}
18409	ar.Response = future.Response()
18410	return
18411}
18412
18413// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call.
18414type IPAddressAvailabilityResult struct {
18415	autorest.Response `json:"-"`
18416	// Available - Private IP address availability.
18417	Available *bool `json:"available,omitempty"`
18418	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
18419	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
18420}
18421
18422// IPAllocation ipAllocation resource.
18423type IPAllocation struct {
18424	autorest.Response `json:"-"`
18425	// IPAllocationPropertiesFormat - Properties of the IpAllocation.
18426	*IPAllocationPropertiesFormat `json:"properties,omitempty"`
18427	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
18428	Etag *string `json:"etag,omitempty"`
18429	// ID - Resource ID.
18430	ID *string `json:"id,omitempty"`
18431	// Name - READ-ONLY; Resource name.
18432	Name *string `json:"name,omitempty"`
18433	// Type - READ-ONLY; Resource type.
18434	Type *string `json:"type,omitempty"`
18435	// Location - Resource location.
18436	Location *string `json:"location,omitempty"`
18437	// Tags - Resource tags.
18438	Tags map[string]*string `json:"tags"`
18439}
18440
18441// MarshalJSON is the custom marshaler for IPAllocation.
18442func (ia IPAllocation) MarshalJSON() ([]byte, error) {
18443	objectMap := make(map[string]interface{})
18444	if ia.IPAllocationPropertiesFormat != nil {
18445		objectMap["properties"] = ia.IPAllocationPropertiesFormat
18446	}
18447	if ia.ID != nil {
18448		objectMap["id"] = ia.ID
18449	}
18450	if ia.Location != nil {
18451		objectMap["location"] = ia.Location
18452	}
18453	if ia.Tags != nil {
18454		objectMap["tags"] = ia.Tags
18455	}
18456	return json.Marshal(objectMap)
18457}
18458
18459// UnmarshalJSON is the custom unmarshaler for IPAllocation struct.
18460func (ia *IPAllocation) UnmarshalJSON(body []byte) error {
18461	var m map[string]*json.RawMessage
18462	err := json.Unmarshal(body, &m)
18463	if err != nil {
18464		return err
18465	}
18466	for k, v := range m {
18467		switch k {
18468		case "properties":
18469			if v != nil {
18470				var IPAllocationPropertiesFormat IPAllocationPropertiesFormat
18471				err = json.Unmarshal(*v, &IPAllocationPropertiesFormat)
18472				if err != nil {
18473					return err
18474				}
18475				ia.IPAllocationPropertiesFormat = &IPAllocationPropertiesFormat
18476			}
18477		case "etag":
18478			if v != nil {
18479				var etag string
18480				err = json.Unmarshal(*v, &etag)
18481				if err != nil {
18482					return err
18483				}
18484				ia.Etag = &etag
18485			}
18486		case "id":
18487			if v != nil {
18488				var ID string
18489				err = json.Unmarshal(*v, &ID)
18490				if err != nil {
18491					return err
18492				}
18493				ia.ID = &ID
18494			}
18495		case "name":
18496			if v != nil {
18497				var name string
18498				err = json.Unmarshal(*v, &name)
18499				if err != nil {
18500					return err
18501				}
18502				ia.Name = &name
18503			}
18504		case "type":
18505			if v != nil {
18506				var typeVar string
18507				err = json.Unmarshal(*v, &typeVar)
18508				if err != nil {
18509					return err
18510				}
18511				ia.Type = &typeVar
18512			}
18513		case "location":
18514			if v != nil {
18515				var location string
18516				err = json.Unmarshal(*v, &location)
18517				if err != nil {
18518					return err
18519				}
18520				ia.Location = &location
18521			}
18522		case "tags":
18523			if v != nil {
18524				var tags map[string]*string
18525				err = json.Unmarshal(*v, &tags)
18526				if err != nil {
18527					return err
18528				}
18529				ia.Tags = tags
18530			}
18531		}
18532	}
18533
18534	return nil
18535}
18536
18537// IPAllocationListResult response for the ListIpAllocations API service call.
18538type IPAllocationListResult struct {
18539	autorest.Response `json:"-"`
18540	// Value - A list of IpAllocation resources.
18541	Value *[]IPAllocation `json:"value,omitempty"`
18542	// NextLink - The URL to get the next set of results.
18543	NextLink *string `json:"nextLink,omitempty"`
18544}
18545
18546// IPAllocationListResultIterator provides access to a complete listing of IPAllocation values.
18547type IPAllocationListResultIterator struct {
18548	i    int
18549	page IPAllocationListResultPage
18550}
18551
18552// NextWithContext advances to the next value.  If there was an error making
18553// the request the iterator does not advance and the error is returned.
18554func (iter *IPAllocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
18555	if tracing.IsEnabled() {
18556		ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationListResultIterator.NextWithContext")
18557		defer func() {
18558			sc := -1
18559			if iter.Response().Response.Response != nil {
18560				sc = iter.Response().Response.Response.StatusCode
18561			}
18562			tracing.EndSpan(ctx, sc, err)
18563		}()
18564	}
18565	iter.i++
18566	if iter.i < len(iter.page.Values()) {
18567		return nil
18568	}
18569	err = iter.page.NextWithContext(ctx)
18570	if err != nil {
18571		iter.i--
18572		return err
18573	}
18574	iter.i = 0
18575	return nil
18576}
18577
18578// Next advances to the next value.  If there was an error making
18579// the request the iterator does not advance and the error is returned.
18580// Deprecated: Use NextWithContext() instead.
18581func (iter *IPAllocationListResultIterator) Next() error {
18582	return iter.NextWithContext(context.Background())
18583}
18584
18585// NotDone returns true if the enumeration should be started or is not yet complete.
18586func (iter IPAllocationListResultIterator) NotDone() bool {
18587	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18588}
18589
18590// Response returns the raw server response from the last page request.
18591func (iter IPAllocationListResultIterator) Response() IPAllocationListResult {
18592	return iter.page.Response()
18593}
18594
18595// Value returns the current value or a zero-initialized value if the
18596// iterator has advanced beyond the end of the collection.
18597func (iter IPAllocationListResultIterator) Value() IPAllocation {
18598	if !iter.page.NotDone() {
18599		return IPAllocation{}
18600	}
18601	return iter.page.Values()[iter.i]
18602}
18603
18604// Creates a new instance of the IPAllocationListResultIterator type.
18605func NewIPAllocationListResultIterator(page IPAllocationListResultPage) IPAllocationListResultIterator {
18606	return IPAllocationListResultIterator{page: page}
18607}
18608
18609// IsEmpty returns true if the ListResult contains no values.
18610func (ialr IPAllocationListResult) IsEmpty() bool {
18611	return ialr.Value == nil || len(*ialr.Value) == 0
18612}
18613
18614// hasNextLink returns true if the NextLink is not empty.
18615func (ialr IPAllocationListResult) hasNextLink() bool {
18616	return ialr.NextLink != nil && len(*ialr.NextLink) != 0
18617}
18618
18619// iPAllocationListResultPreparer prepares a request to retrieve the next set of results.
18620// It returns nil if no more results exist.
18621func (ialr IPAllocationListResult) iPAllocationListResultPreparer(ctx context.Context) (*http.Request, error) {
18622	if !ialr.hasNextLink() {
18623		return nil, nil
18624	}
18625	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18626		autorest.AsJSON(),
18627		autorest.AsGet(),
18628		autorest.WithBaseURL(to.String(ialr.NextLink)))
18629}
18630
18631// IPAllocationListResultPage contains a page of IPAllocation values.
18632type IPAllocationListResultPage struct {
18633	fn   func(context.Context, IPAllocationListResult) (IPAllocationListResult, error)
18634	ialr IPAllocationListResult
18635}
18636
18637// NextWithContext advances to the next page of values.  If there was an error making
18638// the request the page does not advance and the error is returned.
18639func (page *IPAllocationListResultPage) NextWithContext(ctx context.Context) (err error) {
18640	if tracing.IsEnabled() {
18641		ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationListResultPage.NextWithContext")
18642		defer func() {
18643			sc := -1
18644			if page.Response().Response.Response != nil {
18645				sc = page.Response().Response.Response.StatusCode
18646			}
18647			tracing.EndSpan(ctx, sc, err)
18648		}()
18649	}
18650	for {
18651		next, err := page.fn(ctx, page.ialr)
18652		if err != nil {
18653			return err
18654		}
18655		page.ialr = next
18656		if !next.hasNextLink() || !next.IsEmpty() {
18657			break
18658		}
18659	}
18660	return nil
18661}
18662
18663// Next advances to the next page of values.  If there was an error making
18664// the request the page does not advance and the error is returned.
18665// Deprecated: Use NextWithContext() instead.
18666func (page *IPAllocationListResultPage) Next() error {
18667	return page.NextWithContext(context.Background())
18668}
18669
18670// NotDone returns true if the page enumeration should be started or is not yet complete.
18671func (page IPAllocationListResultPage) NotDone() bool {
18672	return !page.ialr.IsEmpty()
18673}
18674
18675// Response returns the raw server response from the last page request.
18676func (page IPAllocationListResultPage) Response() IPAllocationListResult {
18677	return page.ialr
18678}
18679
18680// Values returns the slice of values for the current page or nil if there are no values.
18681func (page IPAllocationListResultPage) Values() []IPAllocation {
18682	if page.ialr.IsEmpty() {
18683		return nil
18684	}
18685	return *page.ialr.Value
18686}
18687
18688// Creates a new instance of the IPAllocationListResultPage type.
18689func NewIPAllocationListResultPage(cur IPAllocationListResult, getNextPage func(context.Context, IPAllocationListResult) (IPAllocationListResult, error)) IPAllocationListResultPage {
18690	return IPAllocationListResultPage{
18691		fn:   getNextPage,
18692		ialr: cur,
18693	}
18694}
18695
18696// IPAllocationPropertiesFormat properties of the IpAllocation.
18697type IPAllocationPropertiesFormat struct {
18698	// Subnet - READ-ONLY; The Subnet that using the prefix of this IpAllocation resource.
18699	Subnet *SubResource `json:"subnet,omitempty"`
18700	// VirtualNetwork - READ-ONLY; The VirtualNetwork that using the prefix of this IpAllocation resource.
18701	VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"`
18702	// Type - The type for the IpAllocation. Possible values include: 'Undefined', 'Hypernet'
18703	Type IPAllocationType `json:"type,omitempty"`
18704	// Prefix - The address prefix for the IpAllocation.
18705	Prefix *string `json:"prefix,omitempty"`
18706	// PrefixLength - The address prefix length for the IpAllocation.
18707	PrefixLength *int32 `json:"prefixLength,omitempty"`
18708	// PrefixType - The address prefix Type for the IpAllocation. Possible values include: 'IPv4', 'IPv6'
18709	PrefixType IPVersion `json:"prefixType,omitempty"`
18710	// IpamAllocationID - The IPAM allocation ID.
18711	IpamAllocationID *string `json:"ipamAllocationId,omitempty"`
18712	// AllocationTags - IpAllocation tags.
18713	AllocationTags map[string]*string `json:"allocationTags"`
18714}
18715
18716// MarshalJSON is the custom marshaler for IPAllocationPropertiesFormat.
18717func (iapf IPAllocationPropertiesFormat) MarshalJSON() ([]byte, error) {
18718	objectMap := make(map[string]interface{})
18719	if iapf.Type != "" {
18720		objectMap["type"] = iapf.Type
18721	}
18722	if iapf.Prefix != nil {
18723		objectMap["prefix"] = iapf.Prefix
18724	}
18725	if iapf.PrefixLength != nil {
18726		objectMap["prefixLength"] = iapf.PrefixLength
18727	}
18728	if iapf.PrefixType != "" {
18729		objectMap["prefixType"] = iapf.PrefixType
18730	}
18731	if iapf.IpamAllocationID != nil {
18732		objectMap["ipamAllocationId"] = iapf.IpamAllocationID
18733	}
18734	if iapf.AllocationTags != nil {
18735		objectMap["allocationTags"] = iapf.AllocationTags
18736	}
18737	return json.Marshal(objectMap)
18738}
18739
18740// IPAllocationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18741// long-running operation.
18742type IPAllocationsCreateOrUpdateFuture struct {
18743	azure.FutureAPI
18744	// Result returns the result of the asynchronous operation.
18745	// If the operation has not completed it will return an error.
18746	Result func(IPAllocationsClient) (IPAllocation, error)
18747}
18748
18749// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18750func (future *IPAllocationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
18751	var azFuture azure.Future
18752	if err := json.Unmarshal(body, &azFuture); err != nil {
18753		return err
18754	}
18755	future.FutureAPI = &azFuture
18756	future.Result = future.result
18757	return nil
18758}
18759
18760// result is the default implementation for IPAllocationsCreateOrUpdateFuture.Result.
18761func (future *IPAllocationsCreateOrUpdateFuture) result(client IPAllocationsClient) (ia IPAllocation, err error) {
18762	var done bool
18763	done, err = future.DoneWithContext(context.Background(), client)
18764	if err != nil {
18765		err = autorest.NewErrorWithError(err, "network.IPAllocationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18766		return
18767	}
18768	if !done {
18769		ia.Response.Response = future.Response()
18770		err = azure.NewAsyncOpIncompleteError("network.IPAllocationsCreateOrUpdateFuture")
18771		return
18772	}
18773	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18774	if ia.Response.Response, err = future.GetResult(sender); err == nil && ia.Response.Response.StatusCode != http.StatusNoContent {
18775		ia, err = client.CreateOrUpdateResponder(ia.Response.Response)
18776		if err != nil {
18777			err = autorest.NewErrorWithError(err, "network.IPAllocationsCreateOrUpdateFuture", "Result", ia.Response.Response, "Failure responding to request")
18778		}
18779	}
18780	return
18781}
18782
18783// IPAllocationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18784// operation.
18785type IPAllocationsDeleteFuture struct {
18786	azure.FutureAPI
18787	// Result returns the result of the asynchronous operation.
18788	// If the operation has not completed it will return an error.
18789	Result func(IPAllocationsClient) (autorest.Response, error)
18790}
18791
18792// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18793func (future *IPAllocationsDeleteFuture) UnmarshalJSON(body []byte) error {
18794	var azFuture azure.Future
18795	if err := json.Unmarshal(body, &azFuture); err != nil {
18796		return err
18797	}
18798	future.FutureAPI = &azFuture
18799	future.Result = future.result
18800	return nil
18801}
18802
18803// result is the default implementation for IPAllocationsDeleteFuture.Result.
18804func (future *IPAllocationsDeleteFuture) result(client IPAllocationsClient) (ar autorest.Response, err error) {
18805	var done bool
18806	done, err = future.DoneWithContext(context.Background(), client)
18807	if err != nil {
18808		err = autorest.NewErrorWithError(err, "network.IPAllocationsDeleteFuture", "Result", future.Response(), "Polling failure")
18809		return
18810	}
18811	if !done {
18812		ar.Response = future.Response()
18813		err = azure.NewAsyncOpIncompleteError("network.IPAllocationsDeleteFuture")
18814		return
18815	}
18816	ar.Response = future.Response()
18817	return
18818}
18819
18820// IPConfiguration IP configuration.
18821type IPConfiguration struct {
18822	// IPConfigurationPropertiesFormat - Properties of the IP configuration.
18823	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
18824	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18825	Name *string `json:"name,omitempty"`
18826	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
18827	Etag *string `json:"etag,omitempty"`
18828	// ID - Resource ID.
18829	ID *string `json:"id,omitempty"`
18830}
18831
18832// MarshalJSON is the custom marshaler for IPConfiguration.
18833func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
18834	objectMap := make(map[string]interface{})
18835	if ic.IPConfigurationPropertiesFormat != nil {
18836		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
18837	}
18838	if ic.Name != nil {
18839		objectMap["name"] = ic.Name
18840	}
18841	if ic.ID != nil {
18842		objectMap["id"] = ic.ID
18843	}
18844	return json.Marshal(objectMap)
18845}
18846
18847// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
18848func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
18849	var m map[string]*json.RawMessage
18850	err := json.Unmarshal(body, &m)
18851	if err != nil {
18852		return err
18853	}
18854	for k, v := range m {
18855		switch k {
18856		case "properties":
18857			if v != nil {
18858				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
18859				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
18860				if err != nil {
18861					return err
18862				}
18863				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
18864			}
18865		case "name":
18866			if v != nil {
18867				var name string
18868				err = json.Unmarshal(*v, &name)
18869				if err != nil {
18870					return err
18871				}
18872				ic.Name = &name
18873			}
18874		case "etag":
18875			if v != nil {
18876				var etag string
18877				err = json.Unmarshal(*v, &etag)
18878				if err != nil {
18879					return err
18880				}
18881				ic.Etag = &etag
18882			}
18883		case "id":
18884			if v != nil {
18885				var ID string
18886				err = json.Unmarshal(*v, &ID)
18887				if err != nil {
18888					return err
18889				}
18890				ic.ID = &ID
18891			}
18892		}
18893	}
18894
18895	return nil
18896}
18897
18898// IPConfigurationBgpPeeringAddress properties of IPConfigurationBgpPeeringAddress.
18899type IPConfigurationBgpPeeringAddress struct {
18900	// IpconfigurationID - The ID of IP configuration which belongs to gateway.
18901	IpconfigurationID *string `json:"ipconfigurationId,omitempty"`
18902	// DefaultBgpIPAddresses - READ-ONLY; The list of default BGP peering addresses which belong to IP configuration.
18903	DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"`
18904	// CustomBgpIPAddresses - The list of custom BGP peering addresses which belong to IP configuration.
18905	CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"`
18906	// TunnelIPAddresses - READ-ONLY; The list of tunnel public IP addresses which belong to IP configuration.
18907	TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"`
18908}
18909
18910// MarshalJSON is the custom marshaler for IPConfigurationBgpPeeringAddress.
18911func (icbpa IPConfigurationBgpPeeringAddress) MarshalJSON() ([]byte, error) {
18912	objectMap := make(map[string]interface{})
18913	if icbpa.IpconfigurationID != nil {
18914		objectMap["ipconfigurationId"] = icbpa.IpconfigurationID
18915	}
18916	if icbpa.CustomBgpIPAddresses != nil {
18917		objectMap["customBgpIpAddresses"] = icbpa.CustomBgpIPAddresses
18918	}
18919	return json.Marshal(objectMap)
18920}
18921
18922// IPConfigurationProfile IP configuration profile child resource.
18923type IPConfigurationProfile struct {
18924	// IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile.
18925	*IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"`
18926	// Name - The name of the resource. This name can be used to access the resource.
18927	Name *string `json:"name,omitempty"`
18928	// Type - READ-ONLY; Sub Resource type.
18929	Type *string `json:"type,omitempty"`
18930	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
18931	Etag *string `json:"etag,omitempty"`
18932	// ID - Resource ID.
18933	ID *string `json:"id,omitempty"`
18934}
18935
18936// MarshalJSON is the custom marshaler for IPConfigurationProfile.
18937func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) {
18938	objectMap := make(map[string]interface{})
18939	if icp.IPConfigurationProfilePropertiesFormat != nil {
18940		objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat
18941	}
18942	if icp.Name != nil {
18943		objectMap["name"] = icp.Name
18944	}
18945	if icp.ID != nil {
18946		objectMap["id"] = icp.ID
18947	}
18948	return json.Marshal(objectMap)
18949}
18950
18951// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct.
18952func (icp *IPConfigurationProfile) UnmarshalJSON(body []byte) error {
18953	var m map[string]*json.RawMessage
18954	err := json.Unmarshal(body, &m)
18955	if err != nil {
18956		return err
18957	}
18958	for k, v := range m {
18959		switch k {
18960		case "properties":
18961			if v != nil {
18962				var IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat
18963				err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat)
18964				if err != nil {
18965					return err
18966				}
18967				icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat
18968			}
18969		case "name":
18970			if v != nil {
18971				var name string
18972				err = json.Unmarshal(*v, &name)
18973				if err != nil {
18974					return err
18975				}
18976				icp.Name = &name
18977			}
18978		case "type":
18979			if v != nil {
18980				var typeVar string
18981				err = json.Unmarshal(*v, &typeVar)
18982				if err != nil {
18983					return err
18984				}
18985				icp.Type = &typeVar
18986			}
18987		case "etag":
18988			if v != nil {
18989				var etag string
18990				err = json.Unmarshal(*v, &etag)
18991				if err != nil {
18992					return err
18993				}
18994				icp.Etag = &etag
18995			}
18996		case "id":
18997			if v != nil {
18998				var ID string
18999				err = json.Unmarshal(*v, &ID)
19000				if err != nil {
19001					return err
19002				}
19003				icp.ID = &ID
19004			}
19005		}
19006	}
19007
19008	return nil
19009}
19010
19011// IPConfigurationProfilePropertiesFormat IP configuration profile properties.
19012type IPConfigurationProfilePropertiesFormat struct {
19013	// Subnet - The reference to the subnet resource to create a container network interface ip configuration.
19014	Subnet *Subnet `json:"subnet,omitempty"`
19015	// ProvisioningState - READ-ONLY; The provisioning state of the IP configuration profile resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
19016	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19017}
19018
19019// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat.
19020func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
19021	objectMap := make(map[string]interface{})
19022	if icppf.Subnet != nil {
19023		objectMap["subnet"] = icppf.Subnet
19024	}
19025	return json.Marshal(objectMap)
19026}
19027
19028// IPConfigurationPropertiesFormat properties of IP configuration.
19029type IPConfigurationPropertiesFormat struct {
19030	// PrivateIPAddress - The private IP address of the IP configuration.
19031	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
19032	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
19033	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
19034	// Subnet - The reference to the subnet resource.
19035	Subnet *Subnet `json:"subnet,omitempty"`
19036	// PublicIPAddress - The reference to the public IP resource.
19037	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
19038	// ProvisioningState - READ-ONLY; The provisioning state of the IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
19039	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19040}
19041
19042// MarshalJSON is the custom marshaler for IPConfigurationPropertiesFormat.
19043func (icpf IPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
19044	objectMap := make(map[string]interface{})
19045	if icpf.PrivateIPAddress != nil {
19046		objectMap["privateIPAddress"] = icpf.PrivateIPAddress
19047	}
19048	if icpf.PrivateIPAllocationMethod != "" {
19049		objectMap["privateIPAllocationMethod"] = icpf.PrivateIPAllocationMethod
19050	}
19051	if icpf.Subnet != nil {
19052		objectMap["subnet"] = icpf.Subnet
19053	}
19054	if icpf.PublicIPAddress != nil {
19055		objectMap["publicIPAddress"] = icpf.PublicIPAddress
19056	}
19057	return json.Marshal(objectMap)
19058}
19059
19060// IPGroup the IpGroups resource information.
19061type IPGroup struct {
19062	autorest.Response `json:"-"`
19063	// IPGroupPropertiesFormat - Properties of the IpGroups.
19064	*IPGroupPropertiesFormat `json:"properties,omitempty"`
19065	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19066	Etag *string `json:"etag,omitempty"`
19067	// ID - Resource ID.
19068	ID *string `json:"id,omitempty"`
19069	// Name - READ-ONLY; Resource name.
19070	Name *string `json:"name,omitempty"`
19071	// Type - READ-ONLY; Resource type.
19072	Type *string `json:"type,omitempty"`
19073	// Location - Resource location.
19074	Location *string `json:"location,omitempty"`
19075	// Tags - Resource tags.
19076	Tags map[string]*string `json:"tags"`
19077}
19078
19079// MarshalJSON is the custom marshaler for IPGroup.
19080func (ig IPGroup) MarshalJSON() ([]byte, error) {
19081	objectMap := make(map[string]interface{})
19082	if ig.IPGroupPropertiesFormat != nil {
19083		objectMap["properties"] = ig.IPGroupPropertiesFormat
19084	}
19085	if ig.ID != nil {
19086		objectMap["id"] = ig.ID
19087	}
19088	if ig.Location != nil {
19089		objectMap["location"] = ig.Location
19090	}
19091	if ig.Tags != nil {
19092		objectMap["tags"] = ig.Tags
19093	}
19094	return json.Marshal(objectMap)
19095}
19096
19097// UnmarshalJSON is the custom unmarshaler for IPGroup struct.
19098func (ig *IPGroup) UnmarshalJSON(body []byte) error {
19099	var m map[string]*json.RawMessage
19100	err := json.Unmarshal(body, &m)
19101	if err != nil {
19102		return err
19103	}
19104	for k, v := range m {
19105		switch k {
19106		case "properties":
19107			if v != nil {
19108				var IPGroupPropertiesFormat IPGroupPropertiesFormat
19109				err = json.Unmarshal(*v, &IPGroupPropertiesFormat)
19110				if err != nil {
19111					return err
19112				}
19113				ig.IPGroupPropertiesFormat = &IPGroupPropertiesFormat
19114			}
19115		case "etag":
19116			if v != nil {
19117				var etag string
19118				err = json.Unmarshal(*v, &etag)
19119				if err != nil {
19120					return err
19121				}
19122				ig.Etag = &etag
19123			}
19124		case "id":
19125			if v != nil {
19126				var ID string
19127				err = json.Unmarshal(*v, &ID)
19128				if err != nil {
19129					return err
19130				}
19131				ig.ID = &ID
19132			}
19133		case "name":
19134			if v != nil {
19135				var name string
19136				err = json.Unmarshal(*v, &name)
19137				if err != nil {
19138					return err
19139				}
19140				ig.Name = &name
19141			}
19142		case "type":
19143			if v != nil {
19144				var typeVar string
19145				err = json.Unmarshal(*v, &typeVar)
19146				if err != nil {
19147					return err
19148				}
19149				ig.Type = &typeVar
19150			}
19151		case "location":
19152			if v != nil {
19153				var location string
19154				err = json.Unmarshal(*v, &location)
19155				if err != nil {
19156					return err
19157				}
19158				ig.Location = &location
19159			}
19160		case "tags":
19161			if v != nil {
19162				var tags map[string]*string
19163				err = json.Unmarshal(*v, &tags)
19164				if err != nil {
19165					return err
19166				}
19167				ig.Tags = tags
19168			}
19169		}
19170	}
19171
19172	return nil
19173}
19174
19175// IPGroupListResult response for the ListIpGroups API service call.
19176type IPGroupListResult struct {
19177	autorest.Response `json:"-"`
19178	// Value - The list of IpGroups information resources.
19179	Value *[]IPGroup `json:"value,omitempty"`
19180	// NextLink - URL to get the next set of results.
19181	NextLink *string `json:"nextLink,omitempty"`
19182}
19183
19184// IPGroupListResultIterator provides access to a complete listing of IPGroup values.
19185type IPGroupListResultIterator struct {
19186	i    int
19187	page IPGroupListResultPage
19188}
19189
19190// NextWithContext advances to the next value.  If there was an error making
19191// the request the iterator does not advance and the error is returned.
19192func (iter *IPGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
19193	if tracing.IsEnabled() {
19194		ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupListResultIterator.NextWithContext")
19195		defer func() {
19196			sc := -1
19197			if iter.Response().Response.Response != nil {
19198				sc = iter.Response().Response.Response.StatusCode
19199			}
19200			tracing.EndSpan(ctx, sc, err)
19201		}()
19202	}
19203	iter.i++
19204	if iter.i < len(iter.page.Values()) {
19205		return nil
19206	}
19207	err = iter.page.NextWithContext(ctx)
19208	if err != nil {
19209		iter.i--
19210		return err
19211	}
19212	iter.i = 0
19213	return nil
19214}
19215
19216// Next advances to the next value.  If there was an error making
19217// the request the iterator does not advance and the error is returned.
19218// Deprecated: Use NextWithContext() instead.
19219func (iter *IPGroupListResultIterator) Next() error {
19220	return iter.NextWithContext(context.Background())
19221}
19222
19223// NotDone returns true if the enumeration should be started or is not yet complete.
19224func (iter IPGroupListResultIterator) NotDone() bool {
19225	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19226}
19227
19228// Response returns the raw server response from the last page request.
19229func (iter IPGroupListResultIterator) Response() IPGroupListResult {
19230	return iter.page.Response()
19231}
19232
19233// Value returns the current value or a zero-initialized value if the
19234// iterator has advanced beyond the end of the collection.
19235func (iter IPGroupListResultIterator) Value() IPGroup {
19236	if !iter.page.NotDone() {
19237		return IPGroup{}
19238	}
19239	return iter.page.Values()[iter.i]
19240}
19241
19242// Creates a new instance of the IPGroupListResultIterator type.
19243func NewIPGroupListResultIterator(page IPGroupListResultPage) IPGroupListResultIterator {
19244	return IPGroupListResultIterator{page: page}
19245}
19246
19247// IsEmpty returns true if the ListResult contains no values.
19248func (iglr IPGroupListResult) IsEmpty() bool {
19249	return iglr.Value == nil || len(*iglr.Value) == 0
19250}
19251
19252// hasNextLink returns true if the NextLink is not empty.
19253func (iglr IPGroupListResult) hasNextLink() bool {
19254	return iglr.NextLink != nil && len(*iglr.NextLink) != 0
19255}
19256
19257// iPGroupListResultPreparer prepares a request to retrieve the next set of results.
19258// It returns nil if no more results exist.
19259func (iglr IPGroupListResult) iPGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
19260	if !iglr.hasNextLink() {
19261		return nil, nil
19262	}
19263	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19264		autorest.AsJSON(),
19265		autorest.AsGet(),
19266		autorest.WithBaseURL(to.String(iglr.NextLink)))
19267}
19268
19269// IPGroupListResultPage contains a page of IPGroup values.
19270type IPGroupListResultPage struct {
19271	fn   func(context.Context, IPGroupListResult) (IPGroupListResult, error)
19272	iglr IPGroupListResult
19273}
19274
19275// NextWithContext advances to the next page of values.  If there was an error making
19276// the request the page does not advance and the error is returned.
19277func (page *IPGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
19278	if tracing.IsEnabled() {
19279		ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupListResultPage.NextWithContext")
19280		defer func() {
19281			sc := -1
19282			if page.Response().Response.Response != nil {
19283				sc = page.Response().Response.Response.StatusCode
19284			}
19285			tracing.EndSpan(ctx, sc, err)
19286		}()
19287	}
19288	for {
19289		next, err := page.fn(ctx, page.iglr)
19290		if err != nil {
19291			return err
19292		}
19293		page.iglr = next
19294		if !next.hasNextLink() || !next.IsEmpty() {
19295			break
19296		}
19297	}
19298	return nil
19299}
19300
19301// Next advances to the next page of values.  If there was an error making
19302// the request the page does not advance and the error is returned.
19303// Deprecated: Use NextWithContext() instead.
19304func (page *IPGroupListResultPage) Next() error {
19305	return page.NextWithContext(context.Background())
19306}
19307
19308// NotDone returns true if the page enumeration should be started or is not yet complete.
19309func (page IPGroupListResultPage) NotDone() bool {
19310	return !page.iglr.IsEmpty()
19311}
19312
19313// Response returns the raw server response from the last page request.
19314func (page IPGroupListResultPage) Response() IPGroupListResult {
19315	return page.iglr
19316}
19317
19318// Values returns the slice of values for the current page or nil if there are no values.
19319func (page IPGroupListResultPage) Values() []IPGroup {
19320	if page.iglr.IsEmpty() {
19321		return nil
19322	}
19323	return *page.iglr.Value
19324}
19325
19326// Creates a new instance of the IPGroupListResultPage type.
19327func NewIPGroupListResultPage(cur IPGroupListResult, getNextPage func(context.Context, IPGroupListResult) (IPGroupListResult, error)) IPGroupListResultPage {
19328	return IPGroupListResultPage{
19329		fn:   getNextPage,
19330		iglr: cur,
19331	}
19332}
19333
19334// IPGroupPropertiesFormat the IpGroups property information.
19335type IPGroupPropertiesFormat struct {
19336	// ProvisioningState - READ-ONLY; The provisioning state of the IpGroups resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
19337	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19338	// IPAddresses - IpAddresses/IpAddressPrefixes in the IpGroups resource.
19339	IPAddresses *[]string `json:"ipAddresses,omitempty"`
19340	// Firewalls - READ-ONLY; List of references to Azure resources that this IpGroups is associated with.
19341	Firewalls *[]SubResource `json:"firewalls,omitempty"`
19342}
19343
19344// MarshalJSON is the custom marshaler for IPGroupPropertiesFormat.
19345func (igpf IPGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
19346	objectMap := make(map[string]interface{})
19347	if igpf.IPAddresses != nil {
19348		objectMap["ipAddresses"] = igpf.IPAddresses
19349	}
19350	return json.Marshal(objectMap)
19351}
19352
19353// IPGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
19354// operation.
19355type IPGroupsCreateOrUpdateFuture struct {
19356	azure.FutureAPI
19357	// Result returns the result of the asynchronous operation.
19358	// If the operation has not completed it will return an error.
19359	Result func(IPGroupsClient) (IPGroup, error)
19360}
19361
19362// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19363func (future *IPGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
19364	var azFuture azure.Future
19365	if err := json.Unmarshal(body, &azFuture); err != nil {
19366		return err
19367	}
19368	future.FutureAPI = &azFuture
19369	future.Result = future.result
19370	return nil
19371}
19372
19373// result is the default implementation for IPGroupsCreateOrUpdateFuture.Result.
19374func (future *IPGroupsCreateOrUpdateFuture) result(client IPGroupsClient) (ig IPGroup, err error) {
19375	var done bool
19376	done, err = future.DoneWithContext(context.Background(), client)
19377	if err != nil {
19378		err = autorest.NewErrorWithError(err, "network.IPGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
19379		return
19380	}
19381	if !done {
19382		ig.Response.Response = future.Response()
19383		err = azure.NewAsyncOpIncompleteError("network.IPGroupsCreateOrUpdateFuture")
19384		return
19385	}
19386	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19387	if ig.Response.Response, err = future.GetResult(sender); err == nil && ig.Response.Response.StatusCode != http.StatusNoContent {
19388		ig, err = client.CreateOrUpdateResponder(ig.Response.Response)
19389		if err != nil {
19390			err = autorest.NewErrorWithError(err, "network.IPGroupsCreateOrUpdateFuture", "Result", ig.Response.Response, "Failure responding to request")
19391		}
19392	}
19393	return
19394}
19395
19396// IPGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19397// operation.
19398type IPGroupsDeleteFuture struct {
19399	azure.FutureAPI
19400	// Result returns the result of the asynchronous operation.
19401	// If the operation has not completed it will return an error.
19402	Result func(IPGroupsClient) (autorest.Response, error)
19403}
19404
19405// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19406func (future *IPGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
19407	var azFuture azure.Future
19408	if err := json.Unmarshal(body, &azFuture); err != nil {
19409		return err
19410	}
19411	future.FutureAPI = &azFuture
19412	future.Result = future.result
19413	return nil
19414}
19415
19416// result is the default implementation for IPGroupsDeleteFuture.Result.
19417func (future *IPGroupsDeleteFuture) result(client IPGroupsClient) (ar autorest.Response, err error) {
19418	var done bool
19419	done, err = future.DoneWithContext(context.Background(), client)
19420	if err != nil {
19421		err = autorest.NewErrorWithError(err, "network.IPGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
19422		return
19423	}
19424	if !done {
19425		ar.Response = future.Response()
19426		err = azure.NewAsyncOpIncompleteError("network.IPGroupsDeleteFuture")
19427		return
19428	}
19429	ar.Response = future.Response()
19430	return
19431}
19432
19433// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection.
19434type IpsecPolicy struct {
19435	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
19436	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
19437	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
19438	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
19439	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
19440	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
19441	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
19442	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
19443	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
19444	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
19445	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
19446	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
19447	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
19448	DhGroup DhGroup `json:"dhGroup,omitempty"`
19449	// 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'
19450	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
19451}
19452
19453// IPTag contains the IpTag associated with the object.
19454type IPTag struct {
19455	// IPTagType - The IP tag type. Example: FirstPartyUsage.
19456	IPTagType *string `json:"ipTagType,omitempty"`
19457	// Tag - The value of the IP tag associated with the public IP. Example: SQL.
19458	Tag *string `json:"tag,omitempty"`
19459}
19460
19461// Ipv6CircuitConnectionConfig iPv6 Circuit Connection properties for global reach.
19462type Ipv6CircuitConnectionConfig struct {
19463	// AddressPrefix - /125 IP address space to carve out customer addresses for global reach.
19464	AddressPrefix *string `json:"addressPrefix,omitempty"`
19465	// CircuitConnectionStatus - READ-ONLY; Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
19466	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
19467}
19468
19469// MarshalJSON is the custom marshaler for Ipv6CircuitConnectionConfig.
19470func (i6ccc Ipv6CircuitConnectionConfig) MarshalJSON() ([]byte, error) {
19471	objectMap := make(map[string]interface{})
19472	if i6ccc.AddressPrefix != nil {
19473		objectMap["addressPrefix"] = i6ccc.AddressPrefix
19474	}
19475	return json.Marshal(objectMap)
19476}
19477
19478// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
19479type Ipv6ExpressRouteCircuitPeeringConfig struct {
19480	// PrimaryPeerAddressPrefix - The primary address prefix.
19481	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
19482	// SecondaryPeerAddressPrefix - The secondary address prefix.
19483	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
19484	// MicrosoftPeeringConfig - The Microsoft peering configuration.
19485	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
19486	// RouteFilter - The reference to the RouteFilter resource.
19487	RouteFilter *SubResource `json:"routeFilter,omitempty"`
19488	// State - The state of peering. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
19489	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
19490}
19491
19492// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
19493// the next set of results.
19494type ListHubVirtualNetworkConnectionsResult struct {
19495	autorest.Response `json:"-"`
19496	// Value - List of HubVirtualNetworkConnections.
19497	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
19498	// NextLink - URL to get the next set of operation list results if there are any.
19499	NextLink *string `json:"nextLink,omitempty"`
19500}
19501
19502// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
19503// HubVirtualNetworkConnection values.
19504type ListHubVirtualNetworkConnectionsResultIterator struct {
19505	i    int
19506	page ListHubVirtualNetworkConnectionsResultPage
19507}
19508
19509// NextWithContext advances to the next value.  If there was an error making
19510// the request the iterator does not advance and the error is returned.
19511func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
19512	if tracing.IsEnabled() {
19513		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
19514		defer func() {
19515			sc := -1
19516			if iter.Response().Response.Response != nil {
19517				sc = iter.Response().Response.Response.StatusCode
19518			}
19519			tracing.EndSpan(ctx, sc, err)
19520		}()
19521	}
19522	iter.i++
19523	if iter.i < len(iter.page.Values()) {
19524		return nil
19525	}
19526	err = iter.page.NextWithContext(ctx)
19527	if err != nil {
19528		iter.i--
19529		return err
19530	}
19531	iter.i = 0
19532	return nil
19533}
19534
19535// Next advances to the next value.  If there was an error making
19536// the request the iterator does not advance and the error is returned.
19537// Deprecated: Use NextWithContext() instead.
19538func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
19539	return iter.NextWithContext(context.Background())
19540}
19541
19542// NotDone returns true if the enumeration should be started or is not yet complete.
19543func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
19544	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19545}
19546
19547// Response returns the raw server response from the last page request.
19548func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
19549	return iter.page.Response()
19550}
19551
19552// Value returns the current value or a zero-initialized value if the
19553// iterator has advanced beyond the end of the collection.
19554func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
19555	if !iter.page.NotDone() {
19556		return HubVirtualNetworkConnection{}
19557	}
19558	return iter.page.Values()[iter.i]
19559}
19560
19561// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
19562func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
19563	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
19564}
19565
19566// IsEmpty returns true if the ListResult contains no values.
19567func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
19568	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
19569}
19570
19571// hasNextLink returns true if the NextLink is not empty.
19572func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
19573	return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
19574}
19575
19576// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
19577// It returns nil if no more results exist.
19578func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
19579	if !lhvncr.hasNextLink() {
19580		return nil, nil
19581	}
19582	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19583		autorest.AsJSON(),
19584		autorest.AsGet(),
19585		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
19586}
19587
19588// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
19589type ListHubVirtualNetworkConnectionsResultPage struct {
19590	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
19591	lhvncr ListHubVirtualNetworkConnectionsResult
19592}
19593
19594// NextWithContext advances to the next page of values.  If there was an error making
19595// the request the page does not advance and the error is returned.
19596func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
19597	if tracing.IsEnabled() {
19598		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
19599		defer func() {
19600			sc := -1
19601			if page.Response().Response.Response != nil {
19602				sc = page.Response().Response.Response.StatusCode
19603			}
19604			tracing.EndSpan(ctx, sc, err)
19605		}()
19606	}
19607	for {
19608		next, err := page.fn(ctx, page.lhvncr)
19609		if err != nil {
19610			return err
19611		}
19612		page.lhvncr = next
19613		if !next.hasNextLink() || !next.IsEmpty() {
19614			break
19615		}
19616	}
19617	return nil
19618}
19619
19620// Next advances to the next page of values.  If there was an error making
19621// the request the page does not advance and the error is returned.
19622// Deprecated: Use NextWithContext() instead.
19623func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
19624	return page.NextWithContext(context.Background())
19625}
19626
19627// NotDone returns true if the page enumeration should be started or is not yet complete.
19628func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
19629	return !page.lhvncr.IsEmpty()
19630}
19631
19632// Response returns the raw server response from the last page request.
19633func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
19634	return page.lhvncr
19635}
19636
19637// Values returns the slice of values for the current page or nil if there are no values.
19638func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
19639	if page.lhvncr.IsEmpty() {
19640		return nil
19641	}
19642	return *page.lhvncr.Value
19643}
19644
19645// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
19646func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
19647	return ListHubVirtualNetworkConnectionsResultPage{
19648		fn:     getNextPage,
19649		lhvncr: cur,
19650	}
19651}
19652
19653// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of
19654// P2SVpnGateways and a URL nextLink to get the next set of results.
19655type ListP2SVpnGatewaysResult struct {
19656	autorest.Response `json:"-"`
19657	// Value - List of P2SVpnGateways.
19658	Value *[]P2SVpnGateway `json:"value,omitempty"`
19659	// NextLink - URL to get the next set of operation list results if there are any.
19660	NextLink *string `json:"nextLink,omitempty"`
19661}
19662
19663// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values.
19664type ListP2SVpnGatewaysResultIterator struct {
19665	i    int
19666	page ListP2SVpnGatewaysResultPage
19667}
19668
19669// NextWithContext advances to the next value.  If there was an error making
19670// the request the iterator does not advance and the error is returned.
19671func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
19672	if tracing.IsEnabled() {
19673		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.NextWithContext")
19674		defer func() {
19675			sc := -1
19676			if iter.Response().Response.Response != nil {
19677				sc = iter.Response().Response.Response.StatusCode
19678			}
19679			tracing.EndSpan(ctx, sc, err)
19680		}()
19681	}
19682	iter.i++
19683	if iter.i < len(iter.page.Values()) {
19684		return nil
19685	}
19686	err = iter.page.NextWithContext(ctx)
19687	if err != nil {
19688		iter.i--
19689		return err
19690	}
19691	iter.i = 0
19692	return nil
19693}
19694
19695// Next advances to the next value.  If there was an error making
19696// the request the iterator does not advance and the error is returned.
19697// Deprecated: Use NextWithContext() instead.
19698func (iter *ListP2SVpnGatewaysResultIterator) Next() error {
19699	return iter.NextWithContext(context.Background())
19700}
19701
19702// NotDone returns true if the enumeration should be started or is not yet complete.
19703func (iter ListP2SVpnGatewaysResultIterator) NotDone() bool {
19704	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19705}
19706
19707// Response returns the raw server response from the last page request.
19708func (iter ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult {
19709	return iter.page.Response()
19710}
19711
19712// Value returns the current value or a zero-initialized value if the
19713// iterator has advanced beyond the end of the collection.
19714func (iter ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway {
19715	if !iter.page.NotDone() {
19716		return P2SVpnGateway{}
19717	}
19718	return iter.page.Values()[iter.i]
19719}
19720
19721// Creates a new instance of the ListP2SVpnGatewaysResultIterator type.
19722func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator {
19723	return ListP2SVpnGatewaysResultIterator{page: page}
19724}
19725
19726// IsEmpty returns true if the ListResult contains no values.
19727func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
19728	return lpvgr.Value == nil || len(*lpvgr.Value) == 0
19729}
19730
19731// hasNextLink returns true if the NextLink is not empty.
19732func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool {
19733	return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0
19734}
19735
19736// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
19737// It returns nil if no more results exist.
19738func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
19739	if !lpvgr.hasNextLink() {
19740		return nil, nil
19741	}
19742	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19743		autorest.AsJSON(),
19744		autorest.AsGet(),
19745		autorest.WithBaseURL(to.String(lpvgr.NextLink)))
19746}
19747
19748// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values.
19749type ListP2SVpnGatewaysResultPage struct {
19750	fn    func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
19751	lpvgr ListP2SVpnGatewaysResult
19752}
19753
19754// NextWithContext advances to the next page of values.  If there was an error making
19755// the request the page does not advance and the error is returned.
19756func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
19757	if tracing.IsEnabled() {
19758		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext")
19759		defer func() {
19760			sc := -1
19761			if page.Response().Response.Response != nil {
19762				sc = page.Response().Response.Response.StatusCode
19763			}
19764			tracing.EndSpan(ctx, sc, err)
19765		}()
19766	}
19767	for {
19768		next, err := page.fn(ctx, page.lpvgr)
19769		if err != nil {
19770			return err
19771		}
19772		page.lpvgr = next
19773		if !next.hasNextLink() || !next.IsEmpty() {
19774			break
19775		}
19776	}
19777	return nil
19778}
19779
19780// Next advances to the next page of values.  If there was an error making
19781// the request the page does not advance and the error is returned.
19782// Deprecated: Use NextWithContext() instead.
19783func (page *ListP2SVpnGatewaysResultPage) Next() error {
19784	return page.NextWithContext(context.Background())
19785}
19786
19787// NotDone returns true if the page enumeration should be started or is not yet complete.
19788func (page ListP2SVpnGatewaysResultPage) NotDone() bool {
19789	return !page.lpvgr.IsEmpty()
19790}
19791
19792// Response returns the raw server response from the last page request.
19793func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult {
19794	return page.lpvgr
19795}
19796
19797// Values returns the slice of values for the current page or nil if there are no values.
19798func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway {
19799	if page.lpvgr.IsEmpty() {
19800		return nil
19801	}
19802	return *page.lpvgr.Value
19803}
19804
19805// Creates a new instance of the ListP2SVpnGatewaysResultPage type.
19806func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage {
19807	return ListP2SVpnGatewaysResultPage{
19808		fn:    getNextPage,
19809		lpvgr: cur,
19810	}
19811}
19812
19813// ListString ...
19814type ListString struct {
19815	autorest.Response `json:"-"`
19816	Value             *[]string `json:"value,omitempty"`
19817}
19818
19819// ListVirtualHubRouteTableV2sResult list of VirtualHubRouteTableV2s and a URL nextLink to get the next set
19820// of results.
19821type ListVirtualHubRouteTableV2sResult struct {
19822	autorest.Response `json:"-"`
19823	// Value - List of VirtualHubRouteTableV2s.
19824	Value *[]VirtualHubRouteTableV2 `json:"value,omitempty"`
19825	// NextLink - URL to get the next set of operation list results if there are any.
19826	NextLink *string `json:"nextLink,omitempty"`
19827}
19828
19829// ListVirtualHubRouteTableV2sResultIterator provides access to a complete listing of
19830// VirtualHubRouteTableV2 values.
19831type ListVirtualHubRouteTableV2sResultIterator struct {
19832	i    int
19833	page ListVirtualHubRouteTableV2sResultPage
19834}
19835
19836// NextWithContext advances to the next value.  If there was an error making
19837// the request the iterator does not advance and the error is returned.
19838func (iter *ListVirtualHubRouteTableV2sResultIterator) NextWithContext(ctx context.Context) (err error) {
19839	if tracing.IsEnabled() {
19840		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubRouteTableV2sResultIterator.NextWithContext")
19841		defer func() {
19842			sc := -1
19843			if iter.Response().Response.Response != nil {
19844				sc = iter.Response().Response.Response.StatusCode
19845			}
19846			tracing.EndSpan(ctx, sc, err)
19847		}()
19848	}
19849	iter.i++
19850	if iter.i < len(iter.page.Values()) {
19851		return nil
19852	}
19853	err = iter.page.NextWithContext(ctx)
19854	if err != nil {
19855		iter.i--
19856		return err
19857	}
19858	iter.i = 0
19859	return nil
19860}
19861
19862// Next advances to the next value.  If there was an error making
19863// the request the iterator does not advance and the error is returned.
19864// Deprecated: Use NextWithContext() instead.
19865func (iter *ListVirtualHubRouteTableV2sResultIterator) Next() error {
19866	return iter.NextWithContext(context.Background())
19867}
19868
19869// NotDone returns true if the enumeration should be started or is not yet complete.
19870func (iter ListVirtualHubRouteTableV2sResultIterator) NotDone() bool {
19871	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19872}
19873
19874// Response returns the raw server response from the last page request.
19875func (iter ListVirtualHubRouteTableV2sResultIterator) Response() ListVirtualHubRouteTableV2sResult {
19876	return iter.page.Response()
19877}
19878
19879// Value returns the current value or a zero-initialized value if the
19880// iterator has advanced beyond the end of the collection.
19881func (iter ListVirtualHubRouteTableV2sResultIterator) Value() VirtualHubRouteTableV2 {
19882	if !iter.page.NotDone() {
19883		return VirtualHubRouteTableV2{}
19884	}
19885	return iter.page.Values()[iter.i]
19886}
19887
19888// Creates a new instance of the ListVirtualHubRouteTableV2sResultIterator type.
19889func NewListVirtualHubRouteTableV2sResultIterator(page ListVirtualHubRouteTableV2sResultPage) ListVirtualHubRouteTableV2sResultIterator {
19890	return ListVirtualHubRouteTableV2sResultIterator{page: page}
19891}
19892
19893// IsEmpty returns true if the ListResult contains no values.
19894func (lvhrtvr ListVirtualHubRouteTableV2sResult) IsEmpty() bool {
19895	return lvhrtvr.Value == nil || len(*lvhrtvr.Value) == 0
19896}
19897
19898// hasNextLink returns true if the NextLink is not empty.
19899func (lvhrtvr ListVirtualHubRouteTableV2sResult) hasNextLink() bool {
19900	return lvhrtvr.NextLink != nil && len(*lvhrtvr.NextLink) != 0
19901}
19902
19903// listVirtualHubRouteTableV2sResultPreparer prepares a request to retrieve the next set of results.
19904// It returns nil if no more results exist.
19905func (lvhrtvr ListVirtualHubRouteTableV2sResult) listVirtualHubRouteTableV2sResultPreparer(ctx context.Context) (*http.Request, error) {
19906	if !lvhrtvr.hasNextLink() {
19907		return nil, nil
19908	}
19909	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19910		autorest.AsJSON(),
19911		autorest.AsGet(),
19912		autorest.WithBaseURL(to.String(lvhrtvr.NextLink)))
19913}
19914
19915// ListVirtualHubRouteTableV2sResultPage contains a page of VirtualHubRouteTableV2 values.
19916type ListVirtualHubRouteTableV2sResultPage struct {
19917	fn      func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error)
19918	lvhrtvr ListVirtualHubRouteTableV2sResult
19919}
19920
19921// NextWithContext advances to the next page of values.  If there was an error making
19922// the request the page does not advance and the error is returned.
19923func (page *ListVirtualHubRouteTableV2sResultPage) NextWithContext(ctx context.Context) (err error) {
19924	if tracing.IsEnabled() {
19925		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubRouteTableV2sResultPage.NextWithContext")
19926		defer func() {
19927			sc := -1
19928			if page.Response().Response.Response != nil {
19929				sc = page.Response().Response.Response.StatusCode
19930			}
19931			tracing.EndSpan(ctx, sc, err)
19932		}()
19933	}
19934	for {
19935		next, err := page.fn(ctx, page.lvhrtvr)
19936		if err != nil {
19937			return err
19938		}
19939		page.lvhrtvr = next
19940		if !next.hasNextLink() || !next.IsEmpty() {
19941			break
19942		}
19943	}
19944	return nil
19945}
19946
19947// Next advances to the next page of values.  If there was an error making
19948// the request the page does not advance and the error is returned.
19949// Deprecated: Use NextWithContext() instead.
19950func (page *ListVirtualHubRouteTableV2sResultPage) Next() error {
19951	return page.NextWithContext(context.Background())
19952}
19953
19954// NotDone returns true if the page enumeration should be started or is not yet complete.
19955func (page ListVirtualHubRouteTableV2sResultPage) NotDone() bool {
19956	return !page.lvhrtvr.IsEmpty()
19957}
19958
19959// Response returns the raw server response from the last page request.
19960func (page ListVirtualHubRouteTableV2sResultPage) Response() ListVirtualHubRouteTableV2sResult {
19961	return page.lvhrtvr
19962}
19963
19964// Values returns the slice of values for the current page or nil if there are no values.
19965func (page ListVirtualHubRouteTableV2sResultPage) Values() []VirtualHubRouteTableV2 {
19966	if page.lvhrtvr.IsEmpty() {
19967		return nil
19968	}
19969	return *page.lvhrtvr.Value
19970}
19971
19972// Creates a new instance of the ListVirtualHubRouteTableV2sResultPage type.
19973func NewListVirtualHubRouteTableV2sResultPage(cur ListVirtualHubRouteTableV2sResult, getNextPage func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error)) ListVirtualHubRouteTableV2sResultPage {
19974	return ListVirtualHubRouteTableV2sResultPage{
19975		fn:      getNextPage,
19976		lvhrtvr: cur,
19977	}
19978}
19979
19980// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
19981// URL nextLink to get the next set of results.
19982type ListVirtualHubsResult struct {
19983	autorest.Response `json:"-"`
19984	// Value - List of VirtualHubs.
19985	Value *[]VirtualHub `json:"value,omitempty"`
19986	// NextLink - URL to get the next set of operation list results if there are any.
19987	NextLink *string `json:"nextLink,omitempty"`
19988}
19989
19990// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
19991type ListVirtualHubsResultIterator struct {
19992	i    int
19993	page ListVirtualHubsResultPage
19994}
19995
19996// NextWithContext advances to the next value.  If there was an error making
19997// the request the iterator does not advance and the error is returned.
19998func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
19999	if tracing.IsEnabled() {
20000		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
20001		defer func() {
20002			sc := -1
20003			if iter.Response().Response.Response != nil {
20004				sc = iter.Response().Response.Response.StatusCode
20005			}
20006			tracing.EndSpan(ctx, sc, err)
20007		}()
20008	}
20009	iter.i++
20010	if iter.i < len(iter.page.Values()) {
20011		return nil
20012	}
20013	err = iter.page.NextWithContext(ctx)
20014	if err != nil {
20015		iter.i--
20016		return err
20017	}
20018	iter.i = 0
20019	return nil
20020}
20021
20022// Next advances to the next value.  If there was an error making
20023// the request the iterator does not advance and the error is returned.
20024// Deprecated: Use NextWithContext() instead.
20025func (iter *ListVirtualHubsResultIterator) Next() error {
20026	return iter.NextWithContext(context.Background())
20027}
20028
20029// NotDone returns true if the enumeration should be started or is not yet complete.
20030func (iter ListVirtualHubsResultIterator) NotDone() bool {
20031	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20032}
20033
20034// Response returns the raw server response from the last page request.
20035func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
20036	return iter.page.Response()
20037}
20038
20039// Value returns the current value or a zero-initialized value if the
20040// iterator has advanced beyond the end of the collection.
20041func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
20042	if !iter.page.NotDone() {
20043		return VirtualHub{}
20044	}
20045	return iter.page.Values()[iter.i]
20046}
20047
20048// Creates a new instance of the ListVirtualHubsResultIterator type.
20049func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
20050	return ListVirtualHubsResultIterator{page: page}
20051}
20052
20053// IsEmpty returns true if the ListResult contains no values.
20054func (lvhr ListVirtualHubsResult) IsEmpty() bool {
20055	return lvhr.Value == nil || len(*lvhr.Value) == 0
20056}
20057
20058// hasNextLink returns true if the NextLink is not empty.
20059func (lvhr ListVirtualHubsResult) hasNextLink() bool {
20060	return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
20061}
20062
20063// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
20064// It returns nil if no more results exist.
20065func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
20066	if !lvhr.hasNextLink() {
20067		return nil, nil
20068	}
20069	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20070		autorest.AsJSON(),
20071		autorest.AsGet(),
20072		autorest.WithBaseURL(to.String(lvhr.NextLink)))
20073}
20074
20075// ListVirtualHubsResultPage contains a page of VirtualHub values.
20076type ListVirtualHubsResultPage struct {
20077	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
20078	lvhr ListVirtualHubsResult
20079}
20080
20081// NextWithContext advances to the next page of values.  If there was an error making
20082// the request the page does not advance and the error is returned.
20083func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
20084	if tracing.IsEnabled() {
20085		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
20086		defer func() {
20087			sc := -1
20088			if page.Response().Response.Response != nil {
20089				sc = page.Response().Response.Response.StatusCode
20090			}
20091			tracing.EndSpan(ctx, sc, err)
20092		}()
20093	}
20094	for {
20095		next, err := page.fn(ctx, page.lvhr)
20096		if err != nil {
20097			return err
20098		}
20099		page.lvhr = next
20100		if !next.hasNextLink() || !next.IsEmpty() {
20101			break
20102		}
20103	}
20104	return nil
20105}
20106
20107// Next advances to the next page of values.  If there was an error making
20108// the request the page does not advance and the error is returned.
20109// Deprecated: Use NextWithContext() instead.
20110func (page *ListVirtualHubsResultPage) Next() error {
20111	return page.NextWithContext(context.Background())
20112}
20113
20114// NotDone returns true if the page enumeration should be started or is not yet complete.
20115func (page ListVirtualHubsResultPage) NotDone() bool {
20116	return !page.lvhr.IsEmpty()
20117}
20118
20119// Response returns the raw server response from the last page request.
20120func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
20121	return page.lvhr
20122}
20123
20124// Values returns the slice of values for the current page or nil if there are no values.
20125func (page ListVirtualHubsResultPage) Values() []VirtualHub {
20126	if page.lvhr.IsEmpty() {
20127		return nil
20128	}
20129	return *page.lvhr.Value
20130}
20131
20132// Creates a new instance of the ListVirtualHubsResultPage type.
20133func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
20134	return ListVirtualHubsResultPage{
20135		fn:   getNextPage,
20136		lvhr: cur,
20137	}
20138}
20139
20140// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
20141// URL nextLink to get the next set of results.
20142type ListVirtualWANsResult struct {
20143	autorest.Response `json:"-"`
20144	// Value - List of VirtualWANs.
20145	Value *[]VirtualWAN `json:"value,omitempty"`
20146	// NextLink - URL to get the next set of operation list results if there are any.
20147	NextLink *string `json:"nextLink,omitempty"`
20148}
20149
20150// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
20151type ListVirtualWANsResultIterator struct {
20152	i    int
20153	page ListVirtualWANsResultPage
20154}
20155
20156// NextWithContext advances to the next value.  If there was an error making
20157// the request the iterator does not advance and the error is returned.
20158func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
20159	if tracing.IsEnabled() {
20160		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
20161		defer func() {
20162			sc := -1
20163			if iter.Response().Response.Response != nil {
20164				sc = iter.Response().Response.Response.StatusCode
20165			}
20166			tracing.EndSpan(ctx, sc, err)
20167		}()
20168	}
20169	iter.i++
20170	if iter.i < len(iter.page.Values()) {
20171		return nil
20172	}
20173	err = iter.page.NextWithContext(ctx)
20174	if err != nil {
20175		iter.i--
20176		return err
20177	}
20178	iter.i = 0
20179	return nil
20180}
20181
20182// Next advances to the next value.  If there was an error making
20183// the request the iterator does not advance and the error is returned.
20184// Deprecated: Use NextWithContext() instead.
20185func (iter *ListVirtualWANsResultIterator) Next() error {
20186	return iter.NextWithContext(context.Background())
20187}
20188
20189// NotDone returns true if the enumeration should be started or is not yet complete.
20190func (iter ListVirtualWANsResultIterator) NotDone() bool {
20191	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20192}
20193
20194// Response returns the raw server response from the last page request.
20195func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
20196	return iter.page.Response()
20197}
20198
20199// Value returns the current value or a zero-initialized value if the
20200// iterator has advanced beyond the end of the collection.
20201func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
20202	if !iter.page.NotDone() {
20203		return VirtualWAN{}
20204	}
20205	return iter.page.Values()[iter.i]
20206}
20207
20208// Creates a new instance of the ListVirtualWANsResultIterator type.
20209func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
20210	return ListVirtualWANsResultIterator{page: page}
20211}
20212
20213// IsEmpty returns true if the ListResult contains no values.
20214func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
20215	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
20216}
20217
20218// hasNextLink returns true if the NextLink is not empty.
20219func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
20220	return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
20221}
20222
20223// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
20224// It returns nil if no more results exist.
20225func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
20226	if !lvwnr.hasNextLink() {
20227		return nil, nil
20228	}
20229	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20230		autorest.AsJSON(),
20231		autorest.AsGet(),
20232		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
20233}
20234
20235// ListVirtualWANsResultPage contains a page of VirtualWAN values.
20236type ListVirtualWANsResultPage struct {
20237	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
20238	lvwnr ListVirtualWANsResult
20239}
20240
20241// NextWithContext advances to the next page of values.  If there was an error making
20242// the request the page does not advance and the error is returned.
20243func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
20244	if tracing.IsEnabled() {
20245		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
20246		defer func() {
20247			sc := -1
20248			if page.Response().Response.Response != nil {
20249				sc = page.Response().Response.Response.StatusCode
20250			}
20251			tracing.EndSpan(ctx, sc, err)
20252		}()
20253	}
20254	for {
20255		next, err := page.fn(ctx, page.lvwnr)
20256		if err != nil {
20257			return err
20258		}
20259		page.lvwnr = next
20260		if !next.hasNextLink() || !next.IsEmpty() {
20261			break
20262		}
20263	}
20264	return nil
20265}
20266
20267// Next advances to the next page of values.  If there was an error making
20268// the request the page does not advance and the error is returned.
20269// Deprecated: Use NextWithContext() instead.
20270func (page *ListVirtualWANsResultPage) Next() error {
20271	return page.NextWithContext(context.Background())
20272}
20273
20274// NotDone returns true if the page enumeration should be started or is not yet complete.
20275func (page ListVirtualWANsResultPage) NotDone() bool {
20276	return !page.lvwnr.IsEmpty()
20277}
20278
20279// Response returns the raw server response from the last page request.
20280func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
20281	return page.lvwnr
20282}
20283
20284// Values returns the slice of values for the current page or nil if there are no values.
20285func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
20286	if page.lvwnr.IsEmpty() {
20287		return nil
20288	}
20289	return *page.lvwnr.Value
20290}
20291
20292// Creates a new instance of the ListVirtualWANsResultPage type.
20293func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
20294	return ListVirtualWANsResultPage{
20295		fn:    getNextPage,
20296		lvwnr: cur,
20297	}
20298}
20299
20300// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
20301// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
20302type ListVpnConnectionsResult struct {
20303	autorest.Response `json:"-"`
20304	// Value - List of Vpn Connections.
20305	Value *[]VpnConnection `json:"value,omitempty"`
20306	// NextLink - URL to get the next set of operation list results if there are any.
20307	NextLink *string `json:"nextLink,omitempty"`
20308}
20309
20310// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
20311type ListVpnConnectionsResultIterator struct {
20312	i    int
20313	page ListVpnConnectionsResultPage
20314}
20315
20316// NextWithContext advances to the next value.  If there was an error making
20317// the request the iterator does not advance and the error is returned.
20318func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
20319	if tracing.IsEnabled() {
20320		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
20321		defer func() {
20322			sc := -1
20323			if iter.Response().Response.Response != nil {
20324				sc = iter.Response().Response.Response.StatusCode
20325			}
20326			tracing.EndSpan(ctx, sc, err)
20327		}()
20328	}
20329	iter.i++
20330	if iter.i < len(iter.page.Values()) {
20331		return nil
20332	}
20333	err = iter.page.NextWithContext(ctx)
20334	if err != nil {
20335		iter.i--
20336		return err
20337	}
20338	iter.i = 0
20339	return nil
20340}
20341
20342// Next advances to the next value.  If there was an error making
20343// the request the iterator does not advance and the error is returned.
20344// Deprecated: Use NextWithContext() instead.
20345func (iter *ListVpnConnectionsResultIterator) Next() error {
20346	return iter.NextWithContext(context.Background())
20347}
20348
20349// NotDone returns true if the enumeration should be started or is not yet complete.
20350func (iter ListVpnConnectionsResultIterator) NotDone() bool {
20351	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20352}
20353
20354// Response returns the raw server response from the last page request.
20355func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
20356	return iter.page.Response()
20357}
20358
20359// Value returns the current value or a zero-initialized value if the
20360// iterator has advanced beyond the end of the collection.
20361func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
20362	if !iter.page.NotDone() {
20363		return VpnConnection{}
20364	}
20365	return iter.page.Values()[iter.i]
20366}
20367
20368// Creates a new instance of the ListVpnConnectionsResultIterator type.
20369func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
20370	return ListVpnConnectionsResultIterator{page: page}
20371}
20372
20373// IsEmpty returns true if the ListResult contains no values.
20374func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
20375	return lvcr.Value == nil || len(*lvcr.Value) == 0
20376}
20377
20378// hasNextLink returns true if the NextLink is not empty.
20379func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
20380	return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
20381}
20382
20383// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
20384// It returns nil if no more results exist.
20385func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
20386	if !lvcr.hasNextLink() {
20387		return nil, nil
20388	}
20389	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20390		autorest.AsJSON(),
20391		autorest.AsGet(),
20392		autorest.WithBaseURL(to.String(lvcr.NextLink)))
20393}
20394
20395// ListVpnConnectionsResultPage contains a page of VpnConnection values.
20396type ListVpnConnectionsResultPage struct {
20397	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
20398	lvcr ListVpnConnectionsResult
20399}
20400
20401// NextWithContext advances to the next page of values.  If there was an error making
20402// the request the page does not advance and the error is returned.
20403func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
20404	if tracing.IsEnabled() {
20405		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
20406		defer func() {
20407			sc := -1
20408			if page.Response().Response.Response != nil {
20409				sc = page.Response().Response.Response.StatusCode
20410			}
20411			tracing.EndSpan(ctx, sc, err)
20412		}()
20413	}
20414	for {
20415		next, err := page.fn(ctx, page.lvcr)
20416		if err != nil {
20417			return err
20418		}
20419		page.lvcr = next
20420		if !next.hasNextLink() || !next.IsEmpty() {
20421			break
20422		}
20423	}
20424	return nil
20425}
20426
20427// Next advances to the next page of values.  If there was an error making
20428// the request the page does not advance and the error is returned.
20429// Deprecated: Use NextWithContext() instead.
20430func (page *ListVpnConnectionsResultPage) Next() error {
20431	return page.NextWithContext(context.Background())
20432}
20433
20434// NotDone returns true if the page enumeration should be started or is not yet complete.
20435func (page ListVpnConnectionsResultPage) NotDone() bool {
20436	return !page.lvcr.IsEmpty()
20437}
20438
20439// Response returns the raw server response from the last page request.
20440func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
20441	return page.lvcr
20442}
20443
20444// Values returns the slice of values for the current page or nil if there are no values.
20445func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
20446	if page.lvcr.IsEmpty() {
20447		return nil
20448	}
20449	return *page.lvcr.Value
20450}
20451
20452// Creates a new instance of the ListVpnConnectionsResultPage type.
20453func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
20454	return ListVpnConnectionsResultPage{
20455		fn:   getNextPage,
20456		lvcr: cur,
20457	}
20458}
20459
20460// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
20461// URL nextLink to get the next set of results.
20462type ListVpnGatewaysResult struct {
20463	autorest.Response `json:"-"`
20464	// Value - List of VpnGateways.
20465	Value *[]VpnGateway `json:"value,omitempty"`
20466	// NextLink - URL to get the next set of operation list results if there are any.
20467	NextLink *string `json:"nextLink,omitempty"`
20468}
20469
20470// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
20471type ListVpnGatewaysResultIterator struct {
20472	i    int
20473	page ListVpnGatewaysResultPage
20474}
20475
20476// NextWithContext advances to the next value.  If there was an error making
20477// the request the iterator does not advance and the error is returned.
20478func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
20479	if tracing.IsEnabled() {
20480		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
20481		defer func() {
20482			sc := -1
20483			if iter.Response().Response.Response != nil {
20484				sc = iter.Response().Response.Response.StatusCode
20485			}
20486			tracing.EndSpan(ctx, sc, err)
20487		}()
20488	}
20489	iter.i++
20490	if iter.i < len(iter.page.Values()) {
20491		return nil
20492	}
20493	err = iter.page.NextWithContext(ctx)
20494	if err != nil {
20495		iter.i--
20496		return err
20497	}
20498	iter.i = 0
20499	return nil
20500}
20501
20502// Next advances to the next value.  If there was an error making
20503// the request the iterator does not advance and the error is returned.
20504// Deprecated: Use NextWithContext() instead.
20505func (iter *ListVpnGatewaysResultIterator) Next() error {
20506	return iter.NextWithContext(context.Background())
20507}
20508
20509// NotDone returns true if the enumeration should be started or is not yet complete.
20510func (iter ListVpnGatewaysResultIterator) NotDone() bool {
20511	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20512}
20513
20514// Response returns the raw server response from the last page request.
20515func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
20516	return iter.page.Response()
20517}
20518
20519// Value returns the current value or a zero-initialized value if the
20520// iterator has advanced beyond the end of the collection.
20521func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
20522	if !iter.page.NotDone() {
20523		return VpnGateway{}
20524	}
20525	return iter.page.Values()[iter.i]
20526}
20527
20528// Creates a new instance of the ListVpnGatewaysResultIterator type.
20529func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
20530	return ListVpnGatewaysResultIterator{page: page}
20531}
20532
20533// IsEmpty returns true if the ListResult contains no values.
20534func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
20535	return lvgr.Value == nil || len(*lvgr.Value) == 0
20536}
20537
20538// hasNextLink returns true if the NextLink is not empty.
20539func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
20540	return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
20541}
20542
20543// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
20544// It returns nil if no more results exist.
20545func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
20546	if !lvgr.hasNextLink() {
20547		return nil, nil
20548	}
20549	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20550		autorest.AsJSON(),
20551		autorest.AsGet(),
20552		autorest.WithBaseURL(to.String(lvgr.NextLink)))
20553}
20554
20555// ListVpnGatewaysResultPage contains a page of VpnGateway values.
20556type ListVpnGatewaysResultPage struct {
20557	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
20558	lvgr ListVpnGatewaysResult
20559}
20560
20561// NextWithContext advances to the next page of values.  If there was an error making
20562// the request the page does not advance and the error is returned.
20563func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
20564	if tracing.IsEnabled() {
20565		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
20566		defer func() {
20567			sc := -1
20568			if page.Response().Response.Response != nil {
20569				sc = page.Response().Response.Response.StatusCode
20570			}
20571			tracing.EndSpan(ctx, sc, err)
20572		}()
20573	}
20574	for {
20575		next, err := page.fn(ctx, page.lvgr)
20576		if err != nil {
20577			return err
20578		}
20579		page.lvgr = next
20580		if !next.hasNextLink() || !next.IsEmpty() {
20581			break
20582		}
20583	}
20584	return nil
20585}
20586
20587// Next advances to the next page of values.  If there was an error making
20588// the request the page does not advance and the error is returned.
20589// Deprecated: Use NextWithContext() instead.
20590func (page *ListVpnGatewaysResultPage) Next() error {
20591	return page.NextWithContext(context.Background())
20592}
20593
20594// NotDone returns true if the page enumeration should be started or is not yet complete.
20595func (page ListVpnGatewaysResultPage) NotDone() bool {
20596	return !page.lvgr.IsEmpty()
20597}
20598
20599// Response returns the raw server response from the last page request.
20600func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
20601	return page.lvgr
20602}
20603
20604// Values returns the slice of values for the current page or nil if there are no values.
20605func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
20606	if page.lvgr.IsEmpty() {
20607		return nil
20608	}
20609	return *page.lvgr.Value
20610}
20611
20612// Creates a new instance of the ListVpnGatewaysResultPage type.
20613func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
20614	return ListVpnGatewaysResultPage{
20615		fn:   getNextPage,
20616		lvgr: cur,
20617	}
20618}
20619
20620// ListVpnServerConfigurationsResult result of the request to list all VpnServerConfigurations. It contains
20621// a list of VpnServerConfigurations and a URL nextLink to get the next set of results.
20622type ListVpnServerConfigurationsResult struct {
20623	autorest.Response `json:"-"`
20624	// Value - List of VpnServerConfigurations.
20625	Value *[]VpnServerConfiguration `json:"value,omitempty"`
20626	// NextLink - URL to get the next set of operation list results if there are any.
20627	NextLink *string `json:"nextLink,omitempty"`
20628}
20629
20630// ListVpnServerConfigurationsResultIterator provides access to a complete listing of
20631// VpnServerConfiguration values.
20632type ListVpnServerConfigurationsResultIterator struct {
20633	i    int
20634	page ListVpnServerConfigurationsResultPage
20635}
20636
20637// NextWithContext advances to the next value.  If there was an error making
20638// the request the iterator does not advance and the error is returned.
20639func (iter *ListVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) {
20640	if tracing.IsEnabled() {
20641		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnServerConfigurationsResultIterator.NextWithContext")
20642		defer func() {
20643			sc := -1
20644			if iter.Response().Response.Response != nil {
20645				sc = iter.Response().Response.Response.StatusCode
20646			}
20647			tracing.EndSpan(ctx, sc, err)
20648		}()
20649	}
20650	iter.i++
20651	if iter.i < len(iter.page.Values()) {
20652		return nil
20653	}
20654	err = iter.page.NextWithContext(ctx)
20655	if err != nil {
20656		iter.i--
20657		return err
20658	}
20659	iter.i = 0
20660	return nil
20661}
20662
20663// Next advances to the next value.  If there was an error making
20664// the request the iterator does not advance and the error is returned.
20665// Deprecated: Use NextWithContext() instead.
20666func (iter *ListVpnServerConfigurationsResultIterator) Next() error {
20667	return iter.NextWithContext(context.Background())
20668}
20669
20670// NotDone returns true if the enumeration should be started or is not yet complete.
20671func (iter ListVpnServerConfigurationsResultIterator) NotDone() bool {
20672	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20673}
20674
20675// Response returns the raw server response from the last page request.
20676func (iter ListVpnServerConfigurationsResultIterator) Response() ListVpnServerConfigurationsResult {
20677	return iter.page.Response()
20678}
20679
20680// Value returns the current value or a zero-initialized value if the
20681// iterator has advanced beyond the end of the collection.
20682func (iter ListVpnServerConfigurationsResultIterator) Value() VpnServerConfiguration {
20683	if !iter.page.NotDone() {
20684		return VpnServerConfiguration{}
20685	}
20686	return iter.page.Values()[iter.i]
20687}
20688
20689// Creates a new instance of the ListVpnServerConfigurationsResultIterator type.
20690func NewListVpnServerConfigurationsResultIterator(page ListVpnServerConfigurationsResultPage) ListVpnServerConfigurationsResultIterator {
20691	return ListVpnServerConfigurationsResultIterator{page: page}
20692}
20693
20694// IsEmpty returns true if the ListResult contains no values.
20695func (lvscr ListVpnServerConfigurationsResult) IsEmpty() bool {
20696	return lvscr.Value == nil || len(*lvscr.Value) == 0
20697}
20698
20699// hasNextLink returns true if the NextLink is not empty.
20700func (lvscr ListVpnServerConfigurationsResult) hasNextLink() bool {
20701	return lvscr.NextLink != nil && len(*lvscr.NextLink) != 0
20702}
20703
20704// listVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results.
20705// It returns nil if no more results exist.
20706func (lvscr ListVpnServerConfigurationsResult) listVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) {
20707	if !lvscr.hasNextLink() {
20708		return nil, nil
20709	}
20710	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20711		autorest.AsJSON(),
20712		autorest.AsGet(),
20713		autorest.WithBaseURL(to.String(lvscr.NextLink)))
20714}
20715
20716// ListVpnServerConfigurationsResultPage contains a page of VpnServerConfiguration values.
20717type ListVpnServerConfigurationsResultPage struct {
20718	fn    func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error)
20719	lvscr ListVpnServerConfigurationsResult
20720}
20721
20722// NextWithContext advances to the next page of values.  If there was an error making
20723// the request the page does not advance and the error is returned.
20724func (page *ListVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) {
20725	if tracing.IsEnabled() {
20726		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnServerConfigurationsResultPage.NextWithContext")
20727		defer func() {
20728			sc := -1
20729			if page.Response().Response.Response != nil {
20730				sc = page.Response().Response.Response.StatusCode
20731			}
20732			tracing.EndSpan(ctx, sc, err)
20733		}()
20734	}
20735	for {
20736		next, err := page.fn(ctx, page.lvscr)
20737		if err != nil {
20738			return err
20739		}
20740		page.lvscr = next
20741		if !next.hasNextLink() || !next.IsEmpty() {
20742			break
20743		}
20744	}
20745	return nil
20746}
20747
20748// Next advances to the next page of values.  If there was an error making
20749// the request the page does not advance and the error is returned.
20750// Deprecated: Use NextWithContext() instead.
20751func (page *ListVpnServerConfigurationsResultPage) Next() error {
20752	return page.NextWithContext(context.Background())
20753}
20754
20755// NotDone returns true if the page enumeration should be started or is not yet complete.
20756func (page ListVpnServerConfigurationsResultPage) NotDone() bool {
20757	return !page.lvscr.IsEmpty()
20758}
20759
20760// Response returns the raw server response from the last page request.
20761func (page ListVpnServerConfigurationsResultPage) Response() ListVpnServerConfigurationsResult {
20762	return page.lvscr
20763}
20764
20765// Values returns the slice of values for the current page or nil if there are no values.
20766func (page ListVpnServerConfigurationsResultPage) Values() []VpnServerConfiguration {
20767	if page.lvscr.IsEmpty() {
20768		return nil
20769	}
20770	return *page.lvscr.Value
20771}
20772
20773// Creates a new instance of the ListVpnServerConfigurationsResultPage type.
20774func NewListVpnServerConfigurationsResultPage(cur ListVpnServerConfigurationsResult, getNextPage func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error)) ListVpnServerConfigurationsResultPage {
20775	return ListVpnServerConfigurationsResultPage{
20776		fn:    getNextPage,
20777		lvscr: cur,
20778	}
20779}
20780
20781// ListVpnSiteLinkConnectionsResult result of the request to list all vpn connections to a virtual wan vpn
20782// gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
20783type ListVpnSiteLinkConnectionsResult struct {
20784	autorest.Response `json:"-"`
20785	// Value - List of VpnSiteLinkConnections.
20786	Value *[]VpnSiteLinkConnection `json:"value,omitempty"`
20787	// NextLink - URL to get the next set of operation list results if there are any.
20788	NextLink *string `json:"nextLink,omitempty"`
20789}
20790
20791// ListVpnSiteLinkConnectionsResultIterator provides access to a complete listing of VpnSiteLinkConnection
20792// values.
20793type ListVpnSiteLinkConnectionsResultIterator struct {
20794	i    int
20795	page ListVpnSiteLinkConnectionsResultPage
20796}
20797
20798// NextWithContext advances to the next value.  If there was an error making
20799// the request the iterator does not advance and the error is returned.
20800func (iter *ListVpnSiteLinkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
20801	if tracing.IsEnabled() {
20802		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultIterator.NextWithContext")
20803		defer func() {
20804			sc := -1
20805			if iter.Response().Response.Response != nil {
20806				sc = iter.Response().Response.Response.StatusCode
20807			}
20808			tracing.EndSpan(ctx, sc, err)
20809		}()
20810	}
20811	iter.i++
20812	if iter.i < len(iter.page.Values()) {
20813		return nil
20814	}
20815	err = iter.page.NextWithContext(ctx)
20816	if err != nil {
20817		iter.i--
20818		return err
20819	}
20820	iter.i = 0
20821	return nil
20822}
20823
20824// Next advances to the next value.  If there was an error making
20825// the request the iterator does not advance and the error is returned.
20826// Deprecated: Use NextWithContext() instead.
20827func (iter *ListVpnSiteLinkConnectionsResultIterator) Next() error {
20828	return iter.NextWithContext(context.Background())
20829}
20830
20831// NotDone returns true if the enumeration should be started or is not yet complete.
20832func (iter ListVpnSiteLinkConnectionsResultIterator) NotDone() bool {
20833	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20834}
20835
20836// Response returns the raw server response from the last page request.
20837func (iter ListVpnSiteLinkConnectionsResultIterator) Response() ListVpnSiteLinkConnectionsResult {
20838	return iter.page.Response()
20839}
20840
20841// Value returns the current value or a zero-initialized value if the
20842// iterator has advanced beyond the end of the collection.
20843func (iter ListVpnSiteLinkConnectionsResultIterator) Value() VpnSiteLinkConnection {
20844	if !iter.page.NotDone() {
20845		return VpnSiteLinkConnection{}
20846	}
20847	return iter.page.Values()[iter.i]
20848}
20849
20850// Creates a new instance of the ListVpnSiteLinkConnectionsResultIterator type.
20851func NewListVpnSiteLinkConnectionsResultIterator(page ListVpnSiteLinkConnectionsResultPage) ListVpnSiteLinkConnectionsResultIterator {
20852	return ListVpnSiteLinkConnectionsResultIterator{page: page}
20853}
20854
20855// IsEmpty returns true if the ListResult contains no values.
20856func (lvslcr ListVpnSiteLinkConnectionsResult) IsEmpty() bool {
20857	return lvslcr.Value == nil || len(*lvslcr.Value) == 0
20858}
20859
20860// hasNextLink returns true if the NextLink is not empty.
20861func (lvslcr ListVpnSiteLinkConnectionsResult) hasNextLink() bool {
20862	return lvslcr.NextLink != nil && len(*lvslcr.NextLink) != 0
20863}
20864
20865// listVpnSiteLinkConnectionsResultPreparer prepares a request to retrieve the next set of results.
20866// It returns nil if no more results exist.
20867func (lvslcr ListVpnSiteLinkConnectionsResult) listVpnSiteLinkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
20868	if !lvslcr.hasNextLink() {
20869		return nil, nil
20870	}
20871	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20872		autorest.AsJSON(),
20873		autorest.AsGet(),
20874		autorest.WithBaseURL(to.String(lvslcr.NextLink)))
20875}
20876
20877// ListVpnSiteLinkConnectionsResultPage contains a page of VpnSiteLinkConnection values.
20878type ListVpnSiteLinkConnectionsResultPage struct {
20879	fn     func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)
20880	lvslcr ListVpnSiteLinkConnectionsResult
20881}
20882
20883// NextWithContext advances to the next page of values.  If there was an error making
20884// the request the page does not advance and the error is returned.
20885func (page *ListVpnSiteLinkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
20886	if tracing.IsEnabled() {
20887		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultPage.NextWithContext")
20888		defer func() {
20889			sc := -1
20890			if page.Response().Response.Response != nil {
20891				sc = page.Response().Response.Response.StatusCode
20892			}
20893			tracing.EndSpan(ctx, sc, err)
20894		}()
20895	}
20896	for {
20897		next, err := page.fn(ctx, page.lvslcr)
20898		if err != nil {
20899			return err
20900		}
20901		page.lvslcr = next
20902		if !next.hasNextLink() || !next.IsEmpty() {
20903			break
20904		}
20905	}
20906	return nil
20907}
20908
20909// Next advances to the next page of values.  If there was an error making
20910// the request the page does not advance and the error is returned.
20911// Deprecated: Use NextWithContext() instead.
20912func (page *ListVpnSiteLinkConnectionsResultPage) Next() error {
20913	return page.NextWithContext(context.Background())
20914}
20915
20916// NotDone returns true if the page enumeration should be started or is not yet complete.
20917func (page ListVpnSiteLinkConnectionsResultPage) NotDone() bool {
20918	return !page.lvslcr.IsEmpty()
20919}
20920
20921// Response returns the raw server response from the last page request.
20922func (page ListVpnSiteLinkConnectionsResultPage) Response() ListVpnSiteLinkConnectionsResult {
20923	return page.lvslcr
20924}
20925
20926// Values returns the slice of values for the current page or nil if there are no values.
20927func (page ListVpnSiteLinkConnectionsResultPage) Values() []VpnSiteLinkConnection {
20928	if page.lvslcr.IsEmpty() {
20929		return nil
20930	}
20931	return *page.lvslcr.Value
20932}
20933
20934// Creates a new instance of the ListVpnSiteLinkConnectionsResultPage type.
20935func NewListVpnSiteLinkConnectionsResultPage(cur ListVpnSiteLinkConnectionsResult, getNextPage func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)) ListVpnSiteLinkConnectionsResultPage {
20936	return ListVpnSiteLinkConnectionsResultPage{
20937		fn:     getNextPage,
20938		lvslcr: cur,
20939	}
20940}
20941
20942// ListVpnSiteLinksResult result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks
20943// and a URL nextLink to get the next set of results.
20944type ListVpnSiteLinksResult struct {
20945	autorest.Response `json:"-"`
20946	// Value - List of VpnSitesLinks.
20947	Value *[]VpnSiteLink `json:"value,omitempty"`
20948	// NextLink - URL to get the next set of operation list results if there are any.
20949	NextLink *string `json:"nextLink,omitempty"`
20950}
20951
20952// ListVpnSiteLinksResultIterator provides access to a complete listing of VpnSiteLink values.
20953type ListVpnSiteLinksResultIterator struct {
20954	i    int
20955	page ListVpnSiteLinksResultPage
20956}
20957
20958// NextWithContext advances to the next value.  If there was an error making
20959// the request the iterator does not advance and the error is returned.
20960func (iter *ListVpnSiteLinksResultIterator) NextWithContext(ctx context.Context) (err error) {
20961	if tracing.IsEnabled() {
20962		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultIterator.NextWithContext")
20963		defer func() {
20964			sc := -1
20965			if iter.Response().Response.Response != nil {
20966				sc = iter.Response().Response.Response.StatusCode
20967			}
20968			tracing.EndSpan(ctx, sc, err)
20969		}()
20970	}
20971	iter.i++
20972	if iter.i < len(iter.page.Values()) {
20973		return nil
20974	}
20975	err = iter.page.NextWithContext(ctx)
20976	if err != nil {
20977		iter.i--
20978		return err
20979	}
20980	iter.i = 0
20981	return nil
20982}
20983
20984// Next advances to the next value.  If there was an error making
20985// the request the iterator does not advance and the error is returned.
20986// Deprecated: Use NextWithContext() instead.
20987func (iter *ListVpnSiteLinksResultIterator) Next() error {
20988	return iter.NextWithContext(context.Background())
20989}
20990
20991// NotDone returns true if the enumeration should be started or is not yet complete.
20992func (iter ListVpnSiteLinksResultIterator) NotDone() bool {
20993	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20994}
20995
20996// Response returns the raw server response from the last page request.
20997func (iter ListVpnSiteLinksResultIterator) Response() ListVpnSiteLinksResult {
20998	return iter.page.Response()
20999}
21000
21001// Value returns the current value or a zero-initialized value if the
21002// iterator has advanced beyond the end of the collection.
21003func (iter ListVpnSiteLinksResultIterator) Value() VpnSiteLink {
21004	if !iter.page.NotDone() {
21005		return VpnSiteLink{}
21006	}
21007	return iter.page.Values()[iter.i]
21008}
21009
21010// Creates a new instance of the ListVpnSiteLinksResultIterator type.
21011func NewListVpnSiteLinksResultIterator(page ListVpnSiteLinksResultPage) ListVpnSiteLinksResultIterator {
21012	return ListVpnSiteLinksResultIterator{page: page}
21013}
21014
21015// IsEmpty returns true if the ListResult contains no values.
21016func (lvslr ListVpnSiteLinksResult) IsEmpty() bool {
21017	return lvslr.Value == nil || len(*lvslr.Value) == 0
21018}
21019
21020// hasNextLink returns true if the NextLink is not empty.
21021func (lvslr ListVpnSiteLinksResult) hasNextLink() bool {
21022	return lvslr.NextLink != nil && len(*lvslr.NextLink) != 0
21023}
21024
21025// listVpnSiteLinksResultPreparer prepares a request to retrieve the next set of results.
21026// It returns nil if no more results exist.
21027func (lvslr ListVpnSiteLinksResult) listVpnSiteLinksResultPreparer(ctx context.Context) (*http.Request, error) {
21028	if !lvslr.hasNextLink() {
21029		return nil, nil
21030	}
21031	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21032		autorest.AsJSON(),
21033		autorest.AsGet(),
21034		autorest.WithBaseURL(to.String(lvslr.NextLink)))
21035}
21036
21037// ListVpnSiteLinksResultPage contains a page of VpnSiteLink values.
21038type ListVpnSiteLinksResultPage struct {
21039	fn    func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)
21040	lvslr ListVpnSiteLinksResult
21041}
21042
21043// NextWithContext advances to the next page of values.  If there was an error making
21044// the request the page does not advance and the error is returned.
21045func (page *ListVpnSiteLinksResultPage) NextWithContext(ctx context.Context) (err error) {
21046	if tracing.IsEnabled() {
21047		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultPage.NextWithContext")
21048		defer func() {
21049			sc := -1
21050			if page.Response().Response.Response != nil {
21051				sc = page.Response().Response.Response.StatusCode
21052			}
21053			tracing.EndSpan(ctx, sc, err)
21054		}()
21055	}
21056	for {
21057		next, err := page.fn(ctx, page.lvslr)
21058		if err != nil {
21059			return err
21060		}
21061		page.lvslr = next
21062		if !next.hasNextLink() || !next.IsEmpty() {
21063			break
21064		}
21065	}
21066	return nil
21067}
21068
21069// Next advances to the next page of values.  If there was an error making
21070// the request the page does not advance and the error is returned.
21071// Deprecated: Use NextWithContext() instead.
21072func (page *ListVpnSiteLinksResultPage) Next() error {
21073	return page.NextWithContext(context.Background())
21074}
21075
21076// NotDone returns true if the page enumeration should be started or is not yet complete.
21077func (page ListVpnSiteLinksResultPage) NotDone() bool {
21078	return !page.lvslr.IsEmpty()
21079}
21080
21081// Response returns the raw server response from the last page request.
21082func (page ListVpnSiteLinksResultPage) Response() ListVpnSiteLinksResult {
21083	return page.lvslr
21084}
21085
21086// Values returns the slice of values for the current page or nil if there are no values.
21087func (page ListVpnSiteLinksResultPage) Values() []VpnSiteLink {
21088	if page.lvslr.IsEmpty() {
21089		return nil
21090	}
21091	return *page.lvslr.Value
21092}
21093
21094// Creates a new instance of the ListVpnSiteLinksResultPage type.
21095func NewListVpnSiteLinksResultPage(cur ListVpnSiteLinksResult, getNextPage func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)) ListVpnSiteLinksResultPage {
21096	return ListVpnSiteLinksResultPage{
21097		fn:    getNextPage,
21098		lvslr: cur,
21099	}
21100}
21101
21102// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
21103// nextLink to get the next set of results.
21104type ListVpnSitesResult struct {
21105	autorest.Response `json:"-"`
21106	// Value - List of VpnSites.
21107	Value *[]VpnSite `json:"value,omitempty"`
21108	// NextLink - URL to get the next set of operation list results if there are any.
21109	NextLink *string `json:"nextLink,omitempty"`
21110}
21111
21112// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
21113type ListVpnSitesResultIterator struct {
21114	i    int
21115	page ListVpnSitesResultPage
21116}
21117
21118// NextWithContext advances to the next value.  If there was an error making
21119// the request the iterator does not advance and the error is returned.
21120func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
21121	if tracing.IsEnabled() {
21122		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
21123		defer func() {
21124			sc := -1
21125			if iter.Response().Response.Response != nil {
21126				sc = iter.Response().Response.Response.StatusCode
21127			}
21128			tracing.EndSpan(ctx, sc, err)
21129		}()
21130	}
21131	iter.i++
21132	if iter.i < len(iter.page.Values()) {
21133		return nil
21134	}
21135	err = iter.page.NextWithContext(ctx)
21136	if err != nil {
21137		iter.i--
21138		return err
21139	}
21140	iter.i = 0
21141	return nil
21142}
21143
21144// Next advances to the next value.  If there was an error making
21145// the request the iterator does not advance and the error is returned.
21146// Deprecated: Use NextWithContext() instead.
21147func (iter *ListVpnSitesResultIterator) Next() error {
21148	return iter.NextWithContext(context.Background())
21149}
21150
21151// NotDone returns true if the enumeration should be started or is not yet complete.
21152func (iter ListVpnSitesResultIterator) NotDone() bool {
21153	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21154}
21155
21156// Response returns the raw server response from the last page request.
21157func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
21158	return iter.page.Response()
21159}
21160
21161// Value returns the current value or a zero-initialized value if the
21162// iterator has advanced beyond the end of the collection.
21163func (iter ListVpnSitesResultIterator) Value() VpnSite {
21164	if !iter.page.NotDone() {
21165		return VpnSite{}
21166	}
21167	return iter.page.Values()[iter.i]
21168}
21169
21170// Creates a new instance of the ListVpnSitesResultIterator type.
21171func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
21172	return ListVpnSitesResultIterator{page: page}
21173}
21174
21175// IsEmpty returns true if the ListResult contains no values.
21176func (lvsr ListVpnSitesResult) IsEmpty() bool {
21177	return lvsr.Value == nil || len(*lvsr.Value) == 0
21178}
21179
21180// hasNextLink returns true if the NextLink is not empty.
21181func (lvsr ListVpnSitesResult) hasNextLink() bool {
21182	return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
21183}
21184
21185// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
21186// It returns nil if no more results exist.
21187func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
21188	if !lvsr.hasNextLink() {
21189		return nil, nil
21190	}
21191	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21192		autorest.AsJSON(),
21193		autorest.AsGet(),
21194		autorest.WithBaseURL(to.String(lvsr.NextLink)))
21195}
21196
21197// ListVpnSitesResultPage contains a page of VpnSite values.
21198type ListVpnSitesResultPage struct {
21199	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
21200	lvsr ListVpnSitesResult
21201}
21202
21203// NextWithContext advances to the next page of values.  If there was an error making
21204// the request the page does not advance and the error is returned.
21205func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
21206	if tracing.IsEnabled() {
21207		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
21208		defer func() {
21209			sc := -1
21210			if page.Response().Response.Response != nil {
21211				sc = page.Response().Response.Response.StatusCode
21212			}
21213			tracing.EndSpan(ctx, sc, err)
21214		}()
21215	}
21216	for {
21217		next, err := page.fn(ctx, page.lvsr)
21218		if err != nil {
21219			return err
21220		}
21221		page.lvsr = next
21222		if !next.hasNextLink() || !next.IsEmpty() {
21223			break
21224		}
21225	}
21226	return nil
21227}
21228
21229// Next advances to the next page of values.  If there was an error making
21230// the request the page does not advance and the error is returned.
21231// Deprecated: Use NextWithContext() instead.
21232func (page *ListVpnSitesResultPage) Next() error {
21233	return page.NextWithContext(context.Background())
21234}
21235
21236// NotDone returns true if the page enumeration should be started or is not yet complete.
21237func (page ListVpnSitesResultPage) NotDone() bool {
21238	return !page.lvsr.IsEmpty()
21239}
21240
21241// Response returns the raw server response from the last page request.
21242func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
21243	return page.lvsr
21244}
21245
21246// Values returns the slice of values for the current page or nil if there are no values.
21247func (page ListVpnSitesResultPage) Values() []VpnSite {
21248	if page.lvsr.IsEmpty() {
21249		return nil
21250	}
21251	return *page.lvsr.Value
21252}
21253
21254// Creates a new instance of the ListVpnSitesResultPage type.
21255func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
21256	return ListVpnSitesResultPage{
21257		fn:   getNextPage,
21258		lvsr: cur,
21259	}
21260}
21261
21262// LoadBalancer loadBalancer resource.
21263type LoadBalancer struct {
21264	autorest.Response `json:"-"`
21265	// Sku - The load balancer SKU.
21266	Sku *LoadBalancerSku `json:"sku,omitempty"`
21267	// LoadBalancerPropertiesFormat - Properties of load balancer.
21268	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
21269	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21270	Etag *string `json:"etag,omitempty"`
21271	// ID - Resource ID.
21272	ID *string `json:"id,omitempty"`
21273	// Name - READ-ONLY; Resource name.
21274	Name *string `json:"name,omitempty"`
21275	// Type - READ-ONLY; Resource type.
21276	Type *string `json:"type,omitempty"`
21277	// Location - Resource location.
21278	Location *string `json:"location,omitempty"`
21279	// Tags - Resource tags.
21280	Tags map[string]*string `json:"tags"`
21281}
21282
21283// MarshalJSON is the custom marshaler for LoadBalancer.
21284func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
21285	objectMap := make(map[string]interface{})
21286	if lb.Sku != nil {
21287		objectMap["sku"] = lb.Sku
21288	}
21289	if lb.LoadBalancerPropertiesFormat != nil {
21290		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
21291	}
21292	if lb.ID != nil {
21293		objectMap["id"] = lb.ID
21294	}
21295	if lb.Location != nil {
21296		objectMap["location"] = lb.Location
21297	}
21298	if lb.Tags != nil {
21299		objectMap["tags"] = lb.Tags
21300	}
21301	return json.Marshal(objectMap)
21302}
21303
21304// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
21305func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
21306	var m map[string]*json.RawMessage
21307	err := json.Unmarshal(body, &m)
21308	if err != nil {
21309		return err
21310	}
21311	for k, v := range m {
21312		switch k {
21313		case "sku":
21314			if v != nil {
21315				var sku LoadBalancerSku
21316				err = json.Unmarshal(*v, &sku)
21317				if err != nil {
21318					return err
21319				}
21320				lb.Sku = &sku
21321			}
21322		case "properties":
21323			if v != nil {
21324				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
21325				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
21326				if err != nil {
21327					return err
21328				}
21329				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
21330			}
21331		case "etag":
21332			if v != nil {
21333				var etag string
21334				err = json.Unmarshal(*v, &etag)
21335				if err != nil {
21336					return err
21337				}
21338				lb.Etag = &etag
21339			}
21340		case "id":
21341			if v != nil {
21342				var ID string
21343				err = json.Unmarshal(*v, &ID)
21344				if err != nil {
21345					return err
21346				}
21347				lb.ID = &ID
21348			}
21349		case "name":
21350			if v != nil {
21351				var name string
21352				err = json.Unmarshal(*v, &name)
21353				if err != nil {
21354					return err
21355				}
21356				lb.Name = &name
21357			}
21358		case "type":
21359			if v != nil {
21360				var typeVar string
21361				err = json.Unmarshal(*v, &typeVar)
21362				if err != nil {
21363					return err
21364				}
21365				lb.Type = &typeVar
21366			}
21367		case "location":
21368			if v != nil {
21369				var location string
21370				err = json.Unmarshal(*v, &location)
21371				if err != nil {
21372					return err
21373				}
21374				lb.Location = &location
21375			}
21376		case "tags":
21377			if v != nil {
21378				var tags map[string]*string
21379				err = json.Unmarshal(*v, &tags)
21380				if err != nil {
21381					return err
21382				}
21383				lb.Tags = tags
21384			}
21385		}
21386	}
21387
21388	return nil
21389}
21390
21391// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
21392type LoadBalancerBackendAddressPoolListResult struct {
21393	autorest.Response `json:"-"`
21394	// Value - A list of backend address pools in a load balancer.
21395	Value *[]BackendAddressPool `json:"value,omitempty"`
21396	// NextLink - READ-ONLY; The URL to get the next set of results.
21397	NextLink *string `json:"nextLink,omitempty"`
21398}
21399
21400// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
21401func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
21402	objectMap := make(map[string]interface{})
21403	if lbbaplr.Value != nil {
21404		objectMap["value"] = lbbaplr.Value
21405	}
21406	return json.Marshal(objectMap)
21407}
21408
21409// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
21410// BackendAddressPool values.
21411type LoadBalancerBackendAddressPoolListResultIterator struct {
21412	i    int
21413	page LoadBalancerBackendAddressPoolListResultPage
21414}
21415
21416// NextWithContext advances to the next value.  If there was an error making
21417// the request the iterator does not advance and the error is returned.
21418func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
21419	if tracing.IsEnabled() {
21420		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
21421		defer func() {
21422			sc := -1
21423			if iter.Response().Response.Response != nil {
21424				sc = iter.Response().Response.Response.StatusCode
21425			}
21426			tracing.EndSpan(ctx, sc, err)
21427		}()
21428	}
21429	iter.i++
21430	if iter.i < len(iter.page.Values()) {
21431		return nil
21432	}
21433	err = iter.page.NextWithContext(ctx)
21434	if err != nil {
21435		iter.i--
21436		return err
21437	}
21438	iter.i = 0
21439	return nil
21440}
21441
21442// Next advances to the next value.  If there was an error making
21443// the request the iterator does not advance and the error is returned.
21444// Deprecated: Use NextWithContext() instead.
21445func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
21446	return iter.NextWithContext(context.Background())
21447}
21448
21449// NotDone returns true if the enumeration should be started or is not yet complete.
21450func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
21451	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21452}
21453
21454// Response returns the raw server response from the last page request.
21455func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
21456	return iter.page.Response()
21457}
21458
21459// Value returns the current value or a zero-initialized value if the
21460// iterator has advanced beyond the end of the collection.
21461func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
21462	if !iter.page.NotDone() {
21463		return BackendAddressPool{}
21464	}
21465	return iter.page.Values()[iter.i]
21466}
21467
21468// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
21469func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
21470	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
21471}
21472
21473// IsEmpty returns true if the ListResult contains no values.
21474func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
21475	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
21476}
21477
21478// hasNextLink returns true if the NextLink is not empty.
21479func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
21480	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
21481}
21482
21483// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
21484// It returns nil if no more results exist.
21485func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
21486	if !lbbaplr.hasNextLink() {
21487		return nil, nil
21488	}
21489	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21490		autorest.AsJSON(),
21491		autorest.AsGet(),
21492		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
21493}
21494
21495// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
21496type LoadBalancerBackendAddressPoolListResultPage struct {
21497	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
21498	lbbaplr LoadBalancerBackendAddressPoolListResult
21499}
21500
21501// NextWithContext advances to the next page of values.  If there was an error making
21502// the request the page does not advance and the error is returned.
21503func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
21504	if tracing.IsEnabled() {
21505		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
21506		defer func() {
21507			sc := -1
21508			if page.Response().Response.Response != nil {
21509				sc = page.Response().Response.Response.StatusCode
21510			}
21511			tracing.EndSpan(ctx, sc, err)
21512		}()
21513	}
21514	for {
21515		next, err := page.fn(ctx, page.lbbaplr)
21516		if err != nil {
21517			return err
21518		}
21519		page.lbbaplr = next
21520		if !next.hasNextLink() || !next.IsEmpty() {
21521			break
21522		}
21523	}
21524	return nil
21525}
21526
21527// Next advances to the next page of values.  If there was an error making
21528// the request the page does not advance and the error is returned.
21529// Deprecated: Use NextWithContext() instead.
21530func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
21531	return page.NextWithContext(context.Background())
21532}
21533
21534// NotDone returns true if the page enumeration should be started or is not yet complete.
21535func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
21536	return !page.lbbaplr.IsEmpty()
21537}
21538
21539// Response returns the raw server response from the last page request.
21540func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
21541	return page.lbbaplr
21542}
21543
21544// Values returns the slice of values for the current page or nil if there are no values.
21545func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
21546	if page.lbbaplr.IsEmpty() {
21547		return nil
21548	}
21549	return *page.lbbaplr.Value
21550}
21551
21552// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
21553func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
21554	return LoadBalancerBackendAddressPoolListResultPage{
21555		fn:      getNextPage,
21556		lbbaplr: cur,
21557	}
21558}
21559
21560// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
21561type LoadBalancerFrontendIPConfigurationListResult struct {
21562	autorest.Response `json:"-"`
21563	// Value - A list of frontend IP configurations in a load balancer.
21564	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
21565	// NextLink - READ-ONLY; The URL to get the next set of results.
21566	NextLink *string `json:"nextLink,omitempty"`
21567}
21568
21569// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
21570func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
21571	objectMap := make(map[string]interface{})
21572	if lbficlr.Value != nil {
21573		objectMap["value"] = lbficlr.Value
21574	}
21575	return json.Marshal(objectMap)
21576}
21577
21578// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
21579// FrontendIPConfiguration values.
21580type LoadBalancerFrontendIPConfigurationListResultIterator struct {
21581	i    int
21582	page LoadBalancerFrontendIPConfigurationListResultPage
21583}
21584
21585// NextWithContext advances to the next value.  If there was an error making
21586// the request the iterator does not advance and the error is returned.
21587func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
21588	if tracing.IsEnabled() {
21589		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
21590		defer func() {
21591			sc := -1
21592			if iter.Response().Response.Response != nil {
21593				sc = iter.Response().Response.Response.StatusCode
21594			}
21595			tracing.EndSpan(ctx, sc, err)
21596		}()
21597	}
21598	iter.i++
21599	if iter.i < len(iter.page.Values()) {
21600		return nil
21601	}
21602	err = iter.page.NextWithContext(ctx)
21603	if err != nil {
21604		iter.i--
21605		return err
21606	}
21607	iter.i = 0
21608	return nil
21609}
21610
21611// Next advances to the next value.  If there was an error making
21612// the request the iterator does not advance and the error is returned.
21613// Deprecated: Use NextWithContext() instead.
21614func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
21615	return iter.NextWithContext(context.Background())
21616}
21617
21618// NotDone returns true if the enumeration should be started or is not yet complete.
21619func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
21620	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21621}
21622
21623// Response returns the raw server response from the last page request.
21624func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
21625	return iter.page.Response()
21626}
21627
21628// Value returns the current value or a zero-initialized value if the
21629// iterator has advanced beyond the end of the collection.
21630func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
21631	if !iter.page.NotDone() {
21632		return FrontendIPConfiguration{}
21633	}
21634	return iter.page.Values()[iter.i]
21635}
21636
21637// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
21638func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
21639	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
21640}
21641
21642// IsEmpty returns true if the ListResult contains no values.
21643func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
21644	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
21645}
21646
21647// hasNextLink returns true if the NextLink is not empty.
21648func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
21649	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
21650}
21651
21652// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
21653// It returns nil if no more results exist.
21654func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
21655	if !lbficlr.hasNextLink() {
21656		return nil, nil
21657	}
21658	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21659		autorest.AsJSON(),
21660		autorest.AsGet(),
21661		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
21662}
21663
21664// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
21665type LoadBalancerFrontendIPConfigurationListResultPage struct {
21666	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
21667	lbficlr LoadBalancerFrontendIPConfigurationListResult
21668}
21669
21670// NextWithContext advances to the next page of values.  If there was an error making
21671// the request the page does not advance and the error is returned.
21672func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
21673	if tracing.IsEnabled() {
21674		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
21675		defer func() {
21676			sc := -1
21677			if page.Response().Response.Response != nil {
21678				sc = page.Response().Response.Response.StatusCode
21679			}
21680			tracing.EndSpan(ctx, sc, err)
21681		}()
21682	}
21683	for {
21684		next, err := page.fn(ctx, page.lbficlr)
21685		if err != nil {
21686			return err
21687		}
21688		page.lbficlr = next
21689		if !next.hasNextLink() || !next.IsEmpty() {
21690			break
21691		}
21692	}
21693	return nil
21694}
21695
21696// Next advances to the next page of values.  If there was an error making
21697// the request the page does not advance and the error is returned.
21698// Deprecated: Use NextWithContext() instead.
21699func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
21700	return page.NextWithContext(context.Background())
21701}
21702
21703// NotDone returns true if the page enumeration should be started or is not yet complete.
21704func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
21705	return !page.lbficlr.IsEmpty()
21706}
21707
21708// Response returns the raw server response from the last page request.
21709func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
21710	return page.lbficlr
21711}
21712
21713// Values returns the slice of values for the current page or nil if there are no values.
21714func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
21715	if page.lbficlr.IsEmpty() {
21716		return nil
21717	}
21718	return *page.lbficlr.Value
21719}
21720
21721// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
21722func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
21723	return LoadBalancerFrontendIPConfigurationListResultPage{
21724		fn:      getNextPage,
21725		lbficlr: cur,
21726	}
21727}
21728
21729// LoadBalancerListResult response for ListLoadBalancers API service call.
21730type LoadBalancerListResult struct {
21731	autorest.Response `json:"-"`
21732	// Value - A list of load balancers in a resource group.
21733	Value *[]LoadBalancer `json:"value,omitempty"`
21734	// NextLink - READ-ONLY; The URL to get the next set of results.
21735	NextLink *string `json:"nextLink,omitempty"`
21736}
21737
21738// MarshalJSON is the custom marshaler for LoadBalancerListResult.
21739func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
21740	objectMap := make(map[string]interface{})
21741	if lblr.Value != nil {
21742		objectMap["value"] = lblr.Value
21743	}
21744	return json.Marshal(objectMap)
21745}
21746
21747// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
21748type LoadBalancerListResultIterator struct {
21749	i    int
21750	page LoadBalancerListResultPage
21751}
21752
21753// NextWithContext advances to the next value.  If there was an error making
21754// the request the iterator does not advance and the error is returned.
21755func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
21756	if tracing.IsEnabled() {
21757		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
21758		defer func() {
21759			sc := -1
21760			if iter.Response().Response.Response != nil {
21761				sc = iter.Response().Response.Response.StatusCode
21762			}
21763			tracing.EndSpan(ctx, sc, err)
21764		}()
21765	}
21766	iter.i++
21767	if iter.i < len(iter.page.Values()) {
21768		return nil
21769	}
21770	err = iter.page.NextWithContext(ctx)
21771	if err != nil {
21772		iter.i--
21773		return err
21774	}
21775	iter.i = 0
21776	return nil
21777}
21778
21779// Next advances to the next value.  If there was an error making
21780// the request the iterator does not advance and the error is returned.
21781// Deprecated: Use NextWithContext() instead.
21782func (iter *LoadBalancerListResultIterator) Next() error {
21783	return iter.NextWithContext(context.Background())
21784}
21785
21786// NotDone returns true if the enumeration should be started or is not yet complete.
21787func (iter LoadBalancerListResultIterator) NotDone() bool {
21788	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21789}
21790
21791// Response returns the raw server response from the last page request.
21792func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
21793	return iter.page.Response()
21794}
21795
21796// Value returns the current value or a zero-initialized value if the
21797// iterator has advanced beyond the end of the collection.
21798func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
21799	if !iter.page.NotDone() {
21800		return LoadBalancer{}
21801	}
21802	return iter.page.Values()[iter.i]
21803}
21804
21805// Creates a new instance of the LoadBalancerListResultIterator type.
21806func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
21807	return LoadBalancerListResultIterator{page: page}
21808}
21809
21810// IsEmpty returns true if the ListResult contains no values.
21811func (lblr LoadBalancerListResult) IsEmpty() bool {
21812	return lblr.Value == nil || len(*lblr.Value) == 0
21813}
21814
21815// hasNextLink returns true if the NextLink is not empty.
21816func (lblr LoadBalancerListResult) hasNextLink() bool {
21817	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
21818}
21819
21820// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
21821// It returns nil if no more results exist.
21822func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
21823	if !lblr.hasNextLink() {
21824		return nil, nil
21825	}
21826	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21827		autorest.AsJSON(),
21828		autorest.AsGet(),
21829		autorest.WithBaseURL(to.String(lblr.NextLink)))
21830}
21831
21832// LoadBalancerListResultPage contains a page of LoadBalancer values.
21833type LoadBalancerListResultPage struct {
21834	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
21835	lblr LoadBalancerListResult
21836}
21837
21838// NextWithContext advances to the next page of values.  If there was an error making
21839// the request the page does not advance and the error is returned.
21840func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
21841	if tracing.IsEnabled() {
21842		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
21843		defer func() {
21844			sc := -1
21845			if page.Response().Response.Response != nil {
21846				sc = page.Response().Response.Response.StatusCode
21847			}
21848			tracing.EndSpan(ctx, sc, err)
21849		}()
21850	}
21851	for {
21852		next, err := page.fn(ctx, page.lblr)
21853		if err != nil {
21854			return err
21855		}
21856		page.lblr = next
21857		if !next.hasNextLink() || !next.IsEmpty() {
21858			break
21859		}
21860	}
21861	return nil
21862}
21863
21864// Next advances to the next page of values.  If there was an error making
21865// the request the page does not advance and the error is returned.
21866// Deprecated: Use NextWithContext() instead.
21867func (page *LoadBalancerListResultPage) Next() error {
21868	return page.NextWithContext(context.Background())
21869}
21870
21871// NotDone returns true if the page enumeration should be started or is not yet complete.
21872func (page LoadBalancerListResultPage) NotDone() bool {
21873	return !page.lblr.IsEmpty()
21874}
21875
21876// Response returns the raw server response from the last page request.
21877func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
21878	return page.lblr
21879}
21880
21881// Values returns the slice of values for the current page or nil if there are no values.
21882func (page LoadBalancerListResultPage) Values() []LoadBalancer {
21883	if page.lblr.IsEmpty() {
21884		return nil
21885	}
21886	return *page.lblr.Value
21887}
21888
21889// Creates a new instance of the LoadBalancerListResultPage type.
21890func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
21891	return LoadBalancerListResultPage{
21892		fn:   getNextPage,
21893		lblr: cur,
21894	}
21895}
21896
21897// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
21898type LoadBalancerLoadBalancingRuleListResult struct {
21899	autorest.Response `json:"-"`
21900	// Value - A list of load balancing rules in a load balancer.
21901	Value *[]LoadBalancingRule `json:"value,omitempty"`
21902	// NextLink - READ-ONLY; The URL to get the next set of results.
21903	NextLink *string `json:"nextLink,omitempty"`
21904}
21905
21906// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
21907func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
21908	objectMap := make(map[string]interface{})
21909	if lblbrlr.Value != nil {
21910		objectMap["value"] = lblbrlr.Value
21911	}
21912	return json.Marshal(objectMap)
21913}
21914
21915// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
21916// LoadBalancingRule values.
21917type LoadBalancerLoadBalancingRuleListResultIterator struct {
21918	i    int
21919	page LoadBalancerLoadBalancingRuleListResultPage
21920}
21921
21922// NextWithContext advances to the next value.  If there was an error making
21923// the request the iterator does not advance and the error is returned.
21924func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
21925	if tracing.IsEnabled() {
21926		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
21927		defer func() {
21928			sc := -1
21929			if iter.Response().Response.Response != nil {
21930				sc = iter.Response().Response.Response.StatusCode
21931			}
21932			tracing.EndSpan(ctx, sc, err)
21933		}()
21934	}
21935	iter.i++
21936	if iter.i < len(iter.page.Values()) {
21937		return nil
21938	}
21939	err = iter.page.NextWithContext(ctx)
21940	if err != nil {
21941		iter.i--
21942		return err
21943	}
21944	iter.i = 0
21945	return nil
21946}
21947
21948// Next advances to the next value.  If there was an error making
21949// the request the iterator does not advance and the error is returned.
21950// Deprecated: Use NextWithContext() instead.
21951func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
21952	return iter.NextWithContext(context.Background())
21953}
21954
21955// NotDone returns true if the enumeration should be started or is not yet complete.
21956func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
21957	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21958}
21959
21960// Response returns the raw server response from the last page request.
21961func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
21962	return iter.page.Response()
21963}
21964
21965// Value returns the current value or a zero-initialized value if the
21966// iterator has advanced beyond the end of the collection.
21967func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
21968	if !iter.page.NotDone() {
21969		return LoadBalancingRule{}
21970	}
21971	return iter.page.Values()[iter.i]
21972}
21973
21974// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
21975func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
21976	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
21977}
21978
21979// IsEmpty returns true if the ListResult contains no values.
21980func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
21981	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
21982}
21983
21984// hasNextLink returns true if the NextLink is not empty.
21985func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
21986	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
21987}
21988
21989// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
21990// It returns nil if no more results exist.
21991func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
21992	if !lblbrlr.hasNextLink() {
21993		return nil, nil
21994	}
21995	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21996		autorest.AsJSON(),
21997		autorest.AsGet(),
21998		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
21999}
22000
22001// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
22002type LoadBalancerLoadBalancingRuleListResultPage struct {
22003	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
22004	lblbrlr LoadBalancerLoadBalancingRuleListResult
22005}
22006
22007// NextWithContext advances to the next page of values.  If there was an error making
22008// the request the page does not advance and the error is returned.
22009func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
22010	if tracing.IsEnabled() {
22011		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
22012		defer func() {
22013			sc := -1
22014			if page.Response().Response.Response != nil {
22015				sc = page.Response().Response.Response.StatusCode
22016			}
22017			tracing.EndSpan(ctx, sc, err)
22018		}()
22019	}
22020	for {
22021		next, err := page.fn(ctx, page.lblbrlr)
22022		if err != nil {
22023			return err
22024		}
22025		page.lblbrlr = next
22026		if !next.hasNextLink() || !next.IsEmpty() {
22027			break
22028		}
22029	}
22030	return nil
22031}
22032
22033// Next advances to the next page of values.  If there was an error making
22034// the request the page does not advance and the error is returned.
22035// Deprecated: Use NextWithContext() instead.
22036func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
22037	return page.NextWithContext(context.Background())
22038}
22039
22040// NotDone returns true if the page enumeration should be started or is not yet complete.
22041func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
22042	return !page.lblbrlr.IsEmpty()
22043}
22044
22045// Response returns the raw server response from the last page request.
22046func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
22047	return page.lblbrlr
22048}
22049
22050// Values returns the slice of values for the current page or nil if there are no values.
22051func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
22052	if page.lblbrlr.IsEmpty() {
22053		return nil
22054	}
22055	return *page.lblbrlr.Value
22056}
22057
22058// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
22059func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
22060	return LoadBalancerLoadBalancingRuleListResultPage{
22061		fn:      getNextPage,
22062		lblbrlr: cur,
22063	}
22064}
22065
22066// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call.
22067type LoadBalancerOutboundRuleListResult struct {
22068	autorest.Response `json:"-"`
22069	// Value - A list of outbound rules in a load balancer.
22070	Value *[]OutboundRule `json:"value,omitempty"`
22071	// NextLink - READ-ONLY; The URL to get the next set of results.
22072	NextLink *string `json:"nextLink,omitempty"`
22073}
22074
22075// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult.
22076func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) {
22077	objectMap := make(map[string]interface{})
22078	if lborlr.Value != nil {
22079		objectMap["value"] = lborlr.Value
22080	}
22081	return json.Marshal(objectMap)
22082}
22083
22084// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values.
22085type LoadBalancerOutboundRuleListResultIterator struct {
22086	i    int
22087	page LoadBalancerOutboundRuleListResultPage
22088}
22089
22090// NextWithContext advances to the next value.  If there was an error making
22091// the request the iterator does not advance and the error is returned.
22092func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
22093	if tracing.IsEnabled() {
22094		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext")
22095		defer func() {
22096			sc := -1
22097			if iter.Response().Response.Response != nil {
22098				sc = iter.Response().Response.Response.StatusCode
22099			}
22100			tracing.EndSpan(ctx, sc, err)
22101		}()
22102	}
22103	iter.i++
22104	if iter.i < len(iter.page.Values()) {
22105		return nil
22106	}
22107	err = iter.page.NextWithContext(ctx)
22108	if err != nil {
22109		iter.i--
22110		return err
22111	}
22112	iter.i = 0
22113	return nil
22114}
22115
22116// Next advances to the next value.  If there was an error making
22117// the request the iterator does not advance and the error is returned.
22118// Deprecated: Use NextWithContext() instead.
22119func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error {
22120	return iter.NextWithContext(context.Background())
22121}
22122
22123// NotDone returns true if the enumeration should be started or is not yet complete.
22124func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool {
22125	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22126}
22127
22128// Response returns the raw server response from the last page request.
22129func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult {
22130	return iter.page.Response()
22131}
22132
22133// Value returns the current value or a zero-initialized value if the
22134// iterator has advanced beyond the end of the collection.
22135func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule {
22136	if !iter.page.NotDone() {
22137		return OutboundRule{}
22138	}
22139	return iter.page.Values()[iter.i]
22140}
22141
22142// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type.
22143func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator {
22144	return LoadBalancerOutboundRuleListResultIterator{page: page}
22145}
22146
22147// IsEmpty returns true if the ListResult contains no values.
22148func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool {
22149	return lborlr.Value == nil || len(*lborlr.Value) == 0
22150}
22151
22152// hasNextLink returns true if the NextLink is not empty.
22153func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool {
22154	return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0
22155}
22156
22157// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results.
22158// It returns nil if no more results exist.
22159func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
22160	if !lborlr.hasNextLink() {
22161		return nil, nil
22162	}
22163	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22164		autorest.AsJSON(),
22165		autorest.AsGet(),
22166		autorest.WithBaseURL(to.String(lborlr.NextLink)))
22167}
22168
22169// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values.
22170type LoadBalancerOutboundRuleListResultPage struct {
22171	fn     func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)
22172	lborlr LoadBalancerOutboundRuleListResult
22173}
22174
22175// NextWithContext advances to the next page of values.  If there was an error making
22176// the request the page does not advance and the error is returned.
22177func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
22178	if tracing.IsEnabled() {
22179		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext")
22180		defer func() {
22181			sc := -1
22182			if page.Response().Response.Response != nil {
22183				sc = page.Response().Response.Response.StatusCode
22184			}
22185			tracing.EndSpan(ctx, sc, err)
22186		}()
22187	}
22188	for {
22189		next, err := page.fn(ctx, page.lborlr)
22190		if err != nil {
22191			return err
22192		}
22193		page.lborlr = next
22194		if !next.hasNextLink() || !next.IsEmpty() {
22195			break
22196		}
22197	}
22198	return nil
22199}
22200
22201// Next advances to the next page of values.  If there was an error making
22202// the request the page does not advance and the error is returned.
22203// Deprecated: Use NextWithContext() instead.
22204func (page *LoadBalancerOutboundRuleListResultPage) Next() error {
22205	return page.NextWithContext(context.Background())
22206}
22207
22208// NotDone returns true if the page enumeration should be started or is not yet complete.
22209func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool {
22210	return !page.lborlr.IsEmpty()
22211}
22212
22213// Response returns the raw server response from the last page request.
22214func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult {
22215	return page.lborlr
22216}
22217
22218// Values returns the slice of values for the current page or nil if there are no values.
22219func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule {
22220	if page.lborlr.IsEmpty() {
22221		return nil
22222	}
22223	return *page.lborlr.Value
22224}
22225
22226// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type.
22227func NewLoadBalancerOutboundRuleListResultPage(cur LoadBalancerOutboundRuleListResult, getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage {
22228	return LoadBalancerOutboundRuleListResultPage{
22229		fn:     getNextPage,
22230		lborlr: cur,
22231	}
22232}
22233
22234// LoadBalancerProbeListResult response for ListProbe API service call.
22235type LoadBalancerProbeListResult struct {
22236	autorest.Response `json:"-"`
22237	// Value - A list of probes in a load balancer.
22238	Value *[]Probe `json:"value,omitempty"`
22239	// NextLink - READ-ONLY; The URL to get the next set of results.
22240	NextLink *string `json:"nextLink,omitempty"`
22241}
22242
22243// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
22244func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
22245	objectMap := make(map[string]interface{})
22246	if lbplr.Value != nil {
22247		objectMap["value"] = lbplr.Value
22248	}
22249	return json.Marshal(objectMap)
22250}
22251
22252// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
22253type LoadBalancerProbeListResultIterator struct {
22254	i    int
22255	page LoadBalancerProbeListResultPage
22256}
22257
22258// NextWithContext advances to the next value.  If there was an error making
22259// the request the iterator does not advance and the error is returned.
22260func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
22261	if tracing.IsEnabled() {
22262		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
22263		defer func() {
22264			sc := -1
22265			if iter.Response().Response.Response != nil {
22266				sc = iter.Response().Response.Response.StatusCode
22267			}
22268			tracing.EndSpan(ctx, sc, err)
22269		}()
22270	}
22271	iter.i++
22272	if iter.i < len(iter.page.Values()) {
22273		return nil
22274	}
22275	err = iter.page.NextWithContext(ctx)
22276	if err != nil {
22277		iter.i--
22278		return err
22279	}
22280	iter.i = 0
22281	return nil
22282}
22283
22284// Next advances to the next value.  If there was an error making
22285// the request the iterator does not advance and the error is returned.
22286// Deprecated: Use NextWithContext() instead.
22287func (iter *LoadBalancerProbeListResultIterator) Next() error {
22288	return iter.NextWithContext(context.Background())
22289}
22290
22291// NotDone returns true if the enumeration should be started or is not yet complete.
22292func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
22293	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22294}
22295
22296// Response returns the raw server response from the last page request.
22297func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
22298	return iter.page.Response()
22299}
22300
22301// Value returns the current value or a zero-initialized value if the
22302// iterator has advanced beyond the end of the collection.
22303func (iter LoadBalancerProbeListResultIterator) Value() Probe {
22304	if !iter.page.NotDone() {
22305		return Probe{}
22306	}
22307	return iter.page.Values()[iter.i]
22308}
22309
22310// Creates a new instance of the LoadBalancerProbeListResultIterator type.
22311func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
22312	return LoadBalancerProbeListResultIterator{page: page}
22313}
22314
22315// IsEmpty returns true if the ListResult contains no values.
22316func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
22317	return lbplr.Value == nil || len(*lbplr.Value) == 0
22318}
22319
22320// hasNextLink returns true if the NextLink is not empty.
22321func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
22322	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
22323}
22324
22325// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
22326// It returns nil if no more results exist.
22327func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
22328	if !lbplr.hasNextLink() {
22329		return nil, nil
22330	}
22331	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22332		autorest.AsJSON(),
22333		autorest.AsGet(),
22334		autorest.WithBaseURL(to.String(lbplr.NextLink)))
22335}
22336
22337// LoadBalancerProbeListResultPage contains a page of Probe values.
22338type LoadBalancerProbeListResultPage struct {
22339	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
22340	lbplr LoadBalancerProbeListResult
22341}
22342
22343// NextWithContext advances to the next page of values.  If there was an error making
22344// the request the page does not advance and the error is returned.
22345func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
22346	if tracing.IsEnabled() {
22347		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
22348		defer func() {
22349			sc := -1
22350			if page.Response().Response.Response != nil {
22351				sc = page.Response().Response.Response.StatusCode
22352			}
22353			tracing.EndSpan(ctx, sc, err)
22354		}()
22355	}
22356	for {
22357		next, err := page.fn(ctx, page.lbplr)
22358		if err != nil {
22359			return err
22360		}
22361		page.lbplr = next
22362		if !next.hasNextLink() || !next.IsEmpty() {
22363			break
22364		}
22365	}
22366	return nil
22367}
22368
22369// Next advances to the next page of values.  If there was an error making
22370// the request the page does not advance and the error is returned.
22371// Deprecated: Use NextWithContext() instead.
22372func (page *LoadBalancerProbeListResultPage) Next() error {
22373	return page.NextWithContext(context.Background())
22374}
22375
22376// NotDone returns true if the page enumeration should be started or is not yet complete.
22377func (page LoadBalancerProbeListResultPage) NotDone() bool {
22378	return !page.lbplr.IsEmpty()
22379}
22380
22381// Response returns the raw server response from the last page request.
22382func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
22383	return page.lbplr
22384}
22385
22386// Values returns the slice of values for the current page or nil if there are no values.
22387func (page LoadBalancerProbeListResultPage) Values() []Probe {
22388	if page.lbplr.IsEmpty() {
22389		return nil
22390	}
22391	return *page.lbplr.Value
22392}
22393
22394// Creates a new instance of the LoadBalancerProbeListResultPage type.
22395func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
22396	return LoadBalancerProbeListResultPage{
22397		fn:    getNextPage,
22398		lbplr: cur,
22399	}
22400}
22401
22402// LoadBalancerPropertiesFormat properties of the load balancer.
22403type LoadBalancerPropertiesFormat struct {
22404	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer.
22405	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
22406	// BackendAddressPools - Collection of backend address pools used by a load balancer.
22407	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
22408	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning.
22409	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
22410	// Probes - Collection of probe objects used in the load balancer.
22411	Probes *[]Probe `json:"probes,omitempty"`
22412	// 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.
22413	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
22414	// 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.
22415	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
22416	// OutboundRules - The outbound rules.
22417	OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
22418	// ResourceGUID - READ-ONLY; The resource GUID property of the load balancer resource.
22419	ResourceGUID *string `json:"resourceGuid,omitempty"`
22420	// ProvisioningState - READ-ONLY; The provisioning state of the load balancer resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22421	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22422}
22423
22424// MarshalJSON is the custom marshaler for LoadBalancerPropertiesFormat.
22425func (lbpf LoadBalancerPropertiesFormat) MarshalJSON() ([]byte, error) {
22426	objectMap := make(map[string]interface{})
22427	if lbpf.FrontendIPConfigurations != nil {
22428		objectMap["frontendIPConfigurations"] = lbpf.FrontendIPConfigurations
22429	}
22430	if lbpf.BackendAddressPools != nil {
22431		objectMap["backendAddressPools"] = lbpf.BackendAddressPools
22432	}
22433	if lbpf.LoadBalancingRules != nil {
22434		objectMap["loadBalancingRules"] = lbpf.LoadBalancingRules
22435	}
22436	if lbpf.Probes != nil {
22437		objectMap["probes"] = lbpf.Probes
22438	}
22439	if lbpf.InboundNatRules != nil {
22440		objectMap["inboundNatRules"] = lbpf.InboundNatRules
22441	}
22442	if lbpf.InboundNatPools != nil {
22443		objectMap["inboundNatPools"] = lbpf.InboundNatPools
22444	}
22445	if lbpf.OutboundRules != nil {
22446		objectMap["outboundRules"] = lbpf.OutboundRules
22447	}
22448	return json.Marshal(objectMap)
22449}
22450
22451// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22452// long-running operation.
22453type LoadBalancersCreateOrUpdateFuture struct {
22454	azure.FutureAPI
22455	// Result returns the result of the asynchronous operation.
22456	// If the operation has not completed it will return an error.
22457	Result func(LoadBalancersClient) (LoadBalancer, error)
22458}
22459
22460// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22461func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22462	var azFuture azure.Future
22463	if err := json.Unmarshal(body, &azFuture); err != nil {
22464		return err
22465	}
22466	future.FutureAPI = &azFuture
22467	future.Result = future.result
22468	return nil
22469}
22470
22471// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result.
22472func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
22473	var done bool
22474	done, err = future.DoneWithContext(context.Background(), client)
22475	if err != nil {
22476		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22477		return
22478	}
22479	if !done {
22480		lb.Response.Response = future.Response()
22481		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
22482		return
22483	}
22484	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22485	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
22486		lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
22487		if err != nil {
22488			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
22489		}
22490	}
22491	return
22492}
22493
22494// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22495// operation.
22496type LoadBalancersDeleteFuture struct {
22497	azure.FutureAPI
22498	// Result returns the result of the asynchronous operation.
22499	// If the operation has not completed it will return an error.
22500	Result func(LoadBalancersClient) (autorest.Response, error)
22501}
22502
22503// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22504func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error {
22505	var azFuture azure.Future
22506	if err := json.Unmarshal(body, &azFuture); err != nil {
22507		return err
22508	}
22509	future.FutureAPI = &azFuture
22510	future.Result = future.result
22511	return nil
22512}
22513
22514// result is the default implementation for LoadBalancersDeleteFuture.Result.
22515func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) {
22516	var done bool
22517	done, err = future.DoneWithContext(context.Background(), client)
22518	if err != nil {
22519		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
22520		return
22521	}
22522	if !done {
22523		ar.Response = future.Response()
22524		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
22525		return
22526	}
22527	ar.Response = future.Response()
22528	return
22529}
22530
22531// LoadBalancerSku SKU of a load balancer.
22532type LoadBalancerSku struct {
22533	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
22534	Name LoadBalancerSkuName `json:"name,omitempty"`
22535}
22536
22537// LoadBalancingRule a load balancing rule for a load balancer.
22538type LoadBalancingRule struct {
22539	autorest.Response `json:"-"`
22540	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
22541	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
22542	// 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.
22543	Name *string `json:"name,omitempty"`
22544	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22545	Etag *string `json:"etag,omitempty"`
22546	// Type - READ-ONLY; Type of the resource.
22547	Type *string `json:"type,omitempty"`
22548	// ID - Resource ID.
22549	ID *string `json:"id,omitempty"`
22550}
22551
22552// MarshalJSON is the custom marshaler for LoadBalancingRule.
22553func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
22554	objectMap := make(map[string]interface{})
22555	if lbr.LoadBalancingRulePropertiesFormat != nil {
22556		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
22557	}
22558	if lbr.Name != nil {
22559		objectMap["name"] = lbr.Name
22560	}
22561	if lbr.ID != nil {
22562		objectMap["id"] = lbr.ID
22563	}
22564	return json.Marshal(objectMap)
22565}
22566
22567// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
22568func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
22569	var m map[string]*json.RawMessage
22570	err := json.Unmarshal(body, &m)
22571	if err != nil {
22572		return err
22573	}
22574	for k, v := range m {
22575		switch k {
22576		case "properties":
22577			if v != nil {
22578				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
22579				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
22580				if err != nil {
22581					return err
22582				}
22583				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
22584			}
22585		case "name":
22586			if v != nil {
22587				var name string
22588				err = json.Unmarshal(*v, &name)
22589				if err != nil {
22590					return err
22591				}
22592				lbr.Name = &name
22593			}
22594		case "etag":
22595			if v != nil {
22596				var etag string
22597				err = json.Unmarshal(*v, &etag)
22598				if err != nil {
22599					return err
22600				}
22601				lbr.Etag = &etag
22602			}
22603		case "type":
22604			if v != nil {
22605				var typeVar string
22606				err = json.Unmarshal(*v, &typeVar)
22607				if err != nil {
22608					return err
22609				}
22610				lbr.Type = &typeVar
22611			}
22612		case "id":
22613			if v != nil {
22614				var ID string
22615				err = json.Unmarshal(*v, &ID)
22616				if err != nil {
22617					return err
22618				}
22619				lbr.ID = &ID
22620			}
22621		}
22622	}
22623
22624	return nil
22625}
22626
22627// LoadBalancingRulePropertiesFormat properties of the load balancer.
22628type LoadBalancingRulePropertiesFormat struct {
22629	// FrontendIPConfiguration - A reference to frontend IP addresses.
22630	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
22631	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
22632	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
22633	// Probe - The reference to the load balancer probe used by the load balancing rule.
22634	Probe *SubResource `json:"probe,omitempty"`
22635	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
22636	Protocol TransportProtocol `json:"protocol,omitempty"`
22637	// LoadDistribution - The load distribution policy for this rule. Possible values include: 'LoadDistributionDefault', 'LoadDistributionSourceIP', 'LoadDistributionSourceIPProtocol'
22638	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
22639	// 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".
22640	FrontendPort *int32 `json:"frontendPort,omitempty"`
22641	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port".
22642	BackendPort *int32 `json:"backendPort,omitempty"`
22643	// 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.
22644	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
22645	// 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.
22646	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
22647	// 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.
22648	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
22649	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
22650	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
22651	// ProvisioningState - READ-ONLY; The provisioning state of the load balancing rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22652	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22653}
22654
22655// MarshalJSON is the custom marshaler for LoadBalancingRulePropertiesFormat.
22656func (lbrpf LoadBalancingRulePropertiesFormat) MarshalJSON() ([]byte, error) {
22657	objectMap := make(map[string]interface{})
22658	if lbrpf.FrontendIPConfiguration != nil {
22659		objectMap["frontendIPConfiguration"] = lbrpf.FrontendIPConfiguration
22660	}
22661	if lbrpf.BackendAddressPool != nil {
22662		objectMap["backendAddressPool"] = lbrpf.BackendAddressPool
22663	}
22664	if lbrpf.Probe != nil {
22665		objectMap["probe"] = lbrpf.Probe
22666	}
22667	if lbrpf.Protocol != "" {
22668		objectMap["protocol"] = lbrpf.Protocol
22669	}
22670	if lbrpf.LoadDistribution != "" {
22671		objectMap["loadDistribution"] = lbrpf.LoadDistribution
22672	}
22673	if lbrpf.FrontendPort != nil {
22674		objectMap["frontendPort"] = lbrpf.FrontendPort
22675	}
22676	if lbrpf.BackendPort != nil {
22677		objectMap["backendPort"] = lbrpf.BackendPort
22678	}
22679	if lbrpf.IdleTimeoutInMinutes != nil {
22680		objectMap["idleTimeoutInMinutes"] = lbrpf.IdleTimeoutInMinutes
22681	}
22682	if lbrpf.EnableFloatingIP != nil {
22683		objectMap["enableFloatingIP"] = lbrpf.EnableFloatingIP
22684	}
22685	if lbrpf.EnableTCPReset != nil {
22686		objectMap["enableTcpReset"] = lbrpf.EnableTCPReset
22687	}
22688	if lbrpf.DisableOutboundSnat != nil {
22689		objectMap["disableOutboundSnat"] = lbrpf.DisableOutboundSnat
22690	}
22691	return json.Marshal(objectMap)
22692}
22693
22694// LocalNetworkGateway a common class for general resource information.
22695type LocalNetworkGateway struct {
22696	autorest.Response `json:"-"`
22697	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
22698	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
22699	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22700	Etag *string `json:"etag,omitempty"`
22701	// ID - Resource ID.
22702	ID *string `json:"id,omitempty"`
22703	// Name - READ-ONLY; Resource name.
22704	Name *string `json:"name,omitempty"`
22705	// Type - READ-ONLY; Resource type.
22706	Type *string `json:"type,omitempty"`
22707	// Location - Resource location.
22708	Location *string `json:"location,omitempty"`
22709	// Tags - Resource tags.
22710	Tags map[string]*string `json:"tags"`
22711}
22712
22713// MarshalJSON is the custom marshaler for LocalNetworkGateway.
22714func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
22715	objectMap := make(map[string]interface{})
22716	if lng.LocalNetworkGatewayPropertiesFormat != nil {
22717		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
22718	}
22719	if lng.ID != nil {
22720		objectMap["id"] = lng.ID
22721	}
22722	if lng.Location != nil {
22723		objectMap["location"] = lng.Location
22724	}
22725	if lng.Tags != nil {
22726		objectMap["tags"] = lng.Tags
22727	}
22728	return json.Marshal(objectMap)
22729}
22730
22731// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
22732func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
22733	var m map[string]*json.RawMessage
22734	err := json.Unmarshal(body, &m)
22735	if err != nil {
22736		return err
22737	}
22738	for k, v := range m {
22739		switch k {
22740		case "properties":
22741			if v != nil {
22742				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
22743				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
22744				if err != nil {
22745					return err
22746				}
22747				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
22748			}
22749		case "etag":
22750			if v != nil {
22751				var etag string
22752				err = json.Unmarshal(*v, &etag)
22753				if err != nil {
22754					return err
22755				}
22756				lng.Etag = &etag
22757			}
22758		case "id":
22759			if v != nil {
22760				var ID string
22761				err = json.Unmarshal(*v, &ID)
22762				if err != nil {
22763					return err
22764				}
22765				lng.ID = &ID
22766			}
22767		case "name":
22768			if v != nil {
22769				var name string
22770				err = json.Unmarshal(*v, &name)
22771				if err != nil {
22772					return err
22773				}
22774				lng.Name = &name
22775			}
22776		case "type":
22777			if v != nil {
22778				var typeVar string
22779				err = json.Unmarshal(*v, &typeVar)
22780				if err != nil {
22781					return err
22782				}
22783				lng.Type = &typeVar
22784			}
22785		case "location":
22786			if v != nil {
22787				var location string
22788				err = json.Unmarshal(*v, &location)
22789				if err != nil {
22790					return err
22791				}
22792				lng.Location = &location
22793			}
22794		case "tags":
22795			if v != nil {
22796				var tags map[string]*string
22797				err = json.Unmarshal(*v, &tags)
22798				if err != nil {
22799					return err
22800				}
22801				lng.Tags = tags
22802			}
22803		}
22804	}
22805
22806	return nil
22807}
22808
22809// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
22810type LocalNetworkGatewayListResult struct {
22811	autorest.Response `json:"-"`
22812	// Value - A list of local network gateways that exists in a resource group.
22813	Value *[]LocalNetworkGateway `json:"value,omitempty"`
22814	// NextLink - READ-ONLY; The URL to get the next set of results.
22815	NextLink *string `json:"nextLink,omitempty"`
22816}
22817
22818// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
22819func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
22820	objectMap := make(map[string]interface{})
22821	if lnglr.Value != nil {
22822		objectMap["value"] = lnglr.Value
22823	}
22824	return json.Marshal(objectMap)
22825}
22826
22827// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
22828// values.
22829type LocalNetworkGatewayListResultIterator struct {
22830	i    int
22831	page LocalNetworkGatewayListResultPage
22832}
22833
22834// NextWithContext advances to the next value.  If there was an error making
22835// the request the iterator does not advance and the error is returned.
22836func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
22837	if tracing.IsEnabled() {
22838		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
22839		defer func() {
22840			sc := -1
22841			if iter.Response().Response.Response != nil {
22842				sc = iter.Response().Response.Response.StatusCode
22843			}
22844			tracing.EndSpan(ctx, sc, err)
22845		}()
22846	}
22847	iter.i++
22848	if iter.i < len(iter.page.Values()) {
22849		return nil
22850	}
22851	err = iter.page.NextWithContext(ctx)
22852	if err != nil {
22853		iter.i--
22854		return err
22855	}
22856	iter.i = 0
22857	return nil
22858}
22859
22860// Next advances to the next value.  If there was an error making
22861// the request the iterator does not advance and the error is returned.
22862// Deprecated: Use NextWithContext() instead.
22863func (iter *LocalNetworkGatewayListResultIterator) Next() error {
22864	return iter.NextWithContext(context.Background())
22865}
22866
22867// NotDone returns true if the enumeration should be started or is not yet complete.
22868func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
22869	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22870}
22871
22872// Response returns the raw server response from the last page request.
22873func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
22874	return iter.page.Response()
22875}
22876
22877// Value returns the current value or a zero-initialized value if the
22878// iterator has advanced beyond the end of the collection.
22879func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
22880	if !iter.page.NotDone() {
22881		return LocalNetworkGateway{}
22882	}
22883	return iter.page.Values()[iter.i]
22884}
22885
22886// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
22887func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
22888	return LocalNetworkGatewayListResultIterator{page: page}
22889}
22890
22891// IsEmpty returns true if the ListResult contains no values.
22892func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
22893	return lnglr.Value == nil || len(*lnglr.Value) == 0
22894}
22895
22896// hasNextLink returns true if the NextLink is not empty.
22897func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
22898	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
22899}
22900
22901// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
22902// It returns nil if no more results exist.
22903func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
22904	if !lnglr.hasNextLink() {
22905		return nil, nil
22906	}
22907	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22908		autorest.AsJSON(),
22909		autorest.AsGet(),
22910		autorest.WithBaseURL(to.String(lnglr.NextLink)))
22911}
22912
22913// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
22914type LocalNetworkGatewayListResultPage struct {
22915	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
22916	lnglr LocalNetworkGatewayListResult
22917}
22918
22919// NextWithContext advances to the next page of values.  If there was an error making
22920// the request the page does not advance and the error is returned.
22921func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
22922	if tracing.IsEnabled() {
22923		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
22924		defer func() {
22925			sc := -1
22926			if page.Response().Response.Response != nil {
22927				sc = page.Response().Response.Response.StatusCode
22928			}
22929			tracing.EndSpan(ctx, sc, err)
22930		}()
22931	}
22932	for {
22933		next, err := page.fn(ctx, page.lnglr)
22934		if err != nil {
22935			return err
22936		}
22937		page.lnglr = next
22938		if !next.hasNextLink() || !next.IsEmpty() {
22939			break
22940		}
22941	}
22942	return nil
22943}
22944
22945// Next advances to the next page of values.  If there was an error making
22946// the request the page does not advance and the error is returned.
22947// Deprecated: Use NextWithContext() instead.
22948func (page *LocalNetworkGatewayListResultPage) Next() error {
22949	return page.NextWithContext(context.Background())
22950}
22951
22952// NotDone returns true if the page enumeration should be started or is not yet complete.
22953func (page LocalNetworkGatewayListResultPage) NotDone() bool {
22954	return !page.lnglr.IsEmpty()
22955}
22956
22957// Response returns the raw server response from the last page request.
22958func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
22959	return page.lnglr
22960}
22961
22962// Values returns the slice of values for the current page or nil if there are no values.
22963func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
22964	if page.lnglr.IsEmpty() {
22965		return nil
22966	}
22967	return *page.lnglr.Value
22968}
22969
22970// Creates a new instance of the LocalNetworkGatewayListResultPage type.
22971func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
22972	return LocalNetworkGatewayListResultPage{
22973		fn:    getNextPage,
22974		lnglr: cur,
22975	}
22976}
22977
22978// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties.
22979type LocalNetworkGatewayPropertiesFormat struct {
22980	// LocalNetworkAddressSpace - Local network site address space.
22981	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
22982	// GatewayIPAddress - IP address of local network gateway.
22983	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
22984	// Fqdn - FQDN of local network gateway.
22985	Fqdn *string `json:"fqdn,omitempty"`
22986	// BgpSettings - Local network gateway's BGP speaker settings.
22987	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
22988	// ResourceGUID - READ-ONLY; The resource GUID property of the local network gateway resource.
22989	ResourceGUID *string `json:"resourceGuid,omitempty"`
22990	// ProvisioningState - READ-ONLY; The provisioning state of the local network gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22991	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22992}
22993
22994// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
22995func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
22996	objectMap := make(map[string]interface{})
22997	if lngpf.LocalNetworkAddressSpace != nil {
22998		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
22999	}
23000	if lngpf.GatewayIPAddress != nil {
23001		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
23002	}
23003	if lngpf.Fqdn != nil {
23004		objectMap["fqdn"] = lngpf.Fqdn
23005	}
23006	if lngpf.BgpSettings != nil {
23007		objectMap["bgpSettings"] = lngpf.BgpSettings
23008	}
23009	return json.Marshal(objectMap)
23010}
23011
23012// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23013// long-running operation.
23014type LocalNetworkGatewaysCreateOrUpdateFuture struct {
23015	azure.FutureAPI
23016	// Result returns the result of the asynchronous operation.
23017	// If the operation has not completed it will return an error.
23018	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
23019}
23020
23021// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23022func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23023	var azFuture azure.Future
23024	if err := json.Unmarshal(body, &azFuture); err != nil {
23025		return err
23026	}
23027	future.FutureAPI = &azFuture
23028	future.Result = future.result
23029	return nil
23030}
23031
23032// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result.
23033func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
23034	var done bool
23035	done, err = future.DoneWithContext(context.Background(), client)
23036	if err != nil {
23037		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23038		return
23039	}
23040	if !done {
23041		lng.Response.Response = future.Response()
23042		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
23043		return
23044	}
23045	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23046	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
23047		lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
23048		if err != nil {
23049			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
23050		}
23051	}
23052	return
23053}
23054
23055// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
23056// long-running operation.
23057type LocalNetworkGatewaysDeleteFuture struct {
23058	azure.FutureAPI
23059	// Result returns the result of the asynchronous operation.
23060	// If the operation has not completed it will return an error.
23061	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
23062}
23063
23064// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23065func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
23066	var azFuture azure.Future
23067	if err := json.Unmarshal(body, &azFuture); err != nil {
23068		return err
23069	}
23070	future.FutureAPI = &azFuture
23071	future.Result = future.result
23072	return nil
23073}
23074
23075// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result.
23076func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
23077	var done bool
23078	done, err = future.DoneWithContext(context.Background(), client)
23079	if err != nil {
23080		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
23081		return
23082	}
23083	if !done {
23084		ar.Response = future.Response()
23085		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
23086		return
23087	}
23088	ar.Response = future.Response()
23089	return
23090}
23091
23092// LogSpecification description of logging specification.
23093type LogSpecification struct {
23094	// Name - The name of the specification.
23095	Name *string `json:"name,omitempty"`
23096	// DisplayName - The display name of the specification.
23097	DisplayName *string `json:"displayName,omitempty"`
23098	// BlobDuration - Duration of the blob.
23099	BlobDuration *string `json:"blobDuration,omitempty"`
23100}
23101
23102// ManagedRuleGroupOverride defines a managed rule group override setting.
23103type ManagedRuleGroupOverride struct {
23104	// RuleGroupName - The managed rule group to override.
23105	RuleGroupName *string `json:"ruleGroupName,omitempty"`
23106	// Rules - List of rules that will be disabled. If none specified, all rules in the group will be disabled.
23107	Rules *[]ManagedRuleOverride `json:"rules,omitempty"`
23108}
23109
23110// ManagedRuleOverride defines a managed rule group override setting.
23111type ManagedRuleOverride struct {
23112	// RuleID - Identifier for the managed rule.
23113	RuleID *string `json:"ruleId,omitempty"`
23114	// State - The state of the managed rule. Defaults to Disabled if not specified. Possible values include: 'ManagedRuleEnabledStateDisabled'
23115	State ManagedRuleEnabledState `json:"state,omitempty"`
23116}
23117
23118// ManagedRulesDefinition allow to exclude some variable satisfy the condition for the WAF check.
23119type ManagedRulesDefinition struct {
23120	// Exclusions - The Exclusions that are applied on the policy.
23121	Exclusions *[]OwaspCrsExclusionEntry `json:"exclusions,omitempty"`
23122	// ManagedRuleSets - The managed rule sets that are associated with the policy.
23123	ManagedRuleSets *[]ManagedRuleSet `json:"managedRuleSets,omitempty"`
23124}
23125
23126// ManagedRuleSet defines a managed rule set.
23127type ManagedRuleSet struct {
23128	// RuleSetType - Defines the rule set type to use.
23129	RuleSetType *string `json:"ruleSetType,omitempty"`
23130	// RuleSetVersion - Defines the version of the rule set to use.
23131	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
23132	// RuleGroupOverrides - Defines the rule group overrides to apply to the rule set.
23133	RuleGroupOverrides *[]ManagedRuleGroupOverride `json:"ruleGroupOverrides,omitempty"`
23134}
23135
23136// ManagedServiceIdentity identity for the resource.
23137type ManagedServiceIdentity struct {
23138	// PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
23139	PrincipalID *string `json:"principalId,omitempty"`
23140	// TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
23141	TenantID *string `json:"tenantId,omitempty"`
23142	// 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'
23143	Type ResourceIdentityType `json:"type,omitempty"`
23144	// 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}'.
23145	UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
23146}
23147
23148// MarshalJSON is the custom marshaler for ManagedServiceIdentity.
23149func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
23150	objectMap := make(map[string]interface{})
23151	if msi.Type != "" {
23152		objectMap["type"] = msi.Type
23153	}
23154	if msi.UserAssignedIdentities != nil {
23155		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
23156	}
23157	return json.Marshal(objectMap)
23158}
23159
23160// ManagedServiceIdentityUserAssignedIdentitiesValue ...
23161type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
23162	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
23163	PrincipalID *string `json:"principalId,omitempty"`
23164	// ClientID - READ-ONLY; The client id of user assigned identity.
23165	ClientID *string `json:"clientId,omitempty"`
23166}
23167
23168// MarshalJSON is the custom marshaler for ManagedServiceIdentityUserAssignedIdentitiesValue.
23169func (msiAiv ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
23170	objectMap := make(map[string]interface{})
23171	return json.Marshal(objectMap)
23172}
23173
23174// MatchCondition define match conditions.
23175type MatchCondition struct {
23176	// MatchVariables - List of match variables.
23177	MatchVariables *[]MatchVariable `json:"matchVariables,omitempty"`
23178	// Operator - The operator to be matched. Possible values include: 'WebApplicationFirewallOperatorIPMatch', 'WebApplicationFirewallOperatorEqual', 'WebApplicationFirewallOperatorContains', 'WebApplicationFirewallOperatorLessThan', 'WebApplicationFirewallOperatorGreaterThan', 'WebApplicationFirewallOperatorLessThanOrEqual', 'WebApplicationFirewallOperatorGreaterThanOrEqual', 'WebApplicationFirewallOperatorBeginsWith', 'WebApplicationFirewallOperatorEndsWith', 'WebApplicationFirewallOperatorRegex', 'WebApplicationFirewallOperatorGeoMatch'
23179	Operator WebApplicationFirewallOperator `json:"operator,omitempty"`
23180	// NegationConditon - Whether this is negate condition or not.
23181	NegationConditon *bool `json:"negationConditon,omitempty"`
23182	// MatchValues - Match value.
23183	MatchValues *[]string `json:"matchValues,omitempty"`
23184	// Transforms - List of transforms.
23185	Transforms *[]WebApplicationFirewallTransform `json:"transforms,omitempty"`
23186}
23187
23188// MatchedRule matched rule.
23189type MatchedRule struct {
23190	// RuleName - Name of the matched network security rule.
23191	RuleName *string `json:"ruleName,omitempty"`
23192	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
23193	Action *string `json:"action,omitempty"`
23194}
23195
23196// MatchVariable define match variables.
23197type MatchVariable struct {
23198	// VariableName - Match Variable. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestURI', 'RequestHeaders', 'RequestBody', 'RequestCookies'
23199	VariableName WebApplicationFirewallMatchVariable `json:"variableName,omitempty"`
23200	// Selector - The selector of match variable.
23201	Selector *string `json:"selector,omitempty"`
23202}
23203
23204// MetricSpecification description of metrics specification.
23205type MetricSpecification struct {
23206	// Name - The name of the metric.
23207	Name *string `json:"name,omitempty"`
23208	// DisplayName - The display name of the metric.
23209	DisplayName *string `json:"displayName,omitempty"`
23210	// DisplayDescription - The description of the metric.
23211	DisplayDescription *string `json:"displayDescription,omitempty"`
23212	// Unit - Units the metric to be displayed in.
23213	Unit *string `json:"unit,omitempty"`
23214	// AggregationType - The aggregation type.
23215	AggregationType *string `json:"aggregationType,omitempty"`
23216	// Availabilities - List of availability.
23217	Availabilities *[]Availability `json:"availabilities,omitempty"`
23218	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
23219	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
23220	// FillGapWithZero - Whether gaps would be filled with zeros.
23221	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
23222	// MetricFilterPattern - Pattern for the filter of the metric.
23223	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
23224	// Dimensions - List of dimensions.
23225	Dimensions *[]Dimension `json:"dimensions,omitempty"`
23226	// IsInternal - Whether the metric is internal.
23227	IsInternal *bool `json:"isInternal,omitempty"`
23228	// SourceMdmAccount - The source MDM account.
23229	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
23230	// SourceMdmNamespace - The source MDM namespace.
23231	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
23232	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
23233	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
23234}
23235
23236// NatGateway nat Gateway resource.
23237type NatGateway struct {
23238	autorest.Response `json:"-"`
23239	// Sku - The nat gateway SKU.
23240	Sku *NatGatewaySku `json:"sku,omitempty"`
23241	// NatGatewayPropertiesFormat - Nat Gateway properties.
23242	*NatGatewayPropertiesFormat `json:"properties,omitempty"`
23243	// Zones - A list of availability zones denoting the zone in which Nat Gateway should be deployed.
23244	Zones *[]string `json:"zones,omitempty"`
23245	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
23246	Etag *string `json:"etag,omitempty"`
23247	// ID - Resource ID.
23248	ID *string `json:"id,omitempty"`
23249	// Name - READ-ONLY; Resource name.
23250	Name *string `json:"name,omitempty"`
23251	// Type - READ-ONLY; Resource type.
23252	Type *string `json:"type,omitempty"`
23253	// Location - Resource location.
23254	Location *string `json:"location,omitempty"`
23255	// Tags - Resource tags.
23256	Tags map[string]*string `json:"tags"`
23257}
23258
23259// MarshalJSON is the custom marshaler for NatGateway.
23260func (ng NatGateway) MarshalJSON() ([]byte, error) {
23261	objectMap := make(map[string]interface{})
23262	if ng.Sku != nil {
23263		objectMap["sku"] = ng.Sku
23264	}
23265	if ng.NatGatewayPropertiesFormat != nil {
23266		objectMap["properties"] = ng.NatGatewayPropertiesFormat
23267	}
23268	if ng.Zones != nil {
23269		objectMap["zones"] = ng.Zones
23270	}
23271	if ng.ID != nil {
23272		objectMap["id"] = ng.ID
23273	}
23274	if ng.Location != nil {
23275		objectMap["location"] = ng.Location
23276	}
23277	if ng.Tags != nil {
23278		objectMap["tags"] = ng.Tags
23279	}
23280	return json.Marshal(objectMap)
23281}
23282
23283// UnmarshalJSON is the custom unmarshaler for NatGateway struct.
23284func (ng *NatGateway) UnmarshalJSON(body []byte) error {
23285	var m map[string]*json.RawMessage
23286	err := json.Unmarshal(body, &m)
23287	if err != nil {
23288		return err
23289	}
23290	for k, v := range m {
23291		switch k {
23292		case "sku":
23293			if v != nil {
23294				var sku NatGatewaySku
23295				err = json.Unmarshal(*v, &sku)
23296				if err != nil {
23297					return err
23298				}
23299				ng.Sku = &sku
23300			}
23301		case "properties":
23302			if v != nil {
23303				var natGatewayPropertiesFormat NatGatewayPropertiesFormat
23304				err = json.Unmarshal(*v, &natGatewayPropertiesFormat)
23305				if err != nil {
23306					return err
23307				}
23308				ng.NatGatewayPropertiesFormat = &natGatewayPropertiesFormat
23309			}
23310		case "zones":
23311			if v != nil {
23312				var zones []string
23313				err = json.Unmarshal(*v, &zones)
23314				if err != nil {
23315					return err
23316				}
23317				ng.Zones = &zones
23318			}
23319		case "etag":
23320			if v != nil {
23321				var etag string
23322				err = json.Unmarshal(*v, &etag)
23323				if err != nil {
23324					return err
23325				}
23326				ng.Etag = &etag
23327			}
23328		case "id":
23329			if v != nil {
23330				var ID string
23331				err = json.Unmarshal(*v, &ID)
23332				if err != nil {
23333					return err
23334				}
23335				ng.ID = &ID
23336			}
23337		case "name":
23338			if v != nil {
23339				var name string
23340				err = json.Unmarshal(*v, &name)
23341				if err != nil {
23342					return err
23343				}
23344				ng.Name = &name
23345			}
23346		case "type":
23347			if v != nil {
23348				var typeVar string
23349				err = json.Unmarshal(*v, &typeVar)
23350				if err != nil {
23351					return err
23352				}
23353				ng.Type = &typeVar
23354			}
23355		case "location":
23356			if v != nil {
23357				var location string
23358				err = json.Unmarshal(*v, &location)
23359				if err != nil {
23360					return err
23361				}
23362				ng.Location = &location
23363			}
23364		case "tags":
23365			if v != nil {
23366				var tags map[string]*string
23367				err = json.Unmarshal(*v, &tags)
23368				if err != nil {
23369					return err
23370				}
23371				ng.Tags = tags
23372			}
23373		}
23374	}
23375
23376	return nil
23377}
23378
23379// NatGatewayListResult response for ListNatGateways API service call.
23380type NatGatewayListResult struct {
23381	autorest.Response `json:"-"`
23382	// Value - A list of Nat Gateways that exists in a resource group.
23383	Value *[]NatGateway `json:"value,omitempty"`
23384	// NextLink - The URL to get the next set of results.
23385	NextLink *string `json:"nextLink,omitempty"`
23386}
23387
23388// NatGatewayListResultIterator provides access to a complete listing of NatGateway values.
23389type NatGatewayListResultIterator struct {
23390	i    int
23391	page NatGatewayListResultPage
23392}
23393
23394// NextWithContext advances to the next value.  If there was an error making
23395// the request the iterator does not advance and the error is returned.
23396func (iter *NatGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
23397	if tracing.IsEnabled() {
23398		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultIterator.NextWithContext")
23399		defer func() {
23400			sc := -1
23401			if iter.Response().Response.Response != nil {
23402				sc = iter.Response().Response.Response.StatusCode
23403			}
23404			tracing.EndSpan(ctx, sc, err)
23405		}()
23406	}
23407	iter.i++
23408	if iter.i < len(iter.page.Values()) {
23409		return nil
23410	}
23411	err = iter.page.NextWithContext(ctx)
23412	if err != nil {
23413		iter.i--
23414		return err
23415	}
23416	iter.i = 0
23417	return nil
23418}
23419
23420// Next advances to the next value.  If there was an error making
23421// the request the iterator does not advance and the error is returned.
23422// Deprecated: Use NextWithContext() instead.
23423func (iter *NatGatewayListResultIterator) Next() error {
23424	return iter.NextWithContext(context.Background())
23425}
23426
23427// NotDone returns true if the enumeration should be started or is not yet complete.
23428func (iter NatGatewayListResultIterator) NotDone() bool {
23429	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23430}
23431
23432// Response returns the raw server response from the last page request.
23433func (iter NatGatewayListResultIterator) Response() NatGatewayListResult {
23434	return iter.page.Response()
23435}
23436
23437// Value returns the current value or a zero-initialized value if the
23438// iterator has advanced beyond the end of the collection.
23439func (iter NatGatewayListResultIterator) Value() NatGateway {
23440	if !iter.page.NotDone() {
23441		return NatGateway{}
23442	}
23443	return iter.page.Values()[iter.i]
23444}
23445
23446// Creates a new instance of the NatGatewayListResultIterator type.
23447func NewNatGatewayListResultIterator(page NatGatewayListResultPage) NatGatewayListResultIterator {
23448	return NatGatewayListResultIterator{page: page}
23449}
23450
23451// IsEmpty returns true if the ListResult contains no values.
23452func (nglr NatGatewayListResult) IsEmpty() bool {
23453	return nglr.Value == nil || len(*nglr.Value) == 0
23454}
23455
23456// hasNextLink returns true if the NextLink is not empty.
23457func (nglr NatGatewayListResult) hasNextLink() bool {
23458	return nglr.NextLink != nil && len(*nglr.NextLink) != 0
23459}
23460
23461// natGatewayListResultPreparer prepares a request to retrieve the next set of results.
23462// It returns nil if no more results exist.
23463func (nglr NatGatewayListResult) natGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
23464	if !nglr.hasNextLink() {
23465		return nil, nil
23466	}
23467	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23468		autorest.AsJSON(),
23469		autorest.AsGet(),
23470		autorest.WithBaseURL(to.String(nglr.NextLink)))
23471}
23472
23473// NatGatewayListResultPage contains a page of NatGateway values.
23474type NatGatewayListResultPage struct {
23475	fn   func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)
23476	nglr NatGatewayListResult
23477}
23478
23479// NextWithContext advances to the next page of values.  If there was an error making
23480// the request the page does not advance and the error is returned.
23481func (page *NatGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
23482	if tracing.IsEnabled() {
23483		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultPage.NextWithContext")
23484		defer func() {
23485			sc := -1
23486			if page.Response().Response.Response != nil {
23487				sc = page.Response().Response.Response.StatusCode
23488			}
23489			tracing.EndSpan(ctx, sc, err)
23490		}()
23491	}
23492	for {
23493		next, err := page.fn(ctx, page.nglr)
23494		if err != nil {
23495			return err
23496		}
23497		page.nglr = next
23498		if !next.hasNextLink() || !next.IsEmpty() {
23499			break
23500		}
23501	}
23502	return nil
23503}
23504
23505// Next advances to the next page of values.  If there was an error making
23506// the request the page does not advance and the error is returned.
23507// Deprecated: Use NextWithContext() instead.
23508func (page *NatGatewayListResultPage) Next() error {
23509	return page.NextWithContext(context.Background())
23510}
23511
23512// NotDone returns true if the page enumeration should be started or is not yet complete.
23513func (page NatGatewayListResultPage) NotDone() bool {
23514	return !page.nglr.IsEmpty()
23515}
23516
23517// Response returns the raw server response from the last page request.
23518func (page NatGatewayListResultPage) Response() NatGatewayListResult {
23519	return page.nglr
23520}
23521
23522// Values returns the slice of values for the current page or nil if there are no values.
23523func (page NatGatewayListResultPage) Values() []NatGateway {
23524	if page.nglr.IsEmpty() {
23525		return nil
23526	}
23527	return *page.nglr.Value
23528}
23529
23530// Creates a new instance of the NatGatewayListResultPage type.
23531func NewNatGatewayListResultPage(cur NatGatewayListResult, getNextPage func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)) NatGatewayListResultPage {
23532	return NatGatewayListResultPage{
23533		fn:   getNextPage,
23534		nglr: cur,
23535	}
23536}
23537
23538// NatGatewayPropertiesFormat nat Gateway properties.
23539type NatGatewayPropertiesFormat struct {
23540	// IdleTimeoutInMinutes - The idle timeout of the nat gateway.
23541	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
23542	// PublicIPAddresses - An array of public ip addresses associated with the nat gateway resource.
23543	PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"`
23544	// PublicIPPrefixes - An array of public ip prefixes associated with the nat gateway resource.
23545	PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"`
23546	// Subnets - READ-ONLY; An array of references to the subnets using this nat gateway resource.
23547	Subnets *[]SubResource `json:"subnets,omitempty"`
23548	// ResourceGUID - READ-ONLY; The resource GUID property of the NAT gateway resource.
23549	ResourceGUID *string `json:"resourceGuid,omitempty"`
23550	// ProvisioningState - READ-ONLY; The provisioning state of the NAT gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
23551	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
23552}
23553
23554// MarshalJSON is the custom marshaler for NatGatewayPropertiesFormat.
23555func (ngpf NatGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
23556	objectMap := make(map[string]interface{})
23557	if ngpf.IdleTimeoutInMinutes != nil {
23558		objectMap["idleTimeoutInMinutes"] = ngpf.IdleTimeoutInMinutes
23559	}
23560	if ngpf.PublicIPAddresses != nil {
23561		objectMap["publicIpAddresses"] = ngpf.PublicIPAddresses
23562	}
23563	if ngpf.PublicIPPrefixes != nil {
23564		objectMap["publicIpPrefixes"] = ngpf.PublicIPPrefixes
23565	}
23566	return json.Marshal(objectMap)
23567}
23568
23569// NatGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23570// long-running operation.
23571type NatGatewaysCreateOrUpdateFuture struct {
23572	azure.FutureAPI
23573	// Result returns the result of the asynchronous operation.
23574	// If the operation has not completed it will return an error.
23575	Result func(NatGatewaysClient) (NatGateway, error)
23576}
23577
23578// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23579func (future *NatGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23580	var azFuture azure.Future
23581	if err := json.Unmarshal(body, &azFuture); err != nil {
23582		return err
23583	}
23584	future.FutureAPI = &azFuture
23585	future.Result = future.result
23586	return nil
23587}
23588
23589// result is the default implementation for NatGatewaysCreateOrUpdateFuture.Result.
23590func (future *NatGatewaysCreateOrUpdateFuture) result(client NatGatewaysClient) (ng NatGateway, err error) {
23591	var done bool
23592	done, err = future.DoneWithContext(context.Background(), client)
23593	if err != nil {
23594		err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23595		return
23596	}
23597	if !done {
23598		ng.Response.Response = future.Response()
23599		err = azure.NewAsyncOpIncompleteError("network.NatGatewaysCreateOrUpdateFuture")
23600		return
23601	}
23602	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23603	if ng.Response.Response, err = future.GetResult(sender); err == nil && ng.Response.Response.StatusCode != http.StatusNoContent {
23604		ng, err = client.CreateOrUpdateResponder(ng.Response.Response)
23605		if err != nil {
23606			err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", ng.Response.Response, "Failure responding to request")
23607		}
23608	}
23609	return
23610}
23611
23612// NatGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23613// operation.
23614type NatGatewaysDeleteFuture struct {
23615	azure.FutureAPI
23616	// Result returns the result of the asynchronous operation.
23617	// If the operation has not completed it will return an error.
23618	Result func(NatGatewaysClient) (autorest.Response, error)
23619}
23620
23621// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23622func (future *NatGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
23623	var azFuture azure.Future
23624	if err := json.Unmarshal(body, &azFuture); err != nil {
23625		return err
23626	}
23627	future.FutureAPI = &azFuture
23628	future.Result = future.result
23629	return nil
23630}
23631
23632// result is the default implementation for NatGatewaysDeleteFuture.Result.
23633func (future *NatGatewaysDeleteFuture) result(client NatGatewaysClient) (ar autorest.Response, err error) {
23634	var done bool
23635	done, err = future.DoneWithContext(context.Background(), client)
23636	if err != nil {
23637		err = autorest.NewErrorWithError(err, "network.NatGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
23638		return
23639	}
23640	if !done {
23641		ar.Response = future.Response()
23642		err = azure.NewAsyncOpIncompleteError("network.NatGatewaysDeleteFuture")
23643		return
23644	}
23645	ar.Response = future.Response()
23646	return
23647}
23648
23649// NatGatewaySku SKU of nat gateway.
23650type NatGatewaySku struct {
23651	// Name - Name of Nat Gateway SKU. Possible values include: 'NatGatewaySkuNameStandard'
23652	Name NatGatewaySkuName `json:"name,omitempty"`
23653}
23654
23655// NatRuleCondition rule condition of type nat.
23656type NatRuleCondition struct {
23657	// IPProtocols - Array of FirewallPolicyRuleConditionNetworkProtocols.
23658	IPProtocols *[]FirewallPolicyRuleConditionNetworkProtocol `json:"ipProtocols,omitempty"`
23659	// SourceAddresses - List of source IP addresses for this rule.
23660	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
23661	// DestinationAddresses - List of destination IP addresses or Service Tags.
23662	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
23663	// DestinationPorts - List of destination ports.
23664	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
23665	// SourceIPGroups - List of source IpGroups for this rule.
23666	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
23667	// Name - Name of the rule condition.
23668	Name *string `json:"name,omitempty"`
23669	// Description - Description of the rule condition.
23670	Description *string `json:"description,omitempty"`
23671	// RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNatRuleCondition', 'RuleConditionTypeNetworkRuleCondition'
23672	RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"`
23673}
23674
23675// MarshalJSON is the custom marshaler for NatRuleCondition.
23676func (nrc NatRuleCondition) MarshalJSON() ([]byte, error) {
23677	nrc.RuleConditionType = RuleConditionTypeNatRuleCondition
23678	objectMap := make(map[string]interface{})
23679	if nrc.IPProtocols != nil {
23680		objectMap["ipProtocols"] = nrc.IPProtocols
23681	}
23682	if nrc.SourceAddresses != nil {
23683		objectMap["sourceAddresses"] = nrc.SourceAddresses
23684	}
23685	if nrc.DestinationAddresses != nil {
23686		objectMap["destinationAddresses"] = nrc.DestinationAddresses
23687	}
23688	if nrc.DestinationPorts != nil {
23689		objectMap["destinationPorts"] = nrc.DestinationPorts
23690	}
23691	if nrc.SourceIPGroups != nil {
23692		objectMap["sourceIpGroups"] = nrc.SourceIPGroups
23693	}
23694	if nrc.Name != nil {
23695		objectMap["name"] = nrc.Name
23696	}
23697	if nrc.Description != nil {
23698		objectMap["description"] = nrc.Description
23699	}
23700	if nrc.RuleConditionType != "" {
23701		objectMap["ruleConditionType"] = nrc.RuleConditionType
23702	}
23703	return json.Marshal(objectMap)
23704}
23705
23706// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for NatRuleCondition.
23707func (nrc NatRuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) {
23708	return nil, false
23709}
23710
23711// AsNatRuleCondition is the BasicFirewallPolicyRuleCondition implementation for NatRuleCondition.
23712func (nrc NatRuleCondition) AsNatRuleCondition() (*NatRuleCondition, bool) {
23713	return &nrc, true
23714}
23715
23716// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for NatRuleCondition.
23717func (nrc NatRuleCondition) AsRuleCondition() (*RuleCondition, bool) {
23718	return nil, false
23719}
23720
23721// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for NatRuleCondition.
23722func (nrc NatRuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) {
23723	return nil, false
23724}
23725
23726// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for NatRuleCondition.
23727func (nrc NatRuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) {
23728	return &nrc, true
23729}
23730
23731// NextHopParameters parameters that define the source and destination endpoint.
23732type NextHopParameters struct {
23733	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
23734	TargetResourceID *string `json:"targetResourceId,omitempty"`
23735	// SourceIPAddress - The source IP address.
23736	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
23737	// DestinationIPAddress - The destination IP address.
23738	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
23739	// 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).
23740	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
23741}
23742
23743// NextHopResult the information about next hop from the specified VM.
23744type NextHopResult struct {
23745	autorest.Response `json:"-"`
23746	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
23747	NextHopType NextHopType `json:"nextHopType,omitempty"`
23748	// NextHopIPAddress - Next hop IP Address.
23749	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
23750	// 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'.
23751	RouteTableID *string `json:"routeTableId,omitempty"`
23752}
23753
23754// Operation network REST API operation definition.
23755type Operation struct {
23756	// Name - Operation name: {provider}/{resource}/{operation}.
23757	Name *string `json:"name,omitempty"`
23758	// Display - Display metadata associated with the operation.
23759	Display *OperationDisplay `json:"display,omitempty"`
23760	// Origin - Origin of the operation.
23761	Origin *string `json:"origin,omitempty"`
23762	// OperationPropertiesFormat - Operation properties format.
23763	*OperationPropertiesFormat `json:"properties,omitempty"`
23764}
23765
23766// MarshalJSON is the custom marshaler for Operation.
23767func (o Operation) MarshalJSON() ([]byte, error) {
23768	objectMap := make(map[string]interface{})
23769	if o.Name != nil {
23770		objectMap["name"] = o.Name
23771	}
23772	if o.Display != nil {
23773		objectMap["display"] = o.Display
23774	}
23775	if o.Origin != nil {
23776		objectMap["origin"] = o.Origin
23777	}
23778	if o.OperationPropertiesFormat != nil {
23779		objectMap["properties"] = o.OperationPropertiesFormat
23780	}
23781	return json.Marshal(objectMap)
23782}
23783
23784// UnmarshalJSON is the custom unmarshaler for Operation struct.
23785func (o *Operation) UnmarshalJSON(body []byte) error {
23786	var m map[string]*json.RawMessage
23787	err := json.Unmarshal(body, &m)
23788	if err != nil {
23789		return err
23790	}
23791	for k, v := range m {
23792		switch k {
23793		case "name":
23794			if v != nil {
23795				var name string
23796				err = json.Unmarshal(*v, &name)
23797				if err != nil {
23798					return err
23799				}
23800				o.Name = &name
23801			}
23802		case "display":
23803			if v != nil {
23804				var display OperationDisplay
23805				err = json.Unmarshal(*v, &display)
23806				if err != nil {
23807					return err
23808				}
23809				o.Display = &display
23810			}
23811		case "origin":
23812			if v != nil {
23813				var origin string
23814				err = json.Unmarshal(*v, &origin)
23815				if err != nil {
23816					return err
23817				}
23818				o.Origin = &origin
23819			}
23820		case "properties":
23821			if v != nil {
23822				var operationPropertiesFormat OperationPropertiesFormat
23823				err = json.Unmarshal(*v, &operationPropertiesFormat)
23824				if err != nil {
23825					return err
23826				}
23827				o.OperationPropertiesFormat = &operationPropertiesFormat
23828			}
23829		}
23830	}
23831
23832	return nil
23833}
23834
23835// OperationDisplay display metadata associated with the operation.
23836type OperationDisplay struct {
23837	// Provider - Service provider: Microsoft Network.
23838	Provider *string `json:"provider,omitempty"`
23839	// Resource - Resource on which the operation is performed.
23840	Resource *string `json:"resource,omitempty"`
23841	// Operation - Type of the operation: get, read, delete, etc.
23842	Operation *string `json:"operation,omitempty"`
23843	// Description - Description of the operation.
23844	Description *string `json:"description,omitempty"`
23845}
23846
23847// OperationListResult result of the request to list Network operations. It contains a list of operations
23848// and a URL link to get the next set of results.
23849type OperationListResult struct {
23850	autorest.Response `json:"-"`
23851	// Value - List of Network operations supported by the Network resource provider.
23852	Value *[]Operation `json:"value,omitempty"`
23853	// NextLink - URL to get the next set of operation list results if there are any.
23854	NextLink *string `json:"nextLink,omitempty"`
23855}
23856
23857// OperationListResultIterator provides access to a complete listing of Operation values.
23858type OperationListResultIterator struct {
23859	i    int
23860	page OperationListResultPage
23861}
23862
23863// NextWithContext advances to the next value.  If there was an error making
23864// the request the iterator does not advance and the error is returned.
23865func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
23866	if tracing.IsEnabled() {
23867		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
23868		defer func() {
23869			sc := -1
23870			if iter.Response().Response.Response != nil {
23871				sc = iter.Response().Response.Response.StatusCode
23872			}
23873			tracing.EndSpan(ctx, sc, err)
23874		}()
23875	}
23876	iter.i++
23877	if iter.i < len(iter.page.Values()) {
23878		return nil
23879	}
23880	err = iter.page.NextWithContext(ctx)
23881	if err != nil {
23882		iter.i--
23883		return err
23884	}
23885	iter.i = 0
23886	return nil
23887}
23888
23889// Next advances to the next value.  If there was an error making
23890// the request the iterator does not advance and the error is returned.
23891// Deprecated: Use NextWithContext() instead.
23892func (iter *OperationListResultIterator) Next() error {
23893	return iter.NextWithContext(context.Background())
23894}
23895
23896// NotDone returns true if the enumeration should be started or is not yet complete.
23897func (iter OperationListResultIterator) NotDone() bool {
23898	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23899}
23900
23901// Response returns the raw server response from the last page request.
23902func (iter OperationListResultIterator) Response() OperationListResult {
23903	return iter.page.Response()
23904}
23905
23906// Value returns the current value or a zero-initialized value if the
23907// iterator has advanced beyond the end of the collection.
23908func (iter OperationListResultIterator) Value() Operation {
23909	if !iter.page.NotDone() {
23910		return Operation{}
23911	}
23912	return iter.page.Values()[iter.i]
23913}
23914
23915// Creates a new instance of the OperationListResultIterator type.
23916func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
23917	return OperationListResultIterator{page: page}
23918}
23919
23920// IsEmpty returns true if the ListResult contains no values.
23921func (olr OperationListResult) IsEmpty() bool {
23922	return olr.Value == nil || len(*olr.Value) == 0
23923}
23924
23925// hasNextLink returns true if the NextLink is not empty.
23926func (olr OperationListResult) hasNextLink() bool {
23927	return olr.NextLink != nil && len(*olr.NextLink) != 0
23928}
23929
23930// operationListResultPreparer prepares a request to retrieve the next set of results.
23931// It returns nil if no more results exist.
23932func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
23933	if !olr.hasNextLink() {
23934		return nil, nil
23935	}
23936	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23937		autorest.AsJSON(),
23938		autorest.AsGet(),
23939		autorest.WithBaseURL(to.String(olr.NextLink)))
23940}
23941
23942// OperationListResultPage contains a page of Operation values.
23943type OperationListResultPage struct {
23944	fn  func(context.Context, OperationListResult) (OperationListResult, error)
23945	olr OperationListResult
23946}
23947
23948// NextWithContext advances to the next page of values.  If there was an error making
23949// the request the page does not advance and the error is returned.
23950func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
23951	if tracing.IsEnabled() {
23952		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
23953		defer func() {
23954			sc := -1
23955			if page.Response().Response.Response != nil {
23956				sc = page.Response().Response.Response.StatusCode
23957			}
23958			tracing.EndSpan(ctx, sc, err)
23959		}()
23960	}
23961	for {
23962		next, err := page.fn(ctx, page.olr)
23963		if err != nil {
23964			return err
23965		}
23966		page.olr = next
23967		if !next.hasNextLink() || !next.IsEmpty() {
23968			break
23969		}
23970	}
23971	return nil
23972}
23973
23974// Next advances to the next page of values.  If there was an error making
23975// the request the page does not advance and the error is returned.
23976// Deprecated: Use NextWithContext() instead.
23977func (page *OperationListResultPage) Next() error {
23978	return page.NextWithContext(context.Background())
23979}
23980
23981// NotDone returns true if the page enumeration should be started or is not yet complete.
23982func (page OperationListResultPage) NotDone() bool {
23983	return !page.olr.IsEmpty()
23984}
23985
23986// Response returns the raw server response from the last page request.
23987func (page OperationListResultPage) Response() OperationListResult {
23988	return page.olr
23989}
23990
23991// Values returns the slice of values for the current page or nil if there are no values.
23992func (page OperationListResultPage) Values() []Operation {
23993	if page.olr.IsEmpty() {
23994		return nil
23995	}
23996	return *page.olr.Value
23997}
23998
23999// Creates a new instance of the OperationListResultPage type.
24000func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
24001	return OperationListResultPage{
24002		fn:  getNextPage,
24003		olr: cur,
24004	}
24005}
24006
24007// OperationPropertiesFormat description of operation properties format.
24008type OperationPropertiesFormat struct {
24009	// ServiceSpecification - Specification of the service.
24010	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
24011}
24012
24013// OperationPropertiesFormatServiceSpecification specification of the service.
24014type OperationPropertiesFormatServiceSpecification struct {
24015	// MetricSpecifications - Operation service specification.
24016	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
24017	// LogSpecifications - Operation log specification.
24018	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
24019}
24020
24021// OutboundRule outbound rule of the load balancer.
24022type OutboundRule struct {
24023	autorest.Response `json:"-"`
24024	// OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
24025	*OutboundRulePropertiesFormat `json:"properties,omitempty"`
24026	// 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.
24027	Name *string `json:"name,omitempty"`
24028	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24029	Etag *string `json:"etag,omitempty"`
24030	// Type - READ-ONLY; Type of the resource.
24031	Type *string `json:"type,omitempty"`
24032	// ID - Resource ID.
24033	ID *string `json:"id,omitempty"`
24034}
24035
24036// MarshalJSON is the custom marshaler for OutboundRule.
24037func (or OutboundRule) MarshalJSON() ([]byte, error) {
24038	objectMap := make(map[string]interface{})
24039	if or.OutboundRulePropertiesFormat != nil {
24040		objectMap["properties"] = or.OutboundRulePropertiesFormat
24041	}
24042	if or.Name != nil {
24043		objectMap["name"] = or.Name
24044	}
24045	if or.ID != nil {
24046		objectMap["id"] = or.ID
24047	}
24048	return json.Marshal(objectMap)
24049}
24050
24051// UnmarshalJSON is the custom unmarshaler for OutboundRule struct.
24052func (or *OutboundRule) UnmarshalJSON(body []byte) error {
24053	var m map[string]*json.RawMessage
24054	err := json.Unmarshal(body, &m)
24055	if err != nil {
24056		return err
24057	}
24058	for k, v := range m {
24059		switch k {
24060		case "properties":
24061			if v != nil {
24062				var outboundRulePropertiesFormat OutboundRulePropertiesFormat
24063				err = json.Unmarshal(*v, &outboundRulePropertiesFormat)
24064				if err != nil {
24065					return err
24066				}
24067				or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat
24068			}
24069		case "name":
24070			if v != nil {
24071				var name string
24072				err = json.Unmarshal(*v, &name)
24073				if err != nil {
24074					return err
24075				}
24076				or.Name = &name
24077			}
24078		case "etag":
24079			if v != nil {
24080				var etag string
24081				err = json.Unmarshal(*v, &etag)
24082				if err != nil {
24083					return err
24084				}
24085				or.Etag = &etag
24086			}
24087		case "type":
24088			if v != nil {
24089				var typeVar string
24090				err = json.Unmarshal(*v, &typeVar)
24091				if err != nil {
24092					return err
24093				}
24094				or.Type = &typeVar
24095			}
24096		case "id":
24097			if v != nil {
24098				var ID string
24099				err = json.Unmarshal(*v, &ID)
24100				if err != nil {
24101					return err
24102				}
24103				or.ID = &ID
24104			}
24105		}
24106	}
24107
24108	return nil
24109}
24110
24111// OutboundRulePropertiesFormat outbound rule of the load balancer.
24112type OutboundRulePropertiesFormat struct {
24113	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
24114	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
24115	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
24116	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
24117	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
24118	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
24119	// ProvisioningState - READ-ONLY; The provisioning state of the outbound rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24120	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24121	// Protocol - The protocol for the outbound rule in load balancer. Possible values include: 'LoadBalancerOutboundRuleProtocolTCP', 'LoadBalancerOutboundRuleProtocolUDP', 'LoadBalancerOutboundRuleProtocolAll'
24122	Protocol LoadBalancerOutboundRuleProtocol `json:"protocol,omitempty"`
24123	// 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.
24124	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
24125	// IdleTimeoutInMinutes - The timeout for the TCP idle connection.
24126	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
24127}
24128
24129// MarshalJSON is the custom marshaler for OutboundRulePropertiesFormat.
24130func (orpf OutboundRulePropertiesFormat) MarshalJSON() ([]byte, error) {
24131	objectMap := make(map[string]interface{})
24132	if orpf.AllocatedOutboundPorts != nil {
24133		objectMap["allocatedOutboundPorts"] = orpf.AllocatedOutboundPorts
24134	}
24135	if orpf.FrontendIPConfigurations != nil {
24136		objectMap["frontendIPConfigurations"] = orpf.FrontendIPConfigurations
24137	}
24138	if orpf.BackendAddressPool != nil {
24139		objectMap["backendAddressPool"] = orpf.BackendAddressPool
24140	}
24141	if orpf.Protocol != "" {
24142		objectMap["protocol"] = orpf.Protocol
24143	}
24144	if orpf.EnableTCPReset != nil {
24145		objectMap["enableTcpReset"] = orpf.EnableTCPReset
24146	}
24147	if orpf.IdleTimeoutInMinutes != nil {
24148		objectMap["idleTimeoutInMinutes"] = orpf.IdleTimeoutInMinutes
24149	}
24150	return json.Marshal(objectMap)
24151}
24152
24153// OwaspCrsExclusionEntry allow to exclude some variable satisfy the condition for the WAF check.
24154type OwaspCrsExclusionEntry struct {
24155	// MatchVariable - The variable to be excluded. Possible values include: 'RequestHeaderNames', 'RequestCookieNames', 'RequestArgNames'
24156	MatchVariable OwaspCrsExclusionEntryMatchVariable `json:"matchVariable,omitempty"`
24157	// 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'
24158	SelectorMatchOperator OwaspCrsExclusionEntrySelectorMatchOperator `json:"selectorMatchOperator,omitempty"`
24159	// Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
24160	Selector *string `json:"selector,omitempty"`
24161}
24162
24163// P2SConnectionConfiguration p2SConnectionConfiguration Resource.
24164type P2SConnectionConfiguration struct {
24165	// P2SConnectionConfigurationProperties - Properties of the P2S connection configuration.
24166	*P2SConnectionConfigurationProperties `json:"properties,omitempty"`
24167	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
24168	Name *string `json:"name,omitempty"`
24169	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24170	Etag *string `json:"etag,omitempty"`
24171	// ID - Resource ID.
24172	ID *string `json:"id,omitempty"`
24173}
24174
24175// MarshalJSON is the custom marshaler for P2SConnectionConfiguration.
24176func (pcc P2SConnectionConfiguration) MarshalJSON() ([]byte, error) {
24177	objectMap := make(map[string]interface{})
24178	if pcc.P2SConnectionConfigurationProperties != nil {
24179		objectMap["properties"] = pcc.P2SConnectionConfigurationProperties
24180	}
24181	if pcc.Name != nil {
24182		objectMap["name"] = pcc.Name
24183	}
24184	if pcc.ID != nil {
24185		objectMap["id"] = pcc.ID
24186	}
24187	return json.Marshal(objectMap)
24188}
24189
24190// UnmarshalJSON is the custom unmarshaler for P2SConnectionConfiguration struct.
24191func (pcc *P2SConnectionConfiguration) UnmarshalJSON(body []byte) error {
24192	var m map[string]*json.RawMessage
24193	err := json.Unmarshal(body, &m)
24194	if err != nil {
24195		return err
24196	}
24197	for k, v := range m {
24198		switch k {
24199		case "properties":
24200			if v != nil {
24201				var p2SConnectionConfigurationProperties P2SConnectionConfigurationProperties
24202				err = json.Unmarshal(*v, &p2SConnectionConfigurationProperties)
24203				if err != nil {
24204					return err
24205				}
24206				pcc.P2SConnectionConfigurationProperties = &p2SConnectionConfigurationProperties
24207			}
24208		case "name":
24209			if v != nil {
24210				var name string
24211				err = json.Unmarshal(*v, &name)
24212				if err != nil {
24213					return err
24214				}
24215				pcc.Name = &name
24216			}
24217		case "etag":
24218			if v != nil {
24219				var etag string
24220				err = json.Unmarshal(*v, &etag)
24221				if err != nil {
24222					return err
24223				}
24224				pcc.Etag = &etag
24225			}
24226		case "id":
24227			if v != nil {
24228				var ID string
24229				err = json.Unmarshal(*v, &ID)
24230				if err != nil {
24231					return err
24232				}
24233				pcc.ID = &ID
24234			}
24235		}
24236	}
24237
24238	return nil
24239}
24240
24241// P2SConnectionConfigurationProperties parameters for P2SConnectionConfiguration.
24242type P2SConnectionConfigurationProperties struct {
24243	// VpnClientAddressPool - The reference to the address space resource which represents Address space for P2S VpnClient.
24244	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
24245	// ProvisioningState - READ-ONLY; The provisioning state of the P2SConnectionConfiguration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24246	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24247}
24248
24249// MarshalJSON is the custom marshaler for P2SConnectionConfigurationProperties.
24250func (pccp P2SConnectionConfigurationProperties) MarshalJSON() ([]byte, error) {
24251	objectMap := make(map[string]interface{})
24252	if pccp.VpnClientAddressPool != nil {
24253		objectMap["vpnClientAddressPool"] = pccp.VpnClientAddressPool
24254	}
24255	return json.Marshal(objectMap)
24256}
24257
24258// P2SVpnConnectionHealth p2S Vpn connection detailed health written to sas url.
24259type P2SVpnConnectionHealth struct {
24260	autorest.Response `json:"-"`
24261	// SasURL - Returned sas url of the blob to which the p2s vpn connection detailed health will be written.
24262	SasURL *string `json:"sasUrl,omitempty"`
24263}
24264
24265// P2SVpnConnectionHealthRequest list of P2S Vpn connection health request.
24266type P2SVpnConnectionHealthRequest struct {
24267	// VpnUserNamesFilter - The list of p2s vpn user names whose p2s vpn connection detailed health to retrieve for.
24268	VpnUserNamesFilter *[]string `json:"vpnUserNamesFilter,omitempty"`
24269	// OutputBlobSasURL - The sas-url to download the P2S Vpn connection health detail.
24270	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
24271}
24272
24273// P2SVpnConnectionRequest list of p2s vpn connections to be disconnected.
24274type P2SVpnConnectionRequest struct {
24275	// VpnConnectionIds - List of p2s vpn connection Ids.
24276	VpnConnectionIds *[]string `json:"vpnConnectionIds,omitempty"`
24277}
24278
24279// P2SVpnGateway p2SVpnGateway Resource.
24280type P2SVpnGateway struct {
24281	autorest.Response `json:"-"`
24282	// P2SVpnGatewayProperties - Properties of the P2SVpnGateway.
24283	*P2SVpnGatewayProperties `json:"properties,omitempty"`
24284	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24285	Etag *string `json:"etag,omitempty"`
24286	// ID - Resource ID.
24287	ID *string `json:"id,omitempty"`
24288	// Name - READ-ONLY; Resource name.
24289	Name *string `json:"name,omitempty"`
24290	// Type - READ-ONLY; Resource type.
24291	Type *string `json:"type,omitempty"`
24292	// Location - Resource location.
24293	Location *string `json:"location,omitempty"`
24294	// Tags - Resource tags.
24295	Tags map[string]*string `json:"tags"`
24296}
24297
24298// MarshalJSON is the custom marshaler for P2SVpnGateway.
24299func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) {
24300	objectMap := make(map[string]interface{})
24301	if pvg.P2SVpnGatewayProperties != nil {
24302		objectMap["properties"] = pvg.P2SVpnGatewayProperties
24303	}
24304	if pvg.ID != nil {
24305		objectMap["id"] = pvg.ID
24306	}
24307	if pvg.Location != nil {
24308		objectMap["location"] = pvg.Location
24309	}
24310	if pvg.Tags != nil {
24311		objectMap["tags"] = pvg.Tags
24312	}
24313	return json.Marshal(objectMap)
24314}
24315
24316// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct.
24317func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error {
24318	var m map[string]*json.RawMessage
24319	err := json.Unmarshal(body, &m)
24320	if err != nil {
24321		return err
24322	}
24323	for k, v := range m {
24324		switch k {
24325		case "properties":
24326			if v != nil {
24327				var p2SVpnGatewayProperties P2SVpnGatewayProperties
24328				err = json.Unmarshal(*v, &p2SVpnGatewayProperties)
24329				if err != nil {
24330					return err
24331				}
24332				pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties
24333			}
24334		case "etag":
24335			if v != nil {
24336				var etag string
24337				err = json.Unmarshal(*v, &etag)
24338				if err != nil {
24339					return err
24340				}
24341				pvg.Etag = &etag
24342			}
24343		case "id":
24344			if v != nil {
24345				var ID string
24346				err = json.Unmarshal(*v, &ID)
24347				if err != nil {
24348					return err
24349				}
24350				pvg.ID = &ID
24351			}
24352		case "name":
24353			if v != nil {
24354				var name string
24355				err = json.Unmarshal(*v, &name)
24356				if err != nil {
24357					return err
24358				}
24359				pvg.Name = &name
24360			}
24361		case "type":
24362			if v != nil {
24363				var typeVar string
24364				err = json.Unmarshal(*v, &typeVar)
24365				if err != nil {
24366					return err
24367				}
24368				pvg.Type = &typeVar
24369			}
24370		case "location":
24371			if v != nil {
24372				var location string
24373				err = json.Unmarshal(*v, &location)
24374				if err != nil {
24375					return err
24376				}
24377				pvg.Location = &location
24378			}
24379		case "tags":
24380			if v != nil {
24381				var tags map[string]*string
24382				err = json.Unmarshal(*v, &tags)
24383				if err != nil {
24384					return err
24385				}
24386				pvg.Tags = tags
24387			}
24388		}
24389	}
24390
24391	return nil
24392}
24393
24394// P2SVpnGatewayProperties parameters for P2SVpnGateway.
24395type P2SVpnGatewayProperties struct {
24396	// VirtualHub - The VirtualHub to which the gateway belongs.
24397	VirtualHub *SubResource `json:"virtualHub,omitempty"`
24398	// P2SConnectionConfigurations - List of all p2s connection configurations of the gateway.
24399	P2SConnectionConfigurations *[]P2SConnectionConfiguration `json:"p2SConnectionConfigurations,omitempty"`
24400	// ProvisioningState - READ-ONLY; The provisioning state of the P2S VPN gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24401	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24402	// VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway.
24403	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
24404	// VpnServerConfiguration - The VpnServerConfiguration to which the p2sVpnGateway is attached to.
24405	VpnServerConfiguration *SubResource `json:"vpnServerConfiguration,omitempty"`
24406	// VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status.
24407	VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"`
24408}
24409
24410// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties.
24411func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) {
24412	objectMap := make(map[string]interface{})
24413	if pvgp.VirtualHub != nil {
24414		objectMap["virtualHub"] = pvgp.VirtualHub
24415	}
24416	if pvgp.P2SConnectionConfigurations != nil {
24417		objectMap["p2SConnectionConfigurations"] = pvgp.P2SConnectionConfigurations
24418	}
24419	if pvgp.VpnGatewayScaleUnit != nil {
24420		objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit
24421	}
24422	if pvgp.VpnServerConfiguration != nil {
24423		objectMap["vpnServerConfiguration"] = pvgp.VpnServerConfiguration
24424	}
24425	return json.Marshal(objectMap)
24426}
24427
24428// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
24429// long-running operation.
24430type P2sVpnGatewaysCreateOrUpdateFuture struct {
24431	azure.FutureAPI
24432	// Result returns the result of the asynchronous operation.
24433	// If the operation has not completed it will return an error.
24434	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
24435}
24436
24437// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24438func (future *P2sVpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
24439	var azFuture azure.Future
24440	if err := json.Unmarshal(body, &azFuture); err != nil {
24441		return err
24442	}
24443	future.FutureAPI = &azFuture
24444	future.Result = future.result
24445	return nil
24446}
24447
24448// result is the default implementation for P2sVpnGatewaysCreateOrUpdateFuture.Result.
24449func (future *P2sVpnGatewaysCreateOrUpdateFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
24450	var done bool
24451	done, err = future.DoneWithContext(context.Background(), client)
24452	if err != nil {
24453		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
24454		return
24455	}
24456	if !done {
24457		pvg.Response.Response = future.Response()
24458		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysCreateOrUpdateFuture")
24459		return
24460	}
24461	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24462	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
24463		pvg, err = client.CreateOrUpdateResponder(pvg.Response.Response)
24464		if err != nil {
24465			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", pvg.Response.Response, "Failure responding to request")
24466		}
24467	}
24468	return
24469}
24470
24471// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
24472// operation.
24473type P2sVpnGatewaysDeleteFuture struct {
24474	azure.FutureAPI
24475	// Result returns the result of the asynchronous operation.
24476	// If the operation has not completed it will return an error.
24477	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
24478}
24479
24480// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24481func (future *P2sVpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
24482	var azFuture azure.Future
24483	if err := json.Unmarshal(body, &azFuture); err != nil {
24484		return err
24485	}
24486	future.FutureAPI = &azFuture
24487	future.Result = future.result
24488	return nil
24489}
24490
24491// result is the default implementation for P2sVpnGatewaysDeleteFuture.Result.
24492func (future *P2sVpnGatewaysDeleteFuture) result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) {
24493	var done bool
24494	done, err = future.DoneWithContext(context.Background(), client)
24495	if err != nil {
24496		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
24497		return
24498	}
24499	if !done {
24500		ar.Response = future.Response()
24501		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDeleteFuture")
24502		return
24503	}
24504	ar.Response = future.Response()
24505	return
24506}
24507
24508// P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture an abstraction for monitoring and retrieving the results
24509// of a long-running operation.
24510type P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture struct {
24511	azure.FutureAPI
24512	// Result returns the result of the asynchronous operation.
24513	// If the operation has not completed it will return an error.
24514	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
24515}
24516
24517// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24518func (future *P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture) UnmarshalJSON(body []byte) error {
24519	var azFuture azure.Future
24520	if err := json.Unmarshal(body, &azFuture); err != nil {
24521		return err
24522	}
24523	future.FutureAPI = &azFuture
24524	future.Result = future.result
24525	return nil
24526}
24527
24528// result is the default implementation for P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture.Result.
24529func (future *P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture) result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) {
24530	var done bool
24531	done, err = future.DoneWithContext(context.Background(), client)
24532	if err != nil {
24533		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture", "Result", future.Response(), "Polling failure")
24534		return
24535	}
24536	if !done {
24537		ar.Response = future.Response()
24538		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture")
24539		return
24540	}
24541	ar.Response = future.Response()
24542	return
24543}
24544
24545// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
24546// long-running operation.
24547type P2sVpnGatewaysGenerateVpnProfileFuture struct {
24548	azure.FutureAPI
24549	// Result returns the result of the asynchronous operation.
24550	// If the operation has not completed it will return an error.
24551	Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error)
24552}
24553
24554// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24555func (future *P2sVpnGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
24556	var azFuture azure.Future
24557	if err := json.Unmarshal(body, &azFuture); err != nil {
24558		return err
24559	}
24560	future.FutureAPI = &azFuture
24561	future.Result = future.result
24562	return nil
24563}
24564
24565// result is the default implementation for P2sVpnGatewaysGenerateVpnProfileFuture.Result.
24566func (future *P2sVpnGatewaysGenerateVpnProfileFuture) result(client P2sVpnGatewaysClient) (vpr VpnProfileResponse, err error) {
24567	var done bool
24568	done, err = future.DoneWithContext(context.Background(), client)
24569	if err != nil {
24570		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
24571		return
24572	}
24573	if !done {
24574		vpr.Response.Response = future.Response()
24575		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGenerateVpnProfileFuture")
24576		return
24577	}
24578	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24579	if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent {
24580		vpr, err = client.GenerateVpnProfileResponder(vpr.Response.Response)
24581		if err != nil {
24582			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", vpr.Response.Response, "Failure responding to request")
24583		}
24584	}
24585	return
24586}
24587
24588// P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture an abstraction for monitoring and retrieving the
24589// results of a long-running operation.
24590type P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture struct {
24591	azure.FutureAPI
24592	// Result returns the result of the asynchronous operation.
24593	// If the operation has not completed it will return an error.
24594	Result func(P2sVpnGatewaysClient) (P2SVpnConnectionHealth, error)
24595}
24596
24597// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24598func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture) UnmarshalJSON(body []byte) error {
24599	var azFuture azure.Future
24600	if err := json.Unmarshal(body, &azFuture); err != nil {
24601		return err
24602	}
24603	future.FutureAPI = &azFuture
24604	future.Result = future.result
24605	return nil
24606}
24607
24608// result is the default implementation for P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture.Result.
24609func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture) result(client P2sVpnGatewaysClient) (pvch P2SVpnConnectionHealth, err error) {
24610	var done bool
24611	done, err = future.DoneWithContext(context.Background(), client)
24612	if err != nil {
24613		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture", "Result", future.Response(), "Polling failure")
24614		return
24615	}
24616	if !done {
24617		pvch.Response.Response = future.Response()
24618		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture")
24619		return
24620	}
24621	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24622	if pvch.Response.Response, err = future.GetResult(sender); err == nil && pvch.Response.Response.StatusCode != http.StatusNoContent {
24623		pvch, err = client.GetP2sVpnConnectionHealthDetailedResponder(pvch.Response.Response)
24624		if err != nil {
24625			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture", "Result", pvch.Response.Response, "Failure responding to request")
24626		}
24627	}
24628	return
24629}
24630
24631// P2sVpnGatewaysGetP2sVpnConnectionHealthFuture an abstraction for monitoring and retrieving the results
24632// of a long-running operation.
24633type P2sVpnGatewaysGetP2sVpnConnectionHealthFuture struct {
24634	azure.FutureAPI
24635	// Result returns the result of the asynchronous operation.
24636	// If the operation has not completed it will return an error.
24637	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
24638}
24639
24640// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24641func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) UnmarshalJSON(body []byte) error {
24642	var azFuture azure.Future
24643	if err := json.Unmarshal(body, &azFuture); err != nil {
24644		return err
24645	}
24646	future.FutureAPI = &azFuture
24647	future.Result = future.result
24648	return nil
24649}
24650
24651// result is the default implementation for P2sVpnGatewaysGetP2sVpnConnectionHealthFuture.Result.
24652func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
24653	var done bool
24654	done, err = future.DoneWithContext(context.Background(), client)
24655	if err != nil {
24656		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", future.Response(), "Polling failure")
24657		return
24658	}
24659	if !done {
24660		pvg.Response.Response = future.Response()
24661		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture")
24662		return
24663	}
24664	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24665	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
24666		pvg, err = client.GetP2sVpnConnectionHealthResponder(pvg.Response.Response)
24667		if err != nil {
24668			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", pvg.Response.Response, "Failure responding to request")
24669		}
24670	}
24671	return
24672}
24673
24674// P2SVpnProfileParameters vpn Client Parameters for package generation.
24675type P2SVpnProfileParameters struct {
24676	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
24677	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
24678}
24679
24680// PacketCapture parameters that define the create packet capture operation.
24681type PacketCapture struct {
24682	// PacketCaptureParameters - Properties of the packet capture.
24683	*PacketCaptureParameters `json:"properties,omitempty"`
24684}
24685
24686// MarshalJSON is the custom marshaler for PacketCapture.
24687func (pc PacketCapture) MarshalJSON() ([]byte, error) {
24688	objectMap := make(map[string]interface{})
24689	if pc.PacketCaptureParameters != nil {
24690		objectMap["properties"] = pc.PacketCaptureParameters
24691	}
24692	return json.Marshal(objectMap)
24693}
24694
24695// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
24696func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
24697	var m map[string]*json.RawMessage
24698	err := json.Unmarshal(body, &m)
24699	if err != nil {
24700		return err
24701	}
24702	for k, v := range m {
24703		switch k {
24704		case "properties":
24705			if v != nil {
24706				var packetCaptureParameters PacketCaptureParameters
24707				err = json.Unmarshal(*v, &packetCaptureParameters)
24708				if err != nil {
24709					return err
24710				}
24711				pc.PacketCaptureParameters = &packetCaptureParameters
24712			}
24713		}
24714	}
24715
24716	return nil
24717}
24718
24719// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
24720type PacketCaptureFilter struct {
24721	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
24722	Protocol PcProtocol `json:"protocol,omitempty"`
24723	// 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.
24724	LocalIPAddress *string `json:"localIPAddress,omitempty"`
24725	// 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.
24726	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
24727	// 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.
24728	LocalPort *string `json:"localPort,omitempty"`
24729	// 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.
24730	RemotePort *string `json:"remotePort,omitempty"`
24731}
24732
24733// PacketCaptureListResult list of packet capture sessions.
24734type PacketCaptureListResult struct {
24735	autorest.Response `json:"-"`
24736	// Value - Information about packet capture sessions.
24737	Value *[]PacketCaptureResult `json:"value,omitempty"`
24738}
24739
24740// PacketCaptureParameters parameters that define the create packet capture operation.
24741type PacketCaptureParameters struct {
24742	// Target - The ID of the targeted resource, only VM is currently supported.
24743	Target *string `json:"target,omitempty"`
24744	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
24745	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
24746	// TotalBytesPerSession - Maximum size of the capture output.
24747	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
24748	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
24749	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
24750	// StorageLocation - The storage location for a packet capture session.
24751	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
24752	// Filters - A list of packet capture filters.
24753	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
24754}
24755
24756// PacketCaptureQueryStatusResult status of packet capture session.
24757type PacketCaptureQueryStatusResult struct {
24758	autorest.Response `json:"-"`
24759	// Name - The name of the packet capture resource.
24760	Name *string `json:"name,omitempty"`
24761	// ID - The ID of the packet capture resource.
24762	ID *string `json:"id,omitempty"`
24763	// CaptureStartTime - The start time of the packet capture session.
24764	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
24765	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
24766	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
24767	// StopReason - The reason the current packet capture session was stopped.
24768	StopReason *string `json:"stopReason,omitempty"`
24769	// PacketCaptureError - List of errors of packet capture session.
24770	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
24771}
24772
24773// PacketCaptureResult information about packet capture session.
24774type PacketCaptureResult struct {
24775	autorest.Response `json:"-"`
24776	// Name - READ-ONLY; Name of the packet capture session.
24777	Name *string `json:"name,omitempty"`
24778	// ID - READ-ONLY; ID of the packet capture operation.
24779	ID *string `json:"id,omitempty"`
24780	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24781	Etag *string `json:"etag,omitempty"`
24782	// PacketCaptureResultProperties - Properties of the packet capture result.
24783	*PacketCaptureResultProperties `json:"properties,omitempty"`
24784}
24785
24786// MarshalJSON is the custom marshaler for PacketCaptureResult.
24787func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
24788	objectMap := make(map[string]interface{})
24789	if pcr.PacketCaptureResultProperties != nil {
24790		objectMap["properties"] = pcr.PacketCaptureResultProperties
24791	}
24792	return json.Marshal(objectMap)
24793}
24794
24795// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
24796func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
24797	var m map[string]*json.RawMessage
24798	err := json.Unmarshal(body, &m)
24799	if err != nil {
24800		return err
24801	}
24802	for k, v := range m {
24803		switch k {
24804		case "name":
24805			if v != nil {
24806				var name string
24807				err = json.Unmarshal(*v, &name)
24808				if err != nil {
24809					return err
24810				}
24811				pcr.Name = &name
24812			}
24813		case "id":
24814			if v != nil {
24815				var ID string
24816				err = json.Unmarshal(*v, &ID)
24817				if err != nil {
24818					return err
24819				}
24820				pcr.ID = &ID
24821			}
24822		case "etag":
24823			if v != nil {
24824				var etag string
24825				err = json.Unmarshal(*v, &etag)
24826				if err != nil {
24827					return err
24828				}
24829				pcr.Etag = &etag
24830			}
24831		case "properties":
24832			if v != nil {
24833				var packetCaptureResultProperties PacketCaptureResultProperties
24834				err = json.Unmarshal(*v, &packetCaptureResultProperties)
24835				if err != nil {
24836					return err
24837				}
24838				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
24839			}
24840		}
24841	}
24842
24843	return nil
24844}
24845
24846// PacketCaptureResultProperties the properties of a packet capture session.
24847type PacketCaptureResultProperties struct {
24848	// ProvisioningState - READ-ONLY; The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24849	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24850	// Target - The ID of the targeted resource, only VM is currently supported.
24851	Target *string `json:"target,omitempty"`
24852	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
24853	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
24854	// TotalBytesPerSession - Maximum size of the capture output.
24855	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
24856	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
24857	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
24858	// StorageLocation - The storage location for a packet capture session.
24859	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
24860	// Filters - A list of packet capture filters.
24861	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
24862}
24863
24864// MarshalJSON is the custom marshaler for PacketCaptureResultProperties.
24865func (pcrp PacketCaptureResultProperties) MarshalJSON() ([]byte, error) {
24866	objectMap := make(map[string]interface{})
24867	if pcrp.Target != nil {
24868		objectMap["target"] = pcrp.Target
24869	}
24870	if pcrp.BytesToCapturePerPacket != nil {
24871		objectMap["bytesToCapturePerPacket"] = pcrp.BytesToCapturePerPacket
24872	}
24873	if pcrp.TotalBytesPerSession != nil {
24874		objectMap["totalBytesPerSession"] = pcrp.TotalBytesPerSession
24875	}
24876	if pcrp.TimeLimitInSeconds != nil {
24877		objectMap["timeLimitInSeconds"] = pcrp.TimeLimitInSeconds
24878	}
24879	if pcrp.StorageLocation != nil {
24880		objectMap["storageLocation"] = pcrp.StorageLocation
24881	}
24882	if pcrp.Filters != nil {
24883		objectMap["filters"] = pcrp.Filters
24884	}
24885	return json.Marshal(objectMap)
24886}
24887
24888// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
24889// operation.
24890type PacketCapturesCreateFuture struct {
24891	azure.FutureAPI
24892	// Result returns the result of the asynchronous operation.
24893	// If the operation has not completed it will return an error.
24894	Result func(PacketCapturesClient) (PacketCaptureResult, error)
24895}
24896
24897// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24898func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error {
24899	var azFuture azure.Future
24900	if err := json.Unmarshal(body, &azFuture); err != nil {
24901		return err
24902	}
24903	future.FutureAPI = &azFuture
24904	future.Result = future.result
24905	return nil
24906}
24907
24908// result is the default implementation for PacketCapturesCreateFuture.Result.
24909func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
24910	var done bool
24911	done, err = future.DoneWithContext(context.Background(), client)
24912	if err != nil {
24913		err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
24914		return
24915	}
24916	if !done {
24917		pcr.Response.Response = future.Response()
24918		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
24919		return
24920	}
24921	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24922	if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
24923		pcr, err = client.CreateResponder(pcr.Response.Response)
24924		if err != nil {
24925			err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
24926		}
24927	}
24928	return
24929}
24930
24931// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
24932// operation.
24933type PacketCapturesDeleteFuture struct {
24934	azure.FutureAPI
24935	// Result returns the result of the asynchronous operation.
24936	// If the operation has not completed it will return an error.
24937	Result func(PacketCapturesClient) (autorest.Response, error)
24938}
24939
24940// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24941func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error {
24942	var azFuture azure.Future
24943	if err := json.Unmarshal(body, &azFuture); err != nil {
24944		return err
24945	}
24946	future.FutureAPI = &azFuture
24947	future.Result = future.result
24948	return nil
24949}
24950
24951// result is the default implementation for PacketCapturesDeleteFuture.Result.
24952func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
24953	var done bool
24954	done, err = future.DoneWithContext(context.Background(), client)
24955	if err != nil {
24956		err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
24957		return
24958	}
24959	if !done {
24960		ar.Response = future.Response()
24961		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
24962		return
24963	}
24964	ar.Response = future.Response()
24965	return
24966}
24967
24968// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
24969// operation.
24970type PacketCapturesGetStatusFuture struct {
24971	azure.FutureAPI
24972	// Result returns the result of the asynchronous operation.
24973	// If the operation has not completed it will return an error.
24974	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
24975}
24976
24977// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24978func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error {
24979	var azFuture azure.Future
24980	if err := json.Unmarshal(body, &azFuture); err != nil {
24981		return err
24982	}
24983	future.FutureAPI = &azFuture
24984	future.Result = future.result
24985	return nil
24986}
24987
24988// result is the default implementation for PacketCapturesGetStatusFuture.Result.
24989func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
24990	var done bool
24991	done, err = future.DoneWithContext(context.Background(), client)
24992	if err != nil {
24993		err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
24994		return
24995	}
24996	if !done {
24997		pcqsr.Response.Response = future.Response()
24998		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
24999		return
25000	}
25001	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25002	if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
25003		pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
25004		if err != nil {
25005			err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
25006		}
25007	}
25008	return
25009}
25010
25011// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
25012// operation.
25013type PacketCapturesStopFuture struct {
25014	azure.FutureAPI
25015	// Result returns the result of the asynchronous operation.
25016	// If the operation has not completed it will return an error.
25017	Result func(PacketCapturesClient) (autorest.Response, error)
25018}
25019
25020// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25021func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error {
25022	var azFuture azure.Future
25023	if err := json.Unmarshal(body, &azFuture); err != nil {
25024		return err
25025	}
25026	future.FutureAPI = &azFuture
25027	future.Result = future.result
25028	return nil
25029}
25030
25031// result is the default implementation for PacketCapturesStopFuture.Result.
25032func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
25033	var done bool
25034	done, err = future.DoneWithContext(context.Background(), client)
25035	if err != nil {
25036		err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
25037		return
25038	}
25039	if !done {
25040		ar.Response = future.Response()
25041		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
25042		return
25043	}
25044	ar.Response = future.Response()
25045	return
25046}
25047
25048// PacketCaptureStorageLocation the storage location for a packet capture session.
25049type PacketCaptureStorageLocation struct {
25050	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
25051	StorageID *string `json:"storageId,omitempty"`
25052	// 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.
25053	StoragePath *string `json:"storagePath,omitempty"`
25054	// 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.
25055	FilePath *string `json:"filePath,omitempty"`
25056}
25057
25058// PatchRouteFilter route Filter Resource.
25059type PatchRouteFilter struct {
25060	// RouteFilterPropertiesFormat - Properties of the route filter.
25061	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
25062	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
25063	Name *string `json:"name,omitempty"`
25064	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
25065	Etag *string `json:"etag,omitempty"`
25066	// Type - READ-ONLY; Resource type.
25067	Type *string `json:"type,omitempty"`
25068	// Tags - Resource tags.
25069	Tags map[string]*string `json:"tags"`
25070	// ID - Resource ID.
25071	ID *string `json:"id,omitempty"`
25072}
25073
25074// MarshalJSON is the custom marshaler for PatchRouteFilter.
25075func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
25076	objectMap := make(map[string]interface{})
25077	if prf.RouteFilterPropertiesFormat != nil {
25078		objectMap["properties"] = prf.RouteFilterPropertiesFormat
25079	}
25080	if prf.Tags != nil {
25081		objectMap["tags"] = prf.Tags
25082	}
25083	if prf.ID != nil {
25084		objectMap["id"] = prf.ID
25085	}
25086	return json.Marshal(objectMap)
25087}
25088
25089// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
25090func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
25091	var m map[string]*json.RawMessage
25092	err := json.Unmarshal(body, &m)
25093	if err != nil {
25094		return err
25095	}
25096	for k, v := range m {
25097		switch k {
25098		case "properties":
25099			if v != nil {
25100				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
25101				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
25102				if err != nil {
25103					return err
25104				}
25105				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
25106			}
25107		case "name":
25108			if v != nil {
25109				var name string
25110				err = json.Unmarshal(*v, &name)
25111				if err != nil {
25112					return err
25113				}
25114				prf.Name = &name
25115			}
25116		case "etag":
25117			if v != nil {
25118				var etag string
25119				err = json.Unmarshal(*v, &etag)
25120				if err != nil {
25121					return err
25122				}
25123				prf.Etag = &etag
25124			}
25125		case "type":
25126			if v != nil {
25127				var typeVar string
25128				err = json.Unmarshal(*v, &typeVar)
25129				if err != nil {
25130					return err
25131				}
25132				prf.Type = &typeVar
25133			}
25134		case "tags":
25135			if v != nil {
25136				var tags map[string]*string
25137				err = json.Unmarshal(*v, &tags)
25138				if err != nil {
25139					return err
25140				}
25141				prf.Tags = tags
25142			}
25143		case "id":
25144			if v != nil {
25145				var ID string
25146				err = json.Unmarshal(*v, &ID)
25147				if err != nil {
25148					return err
25149				}
25150				prf.ID = &ID
25151			}
25152		}
25153	}
25154
25155	return nil
25156}
25157
25158// PatchRouteFilterRule route Filter Rule Resource.
25159type PatchRouteFilterRule struct {
25160	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
25161	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
25162	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
25163	Name *string `json:"name,omitempty"`
25164	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
25165	Etag *string `json:"etag,omitempty"`
25166	// ID - Resource ID.
25167	ID *string `json:"id,omitempty"`
25168}
25169
25170// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
25171func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
25172	objectMap := make(map[string]interface{})
25173	if prfr.RouteFilterRulePropertiesFormat != nil {
25174		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
25175	}
25176	if prfr.ID != nil {
25177		objectMap["id"] = prfr.ID
25178	}
25179	return json.Marshal(objectMap)
25180}
25181
25182// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
25183func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
25184	var m map[string]*json.RawMessage
25185	err := json.Unmarshal(body, &m)
25186	if err != nil {
25187		return err
25188	}
25189	for k, v := range m {
25190		switch k {
25191		case "properties":
25192			if v != nil {
25193				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
25194				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
25195				if err != nil {
25196					return err
25197				}
25198				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
25199			}
25200		case "name":
25201			if v != nil {
25202				var name string
25203				err = json.Unmarshal(*v, &name)
25204				if err != nil {
25205					return err
25206				}
25207				prfr.Name = &name
25208			}
25209		case "etag":
25210			if v != nil {
25211				var etag string
25212				err = json.Unmarshal(*v, &etag)
25213				if err != nil {
25214					return err
25215				}
25216				prfr.Etag = &etag
25217			}
25218		case "id":
25219			if v != nil {
25220				var ID string
25221				err = json.Unmarshal(*v, &ID)
25222				if err != nil {
25223					return err
25224				}
25225				prfr.ID = &ID
25226			}
25227		}
25228	}
25229
25230	return nil
25231}
25232
25233// PeerExpressRouteCircuitConnection peer Express Route Circuit Connection in an ExpressRouteCircuitPeering
25234// resource.
25235type PeerExpressRouteCircuitConnection struct {
25236	autorest.Response `json:"-"`
25237	// PeerExpressRouteCircuitConnectionPropertiesFormat - Properties of the peer express route circuit connection.
25238	*PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
25239	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
25240	Name *string `json:"name,omitempty"`
25241	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
25242	Etag *string `json:"etag,omitempty"`
25243	// Type - READ-ONLY; Type of the resource.
25244	Type *string `json:"type,omitempty"`
25245	// ID - Resource ID.
25246	ID *string `json:"id,omitempty"`
25247}
25248
25249// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnection.
25250func (percc PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
25251	objectMap := make(map[string]interface{})
25252	if percc.PeerExpressRouteCircuitConnectionPropertiesFormat != nil {
25253		objectMap["properties"] = percc.PeerExpressRouteCircuitConnectionPropertiesFormat
25254	}
25255	if percc.Name != nil {
25256		objectMap["name"] = percc.Name
25257	}
25258	if percc.ID != nil {
25259		objectMap["id"] = percc.ID
25260	}
25261	return json.Marshal(objectMap)
25262}
25263
25264// UnmarshalJSON is the custom unmarshaler for PeerExpressRouteCircuitConnection struct.
25265func (percc *PeerExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
25266	var m map[string]*json.RawMessage
25267	err := json.Unmarshal(body, &m)
25268	if err != nil {
25269		return err
25270	}
25271	for k, v := range m {
25272		switch k {
25273		case "properties":
25274			if v != nil {
25275				var peerExpressRouteCircuitConnectionPropertiesFormat PeerExpressRouteCircuitConnectionPropertiesFormat
25276				err = json.Unmarshal(*v, &peerExpressRouteCircuitConnectionPropertiesFormat)
25277				if err != nil {
25278					return err
25279				}
25280				percc.PeerExpressRouteCircuitConnectionPropertiesFormat = &peerExpressRouteCircuitConnectionPropertiesFormat
25281			}
25282		case "name":
25283			if v != nil {
25284				var name string
25285				err = json.Unmarshal(*v, &name)
25286				if err != nil {
25287					return err
25288				}
25289				percc.Name = &name
25290			}
25291		case "etag":
25292			if v != nil {
25293				var etag string
25294				err = json.Unmarshal(*v, &etag)
25295				if err != nil {
25296					return err
25297				}
25298				percc.Etag = &etag
25299			}
25300		case "type":
25301			if v != nil {
25302				var typeVar string
25303				err = json.Unmarshal(*v, &typeVar)
25304				if err != nil {
25305					return err
25306				}
25307				percc.Type = &typeVar
25308			}
25309		case "id":
25310			if v != nil {
25311				var ID string
25312				err = json.Unmarshal(*v, &ID)
25313				if err != nil {
25314					return err
25315				}
25316				percc.ID = &ID
25317			}
25318		}
25319	}
25320
25321	return nil
25322}
25323
25324// PeerExpressRouteCircuitConnectionListResult response for ListPeeredConnections API service call
25325// retrieves all global reach peer circuit connections that belongs to a Private Peering for an
25326// ExpressRouteCircuit.
25327type PeerExpressRouteCircuitConnectionListResult struct {
25328	autorest.Response `json:"-"`
25329	// Value - The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit.
25330	Value *[]PeerExpressRouteCircuitConnection `json:"value,omitempty"`
25331	// NextLink - The URL to get the next set of results.
25332	NextLink *string `json:"nextLink,omitempty"`
25333}
25334
25335// PeerExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
25336// PeerExpressRouteCircuitConnection values.
25337type PeerExpressRouteCircuitConnectionListResultIterator struct {
25338	i    int
25339	page PeerExpressRouteCircuitConnectionListResultPage
25340}
25341
25342// NextWithContext advances to the next value.  If there was an error making
25343// the request the iterator does not advance and the error is returned.
25344func (iter *PeerExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
25345	if tracing.IsEnabled() {
25346		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultIterator.NextWithContext")
25347		defer func() {
25348			sc := -1
25349			if iter.Response().Response.Response != nil {
25350				sc = iter.Response().Response.Response.StatusCode
25351			}
25352			tracing.EndSpan(ctx, sc, err)
25353		}()
25354	}
25355	iter.i++
25356	if iter.i < len(iter.page.Values()) {
25357		return nil
25358	}
25359	err = iter.page.NextWithContext(ctx)
25360	if err != nil {
25361		iter.i--
25362		return err
25363	}
25364	iter.i = 0
25365	return nil
25366}
25367
25368// Next advances to the next value.  If there was an error making
25369// the request the iterator does not advance and the error is returned.
25370// Deprecated: Use NextWithContext() instead.
25371func (iter *PeerExpressRouteCircuitConnectionListResultIterator) Next() error {
25372	return iter.NextWithContext(context.Background())
25373}
25374
25375// NotDone returns true if the enumeration should be started or is not yet complete.
25376func (iter PeerExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
25377	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25378}
25379
25380// Response returns the raw server response from the last page request.
25381func (iter PeerExpressRouteCircuitConnectionListResultIterator) Response() PeerExpressRouteCircuitConnectionListResult {
25382	return iter.page.Response()
25383}
25384
25385// Value returns the current value or a zero-initialized value if the
25386// iterator has advanced beyond the end of the collection.
25387func (iter PeerExpressRouteCircuitConnectionListResultIterator) Value() PeerExpressRouteCircuitConnection {
25388	if !iter.page.NotDone() {
25389		return PeerExpressRouteCircuitConnection{}
25390	}
25391	return iter.page.Values()[iter.i]
25392}
25393
25394// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultIterator type.
25395func NewPeerExpressRouteCircuitConnectionListResultIterator(page PeerExpressRouteCircuitConnectionListResultPage) PeerExpressRouteCircuitConnectionListResultIterator {
25396	return PeerExpressRouteCircuitConnectionListResultIterator{page: page}
25397}
25398
25399// IsEmpty returns true if the ListResult contains no values.
25400func (percclr PeerExpressRouteCircuitConnectionListResult) IsEmpty() bool {
25401	return percclr.Value == nil || len(*percclr.Value) == 0
25402}
25403
25404// hasNextLink returns true if the NextLink is not empty.
25405func (percclr PeerExpressRouteCircuitConnectionListResult) hasNextLink() bool {
25406	return percclr.NextLink != nil && len(*percclr.NextLink) != 0
25407}
25408
25409// peerExpressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
25410// It returns nil if no more results exist.
25411func (percclr PeerExpressRouteCircuitConnectionListResult) peerExpressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
25412	if !percclr.hasNextLink() {
25413		return nil, nil
25414	}
25415	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25416		autorest.AsJSON(),
25417		autorest.AsGet(),
25418		autorest.WithBaseURL(to.String(percclr.NextLink)))
25419}
25420
25421// PeerExpressRouteCircuitConnectionListResultPage contains a page of PeerExpressRouteCircuitConnection
25422// values.
25423type PeerExpressRouteCircuitConnectionListResultPage struct {
25424	fn      func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)
25425	percclr PeerExpressRouteCircuitConnectionListResult
25426}
25427
25428// NextWithContext advances to the next page of values.  If there was an error making
25429// the request the page does not advance and the error is returned.
25430func (page *PeerExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
25431	if tracing.IsEnabled() {
25432		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultPage.NextWithContext")
25433		defer func() {
25434			sc := -1
25435			if page.Response().Response.Response != nil {
25436				sc = page.Response().Response.Response.StatusCode
25437			}
25438			tracing.EndSpan(ctx, sc, err)
25439		}()
25440	}
25441	for {
25442		next, err := page.fn(ctx, page.percclr)
25443		if err != nil {
25444			return err
25445		}
25446		page.percclr = next
25447		if !next.hasNextLink() || !next.IsEmpty() {
25448			break
25449		}
25450	}
25451	return nil
25452}
25453
25454// Next advances to the next page of values.  If there was an error making
25455// the request the page does not advance and the error is returned.
25456// Deprecated: Use NextWithContext() instead.
25457func (page *PeerExpressRouteCircuitConnectionListResultPage) Next() error {
25458	return page.NextWithContext(context.Background())
25459}
25460
25461// NotDone returns true if the page enumeration should be started or is not yet complete.
25462func (page PeerExpressRouteCircuitConnectionListResultPage) NotDone() bool {
25463	return !page.percclr.IsEmpty()
25464}
25465
25466// Response returns the raw server response from the last page request.
25467func (page PeerExpressRouteCircuitConnectionListResultPage) Response() PeerExpressRouteCircuitConnectionListResult {
25468	return page.percclr
25469}
25470
25471// Values returns the slice of values for the current page or nil if there are no values.
25472func (page PeerExpressRouteCircuitConnectionListResultPage) Values() []PeerExpressRouteCircuitConnection {
25473	if page.percclr.IsEmpty() {
25474		return nil
25475	}
25476	return *page.percclr.Value
25477}
25478
25479// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultPage type.
25480func NewPeerExpressRouteCircuitConnectionListResultPage(cur PeerExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)) PeerExpressRouteCircuitConnectionListResultPage {
25481	return PeerExpressRouteCircuitConnectionListResultPage{
25482		fn:      getNextPage,
25483		percclr: cur,
25484	}
25485}
25486
25487// PeerExpressRouteCircuitConnectionPropertiesFormat properties of the peer express route circuit
25488// connection.
25489type PeerExpressRouteCircuitConnectionPropertiesFormat struct {
25490	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit.
25491	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
25492	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
25493	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
25494	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
25495	AddressPrefix *string `json:"addressPrefix,omitempty"`
25496	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
25497	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
25498	// ConnectionName - The name of the express route circuit connection resource.
25499	ConnectionName *string `json:"connectionName,omitempty"`
25500	// AuthResourceGUID - The resource guid of the authorization used for the express route circuit connection.
25501	AuthResourceGUID *string `json:"authResourceGuid,omitempty"`
25502	// ProvisioningState - READ-ONLY; The provisioning state of the peer express route circuit connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25503	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25504}
25505
25506// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnectionPropertiesFormat.
25507func (perccpf PeerExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
25508	objectMap := make(map[string]interface{})
25509	if perccpf.ExpressRouteCircuitPeering != nil {
25510		objectMap["expressRouteCircuitPeering"] = perccpf.ExpressRouteCircuitPeering
25511	}
25512	if perccpf.PeerExpressRouteCircuitPeering != nil {
25513		objectMap["peerExpressRouteCircuitPeering"] = perccpf.PeerExpressRouteCircuitPeering
25514	}
25515	if perccpf.AddressPrefix != nil {
25516		objectMap["addressPrefix"] = perccpf.AddressPrefix
25517	}
25518	if perccpf.CircuitConnectionStatus != "" {
25519		objectMap["circuitConnectionStatus"] = perccpf.CircuitConnectionStatus
25520	}
25521	if perccpf.ConnectionName != nil {
25522		objectMap["connectionName"] = perccpf.ConnectionName
25523	}
25524	if perccpf.AuthResourceGUID != nil {
25525		objectMap["authResourceGuid"] = perccpf.AuthResourceGUID
25526	}
25527	return json.Marshal(objectMap)
25528}
25529
25530// PolicySettings defines contents of a web application firewall global configuration.
25531type PolicySettings struct {
25532	// State - The state of the policy. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled'
25533	State WebApplicationFirewallEnabledState `json:"state,omitempty"`
25534	// Mode - The mode of the policy. Possible values include: 'WebApplicationFirewallModePrevention', 'WebApplicationFirewallModeDetection'
25535	Mode WebApplicationFirewallMode `json:"mode,omitempty"`
25536	// RequestBodyCheck - Whether to allow WAF to check request Body.
25537	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
25538	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
25539	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
25540	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
25541	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
25542}
25543
25544// PrepareNetworkPoliciesRequest details of PrepareNetworkPolicies for Subnet.
25545type PrepareNetworkPoliciesRequest struct {
25546	// ServiceName - The name of the service for which subnet is being prepared for.
25547	ServiceName *string `json:"serviceName,omitempty"`
25548	// NetworkIntentPolicyConfigurations - A list of NetworkIntentPolicyConfiguration.
25549	NetworkIntentPolicyConfigurations *[]IntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"`
25550}
25551
25552// PrivateDNSZoneConfig privateDnsZoneConfig resource.
25553type PrivateDNSZoneConfig struct {
25554	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
25555	Name *string `json:"name,omitempty"`
25556	// PrivateDNSZonePropertiesFormat - Properties of the private dns zone configuration.
25557	*PrivateDNSZonePropertiesFormat `json:"properties,omitempty"`
25558}
25559
25560// MarshalJSON is the custom marshaler for PrivateDNSZoneConfig.
25561func (pdzc PrivateDNSZoneConfig) MarshalJSON() ([]byte, error) {
25562	objectMap := make(map[string]interface{})
25563	if pdzc.Name != nil {
25564		objectMap["name"] = pdzc.Name
25565	}
25566	if pdzc.PrivateDNSZonePropertiesFormat != nil {
25567		objectMap["properties"] = pdzc.PrivateDNSZonePropertiesFormat
25568	}
25569	return json.Marshal(objectMap)
25570}
25571
25572// UnmarshalJSON is the custom unmarshaler for PrivateDNSZoneConfig struct.
25573func (pdzc *PrivateDNSZoneConfig) UnmarshalJSON(body []byte) error {
25574	var m map[string]*json.RawMessage
25575	err := json.Unmarshal(body, &m)
25576	if err != nil {
25577		return err
25578	}
25579	for k, v := range m {
25580		switch k {
25581		case "name":
25582			if v != nil {
25583				var name string
25584				err = json.Unmarshal(*v, &name)
25585				if err != nil {
25586					return err
25587				}
25588				pdzc.Name = &name
25589			}
25590		case "properties":
25591			if v != nil {
25592				var privateDNSZonePropertiesFormat PrivateDNSZonePropertiesFormat
25593				err = json.Unmarshal(*v, &privateDNSZonePropertiesFormat)
25594				if err != nil {
25595					return err
25596				}
25597				pdzc.PrivateDNSZonePropertiesFormat = &privateDNSZonePropertiesFormat
25598			}
25599		}
25600	}
25601
25602	return nil
25603}
25604
25605// PrivateDNSZoneGroup private dns zone group resource.
25606type PrivateDNSZoneGroup struct {
25607	autorest.Response `json:"-"`
25608	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
25609	Name *string `json:"name,omitempty"`
25610	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
25611	Etag *string `json:"etag,omitempty"`
25612	// PrivateDNSZoneGroupPropertiesFormat - Properties of the private dns zone group.
25613	*PrivateDNSZoneGroupPropertiesFormat `json:"properties,omitempty"`
25614	// ID - Resource ID.
25615	ID *string `json:"id,omitempty"`
25616}
25617
25618// MarshalJSON is the custom marshaler for PrivateDNSZoneGroup.
25619func (pdzg PrivateDNSZoneGroup) MarshalJSON() ([]byte, error) {
25620	objectMap := make(map[string]interface{})
25621	if pdzg.Name != nil {
25622		objectMap["name"] = pdzg.Name
25623	}
25624	if pdzg.PrivateDNSZoneGroupPropertiesFormat != nil {
25625		objectMap["properties"] = pdzg.PrivateDNSZoneGroupPropertiesFormat
25626	}
25627	if pdzg.ID != nil {
25628		objectMap["id"] = pdzg.ID
25629	}
25630	return json.Marshal(objectMap)
25631}
25632
25633// UnmarshalJSON is the custom unmarshaler for PrivateDNSZoneGroup struct.
25634func (pdzg *PrivateDNSZoneGroup) UnmarshalJSON(body []byte) error {
25635	var m map[string]*json.RawMessage
25636	err := json.Unmarshal(body, &m)
25637	if err != nil {
25638		return err
25639	}
25640	for k, v := range m {
25641		switch k {
25642		case "name":
25643			if v != nil {
25644				var name string
25645				err = json.Unmarshal(*v, &name)
25646				if err != nil {
25647					return err
25648				}
25649				pdzg.Name = &name
25650			}
25651		case "etag":
25652			if v != nil {
25653				var etag string
25654				err = json.Unmarshal(*v, &etag)
25655				if err != nil {
25656					return err
25657				}
25658				pdzg.Etag = &etag
25659			}
25660		case "properties":
25661			if v != nil {
25662				var privateDNSZoneGroupPropertiesFormat PrivateDNSZoneGroupPropertiesFormat
25663				err = json.Unmarshal(*v, &privateDNSZoneGroupPropertiesFormat)
25664				if err != nil {
25665					return err
25666				}
25667				pdzg.PrivateDNSZoneGroupPropertiesFormat = &privateDNSZoneGroupPropertiesFormat
25668			}
25669		case "id":
25670			if v != nil {
25671				var ID string
25672				err = json.Unmarshal(*v, &ID)
25673				if err != nil {
25674					return err
25675				}
25676				pdzg.ID = &ID
25677			}
25678		}
25679	}
25680
25681	return nil
25682}
25683
25684// PrivateDNSZoneGroupListResult response for the ListPrivateDnsZoneGroups API service call.
25685type PrivateDNSZoneGroupListResult struct {
25686	autorest.Response `json:"-"`
25687	// Value - A list of private dns zone group resources in a private endpoint.
25688	Value *[]PrivateDNSZoneGroup `json:"value,omitempty"`
25689	// NextLink - READ-ONLY; The URL to get the next set of results.
25690	NextLink *string `json:"nextLink,omitempty"`
25691}
25692
25693// MarshalJSON is the custom marshaler for PrivateDNSZoneGroupListResult.
25694func (pdzglr PrivateDNSZoneGroupListResult) MarshalJSON() ([]byte, error) {
25695	objectMap := make(map[string]interface{})
25696	if pdzglr.Value != nil {
25697		objectMap["value"] = pdzglr.Value
25698	}
25699	return json.Marshal(objectMap)
25700}
25701
25702// PrivateDNSZoneGroupListResultIterator provides access to a complete listing of PrivateDNSZoneGroup
25703// values.
25704type PrivateDNSZoneGroupListResultIterator struct {
25705	i    int
25706	page PrivateDNSZoneGroupListResultPage
25707}
25708
25709// NextWithContext advances to the next value.  If there was an error making
25710// the request the iterator does not advance and the error is returned.
25711func (iter *PrivateDNSZoneGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
25712	if tracing.IsEnabled() {
25713		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateDNSZoneGroupListResultIterator.NextWithContext")
25714		defer func() {
25715			sc := -1
25716			if iter.Response().Response.Response != nil {
25717				sc = iter.Response().Response.Response.StatusCode
25718			}
25719			tracing.EndSpan(ctx, sc, err)
25720		}()
25721	}
25722	iter.i++
25723	if iter.i < len(iter.page.Values()) {
25724		return nil
25725	}
25726	err = iter.page.NextWithContext(ctx)
25727	if err != nil {
25728		iter.i--
25729		return err
25730	}
25731	iter.i = 0
25732	return nil
25733}
25734
25735// Next advances to the next value.  If there was an error making
25736// the request the iterator does not advance and the error is returned.
25737// Deprecated: Use NextWithContext() instead.
25738func (iter *PrivateDNSZoneGroupListResultIterator) Next() error {
25739	return iter.NextWithContext(context.Background())
25740}
25741
25742// NotDone returns true if the enumeration should be started or is not yet complete.
25743func (iter PrivateDNSZoneGroupListResultIterator) NotDone() bool {
25744	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25745}
25746
25747// Response returns the raw server response from the last page request.
25748func (iter PrivateDNSZoneGroupListResultIterator) Response() PrivateDNSZoneGroupListResult {
25749	return iter.page.Response()
25750}
25751
25752// Value returns the current value or a zero-initialized value if the
25753// iterator has advanced beyond the end of the collection.
25754func (iter PrivateDNSZoneGroupListResultIterator) Value() PrivateDNSZoneGroup {
25755	if !iter.page.NotDone() {
25756		return PrivateDNSZoneGroup{}
25757	}
25758	return iter.page.Values()[iter.i]
25759}
25760
25761// Creates a new instance of the PrivateDNSZoneGroupListResultIterator type.
25762func NewPrivateDNSZoneGroupListResultIterator(page PrivateDNSZoneGroupListResultPage) PrivateDNSZoneGroupListResultIterator {
25763	return PrivateDNSZoneGroupListResultIterator{page: page}
25764}
25765
25766// IsEmpty returns true if the ListResult contains no values.
25767func (pdzglr PrivateDNSZoneGroupListResult) IsEmpty() bool {
25768	return pdzglr.Value == nil || len(*pdzglr.Value) == 0
25769}
25770
25771// hasNextLink returns true if the NextLink is not empty.
25772func (pdzglr PrivateDNSZoneGroupListResult) hasNextLink() bool {
25773	return pdzglr.NextLink != nil && len(*pdzglr.NextLink) != 0
25774}
25775
25776// privateDNSZoneGroupListResultPreparer prepares a request to retrieve the next set of results.
25777// It returns nil if no more results exist.
25778func (pdzglr PrivateDNSZoneGroupListResult) privateDNSZoneGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
25779	if !pdzglr.hasNextLink() {
25780		return nil, nil
25781	}
25782	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25783		autorest.AsJSON(),
25784		autorest.AsGet(),
25785		autorest.WithBaseURL(to.String(pdzglr.NextLink)))
25786}
25787
25788// PrivateDNSZoneGroupListResultPage contains a page of PrivateDNSZoneGroup values.
25789type PrivateDNSZoneGroupListResultPage struct {
25790	fn     func(context.Context, PrivateDNSZoneGroupListResult) (PrivateDNSZoneGroupListResult, error)
25791	pdzglr PrivateDNSZoneGroupListResult
25792}
25793
25794// NextWithContext advances to the next page of values.  If there was an error making
25795// the request the page does not advance and the error is returned.
25796func (page *PrivateDNSZoneGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
25797	if tracing.IsEnabled() {
25798		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateDNSZoneGroupListResultPage.NextWithContext")
25799		defer func() {
25800			sc := -1
25801			if page.Response().Response.Response != nil {
25802				sc = page.Response().Response.Response.StatusCode
25803			}
25804			tracing.EndSpan(ctx, sc, err)
25805		}()
25806	}
25807	for {
25808		next, err := page.fn(ctx, page.pdzglr)
25809		if err != nil {
25810			return err
25811		}
25812		page.pdzglr = next
25813		if !next.hasNextLink() || !next.IsEmpty() {
25814			break
25815		}
25816	}
25817	return nil
25818}
25819
25820// Next advances to the next page of values.  If there was an error making
25821// the request the page does not advance and the error is returned.
25822// Deprecated: Use NextWithContext() instead.
25823func (page *PrivateDNSZoneGroupListResultPage) Next() error {
25824	return page.NextWithContext(context.Background())
25825}
25826
25827// NotDone returns true if the page enumeration should be started or is not yet complete.
25828func (page PrivateDNSZoneGroupListResultPage) NotDone() bool {
25829	return !page.pdzglr.IsEmpty()
25830}
25831
25832// Response returns the raw server response from the last page request.
25833func (page PrivateDNSZoneGroupListResultPage) Response() PrivateDNSZoneGroupListResult {
25834	return page.pdzglr
25835}
25836
25837// Values returns the slice of values for the current page or nil if there are no values.
25838func (page PrivateDNSZoneGroupListResultPage) Values() []PrivateDNSZoneGroup {
25839	if page.pdzglr.IsEmpty() {
25840		return nil
25841	}
25842	return *page.pdzglr.Value
25843}
25844
25845// Creates a new instance of the PrivateDNSZoneGroupListResultPage type.
25846func NewPrivateDNSZoneGroupListResultPage(cur PrivateDNSZoneGroupListResult, getNextPage func(context.Context, PrivateDNSZoneGroupListResult) (PrivateDNSZoneGroupListResult, error)) PrivateDNSZoneGroupListResultPage {
25847	return PrivateDNSZoneGroupListResultPage{
25848		fn:     getNextPage,
25849		pdzglr: cur,
25850	}
25851}
25852
25853// PrivateDNSZoneGroupPropertiesFormat properties of the private dns zone group.
25854type PrivateDNSZoneGroupPropertiesFormat struct {
25855	// ProvisioningState - READ-ONLY; The provisioning state of the private dns zone group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25856	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25857	// PrivateDNSZoneConfigs - A collection of private dns zone configurations of the private dns zone group.
25858	PrivateDNSZoneConfigs *[]PrivateDNSZoneConfig `json:"privateDnsZoneConfigs,omitempty"`
25859}
25860
25861// MarshalJSON is the custom marshaler for PrivateDNSZoneGroupPropertiesFormat.
25862func (pdzgpf PrivateDNSZoneGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
25863	objectMap := make(map[string]interface{})
25864	if pdzgpf.PrivateDNSZoneConfigs != nil {
25865		objectMap["privateDnsZoneConfigs"] = pdzgpf.PrivateDNSZoneConfigs
25866	}
25867	return json.Marshal(objectMap)
25868}
25869
25870// PrivateDNSZoneGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25871// long-running operation.
25872type PrivateDNSZoneGroupsCreateOrUpdateFuture struct {
25873	azure.FutureAPI
25874	// Result returns the result of the asynchronous operation.
25875	// If the operation has not completed it will return an error.
25876	Result func(PrivateDNSZoneGroupsClient) (PrivateDNSZoneGroup, error)
25877}
25878
25879// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25880func (future *PrivateDNSZoneGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
25881	var azFuture azure.Future
25882	if err := json.Unmarshal(body, &azFuture); err != nil {
25883		return err
25884	}
25885	future.FutureAPI = &azFuture
25886	future.Result = future.result
25887	return nil
25888}
25889
25890// result is the default implementation for PrivateDNSZoneGroupsCreateOrUpdateFuture.Result.
25891func (future *PrivateDNSZoneGroupsCreateOrUpdateFuture) result(client PrivateDNSZoneGroupsClient) (pdzg PrivateDNSZoneGroup, err error) {
25892	var done bool
25893	done, err = future.DoneWithContext(context.Background(), client)
25894	if err != nil {
25895		err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
25896		return
25897	}
25898	if !done {
25899		pdzg.Response.Response = future.Response()
25900		err = azure.NewAsyncOpIncompleteError("network.PrivateDNSZoneGroupsCreateOrUpdateFuture")
25901		return
25902	}
25903	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25904	if pdzg.Response.Response, err = future.GetResult(sender); err == nil && pdzg.Response.Response.StatusCode != http.StatusNoContent {
25905		pdzg, err = client.CreateOrUpdateResponder(pdzg.Response.Response)
25906		if err != nil {
25907			err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsCreateOrUpdateFuture", "Result", pdzg.Response.Response, "Failure responding to request")
25908		}
25909	}
25910	return
25911}
25912
25913// PrivateDNSZoneGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
25914// long-running operation.
25915type PrivateDNSZoneGroupsDeleteFuture struct {
25916	azure.FutureAPI
25917	// Result returns the result of the asynchronous operation.
25918	// If the operation has not completed it will return an error.
25919	Result func(PrivateDNSZoneGroupsClient) (autorest.Response, error)
25920}
25921
25922// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25923func (future *PrivateDNSZoneGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
25924	var azFuture azure.Future
25925	if err := json.Unmarshal(body, &azFuture); err != nil {
25926		return err
25927	}
25928	future.FutureAPI = &azFuture
25929	future.Result = future.result
25930	return nil
25931}
25932
25933// result is the default implementation for PrivateDNSZoneGroupsDeleteFuture.Result.
25934func (future *PrivateDNSZoneGroupsDeleteFuture) result(client PrivateDNSZoneGroupsClient) (ar autorest.Response, err error) {
25935	var done bool
25936	done, err = future.DoneWithContext(context.Background(), client)
25937	if err != nil {
25938		err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
25939		return
25940	}
25941	if !done {
25942		ar.Response = future.Response()
25943		err = azure.NewAsyncOpIncompleteError("network.PrivateDNSZoneGroupsDeleteFuture")
25944		return
25945	}
25946	ar.Response = future.Response()
25947	return
25948}
25949
25950// PrivateDNSZonePropertiesFormat properties of the private dns zone configuration resource.
25951type PrivateDNSZonePropertiesFormat struct {
25952	// PrivateDNSZoneID - The resource id of the private dns zone.
25953	PrivateDNSZoneID *string `json:"privateDnsZoneId,omitempty"`
25954	// RecordSets - READ-ONLY; A collection of information regarding a recordSet, holding information to identify private resources.
25955	RecordSets *[]RecordSet `json:"recordSets,omitempty"`
25956}
25957
25958// MarshalJSON is the custom marshaler for PrivateDNSZonePropertiesFormat.
25959func (pdzpf PrivateDNSZonePropertiesFormat) MarshalJSON() ([]byte, error) {
25960	objectMap := make(map[string]interface{})
25961	if pdzpf.PrivateDNSZoneID != nil {
25962		objectMap["privateDnsZoneId"] = pdzpf.PrivateDNSZoneID
25963	}
25964	return json.Marshal(objectMap)
25965}
25966
25967// PrivateEndpoint private endpoint resource.
25968type PrivateEndpoint struct {
25969	autorest.Response `json:"-"`
25970	// PrivateEndpointProperties - Properties of the private endpoint.
25971	*PrivateEndpointProperties `json:"properties,omitempty"`
25972	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
25973	Etag *string `json:"etag,omitempty"`
25974	// ID - Resource ID.
25975	ID *string `json:"id,omitempty"`
25976	// Name - READ-ONLY; Resource name.
25977	Name *string `json:"name,omitempty"`
25978	// Type - READ-ONLY; Resource type.
25979	Type *string `json:"type,omitempty"`
25980	// Location - Resource location.
25981	Location *string `json:"location,omitempty"`
25982	// Tags - Resource tags.
25983	Tags map[string]*string `json:"tags"`
25984}
25985
25986// MarshalJSON is the custom marshaler for PrivateEndpoint.
25987func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
25988	objectMap := make(map[string]interface{})
25989	if peVar.PrivateEndpointProperties != nil {
25990		objectMap["properties"] = peVar.PrivateEndpointProperties
25991	}
25992	if peVar.ID != nil {
25993		objectMap["id"] = peVar.ID
25994	}
25995	if peVar.Location != nil {
25996		objectMap["location"] = peVar.Location
25997	}
25998	if peVar.Tags != nil {
25999		objectMap["tags"] = peVar.Tags
26000	}
26001	return json.Marshal(objectMap)
26002}
26003
26004// UnmarshalJSON is the custom unmarshaler for PrivateEndpoint struct.
26005func (peVar *PrivateEndpoint) UnmarshalJSON(body []byte) error {
26006	var m map[string]*json.RawMessage
26007	err := json.Unmarshal(body, &m)
26008	if err != nil {
26009		return err
26010	}
26011	for k, v := range m {
26012		switch k {
26013		case "properties":
26014			if v != nil {
26015				var privateEndpointProperties PrivateEndpointProperties
26016				err = json.Unmarshal(*v, &privateEndpointProperties)
26017				if err != nil {
26018					return err
26019				}
26020				peVar.PrivateEndpointProperties = &privateEndpointProperties
26021			}
26022		case "etag":
26023			if v != nil {
26024				var etag string
26025				err = json.Unmarshal(*v, &etag)
26026				if err != nil {
26027					return err
26028				}
26029				peVar.Etag = &etag
26030			}
26031		case "id":
26032			if v != nil {
26033				var ID string
26034				err = json.Unmarshal(*v, &ID)
26035				if err != nil {
26036					return err
26037				}
26038				peVar.ID = &ID
26039			}
26040		case "name":
26041			if v != nil {
26042				var name string
26043				err = json.Unmarshal(*v, &name)
26044				if err != nil {
26045					return err
26046				}
26047				peVar.Name = &name
26048			}
26049		case "type":
26050			if v != nil {
26051				var typeVar string
26052				err = json.Unmarshal(*v, &typeVar)
26053				if err != nil {
26054					return err
26055				}
26056				peVar.Type = &typeVar
26057			}
26058		case "location":
26059			if v != nil {
26060				var location string
26061				err = json.Unmarshal(*v, &location)
26062				if err != nil {
26063					return err
26064				}
26065				peVar.Location = &location
26066			}
26067		case "tags":
26068			if v != nil {
26069				var tags map[string]*string
26070				err = json.Unmarshal(*v, &tags)
26071				if err != nil {
26072					return err
26073				}
26074				peVar.Tags = tags
26075			}
26076		}
26077	}
26078
26079	return nil
26080}
26081
26082// PrivateEndpointConnection privateEndpointConnection resource.
26083type PrivateEndpointConnection struct {
26084	autorest.Response `json:"-"`
26085	// PrivateEndpointConnectionProperties - Properties of the private end point connection.
26086	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
26087	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
26088	Name *string `json:"name,omitempty"`
26089	// Type - READ-ONLY; The resource type.
26090	Type *string `json:"type,omitempty"`
26091	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26092	Etag *string `json:"etag,omitempty"`
26093	// ID - Resource ID.
26094	ID *string `json:"id,omitempty"`
26095}
26096
26097// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
26098func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
26099	objectMap := make(map[string]interface{})
26100	if pec.PrivateEndpointConnectionProperties != nil {
26101		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
26102	}
26103	if pec.Name != nil {
26104		objectMap["name"] = pec.Name
26105	}
26106	if pec.ID != nil {
26107		objectMap["id"] = pec.ID
26108	}
26109	return json.Marshal(objectMap)
26110}
26111
26112// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
26113func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
26114	var m map[string]*json.RawMessage
26115	err := json.Unmarshal(body, &m)
26116	if err != nil {
26117		return err
26118	}
26119	for k, v := range m {
26120		switch k {
26121		case "properties":
26122			if v != nil {
26123				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
26124				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
26125				if err != nil {
26126					return err
26127				}
26128				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
26129			}
26130		case "name":
26131			if v != nil {
26132				var name string
26133				err = json.Unmarshal(*v, &name)
26134				if err != nil {
26135					return err
26136				}
26137				pec.Name = &name
26138			}
26139		case "type":
26140			if v != nil {
26141				var typeVar string
26142				err = json.Unmarshal(*v, &typeVar)
26143				if err != nil {
26144					return err
26145				}
26146				pec.Type = &typeVar
26147			}
26148		case "etag":
26149			if v != nil {
26150				var etag string
26151				err = json.Unmarshal(*v, &etag)
26152				if err != nil {
26153					return err
26154				}
26155				pec.Etag = &etag
26156			}
26157		case "id":
26158			if v != nil {
26159				var ID string
26160				err = json.Unmarshal(*v, &ID)
26161				if err != nil {
26162					return err
26163				}
26164				pec.ID = &ID
26165			}
26166		}
26167	}
26168
26169	return nil
26170}
26171
26172// PrivateEndpointConnectionListResult response for the ListPrivateEndpointConnection API service call.
26173type PrivateEndpointConnectionListResult struct {
26174	autorest.Response `json:"-"`
26175	// Value - A list of PrivateEndpointConnection resources for a specific private link service.
26176	Value *[]PrivateEndpointConnection `json:"value,omitempty"`
26177	// NextLink - READ-ONLY; The URL to get the next set of results.
26178	NextLink *string `json:"nextLink,omitempty"`
26179}
26180
26181// MarshalJSON is the custom marshaler for PrivateEndpointConnectionListResult.
26182func (peclr PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) {
26183	objectMap := make(map[string]interface{})
26184	if peclr.Value != nil {
26185		objectMap["value"] = peclr.Value
26186	}
26187	return json.Marshal(objectMap)
26188}
26189
26190// PrivateEndpointConnectionListResultIterator provides access to a complete listing of
26191// PrivateEndpointConnection values.
26192type PrivateEndpointConnectionListResultIterator struct {
26193	i    int
26194	page PrivateEndpointConnectionListResultPage
26195}
26196
26197// NextWithContext advances to the next value.  If there was an error making
26198// the request the iterator does not advance and the error is returned.
26199func (iter *PrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
26200	if tracing.IsEnabled() {
26201		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultIterator.NextWithContext")
26202		defer func() {
26203			sc := -1
26204			if iter.Response().Response.Response != nil {
26205				sc = iter.Response().Response.Response.StatusCode
26206			}
26207			tracing.EndSpan(ctx, sc, err)
26208		}()
26209	}
26210	iter.i++
26211	if iter.i < len(iter.page.Values()) {
26212		return nil
26213	}
26214	err = iter.page.NextWithContext(ctx)
26215	if err != nil {
26216		iter.i--
26217		return err
26218	}
26219	iter.i = 0
26220	return nil
26221}
26222
26223// Next advances to the next value.  If there was an error making
26224// the request the iterator does not advance and the error is returned.
26225// Deprecated: Use NextWithContext() instead.
26226func (iter *PrivateEndpointConnectionListResultIterator) Next() error {
26227	return iter.NextWithContext(context.Background())
26228}
26229
26230// NotDone returns true if the enumeration should be started or is not yet complete.
26231func (iter PrivateEndpointConnectionListResultIterator) NotDone() bool {
26232	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26233}
26234
26235// Response returns the raw server response from the last page request.
26236func (iter PrivateEndpointConnectionListResultIterator) Response() PrivateEndpointConnectionListResult {
26237	return iter.page.Response()
26238}
26239
26240// Value returns the current value or a zero-initialized value if the
26241// iterator has advanced beyond the end of the collection.
26242func (iter PrivateEndpointConnectionListResultIterator) Value() PrivateEndpointConnection {
26243	if !iter.page.NotDone() {
26244		return PrivateEndpointConnection{}
26245	}
26246	return iter.page.Values()[iter.i]
26247}
26248
26249// Creates a new instance of the PrivateEndpointConnectionListResultIterator type.
26250func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator {
26251	return PrivateEndpointConnectionListResultIterator{page: page}
26252}
26253
26254// IsEmpty returns true if the ListResult contains no values.
26255func (peclr PrivateEndpointConnectionListResult) IsEmpty() bool {
26256	return peclr.Value == nil || len(*peclr.Value) == 0
26257}
26258
26259// hasNextLink returns true if the NextLink is not empty.
26260func (peclr PrivateEndpointConnectionListResult) hasNextLink() bool {
26261	return peclr.NextLink != nil && len(*peclr.NextLink) != 0
26262}
26263
26264// privateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results.
26265// It returns nil if no more results exist.
26266func (peclr PrivateEndpointConnectionListResult) privateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
26267	if !peclr.hasNextLink() {
26268		return nil, nil
26269	}
26270	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26271		autorest.AsJSON(),
26272		autorest.AsGet(),
26273		autorest.WithBaseURL(to.String(peclr.NextLink)))
26274}
26275
26276// PrivateEndpointConnectionListResultPage contains a page of PrivateEndpointConnection values.
26277type PrivateEndpointConnectionListResultPage struct {
26278	fn    func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)
26279	peclr PrivateEndpointConnectionListResult
26280}
26281
26282// NextWithContext advances to the next page of values.  If there was an error making
26283// the request the page does not advance and the error is returned.
26284func (page *PrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
26285	if tracing.IsEnabled() {
26286		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultPage.NextWithContext")
26287		defer func() {
26288			sc := -1
26289			if page.Response().Response.Response != nil {
26290				sc = page.Response().Response.Response.StatusCode
26291			}
26292			tracing.EndSpan(ctx, sc, err)
26293		}()
26294	}
26295	for {
26296		next, err := page.fn(ctx, page.peclr)
26297		if err != nil {
26298			return err
26299		}
26300		page.peclr = next
26301		if !next.hasNextLink() || !next.IsEmpty() {
26302			break
26303		}
26304	}
26305	return nil
26306}
26307
26308// Next advances to the next page of values.  If there was an error making
26309// the request the page does not advance and the error is returned.
26310// Deprecated: Use NextWithContext() instead.
26311func (page *PrivateEndpointConnectionListResultPage) Next() error {
26312	return page.NextWithContext(context.Background())
26313}
26314
26315// NotDone returns true if the page enumeration should be started or is not yet complete.
26316func (page PrivateEndpointConnectionListResultPage) NotDone() bool {
26317	return !page.peclr.IsEmpty()
26318}
26319
26320// Response returns the raw server response from the last page request.
26321func (page PrivateEndpointConnectionListResultPage) Response() PrivateEndpointConnectionListResult {
26322	return page.peclr
26323}
26324
26325// Values returns the slice of values for the current page or nil if there are no values.
26326func (page PrivateEndpointConnectionListResultPage) Values() []PrivateEndpointConnection {
26327	if page.peclr.IsEmpty() {
26328		return nil
26329	}
26330	return *page.peclr.Value
26331}
26332
26333// Creates a new instance of the PrivateEndpointConnectionListResultPage type.
26334func NewPrivateEndpointConnectionListResultPage(cur PrivateEndpointConnectionListResult, getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage {
26335	return PrivateEndpointConnectionListResultPage{
26336		fn:    getNextPage,
26337		peclr: cur,
26338	}
26339}
26340
26341// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
26342type PrivateEndpointConnectionProperties struct {
26343	// PrivateEndpoint - READ-ONLY; The resource of private end point.
26344	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
26345	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
26346	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
26347	// ProvisioningState - READ-ONLY; The provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26348	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26349	// LinkIdentifier - READ-ONLY; The consumer link id.
26350	LinkIdentifier *string `json:"linkIdentifier,omitempty"`
26351}
26352
26353// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties.
26354func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) {
26355	objectMap := make(map[string]interface{})
26356	if pecp.PrivateLinkServiceConnectionState != nil {
26357		objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState
26358	}
26359	return json.Marshal(objectMap)
26360}
26361
26362// PrivateEndpointListResult response for the ListPrivateEndpoints API service call.
26363type PrivateEndpointListResult struct {
26364	autorest.Response `json:"-"`
26365	// Value - A list of private endpoint resources in a resource group.
26366	Value *[]PrivateEndpoint `json:"value,omitempty"`
26367	// NextLink - READ-ONLY; The URL to get the next set of results.
26368	NextLink *string `json:"nextLink,omitempty"`
26369}
26370
26371// MarshalJSON is the custom marshaler for PrivateEndpointListResult.
26372func (pelr PrivateEndpointListResult) MarshalJSON() ([]byte, error) {
26373	objectMap := make(map[string]interface{})
26374	if pelr.Value != nil {
26375		objectMap["value"] = pelr.Value
26376	}
26377	return json.Marshal(objectMap)
26378}
26379
26380// PrivateEndpointListResultIterator provides access to a complete listing of PrivateEndpoint values.
26381type PrivateEndpointListResultIterator struct {
26382	i    int
26383	page PrivateEndpointListResultPage
26384}
26385
26386// NextWithContext advances to the next value.  If there was an error making
26387// the request the iterator does not advance and the error is returned.
26388func (iter *PrivateEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
26389	if tracing.IsEnabled() {
26390		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultIterator.NextWithContext")
26391		defer func() {
26392			sc := -1
26393			if iter.Response().Response.Response != nil {
26394				sc = iter.Response().Response.Response.StatusCode
26395			}
26396			tracing.EndSpan(ctx, sc, err)
26397		}()
26398	}
26399	iter.i++
26400	if iter.i < len(iter.page.Values()) {
26401		return nil
26402	}
26403	err = iter.page.NextWithContext(ctx)
26404	if err != nil {
26405		iter.i--
26406		return err
26407	}
26408	iter.i = 0
26409	return nil
26410}
26411
26412// Next advances to the next value.  If there was an error making
26413// the request the iterator does not advance and the error is returned.
26414// Deprecated: Use NextWithContext() instead.
26415func (iter *PrivateEndpointListResultIterator) Next() error {
26416	return iter.NextWithContext(context.Background())
26417}
26418
26419// NotDone returns true if the enumeration should be started or is not yet complete.
26420func (iter PrivateEndpointListResultIterator) NotDone() bool {
26421	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26422}
26423
26424// Response returns the raw server response from the last page request.
26425func (iter PrivateEndpointListResultIterator) Response() PrivateEndpointListResult {
26426	return iter.page.Response()
26427}
26428
26429// Value returns the current value or a zero-initialized value if the
26430// iterator has advanced beyond the end of the collection.
26431func (iter PrivateEndpointListResultIterator) Value() PrivateEndpoint {
26432	if !iter.page.NotDone() {
26433		return PrivateEndpoint{}
26434	}
26435	return iter.page.Values()[iter.i]
26436}
26437
26438// Creates a new instance of the PrivateEndpointListResultIterator type.
26439func NewPrivateEndpointListResultIterator(page PrivateEndpointListResultPage) PrivateEndpointListResultIterator {
26440	return PrivateEndpointListResultIterator{page: page}
26441}
26442
26443// IsEmpty returns true if the ListResult contains no values.
26444func (pelr PrivateEndpointListResult) IsEmpty() bool {
26445	return pelr.Value == nil || len(*pelr.Value) == 0
26446}
26447
26448// hasNextLink returns true if the NextLink is not empty.
26449func (pelr PrivateEndpointListResult) hasNextLink() bool {
26450	return pelr.NextLink != nil && len(*pelr.NextLink) != 0
26451}
26452
26453// privateEndpointListResultPreparer prepares a request to retrieve the next set of results.
26454// It returns nil if no more results exist.
26455func (pelr PrivateEndpointListResult) privateEndpointListResultPreparer(ctx context.Context) (*http.Request, error) {
26456	if !pelr.hasNextLink() {
26457		return nil, nil
26458	}
26459	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26460		autorest.AsJSON(),
26461		autorest.AsGet(),
26462		autorest.WithBaseURL(to.String(pelr.NextLink)))
26463}
26464
26465// PrivateEndpointListResultPage contains a page of PrivateEndpoint values.
26466type PrivateEndpointListResultPage struct {
26467	fn   func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)
26468	pelr PrivateEndpointListResult
26469}
26470
26471// NextWithContext advances to the next page of values.  If there was an error making
26472// the request the page does not advance and the error is returned.
26473func (page *PrivateEndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
26474	if tracing.IsEnabled() {
26475		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultPage.NextWithContext")
26476		defer func() {
26477			sc := -1
26478			if page.Response().Response.Response != nil {
26479				sc = page.Response().Response.Response.StatusCode
26480			}
26481			tracing.EndSpan(ctx, sc, err)
26482		}()
26483	}
26484	for {
26485		next, err := page.fn(ctx, page.pelr)
26486		if err != nil {
26487			return err
26488		}
26489		page.pelr = next
26490		if !next.hasNextLink() || !next.IsEmpty() {
26491			break
26492		}
26493	}
26494	return nil
26495}
26496
26497// Next advances to the next page of values.  If there was an error making
26498// the request the page does not advance and the error is returned.
26499// Deprecated: Use NextWithContext() instead.
26500func (page *PrivateEndpointListResultPage) Next() error {
26501	return page.NextWithContext(context.Background())
26502}
26503
26504// NotDone returns true if the page enumeration should be started or is not yet complete.
26505func (page PrivateEndpointListResultPage) NotDone() bool {
26506	return !page.pelr.IsEmpty()
26507}
26508
26509// Response returns the raw server response from the last page request.
26510func (page PrivateEndpointListResultPage) Response() PrivateEndpointListResult {
26511	return page.pelr
26512}
26513
26514// Values returns the slice of values for the current page or nil if there are no values.
26515func (page PrivateEndpointListResultPage) Values() []PrivateEndpoint {
26516	if page.pelr.IsEmpty() {
26517		return nil
26518	}
26519	return *page.pelr.Value
26520}
26521
26522// Creates a new instance of the PrivateEndpointListResultPage type.
26523func NewPrivateEndpointListResultPage(cur PrivateEndpointListResult, getNextPage func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)) PrivateEndpointListResultPage {
26524	return PrivateEndpointListResultPage{
26525		fn:   getNextPage,
26526		pelr: cur,
26527	}
26528}
26529
26530// PrivateEndpointProperties properties of the private endpoint.
26531type PrivateEndpointProperties struct {
26532	// Subnet - The ID of the subnet from which the private IP will be allocated.
26533	Subnet *Subnet `json:"subnet,omitempty"`
26534	// NetworkInterfaces - READ-ONLY; An array of references to the network interfaces created for this private endpoint.
26535	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
26536	// ProvisioningState - READ-ONLY; The provisioning state of the private endpoint resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26537	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26538	// PrivateLinkServiceConnections - A grouping of information about the connection to the remote resource.
26539	PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"`
26540	// 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.
26541	ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"`
26542	// CustomDNSConfigs - An array of custom dns configurations.
26543	CustomDNSConfigs *[]CustomDNSConfigPropertiesFormat `json:"customDnsConfigs,omitempty"`
26544}
26545
26546// MarshalJSON is the custom marshaler for PrivateEndpointProperties.
26547func (pep PrivateEndpointProperties) MarshalJSON() ([]byte, error) {
26548	objectMap := make(map[string]interface{})
26549	if pep.Subnet != nil {
26550		objectMap["subnet"] = pep.Subnet
26551	}
26552	if pep.PrivateLinkServiceConnections != nil {
26553		objectMap["privateLinkServiceConnections"] = pep.PrivateLinkServiceConnections
26554	}
26555	if pep.ManualPrivateLinkServiceConnections != nil {
26556		objectMap["manualPrivateLinkServiceConnections"] = pep.ManualPrivateLinkServiceConnections
26557	}
26558	if pep.CustomDNSConfigs != nil {
26559		objectMap["customDnsConfigs"] = pep.CustomDNSConfigs
26560	}
26561	return json.Marshal(objectMap)
26562}
26563
26564// PrivateEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
26565// long-running operation.
26566type PrivateEndpointsCreateOrUpdateFuture struct {
26567	azure.FutureAPI
26568	// Result returns the result of the asynchronous operation.
26569	// If the operation has not completed it will return an error.
26570	Result func(PrivateEndpointsClient) (PrivateEndpoint, error)
26571}
26572
26573// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26574func (future *PrivateEndpointsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
26575	var azFuture azure.Future
26576	if err := json.Unmarshal(body, &azFuture); err != nil {
26577		return err
26578	}
26579	future.FutureAPI = &azFuture
26580	future.Result = future.result
26581	return nil
26582}
26583
26584// result is the default implementation for PrivateEndpointsCreateOrUpdateFuture.Result.
26585func (future *PrivateEndpointsCreateOrUpdateFuture) result(client PrivateEndpointsClient) (peVar PrivateEndpoint, err error) {
26586	var done bool
26587	done, err = future.DoneWithContext(context.Background(), client)
26588	if err != nil {
26589		err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
26590		return
26591	}
26592	if !done {
26593		peVar.Response.Response = future.Response()
26594		err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsCreateOrUpdateFuture")
26595		return
26596	}
26597	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26598	if peVar.Response.Response, err = future.GetResult(sender); err == nil && peVar.Response.Response.StatusCode != http.StatusNoContent {
26599		peVar, err = client.CreateOrUpdateResponder(peVar.Response.Response)
26600		if err != nil {
26601			err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", peVar.Response.Response, "Failure responding to request")
26602		}
26603	}
26604	return
26605}
26606
26607// PrivateEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26608// operation.
26609type PrivateEndpointsDeleteFuture struct {
26610	azure.FutureAPI
26611	// Result returns the result of the asynchronous operation.
26612	// If the operation has not completed it will return an error.
26613	Result func(PrivateEndpointsClient) (autorest.Response, error)
26614}
26615
26616// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26617func (future *PrivateEndpointsDeleteFuture) UnmarshalJSON(body []byte) error {
26618	var azFuture azure.Future
26619	if err := json.Unmarshal(body, &azFuture); err != nil {
26620		return err
26621	}
26622	future.FutureAPI = &azFuture
26623	future.Result = future.result
26624	return nil
26625}
26626
26627// result is the default implementation for PrivateEndpointsDeleteFuture.Result.
26628func (future *PrivateEndpointsDeleteFuture) result(client PrivateEndpointsClient) (ar autorest.Response, err error) {
26629	var done bool
26630	done, err = future.DoneWithContext(context.Background(), client)
26631	if err != nil {
26632		err = autorest.NewErrorWithError(err, "network.PrivateEndpointsDeleteFuture", "Result", future.Response(), "Polling failure")
26633		return
26634	}
26635	if !done {
26636		ar.Response = future.Response()
26637		err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsDeleteFuture")
26638		return
26639	}
26640	ar.Response = future.Response()
26641	return
26642}
26643
26644// PrivateLinkService private link service resource.
26645type PrivateLinkService struct {
26646	autorest.Response `json:"-"`
26647	// PrivateLinkServiceProperties - Properties of the private link service.
26648	*PrivateLinkServiceProperties `json:"properties,omitempty"`
26649	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26650	Etag *string `json:"etag,omitempty"`
26651	// ID - Resource ID.
26652	ID *string `json:"id,omitempty"`
26653	// Name - READ-ONLY; Resource name.
26654	Name *string `json:"name,omitempty"`
26655	// Type - READ-ONLY; Resource type.
26656	Type *string `json:"type,omitempty"`
26657	// Location - Resource location.
26658	Location *string `json:"location,omitempty"`
26659	// Tags - Resource tags.
26660	Tags map[string]*string `json:"tags"`
26661}
26662
26663// MarshalJSON is the custom marshaler for PrivateLinkService.
26664func (pls PrivateLinkService) MarshalJSON() ([]byte, error) {
26665	objectMap := make(map[string]interface{})
26666	if pls.PrivateLinkServiceProperties != nil {
26667		objectMap["properties"] = pls.PrivateLinkServiceProperties
26668	}
26669	if pls.ID != nil {
26670		objectMap["id"] = pls.ID
26671	}
26672	if pls.Location != nil {
26673		objectMap["location"] = pls.Location
26674	}
26675	if pls.Tags != nil {
26676		objectMap["tags"] = pls.Tags
26677	}
26678	return json.Marshal(objectMap)
26679}
26680
26681// UnmarshalJSON is the custom unmarshaler for PrivateLinkService struct.
26682func (pls *PrivateLinkService) UnmarshalJSON(body []byte) error {
26683	var m map[string]*json.RawMessage
26684	err := json.Unmarshal(body, &m)
26685	if err != nil {
26686		return err
26687	}
26688	for k, v := range m {
26689		switch k {
26690		case "properties":
26691			if v != nil {
26692				var privateLinkServiceProperties PrivateLinkServiceProperties
26693				err = json.Unmarshal(*v, &privateLinkServiceProperties)
26694				if err != nil {
26695					return err
26696				}
26697				pls.PrivateLinkServiceProperties = &privateLinkServiceProperties
26698			}
26699		case "etag":
26700			if v != nil {
26701				var etag string
26702				err = json.Unmarshal(*v, &etag)
26703				if err != nil {
26704					return err
26705				}
26706				pls.Etag = &etag
26707			}
26708		case "id":
26709			if v != nil {
26710				var ID string
26711				err = json.Unmarshal(*v, &ID)
26712				if err != nil {
26713					return err
26714				}
26715				pls.ID = &ID
26716			}
26717		case "name":
26718			if v != nil {
26719				var name string
26720				err = json.Unmarshal(*v, &name)
26721				if err != nil {
26722					return err
26723				}
26724				pls.Name = &name
26725			}
26726		case "type":
26727			if v != nil {
26728				var typeVar string
26729				err = json.Unmarshal(*v, &typeVar)
26730				if err != nil {
26731					return err
26732				}
26733				pls.Type = &typeVar
26734			}
26735		case "location":
26736			if v != nil {
26737				var location string
26738				err = json.Unmarshal(*v, &location)
26739				if err != nil {
26740					return err
26741				}
26742				pls.Location = &location
26743			}
26744		case "tags":
26745			if v != nil {
26746				var tags map[string]*string
26747				err = json.Unmarshal(*v, &tags)
26748				if err != nil {
26749					return err
26750				}
26751				pls.Tags = tags
26752			}
26753		}
26754	}
26755
26756	return nil
26757}
26758
26759// PrivateLinkServiceConnection privateLinkServiceConnection resource.
26760type PrivateLinkServiceConnection struct {
26761	// PrivateLinkServiceConnectionProperties - Properties of the private link service connection.
26762	*PrivateLinkServiceConnectionProperties `json:"properties,omitempty"`
26763	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
26764	Name *string `json:"name,omitempty"`
26765	// Type - READ-ONLY; The resource type.
26766	Type *string `json:"type,omitempty"`
26767	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26768	Etag *string `json:"etag,omitempty"`
26769	// ID - Resource ID.
26770	ID *string `json:"id,omitempty"`
26771}
26772
26773// MarshalJSON is the custom marshaler for PrivateLinkServiceConnection.
26774func (plsc PrivateLinkServiceConnection) MarshalJSON() ([]byte, error) {
26775	objectMap := make(map[string]interface{})
26776	if plsc.PrivateLinkServiceConnectionProperties != nil {
26777		objectMap["properties"] = plsc.PrivateLinkServiceConnectionProperties
26778	}
26779	if plsc.Name != nil {
26780		objectMap["name"] = plsc.Name
26781	}
26782	if plsc.ID != nil {
26783		objectMap["id"] = plsc.ID
26784	}
26785	return json.Marshal(objectMap)
26786}
26787
26788// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceConnection struct.
26789func (plsc *PrivateLinkServiceConnection) UnmarshalJSON(body []byte) error {
26790	var m map[string]*json.RawMessage
26791	err := json.Unmarshal(body, &m)
26792	if err != nil {
26793		return err
26794	}
26795	for k, v := range m {
26796		switch k {
26797		case "properties":
26798			if v != nil {
26799				var privateLinkServiceConnectionProperties PrivateLinkServiceConnectionProperties
26800				err = json.Unmarshal(*v, &privateLinkServiceConnectionProperties)
26801				if err != nil {
26802					return err
26803				}
26804				plsc.PrivateLinkServiceConnectionProperties = &privateLinkServiceConnectionProperties
26805			}
26806		case "name":
26807			if v != nil {
26808				var name string
26809				err = json.Unmarshal(*v, &name)
26810				if err != nil {
26811					return err
26812				}
26813				plsc.Name = &name
26814			}
26815		case "type":
26816			if v != nil {
26817				var typeVar string
26818				err = json.Unmarshal(*v, &typeVar)
26819				if err != nil {
26820					return err
26821				}
26822				plsc.Type = &typeVar
26823			}
26824		case "etag":
26825			if v != nil {
26826				var etag string
26827				err = json.Unmarshal(*v, &etag)
26828				if err != nil {
26829					return err
26830				}
26831				plsc.Etag = &etag
26832			}
26833		case "id":
26834			if v != nil {
26835				var ID string
26836				err = json.Unmarshal(*v, &ID)
26837				if err != nil {
26838					return err
26839				}
26840				plsc.ID = &ID
26841			}
26842		}
26843	}
26844
26845	return nil
26846}
26847
26848// PrivateLinkServiceConnectionProperties properties of the PrivateLinkServiceConnection.
26849type PrivateLinkServiceConnectionProperties struct {
26850	// ProvisioningState - READ-ONLY; The provisioning state of the private link service connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26851	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26852	// PrivateLinkServiceID - The resource id of private link service.
26853	PrivateLinkServiceID *string `json:"privateLinkServiceId,omitempty"`
26854	// GroupIds - The ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to.
26855	GroupIds *[]string `json:"groupIds,omitempty"`
26856	// RequestMessage - A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars.
26857	RequestMessage *string `json:"requestMessage,omitempty"`
26858	// PrivateLinkServiceConnectionState - A collection of read-only information about the state of the connection to the remote resource.
26859	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
26860}
26861
26862// MarshalJSON is the custom marshaler for PrivateLinkServiceConnectionProperties.
26863func (plscp PrivateLinkServiceConnectionProperties) MarshalJSON() ([]byte, error) {
26864	objectMap := make(map[string]interface{})
26865	if plscp.PrivateLinkServiceID != nil {
26866		objectMap["privateLinkServiceId"] = plscp.PrivateLinkServiceID
26867	}
26868	if plscp.GroupIds != nil {
26869		objectMap["groupIds"] = plscp.GroupIds
26870	}
26871	if plscp.RequestMessage != nil {
26872		objectMap["requestMessage"] = plscp.RequestMessage
26873	}
26874	if plscp.PrivateLinkServiceConnectionState != nil {
26875		objectMap["privateLinkServiceConnectionState"] = plscp.PrivateLinkServiceConnectionState
26876	}
26877	return json.Marshal(objectMap)
26878}
26879
26880// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
26881// service consumer and provider.
26882type PrivateLinkServiceConnectionState struct {
26883	// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
26884	Status *string `json:"status,omitempty"`
26885	// Description - The reason for approval/rejection of the connection.
26886	Description *string `json:"description,omitempty"`
26887	// ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
26888	ActionsRequired *string `json:"actionsRequired,omitempty"`
26889}
26890
26891// PrivateLinkServiceIPConfiguration the private link service ip configuration.
26892type PrivateLinkServiceIPConfiguration struct {
26893	// PrivateLinkServiceIPConfigurationProperties - Properties of the private link service ip configuration.
26894	*PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"`
26895	// Name - The name of private link service ip configuration.
26896	Name *string `json:"name,omitempty"`
26897	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26898	Etag *string `json:"etag,omitempty"`
26899	// Type - READ-ONLY; The resource type.
26900	Type *string `json:"type,omitempty"`
26901	// ID - Resource ID.
26902	ID *string `json:"id,omitempty"`
26903}
26904
26905// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfiguration.
26906func (plsic PrivateLinkServiceIPConfiguration) MarshalJSON() ([]byte, error) {
26907	objectMap := make(map[string]interface{})
26908	if plsic.PrivateLinkServiceIPConfigurationProperties != nil {
26909		objectMap["properties"] = plsic.PrivateLinkServiceIPConfigurationProperties
26910	}
26911	if plsic.Name != nil {
26912		objectMap["name"] = plsic.Name
26913	}
26914	if plsic.ID != nil {
26915		objectMap["id"] = plsic.ID
26916	}
26917	return json.Marshal(objectMap)
26918}
26919
26920// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceIPConfiguration struct.
26921func (plsic *PrivateLinkServiceIPConfiguration) UnmarshalJSON(body []byte) error {
26922	var m map[string]*json.RawMessage
26923	err := json.Unmarshal(body, &m)
26924	if err != nil {
26925		return err
26926	}
26927	for k, v := range m {
26928		switch k {
26929		case "properties":
26930			if v != nil {
26931				var privateLinkServiceIPConfigurationProperties PrivateLinkServiceIPConfigurationProperties
26932				err = json.Unmarshal(*v, &privateLinkServiceIPConfigurationProperties)
26933				if err != nil {
26934					return err
26935				}
26936				plsic.PrivateLinkServiceIPConfigurationProperties = &privateLinkServiceIPConfigurationProperties
26937			}
26938		case "name":
26939			if v != nil {
26940				var name string
26941				err = json.Unmarshal(*v, &name)
26942				if err != nil {
26943					return err
26944				}
26945				plsic.Name = &name
26946			}
26947		case "etag":
26948			if v != nil {
26949				var etag string
26950				err = json.Unmarshal(*v, &etag)
26951				if err != nil {
26952					return err
26953				}
26954				plsic.Etag = &etag
26955			}
26956		case "type":
26957			if v != nil {
26958				var typeVar string
26959				err = json.Unmarshal(*v, &typeVar)
26960				if err != nil {
26961					return err
26962				}
26963				plsic.Type = &typeVar
26964			}
26965		case "id":
26966			if v != nil {
26967				var ID string
26968				err = json.Unmarshal(*v, &ID)
26969				if err != nil {
26970					return err
26971				}
26972				plsic.ID = &ID
26973			}
26974		}
26975	}
26976
26977	return nil
26978}
26979
26980// PrivateLinkServiceIPConfigurationProperties properties of private link service IP configuration.
26981type PrivateLinkServiceIPConfigurationProperties struct {
26982	// PrivateIPAddress - The private IP address of the IP configuration.
26983	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
26984	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
26985	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
26986	// Subnet - The reference to the subnet resource.
26987	Subnet *Subnet `json:"subnet,omitempty"`
26988	// Primary - Whether the ip configuration is primary or not.
26989	Primary *bool `json:"primary,omitempty"`
26990	// ProvisioningState - READ-ONLY; The provisioning state of the private link service IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26991	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26992	// PrivateIPAddressVersion - Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPv4', 'IPv6'
26993	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
26994}
26995
26996// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfigurationProperties.
26997func (plsicp PrivateLinkServiceIPConfigurationProperties) MarshalJSON() ([]byte, error) {
26998	objectMap := make(map[string]interface{})
26999	if plsicp.PrivateIPAddress != nil {
27000		objectMap["privateIPAddress"] = plsicp.PrivateIPAddress
27001	}
27002	if plsicp.PrivateIPAllocationMethod != "" {
27003		objectMap["privateIPAllocationMethod"] = plsicp.PrivateIPAllocationMethod
27004	}
27005	if plsicp.Subnet != nil {
27006		objectMap["subnet"] = plsicp.Subnet
27007	}
27008	if plsicp.Primary != nil {
27009		objectMap["primary"] = plsicp.Primary
27010	}
27011	if plsicp.PrivateIPAddressVersion != "" {
27012		objectMap["privateIPAddressVersion"] = plsicp.PrivateIPAddressVersion
27013	}
27014	return json.Marshal(objectMap)
27015}
27016
27017// PrivateLinkServiceListResult response for the ListPrivateLinkService API service call.
27018type PrivateLinkServiceListResult struct {
27019	autorest.Response `json:"-"`
27020	// Value - A list of PrivateLinkService resources in a resource group.
27021	Value *[]PrivateLinkService `json:"value,omitempty"`
27022	// NextLink - READ-ONLY; The URL to get the next set of results.
27023	NextLink *string `json:"nextLink,omitempty"`
27024}
27025
27026// MarshalJSON is the custom marshaler for PrivateLinkServiceListResult.
27027func (plslr PrivateLinkServiceListResult) MarshalJSON() ([]byte, error) {
27028	objectMap := make(map[string]interface{})
27029	if plslr.Value != nil {
27030		objectMap["value"] = plslr.Value
27031	}
27032	return json.Marshal(objectMap)
27033}
27034
27035// PrivateLinkServiceListResultIterator provides access to a complete listing of PrivateLinkService values.
27036type PrivateLinkServiceListResultIterator struct {
27037	i    int
27038	page PrivateLinkServiceListResultPage
27039}
27040
27041// NextWithContext advances to the next value.  If there was an error making
27042// the request the iterator does not advance and the error is returned.
27043func (iter *PrivateLinkServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
27044	if tracing.IsEnabled() {
27045		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultIterator.NextWithContext")
27046		defer func() {
27047			sc := -1
27048			if iter.Response().Response.Response != nil {
27049				sc = iter.Response().Response.Response.StatusCode
27050			}
27051			tracing.EndSpan(ctx, sc, err)
27052		}()
27053	}
27054	iter.i++
27055	if iter.i < len(iter.page.Values()) {
27056		return nil
27057	}
27058	err = iter.page.NextWithContext(ctx)
27059	if err != nil {
27060		iter.i--
27061		return err
27062	}
27063	iter.i = 0
27064	return nil
27065}
27066
27067// Next advances to the next value.  If there was an error making
27068// the request the iterator does not advance and the error is returned.
27069// Deprecated: Use NextWithContext() instead.
27070func (iter *PrivateLinkServiceListResultIterator) Next() error {
27071	return iter.NextWithContext(context.Background())
27072}
27073
27074// NotDone returns true if the enumeration should be started or is not yet complete.
27075func (iter PrivateLinkServiceListResultIterator) NotDone() bool {
27076	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27077}
27078
27079// Response returns the raw server response from the last page request.
27080func (iter PrivateLinkServiceListResultIterator) Response() PrivateLinkServiceListResult {
27081	return iter.page.Response()
27082}
27083
27084// Value returns the current value or a zero-initialized value if the
27085// iterator has advanced beyond the end of the collection.
27086func (iter PrivateLinkServiceListResultIterator) Value() PrivateLinkService {
27087	if !iter.page.NotDone() {
27088		return PrivateLinkService{}
27089	}
27090	return iter.page.Values()[iter.i]
27091}
27092
27093// Creates a new instance of the PrivateLinkServiceListResultIterator type.
27094func NewPrivateLinkServiceListResultIterator(page PrivateLinkServiceListResultPage) PrivateLinkServiceListResultIterator {
27095	return PrivateLinkServiceListResultIterator{page: page}
27096}
27097
27098// IsEmpty returns true if the ListResult contains no values.
27099func (plslr PrivateLinkServiceListResult) IsEmpty() bool {
27100	return plslr.Value == nil || len(*plslr.Value) == 0
27101}
27102
27103// hasNextLink returns true if the NextLink is not empty.
27104func (plslr PrivateLinkServiceListResult) hasNextLink() bool {
27105	return plslr.NextLink != nil && len(*plslr.NextLink) != 0
27106}
27107
27108// privateLinkServiceListResultPreparer prepares a request to retrieve the next set of results.
27109// It returns nil if no more results exist.
27110func (plslr PrivateLinkServiceListResult) privateLinkServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
27111	if !plslr.hasNextLink() {
27112		return nil, nil
27113	}
27114	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27115		autorest.AsJSON(),
27116		autorest.AsGet(),
27117		autorest.WithBaseURL(to.String(plslr.NextLink)))
27118}
27119
27120// PrivateLinkServiceListResultPage contains a page of PrivateLinkService values.
27121type PrivateLinkServiceListResultPage struct {
27122	fn    func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)
27123	plslr PrivateLinkServiceListResult
27124}
27125
27126// NextWithContext advances to the next page of values.  If there was an error making
27127// the request the page does not advance and the error is returned.
27128func (page *PrivateLinkServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
27129	if tracing.IsEnabled() {
27130		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultPage.NextWithContext")
27131		defer func() {
27132			sc := -1
27133			if page.Response().Response.Response != nil {
27134				sc = page.Response().Response.Response.StatusCode
27135			}
27136			tracing.EndSpan(ctx, sc, err)
27137		}()
27138	}
27139	for {
27140		next, err := page.fn(ctx, page.plslr)
27141		if err != nil {
27142			return err
27143		}
27144		page.plslr = next
27145		if !next.hasNextLink() || !next.IsEmpty() {
27146			break
27147		}
27148	}
27149	return nil
27150}
27151
27152// Next advances to the next page of values.  If there was an error making
27153// the request the page does not advance and the error is returned.
27154// Deprecated: Use NextWithContext() instead.
27155func (page *PrivateLinkServiceListResultPage) Next() error {
27156	return page.NextWithContext(context.Background())
27157}
27158
27159// NotDone returns true if the page enumeration should be started or is not yet complete.
27160func (page PrivateLinkServiceListResultPage) NotDone() bool {
27161	return !page.plslr.IsEmpty()
27162}
27163
27164// Response returns the raw server response from the last page request.
27165func (page PrivateLinkServiceListResultPage) Response() PrivateLinkServiceListResult {
27166	return page.plslr
27167}
27168
27169// Values returns the slice of values for the current page or nil if there are no values.
27170func (page PrivateLinkServiceListResultPage) Values() []PrivateLinkService {
27171	if page.plslr.IsEmpty() {
27172		return nil
27173	}
27174	return *page.plslr.Value
27175}
27176
27177// Creates a new instance of the PrivateLinkServiceListResultPage type.
27178func NewPrivateLinkServiceListResultPage(cur PrivateLinkServiceListResult, getNextPage func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)) PrivateLinkServiceListResultPage {
27179	return PrivateLinkServiceListResultPage{
27180		fn:    getNextPage,
27181		plslr: cur,
27182	}
27183}
27184
27185// PrivateLinkServiceProperties properties of the private link service.
27186type PrivateLinkServiceProperties struct {
27187	// LoadBalancerFrontendIPConfigurations - An array of references to the load balancer IP configurations.
27188	LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"`
27189	// IPConfigurations - An array of private link service IP configurations.
27190	IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"`
27191	// NetworkInterfaces - READ-ONLY; An array of references to the network interfaces created for this private link service.
27192	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
27193	// ProvisioningState - READ-ONLY; The provisioning state of the private link service resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
27194	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27195	// PrivateEndpointConnections - READ-ONLY; An array of list about connections to the private endpoint.
27196	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
27197	// Visibility - The visibility list of the private link service.
27198	Visibility *PrivateLinkServicePropertiesVisibility `json:"visibility,omitempty"`
27199	// AutoApproval - The auto-approval list of the private link service.
27200	AutoApproval *PrivateLinkServicePropertiesAutoApproval `json:"autoApproval,omitempty"`
27201	// Fqdns - The list of Fqdn.
27202	Fqdns *[]string `json:"fqdns,omitempty"`
27203	// Alias - READ-ONLY; The alias of the private link service.
27204	Alias *string `json:"alias,omitempty"`
27205	// EnableProxyProtocol - Whether the private link service is enabled for proxy protocol or not.
27206	EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"`
27207}
27208
27209// MarshalJSON is the custom marshaler for PrivateLinkServiceProperties.
27210func (plsp PrivateLinkServiceProperties) MarshalJSON() ([]byte, error) {
27211	objectMap := make(map[string]interface{})
27212	if plsp.LoadBalancerFrontendIPConfigurations != nil {
27213		objectMap["loadBalancerFrontendIpConfigurations"] = plsp.LoadBalancerFrontendIPConfigurations
27214	}
27215	if plsp.IPConfigurations != nil {
27216		objectMap["ipConfigurations"] = plsp.IPConfigurations
27217	}
27218	if plsp.Visibility != nil {
27219		objectMap["visibility"] = plsp.Visibility
27220	}
27221	if plsp.AutoApproval != nil {
27222		objectMap["autoApproval"] = plsp.AutoApproval
27223	}
27224	if plsp.Fqdns != nil {
27225		objectMap["fqdns"] = plsp.Fqdns
27226	}
27227	if plsp.EnableProxyProtocol != nil {
27228		objectMap["enableProxyProtocol"] = plsp.EnableProxyProtocol
27229	}
27230	return json.Marshal(objectMap)
27231}
27232
27233// PrivateLinkServicePropertiesAutoApproval the auto-approval list of the private link service.
27234type PrivateLinkServicePropertiesAutoApproval struct {
27235	// Subscriptions - The list of subscriptions.
27236	Subscriptions *[]string `json:"subscriptions,omitempty"`
27237}
27238
27239// PrivateLinkServicePropertiesVisibility the visibility list of the private link service.
27240type PrivateLinkServicePropertiesVisibility struct {
27241	// Subscriptions - The list of subscriptions.
27242	Subscriptions *[]string `json:"subscriptions,omitempty"`
27243}
27244
27245// PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture an abstraction for monitoring
27246// and retrieving the results of a long-running operation.
27247type PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture struct {
27248	azure.FutureAPI
27249	// Result returns the result of the asynchronous operation.
27250	// If the operation has not completed it will return an error.
27251	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
27252}
27253
27254// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27255func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture) UnmarshalJSON(body []byte) error {
27256	var azFuture azure.Future
27257	if err := json.Unmarshal(body, &azFuture); err != nil {
27258		return err
27259	}
27260	future.FutureAPI = &azFuture
27261	future.Result = future.result
27262	return nil
27263}
27264
27265// result is the default implementation for PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture.Result.
27266func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture) result(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) {
27267	var done bool
27268	done, err = future.DoneWithContext(context.Background(), client)
27269	if err != nil {
27270		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", future.Response(), "Polling failure")
27271		return
27272	}
27273	if !done {
27274		plsv.Response.Response = future.Response()
27275		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture")
27276		return
27277	}
27278	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27279	if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent {
27280		plsv, err = client.CheckPrivateLinkServiceVisibilityByResourceGroupResponder(plsv.Response.Response)
27281		if err != nil {
27282			err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", plsv.Response.Response, "Failure responding to request")
27283		}
27284	}
27285	return
27286}
27287
27288// PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture an abstraction for monitoring and retrieving
27289// the results of a long-running operation.
27290type PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture struct {
27291	azure.FutureAPI
27292	// Result returns the result of the asynchronous operation.
27293	// If the operation has not completed it will return an error.
27294	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
27295}
27296
27297// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27298func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture) UnmarshalJSON(body []byte) error {
27299	var azFuture azure.Future
27300	if err := json.Unmarshal(body, &azFuture); err != nil {
27301		return err
27302	}
27303	future.FutureAPI = &azFuture
27304	future.Result = future.result
27305	return nil
27306}
27307
27308// result is the default implementation for PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture.Result.
27309func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture) result(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) {
27310	var done bool
27311	done, err = future.DoneWithContext(context.Background(), client)
27312	if err != nil {
27313		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", future.Response(), "Polling failure")
27314		return
27315	}
27316	if !done {
27317		plsv.Response.Response = future.Response()
27318		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture")
27319		return
27320	}
27321	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27322	if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent {
27323		plsv, err = client.CheckPrivateLinkServiceVisibilityResponder(plsv.Response.Response)
27324		if err != nil {
27325			err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", plsv.Response.Response, "Failure responding to request")
27326		}
27327	}
27328	return
27329}
27330
27331// PrivateLinkServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
27332// long-running operation.
27333type PrivateLinkServicesCreateOrUpdateFuture struct {
27334	azure.FutureAPI
27335	// Result returns the result of the asynchronous operation.
27336	// If the operation has not completed it will return an error.
27337	Result func(PrivateLinkServicesClient) (PrivateLinkService, error)
27338}
27339
27340// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27341func (future *PrivateLinkServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
27342	var azFuture azure.Future
27343	if err := json.Unmarshal(body, &azFuture); err != nil {
27344		return err
27345	}
27346	future.FutureAPI = &azFuture
27347	future.Result = future.result
27348	return nil
27349}
27350
27351// result is the default implementation for PrivateLinkServicesCreateOrUpdateFuture.Result.
27352func (future *PrivateLinkServicesCreateOrUpdateFuture) result(client PrivateLinkServicesClient) (pls PrivateLinkService, err error) {
27353	var done bool
27354	done, err = future.DoneWithContext(context.Background(), client)
27355	if err != nil {
27356		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
27357		return
27358	}
27359	if !done {
27360		pls.Response.Response = future.Response()
27361		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCreateOrUpdateFuture")
27362		return
27363	}
27364	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27365	if pls.Response.Response, err = future.GetResult(sender); err == nil && pls.Response.Response.StatusCode != http.StatusNoContent {
27366		pls, err = client.CreateOrUpdateResponder(pls.Response.Response)
27367		if err != nil {
27368			err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", pls.Response.Response, "Failure responding to request")
27369		}
27370	}
27371	return
27372}
27373
27374// PrivateLinkServicesDeleteFuture an abstraction for monitoring and retrieving the results of a
27375// long-running operation.
27376type PrivateLinkServicesDeleteFuture struct {
27377	azure.FutureAPI
27378	// Result returns the result of the asynchronous operation.
27379	// If the operation has not completed it will return an error.
27380	Result func(PrivateLinkServicesClient) (autorest.Response, error)
27381}
27382
27383// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27384func (future *PrivateLinkServicesDeleteFuture) UnmarshalJSON(body []byte) error {
27385	var azFuture azure.Future
27386	if err := json.Unmarshal(body, &azFuture); err != nil {
27387		return err
27388	}
27389	future.FutureAPI = &azFuture
27390	future.Result = future.result
27391	return nil
27392}
27393
27394// result is the default implementation for PrivateLinkServicesDeleteFuture.Result.
27395func (future *PrivateLinkServicesDeleteFuture) result(client PrivateLinkServicesClient) (ar autorest.Response, err error) {
27396	var done bool
27397	done, err = future.DoneWithContext(context.Background(), client)
27398	if err != nil {
27399		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeleteFuture", "Result", future.Response(), "Polling failure")
27400		return
27401	}
27402	if !done {
27403		ar.Response = future.Response()
27404		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeleteFuture")
27405		return
27406	}
27407	ar.Response = future.Response()
27408	return
27409}
27410
27411// PrivateLinkServicesDeletePrivateEndpointConnectionFuture an abstraction for monitoring and retrieving
27412// the results of a long-running operation.
27413type PrivateLinkServicesDeletePrivateEndpointConnectionFuture struct {
27414	azure.FutureAPI
27415	// Result returns the result of the asynchronous operation.
27416	// If the operation has not completed it will return an error.
27417	Result func(PrivateLinkServicesClient) (autorest.Response, error)
27418}
27419
27420// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27421func (future *PrivateLinkServicesDeletePrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error {
27422	var azFuture azure.Future
27423	if err := json.Unmarshal(body, &azFuture); err != nil {
27424		return err
27425	}
27426	future.FutureAPI = &azFuture
27427	future.Result = future.result
27428	return nil
27429}
27430
27431// result is the default implementation for PrivateLinkServicesDeletePrivateEndpointConnectionFuture.Result.
27432func (future *PrivateLinkServicesDeletePrivateEndpointConnectionFuture) result(client PrivateLinkServicesClient) (ar autorest.Response, err error) {
27433	var done bool
27434	done, err = future.DoneWithContext(context.Background(), client)
27435	if err != nil {
27436		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure")
27437		return
27438	}
27439	if !done {
27440		ar.Response = future.Response()
27441		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture")
27442		return
27443	}
27444	ar.Response = future.Response()
27445	return
27446}
27447
27448// PrivateLinkServiceVisibility response for the CheckPrivateLinkServiceVisibility API service call.
27449type PrivateLinkServiceVisibility struct {
27450	autorest.Response `json:"-"`
27451	// Visible - Private Link Service Visibility (True/False).
27452	Visible *bool `json:"visible,omitempty"`
27453}
27454
27455// Probe a load balancer probe.
27456type Probe struct {
27457	autorest.Response `json:"-"`
27458	// ProbePropertiesFormat - Properties of load balancer probe.
27459	*ProbePropertiesFormat `json:"properties,omitempty"`
27460	// 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.
27461	Name *string `json:"name,omitempty"`
27462	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
27463	Etag *string `json:"etag,omitempty"`
27464	// Type - READ-ONLY; Type of the resource.
27465	Type *string `json:"type,omitempty"`
27466	// ID - Resource ID.
27467	ID *string `json:"id,omitempty"`
27468}
27469
27470// MarshalJSON is the custom marshaler for Probe.
27471func (p Probe) MarshalJSON() ([]byte, error) {
27472	objectMap := make(map[string]interface{})
27473	if p.ProbePropertiesFormat != nil {
27474		objectMap["properties"] = p.ProbePropertiesFormat
27475	}
27476	if p.Name != nil {
27477		objectMap["name"] = p.Name
27478	}
27479	if p.ID != nil {
27480		objectMap["id"] = p.ID
27481	}
27482	return json.Marshal(objectMap)
27483}
27484
27485// UnmarshalJSON is the custom unmarshaler for Probe struct.
27486func (p *Probe) UnmarshalJSON(body []byte) error {
27487	var m map[string]*json.RawMessage
27488	err := json.Unmarshal(body, &m)
27489	if err != nil {
27490		return err
27491	}
27492	for k, v := range m {
27493		switch k {
27494		case "properties":
27495			if v != nil {
27496				var probePropertiesFormat ProbePropertiesFormat
27497				err = json.Unmarshal(*v, &probePropertiesFormat)
27498				if err != nil {
27499					return err
27500				}
27501				p.ProbePropertiesFormat = &probePropertiesFormat
27502			}
27503		case "name":
27504			if v != nil {
27505				var name string
27506				err = json.Unmarshal(*v, &name)
27507				if err != nil {
27508					return err
27509				}
27510				p.Name = &name
27511			}
27512		case "etag":
27513			if v != nil {
27514				var etag string
27515				err = json.Unmarshal(*v, &etag)
27516				if err != nil {
27517					return err
27518				}
27519				p.Etag = &etag
27520			}
27521		case "type":
27522			if v != nil {
27523				var typeVar string
27524				err = json.Unmarshal(*v, &typeVar)
27525				if err != nil {
27526					return err
27527				}
27528				p.Type = &typeVar
27529			}
27530		case "id":
27531			if v != nil {
27532				var ID string
27533				err = json.Unmarshal(*v, &ID)
27534				if err != nil {
27535					return err
27536				}
27537				p.ID = &ID
27538			}
27539		}
27540	}
27541
27542	return nil
27543}
27544
27545// ProbePropertiesFormat load balancer probe resource.
27546type ProbePropertiesFormat struct {
27547	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
27548	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
27549	// 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'
27550	Protocol ProbeProtocol `json:"protocol,omitempty"`
27551	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
27552	Port *int32 `json:"port,omitempty"`
27553	// 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.
27554	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
27555	// 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.
27556	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
27557	// 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.
27558	RequestPath *string `json:"requestPath,omitempty"`
27559	// ProvisioningState - READ-ONLY; The provisioning state of the probe resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
27560	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27561}
27562
27563// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
27564func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
27565	objectMap := make(map[string]interface{})
27566	if ppf.Protocol != "" {
27567		objectMap["protocol"] = ppf.Protocol
27568	}
27569	if ppf.Port != nil {
27570		objectMap["port"] = ppf.Port
27571	}
27572	if ppf.IntervalInSeconds != nil {
27573		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
27574	}
27575	if ppf.NumberOfProbes != nil {
27576		objectMap["numberOfProbes"] = ppf.NumberOfProbes
27577	}
27578	if ppf.RequestPath != nil {
27579		objectMap["requestPath"] = ppf.RequestPath
27580	}
27581	return json.Marshal(objectMap)
27582}
27583
27584// Profile network profile resource.
27585type Profile struct {
27586	autorest.Response `json:"-"`
27587	// ProfilePropertiesFormat - Network profile properties.
27588	*ProfilePropertiesFormat `json:"properties,omitempty"`
27589	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
27590	Etag *string `json:"etag,omitempty"`
27591	// ID - Resource ID.
27592	ID *string `json:"id,omitempty"`
27593	// Name - READ-ONLY; Resource name.
27594	Name *string `json:"name,omitempty"`
27595	// Type - READ-ONLY; Resource type.
27596	Type *string `json:"type,omitempty"`
27597	// Location - Resource location.
27598	Location *string `json:"location,omitempty"`
27599	// Tags - Resource tags.
27600	Tags map[string]*string `json:"tags"`
27601}
27602
27603// MarshalJSON is the custom marshaler for Profile.
27604func (p Profile) MarshalJSON() ([]byte, error) {
27605	objectMap := make(map[string]interface{})
27606	if p.ProfilePropertiesFormat != nil {
27607		objectMap["properties"] = p.ProfilePropertiesFormat
27608	}
27609	if p.ID != nil {
27610		objectMap["id"] = p.ID
27611	}
27612	if p.Location != nil {
27613		objectMap["location"] = p.Location
27614	}
27615	if p.Tags != nil {
27616		objectMap["tags"] = p.Tags
27617	}
27618	return json.Marshal(objectMap)
27619}
27620
27621// UnmarshalJSON is the custom unmarshaler for Profile struct.
27622func (p *Profile) UnmarshalJSON(body []byte) error {
27623	var m map[string]*json.RawMessage
27624	err := json.Unmarshal(body, &m)
27625	if err != nil {
27626		return err
27627	}
27628	for k, v := range m {
27629		switch k {
27630		case "properties":
27631			if v != nil {
27632				var profilePropertiesFormat ProfilePropertiesFormat
27633				err = json.Unmarshal(*v, &profilePropertiesFormat)
27634				if err != nil {
27635					return err
27636				}
27637				p.ProfilePropertiesFormat = &profilePropertiesFormat
27638			}
27639		case "etag":
27640			if v != nil {
27641				var etag string
27642				err = json.Unmarshal(*v, &etag)
27643				if err != nil {
27644					return err
27645				}
27646				p.Etag = &etag
27647			}
27648		case "id":
27649			if v != nil {
27650				var ID string
27651				err = json.Unmarshal(*v, &ID)
27652				if err != nil {
27653					return err
27654				}
27655				p.ID = &ID
27656			}
27657		case "name":
27658			if v != nil {
27659				var name string
27660				err = json.Unmarshal(*v, &name)
27661				if err != nil {
27662					return err
27663				}
27664				p.Name = &name
27665			}
27666		case "type":
27667			if v != nil {
27668				var typeVar string
27669				err = json.Unmarshal(*v, &typeVar)
27670				if err != nil {
27671					return err
27672				}
27673				p.Type = &typeVar
27674			}
27675		case "location":
27676			if v != nil {
27677				var location string
27678				err = json.Unmarshal(*v, &location)
27679				if err != nil {
27680					return err
27681				}
27682				p.Location = &location
27683			}
27684		case "tags":
27685			if v != nil {
27686				var tags map[string]*string
27687				err = json.Unmarshal(*v, &tags)
27688				if err != nil {
27689					return err
27690				}
27691				p.Tags = tags
27692			}
27693		}
27694	}
27695
27696	return nil
27697}
27698
27699// ProfileListResult response for ListNetworkProfiles API service call.
27700type ProfileListResult struct {
27701	autorest.Response `json:"-"`
27702	// Value - A list of network profiles that exist in a resource group.
27703	Value *[]Profile `json:"value,omitempty"`
27704	// NextLink - The URL to get the next set of results.
27705	NextLink *string `json:"nextLink,omitempty"`
27706}
27707
27708// ProfileListResultIterator provides access to a complete listing of Profile values.
27709type ProfileListResultIterator struct {
27710	i    int
27711	page ProfileListResultPage
27712}
27713
27714// NextWithContext advances to the next value.  If there was an error making
27715// the request the iterator does not advance and the error is returned.
27716func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
27717	if tracing.IsEnabled() {
27718		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
27719		defer func() {
27720			sc := -1
27721			if iter.Response().Response.Response != nil {
27722				sc = iter.Response().Response.Response.StatusCode
27723			}
27724			tracing.EndSpan(ctx, sc, err)
27725		}()
27726	}
27727	iter.i++
27728	if iter.i < len(iter.page.Values()) {
27729		return nil
27730	}
27731	err = iter.page.NextWithContext(ctx)
27732	if err != nil {
27733		iter.i--
27734		return err
27735	}
27736	iter.i = 0
27737	return nil
27738}
27739
27740// Next advances to the next value.  If there was an error making
27741// the request the iterator does not advance and the error is returned.
27742// Deprecated: Use NextWithContext() instead.
27743func (iter *ProfileListResultIterator) Next() error {
27744	return iter.NextWithContext(context.Background())
27745}
27746
27747// NotDone returns true if the enumeration should be started or is not yet complete.
27748func (iter ProfileListResultIterator) NotDone() bool {
27749	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27750}
27751
27752// Response returns the raw server response from the last page request.
27753func (iter ProfileListResultIterator) Response() ProfileListResult {
27754	return iter.page.Response()
27755}
27756
27757// Value returns the current value or a zero-initialized value if the
27758// iterator has advanced beyond the end of the collection.
27759func (iter ProfileListResultIterator) Value() Profile {
27760	if !iter.page.NotDone() {
27761		return Profile{}
27762	}
27763	return iter.page.Values()[iter.i]
27764}
27765
27766// Creates a new instance of the ProfileListResultIterator type.
27767func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
27768	return ProfileListResultIterator{page: page}
27769}
27770
27771// IsEmpty returns true if the ListResult contains no values.
27772func (plr ProfileListResult) IsEmpty() bool {
27773	return plr.Value == nil || len(*plr.Value) == 0
27774}
27775
27776// hasNextLink returns true if the NextLink is not empty.
27777func (plr ProfileListResult) hasNextLink() bool {
27778	return plr.NextLink != nil && len(*plr.NextLink) != 0
27779}
27780
27781// profileListResultPreparer prepares a request to retrieve the next set of results.
27782// It returns nil if no more results exist.
27783func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
27784	if !plr.hasNextLink() {
27785		return nil, nil
27786	}
27787	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27788		autorest.AsJSON(),
27789		autorest.AsGet(),
27790		autorest.WithBaseURL(to.String(plr.NextLink)))
27791}
27792
27793// ProfileListResultPage contains a page of Profile values.
27794type ProfileListResultPage struct {
27795	fn  func(context.Context, ProfileListResult) (ProfileListResult, error)
27796	plr ProfileListResult
27797}
27798
27799// NextWithContext advances to the next page of values.  If there was an error making
27800// the request the page does not advance and the error is returned.
27801func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
27802	if tracing.IsEnabled() {
27803		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
27804		defer func() {
27805			sc := -1
27806			if page.Response().Response.Response != nil {
27807				sc = page.Response().Response.Response.StatusCode
27808			}
27809			tracing.EndSpan(ctx, sc, err)
27810		}()
27811	}
27812	for {
27813		next, err := page.fn(ctx, page.plr)
27814		if err != nil {
27815			return err
27816		}
27817		page.plr = next
27818		if !next.hasNextLink() || !next.IsEmpty() {
27819			break
27820		}
27821	}
27822	return nil
27823}
27824
27825// Next advances to the next page of values.  If there was an error making
27826// the request the page does not advance and the error is returned.
27827// Deprecated: Use NextWithContext() instead.
27828func (page *ProfileListResultPage) Next() error {
27829	return page.NextWithContext(context.Background())
27830}
27831
27832// NotDone returns true if the page enumeration should be started or is not yet complete.
27833func (page ProfileListResultPage) NotDone() bool {
27834	return !page.plr.IsEmpty()
27835}
27836
27837// Response returns the raw server response from the last page request.
27838func (page ProfileListResultPage) Response() ProfileListResult {
27839	return page.plr
27840}
27841
27842// Values returns the slice of values for the current page or nil if there are no values.
27843func (page ProfileListResultPage) Values() []Profile {
27844	if page.plr.IsEmpty() {
27845		return nil
27846	}
27847	return *page.plr.Value
27848}
27849
27850// Creates a new instance of the ProfileListResultPage type.
27851func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
27852	return ProfileListResultPage{
27853		fn:  getNextPage,
27854		plr: cur,
27855	}
27856}
27857
27858// ProfilePropertiesFormat network profile properties.
27859type ProfilePropertiesFormat struct {
27860	// ContainerNetworkInterfaces - READ-ONLY; List of child container network interfaces.
27861	ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"`
27862	// ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations.
27863	ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"`
27864	// ResourceGUID - READ-ONLY; The resource GUID property of the network profile resource.
27865	ResourceGUID *string `json:"resourceGuid,omitempty"`
27866	// ProvisioningState - READ-ONLY; The provisioning state of the network profile resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
27867	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27868}
27869
27870// MarshalJSON is the custom marshaler for ProfilePropertiesFormat.
27871func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
27872	objectMap := make(map[string]interface{})
27873	if ppf.ContainerNetworkInterfaceConfigurations != nil {
27874		objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations
27875	}
27876	return json.Marshal(objectMap)
27877}
27878
27879// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
27880// operation.
27881type ProfilesDeleteFuture struct {
27882	azure.FutureAPI
27883	// Result returns the result of the asynchronous operation.
27884	// If the operation has not completed it will return an error.
27885	Result func(ProfilesClient) (autorest.Response, error)
27886}
27887
27888// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27889func (future *ProfilesDeleteFuture) UnmarshalJSON(body []byte) error {
27890	var azFuture azure.Future
27891	if err := json.Unmarshal(body, &azFuture); err != nil {
27892		return err
27893	}
27894	future.FutureAPI = &azFuture
27895	future.Result = future.result
27896	return nil
27897}
27898
27899// result is the default implementation for ProfilesDeleteFuture.Result.
27900func (future *ProfilesDeleteFuture) result(client ProfilesClient) (ar autorest.Response, err error) {
27901	var done bool
27902	done, err = future.DoneWithContext(context.Background(), client)
27903	if err != nil {
27904		err = autorest.NewErrorWithError(err, "network.ProfilesDeleteFuture", "Result", future.Response(), "Polling failure")
27905		return
27906	}
27907	if !done {
27908		ar.Response = future.Response()
27909		err = azure.NewAsyncOpIncompleteError("network.ProfilesDeleteFuture")
27910		return
27911	}
27912	ar.Response = future.Response()
27913	return
27914}
27915
27916// ProtocolConfiguration configuration of the protocol.
27917type ProtocolConfiguration struct {
27918	// HTTPConfiguration - HTTP configuration of the connectivity check.
27919	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
27920}
27921
27922// ProtocolCustomSettingsFormat dDoS custom policy properties.
27923type ProtocolCustomSettingsFormat struct {
27924	// Protocol - The protocol for which the DDoS protection policy is being customized. Possible values include: 'DdosCustomPolicyProtocolTCP', 'DdosCustomPolicyProtocolUDP', 'DdosCustomPolicyProtocolSyn'
27925	Protocol DdosCustomPolicyProtocol `json:"protocol,omitempty"`
27926	// TriggerRateOverride - The customized DDoS protection trigger rate.
27927	TriggerRateOverride *string `json:"triggerRateOverride,omitempty"`
27928	// SourceRateOverride - The customized DDoS protection source rate.
27929	SourceRateOverride *string `json:"sourceRateOverride,omitempty"`
27930	// TriggerSensitivityOverride - The customized DDoS protection trigger rate sensitivity degrees. High: Trigger rate set with most sensitivity w.r.t. normal traffic. Default: Trigger rate set with moderate sensitivity w.r.t. normal traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity w.r.t. normal traffic. Possible values include: 'Relaxed', 'Low', 'Default', 'High'
27931	TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"`
27932}
27933
27934// PublicIPAddress public IP address resource.
27935type PublicIPAddress struct {
27936	autorest.Response `json:"-"`
27937	// Sku - The public IP address SKU.
27938	Sku *PublicIPAddressSku `json:"sku,omitempty"`
27939	// PublicIPAddressPropertiesFormat - Public IP address properties.
27940	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
27941	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
27942	Etag *string `json:"etag,omitempty"`
27943	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
27944	Zones *[]string `json:"zones,omitempty"`
27945	// ID - Resource ID.
27946	ID *string `json:"id,omitempty"`
27947	// Name - READ-ONLY; Resource name.
27948	Name *string `json:"name,omitempty"`
27949	// Type - READ-ONLY; Resource type.
27950	Type *string `json:"type,omitempty"`
27951	// Location - Resource location.
27952	Location *string `json:"location,omitempty"`
27953	// Tags - Resource tags.
27954	Tags map[string]*string `json:"tags"`
27955}
27956
27957// MarshalJSON is the custom marshaler for PublicIPAddress.
27958func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
27959	objectMap := make(map[string]interface{})
27960	if pia.Sku != nil {
27961		objectMap["sku"] = pia.Sku
27962	}
27963	if pia.PublicIPAddressPropertiesFormat != nil {
27964		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
27965	}
27966	if pia.Zones != nil {
27967		objectMap["zones"] = pia.Zones
27968	}
27969	if pia.ID != nil {
27970		objectMap["id"] = pia.ID
27971	}
27972	if pia.Location != nil {
27973		objectMap["location"] = pia.Location
27974	}
27975	if pia.Tags != nil {
27976		objectMap["tags"] = pia.Tags
27977	}
27978	return json.Marshal(objectMap)
27979}
27980
27981// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
27982func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
27983	var m map[string]*json.RawMessage
27984	err := json.Unmarshal(body, &m)
27985	if err != nil {
27986		return err
27987	}
27988	for k, v := range m {
27989		switch k {
27990		case "sku":
27991			if v != nil {
27992				var sku PublicIPAddressSku
27993				err = json.Unmarshal(*v, &sku)
27994				if err != nil {
27995					return err
27996				}
27997				pia.Sku = &sku
27998			}
27999		case "properties":
28000			if v != nil {
28001				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
28002				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
28003				if err != nil {
28004					return err
28005				}
28006				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
28007			}
28008		case "etag":
28009			if v != nil {
28010				var etag string
28011				err = json.Unmarshal(*v, &etag)
28012				if err != nil {
28013					return err
28014				}
28015				pia.Etag = &etag
28016			}
28017		case "zones":
28018			if v != nil {
28019				var zones []string
28020				err = json.Unmarshal(*v, &zones)
28021				if err != nil {
28022					return err
28023				}
28024				pia.Zones = &zones
28025			}
28026		case "id":
28027			if v != nil {
28028				var ID string
28029				err = json.Unmarshal(*v, &ID)
28030				if err != nil {
28031					return err
28032				}
28033				pia.ID = &ID
28034			}
28035		case "name":
28036			if v != nil {
28037				var name string
28038				err = json.Unmarshal(*v, &name)
28039				if err != nil {
28040					return err
28041				}
28042				pia.Name = &name
28043			}
28044		case "type":
28045			if v != nil {
28046				var typeVar string
28047				err = json.Unmarshal(*v, &typeVar)
28048				if err != nil {
28049					return err
28050				}
28051				pia.Type = &typeVar
28052			}
28053		case "location":
28054			if v != nil {
28055				var location string
28056				err = json.Unmarshal(*v, &location)
28057				if err != nil {
28058					return err
28059				}
28060				pia.Location = &location
28061			}
28062		case "tags":
28063			if v != nil {
28064				var tags map[string]*string
28065				err = json.Unmarshal(*v, &tags)
28066				if err != nil {
28067					return err
28068				}
28069				pia.Tags = tags
28070			}
28071		}
28072	}
28073
28074	return nil
28075}
28076
28077// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address.
28078type PublicIPAddressDNSSettings struct {
28079	// 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.
28080	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
28081	// 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.
28082	Fqdn *string `json:"fqdn,omitempty"`
28083	// 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.
28084	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
28085}
28086
28087// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28088// long-running operation.
28089type PublicIPAddressesCreateOrUpdateFuture struct {
28090	azure.FutureAPI
28091	// Result returns the result of the asynchronous operation.
28092	// If the operation has not completed it will return an error.
28093	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
28094}
28095
28096// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28097func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28098	var azFuture azure.Future
28099	if err := json.Unmarshal(body, &azFuture); err != nil {
28100		return err
28101	}
28102	future.FutureAPI = &azFuture
28103	future.Result = future.result
28104	return nil
28105}
28106
28107// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result.
28108func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
28109	var done bool
28110	done, err = future.DoneWithContext(context.Background(), client)
28111	if err != nil {
28112		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28113		return
28114	}
28115	if !done {
28116		pia.Response.Response = future.Response()
28117		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
28118		return
28119	}
28120	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28121	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
28122		pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
28123		if err != nil {
28124			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
28125		}
28126	}
28127	return
28128}
28129
28130// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
28131// operation.
28132type PublicIPAddressesDeleteFuture struct {
28133	azure.FutureAPI
28134	// Result returns the result of the asynchronous operation.
28135	// If the operation has not completed it will return an error.
28136	Result func(PublicIPAddressesClient) (autorest.Response, error)
28137}
28138
28139// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28140func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error {
28141	var azFuture azure.Future
28142	if err := json.Unmarshal(body, &azFuture); err != nil {
28143		return err
28144	}
28145	future.FutureAPI = &azFuture
28146	future.Result = future.result
28147	return nil
28148}
28149
28150// result is the default implementation for PublicIPAddressesDeleteFuture.Result.
28151func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
28152	var done bool
28153	done, err = future.DoneWithContext(context.Background(), client)
28154	if err != nil {
28155		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
28156		return
28157	}
28158	if !done {
28159		ar.Response = future.Response()
28160		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
28161		return
28162	}
28163	ar.Response = future.Response()
28164	return
28165}
28166
28167// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
28168type PublicIPAddressListResult struct {
28169	autorest.Response `json:"-"`
28170	// Value - A list of public IP addresses that exists in a resource group.
28171	Value *[]PublicIPAddress `json:"value,omitempty"`
28172	// NextLink - The URL to get the next set of results.
28173	NextLink *string `json:"nextLink,omitempty"`
28174}
28175
28176// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
28177type PublicIPAddressListResultIterator struct {
28178	i    int
28179	page PublicIPAddressListResultPage
28180}
28181
28182// NextWithContext advances to the next value.  If there was an error making
28183// the request the iterator does not advance and the error is returned.
28184func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
28185	if tracing.IsEnabled() {
28186		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
28187		defer func() {
28188			sc := -1
28189			if iter.Response().Response.Response != nil {
28190				sc = iter.Response().Response.Response.StatusCode
28191			}
28192			tracing.EndSpan(ctx, sc, err)
28193		}()
28194	}
28195	iter.i++
28196	if iter.i < len(iter.page.Values()) {
28197		return nil
28198	}
28199	err = iter.page.NextWithContext(ctx)
28200	if err != nil {
28201		iter.i--
28202		return err
28203	}
28204	iter.i = 0
28205	return nil
28206}
28207
28208// Next advances to the next value.  If there was an error making
28209// the request the iterator does not advance and the error is returned.
28210// Deprecated: Use NextWithContext() instead.
28211func (iter *PublicIPAddressListResultIterator) Next() error {
28212	return iter.NextWithContext(context.Background())
28213}
28214
28215// NotDone returns true if the enumeration should be started or is not yet complete.
28216func (iter PublicIPAddressListResultIterator) NotDone() bool {
28217	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28218}
28219
28220// Response returns the raw server response from the last page request.
28221func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
28222	return iter.page.Response()
28223}
28224
28225// Value returns the current value or a zero-initialized value if the
28226// iterator has advanced beyond the end of the collection.
28227func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
28228	if !iter.page.NotDone() {
28229		return PublicIPAddress{}
28230	}
28231	return iter.page.Values()[iter.i]
28232}
28233
28234// Creates a new instance of the PublicIPAddressListResultIterator type.
28235func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
28236	return PublicIPAddressListResultIterator{page: page}
28237}
28238
28239// IsEmpty returns true if the ListResult contains no values.
28240func (pialr PublicIPAddressListResult) IsEmpty() bool {
28241	return pialr.Value == nil || len(*pialr.Value) == 0
28242}
28243
28244// hasNextLink returns true if the NextLink is not empty.
28245func (pialr PublicIPAddressListResult) hasNextLink() bool {
28246	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
28247}
28248
28249// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
28250// It returns nil if no more results exist.
28251func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
28252	if !pialr.hasNextLink() {
28253		return nil, nil
28254	}
28255	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28256		autorest.AsJSON(),
28257		autorest.AsGet(),
28258		autorest.WithBaseURL(to.String(pialr.NextLink)))
28259}
28260
28261// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
28262type PublicIPAddressListResultPage struct {
28263	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
28264	pialr PublicIPAddressListResult
28265}
28266
28267// NextWithContext advances to the next page of values.  If there was an error making
28268// the request the page does not advance and the error is returned.
28269func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
28270	if tracing.IsEnabled() {
28271		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
28272		defer func() {
28273			sc := -1
28274			if page.Response().Response.Response != nil {
28275				sc = page.Response().Response.Response.StatusCode
28276			}
28277			tracing.EndSpan(ctx, sc, err)
28278		}()
28279	}
28280	for {
28281		next, err := page.fn(ctx, page.pialr)
28282		if err != nil {
28283			return err
28284		}
28285		page.pialr = next
28286		if !next.hasNextLink() || !next.IsEmpty() {
28287			break
28288		}
28289	}
28290	return nil
28291}
28292
28293// Next advances to the next page of values.  If there was an error making
28294// the request the page does not advance and the error is returned.
28295// Deprecated: Use NextWithContext() instead.
28296func (page *PublicIPAddressListResultPage) Next() error {
28297	return page.NextWithContext(context.Background())
28298}
28299
28300// NotDone returns true if the page enumeration should be started or is not yet complete.
28301func (page PublicIPAddressListResultPage) NotDone() bool {
28302	return !page.pialr.IsEmpty()
28303}
28304
28305// Response returns the raw server response from the last page request.
28306func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
28307	return page.pialr
28308}
28309
28310// Values returns the slice of values for the current page or nil if there are no values.
28311func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
28312	if page.pialr.IsEmpty() {
28313		return nil
28314	}
28315	return *page.pialr.Value
28316}
28317
28318// Creates a new instance of the PublicIPAddressListResultPage type.
28319func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
28320	return PublicIPAddressListResultPage{
28321		fn:    getNextPage,
28322		pialr: cur,
28323	}
28324}
28325
28326// PublicIPAddressPropertiesFormat public IP address properties.
28327type PublicIPAddressPropertiesFormat struct {
28328	// PublicIPAllocationMethod - The public IP address allocation method. Possible values include: 'Static', 'Dynamic'
28329	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
28330	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
28331	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
28332	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
28333	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
28334	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
28335	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
28336	// DdosSettings - The DDoS protection custom policy associated with the public IP address.
28337	DdosSettings *DdosSettings `json:"ddosSettings,omitempty"`
28338	// IPTags - The list of tags associated with the public IP address.
28339	IPTags *[]IPTag `json:"ipTags,omitempty"`
28340	// IPAddress - The IP address associated with the public IP address resource.
28341	IPAddress *string `json:"ipAddress,omitempty"`
28342	// PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from.
28343	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
28344	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
28345	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
28346	// ResourceGUID - READ-ONLY; The resource GUID property of the public IP address resource.
28347	ResourceGUID *string `json:"resourceGuid,omitempty"`
28348	// ProvisioningState - READ-ONLY; The provisioning state of the public IP address resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
28349	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28350}
28351
28352// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
28353func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
28354	objectMap := make(map[string]interface{})
28355	if piapf.PublicIPAllocationMethod != "" {
28356		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
28357	}
28358	if piapf.PublicIPAddressVersion != "" {
28359		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
28360	}
28361	if piapf.DNSSettings != nil {
28362		objectMap["dnsSettings"] = piapf.DNSSettings
28363	}
28364	if piapf.DdosSettings != nil {
28365		objectMap["ddosSettings"] = piapf.DdosSettings
28366	}
28367	if piapf.IPTags != nil {
28368		objectMap["ipTags"] = piapf.IPTags
28369	}
28370	if piapf.IPAddress != nil {
28371		objectMap["ipAddress"] = piapf.IPAddress
28372	}
28373	if piapf.PublicIPPrefix != nil {
28374		objectMap["publicIPPrefix"] = piapf.PublicIPPrefix
28375	}
28376	if piapf.IdleTimeoutInMinutes != nil {
28377		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
28378	}
28379	return json.Marshal(objectMap)
28380}
28381
28382// PublicIPAddressSku SKU of a public IP address.
28383type PublicIPAddressSku struct {
28384	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
28385	Name PublicIPAddressSkuName `json:"name,omitempty"`
28386}
28387
28388// PublicIPPrefix public IP prefix resource.
28389type PublicIPPrefix struct {
28390	autorest.Response `json:"-"`
28391	// Sku - The public IP prefix SKU.
28392	Sku *PublicIPPrefixSku `json:"sku,omitempty"`
28393	// PublicIPPrefixPropertiesFormat - Public IP prefix properties.
28394	*PublicIPPrefixPropertiesFormat `json:"properties,omitempty"`
28395	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
28396	Etag *string `json:"etag,omitempty"`
28397	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
28398	Zones *[]string `json:"zones,omitempty"`
28399	// ID - Resource ID.
28400	ID *string `json:"id,omitempty"`
28401	// Name - READ-ONLY; Resource name.
28402	Name *string `json:"name,omitempty"`
28403	// Type - READ-ONLY; Resource type.
28404	Type *string `json:"type,omitempty"`
28405	// Location - Resource location.
28406	Location *string `json:"location,omitempty"`
28407	// Tags - Resource tags.
28408	Tags map[string]*string `json:"tags"`
28409}
28410
28411// MarshalJSON is the custom marshaler for PublicIPPrefix.
28412func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) {
28413	objectMap := make(map[string]interface{})
28414	if pip.Sku != nil {
28415		objectMap["sku"] = pip.Sku
28416	}
28417	if pip.PublicIPPrefixPropertiesFormat != nil {
28418		objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat
28419	}
28420	if pip.Zones != nil {
28421		objectMap["zones"] = pip.Zones
28422	}
28423	if pip.ID != nil {
28424		objectMap["id"] = pip.ID
28425	}
28426	if pip.Location != nil {
28427		objectMap["location"] = pip.Location
28428	}
28429	if pip.Tags != nil {
28430		objectMap["tags"] = pip.Tags
28431	}
28432	return json.Marshal(objectMap)
28433}
28434
28435// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct.
28436func (pip *PublicIPPrefix) UnmarshalJSON(body []byte) error {
28437	var m map[string]*json.RawMessage
28438	err := json.Unmarshal(body, &m)
28439	if err != nil {
28440		return err
28441	}
28442	for k, v := range m {
28443		switch k {
28444		case "sku":
28445			if v != nil {
28446				var sku PublicIPPrefixSku
28447				err = json.Unmarshal(*v, &sku)
28448				if err != nil {
28449					return err
28450				}
28451				pip.Sku = &sku
28452			}
28453		case "properties":
28454			if v != nil {
28455				var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat
28456				err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat)
28457				if err != nil {
28458					return err
28459				}
28460				pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat
28461			}
28462		case "etag":
28463			if v != nil {
28464				var etag string
28465				err = json.Unmarshal(*v, &etag)
28466				if err != nil {
28467					return err
28468				}
28469				pip.Etag = &etag
28470			}
28471		case "zones":
28472			if v != nil {
28473				var zones []string
28474				err = json.Unmarshal(*v, &zones)
28475				if err != nil {
28476					return err
28477				}
28478				pip.Zones = &zones
28479			}
28480		case "id":
28481			if v != nil {
28482				var ID string
28483				err = json.Unmarshal(*v, &ID)
28484				if err != nil {
28485					return err
28486				}
28487				pip.ID = &ID
28488			}
28489		case "name":
28490			if v != nil {
28491				var name string
28492				err = json.Unmarshal(*v, &name)
28493				if err != nil {
28494					return err
28495				}
28496				pip.Name = &name
28497			}
28498		case "type":
28499			if v != nil {
28500				var typeVar string
28501				err = json.Unmarshal(*v, &typeVar)
28502				if err != nil {
28503					return err
28504				}
28505				pip.Type = &typeVar
28506			}
28507		case "location":
28508			if v != nil {
28509				var location string
28510				err = json.Unmarshal(*v, &location)
28511				if err != nil {
28512					return err
28513				}
28514				pip.Location = &location
28515			}
28516		case "tags":
28517			if v != nil {
28518				var tags map[string]*string
28519				err = json.Unmarshal(*v, &tags)
28520				if err != nil {
28521					return err
28522				}
28523				pip.Tags = tags
28524			}
28525		}
28526	}
28527
28528	return nil
28529}
28530
28531// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28532// long-running operation.
28533type PublicIPPrefixesCreateOrUpdateFuture struct {
28534	azure.FutureAPI
28535	// Result returns the result of the asynchronous operation.
28536	// If the operation has not completed it will return an error.
28537	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
28538}
28539
28540// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28541func (future *PublicIPPrefixesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28542	var azFuture azure.Future
28543	if err := json.Unmarshal(body, &azFuture); err != nil {
28544		return err
28545	}
28546	future.FutureAPI = &azFuture
28547	future.Result = future.result
28548	return nil
28549}
28550
28551// result is the default implementation for PublicIPPrefixesCreateOrUpdateFuture.Result.
28552func (future *PublicIPPrefixesCreateOrUpdateFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
28553	var done bool
28554	done, err = future.DoneWithContext(context.Background(), client)
28555	if err != nil {
28556		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28557		return
28558	}
28559	if !done {
28560		pip.Response.Response = future.Response()
28561		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesCreateOrUpdateFuture")
28562		return
28563	}
28564	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28565	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
28566		pip, err = client.CreateOrUpdateResponder(pip.Response.Response)
28567		if err != nil {
28568			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", pip.Response.Response, "Failure responding to request")
28569		}
28570	}
28571	return
28572}
28573
28574// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
28575// operation.
28576type PublicIPPrefixesDeleteFuture struct {
28577	azure.FutureAPI
28578	// Result returns the result of the asynchronous operation.
28579	// If the operation has not completed it will return an error.
28580	Result func(PublicIPPrefixesClient) (autorest.Response, error)
28581}
28582
28583// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28584func (future *PublicIPPrefixesDeleteFuture) UnmarshalJSON(body []byte) error {
28585	var azFuture azure.Future
28586	if err := json.Unmarshal(body, &azFuture); err != nil {
28587		return err
28588	}
28589	future.FutureAPI = &azFuture
28590	future.Result = future.result
28591	return nil
28592}
28593
28594// result is the default implementation for PublicIPPrefixesDeleteFuture.Result.
28595func (future *PublicIPPrefixesDeleteFuture) result(client PublicIPPrefixesClient) (ar autorest.Response, err error) {
28596	var done bool
28597	done, err = future.DoneWithContext(context.Background(), client)
28598	if err != nil {
28599		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure")
28600		return
28601	}
28602	if !done {
28603		ar.Response = future.Response()
28604		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesDeleteFuture")
28605		return
28606	}
28607	ar.Response = future.Response()
28608	return
28609}
28610
28611// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
28612type PublicIPPrefixListResult struct {
28613	autorest.Response `json:"-"`
28614	// Value - A list of public IP prefixes that exists in a resource group.
28615	Value *[]PublicIPPrefix `json:"value,omitempty"`
28616	// NextLink - The URL to get the next set of results.
28617	NextLink *string `json:"nextLink,omitempty"`
28618}
28619
28620// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values.
28621type PublicIPPrefixListResultIterator struct {
28622	i    int
28623	page PublicIPPrefixListResultPage
28624}
28625
28626// NextWithContext advances to the next value.  If there was an error making
28627// the request the iterator does not advance and the error is returned.
28628func (iter *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
28629	if tracing.IsEnabled() {
28630		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.NextWithContext")
28631		defer func() {
28632			sc := -1
28633			if iter.Response().Response.Response != nil {
28634				sc = iter.Response().Response.Response.StatusCode
28635			}
28636			tracing.EndSpan(ctx, sc, err)
28637		}()
28638	}
28639	iter.i++
28640	if iter.i < len(iter.page.Values()) {
28641		return nil
28642	}
28643	err = iter.page.NextWithContext(ctx)
28644	if err != nil {
28645		iter.i--
28646		return err
28647	}
28648	iter.i = 0
28649	return nil
28650}
28651
28652// Next advances to the next value.  If there was an error making
28653// the request the iterator does not advance and the error is returned.
28654// Deprecated: Use NextWithContext() instead.
28655func (iter *PublicIPPrefixListResultIterator) Next() error {
28656	return iter.NextWithContext(context.Background())
28657}
28658
28659// NotDone returns true if the enumeration should be started or is not yet complete.
28660func (iter PublicIPPrefixListResultIterator) NotDone() bool {
28661	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28662}
28663
28664// Response returns the raw server response from the last page request.
28665func (iter PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult {
28666	return iter.page.Response()
28667}
28668
28669// Value returns the current value or a zero-initialized value if the
28670// iterator has advanced beyond the end of the collection.
28671func (iter PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
28672	if !iter.page.NotDone() {
28673		return PublicIPPrefix{}
28674	}
28675	return iter.page.Values()[iter.i]
28676}
28677
28678// Creates a new instance of the PublicIPPrefixListResultIterator type.
28679func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
28680	return PublicIPPrefixListResultIterator{page: page}
28681}
28682
28683// IsEmpty returns true if the ListResult contains no values.
28684func (piplr PublicIPPrefixListResult) IsEmpty() bool {
28685	return piplr.Value == nil || len(*piplr.Value) == 0
28686}
28687
28688// hasNextLink returns true if the NextLink is not empty.
28689func (piplr PublicIPPrefixListResult) hasNextLink() bool {
28690	return piplr.NextLink != nil && len(*piplr.NextLink) != 0
28691}
28692
28693// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
28694// It returns nil if no more results exist.
28695func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
28696	if !piplr.hasNextLink() {
28697		return nil, nil
28698	}
28699	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28700		autorest.AsJSON(),
28701		autorest.AsGet(),
28702		autorest.WithBaseURL(to.String(piplr.NextLink)))
28703}
28704
28705// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
28706type PublicIPPrefixListResultPage struct {
28707	fn    func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
28708	piplr PublicIPPrefixListResult
28709}
28710
28711// NextWithContext advances to the next page of values.  If there was an error making
28712// the request the page does not advance and the error is returned.
28713func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
28714	if tracing.IsEnabled() {
28715		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext")
28716		defer func() {
28717			sc := -1
28718			if page.Response().Response.Response != nil {
28719				sc = page.Response().Response.Response.StatusCode
28720			}
28721			tracing.EndSpan(ctx, sc, err)
28722		}()
28723	}
28724	for {
28725		next, err := page.fn(ctx, page.piplr)
28726		if err != nil {
28727			return err
28728		}
28729		page.piplr = next
28730		if !next.hasNextLink() || !next.IsEmpty() {
28731			break
28732		}
28733	}
28734	return nil
28735}
28736
28737// Next advances to the next page of values.  If there was an error making
28738// the request the page does not advance and the error is returned.
28739// Deprecated: Use NextWithContext() instead.
28740func (page *PublicIPPrefixListResultPage) Next() error {
28741	return page.NextWithContext(context.Background())
28742}
28743
28744// NotDone returns true if the page enumeration should be started or is not yet complete.
28745func (page PublicIPPrefixListResultPage) NotDone() bool {
28746	return !page.piplr.IsEmpty()
28747}
28748
28749// Response returns the raw server response from the last page request.
28750func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult {
28751	return page.piplr
28752}
28753
28754// Values returns the slice of values for the current page or nil if there are no values.
28755func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
28756	if page.piplr.IsEmpty() {
28757		return nil
28758	}
28759	return *page.piplr.Value
28760}
28761
28762// Creates a new instance of the PublicIPPrefixListResultPage type.
28763func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
28764	return PublicIPPrefixListResultPage{
28765		fn:    getNextPage,
28766		piplr: cur,
28767	}
28768}
28769
28770// PublicIPPrefixPropertiesFormat public IP prefix properties.
28771type PublicIPPrefixPropertiesFormat struct {
28772	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
28773	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
28774	// IPTags - The list of tags associated with the public IP prefix.
28775	IPTags *[]IPTag `json:"ipTags,omitempty"`
28776	// PrefixLength - The Length of the Public IP Prefix.
28777	PrefixLength *int32 `json:"prefixLength,omitempty"`
28778	// IPPrefix - READ-ONLY; The allocated Prefix.
28779	IPPrefix *string `json:"ipPrefix,omitempty"`
28780	// PublicIPAddresses - READ-ONLY; The list of all referenced PublicIPAddresses.
28781	PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"`
28782	// LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix.
28783	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"`
28784	// ResourceGUID - READ-ONLY; The resource GUID property of the public IP prefix resource.
28785	ResourceGUID *string `json:"resourceGuid,omitempty"`
28786	// ProvisioningState - READ-ONLY; The provisioning state of the public IP prefix resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
28787	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28788}
28789
28790// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat.
28791func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
28792	objectMap := make(map[string]interface{})
28793	if pippf.PublicIPAddressVersion != "" {
28794		objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion
28795	}
28796	if pippf.IPTags != nil {
28797		objectMap["ipTags"] = pippf.IPTags
28798	}
28799	if pippf.PrefixLength != nil {
28800		objectMap["prefixLength"] = pippf.PrefixLength
28801	}
28802	return json.Marshal(objectMap)
28803}
28804
28805// PublicIPPrefixSku SKU of a public IP prefix.
28806type PublicIPPrefixSku struct {
28807	// Name - Name of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuNameStandard'
28808	Name PublicIPPrefixSkuName `json:"name,omitempty"`
28809}
28810
28811// PutBastionShareableLinkAllFuture an abstraction for monitoring and retrieving the results of a
28812// long-running operation.
28813type PutBastionShareableLinkAllFuture struct {
28814	azure.FutureAPI
28815	// Result returns the result of the asynchronous operation.
28816	// If the operation has not completed it will return an error.
28817	Result func(BaseClient) (BastionShareableLinkListResultPage, error)
28818}
28819
28820// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28821func (future *PutBastionShareableLinkAllFuture) UnmarshalJSON(body []byte) error {
28822	var azFuture azure.Future
28823	if err := json.Unmarshal(body, &azFuture); err != nil {
28824		return err
28825	}
28826	future.FutureAPI = &azFuture
28827	future.Result = future.result
28828	return nil
28829}
28830
28831// result is the default implementation for PutBastionShareableLinkAllFuture.Result.
28832func (future *PutBastionShareableLinkAllFuture) result(client BaseClient) (bsllrp BastionShareableLinkListResultPage, err error) {
28833	var done bool
28834	done, err = future.DoneWithContext(context.Background(), client)
28835	if err != nil {
28836		err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkAllFuture", "Result", future.Response(), "Polling failure")
28837		return
28838	}
28839	if !done {
28840		bsllrp.bsllr.Response.Response = future.Response()
28841		err = azure.NewAsyncOpIncompleteError("network.PutBastionShareableLinkAllFuture")
28842		return
28843	}
28844	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28845	if bsllrp.bsllr.Response.Response, err = future.GetResult(sender); err == nil && bsllrp.bsllr.Response.Response.StatusCode != http.StatusNoContent {
28846		bsllrp, err = client.PutBastionShareableLinkResponder(bsllrp.bsllr.Response.Response)
28847		if err != nil {
28848			err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkAllFuture", "Result", bsllrp.bsllr.Response.Response, "Failure responding to request")
28849		}
28850	}
28851	return
28852}
28853
28854// PutBastionShareableLinkFuture an abstraction for monitoring and retrieving the results of a long-running
28855// operation.
28856type PutBastionShareableLinkFuture struct {
28857	azure.FutureAPI
28858	// Result returns the result of the asynchronous operation.
28859	// If the operation has not completed it will return an error.
28860	Result func(BaseClient) (BastionShareableLinkListResultPage, error)
28861}
28862
28863// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28864func (future *PutBastionShareableLinkFuture) UnmarshalJSON(body []byte) error {
28865	var azFuture azure.Future
28866	if err := json.Unmarshal(body, &azFuture); err != nil {
28867		return err
28868	}
28869	future.FutureAPI = &azFuture
28870	future.Result = future.result
28871	return nil
28872}
28873
28874// result is the default implementation for PutBastionShareableLinkFuture.Result.
28875func (future *PutBastionShareableLinkFuture) result(client BaseClient) (bsllrp BastionShareableLinkListResultPage, err error) {
28876	var done bool
28877	done, err = future.DoneWithContext(context.Background(), client)
28878	if err != nil {
28879		err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkFuture", "Result", future.Response(), "Polling failure")
28880		return
28881	}
28882	if !done {
28883		bsllrp.bsllr.Response.Response = future.Response()
28884		err = azure.NewAsyncOpIncompleteError("network.PutBastionShareableLinkFuture")
28885		return
28886	}
28887	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28888	if bsllrp.bsllr.Response.Response, err = future.GetResult(sender); err == nil && bsllrp.bsllr.Response.Response.StatusCode != http.StatusNoContent {
28889		bsllrp, err = client.PutBastionShareableLinkResponder(bsllrp.bsllr.Response.Response)
28890		if err != nil {
28891			err = autorest.NewErrorWithError(err, "network.PutBastionShareableLinkFuture", "Result", bsllrp.bsllr.Response.Response, "Failure responding to request")
28892		}
28893	}
28894	return
28895}
28896
28897// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
28898type QueryTroubleshootingParameters struct {
28899	// TargetResourceID - The target resource ID to query the troubleshooting result.
28900	TargetResourceID *string `json:"targetResourceId,omitempty"`
28901}
28902
28903// RadiusServer radius Server Settings.
28904type RadiusServer struct {
28905	// RadiusServerAddress - The address of this radius server.
28906	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
28907	// RadiusServerScore - The initial score assigned to this radius server.
28908	RadiusServerScore *int64 `json:"radiusServerScore,omitempty"`
28909	// RadiusServerSecret - The secret used for this radius server.
28910	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
28911}
28912
28913// RecordSet a collective group of information about the record set information.
28914type RecordSet struct {
28915	// RecordType - Resource record type.
28916	RecordType *string `json:"recordType,omitempty"`
28917	// RecordSetName - Recordset name.
28918	RecordSetName *string `json:"recordSetName,omitempty"`
28919	// Fqdn - Fqdn that resolves to private endpoint ip address.
28920	Fqdn *string `json:"fqdn,omitempty"`
28921	// ProvisioningState - READ-ONLY; The provisioning state of the recordset. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
28922	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28923	// TTL - Recordset time to live.
28924	TTL *int32 `json:"ttl,omitempty"`
28925	// IPAddresses - The private ip address of the private endpoint.
28926	IPAddresses *[]string `json:"ipAddresses,omitempty"`
28927}
28928
28929// MarshalJSON is the custom marshaler for RecordSet.
28930func (rs RecordSet) MarshalJSON() ([]byte, error) {
28931	objectMap := make(map[string]interface{})
28932	if rs.RecordType != nil {
28933		objectMap["recordType"] = rs.RecordType
28934	}
28935	if rs.RecordSetName != nil {
28936		objectMap["recordSetName"] = rs.RecordSetName
28937	}
28938	if rs.Fqdn != nil {
28939		objectMap["fqdn"] = rs.Fqdn
28940	}
28941	if rs.TTL != nil {
28942		objectMap["ttl"] = rs.TTL
28943	}
28944	if rs.IPAddresses != nil {
28945		objectMap["ipAddresses"] = rs.IPAddresses
28946	}
28947	return json.Marshal(objectMap)
28948}
28949
28950// ReferencedPublicIPAddress reference to a public IP address.
28951type ReferencedPublicIPAddress struct {
28952	// ID - The PublicIPAddress Reference.
28953	ID *string `json:"id,omitempty"`
28954}
28955
28956// Resource common resource representation.
28957type Resource struct {
28958	// ID - Resource ID.
28959	ID *string `json:"id,omitempty"`
28960	// Name - READ-ONLY; Resource name.
28961	Name *string `json:"name,omitempty"`
28962	// Type - READ-ONLY; Resource type.
28963	Type *string `json:"type,omitempty"`
28964	// Location - Resource location.
28965	Location *string `json:"location,omitempty"`
28966	// Tags - Resource tags.
28967	Tags map[string]*string `json:"tags"`
28968}
28969
28970// MarshalJSON is the custom marshaler for Resource.
28971func (r Resource) MarshalJSON() ([]byte, error) {
28972	objectMap := make(map[string]interface{})
28973	if r.ID != nil {
28974		objectMap["id"] = r.ID
28975	}
28976	if r.Location != nil {
28977		objectMap["location"] = r.Location
28978	}
28979	if r.Tags != nil {
28980		objectMap["tags"] = r.Tags
28981	}
28982	return json.Marshal(objectMap)
28983}
28984
28985// ResourceNavigationLink resourceNavigationLink resource.
28986type ResourceNavigationLink struct {
28987	// ResourceNavigationLinkFormat - Resource navigation link properties format.
28988	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
28989	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
28990	Name *string `json:"name,omitempty"`
28991	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
28992	Etag *string `json:"etag,omitempty"`
28993	// Type - READ-ONLY; Resource type.
28994	Type *string `json:"type,omitempty"`
28995	// ID - Resource ID.
28996	ID *string `json:"id,omitempty"`
28997}
28998
28999// MarshalJSON is the custom marshaler for ResourceNavigationLink.
29000func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
29001	objectMap := make(map[string]interface{})
29002	if rnl.ResourceNavigationLinkFormat != nil {
29003		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
29004	}
29005	if rnl.Name != nil {
29006		objectMap["name"] = rnl.Name
29007	}
29008	if rnl.ID != nil {
29009		objectMap["id"] = rnl.ID
29010	}
29011	return json.Marshal(objectMap)
29012}
29013
29014// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
29015func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
29016	var m map[string]*json.RawMessage
29017	err := json.Unmarshal(body, &m)
29018	if err != nil {
29019		return err
29020	}
29021	for k, v := range m {
29022		switch k {
29023		case "properties":
29024			if v != nil {
29025				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
29026				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
29027				if err != nil {
29028					return err
29029				}
29030				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
29031			}
29032		case "name":
29033			if v != nil {
29034				var name string
29035				err = json.Unmarshal(*v, &name)
29036				if err != nil {
29037					return err
29038				}
29039				rnl.Name = &name
29040			}
29041		case "etag":
29042			if v != nil {
29043				var etag string
29044				err = json.Unmarshal(*v, &etag)
29045				if err != nil {
29046					return err
29047				}
29048				rnl.Etag = &etag
29049			}
29050		case "type":
29051			if v != nil {
29052				var typeVar string
29053				err = json.Unmarshal(*v, &typeVar)
29054				if err != nil {
29055					return err
29056				}
29057				rnl.Type = &typeVar
29058			}
29059		case "id":
29060			if v != nil {
29061				var ID string
29062				err = json.Unmarshal(*v, &ID)
29063				if err != nil {
29064					return err
29065				}
29066				rnl.ID = &ID
29067			}
29068		}
29069	}
29070
29071	return nil
29072}
29073
29074// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
29075type ResourceNavigationLinkFormat struct {
29076	// LinkedResourceType - Resource type of the linked resource.
29077	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
29078	// Link - Link to the external resource.
29079	Link *string `json:"link,omitempty"`
29080	// ProvisioningState - READ-ONLY; The provisioning state of the resource navigation link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29081	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29082}
29083
29084// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
29085func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
29086	objectMap := make(map[string]interface{})
29087	if rnlf.LinkedResourceType != nil {
29088		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
29089	}
29090	if rnlf.Link != nil {
29091		objectMap["link"] = rnlf.Link
29092	}
29093	return json.Marshal(objectMap)
29094}
29095
29096// ResourceNavigationLinksListResult response for ResourceNavigationLinks_List operation.
29097type ResourceNavigationLinksListResult struct {
29098	autorest.Response `json:"-"`
29099	// Value - The resource navigation links in a subnet.
29100	Value *[]ResourceNavigationLink `json:"value,omitempty"`
29101	// NextLink - READ-ONLY; The URL to get the next set of results.
29102	NextLink *string `json:"nextLink,omitempty"`
29103}
29104
29105// MarshalJSON is the custom marshaler for ResourceNavigationLinksListResult.
29106func (rnllr ResourceNavigationLinksListResult) MarshalJSON() ([]byte, error) {
29107	objectMap := make(map[string]interface{})
29108	if rnllr.Value != nil {
29109		objectMap["value"] = rnllr.Value
29110	}
29111	return json.Marshal(objectMap)
29112}
29113
29114// ResourceSet the base resource set for visibility and auto-approval.
29115type ResourceSet struct {
29116	// Subscriptions - The list of subscriptions.
29117	Subscriptions *[]string `json:"subscriptions,omitempty"`
29118}
29119
29120// RetentionPolicyParameters parameters that define the retention policy for flow log.
29121type RetentionPolicyParameters struct {
29122	// Days - Number of days to retain flow log records.
29123	Days *int32 `json:"days,omitempty"`
29124	// Enabled - Flag to enable/disable retention.
29125	Enabled *bool `json:"enabled,omitempty"`
29126}
29127
29128// Route route resource.
29129type Route struct {
29130	autorest.Response `json:"-"`
29131	// RoutePropertiesFormat - Properties of the route.
29132	*RoutePropertiesFormat `json:"properties,omitempty"`
29133	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29134	Name *string `json:"name,omitempty"`
29135	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29136	Etag *string `json:"etag,omitempty"`
29137	// ID - Resource ID.
29138	ID *string `json:"id,omitempty"`
29139}
29140
29141// MarshalJSON is the custom marshaler for Route.
29142func (r Route) MarshalJSON() ([]byte, error) {
29143	objectMap := make(map[string]interface{})
29144	if r.RoutePropertiesFormat != nil {
29145		objectMap["properties"] = r.RoutePropertiesFormat
29146	}
29147	if r.Name != nil {
29148		objectMap["name"] = r.Name
29149	}
29150	if r.ID != nil {
29151		objectMap["id"] = r.ID
29152	}
29153	return json.Marshal(objectMap)
29154}
29155
29156// UnmarshalJSON is the custom unmarshaler for Route struct.
29157func (r *Route) UnmarshalJSON(body []byte) error {
29158	var m map[string]*json.RawMessage
29159	err := json.Unmarshal(body, &m)
29160	if err != nil {
29161		return err
29162	}
29163	for k, v := range m {
29164		switch k {
29165		case "properties":
29166			if v != nil {
29167				var routePropertiesFormat RoutePropertiesFormat
29168				err = json.Unmarshal(*v, &routePropertiesFormat)
29169				if err != nil {
29170					return err
29171				}
29172				r.RoutePropertiesFormat = &routePropertiesFormat
29173			}
29174		case "name":
29175			if v != nil {
29176				var name string
29177				err = json.Unmarshal(*v, &name)
29178				if err != nil {
29179					return err
29180				}
29181				r.Name = &name
29182			}
29183		case "etag":
29184			if v != nil {
29185				var etag string
29186				err = json.Unmarshal(*v, &etag)
29187				if err != nil {
29188					return err
29189				}
29190				r.Etag = &etag
29191			}
29192		case "id":
29193			if v != nil {
29194				var ID string
29195				err = json.Unmarshal(*v, &ID)
29196				if err != nil {
29197					return err
29198				}
29199				r.ID = &ID
29200			}
29201		}
29202	}
29203
29204	return nil
29205}
29206
29207// RouteFilter route Filter Resource.
29208type RouteFilter struct {
29209	autorest.Response `json:"-"`
29210	// RouteFilterPropertiesFormat - Properties of the route filter.
29211	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
29212	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29213	Etag *string `json:"etag,omitempty"`
29214	// ID - Resource ID.
29215	ID *string `json:"id,omitempty"`
29216	// Name - READ-ONLY; Resource name.
29217	Name *string `json:"name,omitempty"`
29218	// Type - READ-ONLY; Resource type.
29219	Type *string `json:"type,omitempty"`
29220	// Location - Resource location.
29221	Location *string `json:"location,omitempty"`
29222	// Tags - Resource tags.
29223	Tags map[string]*string `json:"tags"`
29224}
29225
29226// MarshalJSON is the custom marshaler for RouteFilter.
29227func (rf RouteFilter) MarshalJSON() ([]byte, error) {
29228	objectMap := make(map[string]interface{})
29229	if rf.RouteFilterPropertiesFormat != nil {
29230		objectMap["properties"] = rf.RouteFilterPropertiesFormat
29231	}
29232	if rf.ID != nil {
29233		objectMap["id"] = rf.ID
29234	}
29235	if rf.Location != nil {
29236		objectMap["location"] = rf.Location
29237	}
29238	if rf.Tags != nil {
29239		objectMap["tags"] = rf.Tags
29240	}
29241	return json.Marshal(objectMap)
29242}
29243
29244// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
29245func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
29246	var m map[string]*json.RawMessage
29247	err := json.Unmarshal(body, &m)
29248	if err != nil {
29249		return err
29250	}
29251	for k, v := range m {
29252		switch k {
29253		case "properties":
29254			if v != nil {
29255				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
29256				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
29257				if err != nil {
29258					return err
29259				}
29260				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
29261			}
29262		case "etag":
29263			if v != nil {
29264				var etag string
29265				err = json.Unmarshal(*v, &etag)
29266				if err != nil {
29267					return err
29268				}
29269				rf.Etag = &etag
29270			}
29271		case "id":
29272			if v != nil {
29273				var ID string
29274				err = json.Unmarshal(*v, &ID)
29275				if err != nil {
29276					return err
29277				}
29278				rf.ID = &ID
29279			}
29280		case "name":
29281			if v != nil {
29282				var name string
29283				err = json.Unmarshal(*v, &name)
29284				if err != nil {
29285					return err
29286				}
29287				rf.Name = &name
29288			}
29289		case "type":
29290			if v != nil {
29291				var typeVar string
29292				err = json.Unmarshal(*v, &typeVar)
29293				if err != nil {
29294					return err
29295				}
29296				rf.Type = &typeVar
29297			}
29298		case "location":
29299			if v != nil {
29300				var location string
29301				err = json.Unmarshal(*v, &location)
29302				if err != nil {
29303					return err
29304				}
29305				rf.Location = &location
29306			}
29307		case "tags":
29308			if v != nil {
29309				var tags map[string]*string
29310				err = json.Unmarshal(*v, &tags)
29311				if err != nil {
29312					return err
29313				}
29314				rf.Tags = tags
29315			}
29316		}
29317	}
29318
29319	return nil
29320}
29321
29322// RouteFilterListResult response for the ListRouteFilters API service call.
29323type RouteFilterListResult struct {
29324	autorest.Response `json:"-"`
29325	// Value - A list of route filters in a resource group.
29326	Value *[]RouteFilter `json:"value,omitempty"`
29327	// NextLink - The URL to get the next set of results.
29328	NextLink *string `json:"nextLink,omitempty"`
29329}
29330
29331// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
29332type RouteFilterListResultIterator struct {
29333	i    int
29334	page RouteFilterListResultPage
29335}
29336
29337// NextWithContext advances to the next value.  If there was an error making
29338// the request the iterator does not advance and the error is returned.
29339func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
29340	if tracing.IsEnabled() {
29341		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
29342		defer func() {
29343			sc := -1
29344			if iter.Response().Response.Response != nil {
29345				sc = iter.Response().Response.Response.StatusCode
29346			}
29347			tracing.EndSpan(ctx, sc, err)
29348		}()
29349	}
29350	iter.i++
29351	if iter.i < len(iter.page.Values()) {
29352		return nil
29353	}
29354	err = iter.page.NextWithContext(ctx)
29355	if err != nil {
29356		iter.i--
29357		return err
29358	}
29359	iter.i = 0
29360	return nil
29361}
29362
29363// Next advances to the next value.  If there was an error making
29364// the request the iterator does not advance and the error is returned.
29365// Deprecated: Use NextWithContext() instead.
29366func (iter *RouteFilterListResultIterator) Next() error {
29367	return iter.NextWithContext(context.Background())
29368}
29369
29370// NotDone returns true if the enumeration should be started or is not yet complete.
29371func (iter RouteFilterListResultIterator) NotDone() bool {
29372	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29373}
29374
29375// Response returns the raw server response from the last page request.
29376func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
29377	return iter.page.Response()
29378}
29379
29380// Value returns the current value or a zero-initialized value if the
29381// iterator has advanced beyond the end of the collection.
29382func (iter RouteFilterListResultIterator) Value() RouteFilter {
29383	if !iter.page.NotDone() {
29384		return RouteFilter{}
29385	}
29386	return iter.page.Values()[iter.i]
29387}
29388
29389// Creates a new instance of the RouteFilterListResultIterator type.
29390func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
29391	return RouteFilterListResultIterator{page: page}
29392}
29393
29394// IsEmpty returns true if the ListResult contains no values.
29395func (rflr RouteFilterListResult) IsEmpty() bool {
29396	return rflr.Value == nil || len(*rflr.Value) == 0
29397}
29398
29399// hasNextLink returns true if the NextLink is not empty.
29400func (rflr RouteFilterListResult) hasNextLink() bool {
29401	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
29402}
29403
29404// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
29405// It returns nil if no more results exist.
29406func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
29407	if !rflr.hasNextLink() {
29408		return nil, nil
29409	}
29410	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29411		autorest.AsJSON(),
29412		autorest.AsGet(),
29413		autorest.WithBaseURL(to.String(rflr.NextLink)))
29414}
29415
29416// RouteFilterListResultPage contains a page of RouteFilter values.
29417type RouteFilterListResultPage struct {
29418	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
29419	rflr RouteFilterListResult
29420}
29421
29422// NextWithContext advances to the next page of values.  If there was an error making
29423// the request the page does not advance and the error is returned.
29424func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
29425	if tracing.IsEnabled() {
29426		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
29427		defer func() {
29428			sc := -1
29429			if page.Response().Response.Response != nil {
29430				sc = page.Response().Response.Response.StatusCode
29431			}
29432			tracing.EndSpan(ctx, sc, err)
29433		}()
29434	}
29435	for {
29436		next, err := page.fn(ctx, page.rflr)
29437		if err != nil {
29438			return err
29439		}
29440		page.rflr = next
29441		if !next.hasNextLink() || !next.IsEmpty() {
29442			break
29443		}
29444	}
29445	return nil
29446}
29447
29448// Next advances to the next page of values.  If there was an error making
29449// the request the page does not advance and the error is returned.
29450// Deprecated: Use NextWithContext() instead.
29451func (page *RouteFilterListResultPage) Next() error {
29452	return page.NextWithContext(context.Background())
29453}
29454
29455// NotDone returns true if the page enumeration should be started or is not yet complete.
29456func (page RouteFilterListResultPage) NotDone() bool {
29457	return !page.rflr.IsEmpty()
29458}
29459
29460// Response returns the raw server response from the last page request.
29461func (page RouteFilterListResultPage) Response() RouteFilterListResult {
29462	return page.rflr
29463}
29464
29465// Values returns the slice of values for the current page or nil if there are no values.
29466func (page RouteFilterListResultPage) Values() []RouteFilter {
29467	if page.rflr.IsEmpty() {
29468		return nil
29469	}
29470	return *page.rflr.Value
29471}
29472
29473// Creates a new instance of the RouteFilterListResultPage type.
29474func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
29475	return RouteFilterListResultPage{
29476		fn:   getNextPage,
29477		rflr: cur,
29478	}
29479}
29480
29481// RouteFilterPropertiesFormat route Filter Resource.
29482type RouteFilterPropertiesFormat struct {
29483	// Rules - Collection of RouteFilterRules contained within a route filter.
29484	Rules *[]RouteFilterRule `json:"rules,omitempty"`
29485	// Peerings - READ-ONLY; A collection of references to express route circuit peerings.
29486	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
29487	// Ipv6Peerings - READ-ONLY; A collection of references to express route circuit ipv6 peerings.
29488	Ipv6Peerings *[]ExpressRouteCircuitPeering `json:"ipv6Peerings,omitempty"`
29489	// ProvisioningState - READ-ONLY; The provisioning state of the route filter resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29490	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29491}
29492
29493// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
29494func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
29495	objectMap := make(map[string]interface{})
29496	if rfpf.Rules != nil {
29497		objectMap["rules"] = rfpf.Rules
29498	}
29499	return json.Marshal(objectMap)
29500}
29501
29502// RouteFilterRule route Filter Rule Resource.
29503type RouteFilterRule struct {
29504	autorest.Response `json:"-"`
29505	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
29506	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
29507	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29508	Name *string `json:"name,omitempty"`
29509	// Location - Resource location.
29510	Location *string `json:"location,omitempty"`
29511	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29512	Etag *string `json:"etag,omitempty"`
29513	// ID - Resource ID.
29514	ID *string `json:"id,omitempty"`
29515}
29516
29517// MarshalJSON is the custom marshaler for RouteFilterRule.
29518func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
29519	objectMap := make(map[string]interface{})
29520	if rfr.RouteFilterRulePropertiesFormat != nil {
29521		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
29522	}
29523	if rfr.Name != nil {
29524		objectMap["name"] = rfr.Name
29525	}
29526	if rfr.Location != nil {
29527		objectMap["location"] = rfr.Location
29528	}
29529	if rfr.ID != nil {
29530		objectMap["id"] = rfr.ID
29531	}
29532	return json.Marshal(objectMap)
29533}
29534
29535// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
29536func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
29537	var m map[string]*json.RawMessage
29538	err := json.Unmarshal(body, &m)
29539	if err != nil {
29540		return err
29541	}
29542	for k, v := range m {
29543		switch k {
29544		case "properties":
29545			if v != nil {
29546				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
29547				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
29548				if err != nil {
29549					return err
29550				}
29551				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
29552			}
29553		case "name":
29554			if v != nil {
29555				var name string
29556				err = json.Unmarshal(*v, &name)
29557				if err != nil {
29558					return err
29559				}
29560				rfr.Name = &name
29561			}
29562		case "location":
29563			if v != nil {
29564				var location string
29565				err = json.Unmarshal(*v, &location)
29566				if err != nil {
29567					return err
29568				}
29569				rfr.Location = &location
29570			}
29571		case "etag":
29572			if v != nil {
29573				var etag string
29574				err = json.Unmarshal(*v, &etag)
29575				if err != nil {
29576					return err
29577				}
29578				rfr.Etag = &etag
29579			}
29580		case "id":
29581			if v != nil {
29582				var ID string
29583				err = json.Unmarshal(*v, &ID)
29584				if err != nil {
29585					return err
29586				}
29587				rfr.ID = &ID
29588			}
29589		}
29590	}
29591
29592	return nil
29593}
29594
29595// RouteFilterRuleListResult response for the ListRouteFilterRules API service call.
29596type RouteFilterRuleListResult struct {
29597	autorest.Response `json:"-"`
29598	// Value - A list of RouteFilterRules in a resource group.
29599	Value *[]RouteFilterRule `json:"value,omitempty"`
29600	// NextLink - The URL to get the next set of results.
29601	NextLink *string `json:"nextLink,omitempty"`
29602}
29603
29604// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
29605type RouteFilterRuleListResultIterator struct {
29606	i    int
29607	page RouteFilterRuleListResultPage
29608}
29609
29610// NextWithContext advances to the next value.  If there was an error making
29611// the request the iterator does not advance and the error is returned.
29612func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
29613	if tracing.IsEnabled() {
29614		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
29615		defer func() {
29616			sc := -1
29617			if iter.Response().Response.Response != nil {
29618				sc = iter.Response().Response.Response.StatusCode
29619			}
29620			tracing.EndSpan(ctx, sc, err)
29621		}()
29622	}
29623	iter.i++
29624	if iter.i < len(iter.page.Values()) {
29625		return nil
29626	}
29627	err = iter.page.NextWithContext(ctx)
29628	if err != nil {
29629		iter.i--
29630		return err
29631	}
29632	iter.i = 0
29633	return nil
29634}
29635
29636// Next advances to the next value.  If there was an error making
29637// the request the iterator does not advance and the error is returned.
29638// Deprecated: Use NextWithContext() instead.
29639func (iter *RouteFilterRuleListResultIterator) Next() error {
29640	return iter.NextWithContext(context.Background())
29641}
29642
29643// NotDone returns true if the enumeration should be started or is not yet complete.
29644func (iter RouteFilterRuleListResultIterator) NotDone() bool {
29645	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29646}
29647
29648// Response returns the raw server response from the last page request.
29649func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
29650	return iter.page.Response()
29651}
29652
29653// Value returns the current value or a zero-initialized value if the
29654// iterator has advanced beyond the end of the collection.
29655func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
29656	if !iter.page.NotDone() {
29657		return RouteFilterRule{}
29658	}
29659	return iter.page.Values()[iter.i]
29660}
29661
29662// Creates a new instance of the RouteFilterRuleListResultIterator type.
29663func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
29664	return RouteFilterRuleListResultIterator{page: page}
29665}
29666
29667// IsEmpty returns true if the ListResult contains no values.
29668func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
29669	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
29670}
29671
29672// hasNextLink returns true if the NextLink is not empty.
29673func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
29674	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
29675}
29676
29677// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
29678// It returns nil if no more results exist.
29679func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
29680	if !rfrlr.hasNextLink() {
29681		return nil, nil
29682	}
29683	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29684		autorest.AsJSON(),
29685		autorest.AsGet(),
29686		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
29687}
29688
29689// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
29690type RouteFilterRuleListResultPage struct {
29691	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
29692	rfrlr RouteFilterRuleListResult
29693}
29694
29695// NextWithContext advances to the next page of values.  If there was an error making
29696// the request the page does not advance and the error is returned.
29697func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
29698	if tracing.IsEnabled() {
29699		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
29700		defer func() {
29701			sc := -1
29702			if page.Response().Response.Response != nil {
29703				sc = page.Response().Response.Response.StatusCode
29704			}
29705			tracing.EndSpan(ctx, sc, err)
29706		}()
29707	}
29708	for {
29709		next, err := page.fn(ctx, page.rfrlr)
29710		if err != nil {
29711			return err
29712		}
29713		page.rfrlr = next
29714		if !next.hasNextLink() || !next.IsEmpty() {
29715			break
29716		}
29717	}
29718	return nil
29719}
29720
29721// Next advances to the next page of values.  If there was an error making
29722// the request the page does not advance and the error is returned.
29723// Deprecated: Use NextWithContext() instead.
29724func (page *RouteFilterRuleListResultPage) Next() error {
29725	return page.NextWithContext(context.Background())
29726}
29727
29728// NotDone returns true if the page enumeration should be started or is not yet complete.
29729func (page RouteFilterRuleListResultPage) NotDone() bool {
29730	return !page.rfrlr.IsEmpty()
29731}
29732
29733// Response returns the raw server response from the last page request.
29734func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
29735	return page.rfrlr
29736}
29737
29738// Values returns the slice of values for the current page or nil if there are no values.
29739func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
29740	if page.rfrlr.IsEmpty() {
29741		return nil
29742	}
29743	return *page.rfrlr.Value
29744}
29745
29746// Creates a new instance of the RouteFilterRuleListResultPage type.
29747func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
29748	return RouteFilterRuleListResultPage{
29749		fn:    getNextPage,
29750		rfrlr: cur,
29751	}
29752}
29753
29754// RouteFilterRulePropertiesFormat route Filter Rule Resource.
29755type RouteFilterRulePropertiesFormat struct {
29756	// Access - The access type of the rule. Possible values include: 'Allow', 'Deny'
29757	Access Access `json:"access,omitempty"`
29758	// RouteFilterRuleType - The rule type of the rule.
29759	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
29760	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
29761	Communities *[]string `json:"communities,omitempty"`
29762	// ProvisioningState - READ-ONLY; The provisioning state of the route filter rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29763	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29764}
29765
29766// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
29767func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
29768	objectMap := make(map[string]interface{})
29769	if rfrpf.Access != "" {
29770		objectMap["access"] = rfrpf.Access
29771	}
29772	if rfrpf.RouteFilterRuleType != nil {
29773		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
29774	}
29775	if rfrpf.Communities != nil {
29776		objectMap["communities"] = rfrpf.Communities
29777	}
29778	return json.Marshal(objectMap)
29779}
29780
29781// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29782// long-running operation.
29783type RouteFilterRulesCreateOrUpdateFuture struct {
29784	azure.FutureAPI
29785	// Result returns the result of the asynchronous operation.
29786	// If the operation has not completed it will return an error.
29787	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
29788}
29789
29790// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29791func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
29792	var azFuture azure.Future
29793	if err := json.Unmarshal(body, &azFuture); err != nil {
29794		return err
29795	}
29796	future.FutureAPI = &azFuture
29797	future.Result = future.result
29798	return nil
29799}
29800
29801// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result.
29802func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
29803	var done bool
29804	done, err = future.DoneWithContext(context.Background(), client)
29805	if err != nil {
29806		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
29807		return
29808	}
29809	if !done {
29810		rfr.Response.Response = future.Response()
29811		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
29812		return
29813	}
29814	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29815	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
29816		rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
29817		if err != nil {
29818			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
29819		}
29820	}
29821	return
29822}
29823
29824// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29825// operation.
29826type RouteFilterRulesDeleteFuture struct {
29827	azure.FutureAPI
29828	// Result returns the result of the asynchronous operation.
29829	// If the operation has not completed it will return an error.
29830	Result func(RouteFilterRulesClient) (autorest.Response, error)
29831}
29832
29833// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29834func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error {
29835	var azFuture azure.Future
29836	if err := json.Unmarshal(body, &azFuture); err != nil {
29837		return err
29838	}
29839	future.FutureAPI = &azFuture
29840	future.Result = future.result
29841	return nil
29842}
29843
29844// result is the default implementation for RouteFilterRulesDeleteFuture.Result.
29845func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
29846	var done bool
29847	done, err = future.DoneWithContext(context.Background(), client)
29848	if err != nil {
29849		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
29850		return
29851	}
29852	if !done {
29853		ar.Response = future.Response()
29854		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
29855		return
29856	}
29857	ar.Response = future.Response()
29858	return
29859}
29860
29861// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29862// long-running operation.
29863type RouteFiltersCreateOrUpdateFuture struct {
29864	azure.FutureAPI
29865	// Result returns the result of the asynchronous operation.
29866	// If the operation has not completed it will return an error.
29867	Result func(RouteFiltersClient) (RouteFilter, error)
29868}
29869
29870// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29871func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
29872	var azFuture azure.Future
29873	if err := json.Unmarshal(body, &azFuture); err != nil {
29874		return err
29875	}
29876	future.FutureAPI = &azFuture
29877	future.Result = future.result
29878	return nil
29879}
29880
29881// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result.
29882func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
29883	var done bool
29884	done, err = future.DoneWithContext(context.Background(), client)
29885	if err != nil {
29886		err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
29887		return
29888	}
29889	if !done {
29890		rf.Response.Response = future.Response()
29891		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
29892		return
29893	}
29894	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29895	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
29896		rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
29897		if err != nil {
29898			err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
29899		}
29900	}
29901	return
29902}
29903
29904// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29905// operation.
29906type RouteFiltersDeleteFuture struct {
29907	azure.FutureAPI
29908	// Result returns the result of the asynchronous operation.
29909	// If the operation has not completed it will return an error.
29910	Result func(RouteFiltersClient) (autorest.Response, error)
29911}
29912
29913// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29914func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error {
29915	var azFuture azure.Future
29916	if err := json.Unmarshal(body, &azFuture); err != nil {
29917		return err
29918	}
29919	future.FutureAPI = &azFuture
29920	future.Result = future.result
29921	return nil
29922}
29923
29924// result is the default implementation for RouteFiltersDeleteFuture.Result.
29925func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) {
29926	var done bool
29927	done, err = future.DoneWithContext(context.Background(), client)
29928	if err != nil {
29929		err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
29930		return
29931	}
29932	if !done {
29933		ar.Response = future.Response()
29934		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
29935		return
29936	}
29937	ar.Response = future.Response()
29938	return
29939}
29940
29941// RouteListResult response for the ListRoute API service call.
29942type RouteListResult struct {
29943	autorest.Response `json:"-"`
29944	// Value - A list of routes in a resource group.
29945	Value *[]Route `json:"value,omitempty"`
29946	// NextLink - The URL to get the next set of results.
29947	NextLink *string `json:"nextLink,omitempty"`
29948}
29949
29950// RouteListResultIterator provides access to a complete listing of Route values.
29951type RouteListResultIterator struct {
29952	i    int
29953	page RouteListResultPage
29954}
29955
29956// NextWithContext advances to the next value.  If there was an error making
29957// the request the iterator does not advance and the error is returned.
29958func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
29959	if tracing.IsEnabled() {
29960		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
29961		defer func() {
29962			sc := -1
29963			if iter.Response().Response.Response != nil {
29964				sc = iter.Response().Response.Response.StatusCode
29965			}
29966			tracing.EndSpan(ctx, sc, err)
29967		}()
29968	}
29969	iter.i++
29970	if iter.i < len(iter.page.Values()) {
29971		return nil
29972	}
29973	err = iter.page.NextWithContext(ctx)
29974	if err != nil {
29975		iter.i--
29976		return err
29977	}
29978	iter.i = 0
29979	return nil
29980}
29981
29982// Next advances to the next value.  If there was an error making
29983// the request the iterator does not advance and the error is returned.
29984// Deprecated: Use NextWithContext() instead.
29985func (iter *RouteListResultIterator) Next() error {
29986	return iter.NextWithContext(context.Background())
29987}
29988
29989// NotDone returns true if the enumeration should be started or is not yet complete.
29990func (iter RouteListResultIterator) NotDone() bool {
29991	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29992}
29993
29994// Response returns the raw server response from the last page request.
29995func (iter RouteListResultIterator) Response() RouteListResult {
29996	return iter.page.Response()
29997}
29998
29999// Value returns the current value or a zero-initialized value if the
30000// iterator has advanced beyond the end of the collection.
30001func (iter RouteListResultIterator) Value() Route {
30002	if !iter.page.NotDone() {
30003		return Route{}
30004	}
30005	return iter.page.Values()[iter.i]
30006}
30007
30008// Creates a new instance of the RouteListResultIterator type.
30009func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
30010	return RouteListResultIterator{page: page}
30011}
30012
30013// IsEmpty returns true if the ListResult contains no values.
30014func (rlr RouteListResult) IsEmpty() bool {
30015	return rlr.Value == nil || len(*rlr.Value) == 0
30016}
30017
30018// hasNextLink returns true if the NextLink is not empty.
30019func (rlr RouteListResult) hasNextLink() bool {
30020	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
30021}
30022
30023// routeListResultPreparer prepares a request to retrieve the next set of results.
30024// It returns nil if no more results exist.
30025func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
30026	if !rlr.hasNextLink() {
30027		return nil, nil
30028	}
30029	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30030		autorest.AsJSON(),
30031		autorest.AsGet(),
30032		autorest.WithBaseURL(to.String(rlr.NextLink)))
30033}
30034
30035// RouteListResultPage contains a page of Route values.
30036type RouteListResultPage struct {
30037	fn  func(context.Context, RouteListResult) (RouteListResult, error)
30038	rlr RouteListResult
30039}
30040
30041// NextWithContext advances to the next page of values.  If there was an error making
30042// the request the page does not advance and the error is returned.
30043func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
30044	if tracing.IsEnabled() {
30045		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
30046		defer func() {
30047			sc := -1
30048			if page.Response().Response.Response != nil {
30049				sc = page.Response().Response.Response.StatusCode
30050			}
30051			tracing.EndSpan(ctx, sc, err)
30052		}()
30053	}
30054	for {
30055		next, err := page.fn(ctx, page.rlr)
30056		if err != nil {
30057			return err
30058		}
30059		page.rlr = next
30060		if !next.hasNextLink() || !next.IsEmpty() {
30061			break
30062		}
30063	}
30064	return nil
30065}
30066
30067// Next advances to the next page of values.  If there was an error making
30068// the request the page does not advance and the error is returned.
30069// Deprecated: Use NextWithContext() instead.
30070func (page *RouteListResultPage) Next() error {
30071	return page.NextWithContext(context.Background())
30072}
30073
30074// NotDone returns true if the page enumeration should be started or is not yet complete.
30075func (page RouteListResultPage) NotDone() bool {
30076	return !page.rlr.IsEmpty()
30077}
30078
30079// Response returns the raw server response from the last page request.
30080func (page RouteListResultPage) Response() RouteListResult {
30081	return page.rlr
30082}
30083
30084// Values returns the slice of values for the current page or nil if there are no values.
30085func (page RouteListResultPage) Values() []Route {
30086	if page.rlr.IsEmpty() {
30087		return nil
30088	}
30089	return *page.rlr.Value
30090}
30091
30092// Creates a new instance of the RouteListResultPage type.
30093func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
30094	return RouteListResultPage{
30095		fn:  getNextPage,
30096		rlr: cur,
30097	}
30098}
30099
30100// RoutePropertiesFormat route resource.
30101type RoutePropertiesFormat struct {
30102	// AddressPrefix - The destination CIDR to which the route applies.
30103	AddressPrefix *string `json:"addressPrefix,omitempty"`
30104	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
30105	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
30106	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
30107	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
30108	// ProvisioningState - READ-ONLY; The provisioning state of the route resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30109	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30110}
30111
30112// MarshalJSON is the custom marshaler for RoutePropertiesFormat.
30113func (rpf RoutePropertiesFormat) MarshalJSON() ([]byte, error) {
30114	objectMap := make(map[string]interface{})
30115	if rpf.AddressPrefix != nil {
30116		objectMap["addressPrefix"] = rpf.AddressPrefix
30117	}
30118	if rpf.NextHopType != "" {
30119		objectMap["nextHopType"] = rpf.NextHopType
30120	}
30121	if rpf.NextHopIPAddress != nil {
30122		objectMap["nextHopIpAddress"] = rpf.NextHopIPAddress
30123	}
30124	return json.Marshal(objectMap)
30125}
30126
30127// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
30128// operation.
30129type RoutesCreateOrUpdateFuture struct {
30130	azure.FutureAPI
30131	// Result returns the result of the asynchronous operation.
30132	// If the operation has not completed it will return an error.
30133	Result func(RoutesClient) (Route, error)
30134}
30135
30136// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30137func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
30138	var azFuture azure.Future
30139	if err := json.Unmarshal(body, &azFuture); err != nil {
30140		return err
30141	}
30142	future.FutureAPI = &azFuture
30143	future.Result = future.result
30144	return nil
30145}
30146
30147// result is the default implementation for RoutesCreateOrUpdateFuture.Result.
30148func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) {
30149	var done bool
30150	done, err = future.DoneWithContext(context.Background(), client)
30151	if err != nil {
30152		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
30153		return
30154	}
30155	if !done {
30156		r.Response.Response = future.Response()
30157		err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
30158		return
30159	}
30160	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30161	if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
30162		r, err = client.CreateOrUpdateResponder(r.Response.Response)
30163		if err != nil {
30164			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
30165		}
30166	}
30167	return
30168}
30169
30170// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
30171type RoutesDeleteFuture struct {
30172	azure.FutureAPI
30173	// Result returns the result of the asynchronous operation.
30174	// If the operation has not completed it will return an error.
30175	Result func(RoutesClient) (autorest.Response, error)
30176}
30177
30178// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30179func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error {
30180	var azFuture azure.Future
30181	if err := json.Unmarshal(body, &azFuture); err != nil {
30182		return err
30183	}
30184	future.FutureAPI = &azFuture
30185	future.Result = future.result
30186	return nil
30187}
30188
30189// result is the default implementation for RoutesDeleteFuture.Result.
30190func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) {
30191	var done bool
30192	done, err = future.DoneWithContext(context.Background(), client)
30193	if err != nil {
30194		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
30195		return
30196	}
30197	if !done {
30198		ar.Response = future.Response()
30199		err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
30200		return
30201	}
30202	ar.Response = future.Response()
30203	return
30204}
30205
30206// RouteTable route table resource.
30207type RouteTable struct {
30208	autorest.Response `json:"-"`
30209	// RouteTablePropertiesFormat - Properties of the route table.
30210	*RouteTablePropertiesFormat `json:"properties,omitempty"`
30211	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
30212	Etag *string `json:"etag,omitempty"`
30213	// ID - Resource ID.
30214	ID *string `json:"id,omitempty"`
30215	// Name - READ-ONLY; Resource name.
30216	Name *string `json:"name,omitempty"`
30217	// Type - READ-ONLY; Resource type.
30218	Type *string `json:"type,omitempty"`
30219	// Location - Resource location.
30220	Location *string `json:"location,omitempty"`
30221	// Tags - Resource tags.
30222	Tags map[string]*string `json:"tags"`
30223}
30224
30225// MarshalJSON is the custom marshaler for RouteTable.
30226func (rt RouteTable) MarshalJSON() ([]byte, error) {
30227	objectMap := make(map[string]interface{})
30228	if rt.RouteTablePropertiesFormat != nil {
30229		objectMap["properties"] = rt.RouteTablePropertiesFormat
30230	}
30231	if rt.ID != nil {
30232		objectMap["id"] = rt.ID
30233	}
30234	if rt.Location != nil {
30235		objectMap["location"] = rt.Location
30236	}
30237	if rt.Tags != nil {
30238		objectMap["tags"] = rt.Tags
30239	}
30240	return json.Marshal(objectMap)
30241}
30242
30243// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
30244func (rt *RouteTable) UnmarshalJSON(body []byte) error {
30245	var m map[string]*json.RawMessage
30246	err := json.Unmarshal(body, &m)
30247	if err != nil {
30248		return err
30249	}
30250	for k, v := range m {
30251		switch k {
30252		case "properties":
30253			if v != nil {
30254				var routeTablePropertiesFormat RouteTablePropertiesFormat
30255				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
30256				if err != nil {
30257					return err
30258				}
30259				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
30260			}
30261		case "etag":
30262			if v != nil {
30263				var etag string
30264				err = json.Unmarshal(*v, &etag)
30265				if err != nil {
30266					return err
30267				}
30268				rt.Etag = &etag
30269			}
30270		case "id":
30271			if v != nil {
30272				var ID string
30273				err = json.Unmarshal(*v, &ID)
30274				if err != nil {
30275					return err
30276				}
30277				rt.ID = &ID
30278			}
30279		case "name":
30280			if v != nil {
30281				var name string
30282				err = json.Unmarshal(*v, &name)
30283				if err != nil {
30284					return err
30285				}
30286				rt.Name = &name
30287			}
30288		case "type":
30289			if v != nil {
30290				var typeVar string
30291				err = json.Unmarshal(*v, &typeVar)
30292				if err != nil {
30293					return err
30294				}
30295				rt.Type = &typeVar
30296			}
30297		case "location":
30298			if v != nil {
30299				var location string
30300				err = json.Unmarshal(*v, &location)
30301				if err != nil {
30302					return err
30303				}
30304				rt.Location = &location
30305			}
30306		case "tags":
30307			if v != nil {
30308				var tags map[string]*string
30309				err = json.Unmarshal(*v, &tags)
30310				if err != nil {
30311					return err
30312				}
30313				rt.Tags = tags
30314			}
30315		}
30316	}
30317
30318	return nil
30319}
30320
30321// RouteTableListResult response for the ListRouteTable API service call.
30322type RouteTableListResult struct {
30323	autorest.Response `json:"-"`
30324	// Value - A list of route tables in a resource group.
30325	Value *[]RouteTable `json:"value,omitempty"`
30326	// NextLink - The URL to get the next set of results.
30327	NextLink *string `json:"nextLink,omitempty"`
30328}
30329
30330// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
30331type RouteTableListResultIterator struct {
30332	i    int
30333	page RouteTableListResultPage
30334}
30335
30336// NextWithContext advances to the next value.  If there was an error making
30337// the request the iterator does not advance and the error is returned.
30338func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
30339	if tracing.IsEnabled() {
30340		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
30341		defer func() {
30342			sc := -1
30343			if iter.Response().Response.Response != nil {
30344				sc = iter.Response().Response.Response.StatusCode
30345			}
30346			tracing.EndSpan(ctx, sc, err)
30347		}()
30348	}
30349	iter.i++
30350	if iter.i < len(iter.page.Values()) {
30351		return nil
30352	}
30353	err = iter.page.NextWithContext(ctx)
30354	if err != nil {
30355		iter.i--
30356		return err
30357	}
30358	iter.i = 0
30359	return nil
30360}
30361
30362// Next advances to the next value.  If there was an error making
30363// the request the iterator does not advance and the error is returned.
30364// Deprecated: Use NextWithContext() instead.
30365func (iter *RouteTableListResultIterator) Next() error {
30366	return iter.NextWithContext(context.Background())
30367}
30368
30369// NotDone returns true if the enumeration should be started or is not yet complete.
30370func (iter RouteTableListResultIterator) NotDone() bool {
30371	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30372}
30373
30374// Response returns the raw server response from the last page request.
30375func (iter RouteTableListResultIterator) Response() RouteTableListResult {
30376	return iter.page.Response()
30377}
30378
30379// Value returns the current value or a zero-initialized value if the
30380// iterator has advanced beyond the end of the collection.
30381func (iter RouteTableListResultIterator) Value() RouteTable {
30382	if !iter.page.NotDone() {
30383		return RouteTable{}
30384	}
30385	return iter.page.Values()[iter.i]
30386}
30387
30388// Creates a new instance of the RouteTableListResultIterator type.
30389func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
30390	return RouteTableListResultIterator{page: page}
30391}
30392
30393// IsEmpty returns true if the ListResult contains no values.
30394func (rtlr RouteTableListResult) IsEmpty() bool {
30395	return rtlr.Value == nil || len(*rtlr.Value) == 0
30396}
30397
30398// hasNextLink returns true if the NextLink is not empty.
30399func (rtlr RouteTableListResult) hasNextLink() bool {
30400	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
30401}
30402
30403// routeTableListResultPreparer prepares a request to retrieve the next set of results.
30404// It returns nil if no more results exist.
30405func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
30406	if !rtlr.hasNextLink() {
30407		return nil, nil
30408	}
30409	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30410		autorest.AsJSON(),
30411		autorest.AsGet(),
30412		autorest.WithBaseURL(to.String(rtlr.NextLink)))
30413}
30414
30415// RouteTableListResultPage contains a page of RouteTable values.
30416type RouteTableListResultPage struct {
30417	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
30418	rtlr RouteTableListResult
30419}
30420
30421// NextWithContext advances to the next page of values.  If there was an error making
30422// the request the page does not advance and the error is returned.
30423func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
30424	if tracing.IsEnabled() {
30425		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
30426		defer func() {
30427			sc := -1
30428			if page.Response().Response.Response != nil {
30429				sc = page.Response().Response.Response.StatusCode
30430			}
30431			tracing.EndSpan(ctx, sc, err)
30432		}()
30433	}
30434	for {
30435		next, err := page.fn(ctx, page.rtlr)
30436		if err != nil {
30437			return err
30438		}
30439		page.rtlr = next
30440		if !next.hasNextLink() || !next.IsEmpty() {
30441			break
30442		}
30443	}
30444	return nil
30445}
30446
30447// Next advances to the next page of values.  If there was an error making
30448// the request the page does not advance and the error is returned.
30449// Deprecated: Use NextWithContext() instead.
30450func (page *RouteTableListResultPage) Next() error {
30451	return page.NextWithContext(context.Background())
30452}
30453
30454// NotDone returns true if the page enumeration should be started or is not yet complete.
30455func (page RouteTableListResultPage) NotDone() bool {
30456	return !page.rtlr.IsEmpty()
30457}
30458
30459// Response returns the raw server response from the last page request.
30460func (page RouteTableListResultPage) Response() RouteTableListResult {
30461	return page.rtlr
30462}
30463
30464// Values returns the slice of values for the current page or nil if there are no values.
30465func (page RouteTableListResultPage) Values() []RouteTable {
30466	if page.rtlr.IsEmpty() {
30467		return nil
30468	}
30469	return *page.rtlr.Value
30470}
30471
30472// Creates a new instance of the RouteTableListResultPage type.
30473func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
30474	return RouteTableListResultPage{
30475		fn:   getNextPage,
30476		rtlr: cur,
30477	}
30478}
30479
30480// RouteTablePropertiesFormat route Table resource.
30481type RouteTablePropertiesFormat struct {
30482	// Routes - Collection of routes contained within a route table.
30483	Routes *[]Route `json:"routes,omitempty"`
30484	// Subnets - READ-ONLY; A collection of references to subnets.
30485	Subnets *[]Subnet `json:"subnets,omitempty"`
30486	// DisableBgpRoutePropagation - Whether to disable the routes learned by BGP on that route table. True means disable.
30487	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
30488	// ProvisioningState - READ-ONLY; The provisioning state of the route table resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30489	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30490}
30491
30492// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
30493func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
30494	objectMap := make(map[string]interface{})
30495	if rtpf.Routes != nil {
30496		objectMap["routes"] = rtpf.Routes
30497	}
30498	if rtpf.DisableBgpRoutePropagation != nil {
30499		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
30500	}
30501	return json.Marshal(objectMap)
30502}
30503
30504// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30505// long-running operation.
30506type RouteTablesCreateOrUpdateFuture struct {
30507	azure.FutureAPI
30508	// Result returns the result of the asynchronous operation.
30509	// If the operation has not completed it will return an error.
30510	Result func(RouteTablesClient) (RouteTable, error)
30511}
30512
30513// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30514func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
30515	var azFuture azure.Future
30516	if err := json.Unmarshal(body, &azFuture); err != nil {
30517		return err
30518	}
30519	future.FutureAPI = &azFuture
30520	future.Result = future.result
30521	return nil
30522}
30523
30524// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result.
30525func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
30526	var done bool
30527	done, err = future.DoneWithContext(context.Background(), client)
30528	if err != nil {
30529		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
30530		return
30531	}
30532	if !done {
30533		rt.Response.Response = future.Response()
30534		err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
30535		return
30536	}
30537	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30538	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
30539		rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
30540		if err != nil {
30541			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
30542		}
30543	}
30544	return
30545}
30546
30547// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30548// operation.
30549type RouteTablesDeleteFuture struct {
30550	azure.FutureAPI
30551	// Result returns the result of the asynchronous operation.
30552	// If the operation has not completed it will return an error.
30553	Result func(RouteTablesClient) (autorest.Response, error)
30554}
30555
30556// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30557func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
30558	var azFuture azure.Future
30559	if err := json.Unmarshal(body, &azFuture); err != nil {
30560		return err
30561	}
30562	future.FutureAPI = &azFuture
30563	future.Result = future.result
30564	return nil
30565}
30566
30567// result is the default implementation for RouteTablesDeleteFuture.Result.
30568func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) {
30569	var done bool
30570	done, err = future.DoneWithContext(context.Background(), client)
30571	if err != nil {
30572		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
30573		return
30574	}
30575	if !done {
30576		ar.Response = future.Response()
30577		err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
30578		return
30579	}
30580	ar.Response = future.Response()
30581	return
30582}
30583
30584// RuleCondition rule condition of type network.
30585type RuleCondition struct {
30586	// IPProtocols - Array of FirewallPolicyRuleConditionNetworkProtocols.
30587	IPProtocols *[]FirewallPolicyRuleConditionNetworkProtocol `json:"ipProtocols,omitempty"`
30588	// SourceAddresses - List of source IP addresses for this rule.
30589	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
30590	// DestinationAddresses - List of destination IP addresses or Service Tags.
30591	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
30592	// DestinationPorts - List of destination ports.
30593	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
30594	// SourceIPGroups - List of source IpGroups for this rule.
30595	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
30596	// DestinationIPGroups - List of destination IpGroups for this rule.
30597	DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"`
30598	// Name - Name of the rule condition.
30599	Name *string `json:"name,omitempty"`
30600	// Description - Description of the rule condition.
30601	Description *string `json:"description,omitempty"`
30602	// RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNatRuleCondition', 'RuleConditionTypeNetworkRuleCondition'
30603	RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"`
30604}
30605
30606// MarshalJSON is the custom marshaler for RuleCondition.
30607func (rc RuleCondition) MarshalJSON() ([]byte, error) {
30608	rc.RuleConditionType = RuleConditionTypeNetworkRuleCondition
30609	objectMap := make(map[string]interface{})
30610	if rc.IPProtocols != nil {
30611		objectMap["ipProtocols"] = rc.IPProtocols
30612	}
30613	if rc.SourceAddresses != nil {
30614		objectMap["sourceAddresses"] = rc.SourceAddresses
30615	}
30616	if rc.DestinationAddresses != nil {
30617		objectMap["destinationAddresses"] = rc.DestinationAddresses
30618	}
30619	if rc.DestinationPorts != nil {
30620		objectMap["destinationPorts"] = rc.DestinationPorts
30621	}
30622	if rc.SourceIPGroups != nil {
30623		objectMap["sourceIpGroups"] = rc.SourceIPGroups
30624	}
30625	if rc.DestinationIPGroups != nil {
30626		objectMap["destinationIpGroups"] = rc.DestinationIPGroups
30627	}
30628	if rc.Name != nil {
30629		objectMap["name"] = rc.Name
30630	}
30631	if rc.Description != nil {
30632		objectMap["description"] = rc.Description
30633	}
30634	if rc.RuleConditionType != "" {
30635		objectMap["ruleConditionType"] = rc.RuleConditionType
30636	}
30637	return json.Marshal(objectMap)
30638}
30639
30640// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
30641func (rc RuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) {
30642	return nil, false
30643}
30644
30645// AsNatRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
30646func (rc RuleCondition) AsNatRuleCondition() (*NatRuleCondition, bool) {
30647	return nil, false
30648}
30649
30650// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
30651func (rc RuleCondition) AsRuleCondition() (*RuleCondition, bool) {
30652	return &rc, true
30653}
30654
30655// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
30656func (rc RuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) {
30657	return nil, false
30658}
30659
30660// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
30661func (rc RuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) {
30662	return &rc, true
30663}
30664
30665// SecurityGroup networkSecurityGroup resource.
30666type SecurityGroup struct {
30667	autorest.Response `json:"-"`
30668	// SecurityGroupPropertiesFormat - Properties of the network security group.
30669	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
30670	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
30671	Etag *string `json:"etag,omitempty"`
30672	// ID - Resource ID.
30673	ID *string `json:"id,omitempty"`
30674	// Name - READ-ONLY; Resource name.
30675	Name *string `json:"name,omitempty"`
30676	// Type - READ-ONLY; Resource type.
30677	Type *string `json:"type,omitempty"`
30678	// Location - Resource location.
30679	Location *string `json:"location,omitempty"`
30680	// Tags - Resource tags.
30681	Tags map[string]*string `json:"tags"`
30682}
30683
30684// MarshalJSON is the custom marshaler for SecurityGroup.
30685func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
30686	objectMap := make(map[string]interface{})
30687	if sg.SecurityGroupPropertiesFormat != nil {
30688		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
30689	}
30690	if sg.ID != nil {
30691		objectMap["id"] = sg.ID
30692	}
30693	if sg.Location != nil {
30694		objectMap["location"] = sg.Location
30695	}
30696	if sg.Tags != nil {
30697		objectMap["tags"] = sg.Tags
30698	}
30699	return json.Marshal(objectMap)
30700}
30701
30702// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
30703func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
30704	var m map[string]*json.RawMessage
30705	err := json.Unmarshal(body, &m)
30706	if err != nil {
30707		return err
30708	}
30709	for k, v := range m {
30710		switch k {
30711		case "properties":
30712			if v != nil {
30713				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
30714				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
30715				if err != nil {
30716					return err
30717				}
30718				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
30719			}
30720		case "etag":
30721			if v != nil {
30722				var etag string
30723				err = json.Unmarshal(*v, &etag)
30724				if err != nil {
30725					return err
30726				}
30727				sg.Etag = &etag
30728			}
30729		case "id":
30730			if v != nil {
30731				var ID string
30732				err = json.Unmarshal(*v, &ID)
30733				if err != nil {
30734					return err
30735				}
30736				sg.ID = &ID
30737			}
30738		case "name":
30739			if v != nil {
30740				var name string
30741				err = json.Unmarshal(*v, &name)
30742				if err != nil {
30743					return err
30744				}
30745				sg.Name = &name
30746			}
30747		case "type":
30748			if v != nil {
30749				var typeVar string
30750				err = json.Unmarshal(*v, &typeVar)
30751				if err != nil {
30752					return err
30753				}
30754				sg.Type = &typeVar
30755			}
30756		case "location":
30757			if v != nil {
30758				var location string
30759				err = json.Unmarshal(*v, &location)
30760				if err != nil {
30761					return err
30762				}
30763				sg.Location = &location
30764			}
30765		case "tags":
30766			if v != nil {
30767				var tags map[string]*string
30768				err = json.Unmarshal(*v, &tags)
30769				if err != nil {
30770					return err
30771				}
30772				sg.Tags = tags
30773			}
30774		}
30775	}
30776
30777	return nil
30778}
30779
30780// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
30781type SecurityGroupListResult struct {
30782	autorest.Response `json:"-"`
30783	// Value - A list of NetworkSecurityGroup resources.
30784	Value *[]SecurityGroup `json:"value,omitempty"`
30785	// NextLink - The URL to get the next set of results.
30786	NextLink *string `json:"nextLink,omitempty"`
30787}
30788
30789// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
30790type SecurityGroupListResultIterator struct {
30791	i    int
30792	page SecurityGroupListResultPage
30793}
30794
30795// NextWithContext advances to the next value.  If there was an error making
30796// the request the iterator does not advance and the error is returned.
30797func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
30798	if tracing.IsEnabled() {
30799		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
30800		defer func() {
30801			sc := -1
30802			if iter.Response().Response.Response != nil {
30803				sc = iter.Response().Response.Response.StatusCode
30804			}
30805			tracing.EndSpan(ctx, sc, err)
30806		}()
30807	}
30808	iter.i++
30809	if iter.i < len(iter.page.Values()) {
30810		return nil
30811	}
30812	err = iter.page.NextWithContext(ctx)
30813	if err != nil {
30814		iter.i--
30815		return err
30816	}
30817	iter.i = 0
30818	return nil
30819}
30820
30821// Next advances to the next value.  If there was an error making
30822// the request the iterator does not advance and the error is returned.
30823// Deprecated: Use NextWithContext() instead.
30824func (iter *SecurityGroupListResultIterator) Next() error {
30825	return iter.NextWithContext(context.Background())
30826}
30827
30828// NotDone returns true if the enumeration should be started or is not yet complete.
30829func (iter SecurityGroupListResultIterator) NotDone() bool {
30830	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30831}
30832
30833// Response returns the raw server response from the last page request.
30834func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
30835	return iter.page.Response()
30836}
30837
30838// Value returns the current value or a zero-initialized value if the
30839// iterator has advanced beyond the end of the collection.
30840func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
30841	if !iter.page.NotDone() {
30842		return SecurityGroup{}
30843	}
30844	return iter.page.Values()[iter.i]
30845}
30846
30847// Creates a new instance of the SecurityGroupListResultIterator type.
30848func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
30849	return SecurityGroupListResultIterator{page: page}
30850}
30851
30852// IsEmpty returns true if the ListResult contains no values.
30853func (sglr SecurityGroupListResult) IsEmpty() bool {
30854	return sglr.Value == nil || len(*sglr.Value) == 0
30855}
30856
30857// hasNextLink returns true if the NextLink is not empty.
30858func (sglr SecurityGroupListResult) hasNextLink() bool {
30859	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
30860}
30861
30862// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
30863// It returns nil if no more results exist.
30864func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
30865	if !sglr.hasNextLink() {
30866		return nil, nil
30867	}
30868	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30869		autorest.AsJSON(),
30870		autorest.AsGet(),
30871		autorest.WithBaseURL(to.String(sglr.NextLink)))
30872}
30873
30874// SecurityGroupListResultPage contains a page of SecurityGroup values.
30875type SecurityGroupListResultPage struct {
30876	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
30877	sglr SecurityGroupListResult
30878}
30879
30880// NextWithContext advances to the next page of values.  If there was an error making
30881// the request the page does not advance and the error is returned.
30882func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
30883	if tracing.IsEnabled() {
30884		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
30885		defer func() {
30886			sc := -1
30887			if page.Response().Response.Response != nil {
30888				sc = page.Response().Response.Response.StatusCode
30889			}
30890			tracing.EndSpan(ctx, sc, err)
30891		}()
30892	}
30893	for {
30894		next, err := page.fn(ctx, page.sglr)
30895		if err != nil {
30896			return err
30897		}
30898		page.sglr = next
30899		if !next.hasNextLink() || !next.IsEmpty() {
30900			break
30901		}
30902	}
30903	return nil
30904}
30905
30906// Next 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.
30908// Deprecated: Use NextWithContext() instead.
30909func (page *SecurityGroupListResultPage) Next() error {
30910	return page.NextWithContext(context.Background())
30911}
30912
30913// NotDone returns true if the page enumeration should be started or is not yet complete.
30914func (page SecurityGroupListResultPage) NotDone() bool {
30915	return !page.sglr.IsEmpty()
30916}
30917
30918// Response returns the raw server response from the last page request.
30919func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
30920	return page.sglr
30921}
30922
30923// Values returns the slice of values for the current page or nil if there are no values.
30924func (page SecurityGroupListResultPage) Values() []SecurityGroup {
30925	if page.sglr.IsEmpty() {
30926		return nil
30927	}
30928	return *page.sglr.Value
30929}
30930
30931// Creates a new instance of the SecurityGroupListResultPage type.
30932func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
30933	return SecurityGroupListResultPage{
30934		fn:   getNextPage,
30935		sglr: cur,
30936	}
30937}
30938
30939// SecurityGroupNetworkInterface network interface and all its associated security rules.
30940type SecurityGroupNetworkInterface struct {
30941	// ID - ID of the network interface.
30942	ID *string `json:"id,omitempty"`
30943	// SecurityRuleAssociations - All security rules associated with the network interface.
30944	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
30945}
30946
30947// SecurityGroupPropertiesFormat network Security Group resource.
30948type SecurityGroupPropertiesFormat struct {
30949	// SecurityRules - A collection of security rules of the network security group.
30950	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
30951	// DefaultSecurityRules - READ-ONLY; The default security rules of network security group.
30952	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
30953	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
30954	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
30955	// Subnets - READ-ONLY; A collection of references to subnets.
30956	Subnets *[]Subnet `json:"subnets,omitempty"`
30957	// FlowLogs - READ-ONLY; A collection of references to flow log resources.
30958	FlowLogs *[]FlowLog `json:"flowLogs,omitempty"`
30959	// ResourceGUID - READ-ONLY; The resource GUID property of the network security group resource.
30960	ResourceGUID *string `json:"resourceGuid,omitempty"`
30961	// ProvisioningState - READ-ONLY; The provisioning state of the network security group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30962	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30963}
30964
30965// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
30966func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
30967	objectMap := make(map[string]interface{})
30968	if sgpf.SecurityRules != nil {
30969		objectMap["securityRules"] = sgpf.SecurityRules
30970	}
30971	return json.Marshal(objectMap)
30972}
30973
30974// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
30975type SecurityGroupResult struct {
30976	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
30977	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
30978	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
30979	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
30980}
30981
30982// MarshalJSON is the custom marshaler for SecurityGroupResult.
30983func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
30984	objectMap := make(map[string]interface{})
30985	if sgr.SecurityRuleAccessResult != "" {
30986		objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
30987	}
30988	return json.Marshal(objectMap)
30989}
30990
30991// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30992// long-running operation.
30993type SecurityGroupsCreateOrUpdateFuture struct {
30994	azure.FutureAPI
30995	// Result returns the result of the asynchronous operation.
30996	// If the operation has not completed it will return an error.
30997	Result func(SecurityGroupsClient) (SecurityGroup, error)
30998}
30999
31000// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31001func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
31002	var azFuture azure.Future
31003	if err := json.Unmarshal(body, &azFuture); err != nil {
31004		return err
31005	}
31006	future.FutureAPI = &azFuture
31007	future.Result = future.result
31008	return nil
31009}
31010
31011// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result.
31012func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
31013	var done bool
31014	done, err = future.DoneWithContext(context.Background(), client)
31015	if err != nil {
31016		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
31017		return
31018	}
31019	if !done {
31020		sg.Response.Response = future.Response()
31021		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
31022		return
31023	}
31024	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31025	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
31026		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
31027		if err != nil {
31028			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
31029		}
31030	}
31031	return
31032}
31033
31034// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
31035// operation.
31036type SecurityGroupsDeleteFuture struct {
31037	azure.FutureAPI
31038	// Result returns the result of the asynchronous operation.
31039	// If the operation has not completed it will return an error.
31040	Result func(SecurityGroupsClient) (autorest.Response, error)
31041}
31042
31043// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31044func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
31045	var azFuture azure.Future
31046	if err := json.Unmarshal(body, &azFuture); err != nil {
31047		return err
31048	}
31049	future.FutureAPI = &azFuture
31050	future.Result = future.result
31051	return nil
31052}
31053
31054// result is the default implementation for SecurityGroupsDeleteFuture.Result.
31055func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) {
31056	var done bool
31057	done, err = future.DoneWithContext(context.Background(), client)
31058	if err != nil {
31059		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
31060		return
31061	}
31062	if !done {
31063		ar.Response = future.Response()
31064		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
31065		return
31066	}
31067	ar.Response = future.Response()
31068	return
31069}
31070
31071// SecurityGroupViewParameters parameters that define the VM to check security groups for.
31072type SecurityGroupViewParameters struct {
31073	// TargetResourceID - ID of the target VM.
31074	TargetResourceID *string `json:"targetResourceId,omitempty"`
31075}
31076
31077// SecurityGroupViewResult the information about security rules applied to the specified VM.
31078type SecurityGroupViewResult struct {
31079	autorest.Response `json:"-"`
31080	// NetworkInterfaces - List of network interfaces on the specified VM.
31081	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
31082}
31083
31084// SecurityPartnerProvider security Partner Provider resource.
31085type SecurityPartnerProvider struct {
31086	autorest.Response `json:"-"`
31087	// SecurityPartnerProviderPropertiesFormat - Properties of the Security Partner Provider.
31088	*SecurityPartnerProviderPropertiesFormat `json:"properties,omitempty"`
31089	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
31090	Etag *string `json:"etag,omitempty"`
31091	// ID - Resource ID.
31092	ID *string `json:"id,omitempty"`
31093	// Name - READ-ONLY; Resource name.
31094	Name *string `json:"name,omitempty"`
31095	// Type - READ-ONLY; Resource type.
31096	Type *string `json:"type,omitempty"`
31097	// Location - Resource location.
31098	Location *string `json:"location,omitempty"`
31099	// Tags - Resource tags.
31100	Tags map[string]*string `json:"tags"`
31101}
31102
31103// MarshalJSON is the custom marshaler for SecurityPartnerProvider.
31104func (spp SecurityPartnerProvider) MarshalJSON() ([]byte, error) {
31105	objectMap := make(map[string]interface{})
31106	if spp.SecurityPartnerProviderPropertiesFormat != nil {
31107		objectMap["properties"] = spp.SecurityPartnerProviderPropertiesFormat
31108	}
31109	if spp.ID != nil {
31110		objectMap["id"] = spp.ID
31111	}
31112	if spp.Location != nil {
31113		objectMap["location"] = spp.Location
31114	}
31115	if spp.Tags != nil {
31116		objectMap["tags"] = spp.Tags
31117	}
31118	return json.Marshal(objectMap)
31119}
31120
31121// UnmarshalJSON is the custom unmarshaler for SecurityPartnerProvider struct.
31122func (spp *SecurityPartnerProvider) 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 "properties":
31131			if v != nil {
31132				var securityPartnerProviderPropertiesFormat SecurityPartnerProviderPropertiesFormat
31133				err = json.Unmarshal(*v, &securityPartnerProviderPropertiesFormat)
31134				if err != nil {
31135					return err
31136				}
31137				spp.SecurityPartnerProviderPropertiesFormat = &securityPartnerProviderPropertiesFormat
31138			}
31139		case "etag":
31140			if v != nil {
31141				var etag string
31142				err = json.Unmarshal(*v, &etag)
31143				if err != nil {
31144					return err
31145				}
31146				spp.Etag = &etag
31147			}
31148		case "id":
31149			if v != nil {
31150				var ID string
31151				err = json.Unmarshal(*v, &ID)
31152				if err != nil {
31153					return err
31154				}
31155				spp.ID = &ID
31156			}
31157		case "name":
31158			if v != nil {
31159				var name string
31160				err = json.Unmarshal(*v, &name)
31161				if err != nil {
31162					return err
31163				}
31164				spp.Name = &name
31165			}
31166		case "type":
31167			if v != nil {
31168				var typeVar string
31169				err = json.Unmarshal(*v, &typeVar)
31170				if err != nil {
31171					return err
31172				}
31173				spp.Type = &typeVar
31174			}
31175		case "location":
31176			if v != nil {
31177				var location string
31178				err = json.Unmarshal(*v, &location)
31179				if err != nil {
31180					return err
31181				}
31182				spp.Location = &location
31183			}
31184		case "tags":
31185			if v != nil {
31186				var tags map[string]*string
31187				err = json.Unmarshal(*v, &tags)
31188				if err != nil {
31189					return err
31190				}
31191				spp.Tags = tags
31192			}
31193		}
31194	}
31195
31196	return nil
31197}
31198
31199// SecurityPartnerProviderListResult response for ListSecurityPartnerProviders API service call.
31200type SecurityPartnerProviderListResult struct {
31201	autorest.Response `json:"-"`
31202	// Value - List of Security Partner Providers in a resource group.
31203	Value *[]SecurityPartnerProvider `json:"value,omitempty"`
31204	// NextLink - URL to get the next set of results.
31205	NextLink *string `json:"nextLink,omitempty"`
31206}
31207
31208// SecurityPartnerProviderListResultIterator provides access to a complete listing of
31209// SecurityPartnerProvider values.
31210type SecurityPartnerProviderListResultIterator struct {
31211	i    int
31212	page SecurityPartnerProviderListResultPage
31213}
31214
31215// NextWithContext advances to the next value.  If there was an error making
31216// the request the iterator does not advance and the error is returned.
31217func (iter *SecurityPartnerProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
31218	if tracing.IsEnabled() {
31219		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProviderListResultIterator.NextWithContext")
31220		defer func() {
31221			sc := -1
31222			if iter.Response().Response.Response != nil {
31223				sc = iter.Response().Response.Response.StatusCode
31224			}
31225			tracing.EndSpan(ctx, sc, err)
31226		}()
31227	}
31228	iter.i++
31229	if iter.i < len(iter.page.Values()) {
31230		return nil
31231	}
31232	err = iter.page.NextWithContext(ctx)
31233	if err != nil {
31234		iter.i--
31235		return err
31236	}
31237	iter.i = 0
31238	return nil
31239}
31240
31241// Next advances to the next value.  If there was an error making
31242// the request the iterator does not advance and the error is returned.
31243// Deprecated: Use NextWithContext() instead.
31244func (iter *SecurityPartnerProviderListResultIterator) Next() error {
31245	return iter.NextWithContext(context.Background())
31246}
31247
31248// NotDone returns true if the enumeration should be started or is not yet complete.
31249func (iter SecurityPartnerProviderListResultIterator) NotDone() bool {
31250	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31251}
31252
31253// Response returns the raw server response from the last page request.
31254func (iter SecurityPartnerProviderListResultIterator) Response() SecurityPartnerProviderListResult {
31255	return iter.page.Response()
31256}
31257
31258// Value returns the current value or a zero-initialized value if the
31259// iterator has advanced beyond the end of the collection.
31260func (iter SecurityPartnerProviderListResultIterator) Value() SecurityPartnerProvider {
31261	if !iter.page.NotDone() {
31262		return SecurityPartnerProvider{}
31263	}
31264	return iter.page.Values()[iter.i]
31265}
31266
31267// Creates a new instance of the SecurityPartnerProviderListResultIterator type.
31268func NewSecurityPartnerProviderListResultIterator(page SecurityPartnerProviderListResultPage) SecurityPartnerProviderListResultIterator {
31269	return SecurityPartnerProviderListResultIterator{page: page}
31270}
31271
31272// IsEmpty returns true if the ListResult contains no values.
31273func (spplr SecurityPartnerProviderListResult) IsEmpty() bool {
31274	return spplr.Value == nil || len(*spplr.Value) == 0
31275}
31276
31277// hasNextLink returns true if the NextLink is not empty.
31278func (spplr SecurityPartnerProviderListResult) hasNextLink() bool {
31279	return spplr.NextLink != nil && len(*spplr.NextLink) != 0
31280}
31281
31282// securityPartnerProviderListResultPreparer prepares a request to retrieve the next set of results.
31283// It returns nil if no more results exist.
31284func (spplr SecurityPartnerProviderListResult) securityPartnerProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
31285	if !spplr.hasNextLink() {
31286		return nil, nil
31287	}
31288	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31289		autorest.AsJSON(),
31290		autorest.AsGet(),
31291		autorest.WithBaseURL(to.String(spplr.NextLink)))
31292}
31293
31294// SecurityPartnerProviderListResultPage contains a page of SecurityPartnerProvider values.
31295type SecurityPartnerProviderListResultPage struct {
31296	fn    func(context.Context, SecurityPartnerProviderListResult) (SecurityPartnerProviderListResult, error)
31297	spplr SecurityPartnerProviderListResult
31298}
31299
31300// NextWithContext advances to the next page of values.  If there was an error making
31301// the request the page does not advance and the error is returned.
31302func (page *SecurityPartnerProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
31303	if tracing.IsEnabled() {
31304		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProviderListResultPage.NextWithContext")
31305		defer func() {
31306			sc := -1
31307			if page.Response().Response.Response != nil {
31308				sc = page.Response().Response.Response.StatusCode
31309			}
31310			tracing.EndSpan(ctx, sc, err)
31311		}()
31312	}
31313	for {
31314		next, err := page.fn(ctx, page.spplr)
31315		if err != nil {
31316			return err
31317		}
31318		page.spplr = next
31319		if !next.hasNextLink() || !next.IsEmpty() {
31320			break
31321		}
31322	}
31323	return nil
31324}
31325
31326// Next advances to the next page of values.  If there was an error making
31327// the request the page does not advance and the error is returned.
31328// Deprecated: Use NextWithContext() instead.
31329func (page *SecurityPartnerProviderListResultPage) Next() error {
31330	return page.NextWithContext(context.Background())
31331}
31332
31333// NotDone returns true if the page enumeration should be started or is not yet complete.
31334func (page SecurityPartnerProviderListResultPage) NotDone() bool {
31335	return !page.spplr.IsEmpty()
31336}
31337
31338// Response returns the raw server response from the last page request.
31339func (page SecurityPartnerProviderListResultPage) Response() SecurityPartnerProviderListResult {
31340	return page.spplr
31341}
31342
31343// Values returns the slice of values for the current page or nil if there are no values.
31344func (page SecurityPartnerProviderListResultPage) Values() []SecurityPartnerProvider {
31345	if page.spplr.IsEmpty() {
31346		return nil
31347	}
31348	return *page.spplr.Value
31349}
31350
31351// Creates a new instance of the SecurityPartnerProviderListResultPage type.
31352func NewSecurityPartnerProviderListResultPage(cur SecurityPartnerProviderListResult, getNextPage func(context.Context, SecurityPartnerProviderListResult) (SecurityPartnerProviderListResult, error)) SecurityPartnerProviderListResultPage {
31353	return SecurityPartnerProviderListResultPage{
31354		fn:    getNextPage,
31355		spplr: cur,
31356	}
31357}
31358
31359// SecurityPartnerProviderPropertiesFormat properties of the Security Partner Provider.
31360type SecurityPartnerProviderPropertiesFormat struct {
31361	// ProvisioningState - READ-ONLY; The provisioning state of the Security Partner Provider resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
31362	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31363	// SecurityProviderName - The security provider name. Possible values include: 'ZScaler', 'IBoss', 'Checkpoint'
31364	SecurityProviderName SecurityProviderName `json:"securityProviderName,omitempty"`
31365	// ConnectionStatus - READ-ONLY; The connection status with the Security Partner Provider. Possible values include: 'SecurityPartnerProviderConnectionStatusUnknown', 'SecurityPartnerProviderConnectionStatusPartiallyConnected', 'SecurityPartnerProviderConnectionStatusConnected', 'SecurityPartnerProviderConnectionStatusNotConnected'
31366	ConnectionStatus SecurityPartnerProviderConnectionStatus `json:"connectionStatus,omitempty"`
31367	// VirtualHub - The virtualHub to which the Security Partner Provider belongs.
31368	VirtualHub *SubResource `json:"virtualHub,omitempty"`
31369}
31370
31371// MarshalJSON is the custom marshaler for SecurityPartnerProviderPropertiesFormat.
31372func (spppf SecurityPartnerProviderPropertiesFormat) MarshalJSON() ([]byte, error) {
31373	objectMap := make(map[string]interface{})
31374	if spppf.SecurityProviderName != "" {
31375		objectMap["securityProviderName"] = spppf.SecurityProviderName
31376	}
31377	if spppf.VirtualHub != nil {
31378		objectMap["virtualHub"] = spppf.VirtualHub
31379	}
31380	return json.Marshal(objectMap)
31381}
31382
31383// SecurityPartnerProvidersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
31384// a long-running operation.
31385type SecurityPartnerProvidersCreateOrUpdateFuture struct {
31386	azure.FutureAPI
31387	// Result returns the result of the asynchronous operation.
31388	// If the operation has not completed it will return an error.
31389	Result func(SecurityPartnerProvidersClient) (SecurityPartnerProvider, error)
31390}
31391
31392// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31393func (future *SecurityPartnerProvidersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
31394	var azFuture azure.Future
31395	if err := json.Unmarshal(body, &azFuture); err != nil {
31396		return err
31397	}
31398	future.FutureAPI = &azFuture
31399	future.Result = future.result
31400	return nil
31401}
31402
31403// result is the default implementation for SecurityPartnerProvidersCreateOrUpdateFuture.Result.
31404func (future *SecurityPartnerProvidersCreateOrUpdateFuture) result(client SecurityPartnerProvidersClient) (spp SecurityPartnerProvider, err error) {
31405	var done bool
31406	done, err = future.DoneWithContext(context.Background(), client)
31407	if err != nil {
31408		err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
31409		return
31410	}
31411	if !done {
31412		spp.Response.Response = future.Response()
31413		err = azure.NewAsyncOpIncompleteError("network.SecurityPartnerProvidersCreateOrUpdateFuture")
31414		return
31415	}
31416	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31417	if spp.Response.Response, err = future.GetResult(sender); err == nil && spp.Response.Response.StatusCode != http.StatusNoContent {
31418		spp, err = client.CreateOrUpdateResponder(spp.Response.Response)
31419		if err != nil {
31420			err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersCreateOrUpdateFuture", "Result", spp.Response.Response, "Failure responding to request")
31421		}
31422	}
31423	return
31424}
31425
31426// SecurityPartnerProvidersDeleteFuture an abstraction for monitoring and retrieving the results of a
31427// long-running operation.
31428type SecurityPartnerProvidersDeleteFuture struct {
31429	azure.FutureAPI
31430	// Result returns the result of the asynchronous operation.
31431	// If the operation has not completed it will return an error.
31432	Result func(SecurityPartnerProvidersClient) (autorest.Response, error)
31433}
31434
31435// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31436func (future *SecurityPartnerProvidersDeleteFuture) UnmarshalJSON(body []byte) error {
31437	var azFuture azure.Future
31438	if err := json.Unmarshal(body, &azFuture); err != nil {
31439		return err
31440	}
31441	future.FutureAPI = &azFuture
31442	future.Result = future.result
31443	return nil
31444}
31445
31446// result is the default implementation for SecurityPartnerProvidersDeleteFuture.Result.
31447func (future *SecurityPartnerProvidersDeleteFuture) result(client SecurityPartnerProvidersClient) (ar autorest.Response, err error) {
31448	var done bool
31449	done, err = future.DoneWithContext(context.Background(), client)
31450	if err != nil {
31451		err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersDeleteFuture", "Result", future.Response(), "Polling failure")
31452		return
31453	}
31454	if !done {
31455		ar.Response = future.Response()
31456		err = azure.NewAsyncOpIncompleteError("network.SecurityPartnerProvidersDeleteFuture")
31457		return
31458	}
31459	ar.Response = future.Response()
31460	return
31461}
31462
31463// SecurityRule network security rule.
31464type SecurityRule struct {
31465	autorest.Response `json:"-"`
31466	// SecurityRulePropertiesFormat - Properties of the security rule.
31467	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
31468	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
31469	Name *string `json:"name,omitempty"`
31470	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
31471	Etag *string `json:"etag,omitempty"`
31472	// ID - Resource ID.
31473	ID *string `json:"id,omitempty"`
31474}
31475
31476// MarshalJSON is the custom marshaler for SecurityRule.
31477func (sr SecurityRule) MarshalJSON() ([]byte, error) {
31478	objectMap := make(map[string]interface{})
31479	if sr.SecurityRulePropertiesFormat != nil {
31480		objectMap["properties"] = sr.SecurityRulePropertiesFormat
31481	}
31482	if sr.Name != nil {
31483		objectMap["name"] = sr.Name
31484	}
31485	if sr.ID != nil {
31486		objectMap["id"] = sr.ID
31487	}
31488	return json.Marshal(objectMap)
31489}
31490
31491// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
31492func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
31493	var m map[string]*json.RawMessage
31494	err := json.Unmarshal(body, &m)
31495	if err != nil {
31496		return err
31497	}
31498	for k, v := range m {
31499		switch k {
31500		case "properties":
31501			if v != nil {
31502				var securityRulePropertiesFormat SecurityRulePropertiesFormat
31503				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
31504				if err != nil {
31505					return err
31506				}
31507				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
31508			}
31509		case "name":
31510			if v != nil {
31511				var name string
31512				err = json.Unmarshal(*v, &name)
31513				if err != nil {
31514					return err
31515				}
31516				sr.Name = &name
31517			}
31518		case "etag":
31519			if v != nil {
31520				var etag string
31521				err = json.Unmarshal(*v, &etag)
31522				if err != nil {
31523					return err
31524				}
31525				sr.Etag = &etag
31526			}
31527		case "id":
31528			if v != nil {
31529				var ID string
31530				err = json.Unmarshal(*v, &ID)
31531				if err != nil {
31532					return err
31533				}
31534				sr.ID = &ID
31535			}
31536		}
31537	}
31538
31539	return nil
31540}
31541
31542// SecurityRuleAssociations all security rules associated with the network interface.
31543type SecurityRuleAssociations struct {
31544	// NetworkInterfaceAssociation - Network interface and it's custom security rules.
31545	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
31546	// SubnetAssociation - Subnet and it's custom security rules.
31547	SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"`
31548	// DefaultSecurityRules - Collection of default security rules of the network security group.
31549	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
31550	// EffectiveSecurityRules - Collection of effective security rules.
31551	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
31552}
31553
31554// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
31555// belongs to a network security group.
31556type SecurityRuleListResult struct {
31557	autorest.Response `json:"-"`
31558	// Value - The security rules in a network security group.
31559	Value *[]SecurityRule `json:"value,omitempty"`
31560	// NextLink - The URL to get the next set of results.
31561	NextLink *string `json:"nextLink,omitempty"`
31562}
31563
31564// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
31565type SecurityRuleListResultIterator struct {
31566	i    int
31567	page SecurityRuleListResultPage
31568}
31569
31570// NextWithContext advances to the next value.  If there was an error making
31571// the request the iterator does not advance and the error is returned.
31572func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
31573	if tracing.IsEnabled() {
31574		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
31575		defer func() {
31576			sc := -1
31577			if iter.Response().Response.Response != nil {
31578				sc = iter.Response().Response.Response.StatusCode
31579			}
31580			tracing.EndSpan(ctx, sc, err)
31581		}()
31582	}
31583	iter.i++
31584	if iter.i < len(iter.page.Values()) {
31585		return nil
31586	}
31587	err = iter.page.NextWithContext(ctx)
31588	if err != nil {
31589		iter.i--
31590		return err
31591	}
31592	iter.i = 0
31593	return nil
31594}
31595
31596// Next advances to the next value.  If there was an error making
31597// the request the iterator does not advance and the error is returned.
31598// Deprecated: Use NextWithContext() instead.
31599func (iter *SecurityRuleListResultIterator) Next() error {
31600	return iter.NextWithContext(context.Background())
31601}
31602
31603// NotDone returns true if the enumeration should be started or is not yet complete.
31604func (iter SecurityRuleListResultIterator) NotDone() bool {
31605	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31606}
31607
31608// Response returns the raw server response from the last page request.
31609func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
31610	return iter.page.Response()
31611}
31612
31613// Value returns the current value or a zero-initialized value if the
31614// iterator has advanced beyond the end of the collection.
31615func (iter SecurityRuleListResultIterator) Value() SecurityRule {
31616	if !iter.page.NotDone() {
31617		return SecurityRule{}
31618	}
31619	return iter.page.Values()[iter.i]
31620}
31621
31622// Creates a new instance of the SecurityRuleListResultIterator type.
31623func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
31624	return SecurityRuleListResultIterator{page: page}
31625}
31626
31627// IsEmpty returns true if the ListResult contains no values.
31628func (srlr SecurityRuleListResult) IsEmpty() bool {
31629	return srlr.Value == nil || len(*srlr.Value) == 0
31630}
31631
31632// hasNextLink returns true if the NextLink is not empty.
31633func (srlr SecurityRuleListResult) hasNextLink() bool {
31634	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
31635}
31636
31637// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
31638// It returns nil if no more results exist.
31639func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
31640	if !srlr.hasNextLink() {
31641		return nil, nil
31642	}
31643	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31644		autorest.AsJSON(),
31645		autorest.AsGet(),
31646		autorest.WithBaseURL(to.String(srlr.NextLink)))
31647}
31648
31649// SecurityRuleListResultPage contains a page of SecurityRule values.
31650type SecurityRuleListResultPage struct {
31651	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
31652	srlr SecurityRuleListResult
31653}
31654
31655// NextWithContext advances to the next page of values.  If there was an error making
31656// the request the page does not advance and the error is returned.
31657func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
31658	if tracing.IsEnabled() {
31659		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
31660		defer func() {
31661			sc := -1
31662			if page.Response().Response.Response != nil {
31663				sc = page.Response().Response.Response.StatusCode
31664			}
31665			tracing.EndSpan(ctx, sc, err)
31666		}()
31667	}
31668	for {
31669		next, err := page.fn(ctx, page.srlr)
31670		if err != nil {
31671			return err
31672		}
31673		page.srlr = next
31674		if !next.hasNextLink() || !next.IsEmpty() {
31675			break
31676		}
31677	}
31678	return nil
31679}
31680
31681// Next advances to the next page of values.  If there was an error making
31682// the request the page does not advance and the error is returned.
31683// Deprecated: Use NextWithContext() instead.
31684func (page *SecurityRuleListResultPage) Next() error {
31685	return page.NextWithContext(context.Background())
31686}
31687
31688// NotDone returns true if the page enumeration should be started or is not yet complete.
31689func (page SecurityRuleListResultPage) NotDone() bool {
31690	return !page.srlr.IsEmpty()
31691}
31692
31693// Response returns the raw server response from the last page request.
31694func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
31695	return page.srlr
31696}
31697
31698// Values returns the slice of values for the current page or nil if there are no values.
31699func (page SecurityRuleListResultPage) Values() []SecurityRule {
31700	if page.srlr.IsEmpty() {
31701		return nil
31702	}
31703	return *page.srlr.Value
31704}
31705
31706// Creates a new instance of the SecurityRuleListResultPage type.
31707func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
31708	return SecurityRuleListResultPage{
31709		fn:   getNextPage,
31710		srlr: cur,
31711	}
31712}
31713
31714// SecurityRulePropertiesFormat security rule resource.
31715type SecurityRulePropertiesFormat struct {
31716	// Description - A description for this rule. Restricted to 140 chars.
31717	Description *string `json:"description,omitempty"`
31718	// Protocol - Network protocol this rule applies to. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolIcmp', 'SecurityRuleProtocolEsp', 'SecurityRuleProtocolAsterisk', 'SecurityRuleProtocolAh'
31719	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
31720	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
31721	SourcePortRange *string `json:"sourcePortRange,omitempty"`
31722	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
31723	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
31724	// 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.
31725	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
31726	// SourceAddressPrefixes - The CIDR or source IP ranges.
31727	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
31728	// SourceApplicationSecurityGroups - The application security group specified as source.
31729	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
31730	// 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.
31731	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
31732	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
31733	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
31734	// DestinationApplicationSecurityGroups - The application security group specified as destination.
31735	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
31736	// SourcePortRanges - The source port ranges.
31737	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
31738	// DestinationPortRanges - The destination port ranges.
31739	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
31740	// Access - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
31741	Access SecurityRuleAccess `json:"access,omitempty"`
31742	// 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.
31743	Priority *int32 `json:"priority,omitempty"`
31744	// Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
31745	Direction SecurityRuleDirection `json:"direction,omitempty"`
31746	// ProvisioningState - READ-ONLY; The provisioning state of the security rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
31747	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31748}
31749
31750// MarshalJSON is the custom marshaler for SecurityRulePropertiesFormat.
31751func (srpf SecurityRulePropertiesFormat) MarshalJSON() ([]byte, error) {
31752	objectMap := make(map[string]interface{})
31753	if srpf.Description != nil {
31754		objectMap["description"] = srpf.Description
31755	}
31756	if srpf.Protocol != "" {
31757		objectMap["protocol"] = srpf.Protocol
31758	}
31759	if srpf.SourcePortRange != nil {
31760		objectMap["sourcePortRange"] = srpf.SourcePortRange
31761	}
31762	if srpf.DestinationPortRange != nil {
31763		objectMap["destinationPortRange"] = srpf.DestinationPortRange
31764	}
31765	if srpf.SourceAddressPrefix != nil {
31766		objectMap["sourceAddressPrefix"] = srpf.SourceAddressPrefix
31767	}
31768	if srpf.SourceAddressPrefixes != nil {
31769		objectMap["sourceAddressPrefixes"] = srpf.SourceAddressPrefixes
31770	}
31771	if srpf.SourceApplicationSecurityGroups != nil {
31772		objectMap["sourceApplicationSecurityGroups"] = srpf.SourceApplicationSecurityGroups
31773	}
31774	if srpf.DestinationAddressPrefix != nil {
31775		objectMap["destinationAddressPrefix"] = srpf.DestinationAddressPrefix
31776	}
31777	if srpf.DestinationAddressPrefixes != nil {
31778		objectMap["destinationAddressPrefixes"] = srpf.DestinationAddressPrefixes
31779	}
31780	if srpf.DestinationApplicationSecurityGroups != nil {
31781		objectMap["destinationApplicationSecurityGroups"] = srpf.DestinationApplicationSecurityGroups
31782	}
31783	if srpf.SourcePortRanges != nil {
31784		objectMap["sourcePortRanges"] = srpf.SourcePortRanges
31785	}
31786	if srpf.DestinationPortRanges != nil {
31787		objectMap["destinationPortRanges"] = srpf.DestinationPortRanges
31788	}
31789	if srpf.Access != "" {
31790		objectMap["access"] = srpf.Access
31791	}
31792	if srpf.Priority != nil {
31793		objectMap["priority"] = srpf.Priority
31794	}
31795	if srpf.Direction != "" {
31796		objectMap["direction"] = srpf.Direction
31797	}
31798	return json.Marshal(objectMap)
31799}
31800
31801// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
31802// long-running operation.
31803type SecurityRulesCreateOrUpdateFuture struct {
31804	azure.FutureAPI
31805	// Result returns the result of the asynchronous operation.
31806	// If the operation has not completed it will return an error.
31807	Result func(SecurityRulesClient) (SecurityRule, error)
31808}
31809
31810// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31811func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
31812	var azFuture azure.Future
31813	if err := json.Unmarshal(body, &azFuture); err != nil {
31814		return err
31815	}
31816	future.FutureAPI = &azFuture
31817	future.Result = future.result
31818	return nil
31819}
31820
31821// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result.
31822func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) {
31823	var done bool
31824	done, err = future.DoneWithContext(context.Background(), client)
31825	if err != nil {
31826		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
31827		return
31828	}
31829	if !done {
31830		sr.Response.Response = future.Response()
31831		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
31832		return
31833	}
31834	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31835	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
31836		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
31837		if err != nil {
31838			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
31839		}
31840	}
31841	return
31842}
31843
31844// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
31845// operation.
31846type SecurityRulesDeleteFuture struct {
31847	azure.FutureAPI
31848	// Result returns the result of the asynchronous operation.
31849	// If the operation has not completed it will return an error.
31850	Result func(SecurityRulesClient) (autorest.Response, error)
31851}
31852
31853// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31854func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error {
31855	var azFuture azure.Future
31856	if err := json.Unmarshal(body, &azFuture); err != nil {
31857		return err
31858	}
31859	future.FutureAPI = &azFuture
31860	future.Result = future.result
31861	return nil
31862}
31863
31864// result is the default implementation for SecurityRulesDeleteFuture.Result.
31865func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) {
31866	var done bool
31867	done, err = future.DoneWithContext(context.Background(), client)
31868	if err != nil {
31869		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
31870		return
31871	}
31872	if !done {
31873		ar.Response = future.Response()
31874		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
31875		return
31876	}
31877	ar.Response = future.Response()
31878	return
31879}
31880
31881// SecurityRulesEvaluationResult network security rules evaluation result.
31882type SecurityRulesEvaluationResult struct {
31883	// Name - Name of the network security rule.
31884	Name *string `json:"name,omitempty"`
31885	// ProtocolMatched - Value indicating whether protocol is matched.
31886	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
31887	// SourceMatched - Value indicating whether source is matched.
31888	SourceMatched *bool `json:"sourceMatched,omitempty"`
31889	// SourcePortMatched - Value indicating whether source port is matched.
31890	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
31891	// DestinationMatched - Value indicating whether destination is matched.
31892	DestinationMatched *bool `json:"destinationMatched,omitempty"`
31893	// DestinationPortMatched - Value indicating whether destination port is matched.
31894	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
31895}
31896
31897// ServiceAssociationLink serviceAssociationLink resource.
31898type ServiceAssociationLink struct {
31899	// ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format.
31900	*ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"`
31901	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
31902	Name *string `json:"name,omitempty"`
31903	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
31904	Etag *string `json:"etag,omitempty"`
31905	// Type - READ-ONLY; Resource type.
31906	Type *string `json:"type,omitempty"`
31907	// ID - Resource ID.
31908	ID *string `json:"id,omitempty"`
31909}
31910
31911// MarshalJSON is the custom marshaler for ServiceAssociationLink.
31912func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) {
31913	objectMap := make(map[string]interface{})
31914	if sal.ServiceAssociationLinkPropertiesFormat != nil {
31915		objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat
31916	}
31917	if sal.Name != nil {
31918		objectMap["name"] = sal.Name
31919	}
31920	if sal.ID != nil {
31921		objectMap["id"] = sal.ID
31922	}
31923	return json.Marshal(objectMap)
31924}
31925
31926// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct.
31927func (sal *ServiceAssociationLink) UnmarshalJSON(body []byte) error {
31928	var m map[string]*json.RawMessage
31929	err := json.Unmarshal(body, &m)
31930	if err != nil {
31931		return err
31932	}
31933	for k, v := range m {
31934		switch k {
31935		case "properties":
31936			if v != nil {
31937				var serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat
31938				err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat)
31939				if err != nil {
31940					return err
31941				}
31942				sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat
31943			}
31944		case "name":
31945			if v != nil {
31946				var name string
31947				err = json.Unmarshal(*v, &name)
31948				if err != nil {
31949					return err
31950				}
31951				sal.Name = &name
31952			}
31953		case "etag":
31954			if v != nil {
31955				var etag string
31956				err = json.Unmarshal(*v, &etag)
31957				if err != nil {
31958					return err
31959				}
31960				sal.Etag = &etag
31961			}
31962		case "type":
31963			if v != nil {
31964				var typeVar string
31965				err = json.Unmarshal(*v, &typeVar)
31966				if err != nil {
31967					return err
31968				}
31969				sal.Type = &typeVar
31970			}
31971		case "id":
31972			if v != nil {
31973				var ID string
31974				err = json.Unmarshal(*v, &ID)
31975				if err != nil {
31976					return err
31977				}
31978				sal.ID = &ID
31979			}
31980		}
31981	}
31982
31983	return nil
31984}
31985
31986// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink.
31987type ServiceAssociationLinkPropertiesFormat struct {
31988	// LinkedResourceType - Resource type of the linked resource.
31989	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
31990	// Link - Link to the external resource.
31991	Link *string `json:"link,omitempty"`
31992	// ProvisioningState - READ-ONLY; The provisioning state of the service association link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
31993	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31994	// AllowDelete - If true, the resource can be deleted.
31995	AllowDelete *bool `json:"allowDelete,omitempty"`
31996	// Locations - A list of locations.
31997	Locations *[]string `json:"locations,omitempty"`
31998}
31999
32000// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat.
32001func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
32002	objectMap := make(map[string]interface{})
32003	if salpf.LinkedResourceType != nil {
32004		objectMap["linkedResourceType"] = salpf.LinkedResourceType
32005	}
32006	if salpf.Link != nil {
32007		objectMap["link"] = salpf.Link
32008	}
32009	if salpf.AllowDelete != nil {
32010		objectMap["allowDelete"] = salpf.AllowDelete
32011	}
32012	if salpf.Locations != nil {
32013		objectMap["locations"] = salpf.Locations
32014	}
32015	return json.Marshal(objectMap)
32016}
32017
32018// ServiceAssociationLinksListResult response for ServiceAssociationLinks_List operation.
32019type ServiceAssociationLinksListResult struct {
32020	autorest.Response `json:"-"`
32021	// Value - The service association links in a subnet.
32022	Value *[]ServiceAssociationLink `json:"value,omitempty"`
32023	// NextLink - READ-ONLY; The URL to get the next set of results.
32024	NextLink *string `json:"nextLink,omitempty"`
32025}
32026
32027// MarshalJSON is the custom marshaler for ServiceAssociationLinksListResult.
32028func (sallr ServiceAssociationLinksListResult) MarshalJSON() ([]byte, error) {
32029	objectMap := make(map[string]interface{})
32030	if sallr.Value != nil {
32031		objectMap["value"] = sallr.Value
32032	}
32033	return json.Marshal(objectMap)
32034}
32035
32036// ServiceDelegationPropertiesFormat properties of a service delegation.
32037type ServiceDelegationPropertiesFormat struct {
32038	// ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers).
32039	ServiceName *string `json:"serviceName,omitempty"`
32040	// Actions - READ-ONLY; The actions permitted to the service upon delegation.
32041	Actions *[]string `json:"actions,omitempty"`
32042	// ProvisioningState - READ-ONLY; The provisioning state of the service delegation resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
32043	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32044}
32045
32046// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat.
32047func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) {
32048	objectMap := make(map[string]interface{})
32049	if sdpf.ServiceName != nil {
32050		objectMap["serviceName"] = sdpf.ServiceName
32051	}
32052	return json.Marshal(objectMap)
32053}
32054
32055// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
32056// a long-running operation.
32057type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
32058	azure.FutureAPI
32059	// Result returns the result of the asynchronous operation.
32060	// If the operation has not completed it will return an error.
32061	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
32062}
32063
32064// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32065func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
32066	var azFuture azure.Future
32067	if err := json.Unmarshal(body, &azFuture); err != nil {
32068		return err
32069	}
32070	future.FutureAPI = &azFuture
32071	future.Result = future.result
32072	return nil
32073}
32074
32075// result is the default implementation for ServiceEndpointPoliciesCreateOrUpdateFuture.Result.
32076func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
32077	var done bool
32078	done, err = future.DoneWithContext(context.Background(), client)
32079	if err != nil {
32080		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
32081		return
32082	}
32083	if !done {
32084		sep.Response.Response = future.Response()
32085		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesCreateOrUpdateFuture")
32086		return
32087	}
32088	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32089	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
32090		sep, err = client.CreateOrUpdateResponder(sep.Response.Response)
32091		if err != nil {
32092			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
32093		}
32094	}
32095	return
32096}
32097
32098// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
32099// long-running operation.
32100type ServiceEndpointPoliciesDeleteFuture struct {
32101	azure.FutureAPI
32102	// Result returns the result of the asynchronous operation.
32103	// If the operation has not completed it will return an error.
32104	Result func(ServiceEndpointPoliciesClient) (autorest.Response, error)
32105}
32106
32107// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32108func (future *ServiceEndpointPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
32109	var azFuture azure.Future
32110	if err := json.Unmarshal(body, &azFuture); err != nil {
32111		return err
32112	}
32113	future.FutureAPI = &azFuture
32114	future.Result = future.result
32115	return nil
32116}
32117
32118// result is the default implementation for ServiceEndpointPoliciesDeleteFuture.Result.
32119func (future *ServiceEndpointPoliciesDeleteFuture) result(client ServiceEndpointPoliciesClient) (ar autorest.Response, err error) {
32120	var done bool
32121	done, err = future.DoneWithContext(context.Background(), client)
32122	if err != nil {
32123		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
32124		return
32125	}
32126	if !done {
32127		ar.Response = future.Response()
32128		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesDeleteFuture")
32129		return
32130	}
32131	ar.Response = future.Response()
32132	return
32133}
32134
32135// ServiceEndpointPolicy service End point policy resource.
32136type ServiceEndpointPolicy struct {
32137	autorest.Response `json:"-"`
32138	// ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy.
32139	*ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"`
32140	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
32141	Etag *string `json:"etag,omitempty"`
32142	// ID - Resource ID.
32143	ID *string `json:"id,omitempty"`
32144	// Name - READ-ONLY; Resource name.
32145	Name *string `json:"name,omitempty"`
32146	// Type - READ-ONLY; Resource type.
32147	Type *string `json:"type,omitempty"`
32148	// Location - Resource location.
32149	Location *string `json:"location,omitempty"`
32150	// Tags - Resource tags.
32151	Tags map[string]*string `json:"tags"`
32152}
32153
32154// MarshalJSON is the custom marshaler for ServiceEndpointPolicy.
32155func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) {
32156	objectMap := make(map[string]interface{})
32157	if sep.ServiceEndpointPolicyPropertiesFormat != nil {
32158		objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat
32159	}
32160	if sep.ID != nil {
32161		objectMap["id"] = sep.ID
32162	}
32163	if sep.Location != nil {
32164		objectMap["location"] = sep.Location
32165	}
32166	if sep.Tags != nil {
32167		objectMap["tags"] = sep.Tags
32168	}
32169	return json.Marshal(objectMap)
32170}
32171
32172// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct.
32173func (sep *ServiceEndpointPolicy) UnmarshalJSON(body []byte) error {
32174	var m map[string]*json.RawMessage
32175	err := json.Unmarshal(body, &m)
32176	if err != nil {
32177		return err
32178	}
32179	for k, v := range m {
32180		switch k {
32181		case "properties":
32182			if v != nil {
32183				var serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat
32184				err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat)
32185				if err != nil {
32186					return err
32187				}
32188				sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat
32189			}
32190		case "etag":
32191			if v != nil {
32192				var etag string
32193				err = json.Unmarshal(*v, &etag)
32194				if err != nil {
32195					return err
32196				}
32197				sep.Etag = &etag
32198			}
32199		case "id":
32200			if v != nil {
32201				var ID string
32202				err = json.Unmarshal(*v, &ID)
32203				if err != nil {
32204					return err
32205				}
32206				sep.ID = &ID
32207			}
32208		case "name":
32209			if v != nil {
32210				var name string
32211				err = json.Unmarshal(*v, &name)
32212				if err != nil {
32213					return err
32214				}
32215				sep.Name = &name
32216			}
32217		case "type":
32218			if v != nil {
32219				var typeVar string
32220				err = json.Unmarshal(*v, &typeVar)
32221				if err != nil {
32222					return err
32223				}
32224				sep.Type = &typeVar
32225			}
32226		case "location":
32227			if v != nil {
32228				var location string
32229				err = json.Unmarshal(*v, &location)
32230				if err != nil {
32231					return err
32232				}
32233				sep.Location = &location
32234			}
32235		case "tags":
32236			if v != nil {
32237				var tags map[string]*string
32238				err = json.Unmarshal(*v, &tags)
32239				if err != nil {
32240					return err
32241				}
32242				sep.Tags = tags
32243			}
32244		}
32245	}
32246
32247	return nil
32248}
32249
32250// ServiceEndpointPolicyDefinition service Endpoint policy definitions.
32251type ServiceEndpointPolicyDefinition struct {
32252	autorest.Response `json:"-"`
32253	// ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition.
32254	*ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"`
32255	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
32256	Name *string `json:"name,omitempty"`
32257	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
32258	Etag *string `json:"etag,omitempty"`
32259	// ID - Resource ID.
32260	ID *string `json:"id,omitempty"`
32261}
32262
32263// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition.
32264func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) {
32265	objectMap := make(map[string]interface{})
32266	if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil {
32267		objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat
32268	}
32269	if sepd.Name != nil {
32270		objectMap["name"] = sepd.Name
32271	}
32272	if sepd.ID != nil {
32273		objectMap["id"] = sepd.ID
32274	}
32275	return json.Marshal(objectMap)
32276}
32277
32278// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct.
32279func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error {
32280	var m map[string]*json.RawMessage
32281	err := json.Unmarshal(body, &m)
32282	if err != nil {
32283		return err
32284	}
32285	for k, v := range m {
32286		switch k {
32287		case "properties":
32288			if v != nil {
32289				var serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat
32290				err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat)
32291				if err != nil {
32292					return err
32293				}
32294				sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat
32295			}
32296		case "name":
32297			if v != nil {
32298				var name string
32299				err = json.Unmarshal(*v, &name)
32300				if err != nil {
32301					return err
32302				}
32303				sepd.Name = &name
32304			}
32305		case "etag":
32306			if v != nil {
32307				var etag string
32308				err = json.Unmarshal(*v, &etag)
32309				if err != nil {
32310					return err
32311				}
32312				sepd.Etag = &etag
32313			}
32314		case "id":
32315			if v != nil {
32316				var ID string
32317				err = json.Unmarshal(*v, &ID)
32318				if err != nil {
32319					return err
32320				}
32321				sepd.ID = &ID
32322			}
32323		}
32324	}
32325
32326	return nil
32327}
32328
32329// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service
32330// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
32331type ServiceEndpointPolicyDefinitionListResult struct {
32332	autorest.Response `json:"-"`
32333	// Value - The service endpoint policy definition in a service endpoint policy.
32334	Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"`
32335	// NextLink - The URL to get the next set of results.
32336	NextLink *string `json:"nextLink,omitempty"`
32337}
32338
32339// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of
32340// ServiceEndpointPolicyDefinition values.
32341type ServiceEndpointPolicyDefinitionListResultIterator struct {
32342	i    int
32343	page ServiceEndpointPolicyDefinitionListResultPage
32344}
32345
32346// NextWithContext advances to the next value.  If there was an error making
32347// the request the iterator does not advance and the error is returned.
32348func (iter *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
32349	if tracing.IsEnabled() {
32350		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.NextWithContext")
32351		defer func() {
32352			sc := -1
32353			if iter.Response().Response.Response != nil {
32354				sc = iter.Response().Response.Response.StatusCode
32355			}
32356			tracing.EndSpan(ctx, sc, err)
32357		}()
32358	}
32359	iter.i++
32360	if iter.i < len(iter.page.Values()) {
32361		return nil
32362	}
32363	err = iter.page.NextWithContext(ctx)
32364	if err != nil {
32365		iter.i--
32366		return err
32367	}
32368	iter.i = 0
32369	return nil
32370}
32371
32372// Next advances to the next value.  If there was an error making
32373// the request the iterator does not advance and the error is returned.
32374// Deprecated: Use NextWithContext() instead.
32375func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
32376	return iter.NextWithContext(context.Background())
32377}
32378
32379// NotDone returns true if the enumeration should be started or is not yet complete.
32380func (iter ServiceEndpointPolicyDefinitionListResultIterator) NotDone() bool {
32381	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32382}
32383
32384// Response returns the raw server response from the last page request.
32385func (iter ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult {
32386	return iter.page.Response()
32387}
32388
32389// Value returns the current value or a zero-initialized value if the
32390// iterator has advanced beyond the end of the collection.
32391func (iter ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition {
32392	if !iter.page.NotDone() {
32393		return ServiceEndpointPolicyDefinition{}
32394	}
32395	return iter.page.Values()[iter.i]
32396}
32397
32398// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
32399func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
32400	return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
32401}
32402
32403// IsEmpty returns true if the ListResult contains no values.
32404func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
32405	return sepdlr.Value == nil || len(*sepdlr.Value) == 0
32406}
32407
32408// hasNextLink returns true if the NextLink is not empty.
32409func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool {
32410	return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0
32411}
32412
32413// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
32414// It returns nil if no more results exist.
32415func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
32416	if !sepdlr.hasNextLink() {
32417		return nil, nil
32418	}
32419	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32420		autorest.AsJSON(),
32421		autorest.AsGet(),
32422		autorest.WithBaseURL(to.String(sepdlr.NextLink)))
32423}
32424
32425// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
32426type ServiceEndpointPolicyDefinitionListResultPage struct {
32427	fn     func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
32428	sepdlr ServiceEndpointPolicyDefinitionListResult
32429}
32430
32431// NextWithContext advances to the next page of values.  If there was an error making
32432// the request the page does not advance and the error is returned.
32433func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
32434	if tracing.IsEnabled() {
32435		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext")
32436		defer func() {
32437			sc := -1
32438			if page.Response().Response.Response != nil {
32439				sc = page.Response().Response.Response.StatusCode
32440			}
32441			tracing.EndSpan(ctx, sc, err)
32442		}()
32443	}
32444	for {
32445		next, err := page.fn(ctx, page.sepdlr)
32446		if err != nil {
32447			return err
32448		}
32449		page.sepdlr = next
32450		if !next.hasNextLink() || !next.IsEmpty() {
32451			break
32452		}
32453	}
32454	return nil
32455}
32456
32457// Next advances to the next page of values.  If there was an error making
32458// the request the page does not advance and the error is returned.
32459// Deprecated: Use NextWithContext() instead.
32460func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
32461	return page.NextWithContext(context.Background())
32462}
32463
32464// NotDone returns true if the page enumeration should be started or is not yet complete.
32465func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
32466	return !page.sepdlr.IsEmpty()
32467}
32468
32469// Response returns the raw server response from the last page request.
32470func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult {
32471	return page.sepdlr
32472}
32473
32474// Values returns the slice of values for the current page or nil if there are no values.
32475func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition {
32476	if page.sepdlr.IsEmpty() {
32477		return nil
32478	}
32479	return *page.sepdlr.Value
32480}
32481
32482// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
32483func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
32484	return ServiceEndpointPolicyDefinitionListResultPage{
32485		fn:     getNextPage,
32486		sepdlr: cur,
32487	}
32488}
32489
32490// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
32491type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
32492	// Description - A description for this rule. Restricted to 140 chars.
32493	Description *string `json:"description,omitempty"`
32494	// Service - Service endpoint name.
32495	Service *string `json:"service,omitempty"`
32496	// ServiceResources - A list of service resources.
32497	ServiceResources *[]string `json:"serviceResources,omitempty"`
32498	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy definition resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
32499	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32500}
32501
32502// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat.
32503func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) {
32504	objectMap := make(map[string]interface{})
32505	if sepdpf.Description != nil {
32506		objectMap["description"] = sepdpf.Description
32507	}
32508	if sepdpf.Service != nil {
32509		objectMap["service"] = sepdpf.Service
32510	}
32511	if sepdpf.ServiceResources != nil {
32512		objectMap["serviceResources"] = sepdpf.ServiceResources
32513	}
32514	return json.Marshal(objectMap)
32515}
32516
32517// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
32518// results of a long-running operation.
32519type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
32520	azure.FutureAPI
32521	// Result returns the result of the asynchronous operation.
32522	// If the operation has not completed it will return an error.
32523	Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error)
32524}
32525
32526// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32527func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
32528	var azFuture azure.Future
32529	if err := json.Unmarshal(body, &azFuture); err != nil {
32530		return err
32531	}
32532	future.FutureAPI = &azFuture
32533	future.Result = future.result
32534	return nil
32535}
32536
32537// result is the default implementation for ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture.Result.
32538func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) result(client ServiceEndpointPolicyDefinitionsClient) (sepd ServiceEndpointPolicyDefinition, err error) {
32539	var done bool
32540	done, err = future.DoneWithContext(context.Background(), client)
32541	if err != nil {
32542		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
32543		return
32544	}
32545	if !done {
32546		sepd.Response.Response = future.Response()
32547		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture")
32548		return
32549	}
32550	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32551	if sepd.Response.Response, err = future.GetResult(sender); err == nil && sepd.Response.Response.StatusCode != http.StatusNoContent {
32552		sepd, err = client.CreateOrUpdateResponder(sepd.Response.Response)
32553		if err != nil {
32554			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", sepd.Response.Response, "Failure responding to request")
32555		}
32556	}
32557	return
32558}
32559
32560// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
32561// a long-running operation.
32562type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
32563	azure.FutureAPI
32564	// Result returns the result of the asynchronous operation.
32565	// If the operation has not completed it will return an error.
32566	Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error)
32567}
32568
32569// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32570func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) UnmarshalJSON(body []byte) error {
32571	var azFuture azure.Future
32572	if err := json.Unmarshal(body, &azFuture); err != nil {
32573		return err
32574	}
32575	future.FutureAPI = &azFuture
32576	future.Result = future.result
32577	return nil
32578}
32579
32580// result is the default implementation for ServiceEndpointPolicyDefinitionsDeleteFuture.Result.
32581func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) result(client ServiceEndpointPolicyDefinitionsClient) (ar autorest.Response, err error) {
32582	var done bool
32583	done, err = future.DoneWithContext(context.Background(), client)
32584	if err != nil {
32585		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsDeleteFuture", "Result", future.Response(), "Polling failure")
32586		return
32587	}
32588	if !done {
32589		ar.Response = future.Response()
32590		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsDeleteFuture")
32591		return
32592	}
32593	ar.Response = future.Response()
32594	return
32595}
32596
32597// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
32598type ServiceEndpointPolicyListResult struct {
32599	autorest.Response `json:"-"`
32600	// Value - A list of ServiceEndpointPolicy resources.
32601	Value *[]ServiceEndpointPolicy `json:"value,omitempty"`
32602	// NextLink - READ-ONLY; The URL to get the next set of results.
32603	NextLink *string `json:"nextLink,omitempty"`
32604}
32605
32606// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult.
32607func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) {
32608	objectMap := make(map[string]interface{})
32609	if seplr.Value != nil {
32610		objectMap["value"] = seplr.Value
32611	}
32612	return json.Marshal(objectMap)
32613}
32614
32615// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
32616// values.
32617type ServiceEndpointPolicyListResultIterator struct {
32618	i    int
32619	page ServiceEndpointPolicyListResultPage
32620}
32621
32622// NextWithContext advances to the next value.  If there was an error making
32623// the request the iterator does not advance and the error is returned.
32624func (iter *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
32625	if tracing.IsEnabled() {
32626		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.NextWithContext")
32627		defer func() {
32628			sc := -1
32629			if iter.Response().Response.Response != nil {
32630				sc = iter.Response().Response.Response.StatusCode
32631			}
32632			tracing.EndSpan(ctx, sc, err)
32633		}()
32634	}
32635	iter.i++
32636	if iter.i < len(iter.page.Values()) {
32637		return nil
32638	}
32639	err = iter.page.NextWithContext(ctx)
32640	if err != nil {
32641		iter.i--
32642		return err
32643	}
32644	iter.i = 0
32645	return nil
32646}
32647
32648// Next advances to the next value.  If there was an error making
32649// the request the iterator does not advance and the error is returned.
32650// Deprecated: Use NextWithContext() instead.
32651func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
32652	return iter.NextWithContext(context.Background())
32653}
32654
32655// NotDone returns true if the enumeration should be started or is not yet complete.
32656func (iter ServiceEndpointPolicyListResultIterator) NotDone() bool {
32657	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32658}
32659
32660// Response returns the raw server response from the last page request.
32661func (iter ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult {
32662	return iter.page.Response()
32663}
32664
32665// Value returns the current value or a zero-initialized value if the
32666// iterator has advanced beyond the end of the collection.
32667func (iter ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy {
32668	if !iter.page.NotDone() {
32669		return ServiceEndpointPolicy{}
32670	}
32671	return iter.page.Values()[iter.i]
32672}
32673
32674// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
32675func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
32676	return ServiceEndpointPolicyListResultIterator{page: page}
32677}
32678
32679// IsEmpty returns true if the ListResult contains no values.
32680func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
32681	return seplr.Value == nil || len(*seplr.Value) == 0
32682}
32683
32684// hasNextLink returns true if the NextLink is not empty.
32685func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool {
32686	return seplr.NextLink != nil && len(*seplr.NextLink) != 0
32687}
32688
32689// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
32690// It returns nil if no more results exist.
32691func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
32692	if !seplr.hasNextLink() {
32693		return nil, nil
32694	}
32695	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32696		autorest.AsJSON(),
32697		autorest.AsGet(),
32698		autorest.WithBaseURL(to.String(seplr.NextLink)))
32699}
32700
32701// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
32702type ServiceEndpointPolicyListResultPage struct {
32703	fn    func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
32704	seplr ServiceEndpointPolicyListResult
32705}
32706
32707// NextWithContext advances to the next page of values.  If there was an error making
32708// the request the page does not advance and the error is returned.
32709func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
32710	if tracing.IsEnabled() {
32711		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext")
32712		defer func() {
32713			sc := -1
32714			if page.Response().Response.Response != nil {
32715				sc = page.Response().Response.Response.StatusCode
32716			}
32717			tracing.EndSpan(ctx, sc, err)
32718		}()
32719	}
32720	for {
32721		next, err := page.fn(ctx, page.seplr)
32722		if err != nil {
32723			return err
32724		}
32725		page.seplr = next
32726		if !next.hasNextLink() || !next.IsEmpty() {
32727			break
32728		}
32729	}
32730	return nil
32731}
32732
32733// Next advances to the next page of values.  If there was an error making
32734// the request the page does not advance and the error is returned.
32735// Deprecated: Use NextWithContext() instead.
32736func (page *ServiceEndpointPolicyListResultPage) Next() error {
32737	return page.NextWithContext(context.Background())
32738}
32739
32740// NotDone returns true if the page enumeration should be started or is not yet complete.
32741func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
32742	return !page.seplr.IsEmpty()
32743}
32744
32745// Response returns the raw server response from the last page request.
32746func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult {
32747	return page.seplr
32748}
32749
32750// Values returns the slice of values for the current page or nil if there are no values.
32751func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy {
32752	if page.seplr.IsEmpty() {
32753		return nil
32754	}
32755	return *page.seplr.Value
32756}
32757
32758// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
32759func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
32760	return ServiceEndpointPolicyListResultPage{
32761		fn:    getNextPage,
32762		seplr: cur,
32763	}
32764}
32765
32766// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
32767type ServiceEndpointPolicyPropertiesFormat struct {
32768	// ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
32769	ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"`
32770	// Subnets - READ-ONLY; A collection of references to subnets.
32771	Subnets *[]Subnet `json:"subnets,omitempty"`
32772	// ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource.
32773	ResourceGUID *string `json:"resourceGuid,omitempty"`
32774	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
32775	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32776}
32777
32778// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat.
32779func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
32780	objectMap := make(map[string]interface{})
32781	if seppf.ServiceEndpointPolicyDefinitions != nil {
32782		objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions
32783	}
32784	return json.Marshal(objectMap)
32785}
32786
32787// ServiceEndpointPropertiesFormat the service endpoint properties.
32788type ServiceEndpointPropertiesFormat struct {
32789	// Service - The type of the endpoint service.
32790	Service *string `json:"service,omitempty"`
32791	// Locations - A list of locations.
32792	Locations *[]string `json:"locations,omitempty"`
32793	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
32794	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32795}
32796
32797// MarshalJSON is the custom marshaler for ServiceEndpointPropertiesFormat.
32798func (sepf ServiceEndpointPropertiesFormat) MarshalJSON() ([]byte, error) {
32799	objectMap := make(map[string]interface{})
32800	if sepf.Service != nil {
32801		objectMap["service"] = sepf.Service
32802	}
32803	if sepf.Locations != nil {
32804		objectMap["locations"] = sepf.Locations
32805	}
32806	return json.Marshal(objectMap)
32807}
32808
32809// ServiceTagInformation the service tag information.
32810type ServiceTagInformation struct {
32811	// Properties - READ-ONLY; Properties of the service tag information.
32812	Properties *ServiceTagInformationPropertiesFormat `json:"properties,omitempty"`
32813	// Name - READ-ONLY; The name of service tag.
32814	Name *string `json:"name,omitempty"`
32815	// ID - READ-ONLY; The ID of service tag.
32816	ID *string `json:"id,omitempty"`
32817}
32818
32819// MarshalJSON is the custom marshaler for ServiceTagInformation.
32820func (sti ServiceTagInformation) MarshalJSON() ([]byte, error) {
32821	objectMap := make(map[string]interface{})
32822	return json.Marshal(objectMap)
32823}
32824
32825// ServiceTagInformationPropertiesFormat properties of the service tag information.
32826type ServiceTagInformationPropertiesFormat struct {
32827	// ChangeNumber - READ-ONLY; The iteration number of service tag.
32828	ChangeNumber *string `json:"changeNumber,omitempty"`
32829	// Region - READ-ONLY; The region of service tag.
32830	Region *string `json:"region,omitempty"`
32831	// SystemService - READ-ONLY; The name of system service.
32832	SystemService *string `json:"systemService,omitempty"`
32833	// AddressPrefixes - READ-ONLY; The list of IP address prefixes.
32834	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
32835}
32836
32837// MarshalJSON is the custom marshaler for ServiceTagInformationPropertiesFormat.
32838func (stipf ServiceTagInformationPropertiesFormat) MarshalJSON() ([]byte, error) {
32839	objectMap := make(map[string]interface{})
32840	return json.Marshal(objectMap)
32841}
32842
32843// ServiceTagsListResult response for the ListServiceTags API service call.
32844type ServiceTagsListResult struct {
32845	autorest.Response `json:"-"`
32846	// Name - READ-ONLY; The name of the cloud.
32847	Name *string `json:"name,omitempty"`
32848	// ID - READ-ONLY; The ID of the cloud.
32849	ID *string `json:"id,omitempty"`
32850	// Type - READ-ONLY; The azure resource type.
32851	Type *string `json:"type,omitempty"`
32852	// ChangeNumber - READ-ONLY; The iteration number.
32853	ChangeNumber *string `json:"changeNumber,omitempty"`
32854	// Cloud - READ-ONLY; The name of the cloud.
32855	Cloud *string `json:"cloud,omitempty"`
32856	// Values - READ-ONLY; The list of service tag information resources.
32857	Values *[]ServiceTagInformation `json:"values,omitempty"`
32858}
32859
32860// MarshalJSON is the custom marshaler for ServiceTagsListResult.
32861func (stlr ServiceTagsListResult) MarshalJSON() ([]byte, error) {
32862	objectMap := make(map[string]interface{})
32863	return json.Marshal(objectMap)
32864}
32865
32866// SessionIds list of session IDs.
32867type SessionIds struct {
32868	// SessionIds - List of session IDs.
32869	SessionIds *[]string `json:"sessionIds,omitempty"`
32870}
32871
32872// String ...
32873type String struct {
32874	autorest.Response `json:"-"`
32875	Value             *string `json:"value,omitempty"`
32876}
32877
32878// Subnet subnet in a virtual network resource.
32879type Subnet struct {
32880	autorest.Response `json:"-"`
32881	// SubnetPropertiesFormat - Properties of the subnet.
32882	*SubnetPropertiesFormat `json:"properties,omitempty"`
32883	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
32884	Name *string `json:"name,omitempty"`
32885	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
32886	Etag *string `json:"etag,omitempty"`
32887	// ID - Resource ID.
32888	ID *string `json:"id,omitempty"`
32889}
32890
32891// MarshalJSON is the custom marshaler for Subnet.
32892func (s Subnet) MarshalJSON() ([]byte, error) {
32893	objectMap := make(map[string]interface{})
32894	if s.SubnetPropertiesFormat != nil {
32895		objectMap["properties"] = s.SubnetPropertiesFormat
32896	}
32897	if s.Name != nil {
32898		objectMap["name"] = s.Name
32899	}
32900	if s.ID != nil {
32901		objectMap["id"] = s.ID
32902	}
32903	return json.Marshal(objectMap)
32904}
32905
32906// UnmarshalJSON is the custom unmarshaler for Subnet struct.
32907func (s *Subnet) UnmarshalJSON(body []byte) error {
32908	var m map[string]*json.RawMessage
32909	err := json.Unmarshal(body, &m)
32910	if err != nil {
32911		return err
32912	}
32913	for k, v := range m {
32914		switch k {
32915		case "properties":
32916			if v != nil {
32917				var subnetPropertiesFormat SubnetPropertiesFormat
32918				err = json.Unmarshal(*v, &subnetPropertiesFormat)
32919				if err != nil {
32920					return err
32921				}
32922				s.SubnetPropertiesFormat = &subnetPropertiesFormat
32923			}
32924		case "name":
32925			if v != nil {
32926				var name string
32927				err = json.Unmarshal(*v, &name)
32928				if err != nil {
32929					return err
32930				}
32931				s.Name = &name
32932			}
32933		case "etag":
32934			if v != nil {
32935				var etag string
32936				err = json.Unmarshal(*v, &etag)
32937				if err != nil {
32938					return err
32939				}
32940				s.Etag = &etag
32941			}
32942		case "id":
32943			if v != nil {
32944				var ID string
32945				err = json.Unmarshal(*v, &ID)
32946				if err != nil {
32947					return err
32948				}
32949				s.ID = &ID
32950			}
32951		}
32952	}
32953
32954	return nil
32955}
32956
32957// SubnetAssociation subnet and it's custom security rules.
32958type SubnetAssociation struct {
32959	// ID - READ-ONLY; Subnet ID.
32960	ID *string `json:"id,omitempty"`
32961	// SecurityRules - Collection of custom security rules.
32962	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
32963}
32964
32965// MarshalJSON is the custom marshaler for SubnetAssociation.
32966func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
32967	objectMap := make(map[string]interface{})
32968	if sa.SecurityRules != nil {
32969		objectMap["securityRules"] = sa.SecurityRules
32970	}
32971	return json.Marshal(objectMap)
32972}
32973
32974// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
32975// network.
32976type SubnetListResult struct {
32977	autorest.Response `json:"-"`
32978	// Value - The subnets in a virtual network.
32979	Value *[]Subnet `json:"value,omitempty"`
32980	// NextLink - The URL to get the next set of results.
32981	NextLink *string `json:"nextLink,omitempty"`
32982}
32983
32984// SubnetListResultIterator provides access to a complete listing of Subnet values.
32985type SubnetListResultIterator struct {
32986	i    int
32987	page SubnetListResultPage
32988}
32989
32990// NextWithContext advances to the next value.  If there was an error making
32991// the request the iterator does not advance and the error is returned.
32992func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
32993	if tracing.IsEnabled() {
32994		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
32995		defer func() {
32996			sc := -1
32997			if iter.Response().Response.Response != nil {
32998				sc = iter.Response().Response.Response.StatusCode
32999			}
33000			tracing.EndSpan(ctx, sc, err)
33001		}()
33002	}
33003	iter.i++
33004	if iter.i < len(iter.page.Values()) {
33005		return nil
33006	}
33007	err = iter.page.NextWithContext(ctx)
33008	if err != nil {
33009		iter.i--
33010		return err
33011	}
33012	iter.i = 0
33013	return nil
33014}
33015
33016// Next advances to the next value.  If there was an error making
33017// the request the iterator does not advance and the error is returned.
33018// Deprecated: Use NextWithContext() instead.
33019func (iter *SubnetListResultIterator) Next() error {
33020	return iter.NextWithContext(context.Background())
33021}
33022
33023// NotDone returns true if the enumeration should be started or is not yet complete.
33024func (iter SubnetListResultIterator) NotDone() bool {
33025	return iter.page.NotDone() && iter.i < len(iter.page.Values())
33026}
33027
33028// Response returns the raw server response from the last page request.
33029func (iter SubnetListResultIterator) Response() SubnetListResult {
33030	return iter.page.Response()
33031}
33032
33033// Value returns the current value or a zero-initialized value if the
33034// iterator has advanced beyond the end of the collection.
33035func (iter SubnetListResultIterator) Value() Subnet {
33036	if !iter.page.NotDone() {
33037		return Subnet{}
33038	}
33039	return iter.page.Values()[iter.i]
33040}
33041
33042// Creates a new instance of the SubnetListResultIterator type.
33043func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
33044	return SubnetListResultIterator{page: page}
33045}
33046
33047// IsEmpty returns true if the ListResult contains no values.
33048func (slr SubnetListResult) IsEmpty() bool {
33049	return slr.Value == nil || len(*slr.Value) == 0
33050}
33051
33052// hasNextLink returns true if the NextLink is not empty.
33053func (slr SubnetListResult) hasNextLink() bool {
33054	return slr.NextLink != nil && len(*slr.NextLink) != 0
33055}
33056
33057// subnetListResultPreparer prepares a request to retrieve the next set of results.
33058// It returns nil if no more results exist.
33059func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
33060	if !slr.hasNextLink() {
33061		return nil, nil
33062	}
33063	return autorest.Prepare((&http.Request{}).WithContext(ctx),
33064		autorest.AsJSON(),
33065		autorest.AsGet(),
33066		autorest.WithBaseURL(to.String(slr.NextLink)))
33067}
33068
33069// SubnetListResultPage contains a page of Subnet values.
33070type SubnetListResultPage struct {
33071	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
33072	slr SubnetListResult
33073}
33074
33075// NextWithContext advances to the next page of values.  If there was an error making
33076// the request the page does not advance and the error is returned.
33077func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
33078	if tracing.IsEnabled() {
33079		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
33080		defer func() {
33081			sc := -1
33082			if page.Response().Response.Response != nil {
33083				sc = page.Response().Response.Response.StatusCode
33084			}
33085			tracing.EndSpan(ctx, sc, err)
33086		}()
33087	}
33088	for {
33089		next, err := page.fn(ctx, page.slr)
33090		if err != nil {
33091			return err
33092		}
33093		page.slr = next
33094		if !next.hasNextLink() || !next.IsEmpty() {
33095			break
33096		}
33097	}
33098	return nil
33099}
33100
33101// Next advances to the next page of values.  If there was an error making
33102// the request the page does not advance and the error is returned.
33103// Deprecated: Use NextWithContext() instead.
33104func (page *SubnetListResultPage) Next() error {
33105	return page.NextWithContext(context.Background())
33106}
33107
33108// NotDone returns true if the page enumeration should be started or is not yet complete.
33109func (page SubnetListResultPage) NotDone() bool {
33110	return !page.slr.IsEmpty()
33111}
33112
33113// Response returns the raw server response from the last page request.
33114func (page SubnetListResultPage) Response() SubnetListResult {
33115	return page.slr
33116}
33117
33118// Values returns the slice of values for the current page or nil if there are no values.
33119func (page SubnetListResultPage) Values() []Subnet {
33120	if page.slr.IsEmpty() {
33121		return nil
33122	}
33123	return *page.slr.Value
33124}
33125
33126// Creates a new instance of the SubnetListResultPage type.
33127func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
33128	return SubnetListResultPage{
33129		fn:  getNextPage,
33130		slr: cur,
33131	}
33132}
33133
33134// SubnetPropertiesFormat properties of the subnet.
33135type SubnetPropertiesFormat struct {
33136	// AddressPrefix - The address prefix for the subnet.
33137	AddressPrefix *string `json:"addressPrefix,omitempty"`
33138	// AddressPrefixes - List of address prefixes for the subnet.
33139	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
33140	// NetworkSecurityGroup - The reference to the NetworkSecurityGroup resource.
33141	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
33142	// RouteTable - The reference to the RouteTable resource.
33143	RouteTable *RouteTable `json:"routeTable,omitempty"`
33144	// NatGateway - Nat gateway associated with this subnet.
33145	NatGateway *SubResource `json:"natGateway,omitempty"`
33146	// ServiceEndpoints - An array of service endpoints.
33147	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
33148	// ServiceEndpointPolicies - An array of service endpoint policies.
33149	ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"`
33150	// PrivateEndpoints - READ-ONLY; An array of references to private endpoints.
33151	PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"`
33152	// IPConfigurations - READ-ONLY; An array of references to the network interface IP configurations using subnet.
33153	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
33154	// IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet.
33155	IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"`
33156	// IPAllocations - Array of IpAllocation which reference this subnet.
33157	IPAllocations *[]SubResource `json:"ipAllocations,omitempty"`
33158	// ResourceNavigationLinks - READ-ONLY; An array of references to the external resources using subnet.
33159	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
33160	// ServiceAssociationLinks - READ-ONLY; An array of references to services injecting into this subnet.
33161	ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"`
33162	// Delegations - An array of references to the delegations on the subnet.
33163	Delegations *[]Delegation `json:"delegations,omitempty"`
33164	// Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.
33165	Purpose *string `json:"purpose,omitempty"`
33166	// ProvisioningState - READ-ONLY; The provisioning state of the subnet resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
33167	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
33168	// PrivateEndpointNetworkPolicies - Enable or Disable apply network policies on private end point in the subnet.
33169	PrivateEndpointNetworkPolicies *string `json:"privateEndpointNetworkPolicies,omitempty"`
33170	// PrivateLinkServiceNetworkPolicies - Enable or Disable apply network policies on private link service in the subnet.
33171	PrivateLinkServiceNetworkPolicies *string `json:"privateLinkServiceNetworkPolicies,omitempty"`
33172}
33173
33174// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
33175func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
33176	objectMap := make(map[string]interface{})
33177	if spf.AddressPrefix != nil {
33178		objectMap["addressPrefix"] = spf.AddressPrefix
33179	}
33180	if spf.AddressPrefixes != nil {
33181		objectMap["addressPrefixes"] = spf.AddressPrefixes
33182	}
33183	if spf.NetworkSecurityGroup != nil {
33184		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
33185	}
33186	if spf.RouteTable != nil {
33187		objectMap["routeTable"] = spf.RouteTable
33188	}
33189	if spf.NatGateway != nil {
33190		objectMap["natGateway"] = spf.NatGateway
33191	}
33192	if spf.ServiceEndpoints != nil {
33193		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
33194	}
33195	if spf.ServiceEndpointPolicies != nil {
33196		objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies
33197	}
33198	if spf.IPAllocations != nil {
33199		objectMap["ipAllocations"] = spf.IPAllocations
33200	}
33201	if spf.Delegations != nil {
33202		objectMap["delegations"] = spf.Delegations
33203	}
33204	if spf.PrivateEndpointNetworkPolicies != nil {
33205		objectMap["privateEndpointNetworkPolicies"] = spf.PrivateEndpointNetworkPolicies
33206	}
33207	if spf.PrivateLinkServiceNetworkPolicies != nil {
33208		objectMap["privateLinkServiceNetworkPolicies"] = spf.PrivateLinkServiceNetworkPolicies
33209	}
33210	return json.Marshal(objectMap)
33211}
33212
33213// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
33214// operation.
33215type SubnetsCreateOrUpdateFuture struct {
33216	azure.FutureAPI
33217	// Result returns the result of the asynchronous operation.
33218	// If the operation has not completed it will return an error.
33219	Result func(SubnetsClient) (Subnet, error)
33220}
33221
33222// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33223func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
33224	var azFuture azure.Future
33225	if err := json.Unmarshal(body, &azFuture); err != nil {
33226		return err
33227	}
33228	future.FutureAPI = &azFuture
33229	future.Result = future.result
33230	return nil
33231}
33232
33233// result is the default implementation for SubnetsCreateOrUpdateFuture.Result.
33234func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) {
33235	var done bool
33236	done, err = future.DoneWithContext(context.Background(), client)
33237	if err != nil {
33238		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
33239		return
33240	}
33241	if !done {
33242		s.Response.Response = future.Response()
33243		err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
33244		return
33245	}
33246	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33247	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
33248		s, err = client.CreateOrUpdateResponder(s.Response.Response)
33249		if err != nil {
33250			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
33251		}
33252	}
33253	return
33254}
33255
33256// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
33257// operation.
33258type SubnetsDeleteFuture struct {
33259	azure.FutureAPI
33260	// Result returns the result of the asynchronous operation.
33261	// If the operation has not completed it will return an error.
33262	Result func(SubnetsClient) (autorest.Response, error)
33263}
33264
33265// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33266func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error {
33267	var azFuture azure.Future
33268	if err := json.Unmarshal(body, &azFuture); err != nil {
33269		return err
33270	}
33271	future.FutureAPI = &azFuture
33272	future.Result = future.result
33273	return nil
33274}
33275
33276// result is the default implementation for SubnetsDeleteFuture.Result.
33277func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
33278	var done bool
33279	done, err = future.DoneWithContext(context.Background(), client)
33280	if err != nil {
33281		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
33282		return
33283	}
33284	if !done {
33285		ar.Response = future.Response()
33286		err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
33287		return
33288	}
33289	ar.Response = future.Response()
33290	return
33291}
33292
33293// SubnetsPrepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
33294// long-running operation.
33295type SubnetsPrepareNetworkPoliciesFuture struct {
33296	azure.FutureAPI
33297	// Result returns the result of the asynchronous operation.
33298	// If the operation has not completed it will return an error.
33299	Result func(SubnetsClient) (autorest.Response, error)
33300}
33301
33302// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33303func (future *SubnetsPrepareNetworkPoliciesFuture) UnmarshalJSON(body []byte) error {
33304	var azFuture azure.Future
33305	if err := json.Unmarshal(body, &azFuture); err != nil {
33306		return err
33307	}
33308	future.FutureAPI = &azFuture
33309	future.Result = future.result
33310	return nil
33311}
33312
33313// result is the default implementation for SubnetsPrepareNetworkPoliciesFuture.Result.
33314func (future *SubnetsPrepareNetworkPoliciesFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
33315	var done bool
33316	done, err = future.DoneWithContext(context.Background(), client)
33317	if err != nil {
33318		err = autorest.NewErrorWithError(err, "network.SubnetsPrepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure")
33319		return
33320	}
33321	if !done {
33322		ar.Response = future.Response()
33323		err = azure.NewAsyncOpIncompleteError("network.SubnetsPrepareNetworkPoliciesFuture")
33324		return
33325	}
33326	ar.Response = future.Response()
33327	return
33328}
33329
33330// SubnetsUnprepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
33331// long-running operation.
33332type SubnetsUnprepareNetworkPoliciesFuture 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(SubnetsClient) (autorest.Response, error)
33337}
33338
33339// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33340func (future *SubnetsUnprepareNetworkPoliciesFuture) 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 SubnetsUnprepareNetworkPoliciesFuture.Result.
33351func (future *SubnetsUnprepareNetworkPoliciesFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
33352	var done bool
33353	done, err = future.DoneWithContext(context.Background(), client)
33354	if err != nil {
33355		err = autorest.NewErrorWithError(err, "network.SubnetsUnprepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure")
33356		return
33357	}
33358	if !done {
33359		ar.Response = future.Response()
33360		err = azure.NewAsyncOpIncompleteError("network.SubnetsUnprepareNetworkPoliciesFuture")
33361		return
33362	}
33363	ar.Response = future.Response()
33364	return
33365}
33366
33367// SubResource reference to another subresource.
33368type SubResource struct {
33369	// ID - Resource ID.
33370	ID *string `json:"id,omitempty"`
33371}
33372
33373// TagsObject tags object for patch operations.
33374type TagsObject struct {
33375	// Tags - Resource tags.
33376	Tags map[string]*string `json:"tags"`
33377}
33378
33379// MarshalJSON is the custom marshaler for TagsObject.
33380func (toVar TagsObject) MarshalJSON() ([]byte, error) {
33381	objectMap := make(map[string]interface{})
33382	if toVar.Tags != nil {
33383		objectMap["tags"] = toVar.Tags
33384	}
33385	return json.Marshal(objectMap)
33386}
33387
33388// Topology topology of the specified resource group.
33389type Topology struct {
33390	autorest.Response `json:"-"`
33391	// ID - READ-ONLY; GUID representing the operation id.
33392	ID *string `json:"id,omitempty"`
33393	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
33394	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
33395	// LastModified - READ-ONLY; The datetime when the topology was last modified.
33396	LastModified *date.Time `json:"lastModified,omitempty"`
33397	// Resources - A list of topology resources.
33398	Resources *[]TopologyResource `json:"resources,omitempty"`
33399}
33400
33401// MarshalJSON is the custom marshaler for Topology.
33402func (t Topology) MarshalJSON() ([]byte, error) {
33403	objectMap := make(map[string]interface{})
33404	if t.Resources != nil {
33405		objectMap["resources"] = t.Resources
33406	}
33407	return json.Marshal(objectMap)
33408}
33409
33410// TopologyAssociation resources that have an association with the parent resource.
33411type TopologyAssociation struct {
33412	// Name - The name of the resource that is associated with the parent resource.
33413	Name *string `json:"name,omitempty"`
33414	// ResourceID - The ID of the resource that is associated with the parent resource.
33415	ResourceID *string `json:"resourceId,omitempty"`
33416	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
33417	AssociationType AssociationType `json:"associationType,omitempty"`
33418}
33419
33420// TopologyParameters parameters that define the representation of topology.
33421type TopologyParameters struct {
33422	// TargetResourceGroupName - The name of the target resource group to perform topology on.
33423	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
33424	// TargetVirtualNetwork - The reference to the Virtual Network resource.
33425	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
33426	// TargetSubnet - The reference to the Subnet resource.
33427	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
33428}
33429
33430// TopologyResource the network resource topology information for the given resource group.
33431type TopologyResource struct {
33432	// Name - Name of the resource.
33433	Name *string `json:"name,omitempty"`
33434	// ID - ID of the resource.
33435	ID *string `json:"id,omitempty"`
33436	// Location - Resource location.
33437	Location *string `json:"location,omitempty"`
33438	// Associations - Holds the associations the resource has with other resources in the resource group.
33439	Associations *[]TopologyAssociation `json:"associations,omitempty"`
33440}
33441
33442// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
33443type TrafficAnalyticsConfigurationProperties struct {
33444	// Enabled - Flag to enable/disable traffic analytics.
33445	Enabled *bool `json:"enabled,omitempty"`
33446	// WorkspaceID - The resource guid of the attached workspace.
33447	WorkspaceID *string `json:"workspaceId,omitempty"`
33448	// WorkspaceRegion - The location of the attached workspace.
33449	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
33450	// WorkspaceResourceID - Resource Id of the attached workspace.
33451	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
33452	// TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics.
33453	TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"`
33454}
33455
33456// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
33457type TrafficAnalyticsProperties struct {
33458	// NetworkWatcherFlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
33459	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
33460}
33461
33462// TrafficSelectorPolicy an traffic selector policy for a virtual network gateway connection.
33463type TrafficSelectorPolicy struct {
33464	// LocalAddressRanges - A collection of local address spaces in CIDR format.
33465	LocalAddressRanges *[]string `json:"localAddressRanges,omitempty"`
33466	// RemoteAddressRanges - A collection of remote address spaces in CIDR format.
33467	RemoteAddressRanges *[]string `json:"remoteAddressRanges,omitempty"`
33468}
33469
33470// TroubleshootingDetails information gained from troubleshooting of specified resource.
33471type TroubleshootingDetails struct {
33472	// ID - The id of the get troubleshoot operation.
33473	ID *string `json:"id,omitempty"`
33474	// ReasonType - Reason type of failure.
33475	ReasonType *string `json:"reasonType,omitempty"`
33476	// Summary - A summary of troubleshooting.
33477	Summary *string `json:"summary,omitempty"`
33478	// Detail - Details on troubleshooting results.
33479	Detail *string `json:"detail,omitempty"`
33480	// RecommendedActions - List of recommended actions.
33481	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
33482}
33483
33484// TroubleshootingParameters parameters that define the resource to troubleshoot.
33485type TroubleshootingParameters struct {
33486	// TargetResourceID - The target resource to troubleshoot.
33487	TargetResourceID *string `json:"targetResourceId,omitempty"`
33488	// TroubleshootingProperties - Properties of the troubleshooting resource.
33489	*TroubleshootingProperties `json:"properties,omitempty"`
33490}
33491
33492// MarshalJSON is the custom marshaler for TroubleshootingParameters.
33493func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
33494	objectMap := make(map[string]interface{})
33495	if tp.TargetResourceID != nil {
33496		objectMap["targetResourceId"] = tp.TargetResourceID
33497	}
33498	if tp.TroubleshootingProperties != nil {
33499		objectMap["properties"] = tp.TroubleshootingProperties
33500	}
33501	return json.Marshal(objectMap)
33502}
33503
33504// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
33505func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
33506	var m map[string]*json.RawMessage
33507	err := json.Unmarshal(body, &m)
33508	if err != nil {
33509		return err
33510	}
33511	for k, v := range m {
33512		switch k {
33513		case "targetResourceId":
33514			if v != nil {
33515				var targetResourceID string
33516				err = json.Unmarshal(*v, &targetResourceID)
33517				if err != nil {
33518					return err
33519				}
33520				tp.TargetResourceID = &targetResourceID
33521			}
33522		case "properties":
33523			if v != nil {
33524				var troubleshootingProperties TroubleshootingProperties
33525				err = json.Unmarshal(*v, &troubleshootingProperties)
33526				if err != nil {
33527					return err
33528				}
33529				tp.TroubleshootingProperties = &troubleshootingProperties
33530			}
33531		}
33532	}
33533
33534	return nil
33535}
33536
33537// TroubleshootingProperties storage location provided for troubleshoot.
33538type TroubleshootingProperties struct {
33539	// StorageID - The ID for the storage account to save the troubleshoot result.
33540	StorageID *string `json:"storageId,omitempty"`
33541	// StoragePath - The path to the blob to save the troubleshoot result in.
33542	StoragePath *string `json:"storagePath,omitempty"`
33543}
33544
33545// TroubleshootingRecommendedActions recommended actions based on discovered issues.
33546type TroubleshootingRecommendedActions struct {
33547	// ActionID - ID of the recommended action.
33548	ActionID *string `json:"actionId,omitempty"`
33549	// ActionText - Description of recommended actions.
33550	ActionText *string `json:"actionText,omitempty"`
33551	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
33552	ActionURI *string `json:"actionUri,omitempty"`
33553	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
33554	ActionURIText *string `json:"actionUriText,omitempty"`
33555}
33556
33557// TroubleshootingResult troubleshooting information gained from specified resource.
33558type TroubleshootingResult struct {
33559	autorest.Response `json:"-"`
33560	// StartTime - The start time of the troubleshooting.
33561	StartTime *date.Time `json:"startTime,omitempty"`
33562	// EndTime - The end time of the troubleshooting.
33563	EndTime *date.Time `json:"endTime,omitempty"`
33564	// Code - The result code of the troubleshooting.
33565	Code *string `json:"code,omitempty"`
33566	// Results - Information from troubleshooting.
33567	Results *[]TroubleshootingDetails `json:"results,omitempty"`
33568}
33569
33570// TunnelConnectionHealth virtualNetworkGatewayConnection properties.
33571type TunnelConnectionHealth struct {
33572	// Tunnel - READ-ONLY; Tunnel name.
33573	Tunnel *string `json:"tunnel,omitempty"`
33574	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
33575	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
33576	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection.
33577	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
33578	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection.
33579	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
33580	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
33581	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
33582}
33583
33584// MarshalJSON is the custom marshaler for TunnelConnectionHealth.
33585func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) {
33586	objectMap := make(map[string]interface{})
33587	return json.Marshal(objectMap)
33588}
33589
33590// UnprepareNetworkPoliciesRequest details of UnprepareNetworkPolicies for Subnet.
33591type UnprepareNetworkPoliciesRequest struct {
33592	// ServiceName - The name of the service for which subnet is being unprepared for.
33593	ServiceName *string `json:"serviceName,omitempty"`
33594}
33595
33596// Usage the network resource usage.
33597type Usage struct {
33598	// ID - READ-ONLY; Resource identifier.
33599	ID *string `json:"id,omitempty"`
33600	// Unit - An enum describing the unit of measurement.
33601	Unit *string `json:"unit,omitempty"`
33602	// CurrentValue - The current value of the usage.
33603	CurrentValue *int64 `json:"currentValue,omitempty"`
33604	// Limit - The limit of usage.
33605	Limit *int64 `json:"limit,omitempty"`
33606	// Name - The name of the type of usage.
33607	Name *UsageName `json:"name,omitempty"`
33608}
33609
33610// MarshalJSON is the custom marshaler for Usage.
33611func (u Usage) MarshalJSON() ([]byte, error) {
33612	objectMap := make(map[string]interface{})
33613	if u.Unit != nil {
33614		objectMap["unit"] = u.Unit
33615	}
33616	if u.CurrentValue != nil {
33617		objectMap["currentValue"] = u.CurrentValue
33618	}
33619	if u.Limit != nil {
33620		objectMap["limit"] = u.Limit
33621	}
33622	if u.Name != nil {
33623		objectMap["name"] = u.Name
33624	}
33625	return json.Marshal(objectMap)
33626}
33627
33628// UsageName the usage names.
33629type UsageName struct {
33630	// Value - A string describing the resource name.
33631	Value *string `json:"value,omitempty"`
33632	// LocalizedValue - A localized string describing the resource name.
33633	LocalizedValue *string `json:"localizedValue,omitempty"`
33634}
33635
33636// UsagesListResult the list usages operation response.
33637type UsagesListResult struct {
33638	autorest.Response `json:"-"`
33639	// Value - The list network resource usages.
33640	Value *[]Usage `json:"value,omitempty"`
33641	// NextLink - URL to get the next set of results.
33642	NextLink *string `json:"nextLink,omitempty"`
33643}
33644
33645// UsagesListResultIterator provides access to a complete listing of Usage values.
33646type UsagesListResultIterator struct {
33647	i    int
33648	page UsagesListResultPage
33649}
33650
33651// NextWithContext advances to the next value.  If there was an error making
33652// the request the iterator does not advance and the error is returned.
33653func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
33654	if tracing.IsEnabled() {
33655		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
33656		defer func() {
33657			sc := -1
33658			if iter.Response().Response.Response != nil {
33659				sc = iter.Response().Response.Response.StatusCode
33660			}
33661			tracing.EndSpan(ctx, sc, err)
33662		}()
33663	}
33664	iter.i++
33665	if iter.i < len(iter.page.Values()) {
33666		return nil
33667	}
33668	err = iter.page.NextWithContext(ctx)
33669	if err != nil {
33670		iter.i--
33671		return err
33672	}
33673	iter.i = 0
33674	return nil
33675}
33676
33677// Next advances to the next value.  If there was an error making
33678// the request the iterator does not advance and the error is returned.
33679// Deprecated: Use NextWithContext() instead.
33680func (iter *UsagesListResultIterator) Next() error {
33681	return iter.NextWithContext(context.Background())
33682}
33683
33684// NotDone returns true if the enumeration should be started or is not yet complete.
33685func (iter UsagesListResultIterator) NotDone() bool {
33686	return iter.page.NotDone() && iter.i < len(iter.page.Values())
33687}
33688
33689// Response returns the raw server response from the last page request.
33690func (iter UsagesListResultIterator) Response() UsagesListResult {
33691	return iter.page.Response()
33692}
33693
33694// Value returns the current value or a zero-initialized value if the
33695// iterator has advanced beyond the end of the collection.
33696func (iter UsagesListResultIterator) Value() Usage {
33697	if !iter.page.NotDone() {
33698		return Usage{}
33699	}
33700	return iter.page.Values()[iter.i]
33701}
33702
33703// Creates a new instance of the UsagesListResultIterator type.
33704func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
33705	return UsagesListResultIterator{page: page}
33706}
33707
33708// IsEmpty returns true if the ListResult contains no values.
33709func (ulr UsagesListResult) IsEmpty() bool {
33710	return ulr.Value == nil || len(*ulr.Value) == 0
33711}
33712
33713// hasNextLink returns true if the NextLink is not empty.
33714func (ulr UsagesListResult) hasNextLink() bool {
33715	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
33716}
33717
33718// usagesListResultPreparer prepares a request to retrieve the next set of results.
33719// It returns nil if no more results exist.
33720func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
33721	if !ulr.hasNextLink() {
33722		return nil, nil
33723	}
33724	return autorest.Prepare((&http.Request{}).WithContext(ctx),
33725		autorest.AsJSON(),
33726		autorest.AsGet(),
33727		autorest.WithBaseURL(to.String(ulr.NextLink)))
33728}
33729
33730// UsagesListResultPage contains a page of Usage values.
33731type UsagesListResultPage struct {
33732	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
33733	ulr UsagesListResult
33734}
33735
33736// NextWithContext advances to the next page of values.  If there was an error making
33737// the request the page does not advance and the error is returned.
33738func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
33739	if tracing.IsEnabled() {
33740		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
33741		defer func() {
33742			sc := -1
33743			if page.Response().Response.Response != nil {
33744				sc = page.Response().Response.Response.StatusCode
33745			}
33746			tracing.EndSpan(ctx, sc, err)
33747		}()
33748	}
33749	for {
33750		next, err := page.fn(ctx, page.ulr)
33751		if err != nil {
33752			return err
33753		}
33754		page.ulr = next
33755		if !next.hasNextLink() || !next.IsEmpty() {
33756			break
33757		}
33758	}
33759	return nil
33760}
33761
33762// Next advances to the next page of values.  If there was an error making
33763// the request the page does not advance and the error is returned.
33764// Deprecated: Use NextWithContext() instead.
33765func (page *UsagesListResultPage) Next() error {
33766	return page.NextWithContext(context.Background())
33767}
33768
33769// NotDone returns true if the page enumeration should be started or is not yet complete.
33770func (page UsagesListResultPage) NotDone() bool {
33771	return !page.ulr.IsEmpty()
33772}
33773
33774// Response returns the raw server response from the last page request.
33775func (page UsagesListResultPage) Response() UsagesListResult {
33776	return page.ulr
33777}
33778
33779// Values returns the slice of values for the current page or nil if there are no values.
33780func (page UsagesListResultPage) Values() []Usage {
33781	if page.ulr.IsEmpty() {
33782		return nil
33783	}
33784	return *page.ulr.Value
33785}
33786
33787// Creates a new instance of the UsagesListResultPage type.
33788func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
33789	return UsagesListResultPage{
33790		fn:  getNextPage,
33791		ulr: cur,
33792	}
33793}
33794
33795// VerificationIPFlowParameters parameters that define the IP flow to be verified.
33796type VerificationIPFlowParameters struct {
33797	// TargetResourceID - The ID of the target resource to perform next-hop on.
33798	TargetResourceID *string `json:"targetResourceId,omitempty"`
33799	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
33800	Direction Direction `json:"direction,omitempty"`
33801	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
33802	Protocol IPFlowProtocol `json:"protocol,omitempty"`
33803	// 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.
33804	LocalPort *string `json:"localPort,omitempty"`
33805	// 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.
33806	RemotePort *string `json:"remotePort,omitempty"`
33807	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
33808	LocalIPAddress *string `json:"localIPAddress,omitempty"`
33809	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
33810	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
33811	// 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).
33812	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
33813}
33814
33815// VerificationIPFlowResult results of IP flow verification on the target resource.
33816type VerificationIPFlowResult struct {
33817	autorest.Response `json:"-"`
33818	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
33819	Access Access `json:"access,omitempty"`
33820	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
33821	RuleName *string `json:"ruleName,omitempty"`
33822}
33823
33824// VirtualAppliance networkVirtualAppliance Resource.
33825type VirtualAppliance struct {
33826	autorest.Response `json:"-"`
33827	// VirtualAppliancePropertiesFormat - Properties of the Network Virtual Appliance.
33828	*VirtualAppliancePropertiesFormat `json:"properties,omitempty"`
33829	// Identity - The service principal that has read access to cloud-init and config blob.
33830	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
33831	// Sku - Network Virtual Appliance SKU.
33832	Sku *VirtualApplianceSkuProperties `json:"sku,omitempty"`
33833	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
33834	Etag *string `json:"etag,omitempty"`
33835	// ID - Resource ID.
33836	ID *string `json:"id,omitempty"`
33837	// Name - READ-ONLY; Resource name.
33838	Name *string `json:"name,omitempty"`
33839	// Type - READ-ONLY; Resource type.
33840	Type *string `json:"type,omitempty"`
33841	// Location - Resource location.
33842	Location *string `json:"location,omitempty"`
33843	// Tags - Resource tags.
33844	Tags map[string]*string `json:"tags"`
33845}
33846
33847// MarshalJSON is the custom marshaler for VirtualAppliance.
33848func (va VirtualAppliance) MarshalJSON() ([]byte, error) {
33849	objectMap := make(map[string]interface{})
33850	if va.VirtualAppliancePropertiesFormat != nil {
33851		objectMap["properties"] = va.VirtualAppliancePropertiesFormat
33852	}
33853	if va.Identity != nil {
33854		objectMap["identity"] = va.Identity
33855	}
33856	if va.Sku != nil {
33857		objectMap["sku"] = va.Sku
33858	}
33859	if va.ID != nil {
33860		objectMap["id"] = va.ID
33861	}
33862	if va.Location != nil {
33863		objectMap["location"] = va.Location
33864	}
33865	if va.Tags != nil {
33866		objectMap["tags"] = va.Tags
33867	}
33868	return json.Marshal(objectMap)
33869}
33870
33871// UnmarshalJSON is the custom unmarshaler for VirtualAppliance struct.
33872func (va *VirtualAppliance) UnmarshalJSON(body []byte) error {
33873	var m map[string]*json.RawMessage
33874	err := json.Unmarshal(body, &m)
33875	if err != nil {
33876		return err
33877	}
33878	for k, v := range m {
33879		switch k {
33880		case "properties":
33881			if v != nil {
33882				var virtualAppliancePropertiesFormat VirtualAppliancePropertiesFormat
33883				err = json.Unmarshal(*v, &virtualAppliancePropertiesFormat)
33884				if err != nil {
33885					return err
33886				}
33887				va.VirtualAppliancePropertiesFormat = &virtualAppliancePropertiesFormat
33888			}
33889		case "identity":
33890			if v != nil {
33891				var identity ManagedServiceIdentity
33892				err = json.Unmarshal(*v, &identity)
33893				if err != nil {
33894					return err
33895				}
33896				va.Identity = &identity
33897			}
33898		case "sku":
33899			if v != nil {
33900				var sku VirtualApplianceSkuProperties
33901				err = json.Unmarshal(*v, &sku)
33902				if err != nil {
33903					return err
33904				}
33905				va.Sku = &sku
33906			}
33907		case "etag":
33908			if v != nil {
33909				var etag string
33910				err = json.Unmarshal(*v, &etag)
33911				if err != nil {
33912					return err
33913				}
33914				va.Etag = &etag
33915			}
33916		case "id":
33917			if v != nil {
33918				var ID string
33919				err = json.Unmarshal(*v, &ID)
33920				if err != nil {
33921					return err
33922				}
33923				va.ID = &ID
33924			}
33925		case "name":
33926			if v != nil {
33927				var name string
33928				err = json.Unmarshal(*v, &name)
33929				if err != nil {
33930					return err
33931				}
33932				va.Name = &name
33933			}
33934		case "type":
33935			if v != nil {
33936				var typeVar string
33937				err = json.Unmarshal(*v, &typeVar)
33938				if err != nil {
33939					return err
33940				}
33941				va.Type = &typeVar
33942			}
33943		case "location":
33944			if v != nil {
33945				var location string
33946				err = json.Unmarshal(*v, &location)
33947				if err != nil {
33948					return err
33949				}
33950				va.Location = &location
33951			}
33952		case "tags":
33953			if v != nil {
33954				var tags map[string]*string
33955				err = json.Unmarshal(*v, &tags)
33956				if err != nil {
33957					return err
33958				}
33959				va.Tags = tags
33960			}
33961		}
33962	}
33963
33964	return nil
33965}
33966
33967// VirtualApplianceListResult response for ListNetworkVirtualAppliances API service call.
33968type VirtualApplianceListResult struct {
33969	autorest.Response `json:"-"`
33970	// Value - List of Network Virtual Appliances.
33971	Value *[]VirtualAppliance `json:"value,omitempty"`
33972	// NextLink - URL to get the next set of results.
33973	NextLink *string `json:"nextLink,omitempty"`
33974}
33975
33976// VirtualApplianceListResultIterator provides access to a complete listing of VirtualAppliance values.
33977type VirtualApplianceListResultIterator struct {
33978	i    int
33979	page VirtualApplianceListResultPage
33980}
33981
33982// NextWithContext advances to the next value.  If there was an error making
33983// the request the iterator does not advance and the error is returned.
33984func (iter *VirtualApplianceListResultIterator) NextWithContext(ctx context.Context) (err error) {
33985	if tracing.IsEnabled() {
33986		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceListResultIterator.NextWithContext")
33987		defer func() {
33988			sc := -1
33989			if iter.Response().Response.Response != nil {
33990				sc = iter.Response().Response.Response.StatusCode
33991			}
33992			tracing.EndSpan(ctx, sc, err)
33993		}()
33994	}
33995	iter.i++
33996	if iter.i < len(iter.page.Values()) {
33997		return nil
33998	}
33999	err = iter.page.NextWithContext(ctx)
34000	if err != nil {
34001		iter.i--
34002		return err
34003	}
34004	iter.i = 0
34005	return nil
34006}
34007
34008// Next advances to the next value.  If there was an error making
34009// the request the iterator does not advance and the error is returned.
34010// Deprecated: Use NextWithContext() instead.
34011func (iter *VirtualApplianceListResultIterator) Next() error {
34012	return iter.NextWithContext(context.Background())
34013}
34014
34015// NotDone returns true if the enumeration should be started or is not yet complete.
34016func (iter VirtualApplianceListResultIterator) NotDone() bool {
34017	return iter.page.NotDone() && iter.i < len(iter.page.Values())
34018}
34019
34020// Response returns the raw server response from the last page request.
34021func (iter VirtualApplianceListResultIterator) Response() VirtualApplianceListResult {
34022	return iter.page.Response()
34023}
34024
34025// Value returns the current value or a zero-initialized value if the
34026// iterator has advanced beyond the end of the collection.
34027func (iter VirtualApplianceListResultIterator) Value() VirtualAppliance {
34028	if !iter.page.NotDone() {
34029		return VirtualAppliance{}
34030	}
34031	return iter.page.Values()[iter.i]
34032}
34033
34034// Creates a new instance of the VirtualApplianceListResultIterator type.
34035func NewVirtualApplianceListResultIterator(page VirtualApplianceListResultPage) VirtualApplianceListResultIterator {
34036	return VirtualApplianceListResultIterator{page: page}
34037}
34038
34039// IsEmpty returns true if the ListResult contains no values.
34040func (valr VirtualApplianceListResult) IsEmpty() bool {
34041	return valr.Value == nil || len(*valr.Value) == 0
34042}
34043
34044// hasNextLink returns true if the NextLink is not empty.
34045func (valr VirtualApplianceListResult) hasNextLink() bool {
34046	return valr.NextLink != nil && len(*valr.NextLink) != 0
34047}
34048
34049// virtualApplianceListResultPreparer prepares a request to retrieve the next set of results.
34050// It returns nil if no more results exist.
34051func (valr VirtualApplianceListResult) virtualApplianceListResultPreparer(ctx context.Context) (*http.Request, error) {
34052	if !valr.hasNextLink() {
34053		return nil, nil
34054	}
34055	return autorest.Prepare((&http.Request{}).WithContext(ctx),
34056		autorest.AsJSON(),
34057		autorest.AsGet(),
34058		autorest.WithBaseURL(to.String(valr.NextLink)))
34059}
34060
34061// VirtualApplianceListResultPage contains a page of VirtualAppliance values.
34062type VirtualApplianceListResultPage struct {
34063	fn   func(context.Context, VirtualApplianceListResult) (VirtualApplianceListResult, error)
34064	valr VirtualApplianceListResult
34065}
34066
34067// NextWithContext advances to the next page of values.  If there was an error making
34068// the request the page does not advance and the error is returned.
34069func (page *VirtualApplianceListResultPage) NextWithContext(ctx context.Context) (err error) {
34070	if tracing.IsEnabled() {
34071		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceListResultPage.NextWithContext")
34072		defer func() {
34073			sc := -1
34074			if page.Response().Response.Response != nil {
34075				sc = page.Response().Response.Response.StatusCode
34076			}
34077			tracing.EndSpan(ctx, sc, err)
34078		}()
34079	}
34080	for {
34081		next, err := page.fn(ctx, page.valr)
34082		if err != nil {
34083			return err
34084		}
34085		page.valr = next
34086		if !next.hasNextLink() || !next.IsEmpty() {
34087			break
34088		}
34089	}
34090	return nil
34091}
34092
34093// Next advances to the next page of values.  If there was an error making
34094// the request the page does not advance and the error is returned.
34095// Deprecated: Use NextWithContext() instead.
34096func (page *VirtualApplianceListResultPage) Next() error {
34097	return page.NextWithContext(context.Background())
34098}
34099
34100// NotDone returns true if the page enumeration should be started or is not yet complete.
34101func (page VirtualApplianceListResultPage) NotDone() bool {
34102	return !page.valr.IsEmpty()
34103}
34104
34105// Response returns the raw server response from the last page request.
34106func (page VirtualApplianceListResultPage) Response() VirtualApplianceListResult {
34107	return page.valr
34108}
34109
34110// Values returns the slice of values for the current page or nil if there are no values.
34111func (page VirtualApplianceListResultPage) Values() []VirtualAppliance {
34112	if page.valr.IsEmpty() {
34113		return nil
34114	}
34115	return *page.valr.Value
34116}
34117
34118// Creates a new instance of the VirtualApplianceListResultPage type.
34119func NewVirtualApplianceListResultPage(cur VirtualApplianceListResult, getNextPage func(context.Context, VirtualApplianceListResult) (VirtualApplianceListResult, error)) VirtualApplianceListResultPage {
34120	return VirtualApplianceListResultPage{
34121		fn:   getNextPage,
34122		valr: cur,
34123	}
34124}
34125
34126// VirtualApplianceNicProperties network Virtual Appliance NIC properties.
34127type VirtualApplianceNicProperties struct {
34128	// Name - READ-ONLY; NIC name.
34129	Name *string `json:"name,omitempty"`
34130	// PublicIPAddress - READ-ONLY; Public IP address.
34131	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
34132	// PrivateIPAddress - READ-ONLY; Private IP address.
34133	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
34134}
34135
34136// MarshalJSON is the custom marshaler for VirtualApplianceNicProperties.
34137func (vanp VirtualApplianceNicProperties) MarshalJSON() ([]byte, error) {
34138	objectMap := make(map[string]interface{})
34139	return json.Marshal(objectMap)
34140}
34141
34142// VirtualAppliancePropertiesFormat network Virtual Appliance definition.
34143type VirtualAppliancePropertiesFormat struct {
34144	// BootStrapConfigurationBlob - BootStrapConfigurationBlob storage URLs.
34145	BootStrapConfigurationBlob *[]string `json:"bootStrapConfigurationBlob,omitempty"`
34146	// VirtualHub - The Virtual Hub where Network Virtual Appliance is being deployed.
34147	VirtualHub *SubResource `json:"virtualHub,omitempty"`
34148	// CloudInitConfigurationBlob - CloudInitConfigurationBlob storage URLs.
34149	CloudInitConfigurationBlob *[]string `json:"cloudInitConfigurationBlob,omitempty"`
34150	// VirtualApplianceAsn - VirtualAppliance ASN.
34151	VirtualApplianceAsn *int64 `json:"virtualApplianceAsn,omitempty"`
34152	// VirtualApplianceNics - READ-ONLY; List of Virtual Appliance Network Interfaces.
34153	VirtualApplianceNics *[]VirtualApplianceNicProperties `json:"virtualApplianceNics,omitempty"`
34154	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
34155	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34156}
34157
34158// MarshalJSON is the custom marshaler for VirtualAppliancePropertiesFormat.
34159func (vapf VirtualAppliancePropertiesFormat) MarshalJSON() ([]byte, error) {
34160	objectMap := make(map[string]interface{})
34161	if vapf.BootStrapConfigurationBlob != nil {
34162		objectMap["bootStrapConfigurationBlob"] = vapf.BootStrapConfigurationBlob
34163	}
34164	if vapf.VirtualHub != nil {
34165		objectMap["virtualHub"] = vapf.VirtualHub
34166	}
34167	if vapf.CloudInitConfigurationBlob != nil {
34168		objectMap["cloudInitConfigurationBlob"] = vapf.CloudInitConfigurationBlob
34169	}
34170	if vapf.VirtualApplianceAsn != nil {
34171		objectMap["virtualApplianceAsn"] = vapf.VirtualApplianceAsn
34172	}
34173	return json.Marshal(objectMap)
34174}
34175
34176// VirtualAppliancesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
34177// long-running operation.
34178type VirtualAppliancesCreateOrUpdateFuture struct {
34179	azure.FutureAPI
34180	// Result returns the result of the asynchronous operation.
34181	// If the operation has not completed it will return an error.
34182	Result func(VirtualAppliancesClient) (VirtualAppliance, error)
34183}
34184
34185// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34186func (future *VirtualAppliancesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
34187	var azFuture azure.Future
34188	if err := json.Unmarshal(body, &azFuture); err != nil {
34189		return err
34190	}
34191	future.FutureAPI = &azFuture
34192	future.Result = future.result
34193	return nil
34194}
34195
34196// result is the default implementation for VirtualAppliancesCreateOrUpdateFuture.Result.
34197func (future *VirtualAppliancesCreateOrUpdateFuture) result(client VirtualAppliancesClient) (va VirtualAppliance, err error) {
34198	var done bool
34199	done, err = future.DoneWithContext(context.Background(), client)
34200	if err != nil {
34201		err = autorest.NewErrorWithError(err, "network.VirtualAppliancesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
34202		return
34203	}
34204	if !done {
34205		va.Response.Response = future.Response()
34206		err = azure.NewAsyncOpIncompleteError("network.VirtualAppliancesCreateOrUpdateFuture")
34207		return
34208	}
34209	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34210	if va.Response.Response, err = future.GetResult(sender); err == nil && va.Response.Response.StatusCode != http.StatusNoContent {
34211		va, err = client.CreateOrUpdateResponder(va.Response.Response)
34212		if err != nil {
34213			err = autorest.NewErrorWithError(err, "network.VirtualAppliancesCreateOrUpdateFuture", "Result", va.Response.Response, "Failure responding to request")
34214		}
34215	}
34216	return
34217}
34218
34219// VirtualAppliancesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
34220// operation.
34221type VirtualAppliancesDeleteFuture struct {
34222	azure.FutureAPI
34223	// Result returns the result of the asynchronous operation.
34224	// If the operation has not completed it will return an error.
34225	Result func(VirtualAppliancesClient) (autorest.Response, error)
34226}
34227
34228// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34229func (future *VirtualAppliancesDeleteFuture) UnmarshalJSON(body []byte) error {
34230	var azFuture azure.Future
34231	if err := json.Unmarshal(body, &azFuture); err != nil {
34232		return err
34233	}
34234	future.FutureAPI = &azFuture
34235	future.Result = future.result
34236	return nil
34237}
34238
34239// result is the default implementation for VirtualAppliancesDeleteFuture.Result.
34240func (future *VirtualAppliancesDeleteFuture) result(client VirtualAppliancesClient) (ar autorest.Response, err error) {
34241	var done bool
34242	done, err = future.DoneWithContext(context.Background(), client)
34243	if err != nil {
34244		err = autorest.NewErrorWithError(err, "network.VirtualAppliancesDeleteFuture", "Result", future.Response(), "Polling failure")
34245		return
34246	}
34247	if !done {
34248		ar.Response = future.Response()
34249		err = azure.NewAsyncOpIncompleteError("network.VirtualAppliancesDeleteFuture")
34250		return
34251	}
34252	ar.Response = future.Response()
34253	return
34254}
34255
34256// VirtualApplianceSkuProperties network Virtual Appliance Sku Properties.
34257type VirtualApplianceSkuProperties struct {
34258	// Vendor - Virtual Appliance Vendor.
34259	Vendor *string `json:"vendor,omitempty"`
34260	// BundledScaleUnit - Virtual Appliance Scale Unit.
34261	BundledScaleUnit *string `json:"bundledScaleUnit,omitempty"`
34262	// MarketPlaceVersion - Virtual Appliance Version.
34263	MarketPlaceVersion *string `json:"marketPlaceVersion,omitempty"`
34264}
34265
34266// VirtualHub virtualHub Resource.
34267type VirtualHub struct {
34268	autorest.Response `json:"-"`
34269	// VirtualHubProperties - Properties of the virtual hub.
34270	*VirtualHubProperties `json:"properties,omitempty"`
34271	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
34272	Etag *string `json:"etag,omitempty"`
34273	// ID - Resource ID.
34274	ID *string `json:"id,omitempty"`
34275	// Name - READ-ONLY; Resource name.
34276	Name *string `json:"name,omitempty"`
34277	// Type - READ-ONLY; Resource type.
34278	Type *string `json:"type,omitempty"`
34279	// Location - Resource location.
34280	Location *string `json:"location,omitempty"`
34281	// Tags - Resource tags.
34282	Tags map[string]*string `json:"tags"`
34283}
34284
34285// MarshalJSON is the custom marshaler for VirtualHub.
34286func (vh VirtualHub) MarshalJSON() ([]byte, error) {
34287	objectMap := make(map[string]interface{})
34288	if vh.VirtualHubProperties != nil {
34289		objectMap["properties"] = vh.VirtualHubProperties
34290	}
34291	if vh.ID != nil {
34292		objectMap["id"] = vh.ID
34293	}
34294	if vh.Location != nil {
34295		objectMap["location"] = vh.Location
34296	}
34297	if vh.Tags != nil {
34298		objectMap["tags"] = vh.Tags
34299	}
34300	return json.Marshal(objectMap)
34301}
34302
34303// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
34304func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
34305	var m map[string]*json.RawMessage
34306	err := json.Unmarshal(body, &m)
34307	if err != nil {
34308		return err
34309	}
34310	for k, v := range m {
34311		switch k {
34312		case "properties":
34313			if v != nil {
34314				var virtualHubProperties VirtualHubProperties
34315				err = json.Unmarshal(*v, &virtualHubProperties)
34316				if err != nil {
34317					return err
34318				}
34319				vh.VirtualHubProperties = &virtualHubProperties
34320			}
34321		case "etag":
34322			if v != nil {
34323				var etag string
34324				err = json.Unmarshal(*v, &etag)
34325				if err != nil {
34326					return err
34327				}
34328				vh.Etag = &etag
34329			}
34330		case "id":
34331			if v != nil {
34332				var ID string
34333				err = json.Unmarshal(*v, &ID)
34334				if err != nil {
34335					return err
34336				}
34337				vh.ID = &ID
34338			}
34339		case "name":
34340			if v != nil {
34341				var name string
34342				err = json.Unmarshal(*v, &name)
34343				if err != nil {
34344					return err
34345				}
34346				vh.Name = &name
34347			}
34348		case "type":
34349			if v != nil {
34350				var typeVar string
34351				err = json.Unmarshal(*v, &typeVar)
34352				if err != nil {
34353					return err
34354				}
34355				vh.Type = &typeVar
34356			}
34357		case "location":
34358			if v != nil {
34359				var location string
34360				err = json.Unmarshal(*v, &location)
34361				if err != nil {
34362					return err
34363				}
34364				vh.Location = &location
34365			}
34366		case "tags":
34367			if v != nil {
34368				var tags map[string]*string
34369				err = json.Unmarshal(*v, &tags)
34370				if err != nil {
34371					return err
34372				}
34373				vh.Tags = tags
34374			}
34375		}
34376	}
34377
34378	return nil
34379}
34380
34381// VirtualHubID virtual Hub identifier.
34382type VirtualHubID struct {
34383	// 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.
34384	ID *string `json:"id,omitempty"`
34385}
34386
34387// VirtualHubProperties parameters for VirtualHub.
34388type VirtualHubProperties struct {
34389	// VirtualWan - The VirtualWAN to which the VirtualHub belongs.
34390	VirtualWan *SubResource `json:"virtualWan,omitempty"`
34391	// VpnGateway - The VpnGateway associated with this VirtualHub.
34392	VpnGateway *SubResource `json:"vpnGateway,omitempty"`
34393	// P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub.
34394	P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"`
34395	// ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub.
34396	ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"`
34397	// AzureFirewall - The azureFirewall associated with this VirtualHub.
34398	AzureFirewall *SubResource `json:"azureFirewall,omitempty"`
34399	// SecurityPartnerProvider - The securityPartnerProvider associated with this VirtualHub.
34400	SecurityPartnerProvider *SubResource `json:"securityPartnerProvider,omitempty"`
34401	// VirtualNetworkConnections - List of all vnet connections with this VirtualHub.
34402	VirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"virtualNetworkConnections,omitempty"`
34403	// AddressPrefix - Address-prefix for this VirtualHub.
34404	AddressPrefix *string `json:"addressPrefix,omitempty"`
34405	// RouteTable - The routeTable associated with this virtual hub.
34406	RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"`
34407	// ProvisioningState - READ-ONLY; The provisioning state of the virtual hub resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
34408	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34409	// SecurityProviderName - The Security Provider name.
34410	SecurityProviderName *string `json:"securityProviderName,omitempty"`
34411	// VirtualHubRouteTableV2s - List of all virtual hub route table v2s associated with this VirtualHub.
34412	VirtualHubRouteTableV2s *[]VirtualHubRouteTableV2 `json:"virtualHubRouteTableV2s,omitempty"`
34413	// Sku - The sku of this VirtualHub.
34414	Sku *string `json:"sku,omitempty"`
34415}
34416
34417// MarshalJSON is the custom marshaler for VirtualHubProperties.
34418func (vhp VirtualHubProperties) MarshalJSON() ([]byte, error) {
34419	objectMap := make(map[string]interface{})
34420	if vhp.VirtualWan != nil {
34421		objectMap["virtualWan"] = vhp.VirtualWan
34422	}
34423	if vhp.VpnGateway != nil {
34424		objectMap["vpnGateway"] = vhp.VpnGateway
34425	}
34426	if vhp.P2SVpnGateway != nil {
34427		objectMap["p2SVpnGateway"] = vhp.P2SVpnGateway
34428	}
34429	if vhp.ExpressRouteGateway != nil {
34430		objectMap["expressRouteGateway"] = vhp.ExpressRouteGateway
34431	}
34432	if vhp.AzureFirewall != nil {
34433		objectMap["azureFirewall"] = vhp.AzureFirewall
34434	}
34435	if vhp.SecurityPartnerProvider != nil {
34436		objectMap["securityPartnerProvider"] = vhp.SecurityPartnerProvider
34437	}
34438	if vhp.VirtualNetworkConnections != nil {
34439		objectMap["virtualNetworkConnections"] = vhp.VirtualNetworkConnections
34440	}
34441	if vhp.AddressPrefix != nil {
34442		objectMap["addressPrefix"] = vhp.AddressPrefix
34443	}
34444	if vhp.RouteTable != nil {
34445		objectMap["routeTable"] = vhp.RouteTable
34446	}
34447	if vhp.SecurityProviderName != nil {
34448		objectMap["securityProviderName"] = vhp.SecurityProviderName
34449	}
34450	if vhp.VirtualHubRouteTableV2s != nil {
34451		objectMap["virtualHubRouteTableV2s"] = vhp.VirtualHubRouteTableV2s
34452	}
34453	if vhp.Sku != nil {
34454		objectMap["sku"] = vhp.Sku
34455	}
34456	return json.Marshal(objectMap)
34457}
34458
34459// VirtualHubRoute virtualHub route.
34460type VirtualHubRoute struct {
34461	// AddressPrefixes - List of all addressPrefixes.
34462	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
34463	// NextHopIPAddress - NextHop ip address.
34464	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
34465}
34466
34467// VirtualHubRouteTable virtualHub route table.
34468type VirtualHubRouteTable struct {
34469	// Routes - List of all routes.
34470	Routes *[]VirtualHubRoute `json:"routes,omitempty"`
34471}
34472
34473// VirtualHubRouteTableV2 virtualHubRouteTableV2 Resource.
34474type VirtualHubRouteTableV2 struct {
34475	autorest.Response `json:"-"`
34476	// VirtualHubRouteTableV2Properties - Properties of the virtual hub route table v2.
34477	*VirtualHubRouteTableV2Properties `json:"properties,omitempty"`
34478	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
34479	Name *string `json:"name,omitempty"`
34480	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
34481	Etag *string `json:"etag,omitempty"`
34482	// ID - Resource ID.
34483	ID *string `json:"id,omitempty"`
34484}
34485
34486// MarshalJSON is the custom marshaler for VirtualHubRouteTableV2.
34487func (vhrtv VirtualHubRouteTableV2) MarshalJSON() ([]byte, error) {
34488	objectMap := make(map[string]interface{})
34489	if vhrtv.VirtualHubRouteTableV2Properties != nil {
34490		objectMap["properties"] = vhrtv.VirtualHubRouteTableV2Properties
34491	}
34492	if vhrtv.Name != nil {
34493		objectMap["name"] = vhrtv.Name
34494	}
34495	if vhrtv.ID != nil {
34496		objectMap["id"] = vhrtv.ID
34497	}
34498	return json.Marshal(objectMap)
34499}
34500
34501// UnmarshalJSON is the custom unmarshaler for VirtualHubRouteTableV2 struct.
34502func (vhrtv *VirtualHubRouteTableV2) UnmarshalJSON(body []byte) error {
34503	var m map[string]*json.RawMessage
34504	err := json.Unmarshal(body, &m)
34505	if err != nil {
34506		return err
34507	}
34508	for k, v := range m {
34509		switch k {
34510		case "properties":
34511			if v != nil {
34512				var virtualHubRouteTableV2Properties VirtualHubRouteTableV2Properties
34513				err = json.Unmarshal(*v, &virtualHubRouteTableV2Properties)
34514				if err != nil {
34515					return err
34516				}
34517				vhrtv.VirtualHubRouteTableV2Properties = &virtualHubRouteTableV2Properties
34518			}
34519		case "name":
34520			if v != nil {
34521				var name string
34522				err = json.Unmarshal(*v, &name)
34523				if err != nil {
34524					return err
34525				}
34526				vhrtv.Name = &name
34527			}
34528		case "etag":
34529			if v != nil {
34530				var etag string
34531				err = json.Unmarshal(*v, &etag)
34532				if err != nil {
34533					return err
34534				}
34535				vhrtv.Etag = &etag
34536			}
34537		case "id":
34538			if v != nil {
34539				var ID string
34540				err = json.Unmarshal(*v, &ID)
34541				if err != nil {
34542					return err
34543				}
34544				vhrtv.ID = &ID
34545			}
34546		}
34547	}
34548
34549	return nil
34550}
34551
34552// VirtualHubRouteTableV2Properties parameters for VirtualHubRouteTableV2.
34553type VirtualHubRouteTableV2Properties struct {
34554	// Routes - List of all routes.
34555	Routes *[]VirtualHubRouteV2 `json:"routes,omitempty"`
34556	// AttachedConnections - List of all connections attached to this route table v2.
34557	AttachedConnections *[]string `json:"attachedConnections,omitempty"`
34558	// ProvisioningState - READ-ONLY; The provisioning state of the virtual hub route table v2 resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
34559	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34560}
34561
34562// MarshalJSON is the custom marshaler for VirtualHubRouteTableV2Properties.
34563func (vhrtvp VirtualHubRouteTableV2Properties) MarshalJSON() ([]byte, error) {
34564	objectMap := make(map[string]interface{})
34565	if vhrtvp.Routes != nil {
34566		objectMap["routes"] = vhrtvp.Routes
34567	}
34568	if vhrtvp.AttachedConnections != nil {
34569		objectMap["attachedConnections"] = vhrtvp.AttachedConnections
34570	}
34571	return json.Marshal(objectMap)
34572}
34573
34574// VirtualHubRouteTableV2sCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
34575// a long-running operation.
34576type VirtualHubRouteTableV2sCreateOrUpdateFuture struct {
34577	azure.FutureAPI
34578	// Result returns the result of the asynchronous operation.
34579	// If the operation has not completed it will return an error.
34580	Result func(VirtualHubRouteTableV2sClient) (VirtualHubRouteTableV2, error)
34581}
34582
34583// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34584func (future *VirtualHubRouteTableV2sCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
34585	var azFuture azure.Future
34586	if err := json.Unmarshal(body, &azFuture); err != nil {
34587		return err
34588	}
34589	future.FutureAPI = &azFuture
34590	future.Result = future.result
34591	return nil
34592}
34593
34594// result is the default implementation for VirtualHubRouteTableV2sCreateOrUpdateFuture.Result.
34595func (future *VirtualHubRouteTableV2sCreateOrUpdateFuture) result(client VirtualHubRouteTableV2sClient) (vhrtv VirtualHubRouteTableV2, err error) {
34596	var done bool
34597	done, err = future.DoneWithContext(context.Background(), client)
34598	if err != nil {
34599		err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
34600		return
34601	}
34602	if !done {
34603		vhrtv.Response.Response = future.Response()
34604		err = azure.NewAsyncOpIncompleteError("network.VirtualHubRouteTableV2sCreateOrUpdateFuture")
34605		return
34606	}
34607	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34608	if vhrtv.Response.Response, err = future.GetResult(sender); err == nil && vhrtv.Response.Response.StatusCode != http.StatusNoContent {
34609		vhrtv, err = client.CreateOrUpdateResponder(vhrtv.Response.Response)
34610		if err != nil {
34611			err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sCreateOrUpdateFuture", "Result", vhrtv.Response.Response, "Failure responding to request")
34612		}
34613	}
34614	return
34615}
34616
34617// VirtualHubRouteTableV2sDeleteFuture an abstraction for monitoring and retrieving the results of a
34618// long-running operation.
34619type VirtualHubRouteTableV2sDeleteFuture struct {
34620	azure.FutureAPI
34621	// Result returns the result of the asynchronous operation.
34622	// If the operation has not completed it will return an error.
34623	Result func(VirtualHubRouteTableV2sClient) (autorest.Response, error)
34624}
34625
34626// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34627func (future *VirtualHubRouteTableV2sDeleteFuture) UnmarshalJSON(body []byte) error {
34628	var azFuture azure.Future
34629	if err := json.Unmarshal(body, &azFuture); err != nil {
34630		return err
34631	}
34632	future.FutureAPI = &azFuture
34633	future.Result = future.result
34634	return nil
34635}
34636
34637// result is the default implementation for VirtualHubRouteTableV2sDeleteFuture.Result.
34638func (future *VirtualHubRouteTableV2sDeleteFuture) result(client VirtualHubRouteTableV2sClient) (ar autorest.Response, err error) {
34639	var done bool
34640	done, err = future.DoneWithContext(context.Background(), client)
34641	if err != nil {
34642		err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sDeleteFuture", "Result", future.Response(), "Polling failure")
34643		return
34644	}
34645	if !done {
34646		ar.Response = future.Response()
34647		err = azure.NewAsyncOpIncompleteError("network.VirtualHubRouteTableV2sDeleteFuture")
34648		return
34649	}
34650	ar.Response = future.Response()
34651	return
34652}
34653
34654// VirtualHubRouteV2 virtualHubRouteTableV2 route.
34655type VirtualHubRouteV2 struct {
34656	// DestinationType - The type of destinations.
34657	DestinationType *string `json:"destinationType,omitempty"`
34658	// Destinations - List of all destinations.
34659	Destinations *[]string `json:"destinations,omitempty"`
34660	// NextHopType - The type of next hops.
34661	NextHopType *string `json:"nextHopType,omitempty"`
34662	// NextHops - NextHops ip address.
34663	NextHops *[]string `json:"nextHops,omitempty"`
34664}
34665
34666// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
34667// long-running operation.
34668type VirtualHubsCreateOrUpdateFuture struct {
34669	azure.FutureAPI
34670	// Result returns the result of the asynchronous operation.
34671	// If the operation has not completed it will return an error.
34672	Result func(VirtualHubsClient) (VirtualHub, error)
34673}
34674
34675// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34676func (future *VirtualHubsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
34677	var azFuture azure.Future
34678	if err := json.Unmarshal(body, &azFuture); err != nil {
34679		return err
34680	}
34681	future.FutureAPI = &azFuture
34682	future.Result = future.result
34683	return nil
34684}
34685
34686// result is the default implementation for VirtualHubsCreateOrUpdateFuture.Result.
34687func (future *VirtualHubsCreateOrUpdateFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
34688	var done bool
34689	done, err = future.DoneWithContext(context.Background(), client)
34690	if err != nil {
34691		err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
34692		return
34693	}
34694	if !done {
34695		vh.Response.Response = future.Response()
34696		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture")
34697		return
34698	}
34699	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34700	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
34701		vh, err = client.CreateOrUpdateResponder(vh.Response.Response)
34702		if err != nil {
34703			err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request")
34704		}
34705	}
34706	return
34707}
34708
34709// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
34710// operation.
34711type VirtualHubsDeleteFuture struct {
34712	azure.FutureAPI
34713	// Result returns the result of the asynchronous operation.
34714	// If the operation has not completed it will return an error.
34715	Result func(VirtualHubsClient) (autorest.Response, error)
34716}
34717
34718// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34719func (future *VirtualHubsDeleteFuture) UnmarshalJSON(body []byte) error {
34720	var azFuture azure.Future
34721	if err := json.Unmarshal(body, &azFuture); err != nil {
34722		return err
34723	}
34724	future.FutureAPI = &azFuture
34725	future.Result = future.result
34726	return nil
34727}
34728
34729// result is the default implementation for VirtualHubsDeleteFuture.Result.
34730func (future *VirtualHubsDeleteFuture) result(client VirtualHubsClient) (ar autorest.Response, err error) {
34731	var done bool
34732	done, err = future.DoneWithContext(context.Background(), client)
34733	if err != nil {
34734		err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure")
34735		return
34736	}
34737	if !done {
34738		ar.Response = future.Response()
34739		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture")
34740		return
34741	}
34742	ar.Response = future.Response()
34743	return
34744}
34745
34746// VirtualNetwork virtual Network resource.
34747type VirtualNetwork struct {
34748	autorest.Response `json:"-"`
34749	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
34750	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
34751	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
34752	Etag *string `json:"etag,omitempty"`
34753	// ID - Resource ID.
34754	ID *string `json:"id,omitempty"`
34755	// Name - READ-ONLY; Resource name.
34756	Name *string `json:"name,omitempty"`
34757	// Type - READ-ONLY; Resource type.
34758	Type *string `json:"type,omitempty"`
34759	// Location - Resource location.
34760	Location *string `json:"location,omitempty"`
34761	// Tags - Resource tags.
34762	Tags map[string]*string `json:"tags"`
34763}
34764
34765// MarshalJSON is the custom marshaler for VirtualNetwork.
34766func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
34767	objectMap := make(map[string]interface{})
34768	if vn.VirtualNetworkPropertiesFormat != nil {
34769		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
34770	}
34771	if vn.ID != nil {
34772		objectMap["id"] = vn.ID
34773	}
34774	if vn.Location != nil {
34775		objectMap["location"] = vn.Location
34776	}
34777	if vn.Tags != nil {
34778		objectMap["tags"] = vn.Tags
34779	}
34780	return json.Marshal(objectMap)
34781}
34782
34783// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
34784func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
34785	var m map[string]*json.RawMessage
34786	err := json.Unmarshal(body, &m)
34787	if err != nil {
34788		return err
34789	}
34790	for k, v := range m {
34791		switch k {
34792		case "properties":
34793			if v != nil {
34794				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
34795				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
34796				if err != nil {
34797					return err
34798				}
34799				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
34800			}
34801		case "etag":
34802			if v != nil {
34803				var etag string
34804				err = json.Unmarshal(*v, &etag)
34805				if err != nil {
34806					return err
34807				}
34808				vn.Etag = &etag
34809			}
34810		case "id":
34811			if v != nil {
34812				var ID string
34813				err = json.Unmarshal(*v, &ID)
34814				if err != nil {
34815					return err
34816				}
34817				vn.ID = &ID
34818			}
34819		case "name":
34820			if v != nil {
34821				var name string
34822				err = json.Unmarshal(*v, &name)
34823				if err != nil {
34824					return err
34825				}
34826				vn.Name = &name
34827			}
34828		case "type":
34829			if v != nil {
34830				var typeVar string
34831				err = json.Unmarshal(*v, &typeVar)
34832				if err != nil {
34833					return err
34834				}
34835				vn.Type = &typeVar
34836			}
34837		case "location":
34838			if v != nil {
34839				var location string
34840				err = json.Unmarshal(*v, &location)
34841				if err != nil {
34842					return err
34843				}
34844				vn.Location = &location
34845			}
34846		case "tags":
34847			if v != nil {
34848				var tags map[string]*string
34849				err = json.Unmarshal(*v, &tags)
34850				if err != nil {
34851					return err
34852				}
34853				vn.Tags = tags
34854			}
34855		}
34856	}
34857
34858	return nil
34859}
34860
34861// VirtualNetworkBgpCommunities bgp Communities sent over ExpressRoute with each route corresponding to a
34862// prefix in this VNET.
34863type VirtualNetworkBgpCommunities struct {
34864	// VirtualNetworkCommunity - The BGP community associated with the virtual network.
34865	VirtualNetworkCommunity *string `json:"virtualNetworkCommunity,omitempty"`
34866	// RegionalCommunity - READ-ONLY; The BGP community associated with the region of the virtual network.
34867	RegionalCommunity *string `json:"regionalCommunity,omitempty"`
34868}
34869
34870// MarshalJSON is the custom marshaler for VirtualNetworkBgpCommunities.
34871func (vnbc VirtualNetworkBgpCommunities) MarshalJSON() ([]byte, error) {
34872	objectMap := make(map[string]interface{})
34873	if vnbc.VirtualNetworkCommunity != nil {
34874		objectMap["virtualNetworkCommunity"] = vnbc.VirtualNetworkCommunity
34875	}
34876	return json.Marshal(objectMap)
34877}
34878
34879// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
34880// resource.
34881type VirtualNetworkConnectionGatewayReference struct {
34882	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
34883	ID *string `json:"id,omitempty"`
34884}
34885
34886// VirtualNetworkGateway a common class for general resource information.
34887type VirtualNetworkGateway struct {
34888	autorest.Response `json:"-"`
34889	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
34890	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
34891	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
34892	Etag *string `json:"etag,omitempty"`
34893	// ID - Resource ID.
34894	ID *string `json:"id,omitempty"`
34895	// Name - READ-ONLY; Resource name.
34896	Name *string `json:"name,omitempty"`
34897	// Type - READ-ONLY; Resource type.
34898	Type *string `json:"type,omitempty"`
34899	// Location - Resource location.
34900	Location *string `json:"location,omitempty"`
34901	// Tags - Resource tags.
34902	Tags map[string]*string `json:"tags"`
34903}
34904
34905// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
34906func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
34907	objectMap := make(map[string]interface{})
34908	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
34909		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
34910	}
34911	if vng.ID != nil {
34912		objectMap["id"] = vng.ID
34913	}
34914	if vng.Location != nil {
34915		objectMap["location"] = vng.Location
34916	}
34917	if vng.Tags != nil {
34918		objectMap["tags"] = vng.Tags
34919	}
34920	return json.Marshal(objectMap)
34921}
34922
34923// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
34924func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
34925	var m map[string]*json.RawMessage
34926	err := json.Unmarshal(body, &m)
34927	if err != nil {
34928		return err
34929	}
34930	for k, v := range m {
34931		switch k {
34932		case "properties":
34933			if v != nil {
34934				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
34935				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
34936				if err != nil {
34937					return err
34938				}
34939				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
34940			}
34941		case "etag":
34942			if v != nil {
34943				var etag string
34944				err = json.Unmarshal(*v, &etag)
34945				if err != nil {
34946					return err
34947				}
34948				vng.Etag = &etag
34949			}
34950		case "id":
34951			if v != nil {
34952				var ID string
34953				err = json.Unmarshal(*v, &ID)
34954				if err != nil {
34955					return err
34956				}
34957				vng.ID = &ID
34958			}
34959		case "name":
34960			if v != nil {
34961				var name string
34962				err = json.Unmarshal(*v, &name)
34963				if err != nil {
34964					return err
34965				}
34966				vng.Name = &name
34967			}
34968		case "type":
34969			if v != nil {
34970				var typeVar string
34971				err = json.Unmarshal(*v, &typeVar)
34972				if err != nil {
34973					return err
34974				}
34975				vng.Type = &typeVar
34976			}
34977		case "location":
34978			if v != nil {
34979				var location string
34980				err = json.Unmarshal(*v, &location)
34981				if err != nil {
34982					return err
34983				}
34984				vng.Location = &location
34985			}
34986		case "tags":
34987			if v != nil {
34988				var tags map[string]*string
34989				err = json.Unmarshal(*v, &tags)
34990				if err != nil {
34991					return err
34992				}
34993				vng.Tags = tags
34994			}
34995		}
34996	}
34997
34998	return nil
34999}
35000
35001// VirtualNetworkGatewayConnection a common class for general resource information.
35002type VirtualNetworkGatewayConnection struct {
35003	autorest.Response `json:"-"`
35004	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
35005	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
35006	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35007	Etag *string `json:"etag,omitempty"`
35008	// ID - Resource ID.
35009	ID *string `json:"id,omitempty"`
35010	// Name - READ-ONLY; Resource name.
35011	Name *string `json:"name,omitempty"`
35012	// Type - READ-ONLY; Resource type.
35013	Type *string `json:"type,omitempty"`
35014	// Location - Resource location.
35015	Location *string `json:"location,omitempty"`
35016	// Tags - Resource tags.
35017	Tags map[string]*string `json:"tags"`
35018}
35019
35020// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
35021func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
35022	objectMap := make(map[string]interface{})
35023	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
35024		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
35025	}
35026	if vngc.ID != nil {
35027		objectMap["id"] = vngc.ID
35028	}
35029	if vngc.Location != nil {
35030		objectMap["location"] = vngc.Location
35031	}
35032	if vngc.Tags != nil {
35033		objectMap["tags"] = vngc.Tags
35034	}
35035	return json.Marshal(objectMap)
35036}
35037
35038// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
35039func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
35040	var m map[string]*json.RawMessage
35041	err := json.Unmarshal(body, &m)
35042	if err != nil {
35043		return err
35044	}
35045	for k, v := range m {
35046		switch k {
35047		case "properties":
35048			if v != nil {
35049				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
35050				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
35051				if err != nil {
35052					return err
35053				}
35054				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
35055			}
35056		case "etag":
35057			if v != nil {
35058				var etag string
35059				err = json.Unmarshal(*v, &etag)
35060				if err != nil {
35061					return err
35062				}
35063				vngc.Etag = &etag
35064			}
35065		case "id":
35066			if v != nil {
35067				var ID string
35068				err = json.Unmarshal(*v, &ID)
35069				if err != nil {
35070					return err
35071				}
35072				vngc.ID = &ID
35073			}
35074		case "name":
35075			if v != nil {
35076				var name string
35077				err = json.Unmarshal(*v, &name)
35078				if err != nil {
35079					return err
35080				}
35081				vngc.Name = &name
35082			}
35083		case "type":
35084			if v != nil {
35085				var typeVar string
35086				err = json.Unmarshal(*v, &typeVar)
35087				if err != nil {
35088					return err
35089				}
35090				vngc.Type = &typeVar
35091			}
35092		case "location":
35093			if v != nil {
35094				var location string
35095				err = json.Unmarshal(*v, &location)
35096				if err != nil {
35097					return err
35098				}
35099				vngc.Location = &location
35100			}
35101		case "tags":
35102			if v != nil {
35103				var tags map[string]*string
35104				err = json.Unmarshal(*v, &tags)
35105				if err != nil {
35106					return err
35107				}
35108				vngc.Tags = tags
35109			}
35110		}
35111	}
35112
35113	return nil
35114}
35115
35116// VirtualNetworkGatewayConnectionListEntity a common class for general resource information.
35117type VirtualNetworkGatewayConnectionListEntity struct {
35118	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
35119	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
35120	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35121	Etag *string `json:"etag,omitempty"`
35122	// ID - Resource ID.
35123	ID *string `json:"id,omitempty"`
35124	// Name - READ-ONLY; Resource name.
35125	Name *string `json:"name,omitempty"`
35126	// Type - READ-ONLY; Resource type.
35127	Type *string `json:"type,omitempty"`
35128	// Location - Resource location.
35129	Location *string `json:"location,omitempty"`
35130	// Tags - Resource tags.
35131	Tags map[string]*string `json:"tags"`
35132}
35133
35134// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
35135func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
35136	objectMap := make(map[string]interface{})
35137	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
35138		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
35139	}
35140	if vngcle.ID != nil {
35141		objectMap["id"] = vngcle.ID
35142	}
35143	if vngcle.Location != nil {
35144		objectMap["location"] = vngcle.Location
35145	}
35146	if vngcle.Tags != nil {
35147		objectMap["tags"] = vngcle.Tags
35148	}
35149	return json.Marshal(objectMap)
35150}
35151
35152// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
35153func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
35154	var m map[string]*json.RawMessage
35155	err := json.Unmarshal(body, &m)
35156	if err != nil {
35157		return err
35158	}
35159	for k, v := range m {
35160		switch k {
35161		case "properties":
35162			if v != nil {
35163				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
35164				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
35165				if err != nil {
35166					return err
35167				}
35168				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
35169			}
35170		case "etag":
35171			if v != nil {
35172				var etag string
35173				err = json.Unmarshal(*v, &etag)
35174				if err != nil {
35175					return err
35176				}
35177				vngcle.Etag = &etag
35178			}
35179		case "id":
35180			if v != nil {
35181				var ID string
35182				err = json.Unmarshal(*v, &ID)
35183				if err != nil {
35184					return err
35185				}
35186				vngcle.ID = &ID
35187			}
35188		case "name":
35189			if v != nil {
35190				var name string
35191				err = json.Unmarshal(*v, &name)
35192				if err != nil {
35193					return err
35194				}
35195				vngcle.Name = &name
35196			}
35197		case "type":
35198			if v != nil {
35199				var typeVar string
35200				err = json.Unmarshal(*v, &typeVar)
35201				if err != nil {
35202					return err
35203				}
35204				vngcle.Type = &typeVar
35205			}
35206		case "location":
35207			if v != nil {
35208				var location string
35209				err = json.Unmarshal(*v, &location)
35210				if err != nil {
35211					return err
35212				}
35213				vngcle.Location = &location
35214			}
35215		case "tags":
35216			if v != nil {
35217				var tags map[string]*string
35218				err = json.Unmarshal(*v, &tags)
35219				if err != nil {
35220					return err
35221				}
35222				vngcle.Tags = tags
35223			}
35224		}
35225	}
35226
35227	return nil
35228}
35229
35230// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties.
35231type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
35232	// AuthorizationKey - The authorizationKey.
35233	AuthorizationKey *string `json:"authorizationKey,omitempty"`
35234	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
35235	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
35236	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
35237	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
35238	// LocalNetworkGateway2 - The reference to local network gateway resource.
35239	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
35240	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
35241	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
35242	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
35243	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
35244	// RoutingWeight - The routing weight.
35245	RoutingWeight *int32 `json:"routingWeight,omitempty"`
35246	// SharedKey - The IPSec shared key.
35247	SharedKey *string `json:"sharedKey,omitempty"`
35248	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
35249	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
35250	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
35251	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
35252	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
35253	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
35254	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
35255	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
35256	// Peer - The reference to peerings resource.
35257	Peer *SubResource `json:"peer,omitempty"`
35258	// EnableBgp - EnableBgp flag.
35259	EnableBgp *bool `json:"enableBgp,omitempty"`
35260	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
35261	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
35262	// IpsecPolicies - The IPSec Policies to be considered by this connection.
35263	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
35264	// TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection.
35265	TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"`
35266	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway connection resource.
35267	ResourceGUID *string `json:"resourceGuid,omitempty"`
35268	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35269	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35270	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
35271	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
35272}
35273
35274// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
35275func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
35276	objectMap := make(map[string]interface{})
35277	if vngclepf.AuthorizationKey != nil {
35278		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
35279	}
35280	if vngclepf.VirtualNetworkGateway1 != nil {
35281		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
35282	}
35283	if vngclepf.VirtualNetworkGateway2 != nil {
35284		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
35285	}
35286	if vngclepf.LocalNetworkGateway2 != nil {
35287		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
35288	}
35289	if vngclepf.ConnectionType != "" {
35290		objectMap["connectionType"] = vngclepf.ConnectionType
35291	}
35292	if vngclepf.ConnectionProtocol != "" {
35293		objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol
35294	}
35295	if vngclepf.RoutingWeight != nil {
35296		objectMap["routingWeight"] = vngclepf.RoutingWeight
35297	}
35298	if vngclepf.SharedKey != nil {
35299		objectMap["sharedKey"] = vngclepf.SharedKey
35300	}
35301	if vngclepf.Peer != nil {
35302		objectMap["peer"] = vngclepf.Peer
35303	}
35304	if vngclepf.EnableBgp != nil {
35305		objectMap["enableBgp"] = vngclepf.EnableBgp
35306	}
35307	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
35308		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
35309	}
35310	if vngclepf.IpsecPolicies != nil {
35311		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
35312	}
35313	if vngclepf.TrafficSelectorPolicies != nil {
35314		objectMap["trafficSelectorPolicies"] = vngclepf.TrafficSelectorPolicies
35315	}
35316	if vngclepf.ExpressRouteGatewayBypass != nil {
35317		objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass
35318	}
35319	return json.Marshal(objectMap)
35320}
35321
35322// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
35323// service call.
35324type VirtualNetworkGatewayConnectionListResult struct {
35325	autorest.Response `json:"-"`
35326	// Value - A list of VirtualNetworkGatewayConnection resources that exists in a resource group.
35327	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
35328	// NextLink - READ-ONLY; The URL to get the next set of results.
35329	NextLink *string `json:"nextLink,omitempty"`
35330}
35331
35332// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
35333func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
35334	objectMap := make(map[string]interface{})
35335	if vngclr.Value != nil {
35336		objectMap["value"] = vngclr.Value
35337	}
35338	return json.Marshal(objectMap)
35339}
35340
35341// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
35342// VirtualNetworkGatewayConnection values.
35343type VirtualNetworkGatewayConnectionListResultIterator struct {
35344	i    int
35345	page VirtualNetworkGatewayConnectionListResultPage
35346}
35347
35348// NextWithContext advances to the next value.  If there was an error making
35349// the request the iterator does not advance and the error is returned.
35350func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
35351	if tracing.IsEnabled() {
35352		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
35353		defer func() {
35354			sc := -1
35355			if iter.Response().Response.Response != nil {
35356				sc = iter.Response().Response.Response.StatusCode
35357			}
35358			tracing.EndSpan(ctx, sc, err)
35359		}()
35360	}
35361	iter.i++
35362	if iter.i < len(iter.page.Values()) {
35363		return nil
35364	}
35365	err = iter.page.NextWithContext(ctx)
35366	if err != nil {
35367		iter.i--
35368		return err
35369	}
35370	iter.i = 0
35371	return nil
35372}
35373
35374// Next advances to the next value.  If there was an error making
35375// the request the iterator does not advance and the error is returned.
35376// Deprecated: Use NextWithContext() instead.
35377func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
35378	return iter.NextWithContext(context.Background())
35379}
35380
35381// NotDone returns true if the enumeration should be started or is not yet complete.
35382func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
35383	return iter.page.NotDone() && iter.i < len(iter.page.Values())
35384}
35385
35386// Response returns the raw server response from the last page request.
35387func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
35388	return iter.page.Response()
35389}
35390
35391// Value returns the current value or a zero-initialized value if the
35392// iterator has advanced beyond the end of the collection.
35393func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
35394	if !iter.page.NotDone() {
35395		return VirtualNetworkGatewayConnection{}
35396	}
35397	return iter.page.Values()[iter.i]
35398}
35399
35400// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
35401func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
35402	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
35403}
35404
35405// IsEmpty returns true if the ListResult contains no values.
35406func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
35407	return vngclr.Value == nil || len(*vngclr.Value) == 0
35408}
35409
35410// hasNextLink returns true if the NextLink is not empty.
35411func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
35412	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
35413}
35414
35415// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
35416// It returns nil if no more results exist.
35417func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
35418	if !vngclr.hasNextLink() {
35419		return nil, nil
35420	}
35421	return autorest.Prepare((&http.Request{}).WithContext(ctx),
35422		autorest.AsJSON(),
35423		autorest.AsGet(),
35424		autorest.WithBaseURL(to.String(vngclr.NextLink)))
35425}
35426
35427// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
35428type VirtualNetworkGatewayConnectionListResultPage struct {
35429	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
35430	vngclr VirtualNetworkGatewayConnectionListResult
35431}
35432
35433// NextWithContext advances to the next page of values.  If there was an error making
35434// the request the page does not advance and the error is returned.
35435func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
35436	if tracing.IsEnabled() {
35437		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
35438		defer func() {
35439			sc := -1
35440			if page.Response().Response.Response != nil {
35441				sc = page.Response().Response.Response.StatusCode
35442			}
35443			tracing.EndSpan(ctx, sc, err)
35444		}()
35445	}
35446	for {
35447		next, err := page.fn(ctx, page.vngclr)
35448		if err != nil {
35449			return err
35450		}
35451		page.vngclr = next
35452		if !next.hasNextLink() || !next.IsEmpty() {
35453			break
35454		}
35455	}
35456	return nil
35457}
35458
35459// Next advances to the next page of values.  If there was an error making
35460// the request the page does not advance and the error is returned.
35461// Deprecated: Use NextWithContext() instead.
35462func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
35463	return page.NextWithContext(context.Background())
35464}
35465
35466// NotDone returns true if the page enumeration should be started or is not yet complete.
35467func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
35468	return !page.vngclr.IsEmpty()
35469}
35470
35471// Response returns the raw server response from the last page request.
35472func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
35473	return page.vngclr
35474}
35475
35476// Values returns the slice of values for the current page or nil if there are no values.
35477func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
35478	if page.vngclr.IsEmpty() {
35479		return nil
35480	}
35481	return *page.vngclr.Value
35482}
35483
35484// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
35485func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
35486	return VirtualNetworkGatewayConnectionListResultPage{
35487		fn:     getNextPage,
35488		vngclr: cur,
35489	}
35490}
35491
35492// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties.
35493type VirtualNetworkGatewayConnectionPropertiesFormat struct {
35494	// AuthorizationKey - The authorizationKey.
35495	AuthorizationKey *string `json:"authorizationKey,omitempty"`
35496	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
35497	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
35498	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
35499	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
35500	// LocalNetworkGateway2 - The reference to local network gateway resource.
35501	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
35502	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
35503	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
35504	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
35505	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
35506	// RoutingWeight - The routing weight.
35507	RoutingWeight *int32 `json:"routingWeight,omitempty"`
35508	// DpdTimeoutSeconds - The dead peer detection timeout of this connection in seconds.
35509	DpdTimeoutSeconds *int32 `json:"dpdTimeoutSeconds,omitempty"`
35510	// SharedKey - The IPSec shared key.
35511	SharedKey *string `json:"sharedKey,omitempty"`
35512	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
35513	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
35514	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
35515	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
35516	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
35517	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
35518	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
35519	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
35520	// Peer - The reference to peerings resource.
35521	Peer *SubResource `json:"peer,omitempty"`
35522	// EnableBgp - EnableBgp flag.
35523	EnableBgp *bool `json:"enableBgp,omitempty"`
35524	// UseLocalAzureIPAddress - Use private local Azure IP for the connection.
35525	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
35526	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
35527	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
35528	// IpsecPolicies - The IPSec Policies to be considered by this connection.
35529	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
35530	// TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection.
35531	TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"`
35532	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway connection resource.
35533	ResourceGUID *string `json:"resourceGuid,omitempty"`
35534	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35535	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35536	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
35537	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
35538}
35539
35540// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
35541func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
35542	objectMap := make(map[string]interface{})
35543	if vngcpf.AuthorizationKey != nil {
35544		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
35545	}
35546	if vngcpf.VirtualNetworkGateway1 != nil {
35547		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
35548	}
35549	if vngcpf.VirtualNetworkGateway2 != nil {
35550		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
35551	}
35552	if vngcpf.LocalNetworkGateway2 != nil {
35553		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
35554	}
35555	if vngcpf.ConnectionType != "" {
35556		objectMap["connectionType"] = vngcpf.ConnectionType
35557	}
35558	if vngcpf.ConnectionProtocol != "" {
35559		objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol
35560	}
35561	if vngcpf.RoutingWeight != nil {
35562		objectMap["routingWeight"] = vngcpf.RoutingWeight
35563	}
35564	if vngcpf.DpdTimeoutSeconds != nil {
35565		objectMap["dpdTimeoutSeconds"] = vngcpf.DpdTimeoutSeconds
35566	}
35567	if vngcpf.SharedKey != nil {
35568		objectMap["sharedKey"] = vngcpf.SharedKey
35569	}
35570	if vngcpf.Peer != nil {
35571		objectMap["peer"] = vngcpf.Peer
35572	}
35573	if vngcpf.EnableBgp != nil {
35574		objectMap["enableBgp"] = vngcpf.EnableBgp
35575	}
35576	if vngcpf.UseLocalAzureIPAddress != nil {
35577		objectMap["useLocalAzureIpAddress"] = vngcpf.UseLocalAzureIPAddress
35578	}
35579	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
35580		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
35581	}
35582	if vngcpf.IpsecPolicies != nil {
35583		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
35584	}
35585	if vngcpf.TrafficSelectorPolicies != nil {
35586		objectMap["trafficSelectorPolicies"] = vngcpf.TrafficSelectorPolicies
35587	}
35588	if vngcpf.ExpressRouteGatewayBypass != nil {
35589		objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass
35590	}
35591	return json.Marshal(objectMap)
35592}
35593
35594// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
35595// results of a long-running operation.
35596type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
35597	azure.FutureAPI
35598	// Result returns the result of the asynchronous operation.
35599	// If the operation has not completed it will return an error.
35600	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
35601}
35602
35603// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35604func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
35605	var azFuture azure.Future
35606	if err := json.Unmarshal(body, &azFuture); err != nil {
35607		return err
35608	}
35609	future.FutureAPI = &azFuture
35610	future.Result = future.result
35611	return nil
35612}
35613
35614// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result.
35615func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
35616	var done bool
35617	done, err = future.DoneWithContext(context.Background(), client)
35618	if err != nil {
35619		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
35620		return
35621	}
35622	if !done {
35623		vngc.Response.Response = future.Response()
35624		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
35625		return
35626	}
35627	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35628	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
35629		vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
35630		if err != nil {
35631			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
35632		}
35633	}
35634	return
35635}
35636
35637// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
35638// a long-running operation.
35639type VirtualNetworkGatewayConnectionsDeleteFuture struct {
35640	azure.FutureAPI
35641	// Result returns the result of the asynchronous operation.
35642	// If the operation has not completed it will return an error.
35643	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
35644}
35645
35646// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35647func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
35648	var azFuture azure.Future
35649	if err := json.Unmarshal(body, &azFuture); err != nil {
35650		return err
35651	}
35652	future.FutureAPI = &azFuture
35653	future.Result = future.result
35654	return nil
35655}
35656
35657// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result.
35658func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
35659	var done bool
35660	done, err = future.DoneWithContext(context.Background(), client)
35661	if err != nil {
35662		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
35663		return
35664	}
35665	if !done {
35666		ar.Response = future.Response()
35667		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
35668		return
35669	}
35670	ar.Response = future.Response()
35671	return
35672}
35673
35674// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
35675// results of a long-running operation.
35676type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
35677	azure.FutureAPI
35678	// Result returns the result of the asynchronous operation.
35679	// If the operation has not completed it will return an error.
35680	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
35681}
35682
35683// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35684func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error {
35685	var azFuture azure.Future
35686	if err := json.Unmarshal(body, &azFuture); err != nil {
35687		return err
35688	}
35689	future.FutureAPI = &azFuture
35690	future.Result = future.result
35691	return nil
35692}
35693
35694// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result.
35695func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
35696	var done bool
35697	done, err = future.DoneWithContext(context.Background(), client)
35698	if err != nil {
35699		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
35700		return
35701	}
35702	if !done {
35703		crsk.Response.Response = future.Response()
35704		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
35705		return
35706	}
35707	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35708	if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
35709		crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
35710		if err != nil {
35711			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
35712		}
35713	}
35714	return
35715}
35716
35717// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
35718// results of a long-running operation.
35719type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
35720	azure.FutureAPI
35721	// Result returns the result of the asynchronous operation.
35722	// If the operation has not completed it will return an error.
35723	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
35724}
35725
35726// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35727func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error {
35728	var azFuture azure.Future
35729	if err := json.Unmarshal(body, &azFuture); err != nil {
35730		return err
35731	}
35732	future.FutureAPI = &azFuture
35733	future.Result = future.result
35734	return nil
35735}
35736
35737// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result.
35738func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
35739	var done bool
35740	done, err = future.DoneWithContext(context.Background(), client)
35741	if err != nil {
35742		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
35743		return
35744	}
35745	if !done {
35746		csk.Response.Response = future.Response()
35747		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
35748		return
35749	}
35750	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35751	if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
35752		csk, err = client.SetSharedKeyResponder(csk.Response.Response)
35753		if err != nil {
35754			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
35755		}
35756	}
35757	return
35758}
35759
35760// VirtualNetworkGatewayConnectionsStartPacketCaptureFuture an abstraction for monitoring and retrieving
35761// the results of a long-running operation.
35762type VirtualNetworkGatewayConnectionsStartPacketCaptureFuture struct {
35763	azure.FutureAPI
35764	// Result returns the result of the asynchronous operation.
35765	// If the operation has not completed it will return an error.
35766	Result func(VirtualNetworkGatewayConnectionsClient) (String, error)
35767}
35768
35769// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35770func (future *VirtualNetworkGatewayConnectionsStartPacketCaptureFuture) UnmarshalJSON(body []byte) error {
35771	var azFuture azure.Future
35772	if err := json.Unmarshal(body, &azFuture); err != nil {
35773		return err
35774	}
35775	future.FutureAPI = &azFuture
35776	future.Result = future.result
35777	return nil
35778}
35779
35780// result is the default implementation for VirtualNetworkGatewayConnectionsStartPacketCaptureFuture.Result.
35781func (future *VirtualNetworkGatewayConnectionsStartPacketCaptureFuture) result(client VirtualNetworkGatewayConnectionsClient) (s String, err error) {
35782	var done bool
35783	done, err = future.DoneWithContext(context.Background(), client)
35784	if err != nil {
35785		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture", "Result", future.Response(), "Polling failure")
35786		return
35787	}
35788	if !done {
35789		s.Response.Response = future.Response()
35790		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture")
35791		return
35792	}
35793	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35794	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
35795		s, err = client.StartPacketCaptureResponder(s.Response.Response)
35796		if err != nil {
35797			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
35798		}
35799	}
35800	return
35801}
35802
35803// VirtualNetworkGatewayConnectionsStopPacketCaptureFuture an abstraction for monitoring and retrieving the
35804// results of a long-running operation.
35805type VirtualNetworkGatewayConnectionsStopPacketCaptureFuture struct {
35806	azure.FutureAPI
35807	// Result returns the result of the asynchronous operation.
35808	// If the operation has not completed it will return an error.
35809	Result func(VirtualNetworkGatewayConnectionsClient) (String, error)
35810}
35811
35812// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35813func (future *VirtualNetworkGatewayConnectionsStopPacketCaptureFuture) UnmarshalJSON(body []byte) error {
35814	var azFuture azure.Future
35815	if err := json.Unmarshal(body, &azFuture); err != nil {
35816		return err
35817	}
35818	future.FutureAPI = &azFuture
35819	future.Result = future.result
35820	return nil
35821}
35822
35823// result is the default implementation for VirtualNetworkGatewayConnectionsStopPacketCaptureFuture.Result.
35824func (future *VirtualNetworkGatewayConnectionsStopPacketCaptureFuture) result(client VirtualNetworkGatewayConnectionsClient) (s String, err error) {
35825	var done bool
35826	done, err = future.DoneWithContext(context.Background(), client)
35827	if err != nil {
35828		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture", "Result", future.Response(), "Polling failure")
35829		return
35830	}
35831	if !done {
35832		s.Response.Response = future.Response()
35833		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture")
35834		return
35835	}
35836	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35837	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
35838		s, err = client.StopPacketCaptureResponder(s.Response.Response)
35839		if err != nil {
35840			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
35841		}
35842	}
35843	return
35844}
35845
35846// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
35847// results of a long-running operation.
35848type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
35849	azure.FutureAPI
35850	// Result returns the result of the asynchronous operation.
35851	// If the operation has not completed it will return an error.
35852	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
35853}
35854
35855// UnmarshalJSON is the custom unmarshaller for CreateFuture.
35856func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
35857	var azFuture azure.Future
35858	if err := json.Unmarshal(body, &azFuture); err != nil {
35859		return err
35860	}
35861	future.FutureAPI = &azFuture
35862	future.Result = future.result
35863	return nil
35864}
35865
35866// result is the default implementation for VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result.
35867func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
35868	var done bool
35869	done, err = future.DoneWithContext(context.Background(), client)
35870	if err != nil {
35871		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
35872		return
35873	}
35874	if !done {
35875		vngc.Response.Response = future.Response()
35876		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
35877		return
35878	}
35879	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
35880	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
35881		vngc, err = client.UpdateTagsResponder(vngc.Response.Response)
35882		if err != nil {
35883			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request")
35884		}
35885	}
35886	return
35887}
35888
35889// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway.
35890type VirtualNetworkGatewayIPConfiguration struct {
35891	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
35892	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
35893	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
35894	Name *string `json:"name,omitempty"`
35895	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35896	Etag *string `json:"etag,omitempty"`
35897	// ID - Resource ID.
35898	ID *string `json:"id,omitempty"`
35899}
35900
35901// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
35902func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
35903	objectMap := make(map[string]interface{})
35904	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
35905		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
35906	}
35907	if vngic.Name != nil {
35908		objectMap["name"] = vngic.Name
35909	}
35910	if vngic.ID != nil {
35911		objectMap["id"] = vngic.ID
35912	}
35913	return json.Marshal(objectMap)
35914}
35915
35916// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
35917func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
35918	var m map[string]*json.RawMessage
35919	err := json.Unmarshal(body, &m)
35920	if err != nil {
35921		return err
35922	}
35923	for k, v := range m {
35924		switch k {
35925		case "properties":
35926			if v != nil {
35927				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
35928				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
35929				if err != nil {
35930					return err
35931				}
35932				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
35933			}
35934		case "name":
35935			if v != nil {
35936				var name string
35937				err = json.Unmarshal(*v, &name)
35938				if err != nil {
35939					return err
35940				}
35941				vngic.Name = &name
35942			}
35943		case "etag":
35944			if v != nil {
35945				var etag string
35946				err = json.Unmarshal(*v, &etag)
35947				if err != nil {
35948					return err
35949				}
35950				vngic.Etag = &etag
35951			}
35952		case "id":
35953			if v != nil {
35954				var ID string
35955				err = json.Unmarshal(*v, &ID)
35956				if err != nil {
35957					return err
35958				}
35959				vngic.ID = &ID
35960			}
35961		}
35962	}
35963
35964	return nil
35965}
35966
35967// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration.
35968type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
35969	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
35970	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
35971	// Subnet - The reference to the subnet resource.
35972	Subnet *SubResource `json:"subnet,omitempty"`
35973	// PublicIPAddress - The reference to the public IP resource.
35974	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
35975	// PrivateIPAddress - READ-ONLY; Private IP Address for this gateway.
35976	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
35977	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35978	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35979}
35980
35981// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
35982func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
35983	objectMap := make(map[string]interface{})
35984	if vngicpf.PrivateIPAllocationMethod != "" {
35985		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
35986	}
35987	if vngicpf.Subnet != nil {
35988		objectMap["subnet"] = vngicpf.Subnet
35989	}
35990	if vngicpf.PublicIPAddress != nil {
35991		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
35992	}
35993	return json.Marshal(objectMap)
35994}
35995
35996// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
35997// service call.
35998type VirtualNetworkGatewayListConnectionsResult struct {
35999	autorest.Response `json:"-"`
36000	// Value - A list of VirtualNetworkGatewayConnection resources that exists in a resource group.
36001	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
36002	// NextLink - READ-ONLY; The URL to get the next set of results.
36003	NextLink *string `json:"nextLink,omitempty"`
36004}
36005
36006// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
36007func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
36008	objectMap := make(map[string]interface{})
36009	if vnglcr.Value != nil {
36010		objectMap["value"] = vnglcr.Value
36011	}
36012	return json.Marshal(objectMap)
36013}
36014
36015// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
36016// VirtualNetworkGatewayConnectionListEntity values.
36017type VirtualNetworkGatewayListConnectionsResultIterator struct {
36018	i    int
36019	page VirtualNetworkGatewayListConnectionsResultPage
36020}
36021
36022// NextWithContext advances to the next value.  If there was an error making
36023// the request the iterator does not advance and the error is returned.
36024func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
36025	if tracing.IsEnabled() {
36026		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
36027		defer func() {
36028			sc := -1
36029			if iter.Response().Response.Response != nil {
36030				sc = iter.Response().Response.Response.StatusCode
36031			}
36032			tracing.EndSpan(ctx, sc, err)
36033		}()
36034	}
36035	iter.i++
36036	if iter.i < len(iter.page.Values()) {
36037		return nil
36038	}
36039	err = iter.page.NextWithContext(ctx)
36040	if err != nil {
36041		iter.i--
36042		return err
36043	}
36044	iter.i = 0
36045	return nil
36046}
36047
36048// Next advances to the next value.  If there was an error making
36049// the request the iterator does not advance and the error is returned.
36050// Deprecated: Use NextWithContext() instead.
36051func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
36052	return iter.NextWithContext(context.Background())
36053}
36054
36055// NotDone returns true if the enumeration should be started or is not yet complete.
36056func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
36057	return iter.page.NotDone() && iter.i < len(iter.page.Values())
36058}
36059
36060// Response returns the raw server response from the last page request.
36061func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
36062	return iter.page.Response()
36063}
36064
36065// Value returns the current value or a zero-initialized value if the
36066// iterator has advanced beyond the end of the collection.
36067func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
36068	if !iter.page.NotDone() {
36069		return VirtualNetworkGatewayConnectionListEntity{}
36070	}
36071	return iter.page.Values()[iter.i]
36072}
36073
36074// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
36075func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
36076	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
36077}
36078
36079// IsEmpty returns true if the ListResult contains no values.
36080func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
36081	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
36082}
36083
36084// hasNextLink returns true if the NextLink is not empty.
36085func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
36086	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
36087}
36088
36089// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
36090// It returns nil if no more results exist.
36091func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
36092	if !vnglcr.hasNextLink() {
36093		return nil, nil
36094	}
36095	return autorest.Prepare((&http.Request{}).WithContext(ctx),
36096		autorest.AsJSON(),
36097		autorest.AsGet(),
36098		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
36099}
36100
36101// VirtualNetworkGatewayListConnectionsResultPage contains a page of
36102// VirtualNetworkGatewayConnectionListEntity values.
36103type VirtualNetworkGatewayListConnectionsResultPage struct {
36104	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
36105	vnglcr VirtualNetworkGatewayListConnectionsResult
36106}
36107
36108// NextWithContext advances to the next page of values.  If there was an error making
36109// the request the page does not advance and the error is returned.
36110func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
36111	if tracing.IsEnabled() {
36112		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
36113		defer func() {
36114			sc := -1
36115			if page.Response().Response.Response != nil {
36116				sc = page.Response().Response.Response.StatusCode
36117			}
36118			tracing.EndSpan(ctx, sc, err)
36119		}()
36120	}
36121	for {
36122		next, err := page.fn(ctx, page.vnglcr)
36123		if err != nil {
36124			return err
36125		}
36126		page.vnglcr = next
36127		if !next.hasNextLink() || !next.IsEmpty() {
36128			break
36129		}
36130	}
36131	return nil
36132}
36133
36134// Next advances to the next page of values.  If there was an error making
36135// the request the page does not advance and the error is returned.
36136// Deprecated: Use NextWithContext() instead.
36137func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
36138	return page.NextWithContext(context.Background())
36139}
36140
36141// NotDone returns true if the page enumeration should be started or is not yet complete.
36142func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
36143	return !page.vnglcr.IsEmpty()
36144}
36145
36146// Response returns the raw server response from the last page request.
36147func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
36148	return page.vnglcr
36149}
36150
36151// Values returns the slice of values for the current page or nil if there are no values.
36152func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
36153	if page.vnglcr.IsEmpty() {
36154		return nil
36155	}
36156	return *page.vnglcr.Value
36157}
36158
36159// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
36160func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
36161	return VirtualNetworkGatewayListConnectionsResultPage{
36162		fn:     getNextPage,
36163		vnglcr: cur,
36164	}
36165}
36166
36167// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
36168type VirtualNetworkGatewayListResult struct {
36169	autorest.Response `json:"-"`
36170	// Value - A list of VirtualNetworkGateway resources that exists in a resource group.
36171	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
36172	// NextLink - READ-ONLY; The URL to get the next set of results.
36173	NextLink *string `json:"nextLink,omitempty"`
36174}
36175
36176// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
36177func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
36178	objectMap := make(map[string]interface{})
36179	if vnglr.Value != nil {
36180		objectMap["value"] = vnglr.Value
36181	}
36182	return json.Marshal(objectMap)
36183}
36184
36185// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
36186// values.
36187type VirtualNetworkGatewayListResultIterator struct {
36188	i    int
36189	page VirtualNetworkGatewayListResultPage
36190}
36191
36192// NextWithContext advances to the next value.  If there was an error making
36193// the request the iterator does not advance and the error is returned.
36194func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
36195	if tracing.IsEnabled() {
36196		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
36197		defer func() {
36198			sc := -1
36199			if iter.Response().Response.Response != nil {
36200				sc = iter.Response().Response.Response.StatusCode
36201			}
36202			tracing.EndSpan(ctx, sc, err)
36203		}()
36204	}
36205	iter.i++
36206	if iter.i < len(iter.page.Values()) {
36207		return nil
36208	}
36209	err = iter.page.NextWithContext(ctx)
36210	if err != nil {
36211		iter.i--
36212		return err
36213	}
36214	iter.i = 0
36215	return nil
36216}
36217
36218// Next advances to the next value.  If there was an error making
36219// the request the iterator does not advance and the error is returned.
36220// Deprecated: Use NextWithContext() instead.
36221func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
36222	return iter.NextWithContext(context.Background())
36223}
36224
36225// NotDone returns true if the enumeration should be started or is not yet complete.
36226func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
36227	return iter.page.NotDone() && iter.i < len(iter.page.Values())
36228}
36229
36230// Response returns the raw server response from the last page request.
36231func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
36232	return iter.page.Response()
36233}
36234
36235// Value returns the current value or a zero-initialized value if the
36236// iterator has advanced beyond the end of the collection.
36237func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
36238	if !iter.page.NotDone() {
36239		return VirtualNetworkGateway{}
36240	}
36241	return iter.page.Values()[iter.i]
36242}
36243
36244// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
36245func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
36246	return VirtualNetworkGatewayListResultIterator{page: page}
36247}
36248
36249// IsEmpty returns true if the ListResult contains no values.
36250func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
36251	return vnglr.Value == nil || len(*vnglr.Value) == 0
36252}
36253
36254// hasNextLink returns true if the NextLink is not empty.
36255func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
36256	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
36257}
36258
36259// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
36260// It returns nil if no more results exist.
36261func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
36262	if !vnglr.hasNextLink() {
36263		return nil, nil
36264	}
36265	return autorest.Prepare((&http.Request{}).WithContext(ctx),
36266		autorest.AsJSON(),
36267		autorest.AsGet(),
36268		autorest.WithBaseURL(to.String(vnglr.NextLink)))
36269}
36270
36271// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
36272type VirtualNetworkGatewayListResultPage struct {
36273	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
36274	vnglr VirtualNetworkGatewayListResult
36275}
36276
36277// NextWithContext advances to the next page of values.  If there was an error making
36278// the request the page does not advance and the error is returned.
36279func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
36280	if tracing.IsEnabled() {
36281		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
36282		defer func() {
36283			sc := -1
36284			if page.Response().Response.Response != nil {
36285				sc = page.Response().Response.Response.StatusCode
36286			}
36287			tracing.EndSpan(ctx, sc, err)
36288		}()
36289	}
36290	for {
36291		next, err := page.fn(ctx, page.vnglr)
36292		if err != nil {
36293			return err
36294		}
36295		page.vnglr = next
36296		if !next.hasNextLink() || !next.IsEmpty() {
36297			break
36298		}
36299	}
36300	return nil
36301}
36302
36303// Next advances to the next page of values.  If there was an error making
36304// the request the page does not advance and the error is returned.
36305// Deprecated: Use NextWithContext() instead.
36306func (page *VirtualNetworkGatewayListResultPage) Next() error {
36307	return page.NextWithContext(context.Background())
36308}
36309
36310// NotDone returns true if the page enumeration should be started or is not yet complete.
36311func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
36312	return !page.vnglr.IsEmpty()
36313}
36314
36315// Response returns the raw server response from the last page request.
36316func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
36317	return page.vnglr
36318}
36319
36320// Values returns the slice of values for the current page or nil if there are no values.
36321func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
36322	if page.vnglr.IsEmpty() {
36323		return nil
36324	}
36325	return *page.vnglr.Value
36326}
36327
36328// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
36329func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
36330	return VirtualNetworkGatewayListResultPage{
36331		fn:    getNextPage,
36332		vnglr: cur,
36333	}
36334}
36335
36336// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties.
36337type VirtualNetworkGatewayPropertiesFormat struct {
36338	// IPConfigurations - IP configurations for virtual network gateway.
36339	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
36340	// GatewayType - The type of this virtual network gateway. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
36341	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
36342	// VpnType - The type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased'
36343	VpnType VpnType `json:"vpnType,omitempty"`
36344	// VpnGatewayGeneration - The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. Possible values include: 'VpnGatewayGenerationNone', 'VpnGatewayGenerationGeneration1', 'VpnGatewayGenerationGeneration2'
36345	VpnGatewayGeneration VpnGatewayGeneration `json:"vpnGatewayGeneration,omitempty"`
36346	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
36347	EnableBgp *bool `json:"enableBgp,omitempty"`
36348	// EnablePrivateIPAddress - Whether private IP needs to be enabled on this gateway for connections or not.
36349	EnablePrivateIPAddress *bool `json:"enablePrivateIpAddress,omitempty"`
36350	// ActiveActive - ActiveActive flag.
36351	ActiveActive *bool `json:"activeActive,omitempty"`
36352	// 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.
36353	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
36354	// Sku - The reference to the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
36355	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
36356	// VpnClientConfiguration - The reference to the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
36357	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
36358	// BgpSettings - Virtual network gateway's BGP speaker settings.
36359	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
36360	// 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.
36361	CustomRoutes *AddressSpace `json:"customRoutes,omitempty"`
36362	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway resource.
36363	ResourceGUID *string `json:"resourceGuid,omitempty"`
36364	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
36365	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36366	// EnableDNSForwarding - Whether dns forwarding is enabled or not.
36367	EnableDNSForwarding *bool `json:"enableDnsForwarding,omitempty"`
36368	// InboundDNSForwardingEndpoint - READ-ONLY; The IP address allocated by the gateway to which dns requests can be sent.
36369	InboundDNSForwardingEndpoint *string `json:"inboundDnsForwardingEndpoint,omitempty"`
36370}
36371
36372// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
36373func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
36374	objectMap := make(map[string]interface{})
36375	if vngpf.IPConfigurations != nil {
36376		objectMap["ipConfigurations"] = vngpf.IPConfigurations
36377	}
36378	if vngpf.GatewayType != "" {
36379		objectMap["gatewayType"] = vngpf.GatewayType
36380	}
36381	if vngpf.VpnType != "" {
36382		objectMap["vpnType"] = vngpf.VpnType
36383	}
36384	if vngpf.VpnGatewayGeneration != "" {
36385		objectMap["vpnGatewayGeneration"] = vngpf.VpnGatewayGeneration
36386	}
36387	if vngpf.EnableBgp != nil {
36388		objectMap["enableBgp"] = vngpf.EnableBgp
36389	}
36390	if vngpf.EnablePrivateIPAddress != nil {
36391		objectMap["enablePrivateIpAddress"] = vngpf.EnablePrivateIPAddress
36392	}
36393	if vngpf.ActiveActive != nil {
36394		objectMap["activeActive"] = vngpf.ActiveActive
36395	}
36396	if vngpf.GatewayDefaultSite != nil {
36397		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
36398	}
36399	if vngpf.Sku != nil {
36400		objectMap["sku"] = vngpf.Sku
36401	}
36402	if vngpf.VpnClientConfiguration != nil {
36403		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
36404	}
36405	if vngpf.BgpSettings != nil {
36406		objectMap["bgpSettings"] = vngpf.BgpSettings
36407	}
36408	if vngpf.CustomRoutes != nil {
36409		objectMap["customRoutes"] = vngpf.CustomRoutes
36410	}
36411	if vngpf.EnableDNSForwarding != nil {
36412		objectMap["enableDnsForwarding"] = vngpf.EnableDNSForwarding
36413	}
36414	return json.Marshal(objectMap)
36415}
36416
36417// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
36418// long-running operation.
36419type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
36420	azure.FutureAPI
36421	// Result returns the result of the asynchronous operation.
36422	// If the operation has not completed it will return an error.
36423	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
36424}
36425
36426// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36427func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
36428	var azFuture azure.Future
36429	if err := json.Unmarshal(body, &azFuture); err != nil {
36430		return err
36431	}
36432	future.FutureAPI = &azFuture
36433	future.Result = future.result
36434	return nil
36435}
36436
36437// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result.
36438func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
36439	var done bool
36440	done, err = future.DoneWithContext(context.Background(), client)
36441	if err != nil {
36442		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
36443		return
36444	}
36445	if !done {
36446		vng.Response.Response = future.Response()
36447		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
36448		return
36449	}
36450	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36451	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
36452		vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
36453		if err != nil {
36454			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
36455		}
36456	}
36457	return
36458}
36459
36460// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
36461// long-running operation.
36462type VirtualNetworkGatewaysDeleteFuture struct {
36463	azure.FutureAPI
36464	// Result returns the result of the asynchronous operation.
36465	// If the operation has not completed it will return an error.
36466	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
36467}
36468
36469// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36470func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
36471	var azFuture azure.Future
36472	if err := json.Unmarshal(body, &azFuture); err != nil {
36473		return err
36474	}
36475	future.FutureAPI = &azFuture
36476	future.Result = future.result
36477	return nil
36478}
36479
36480// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result.
36481func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
36482	var done bool
36483	done, err = future.DoneWithContext(context.Background(), client)
36484	if err != nil {
36485		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
36486		return
36487	}
36488	if !done {
36489		ar.Response = future.Response()
36490		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
36491		return
36492	}
36493	ar.Response = future.Response()
36494	return
36495}
36496
36497// VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture an abstraction for monitoring
36498// and retrieving the results of a long-running operation.
36499type VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture struct {
36500	azure.FutureAPI
36501	// Result returns the result of the asynchronous operation.
36502	// If the operation has not completed it will return an error.
36503	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
36504}
36505
36506// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36507func (future *VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture) UnmarshalJSON(body []byte) error {
36508	var azFuture azure.Future
36509	if err := json.Unmarshal(body, &azFuture); err != nil {
36510		return err
36511	}
36512	future.FutureAPI = &azFuture
36513	future.Result = future.result
36514	return nil
36515}
36516
36517// result is the default implementation for VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture.Result.
36518func (future *VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
36519	var done bool
36520	done, err = future.DoneWithContext(context.Background(), client)
36521	if err != nil {
36522		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture", "Result", future.Response(), "Polling failure")
36523		return
36524	}
36525	if !done {
36526		ar.Response = future.Response()
36527		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture")
36528		return
36529	}
36530	ar.Response = future.Response()
36531	return
36532}
36533
36534// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
36535// results of a long-running operation.
36536type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
36537	azure.FutureAPI
36538	// Result returns the result of the asynchronous operation.
36539	// If the operation has not completed it will return an error.
36540	Result func(VirtualNetworkGatewaysClient) (String, error)
36541}
36542
36543// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36544func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error {
36545	var azFuture azure.Future
36546	if err := json.Unmarshal(body, &azFuture); err != nil {
36547		return err
36548	}
36549	future.FutureAPI = &azFuture
36550	future.Result = future.result
36551	return nil
36552}
36553
36554// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result.
36555func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
36556	var done bool
36557	done, err = future.DoneWithContext(context.Background(), client)
36558	if err != nil {
36559		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
36560		return
36561	}
36562	if !done {
36563		s.Response.Response = future.Response()
36564		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
36565		return
36566	}
36567	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36568	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
36569		s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
36570		if err != nil {
36571			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
36572		}
36573	}
36574	return
36575}
36576
36577// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
36578// of a long-running operation.
36579type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
36580	azure.FutureAPI
36581	// Result returns the result of the asynchronous operation.
36582	// If the operation has not completed it will return an error.
36583	Result func(VirtualNetworkGatewaysClient) (String, error)
36584}
36585
36586// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36587func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
36588	var azFuture azure.Future
36589	if err := json.Unmarshal(body, &azFuture); err != nil {
36590		return err
36591	}
36592	future.FutureAPI = &azFuture
36593	future.Result = future.result
36594	return nil
36595}
36596
36597// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result.
36598func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
36599	var done bool
36600	done, err = future.DoneWithContext(context.Background(), client)
36601	if err != nil {
36602		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
36603		return
36604	}
36605	if !done {
36606		s.Response.Response = future.Response()
36607		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
36608		return
36609	}
36610	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36611	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
36612		s, err = client.GenerateVpnProfileResponder(s.Response.Response)
36613		if err != nil {
36614			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
36615		}
36616	}
36617	return
36618}
36619
36620// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
36621// of a long-running operation.
36622type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
36623	azure.FutureAPI
36624	// Result returns the result of the asynchronous operation.
36625	// If the operation has not completed it will return an error.
36626	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
36627}
36628
36629// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36630func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
36631	var azFuture azure.Future
36632	if err := json.Unmarshal(body, &azFuture); err != nil {
36633		return err
36634	}
36635	future.FutureAPI = &azFuture
36636	future.Result = future.result
36637	return nil
36638}
36639
36640// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result.
36641func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
36642	var done bool
36643	done, err = future.DoneWithContext(context.Background(), client)
36644	if err != nil {
36645		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
36646		return
36647	}
36648	if !done {
36649		grlr.Response.Response = future.Response()
36650		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
36651		return
36652	}
36653	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36654	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
36655		grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
36656		if err != nil {
36657			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
36658		}
36659	}
36660	return
36661}
36662
36663// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
36664// a long-running operation.
36665type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
36666	azure.FutureAPI
36667	// Result returns the result of the asynchronous operation.
36668	// If the operation has not completed it will return an error.
36669	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
36670}
36671
36672// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36673func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error {
36674	var azFuture azure.Future
36675	if err := json.Unmarshal(body, &azFuture); err != nil {
36676		return err
36677	}
36678	future.FutureAPI = &azFuture
36679	future.Result = future.result
36680	return nil
36681}
36682
36683// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result.
36684func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
36685	var done bool
36686	done, err = future.DoneWithContext(context.Background(), client)
36687	if err != nil {
36688		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
36689		return
36690	}
36691	if !done {
36692		bpslr.Response.Response = future.Response()
36693		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
36694		return
36695	}
36696	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36697	if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
36698		bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
36699		if err != nil {
36700			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
36701		}
36702	}
36703	return
36704}
36705
36706// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
36707// a long-running operation.
36708type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
36709	azure.FutureAPI
36710	// Result returns the result of the asynchronous operation.
36711	// If the operation has not completed it will return an error.
36712	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
36713}
36714
36715// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36716func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
36717	var azFuture azure.Future
36718	if err := json.Unmarshal(body, &azFuture); err != nil {
36719		return err
36720	}
36721	future.FutureAPI = &azFuture
36722	future.Result = future.result
36723	return nil
36724}
36725
36726// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result.
36727func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
36728	var done bool
36729	done, err = future.DoneWithContext(context.Background(), client)
36730	if err != nil {
36731		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
36732		return
36733	}
36734	if !done {
36735		grlr.Response.Response = future.Response()
36736		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
36737		return
36738	}
36739	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36740	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
36741		grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
36742		if err != nil {
36743			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
36744		}
36745	}
36746	return
36747}
36748
36749// VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture an abstraction for monitoring and retrieving
36750// the results of a long-running operation.
36751type VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture struct {
36752	azure.FutureAPI
36753	// Result returns the result of the asynchronous operation.
36754	// If the operation has not completed it will return an error.
36755	Result func(VirtualNetworkGatewaysClient) (VpnClientConnectionHealthDetailListResult, error)
36756}
36757
36758// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36759func (future *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture) UnmarshalJSON(body []byte) error {
36760	var azFuture azure.Future
36761	if err := json.Unmarshal(body, &azFuture); err != nil {
36762		return err
36763	}
36764	future.FutureAPI = &azFuture
36765	future.Result = future.result
36766	return nil
36767}
36768
36769// result is the default implementation for VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture.Result.
36770func (future *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture) result(client VirtualNetworkGatewaysClient) (vcchdlr VpnClientConnectionHealthDetailListResult, err error) {
36771	var done bool
36772	done, err = future.DoneWithContext(context.Background(), client)
36773	if err != nil {
36774		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", future.Response(), "Polling failure")
36775		return
36776	}
36777	if !done {
36778		vcchdlr.Response.Response = future.Response()
36779		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture")
36780		return
36781	}
36782	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36783	if vcchdlr.Response.Response, err = future.GetResult(sender); err == nil && vcchdlr.Response.Response.StatusCode != http.StatusNoContent {
36784		vcchdlr, err = client.GetVpnclientConnectionHealthResponder(vcchdlr.Response.Response)
36785		if err != nil {
36786			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", vcchdlr.Response.Response, "Failure responding to request")
36787		}
36788	}
36789	return
36790}
36791
36792// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
36793// results of a long-running operation.
36794type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
36795	azure.FutureAPI
36796	// Result returns the result of the asynchronous operation.
36797	// If the operation has not completed it will return an error.
36798	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
36799}
36800
36801// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36802func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
36803	var azFuture azure.Future
36804	if err := json.Unmarshal(body, &azFuture); err != nil {
36805		return err
36806	}
36807	future.FutureAPI = &azFuture
36808	future.Result = future.result
36809	return nil
36810}
36811
36812// result is the default implementation for VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.Result.
36813func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
36814	var done bool
36815	done, err = future.DoneWithContext(context.Background(), client)
36816	if err != nil {
36817		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
36818		return
36819	}
36820	if !done {
36821		vcipp.Response.Response = future.Response()
36822		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
36823		return
36824	}
36825	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36826	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
36827		vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
36828		if err != nil {
36829			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
36830		}
36831	}
36832	return
36833}
36834
36835// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
36836// results of a long-running operation.
36837type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
36838	azure.FutureAPI
36839	// Result returns the result of the asynchronous operation.
36840	// If the operation has not completed it will return an error.
36841	Result func(VirtualNetworkGatewaysClient) (String, error)
36842}
36843
36844// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36845func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error {
36846	var azFuture azure.Future
36847	if err := json.Unmarshal(body, &azFuture); err != nil {
36848		return err
36849	}
36850	future.FutureAPI = &azFuture
36851	future.Result = future.result
36852	return nil
36853}
36854
36855// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result.
36856func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
36857	var done bool
36858	done, err = future.DoneWithContext(context.Background(), client)
36859	if err != nil {
36860		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
36861		return
36862	}
36863	if !done {
36864		s.Response.Response = future.Response()
36865		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
36866		return
36867	}
36868	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36869	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
36870		s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
36871		if err != nil {
36872			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
36873		}
36874	}
36875	return
36876}
36877
36878// VirtualNetworkGatewaySku virtualNetworkGatewaySku details.
36879type VirtualNetworkGatewaySku struct {
36880	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw4', 'VirtualNetworkGatewaySkuNameVpnGw5', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameVpnGw4AZ', 'VirtualNetworkGatewaySkuNameVpnGw5AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
36881	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
36882	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw4', 'VirtualNetworkGatewaySkuTierVpnGw5', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierVpnGw4AZ', 'VirtualNetworkGatewaySkuTierVpnGw5AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
36883	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
36884	// Capacity - READ-ONLY; The capacity.
36885	Capacity *int32 `json:"capacity,omitempty"`
36886}
36887
36888// MarshalJSON is the custom marshaler for VirtualNetworkGatewaySku.
36889func (vngs VirtualNetworkGatewaySku) MarshalJSON() ([]byte, error) {
36890	objectMap := make(map[string]interface{})
36891	if vngs.Name != "" {
36892		objectMap["name"] = vngs.Name
36893	}
36894	if vngs.Tier != "" {
36895		objectMap["tier"] = vngs.Tier
36896	}
36897	return json.Marshal(objectMap)
36898}
36899
36900// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
36901// long-running operation.
36902type VirtualNetworkGatewaysResetFuture struct {
36903	azure.FutureAPI
36904	// Result returns the result of the asynchronous operation.
36905	// If the operation has not completed it will return an error.
36906	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
36907}
36908
36909// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36910func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error {
36911	var azFuture azure.Future
36912	if err := json.Unmarshal(body, &azFuture); err != nil {
36913		return err
36914	}
36915	future.FutureAPI = &azFuture
36916	future.Result = future.result
36917	return nil
36918}
36919
36920// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result.
36921func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
36922	var done bool
36923	done, err = future.DoneWithContext(context.Background(), client)
36924	if err != nil {
36925		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
36926		return
36927	}
36928	if !done {
36929		vng.Response.Response = future.Response()
36930		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
36931		return
36932	}
36933	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
36934	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
36935		vng, err = client.ResetResponder(vng.Response.Response)
36936		if err != nil {
36937			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
36938		}
36939	}
36940	return
36941}
36942
36943// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
36944// results of a long-running operation.
36945type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
36946	azure.FutureAPI
36947	// Result returns the result of the asynchronous operation.
36948	// If the operation has not completed it will return an error.
36949	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
36950}
36951
36952// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36953func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) UnmarshalJSON(body []byte) error {
36954	var azFuture azure.Future
36955	if err := json.Unmarshal(body, &azFuture); err != nil {
36956		return err
36957	}
36958	future.FutureAPI = &azFuture
36959	future.Result = future.result
36960	return nil
36961}
36962
36963// result is the default implementation for VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.Result.
36964func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
36965	var done bool
36966	done, err = future.DoneWithContext(context.Background(), client)
36967	if err != nil {
36968		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture", "Result", future.Response(), "Polling failure")
36969		return
36970	}
36971	if !done {
36972		ar.Response = future.Response()
36973		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture")
36974		return
36975	}
36976	ar.Response = future.Response()
36977	return
36978}
36979
36980// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
36981// results of a long-running operation.
36982type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
36983	azure.FutureAPI
36984	// Result returns the result of the asynchronous operation.
36985	// If the operation has not completed it will return an error.
36986	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
36987}
36988
36989// UnmarshalJSON is the custom unmarshaller for CreateFuture.
36990func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
36991	var azFuture azure.Future
36992	if err := json.Unmarshal(body, &azFuture); err != nil {
36993		return err
36994	}
36995	future.FutureAPI = &azFuture
36996	future.Result = future.result
36997	return nil
36998}
36999
37000// result is the default implementation for VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.Result.
37001func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
37002	var done bool
37003	done, err = future.DoneWithContext(context.Background(), client)
37004	if err != nil {
37005		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
37006		return
37007	}
37008	if !done {
37009		vcipp.Response.Response = future.Response()
37010		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
37011		return
37012	}
37013	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37014	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
37015		vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
37016		if err != nil {
37017			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
37018		}
37019	}
37020	return
37021}
37022
37023// VirtualNetworkGatewaysStartPacketCaptureFuture an abstraction for monitoring and retrieving the results
37024// of a long-running operation.
37025type VirtualNetworkGatewaysStartPacketCaptureFuture struct {
37026	azure.FutureAPI
37027	// Result returns the result of the asynchronous operation.
37028	// If the operation has not completed it will return an error.
37029	Result func(VirtualNetworkGatewaysClient) (String, error)
37030}
37031
37032// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37033func (future *VirtualNetworkGatewaysStartPacketCaptureFuture) UnmarshalJSON(body []byte) error {
37034	var azFuture azure.Future
37035	if err := json.Unmarshal(body, &azFuture); err != nil {
37036		return err
37037	}
37038	future.FutureAPI = &azFuture
37039	future.Result = future.result
37040	return nil
37041}
37042
37043// result is the default implementation for VirtualNetworkGatewaysStartPacketCaptureFuture.Result.
37044func (future *VirtualNetworkGatewaysStartPacketCaptureFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
37045	var done bool
37046	done, err = future.DoneWithContext(context.Background(), client)
37047	if err != nil {
37048		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStartPacketCaptureFuture", "Result", future.Response(), "Polling failure")
37049		return
37050	}
37051	if !done {
37052		s.Response.Response = future.Response()
37053		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysStartPacketCaptureFuture")
37054		return
37055	}
37056	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37057	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
37058		s, err = client.StartPacketCaptureResponder(s.Response.Response)
37059		if err != nil {
37060			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStartPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
37061		}
37062	}
37063	return
37064}
37065
37066// VirtualNetworkGatewaysStopPacketCaptureFuture an abstraction for monitoring and retrieving the results
37067// of a long-running operation.
37068type VirtualNetworkGatewaysStopPacketCaptureFuture struct {
37069	azure.FutureAPI
37070	// Result returns the result of the asynchronous operation.
37071	// If the operation has not completed it will return an error.
37072	Result func(VirtualNetworkGatewaysClient) (String, error)
37073}
37074
37075// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37076func (future *VirtualNetworkGatewaysStopPacketCaptureFuture) UnmarshalJSON(body []byte) error {
37077	var azFuture azure.Future
37078	if err := json.Unmarshal(body, &azFuture); err != nil {
37079		return err
37080	}
37081	future.FutureAPI = &azFuture
37082	future.Result = future.result
37083	return nil
37084}
37085
37086// result is the default implementation for VirtualNetworkGatewaysStopPacketCaptureFuture.Result.
37087func (future *VirtualNetworkGatewaysStopPacketCaptureFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
37088	var done bool
37089	done, err = future.DoneWithContext(context.Background(), client)
37090	if err != nil {
37091		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStopPacketCaptureFuture", "Result", future.Response(), "Polling failure")
37092		return
37093	}
37094	if !done {
37095		s.Response.Response = future.Response()
37096		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysStopPacketCaptureFuture")
37097		return
37098	}
37099	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37100	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
37101		s, err = client.StopPacketCaptureResponder(s.Response.Response)
37102		if err != nil {
37103			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysStopPacketCaptureFuture", "Result", s.Response.Response, "Failure responding to request")
37104		}
37105	}
37106	return
37107}
37108
37109// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
37110// long-running operation.
37111type VirtualNetworkGatewaysUpdateTagsFuture struct {
37112	azure.FutureAPI
37113	// Result returns the result of the asynchronous operation.
37114	// If the operation has not completed it will return an error.
37115	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
37116}
37117
37118// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37119func (future *VirtualNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
37120	var azFuture azure.Future
37121	if err := json.Unmarshal(body, &azFuture); err != nil {
37122		return err
37123	}
37124	future.FutureAPI = &azFuture
37125	future.Result = future.result
37126	return nil
37127}
37128
37129// result is the default implementation for VirtualNetworkGatewaysUpdateTagsFuture.Result.
37130func (future *VirtualNetworkGatewaysUpdateTagsFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
37131	var done bool
37132	done, err = future.DoneWithContext(context.Background(), client)
37133	if err != nil {
37134		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
37135		return
37136	}
37137	if !done {
37138		vng.Response.Response = future.Response()
37139		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
37140		return
37141	}
37142	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37143	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
37144		vng, err = client.UpdateTagsResponder(vng.Response.Response)
37145		if err != nil {
37146			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
37147		}
37148	}
37149	return
37150}
37151
37152// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
37153type VirtualNetworkListResult struct {
37154	autorest.Response `json:"-"`
37155	// Value - A list of VirtualNetwork resources in a resource group.
37156	Value *[]VirtualNetwork `json:"value,omitempty"`
37157	// NextLink - The URL to get the next set of results.
37158	NextLink *string `json:"nextLink,omitempty"`
37159}
37160
37161// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
37162type VirtualNetworkListResultIterator struct {
37163	i    int
37164	page VirtualNetworkListResultPage
37165}
37166
37167// NextWithContext advances to the next value.  If there was an error making
37168// the request the iterator does not advance and the error is returned.
37169func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
37170	if tracing.IsEnabled() {
37171		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
37172		defer func() {
37173			sc := -1
37174			if iter.Response().Response.Response != nil {
37175				sc = iter.Response().Response.Response.StatusCode
37176			}
37177			tracing.EndSpan(ctx, sc, err)
37178		}()
37179	}
37180	iter.i++
37181	if iter.i < len(iter.page.Values()) {
37182		return nil
37183	}
37184	err = iter.page.NextWithContext(ctx)
37185	if err != nil {
37186		iter.i--
37187		return err
37188	}
37189	iter.i = 0
37190	return nil
37191}
37192
37193// Next advances to the next value.  If there was an error making
37194// the request the iterator does not advance and the error is returned.
37195// Deprecated: Use NextWithContext() instead.
37196func (iter *VirtualNetworkListResultIterator) Next() error {
37197	return iter.NextWithContext(context.Background())
37198}
37199
37200// NotDone returns true if the enumeration should be started or is not yet complete.
37201func (iter VirtualNetworkListResultIterator) NotDone() bool {
37202	return iter.page.NotDone() && iter.i < len(iter.page.Values())
37203}
37204
37205// Response returns the raw server response from the last page request.
37206func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
37207	return iter.page.Response()
37208}
37209
37210// Value returns the current value or a zero-initialized value if the
37211// iterator has advanced beyond the end of the collection.
37212func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
37213	if !iter.page.NotDone() {
37214		return VirtualNetwork{}
37215	}
37216	return iter.page.Values()[iter.i]
37217}
37218
37219// Creates a new instance of the VirtualNetworkListResultIterator type.
37220func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
37221	return VirtualNetworkListResultIterator{page: page}
37222}
37223
37224// IsEmpty returns true if the ListResult contains no values.
37225func (vnlr VirtualNetworkListResult) IsEmpty() bool {
37226	return vnlr.Value == nil || len(*vnlr.Value) == 0
37227}
37228
37229// hasNextLink returns true if the NextLink is not empty.
37230func (vnlr VirtualNetworkListResult) hasNextLink() bool {
37231	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
37232}
37233
37234// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
37235// It returns nil if no more results exist.
37236func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
37237	if !vnlr.hasNextLink() {
37238		return nil, nil
37239	}
37240	return autorest.Prepare((&http.Request{}).WithContext(ctx),
37241		autorest.AsJSON(),
37242		autorest.AsGet(),
37243		autorest.WithBaseURL(to.String(vnlr.NextLink)))
37244}
37245
37246// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
37247type VirtualNetworkListResultPage struct {
37248	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
37249	vnlr VirtualNetworkListResult
37250}
37251
37252// NextWithContext advances to the next page of values.  If there was an error making
37253// the request the page does not advance and the error is returned.
37254func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
37255	if tracing.IsEnabled() {
37256		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
37257		defer func() {
37258			sc := -1
37259			if page.Response().Response.Response != nil {
37260				sc = page.Response().Response.Response.StatusCode
37261			}
37262			tracing.EndSpan(ctx, sc, err)
37263		}()
37264	}
37265	for {
37266		next, err := page.fn(ctx, page.vnlr)
37267		if err != nil {
37268			return err
37269		}
37270		page.vnlr = next
37271		if !next.hasNextLink() || !next.IsEmpty() {
37272			break
37273		}
37274	}
37275	return nil
37276}
37277
37278// Next advances to the next page of values.  If there was an error making
37279// the request the page does not advance and the error is returned.
37280// Deprecated: Use NextWithContext() instead.
37281func (page *VirtualNetworkListResultPage) Next() error {
37282	return page.NextWithContext(context.Background())
37283}
37284
37285// NotDone returns true if the page enumeration should be started or is not yet complete.
37286func (page VirtualNetworkListResultPage) NotDone() bool {
37287	return !page.vnlr.IsEmpty()
37288}
37289
37290// Response returns the raw server response from the last page request.
37291func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
37292	return page.vnlr
37293}
37294
37295// Values returns the slice of values for the current page or nil if there are no values.
37296func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
37297	if page.vnlr.IsEmpty() {
37298		return nil
37299	}
37300	return *page.vnlr.Value
37301}
37302
37303// Creates a new instance of the VirtualNetworkListResultPage type.
37304func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
37305	return VirtualNetworkListResultPage{
37306		fn:   getNextPage,
37307		vnlr: cur,
37308	}
37309}
37310
37311// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
37312type VirtualNetworkListUsageResult struct {
37313	autorest.Response `json:"-"`
37314	// Value - READ-ONLY; VirtualNetwork usage stats.
37315	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
37316	// NextLink - The URL to get the next set of results.
37317	NextLink *string `json:"nextLink,omitempty"`
37318}
37319
37320// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
37321func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
37322	objectMap := make(map[string]interface{})
37323	if vnlur.NextLink != nil {
37324		objectMap["nextLink"] = vnlur.NextLink
37325	}
37326	return json.Marshal(objectMap)
37327}
37328
37329// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
37330// values.
37331type VirtualNetworkListUsageResultIterator struct {
37332	i    int
37333	page VirtualNetworkListUsageResultPage
37334}
37335
37336// NextWithContext advances to the next value.  If there was an error making
37337// the request the iterator does not advance and the error is returned.
37338func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
37339	if tracing.IsEnabled() {
37340		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
37341		defer func() {
37342			sc := -1
37343			if iter.Response().Response.Response != nil {
37344				sc = iter.Response().Response.Response.StatusCode
37345			}
37346			tracing.EndSpan(ctx, sc, err)
37347		}()
37348	}
37349	iter.i++
37350	if iter.i < len(iter.page.Values()) {
37351		return nil
37352	}
37353	err = iter.page.NextWithContext(ctx)
37354	if err != nil {
37355		iter.i--
37356		return err
37357	}
37358	iter.i = 0
37359	return nil
37360}
37361
37362// Next advances to the next value.  If there was an error making
37363// the request the iterator does not advance and the error is returned.
37364// Deprecated: Use NextWithContext() instead.
37365func (iter *VirtualNetworkListUsageResultIterator) Next() error {
37366	return iter.NextWithContext(context.Background())
37367}
37368
37369// NotDone returns true if the enumeration should be started or is not yet complete.
37370func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
37371	return iter.page.NotDone() && iter.i < len(iter.page.Values())
37372}
37373
37374// Response returns the raw server response from the last page request.
37375func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
37376	return iter.page.Response()
37377}
37378
37379// Value returns the current value or a zero-initialized value if the
37380// iterator has advanced beyond the end of the collection.
37381func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
37382	if !iter.page.NotDone() {
37383		return VirtualNetworkUsage{}
37384	}
37385	return iter.page.Values()[iter.i]
37386}
37387
37388// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
37389func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
37390	return VirtualNetworkListUsageResultIterator{page: page}
37391}
37392
37393// IsEmpty returns true if the ListResult contains no values.
37394func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
37395	return vnlur.Value == nil || len(*vnlur.Value) == 0
37396}
37397
37398// hasNextLink returns true if the NextLink is not empty.
37399func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
37400	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
37401}
37402
37403// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
37404// It returns nil if no more results exist.
37405func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
37406	if !vnlur.hasNextLink() {
37407		return nil, nil
37408	}
37409	return autorest.Prepare((&http.Request{}).WithContext(ctx),
37410		autorest.AsJSON(),
37411		autorest.AsGet(),
37412		autorest.WithBaseURL(to.String(vnlur.NextLink)))
37413}
37414
37415// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
37416type VirtualNetworkListUsageResultPage struct {
37417	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
37418	vnlur VirtualNetworkListUsageResult
37419}
37420
37421// NextWithContext advances to the next page of values.  If there was an error making
37422// the request the page does not advance and the error is returned.
37423func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
37424	if tracing.IsEnabled() {
37425		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
37426		defer func() {
37427			sc := -1
37428			if page.Response().Response.Response != nil {
37429				sc = page.Response().Response.Response.StatusCode
37430			}
37431			tracing.EndSpan(ctx, sc, err)
37432		}()
37433	}
37434	for {
37435		next, err := page.fn(ctx, page.vnlur)
37436		if err != nil {
37437			return err
37438		}
37439		page.vnlur = next
37440		if !next.hasNextLink() || !next.IsEmpty() {
37441			break
37442		}
37443	}
37444	return nil
37445}
37446
37447// Next advances to the next page of values.  If there was an error making
37448// the request the page does not advance and the error is returned.
37449// Deprecated: Use NextWithContext() instead.
37450func (page *VirtualNetworkListUsageResultPage) Next() error {
37451	return page.NextWithContext(context.Background())
37452}
37453
37454// NotDone returns true if the page enumeration should be started or is not yet complete.
37455func (page VirtualNetworkListUsageResultPage) NotDone() bool {
37456	return !page.vnlur.IsEmpty()
37457}
37458
37459// Response returns the raw server response from the last page request.
37460func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
37461	return page.vnlur
37462}
37463
37464// Values returns the slice of values for the current page or nil if there are no values.
37465func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
37466	if page.vnlur.IsEmpty() {
37467		return nil
37468	}
37469	return *page.vnlur.Value
37470}
37471
37472// Creates a new instance of the VirtualNetworkListUsageResultPage type.
37473func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
37474	return VirtualNetworkListUsageResultPage{
37475		fn:    getNextPage,
37476		vnlur: cur,
37477	}
37478}
37479
37480// VirtualNetworkPeering peerings in a virtual network resource.
37481type VirtualNetworkPeering struct {
37482	autorest.Response `json:"-"`
37483	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
37484	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
37485	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
37486	Name *string `json:"name,omitempty"`
37487	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
37488	Etag *string `json:"etag,omitempty"`
37489	// ID - Resource ID.
37490	ID *string `json:"id,omitempty"`
37491}
37492
37493// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
37494func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
37495	objectMap := make(map[string]interface{})
37496	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
37497		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
37498	}
37499	if vnp.Name != nil {
37500		objectMap["name"] = vnp.Name
37501	}
37502	if vnp.ID != nil {
37503		objectMap["id"] = vnp.ID
37504	}
37505	return json.Marshal(objectMap)
37506}
37507
37508// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
37509func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
37510	var m map[string]*json.RawMessage
37511	err := json.Unmarshal(body, &m)
37512	if err != nil {
37513		return err
37514	}
37515	for k, v := range m {
37516		switch k {
37517		case "properties":
37518			if v != nil {
37519				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
37520				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
37521				if err != nil {
37522					return err
37523				}
37524				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
37525			}
37526		case "name":
37527			if v != nil {
37528				var name string
37529				err = json.Unmarshal(*v, &name)
37530				if err != nil {
37531					return err
37532				}
37533				vnp.Name = &name
37534			}
37535		case "etag":
37536			if v != nil {
37537				var etag string
37538				err = json.Unmarshal(*v, &etag)
37539				if err != nil {
37540					return err
37541				}
37542				vnp.Etag = &etag
37543			}
37544		case "id":
37545			if v != nil {
37546				var ID string
37547				err = json.Unmarshal(*v, &ID)
37548				if err != nil {
37549					return err
37550				}
37551				vnp.ID = &ID
37552			}
37553		}
37554	}
37555
37556	return nil
37557}
37558
37559// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
37560// belong to a virtual network.
37561type VirtualNetworkPeeringListResult struct {
37562	autorest.Response `json:"-"`
37563	// Value - The peerings in a virtual network.
37564	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
37565	// NextLink - The URL to get the next set of results.
37566	NextLink *string `json:"nextLink,omitempty"`
37567}
37568
37569// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
37570// values.
37571type VirtualNetworkPeeringListResultIterator struct {
37572	i    int
37573	page VirtualNetworkPeeringListResultPage
37574}
37575
37576// NextWithContext advances to the next value.  If there was an error making
37577// the request the iterator does not advance and the error is returned.
37578func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
37579	if tracing.IsEnabled() {
37580		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
37581		defer func() {
37582			sc := -1
37583			if iter.Response().Response.Response != nil {
37584				sc = iter.Response().Response.Response.StatusCode
37585			}
37586			tracing.EndSpan(ctx, sc, err)
37587		}()
37588	}
37589	iter.i++
37590	if iter.i < len(iter.page.Values()) {
37591		return nil
37592	}
37593	err = iter.page.NextWithContext(ctx)
37594	if err != nil {
37595		iter.i--
37596		return err
37597	}
37598	iter.i = 0
37599	return nil
37600}
37601
37602// Next advances to the next value.  If there was an error making
37603// the request the iterator does not advance and the error is returned.
37604// Deprecated: Use NextWithContext() instead.
37605func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
37606	return iter.NextWithContext(context.Background())
37607}
37608
37609// NotDone returns true if the enumeration should be started or is not yet complete.
37610func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
37611	return iter.page.NotDone() && iter.i < len(iter.page.Values())
37612}
37613
37614// Response returns the raw server response from the last page request.
37615func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
37616	return iter.page.Response()
37617}
37618
37619// Value returns the current value or a zero-initialized value if the
37620// iterator has advanced beyond the end of the collection.
37621func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
37622	if !iter.page.NotDone() {
37623		return VirtualNetworkPeering{}
37624	}
37625	return iter.page.Values()[iter.i]
37626}
37627
37628// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
37629func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
37630	return VirtualNetworkPeeringListResultIterator{page: page}
37631}
37632
37633// IsEmpty returns true if the ListResult contains no values.
37634func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
37635	return vnplr.Value == nil || len(*vnplr.Value) == 0
37636}
37637
37638// hasNextLink returns true if the NextLink is not empty.
37639func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
37640	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
37641}
37642
37643// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
37644// It returns nil if no more results exist.
37645func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
37646	if !vnplr.hasNextLink() {
37647		return nil, nil
37648	}
37649	return autorest.Prepare((&http.Request{}).WithContext(ctx),
37650		autorest.AsJSON(),
37651		autorest.AsGet(),
37652		autorest.WithBaseURL(to.String(vnplr.NextLink)))
37653}
37654
37655// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
37656type VirtualNetworkPeeringListResultPage struct {
37657	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
37658	vnplr VirtualNetworkPeeringListResult
37659}
37660
37661// NextWithContext advances to the next page of values.  If there was an error making
37662// the request the page does not advance and the error is returned.
37663func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
37664	if tracing.IsEnabled() {
37665		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
37666		defer func() {
37667			sc := -1
37668			if page.Response().Response.Response != nil {
37669				sc = page.Response().Response.Response.StatusCode
37670			}
37671			tracing.EndSpan(ctx, sc, err)
37672		}()
37673	}
37674	for {
37675		next, err := page.fn(ctx, page.vnplr)
37676		if err != nil {
37677			return err
37678		}
37679		page.vnplr = next
37680		if !next.hasNextLink() || !next.IsEmpty() {
37681			break
37682		}
37683	}
37684	return nil
37685}
37686
37687// Next advances to the next page of values.  If there was an error making
37688// the request the page does not advance and the error is returned.
37689// Deprecated: Use NextWithContext() instead.
37690func (page *VirtualNetworkPeeringListResultPage) Next() error {
37691	return page.NextWithContext(context.Background())
37692}
37693
37694// NotDone returns true if the page enumeration should be started or is not yet complete.
37695func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
37696	return !page.vnplr.IsEmpty()
37697}
37698
37699// Response returns the raw server response from the last page request.
37700func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
37701	return page.vnplr
37702}
37703
37704// Values returns the slice of values for the current page or nil if there are no values.
37705func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
37706	if page.vnplr.IsEmpty() {
37707		return nil
37708	}
37709	return *page.vnplr.Value
37710}
37711
37712// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
37713func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
37714	return VirtualNetworkPeeringListResultPage{
37715		fn:    getNextPage,
37716		vnplr: cur,
37717	}
37718}
37719
37720// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
37721type VirtualNetworkPeeringPropertiesFormat struct {
37722	// AllowVirtualNetworkAccess - Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
37723	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
37724	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
37725	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
37726	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
37727	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
37728	// 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.
37729	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
37730	// 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).
37731	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
37732	// RemoteAddressSpace - The reference to the remote virtual network address space.
37733	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
37734	// PeeringState - The status of the virtual network peering. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
37735	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
37736	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
37737	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
37738}
37739
37740// MarshalJSON is the custom marshaler for VirtualNetworkPeeringPropertiesFormat.
37741func (vnppf VirtualNetworkPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
37742	objectMap := make(map[string]interface{})
37743	if vnppf.AllowVirtualNetworkAccess != nil {
37744		objectMap["allowVirtualNetworkAccess"] = vnppf.AllowVirtualNetworkAccess
37745	}
37746	if vnppf.AllowForwardedTraffic != nil {
37747		objectMap["allowForwardedTraffic"] = vnppf.AllowForwardedTraffic
37748	}
37749	if vnppf.AllowGatewayTransit != nil {
37750		objectMap["allowGatewayTransit"] = vnppf.AllowGatewayTransit
37751	}
37752	if vnppf.UseRemoteGateways != nil {
37753		objectMap["useRemoteGateways"] = vnppf.UseRemoteGateways
37754	}
37755	if vnppf.RemoteVirtualNetwork != nil {
37756		objectMap["remoteVirtualNetwork"] = vnppf.RemoteVirtualNetwork
37757	}
37758	if vnppf.RemoteAddressSpace != nil {
37759		objectMap["remoteAddressSpace"] = vnppf.RemoteAddressSpace
37760	}
37761	if vnppf.PeeringState != "" {
37762		objectMap["peeringState"] = vnppf.PeeringState
37763	}
37764	return json.Marshal(objectMap)
37765}
37766
37767// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
37768// long-running operation.
37769type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
37770	azure.FutureAPI
37771	// Result returns the result of the asynchronous operation.
37772	// If the operation has not completed it will return an error.
37773	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
37774}
37775
37776// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37777func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
37778	var azFuture azure.Future
37779	if err := json.Unmarshal(body, &azFuture); err != nil {
37780		return err
37781	}
37782	future.FutureAPI = &azFuture
37783	future.Result = future.result
37784	return nil
37785}
37786
37787// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result.
37788func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
37789	var done bool
37790	done, err = future.DoneWithContext(context.Background(), client)
37791	if err != nil {
37792		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
37793		return
37794	}
37795	if !done {
37796		vnp.Response.Response = future.Response()
37797		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
37798		return
37799	}
37800	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37801	if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
37802		vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
37803		if err != nil {
37804			err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
37805		}
37806	}
37807	return
37808}
37809
37810// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
37811// long-running operation.
37812type VirtualNetworkPeeringsDeleteFuture struct {
37813	azure.FutureAPI
37814	// Result returns the result of the asynchronous operation.
37815	// If the operation has not completed it will return an error.
37816	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
37817}
37818
37819// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37820func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
37821	var azFuture azure.Future
37822	if err := json.Unmarshal(body, &azFuture); err != nil {
37823		return err
37824	}
37825	future.FutureAPI = &azFuture
37826	future.Result = future.result
37827	return nil
37828}
37829
37830// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result.
37831func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
37832	var done bool
37833	done, err = future.DoneWithContext(context.Background(), client)
37834	if err != nil {
37835		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
37836		return
37837	}
37838	if !done {
37839		ar.Response = future.Response()
37840		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
37841		return
37842	}
37843	ar.Response = future.Response()
37844	return
37845}
37846
37847// VirtualNetworkPropertiesFormat properties of the virtual network.
37848type VirtualNetworkPropertiesFormat struct {
37849	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
37850	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
37851	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
37852	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
37853	// Subnets - A list of subnets in a Virtual Network.
37854	Subnets *[]Subnet `json:"subnets,omitempty"`
37855	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
37856	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
37857	// ResourceGUID - READ-ONLY; The resourceGuid property of the Virtual Network resource.
37858	ResourceGUID *string `json:"resourceGuid,omitempty"`
37859	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
37860	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
37861	// 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.
37862	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
37863	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
37864	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
37865	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
37866	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
37867	// BgpCommunities - Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET.
37868	BgpCommunities *VirtualNetworkBgpCommunities `json:"bgpCommunities,omitempty"`
37869	// IPAllocations - Array of IpAllocation which reference this VNET.
37870	IPAllocations *[]SubResource `json:"ipAllocations,omitempty"`
37871}
37872
37873// MarshalJSON is the custom marshaler for VirtualNetworkPropertiesFormat.
37874func (vnpf VirtualNetworkPropertiesFormat) MarshalJSON() ([]byte, error) {
37875	objectMap := make(map[string]interface{})
37876	if vnpf.AddressSpace != nil {
37877		objectMap["addressSpace"] = vnpf.AddressSpace
37878	}
37879	if vnpf.DhcpOptions != nil {
37880		objectMap["dhcpOptions"] = vnpf.DhcpOptions
37881	}
37882	if vnpf.Subnets != nil {
37883		objectMap["subnets"] = vnpf.Subnets
37884	}
37885	if vnpf.VirtualNetworkPeerings != nil {
37886		objectMap["virtualNetworkPeerings"] = vnpf.VirtualNetworkPeerings
37887	}
37888	if vnpf.EnableDdosProtection != nil {
37889		objectMap["enableDdosProtection"] = vnpf.EnableDdosProtection
37890	}
37891	if vnpf.EnableVMProtection != nil {
37892		objectMap["enableVmProtection"] = vnpf.EnableVMProtection
37893	}
37894	if vnpf.DdosProtectionPlan != nil {
37895		objectMap["ddosProtectionPlan"] = vnpf.DdosProtectionPlan
37896	}
37897	if vnpf.BgpCommunities != nil {
37898		objectMap["bgpCommunities"] = vnpf.BgpCommunities
37899	}
37900	if vnpf.IPAllocations != nil {
37901		objectMap["ipAllocations"] = vnpf.IPAllocations
37902	}
37903	return json.Marshal(objectMap)
37904}
37905
37906// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
37907// long-running operation.
37908type VirtualNetworksCreateOrUpdateFuture struct {
37909	azure.FutureAPI
37910	// Result returns the result of the asynchronous operation.
37911	// If the operation has not completed it will return an error.
37912	Result func(VirtualNetworksClient) (VirtualNetwork, error)
37913}
37914
37915// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37916func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
37917	var azFuture azure.Future
37918	if err := json.Unmarshal(body, &azFuture); err != nil {
37919		return err
37920	}
37921	future.FutureAPI = &azFuture
37922	future.Result = future.result
37923	return nil
37924}
37925
37926// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result.
37927func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
37928	var done bool
37929	done, err = future.DoneWithContext(context.Background(), client)
37930	if err != nil {
37931		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
37932		return
37933	}
37934	if !done {
37935		vn.Response.Response = future.Response()
37936		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
37937		return
37938	}
37939	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
37940	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
37941		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
37942		if err != nil {
37943			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
37944		}
37945	}
37946	return
37947}
37948
37949// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
37950// operation.
37951type VirtualNetworksDeleteFuture struct {
37952	azure.FutureAPI
37953	// Result returns the result of the asynchronous operation.
37954	// If the operation has not completed it will return an error.
37955	Result func(VirtualNetworksClient) (autorest.Response, error)
37956}
37957
37958// UnmarshalJSON is the custom unmarshaller for CreateFuture.
37959func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
37960	var azFuture azure.Future
37961	if err := json.Unmarshal(body, &azFuture); err != nil {
37962		return err
37963	}
37964	future.FutureAPI = &azFuture
37965	future.Result = future.result
37966	return nil
37967}
37968
37969// result is the default implementation for VirtualNetworksDeleteFuture.Result.
37970func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
37971	var done bool
37972	done, err = future.DoneWithContext(context.Background(), client)
37973	if err != nil {
37974		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
37975		return
37976	}
37977	if !done {
37978		ar.Response = future.Response()
37979		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
37980		return
37981	}
37982	ar.Response = future.Response()
37983	return
37984}
37985
37986// VirtualNetworkTap virtual Network Tap resource.
37987type VirtualNetworkTap struct {
37988	autorest.Response `json:"-"`
37989	// VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties.
37990	*VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"`
37991	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
37992	Etag *string `json:"etag,omitempty"`
37993	// ID - Resource ID.
37994	ID *string `json:"id,omitempty"`
37995	// Name - READ-ONLY; Resource name.
37996	Name *string `json:"name,omitempty"`
37997	// Type - READ-ONLY; Resource type.
37998	Type *string `json:"type,omitempty"`
37999	// Location - Resource location.
38000	Location *string `json:"location,omitempty"`
38001	// Tags - Resource tags.
38002	Tags map[string]*string `json:"tags"`
38003}
38004
38005// MarshalJSON is the custom marshaler for VirtualNetworkTap.
38006func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) {
38007	objectMap := make(map[string]interface{})
38008	if vnt.VirtualNetworkTapPropertiesFormat != nil {
38009		objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat
38010	}
38011	if vnt.ID != nil {
38012		objectMap["id"] = vnt.ID
38013	}
38014	if vnt.Location != nil {
38015		objectMap["location"] = vnt.Location
38016	}
38017	if vnt.Tags != nil {
38018		objectMap["tags"] = vnt.Tags
38019	}
38020	return json.Marshal(objectMap)
38021}
38022
38023// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct.
38024func (vnt *VirtualNetworkTap) UnmarshalJSON(body []byte) error {
38025	var m map[string]*json.RawMessage
38026	err := json.Unmarshal(body, &m)
38027	if err != nil {
38028		return err
38029	}
38030	for k, v := range m {
38031		switch k {
38032		case "properties":
38033			if v != nil {
38034				var virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat
38035				err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat)
38036				if err != nil {
38037					return err
38038				}
38039				vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat
38040			}
38041		case "etag":
38042			if v != nil {
38043				var etag string
38044				err = json.Unmarshal(*v, &etag)
38045				if err != nil {
38046					return err
38047				}
38048				vnt.Etag = &etag
38049			}
38050		case "id":
38051			if v != nil {
38052				var ID string
38053				err = json.Unmarshal(*v, &ID)
38054				if err != nil {
38055					return err
38056				}
38057				vnt.ID = &ID
38058			}
38059		case "name":
38060			if v != nil {
38061				var name string
38062				err = json.Unmarshal(*v, &name)
38063				if err != nil {
38064					return err
38065				}
38066				vnt.Name = &name
38067			}
38068		case "type":
38069			if v != nil {
38070				var typeVar string
38071				err = json.Unmarshal(*v, &typeVar)
38072				if err != nil {
38073					return err
38074				}
38075				vnt.Type = &typeVar
38076			}
38077		case "location":
38078			if v != nil {
38079				var location string
38080				err = json.Unmarshal(*v, &location)
38081				if err != nil {
38082					return err
38083				}
38084				vnt.Location = &location
38085			}
38086		case "tags":
38087			if v != nil {
38088				var tags map[string]*string
38089				err = json.Unmarshal(*v, &tags)
38090				if err != nil {
38091					return err
38092				}
38093				vnt.Tags = tags
38094			}
38095		}
38096	}
38097
38098	return nil
38099}
38100
38101// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call.
38102type VirtualNetworkTapListResult struct {
38103	autorest.Response `json:"-"`
38104	// Value - A list of VirtualNetworkTaps in a resource group.
38105	Value *[]VirtualNetworkTap `json:"value,omitempty"`
38106	// NextLink - The URL to get the next set of results.
38107	NextLink *string `json:"nextLink,omitempty"`
38108}
38109
38110// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values.
38111type VirtualNetworkTapListResultIterator struct {
38112	i    int
38113	page VirtualNetworkTapListResultPage
38114}
38115
38116// NextWithContext advances to the next value.  If there was an error making
38117// the request the iterator does not advance and the error is returned.
38118func (iter *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) {
38119	if tracing.IsEnabled() {
38120		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.NextWithContext")
38121		defer func() {
38122			sc := -1
38123			if iter.Response().Response.Response != nil {
38124				sc = iter.Response().Response.Response.StatusCode
38125			}
38126			tracing.EndSpan(ctx, sc, err)
38127		}()
38128	}
38129	iter.i++
38130	if iter.i < len(iter.page.Values()) {
38131		return nil
38132	}
38133	err = iter.page.NextWithContext(ctx)
38134	if err != nil {
38135		iter.i--
38136		return err
38137	}
38138	iter.i = 0
38139	return nil
38140}
38141
38142// Next advances to the next value.  If there was an error making
38143// the request the iterator does not advance and the error is returned.
38144// Deprecated: Use NextWithContext() instead.
38145func (iter *VirtualNetworkTapListResultIterator) Next() error {
38146	return iter.NextWithContext(context.Background())
38147}
38148
38149// NotDone returns true if the enumeration should be started or is not yet complete.
38150func (iter VirtualNetworkTapListResultIterator) NotDone() bool {
38151	return iter.page.NotDone() && iter.i < len(iter.page.Values())
38152}
38153
38154// Response returns the raw server response from the last page request.
38155func (iter VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult {
38156	return iter.page.Response()
38157}
38158
38159// Value returns the current value or a zero-initialized value if the
38160// iterator has advanced beyond the end of the collection.
38161func (iter VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap {
38162	if !iter.page.NotDone() {
38163		return VirtualNetworkTap{}
38164	}
38165	return iter.page.Values()[iter.i]
38166}
38167
38168// Creates a new instance of the VirtualNetworkTapListResultIterator type.
38169func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator {
38170	return VirtualNetworkTapListResultIterator{page: page}
38171}
38172
38173// IsEmpty returns true if the ListResult contains no values.
38174func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
38175	return vntlr.Value == nil || len(*vntlr.Value) == 0
38176}
38177
38178// hasNextLink returns true if the NextLink is not empty.
38179func (vntlr VirtualNetworkTapListResult) hasNextLink() bool {
38180	return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0
38181}
38182
38183// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results.
38184// It returns nil if no more results exist.
38185func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) {
38186	if !vntlr.hasNextLink() {
38187		return nil, nil
38188	}
38189	return autorest.Prepare((&http.Request{}).WithContext(ctx),
38190		autorest.AsJSON(),
38191		autorest.AsGet(),
38192		autorest.WithBaseURL(to.String(vntlr.NextLink)))
38193}
38194
38195// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values.
38196type VirtualNetworkTapListResultPage struct {
38197	fn    func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
38198	vntlr VirtualNetworkTapListResult
38199}
38200
38201// NextWithContext advances to the next page of values.  If there was an error making
38202// the request the page does not advance and the error is returned.
38203func (page *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) {
38204	if tracing.IsEnabled() {
38205		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.NextWithContext")
38206		defer func() {
38207			sc := -1
38208			if page.Response().Response.Response != nil {
38209				sc = page.Response().Response.Response.StatusCode
38210			}
38211			tracing.EndSpan(ctx, sc, err)
38212		}()
38213	}
38214	for {
38215		next, err := page.fn(ctx, page.vntlr)
38216		if err != nil {
38217			return err
38218		}
38219		page.vntlr = next
38220		if !next.hasNextLink() || !next.IsEmpty() {
38221			break
38222		}
38223	}
38224	return nil
38225}
38226
38227// Next advances to the next page of values.  If there was an error making
38228// the request the page does not advance and the error is returned.
38229// Deprecated: Use NextWithContext() instead.
38230func (page *VirtualNetworkTapListResultPage) Next() error {
38231	return page.NextWithContext(context.Background())
38232}
38233
38234// NotDone returns true if the page enumeration should be started or is not yet complete.
38235func (page VirtualNetworkTapListResultPage) NotDone() bool {
38236	return !page.vntlr.IsEmpty()
38237}
38238
38239// Response returns the raw server response from the last page request.
38240func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult {
38241	return page.vntlr
38242}
38243
38244// Values returns the slice of values for the current page or nil if there are no values.
38245func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap {
38246	if page.vntlr.IsEmpty() {
38247		return nil
38248	}
38249	return *page.vntlr.Value
38250}
38251
38252// Creates a new instance of the VirtualNetworkTapListResultPage type.
38253func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage {
38254	return VirtualNetworkTapListResultPage{
38255		fn:    getNextPage,
38256		vntlr: cur,
38257	}
38258}
38259
38260// VirtualNetworkTapPropertiesFormat virtual Network Tap properties.
38261type VirtualNetworkTapPropertiesFormat struct {
38262	// NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
38263	NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"`
38264	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network tap resource.
38265	ResourceGUID *string `json:"resourceGuid,omitempty"`
38266	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
38267	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
38268	// DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap.
38269	DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"`
38270	// DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap.
38271	DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"`
38272	// DestinationPort - The VXLAN destination port that will receive the tapped traffic.
38273	DestinationPort *int32 `json:"destinationPort,omitempty"`
38274}
38275
38276// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat.
38277func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) {
38278	objectMap := make(map[string]interface{})
38279	if vntpf.DestinationNetworkInterfaceIPConfiguration != nil {
38280		objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration
38281	}
38282	if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil {
38283		objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration
38284	}
38285	if vntpf.DestinationPort != nil {
38286		objectMap["destinationPort"] = vntpf.DestinationPort
38287	}
38288	return json.Marshal(objectMap)
38289}
38290
38291// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
38292// long-running operation.
38293type VirtualNetworkTapsCreateOrUpdateFuture struct {
38294	azure.FutureAPI
38295	// Result returns the result of the asynchronous operation.
38296	// If the operation has not completed it will return an error.
38297	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
38298}
38299
38300// UnmarshalJSON is the custom unmarshaller for CreateFuture.
38301func (future *VirtualNetworkTapsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
38302	var azFuture azure.Future
38303	if err := json.Unmarshal(body, &azFuture); err != nil {
38304		return err
38305	}
38306	future.FutureAPI = &azFuture
38307	future.Result = future.result
38308	return nil
38309}
38310
38311// result is the default implementation for VirtualNetworkTapsCreateOrUpdateFuture.Result.
38312func (future *VirtualNetworkTapsCreateOrUpdateFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
38313	var done bool
38314	done, err = future.DoneWithContext(context.Background(), client)
38315	if err != nil {
38316		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
38317		return
38318	}
38319	if !done {
38320		vnt.Response.Response = future.Response()
38321		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsCreateOrUpdateFuture")
38322		return
38323	}
38324	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
38325	if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
38326		vnt, err = client.CreateOrUpdateResponder(vnt.Response.Response)
38327		if err != nil {
38328			err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", vnt.Response.Response, "Failure responding to request")
38329		}
38330	}
38331	return
38332}
38333
38334// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a
38335// long-running operation.
38336type VirtualNetworkTapsDeleteFuture struct {
38337	azure.FutureAPI
38338	// Result returns the result of the asynchronous operation.
38339	// If the operation has not completed it will return an error.
38340	Result func(VirtualNetworkTapsClient) (autorest.Response, error)
38341}
38342
38343// UnmarshalJSON is the custom unmarshaller for CreateFuture.
38344func (future *VirtualNetworkTapsDeleteFuture) UnmarshalJSON(body []byte) error {
38345	var azFuture azure.Future
38346	if err := json.Unmarshal(body, &azFuture); err != nil {
38347		return err
38348	}
38349	future.FutureAPI = &azFuture
38350	future.Result = future.result
38351	return nil
38352}
38353
38354// result is the default implementation for VirtualNetworkTapsDeleteFuture.Result.
38355func (future *VirtualNetworkTapsDeleteFuture) result(client VirtualNetworkTapsClient) (ar autorest.Response, err error) {
38356	var done bool
38357	done, err = future.DoneWithContext(context.Background(), client)
38358	if err != nil {
38359		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsDeleteFuture", "Result", future.Response(), "Polling failure")
38360		return
38361	}
38362	if !done {
38363		ar.Response = future.Response()
38364		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsDeleteFuture")
38365		return
38366	}
38367	ar.Response = future.Response()
38368	return
38369}
38370
38371// VirtualNetworkUsage usage details for subnet.
38372type VirtualNetworkUsage struct {
38373	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
38374	CurrentValue *float64 `json:"currentValue,omitempty"`
38375	// ID - READ-ONLY; Subnet identifier.
38376	ID *string `json:"id,omitempty"`
38377	// Limit - READ-ONLY; Indicates the size of the subnet.
38378	Limit *float64 `json:"limit,omitempty"`
38379	// Name - READ-ONLY; The name containing common and localized value for usage.
38380	Name *VirtualNetworkUsageName `json:"name,omitempty"`
38381	// Unit - READ-ONLY; Usage units. Returns 'Count'.
38382	Unit *string `json:"unit,omitempty"`
38383}
38384
38385// MarshalJSON is the custom marshaler for VirtualNetworkUsage.
38386func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) {
38387	objectMap := make(map[string]interface{})
38388	return json.Marshal(objectMap)
38389}
38390
38391// VirtualNetworkUsageName usage strings container.
38392type VirtualNetworkUsageName struct {
38393	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
38394	LocalizedValue *string `json:"localizedValue,omitempty"`
38395	// Value - READ-ONLY; Subnet size and usage string.
38396	Value *string `json:"value,omitempty"`
38397}
38398
38399// MarshalJSON is the custom marshaler for VirtualNetworkUsageName.
38400func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) {
38401	objectMap := make(map[string]interface{})
38402	return json.Marshal(objectMap)
38403}
38404
38405// VirtualRouter virtualRouter Resource.
38406type VirtualRouter struct {
38407	autorest.Response `json:"-"`
38408	// VirtualRouterPropertiesFormat - Properties of the Virtual Router.
38409	*VirtualRouterPropertiesFormat `json:"properties,omitempty"`
38410	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
38411	Etag *string `json:"etag,omitempty"`
38412	// ID - Resource ID.
38413	ID *string `json:"id,omitempty"`
38414	// Name - READ-ONLY; Resource name.
38415	Name *string `json:"name,omitempty"`
38416	// Type - READ-ONLY; Resource type.
38417	Type *string `json:"type,omitempty"`
38418	// Location - Resource location.
38419	Location *string `json:"location,omitempty"`
38420	// Tags - Resource tags.
38421	Tags map[string]*string `json:"tags"`
38422}
38423
38424// MarshalJSON is the custom marshaler for VirtualRouter.
38425func (vr VirtualRouter) MarshalJSON() ([]byte, error) {
38426	objectMap := make(map[string]interface{})
38427	if vr.VirtualRouterPropertiesFormat != nil {
38428		objectMap["properties"] = vr.VirtualRouterPropertiesFormat
38429	}
38430	if vr.ID != nil {
38431		objectMap["id"] = vr.ID
38432	}
38433	if vr.Location != nil {
38434		objectMap["location"] = vr.Location
38435	}
38436	if vr.Tags != nil {
38437		objectMap["tags"] = vr.Tags
38438	}
38439	return json.Marshal(objectMap)
38440}
38441
38442// UnmarshalJSON is the custom unmarshaler for VirtualRouter struct.
38443func (vr *VirtualRouter) UnmarshalJSON(body []byte) error {
38444	var m map[string]*json.RawMessage
38445	err := json.Unmarshal(body, &m)
38446	if err != nil {
38447		return err
38448	}
38449	for k, v := range m {
38450		switch k {
38451		case "properties":
38452			if v != nil {
38453				var virtualRouterPropertiesFormat VirtualRouterPropertiesFormat
38454				err = json.Unmarshal(*v, &virtualRouterPropertiesFormat)
38455				if err != nil {
38456					return err
38457				}
38458				vr.VirtualRouterPropertiesFormat = &virtualRouterPropertiesFormat
38459			}
38460		case "etag":
38461			if v != nil {
38462				var etag string
38463				err = json.Unmarshal(*v, &etag)
38464				if err != nil {
38465					return err
38466				}
38467				vr.Etag = &etag
38468			}
38469		case "id":
38470			if v != nil {
38471				var ID string
38472				err = json.Unmarshal(*v, &ID)
38473				if err != nil {
38474					return err
38475				}
38476				vr.ID = &ID
38477			}
38478		case "name":
38479			if v != nil {
38480				var name string
38481				err = json.Unmarshal(*v, &name)
38482				if err != nil {
38483					return err
38484				}
38485				vr.Name = &name
38486			}
38487		case "type":
38488			if v != nil {
38489				var typeVar string
38490				err = json.Unmarshal(*v, &typeVar)
38491				if err != nil {
38492					return err
38493				}
38494				vr.Type = &typeVar
38495			}
38496		case "location":
38497			if v != nil {
38498				var location string
38499				err = json.Unmarshal(*v, &location)
38500				if err != nil {
38501					return err
38502				}
38503				vr.Location = &location
38504			}
38505		case "tags":
38506			if v != nil {
38507				var tags map[string]*string
38508				err = json.Unmarshal(*v, &tags)
38509				if err != nil {
38510					return err
38511				}
38512				vr.Tags = tags
38513			}
38514		}
38515	}
38516
38517	return nil
38518}
38519
38520// VirtualRouterListResult response for ListVirtualRouters API service call.
38521type VirtualRouterListResult struct {
38522	autorest.Response `json:"-"`
38523	// Value - List of Virtual Routers.
38524	Value *[]VirtualRouter `json:"value,omitempty"`
38525	// NextLink - URL to get the next set of results.
38526	NextLink *string `json:"nextLink,omitempty"`
38527}
38528
38529// VirtualRouterListResultIterator provides access to a complete listing of VirtualRouter values.
38530type VirtualRouterListResultIterator struct {
38531	i    int
38532	page VirtualRouterListResultPage
38533}
38534
38535// NextWithContext advances to the next value.  If there was an error making
38536// the request the iterator does not advance and the error is returned.
38537func (iter *VirtualRouterListResultIterator) NextWithContext(ctx context.Context) (err error) {
38538	if tracing.IsEnabled() {
38539		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterListResultIterator.NextWithContext")
38540		defer func() {
38541			sc := -1
38542			if iter.Response().Response.Response != nil {
38543				sc = iter.Response().Response.Response.StatusCode
38544			}
38545			tracing.EndSpan(ctx, sc, err)
38546		}()
38547	}
38548	iter.i++
38549	if iter.i < len(iter.page.Values()) {
38550		return nil
38551	}
38552	err = iter.page.NextWithContext(ctx)
38553	if err != nil {
38554		iter.i--
38555		return err
38556	}
38557	iter.i = 0
38558	return nil
38559}
38560
38561// Next advances to the next value.  If there was an error making
38562// the request the iterator does not advance and the error is returned.
38563// Deprecated: Use NextWithContext() instead.
38564func (iter *VirtualRouterListResultIterator) Next() error {
38565	return iter.NextWithContext(context.Background())
38566}
38567
38568// NotDone returns true if the enumeration should be started or is not yet complete.
38569func (iter VirtualRouterListResultIterator) NotDone() bool {
38570	return iter.page.NotDone() && iter.i < len(iter.page.Values())
38571}
38572
38573// Response returns the raw server response from the last page request.
38574func (iter VirtualRouterListResultIterator) Response() VirtualRouterListResult {
38575	return iter.page.Response()
38576}
38577
38578// Value returns the current value or a zero-initialized value if the
38579// iterator has advanced beyond the end of the collection.
38580func (iter VirtualRouterListResultIterator) Value() VirtualRouter {
38581	if !iter.page.NotDone() {
38582		return VirtualRouter{}
38583	}
38584	return iter.page.Values()[iter.i]
38585}
38586
38587// Creates a new instance of the VirtualRouterListResultIterator type.
38588func NewVirtualRouterListResultIterator(page VirtualRouterListResultPage) VirtualRouterListResultIterator {
38589	return VirtualRouterListResultIterator{page: page}
38590}
38591
38592// IsEmpty returns true if the ListResult contains no values.
38593func (vrlr VirtualRouterListResult) IsEmpty() bool {
38594	return vrlr.Value == nil || len(*vrlr.Value) == 0
38595}
38596
38597// hasNextLink returns true if the NextLink is not empty.
38598func (vrlr VirtualRouterListResult) hasNextLink() bool {
38599	return vrlr.NextLink != nil && len(*vrlr.NextLink) != 0
38600}
38601
38602// virtualRouterListResultPreparer prepares a request to retrieve the next set of results.
38603// It returns nil if no more results exist.
38604func (vrlr VirtualRouterListResult) virtualRouterListResultPreparer(ctx context.Context) (*http.Request, error) {
38605	if !vrlr.hasNextLink() {
38606		return nil, nil
38607	}
38608	return autorest.Prepare((&http.Request{}).WithContext(ctx),
38609		autorest.AsJSON(),
38610		autorest.AsGet(),
38611		autorest.WithBaseURL(to.String(vrlr.NextLink)))
38612}
38613
38614// VirtualRouterListResultPage contains a page of VirtualRouter values.
38615type VirtualRouterListResultPage struct {
38616	fn   func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error)
38617	vrlr VirtualRouterListResult
38618}
38619
38620// NextWithContext advances to the next page of values.  If there was an error making
38621// the request the page does not advance and the error is returned.
38622func (page *VirtualRouterListResultPage) NextWithContext(ctx context.Context) (err error) {
38623	if tracing.IsEnabled() {
38624		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterListResultPage.NextWithContext")
38625		defer func() {
38626			sc := -1
38627			if page.Response().Response.Response != nil {
38628				sc = page.Response().Response.Response.StatusCode
38629			}
38630			tracing.EndSpan(ctx, sc, err)
38631		}()
38632	}
38633	for {
38634		next, err := page.fn(ctx, page.vrlr)
38635		if err != nil {
38636			return err
38637		}
38638		page.vrlr = next
38639		if !next.hasNextLink() || !next.IsEmpty() {
38640			break
38641		}
38642	}
38643	return nil
38644}
38645
38646// Next advances to the next page of values.  If there was an error making
38647// the request the page does not advance and the error is returned.
38648// Deprecated: Use NextWithContext() instead.
38649func (page *VirtualRouterListResultPage) Next() error {
38650	return page.NextWithContext(context.Background())
38651}
38652
38653// NotDone returns true if the page enumeration should be started or is not yet complete.
38654func (page VirtualRouterListResultPage) NotDone() bool {
38655	return !page.vrlr.IsEmpty()
38656}
38657
38658// Response returns the raw server response from the last page request.
38659func (page VirtualRouterListResultPage) Response() VirtualRouterListResult {
38660	return page.vrlr
38661}
38662
38663// Values returns the slice of values for the current page or nil if there are no values.
38664func (page VirtualRouterListResultPage) Values() []VirtualRouter {
38665	if page.vrlr.IsEmpty() {
38666		return nil
38667	}
38668	return *page.vrlr.Value
38669}
38670
38671// Creates a new instance of the VirtualRouterListResultPage type.
38672func NewVirtualRouterListResultPage(cur VirtualRouterListResult, getNextPage func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error)) VirtualRouterListResultPage {
38673	return VirtualRouterListResultPage{
38674		fn:   getNextPage,
38675		vrlr: cur,
38676	}
38677}
38678
38679// VirtualRouterPeering virtual Router Peering resource.
38680type VirtualRouterPeering struct {
38681	autorest.Response `json:"-"`
38682	// VirtualRouterPeeringProperties - The properties of the Virtual Router Peering.
38683	*VirtualRouterPeeringProperties `json:"properties,omitempty"`
38684	// Name - Name of the virtual router peering that is unique within a virtual router.
38685	Name *string `json:"name,omitempty"`
38686	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
38687	Etag *string `json:"etag,omitempty"`
38688	// Type - READ-ONLY; Peering type.
38689	Type *string `json:"type,omitempty"`
38690	// ID - Resource ID.
38691	ID *string `json:"id,omitempty"`
38692}
38693
38694// MarshalJSON is the custom marshaler for VirtualRouterPeering.
38695func (vrp VirtualRouterPeering) MarshalJSON() ([]byte, error) {
38696	objectMap := make(map[string]interface{})
38697	if vrp.VirtualRouterPeeringProperties != nil {
38698		objectMap["properties"] = vrp.VirtualRouterPeeringProperties
38699	}
38700	if vrp.Name != nil {
38701		objectMap["name"] = vrp.Name
38702	}
38703	if vrp.ID != nil {
38704		objectMap["id"] = vrp.ID
38705	}
38706	return json.Marshal(objectMap)
38707}
38708
38709// UnmarshalJSON is the custom unmarshaler for VirtualRouterPeering struct.
38710func (vrp *VirtualRouterPeering) UnmarshalJSON(body []byte) error {
38711	var m map[string]*json.RawMessage
38712	err := json.Unmarshal(body, &m)
38713	if err != nil {
38714		return err
38715	}
38716	for k, v := range m {
38717		switch k {
38718		case "properties":
38719			if v != nil {
38720				var virtualRouterPeeringProperties VirtualRouterPeeringProperties
38721				err = json.Unmarshal(*v, &virtualRouterPeeringProperties)
38722				if err != nil {
38723					return err
38724				}
38725				vrp.VirtualRouterPeeringProperties = &virtualRouterPeeringProperties
38726			}
38727		case "name":
38728			if v != nil {
38729				var name string
38730				err = json.Unmarshal(*v, &name)
38731				if err != nil {
38732					return err
38733				}
38734				vrp.Name = &name
38735			}
38736		case "etag":
38737			if v != nil {
38738				var etag string
38739				err = json.Unmarshal(*v, &etag)
38740				if err != nil {
38741					return err
38742				}
38743				vrp.Etag = &etag
38744			}
38745		case "type":
38746			if v != nil {
38747				var typeVar string
38748				err = json.Unmarshal(*v, &typeVar)
38749				if err != nil {
38750					return err
38751				}
38752				vrp.Type = &typeVar
38753			}
38754		case "id":
38755			if v != nil {
38756				var ID string
38757				err = json.Unmarshal(*v, &ID)
38758				if err != nil {
38759					return err
38760				}
38761				vrp.ID = &ID
38762			}
38763		}
38764	}
38765
38766	return nil
38767}
38768
38769// VirtualRouterPeeringListResult response for ListVirtualRouterPeerings API service call.
38770type VirtualRouterPeeringListResult struct {
38771	autorest.Response `json:"-"`
38772	// Value - List of VirtualRouterPeerings in a VirtualRouter.
38773	Value *[]VirtualRouterPeering `json:"value,omitempty"`
38774	// NextLink - URL to get the next set of results.
38775	NextLink *string `json:"nextLink,omitempty"`
38776}
38777
38778// VirtualRouterPeeringListResultIterator provides access to a complete listing of VirtualRouterPeering
38779// values.
38780type VirtualRouterPeeringListResultIterator struct {
38781	i    int
38782	page VirtualRouterPeeringListResultPage
38783}
38784
38785// NextWithContext advances to the next value.  If there was an error making
38786// the request the iterator does not advance and the error is returned.
38787func (iter *VirtualRouterPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
38788	if tracing.IsEnabled() {
38789		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringListResultIterator.NextWithContext")
38790		defer func() {
38791			sc := -1
38792			if iter.Response().Response.Response != nil {
38793				sc = iter.Response().Response.Response.StatusCode
38794			}
38795			tracing.EndSpan(ctx, sc, err)
38796		}()
38797	}
38798	iter.i++
38799	if iter.i < len(iter.page.Values()) {
38800		return nil
38801	}
38802	err = iter.page.NextWithContext(ctx)
38803	if err != nil {
38804		iter.i--
38805		return err
38806	}
38807	iter.i = 0
38808	return nil
38809}
38810
38811// Next advances to the next value.  If there was an error making
38812// the request the iterator does not advance and the error is returned.
38813// Deprecated: Use NextWithContext() instead.
38814func (iter *VirtualRouterPeeringListResultIterator) Next() error {
38815	return iter.NextWithContext(context.Background())
38816}
38817
38818// NotDone returns true if the enumeration should be started or is not yet complete.
38819func (iter VirtualRouterPeeringListResultIterator) NotDone() bool {
38820	return iter.page.NotDone() && iter.i < len(iter.page.Values())
38821}
38822
38823// Response returns the raw server response from the last page request.
38824func (iter VirtualRouterPeeringListResultIterator) Response() VirtualRouterPeeringListResult {
38825	return iter.page.Response()
38826}
38827
38828// Value returns the current value or a zero-initialized value if the
38829// iterator has advanced beyond the end of the collection.
38830func (iter VirtualRouterPeeringListResultIterator) Value() VirtualRouterPeering {
38831	if !iter.page.NotDone() {
38832		return VirtualRouterPeering{}
38833	}
38834	return iter.page.Values()[iter.i]
38835}
38836
38837// Creates a new instance of the VirtualRouterPeeringListResultIterator type.
38838func NewVirtualRouterPeeringListResultIterator(page VirtualRouterPeeringListResultPage) VirtualRouterPeeringListResultIterator {
38839	return VirtualRouterPeeringListResultIterator{page: page}
38840}
38841
38842// IsEmpty returns true if the ListResult contains no values.
38843func (vrplr VirtualRouterPeeringListResult) IsEmpty() bool {
38844	return vrplr.Value == nil || len(*vrplr.Value) == 0
38845}
38846
38847// hasNextLink returns true if the NextLink is not empty.
38848func (vrplr VirtualRouterPeeringListResult) hasNextLink() bool {
38849	return vrplr.NextLink != nil && len(*vrplr.NextLink) != 0
38850}
38851
38852// virtualRouterPeeringListResultPreparer prepares a request to retrieve the next set of results.
38853// It returns nil if no more results exist.
38854func (vrplr VirtualRouterPeeringListResult) virtualRouterPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
38855	if !vrplr.hasNextLink() {
38856		return nil, nil
38857	}
38858	return autorest.Prepare((&http.Request{}).WithContext(ctx),
38859		autorest.AsJSON(),
38860		autorest.AsGet(),
38861		autorest.WithBaseURL(to.String(vrplr.NextLink)))
38862}
38863
38864// VirtualRouterPeeringListResultPage contains a page of VirtualRouterPeering values.
38865type VirtualRouterPeeringListResultPage struct {
38866	fn    func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error)
38867	vrplr VirtualRouterPeeringListResult
38868}
38869
38870// NextWithContext advances to the next page of values.  If there was an error making
38871// the request the page does not advance and the error is returned.
38872func (page *VirtualRouterPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
38873	if tracing.IsEnabled() {
38874		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringListResultPage.NextWithContext")
38875		defer func() {
38876			sc := -1
38877			if page.Response().Response.Response != nil {
38878				sc = page.Response().Response.Response.StatusCode
38879			}
38880			tracing.EndSpan(ctx, sc, err)
38881		}()
38882	}
38883	for {
38884		next, err := page.fn(ctx, page.vrplr)
38885		if err != nil {
38886			return err
38887		}
38888		page.vrplr = next
38889		if !next.hasNextLink() || !next.IsEmpty() {
38890			break
38891		}
38892	}
38893	return nil
38894}
38895
38896// Next advances to the next page of values.  If there was an error making
38897// the request the page does not advance and the error is returned.
38898// Deprecated: Use NextWithContext() instead.
38899func (page *VirtualRouterPeeringListResultPage) Next() error {
38900	return page.NextWithContext(context.Background())
38901}
38902
38903// NotDone returns true if the page enumeration should be started or is not yet complete.
38904func (page VirtualRouterPeeringListResultPage) NotDone() bool {
38905	return !page.vrplr.IsEmpty()
38906}
38907
38908// Response returns the raw server response from the last page request.
38909func (page VirtualRouterPeeringListResultPage) Response() VirtualRouterPeeringListResult {
38910	return page.vrplr
38911}
38912
38913// Values returns the slice of values for the current page or nil if there are no values.
38914func (page VirtualRouterPeeringListResultPage) Values() []VirtualRouterPeering {
38915	if page.vrplr.IsEmpty() {
38916		return nil
38917	}
38918	return *page.vrplr.Value
38919}
38920
38921// Creates a new instance of the VirtualRouterPeeringListResultPage type.
38922func NewVirtualRouterPeeringListResultPage(cur VirtualRouterPeeringListResult, getNextPage func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error)) VirtualRouterPeeringListResultPage {
38923	return VirtualRouterPeeringListResultPage{
38924		fn:    getNextPage,
38925		vrplr: cur,
38926	}
38927}
38928
38929// VirtualRouterPeeringProperties properties of the rule group.
38930type VirtualRouterPeeringProperties struct {
38931	// PeerAsn - Peer ASN.
38932	PeerAsn *int64 `json:"peerAsn,omitempty"`
38933	// PeerIP - Peer IP.
38934	PeerIP *string `json:"peerIp,omitempty"`
38935	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
38936	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
38937}
38938
38939// MarshalJSON is the custom marshaler for VirtualRouterPeeringProperties.
38940func (vrpp VirtualRouterPeeringProperties) MarshalJSON() ([]byte, error) {
38941	objectMap := make(map[string]interface{})
38942	if vrpp.PeerAsn != nil {
38943		objectMap["peerAsn"] = vrpp.PeerAsn
38944	}
38945	if vrpp.PeerIP != nil {
38946		objectMap["peerIp"] = vrpp.PeerIP
38947	}
38948	return json.Marshal(objectMap)
38949}
38950
38951// VirtualRouterPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
38952// long-running operation.
38953type VirtualRouterPeeringsCreateOrUpdateFuture struct {
38954	azure.FutureAPI
38955	// Result returns the result of the asynchronous operation.
38956	// If the operation has not completed it will return an error.
38957	Result func(VirtualRouterPeeringsClient) (VirtualRouterPeering, error)
38958}
38959
38960// UnmarshalJSON is the custom unmarshaller for CreateFuture.
38961func (future *VirtualRouterPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
38962	var azFuture azure.Future
38963	if err := json.Unmarshal(body, &azFuture); err != nil {
38964		return err
38965	}
38966	future.FutureAPI = &azFuture
38967	future.Result = future.result
38968	return nil
38969}
38970
38971// result is the default implementation for VirtualRouterPeeringsCreateOrUpdateFuture.Result.
38972func (future *VirtualRouterPeeringsCreateOrUpdateFuture) result(client VirtualRouterPeeringsClient) (vrp VirtualRouterPeering, err error) {
38973	var done bool
38974	done, err = future.DoneWithContext(context.Background(), client)
38975	if err != nil {
38976		err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
38977		return
38978	}
38979	if !done {
38980		vrp.Response.Response = future.Response()
38981		err = azure.NewAsyncOpIncompleteError("network.VirtualRouterPeeringsCreateOrUpdateFuture")
38982		return
38983	}
38984	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
38985	if vrp.Response.Response, err = future.GetResult(sender); err == nil && vrp.Response.Response.StatusCode != http.StatusNoContent {
38986		vrp, err = client.CreateOrUpdateResponder(vrp.Response.Response)
38987		if err != nil {
38988			err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsCreateOrUpdateFuture", "Result", vrp.Response.Response, "Failure responding to request")
38989		}
38990	}
38991	return
38992}
38993
38994// VirtualRouterPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
38995// long-running operation.
38996type VirtualRouterPeeringsDeleteFuture struct {
38997	azure.FutureAPI
38998	// Result returns the result of the asynchronous operation.
38999	// If the operation has not completed it will return an error.
39000	Result func(VirtualRouterPeeringsClient) (autorest.Response, error)
39001}
39002
39003// UnmarshalJSON is the custom unmarshaller for CreateFuture.
39004func (future *VirtualRouterPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
39005	var azFuture azure.Future
39006	if err := json.Unmarshal(body, &azFuture); err != nil {
39007		return err
39008	}
39009	future.FutureAPI = &azFuture
39010	future.Result = future.result
39011	return nil
39012}
39013
39014// result is the default implementation for VirtualRouterPeeringsDeleteFuture.Result.
39015func (future *VirtualRouterPeeringsDeleteFuture) result(client VirtualRouterPeeringsClient) (ar autorest.Response, err error) {
39016	var done bool
39017	done, err = future.DoneWithContext(context.Background(), client)
39018	if err != nil {
39019		err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
39020		return
39021	}
39022	if !done {
39023		ar.Response = future.Response()
39024		err = azure.NewAsyncOpIncompleteError("network.VirtualRouterPeeringsDeleteFuture")
39025		return
39026	}
39027	ar.Response = future.Response()
39028	return
39029}
39030
39031// VirtualRouterPropertiesFormat virtual Router definition.
39032type VirtualRouterPropertiesFormat struct {
39033	// VirtualRouterAsn - VirtualRouter ASN.
39034	VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"`
39035	// VirtualRouterIps - VirtualRouter IPs.
39036	VirtualRouterIps *[]string `json:"virtualRouterIps,omitempty"`
39037	// HostedSubnet - The Subnet on which VirtualRouter is hosted.
39038	HostedSubnet *SubResource `json:"hostedSubnet,omitempty"`
39039	// HostedGateway - The Gateway on which VirtualRouter is hosted.
39040	HostedGateway *SubResource `json:"hostedGateway,omitempty"`
39041	// Peerings - READ-ONLY; List of references to VirtualRouterPeerings.
39042	Peerings *[]SubResource `json:"peerings,omitempty"`
39043	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
39044	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
39045}
39046
39047// MarshalJSON is the custom marshaler for VirtualRouterPropertiesFormat.
39048func (vrpf VirtualRouterPropertiesFormat) MarshalJSON() ([]byte, error) {
39049	objectMap := make(map[string]interface{})
39050	if vrpf.VirtualRouterAsn != nil {
39051		objectMap["virtualRouterAsn"] = vrpf.VirtualRouterAsn
39052	}
39053	if vrpf.VirtualRouterIps != nil {
39054		objectMap["virtualRouterIps"] = vrpf.VirtualRouterIps
39055	}
39056	if vrpf.HostedSubnet != nil {
39057		objectMap["hostedSubnet"] = vrpf.HostedSubnet
39058	}
39059	if vrpf.HostedGateway != nil {
39060		objectMap["hostedGateway"] = vrpf.HostedGateway
39061	}
39062	return json.Marshal(objectMap)
39063}
39064
39065// VirtualRoutersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
39066// long-running operation.
39067type VirtualRoutersCreateOrUpdateFuture struct {
39068	azure.FutureAPI
39069	// Result returns the result of the asynchronous operation.
39070	// If the operation has not completed it will return an error.
39071	Result func(VirtualRoutersClient) (VirtualRouter, error)
39072}
39073
39074// UnmarshalJSON is the custom unmarshaller for CreateFuture.
39075func (future *VirtualRoutersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
39076	var azFuture azure.Future
39077	if err := json.Unmarshal(body, &azFuture); err != nil {
39078		return err
39079	}
39080	future.FutureAPI = &azFuture
39081	future.Result = future.result
39082	return nil
39083}
39084
39085// result is the default implementation for VirtualRoutersCreateOrUpdateFuture.Result.
39086func (future *VirtualRoutersCreateOrUpdateFuture) result(client VirtualRoutersClient) (vr VirtualRouter, err error) {
39087	var done bool
39088	done, err = future.DoneWithContext(context.Background(), client)
39089	if err != nil {
39090		err = autorest.NewErrorWithError(err, "network.VirtualRoutersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
39091		return
39092	}
39093	if !done {
39094		vr.Response.Response = future.Response()
39095		err = azure.NewAsyncOpIncompleteError("network.VirtualRoutersCreateOrUpdateFuture")
39096		return
39097	}
39098	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
39099	if vr.Response.Response, err = future.GetResult(sender); err == nil && vr.Response.Response.StatusCode != http.StatusNoContent {
39100		vr, err = client.CreateOrUpdateResponder(vr.Response.Response)
39101		if err != nil {
39102			err = autorest.NewErrorWithError(err, "network.VirtualRoutersCreateOrUpdateFuture", "Result", vr.Response.Response, "Failure responding to request")
39103		}
39104	}
39105	return
39106}
39107
39108// VirtualRoutersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
39109// operation.
39110type VirtualRoutersDeleteFuture struct {
39111	azure.FutureAPI
39112	// Result returns the result of the asynchronous operation.
39113	// If the operation has not completed it will return an error.
39114	Result func(VirtualRoutersClient) (autorest.Response, error)
39115}
39116
39117// UnmarshalJSON is the custom unmarshaller for CreateFuture.
39118func (future *VirtualRoutersDeleteFuture) UnmarshalJSON(body []byte) error {
39119	var azFuture azure.Future
39120	if err := json.Unmarshal(body, &azFuture); err != nil {
39121		return err
39122	}
39123	future.FutureAPI = &azFuture
39124	future.Result = future.result
39125	return nil
39126}
39127
39128// result is the default implementation for VirtualRoutersDeleteFuture.Result.
39129func (future *VirtualRoutersDeleteFuture) result(client VirtualRoutersClient) (ar autorest.Response, err error) {
39130	var done bool
39131	done, err = future.DoneWithContext(context.Background(), client)
39132	if err != nil {
39133		err = autorest.NewErrorWithError(err, "network.VirtualRoutersDeleteFuture", "Result", future.Response(), "Polling failure")
39134		return
39135	}
39136	if !done {
39137		ar.Response = future.Response()
39138		err = azure.NewAsyncOpIncompleteError("network.VirtualRoutersDeleteFuture")
39139		return
39140	}
39141	ar.Response = future.Response()
39142	return
39143}
39144
39145// VirtualWAN virtualWAN Resource.
39146type VirtualWAN struct {
39147	autorest.Response `json:"-"`
39148	// VirtualWanProperties - Properties of the virtual WAN.
39149	*VirtualWanProperties `json:"properties,omitempty"`
39150	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
39151	Etag *string `json:"etag,omitempty"`
39152	// ID - Resource ID.
39153	ID *string `json:"id,omitempty"`
39154	// Name - READ-ONLY; Resource name.
39155	Name *string `json:"name,omitempty"`
39156	// Type - READ-ONLY; Resource type.
39157	Type *string `json:"type,omitempty"`
39158	// Location - Resource location.
39159	Location *string `json:"location,omitempty"`
39160	// Tags - Resource tags.
39161	Tags map[string]*string `json:"tags"`
39162}
39163
39164// MarshalJSON is the custom marshaler for VirtualWAN.
39165func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
39166	objectMap := make(map[string]interface{})
39167	if vw.VirtualWanProperties != nil {
39168		objectMap["properties"] = vw.VirtualWanProperties
39169	}
39170	if vw.ID != nil {
39171		objectMap["id"] = vw.ID
39172	}
39173	if vw.Location != nil {
39174		objectMap["location"] = vw.Location
39175	}
39176	if vw.Tags != nil {
39177		objectMap["tags"] = vw.Tags
39178	}
39179	return json.Marshal(objectMap)
39180}
39181
39182// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
39183func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
39184	var m map[string]*json.RawMessage
39185	err := json.Unmarshal(body, &m)
39186	if err != nil {
39187		return err
39188	}
39189	for k, v := range m {
39190		switch k {
39191		case "properties":
39192			if v != nil {
39193				var virtualWanProperties VirtualWanProperties
39194				err = json.Unmarshal(*v, &virtualWanProperties)
39195				if err != nil {
39196					return err
39197				}
39198				vw.VirtualWanProperties = &virtualWanProperties
39199			}
39200		case "etag":
39201			if v != nil {
39202				var etag string
39203				err = json.Unmarshal(*v, &etag)
39204				if err != nil {
39205					return err
39206				}
39207				vw.Etag = &etag
39208			}
39209		case "id":
39210			if v != nil {
39211				var ID string
39212				err = json.Unmarshal(*v, &ID)
39213				if err != nil {
39214					return err
39215				}
39216				vw.ID = &ID
39217			}
39218		case "name":
39219			if v != nil {
39220				var name string
39221				err = json.Unmarshal(*v, &name)
39222				if err != nil {
39223					return err
39224				}
39225				vw.Name = &name
39226			}
39227		case "type":
39228			if v != nil {
39229				var typeVar string
39230				err = json.Unmarshal(*v, &typeVar)
39231				if err != nil {
39232					return err
39233				}
39234				vw.Type = &typeVar
39235			}
39236		case "location":
39237			if v != nil {
39238				var location string
39239				err = json.Unmarshal(*v, &location)
39240				if err != nil {
39241					return err
39242				}
39243				vw.Location = &location
39244			}
39245		case "tags":
39246			if v != nil {
39247				var tags map[string]*string
39248				err = json.Unmarshal(*v, &tags)
39249				if err != nil {
39250					return err
39251				}
39252				vw.Tags = tags
39253			}
39254		}
39255	}
39256
39257	return nil
39258}
39259
39260// VirtualWanProperties parameters for VirtualWAN.
39261type VirtualWanProperties struct {
39262	// DisableVpnEncryption - Vpn encryption to be disabled or not.
39263	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
39264	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
39265	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
39266	// VpnSites - READ-ONLY; List of VpnSites in the VirtualWAN.
39267	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
39268	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
39269	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
39270	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
39271	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
39272	// Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone'
39273	Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"`
39274	// ProvisioningState - READ-ONLY; The provisioning state of the virtual WAN resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
39275	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
39276	// Type - The type of the VirtualWAN.
39277	Type *string `json:"type,omitempty"`
39278}
39279
39280// MarshalJSON is the custom marshaler for VirtualWanProperties.
39281func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
39282	objectMap := make(map[string]interface{})
39283	if vwp.DisableVpnEncryption != nil {
39284		objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
39285	}
39286	if vwp.AllowBranchToBranchTraffic != nil {
39287		objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic
39288	}
39289	if vwp.AllowVnetToVnetTraffic != nil {
39290		objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic
39291	}
39292	if vwp.Office365LocalBreakoutCategory != "" {
39293		objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory
39294	}
39295	if vwp.Type != nil {
39296		objectMap["type"] = vwp.Type
39297	}
39298	return json.Marshal(objectMap)
39299}
39300
39301// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
39302// long-running operation.
39303type VirtualWansCreateOrUpdateFuture struct {
39304	azure.FutureAPI
39305	// Result returns the result of the asynchronous operation.
39306	// If the operation has not completed it will return an error.
39307	Result func(VirtualWansClient) (VirtualWAN, error)
39308}
39309
39310// UnmarshalJSON is the custom unmarshaller for CreateFuture.
39311func (future *VirtualWansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
39312	var azFuture azure.Future
39313	if err := json.Unmarshal(body, &azFuture); err != nil {
39314		return err
39315	}
39316	future.FutureAPI = &azFuture
39317	future.Result = future.result
39318	return nil
39319}
39320
39321// result is the default implementation for VirtualWansCreateOrUpdateFuture.Result.
39322func (future *VirtualWansCreateOrUpdateFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
39323	var done bool
39324	done, err = future.DoneWithContext(context.Background(), client)
39325	if err != nil {
39326		err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
39327		return
39328	}
39329	if !done {
39330		vw.Response.Response = future.Response()
39331		err = azure.NewAsyncOpIncompleteError("network.VirtualWansCreateOrUpdateFuture")
39332		return
39333	}
39334	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
39335	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
39336		vw, err = client.CreateOrUpdateResponder(vw.Response.Response)
39337		if err != nil {
39338			err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request")
39339		}
39340	}
39341	return
39342}
39343
39344// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
39345// operation.
39346type VirtualWansDeleteFuture struct {
39347	azure.FutureAPI
39348	// Result returns the result of the asynchronous operation.
39349	// If the operation has not completed it will return an error.
39350	Result func(VirtualWansClient) (autorest.Response, error)
39351}
39352
39353// UnmarshalJSON is the custom unmarshaller for CreateFuture.
39354func (future *VirtualWansDeleteFuture) UnmarshalJSON(body []byte) error {
39355	var azFuture azure.Future
39356	if err := json.Unmarshal(body, &azFuture); err != nil {
39357		return err
39358	}
39359	future.FutureAPI = &azFuture
39360	future.Result = future.result
39361	return nil
39362}
39363
39364// result is the default implementation for VirtualWansDeleteFuture.Result.
39365func (future *VirtualWansDeleteFuture) result(client VirtualWansClient) (ar autorest.Response, err error) {
39366	var done bool
39367	done, err = future.DoneWithContext(context.Background(), client)
39368	if err != nil {
39369		err = autorest.NewErrorWithError(err, "network.VirtualWansDeleteFuture", "Result", future.Response(), "Polling failure")
39370		return
39371	}
39372	if !done {
39373		ar.Response = future.Response()
39374		err = azure.NewAsyncOpIncompleteError("network.VirtualWansDeleteFuture")
39375		return
39376	}
39377	ar.Response = future.Response()
39378	return
39379}
39380
39381// VirtualWanSecurityProvider collection of SecurityProviders.
39382type VirtualWanSecurityProvider struct {
39383	// Name - Name of the security provider.
39384	Name *string `json:"name,omitempty"`
39385	// URL - Url of the security provider.
39386	URL *string `json:"url,omitempty"`
39387	// Type - Name of the security provider. Possible values include: 'External', 'Native'
39388	Type VirtualWanSecurityProviderType `json:"type,omitempty"`
39389}
39390
39391// VirtualWanSecurityProviders collection of SecurityProviders.
39392type VirtualWanSecurityProviders struct {
39393	autorest.Response `json:"-"`
39394	// SupportedProviders - List of VirtualWAN security providers.
39395	SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"`
39396}
39397
39398// VirtualWanVpnProfileParameters virtual Wan Vpn profile parameters Vpn profile generation.
39399type VirtualWanVpnProfileParameters struct {
39400	// VpnServerConfigurationResourceID - VpnServerConfiguration partial resource uri with which VirtualWan is associated to.
39401	VpnServerConfigurationResourceID *string `json:"vpnServerConfigurationResourceId,omitempty"`
39402	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
39403	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
39404}
39405
39406// VM describes a Virtual Machine.
39407type VM struct {
39408	// ID - Resource ID.
39409	ID *string `json:"id,omitempty"`
39410	// Name - READ-ONLY; Resource name.
39411	Name *string `json:"name,omitempty"`
39412	// Type - READ-ONLY; Resource type.
39413	Type *string `json:"type,omitempty"`
39414	// Location - Resource location.
39415	Location *string `json:"location,omitempty"`
39416	// Tags - Resource tags.
39417	Tags map[string]*string `json:"tags"`
39418}
39419
39420// MarshalJSON is the custom marshaler for VM.
39421func (vVar VM) MarshalJSON() ([]byte, error) {
39422	objectMap := make(map[string]interface{})
39423	if vVar.ID != nil {
39424		objectMap["id"] = vVar.ID
39425	}
39426	if vVar.Location != nil {
39427		objectMap["location"] = vVar.Location
39428	}
39429	if vVar.Tags != nil {
39430		objectMap["tags"] = vVar.Tags
39431	}
39432	return json.Marshal(objectMap)
39433}
39434
39435// VpnClientConfiguration vpnClientConfiguration for P2S client.
39436type VpnClientConfiguration struct {
39437	// VpnClientAddressPool - The reference to the address space resource which represents Address space for P2S VpnClient.
39438	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
39439	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
39440	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
39441	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
39442	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
39443	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
39444	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
39445	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
39446	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
39447	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
39448	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
39449	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
39450	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
39451	// RadiusServers - The radiusServers property for multiple radius server configuration.
39452	RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"`
39453	// AadTenant - The AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
39454	AadTenant *string `json:"aadTenant,omitempty"`
39455	// AadAudience - The AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
39456	AadAudience *string `json:"aadAudience,omitempty"`
39457	// AadIssuer - The AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
39458	AadIssuer *string `json:"aadIssuer,omitempty"`
39459}
39460
39461// VpnClientConnectionHealth vpnClientConnectionHealth properties.
39462type VpnClientConnectionHealth struct {
39463	// TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection.
39464	TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"`
39465	// TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection.
39466	TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"`
39467	// VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway.
39468	VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"`
39469	// AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients.
39470	AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"`
39471}
39472
39473// MarshalJSON is the custom marshaler for VpnClientConnectionHealth.
39474func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) {
39475	objectMap := make(map[string]interface{})
39476	if vcch.VpnClientConnectionsCount != nil {
39477		objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount
39478	}
39479	if vcch.AllocatedIPAddresses != nil {
39480		objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses
39481	}
39482	return json.Marshal(objectMap)
39483}
39484
39485// VpnClientConnectionHealthDetail VPN client connection health detail.
39486type VpnClientConnectionHealthDetail struct {
39487	// VpnConnectionID - READ-ONLY; The vpn client Id.
39488	VpnConnectionID *string `json:"vpnConnectionId,omitempty"`
39489	// VpnConnectionDuration - READ-ONLY; The duration time of a connected vpn client.
39490	VpnConnectionDuration *int64 `json:"vpnConnectionDuration,omitempty"`
39491	// VpnConnectionTime - READ-ONLY; The start time of a connected vpn client.
39492	VpnConnectionTime *string `json:"vpnConnectionTime,omitempty"`
39493	// PublicIPAddress - READ-ONLY; The public Ip of a connected vpn client.
39494	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
39495	// PrivateIPAddress - READ-ONLY; The assigned private Ip of a connected vpn client.
39496	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
39497	// VpnUserName - READ-ONLY; The user name of a connected vpn client.
39498	VpnUserName *string `json:"vpnUserName,omitempty"`
39499	// MaxBandwidth - READ-ONLY; The max band width.
39500	MaxBandwidth *int64 `json:"maxBandwidth,omitempty"`
39501	// EgressPacketsTransferred - READ-ONLY; The egress packets per second.
39502	EgressPacketsTransferred *int64 `json:"egressPacketsTransferred,omitempty"`
39503	// EgressBytesTransferred - READ-ONLY; The egress bytes per second.
39504	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
39505	// IngressPacketsTransferred - READ-ONLY; The ingress packets per second.
39506	IngressPacketsTransferred *int64 `json:"ingressPacketsTransferred,omitempty"`
39507	// IngressBytesTransferred - READ-ONLY; The ingress bytes per second.
39508	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
39509	// MaxPacketsPerSecond - READ-ONLY; The max packets transferred per second.
39510	MaxPacketsPerSecond *int64 `json:"maxPacketsPerSecond,omitempty"`
39511}
39512
39513// MarshalJSON is the custom marshaler for VpnClientConnectionHealthDetail.
39514func (vcchd VpnClientConnectionHealthDetail) MarshalJSON() ([]byte, error) {
39515	objectMap := make(map[string]interface{})
39516	return json.Marshal(objectMap)
39517}
39518
39519// VpnClientConnectionHealthDetailListResult list of virtual network gateway vpn client connection health.
39520type VpnClientConnectionHealthDetailListResult struct {
39521	autorest.Response `json:"-"`
39522	// Value - List of vpn client connection health.
39523	Value *[]VpnClientConnectionHealthDetail `json:"value,omitempty"`
39524}
39525
39526// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
39527type VpnClientIPsecParameters struct {
39528	autorest.Response `json:"-"`
39529	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
39530	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
39531	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
39532	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
39533	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
39534	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
39535	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
39536	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
39537	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
39538	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
39539	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
39540	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
39541	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
39542	DhGroup DhGroup `json:"dhGroup,omitempty"`
39543	// 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'
39544	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
39545}
39546
39547// VpnClientParameters vpn Client Parameters for package generation.
39548type VpnClientParameters struct {
39549	// ProcessorArchitecture - VPN client Processor Architecture. Possible values include: 'Amd64', 'X86'
39550	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
39551	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
39552	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
39553	// 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.
39554	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
39555	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
39556	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
39557}
39558
39559// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
39560type VpnClientRevokedCertificate struct {
39561	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
39562	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
39563	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
39564	Name *string `json:"name,omitempty"`
39565	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
39566	Etag *string `json:"etag,omitempty"`
39567	// ID - Resource ID.
39568	ID *string `json:"id,omitempty"`
39569}
39570
39571// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
39572func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
39573	objectMap := make(map[string]interface{})
39574	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
39575		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
39576	}
39577	if vcrc.Name != nil {
39578		objectMap["name"] = vcrc.Name
39579	}
39580	if vcrc.ID != nil {
39581		objectMap["id"] = vcrc.ID
39582	}
39583	return json.Marshal(objectMap)
39584}
39585
39586// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
39587func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
39588	var m map[string]*json.RawMessage
39589	err := json.Unmarshal(body, &m)
39590	if err != nil {
39591		return err
39592	}
39593	for k, v := range m {
39594		switch k {
39595		case "properties":
39596			if v != nil {
39597				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
39598				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
39599				if err != nil {
39600					return err
39601				}
39602				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
39603			}
39604		case "name":
39605			if v != nil {
39606				var name string
39607				err = json.Unmarshal(*v, &name)
39608				if err != nil {
39609					return err
39610				}
39611				vcrc.Name = &name
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				vcrc.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				vcrc.ID = &ID
39630			}
39631		}
39632	}
39633
39634	return nil
39635}
39636
39637// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
39638// network gateway.
39639type VpnClientRevokedCertificatePropertiesFormat struct {
39640	// Thumbprint - The revoked VPN client certificate thumbprint.
39641	Thumbprint *string `json:"thumbprint,omitempty"`
39642	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
39643	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
39644}
39645
39646// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
39647func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
39648	objectMap := make(map[string]interface{})
39649	if vcrcpf.Thumbprint != nil {
39650		objectMap["thumbprint"] = vcrcpf.Thumbprint
39651	}
39652	return json.Marshal(objectMap)
39653}
39654
39655// VpnClientRootCertificate VPN client root certificate of virtual network gateway.
39656type VpnClientRootCertificate struct {
39657	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
39658	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
39659	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
39660	Name *string `json:"name,omitempty"`
39661	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
39662	Etag *string `json:"etag,omitempty"`
39663	// ID - Resource ID.
39664	ID *string `json:"id,omitempty"`
39665}
39666
39667// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
39668func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
39669	objectMap := make(map[string]interface{})
39670	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
39671		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
39672	}
39673	if vcrc.Name != nil {
39674		objectMap["name"] = vcrc.Name
39675	}
39676	if vcrc.ID != nil {
39677		objectMap["id"] = vcrc.ID
39678	}
39679	return json.Marshal(objectMap)
39680}
39681
39682// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
39683func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
39684	var m map[string]*json.RawMessage
39685	err := json.Unmarshal(body, &m)
39686	if err != nil {
39687		return err
39688	}
39689	for k, v := range m {
39690		switch k {
39691		case "properties":
39692			if v != nil {
39693				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
39694				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
39695				if err != nil {
39696					return err
39697				}
39698				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
39699			}
39700		case "name":
39701			if v != nil {
39702				var name string
39703				err = json.Unmarshal(*v, &name)
39704				if err != nil {
39705					return err
39706				}
39707				vcrc.Name = &name
39708			}
39709		case "etag":
39710			if v != nil {
39711				var etag string
39712				err = json.Unmarshal(*v, &etag)
39713				if err != nil {
39714					return err
39715				}
39716				vcrc.Etag = &etag
39717			}
39718		case "id":
39719			if v != nil {
39720				var ID string
39721				err = json.Unmarshal(*v, &ID)
39722				if err != nil {
39723					return err
39724				}
39725				vcrc.ID = &ID
39726			}
39727		}
39728	}
39729
39730	return nil
39731}
39732
39733// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway.
39734type VpnClientRootCertificatePropertiesFormat struct {
39735	// PublicCertData - The certificate public data.
39736	PublicCertData *string `json:"publicCertData,omitempty"`
39737	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
39738	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
39739}
39740
39741// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
39742func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
39743	objectMap := make(map[string]interface{})
39744	if vcrcpf.PublicCertData != nil {
39745		objectMap["publicCertData"] = vcrcpf.PublicCertData
39746	}
39747	return json.Marshal(objectMap)
39748}
39749
39750// VpnConnection vpnConnection Resource.
39751type VpnConnection struct {
39752	autorest.Response `json:"-"`
39753	// VpnConnectionProperties - Properties of the VPN connection.
39754	*VpnConnectionProperties `json:"properties,omitempty"`
39755	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
39756	Name *string `json:"name,omitempty"`
39757	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
39758	Etag *string `json:"etag,omitempty"`
39759	// ID - Resource ID.
39760	ID *string `json:"id,omitempty"`
39761}
39762
39763// MarshalJSON is the custom marshaler for VpnConnection.
39764func (vc VpnConnection) MarshalJSON() ([]byte, error) {
39765	objectMap := make(map[string]interface{})
39766	if vc.VpnConnectionProperties != nil {
39767		objectMap["properties"] = vc.VpnConnectionProperties
39768	}
39769	if vc.Name != nil {
39770		objectMap["name"] = vc.Name
39771	}
39772	if vc.ID != nil {
39773		objectMap["id"] = vc.ID
39774	}
39775	return json.Marshal(objectMap)
39776}
39777
39778// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
39779func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
39780	var m map[string]*json.RawMessage
39781	err := json.Unmarshal(body, &m)
39782	if err != nil {
39783		return err
39784	}
39785	for k, v := range m {
39786		switch k {
39787		case "properties":
39788			if v != nil {
39789				var vpnConnectionProperties VpnConnectionProperties
39790				err = json.Unmarshal(*v, &vpnConnectionProperties)
39791				if err != nil {
39792					return err
39793				}
39794				vc.VpnConnectionProperties = &vpnConnectionProperties
39795			}
39796		case "name":
39797			if v != nil {
39798				var name string
39799				err = json.Unmarshal(*v, &name)
39800				if err != nil {
39801					return err
39802				}
39803				vc.Name = &name
39804			}
39805		case "etag":
39806			if v != nil {
39807				var etag string
39808				err = json.Unmarshal(*v, &etag)
39809				if err != nil {
39810					return err
39811				}
39812				vc.Etag = &etag
39813			}
39814		case "id":
39815			if v != nil {
39816				var ID string
39817				err = json.Unmarshal(*v, &ID)
39818				if err != nil {
39819					return err
39820				}
39821				vc.ID = &ID
39822			}
39823		}
39824	}
39825
39826	return nil
39827}
39828
39829// VpnConnectionProperties parameters for VpnConnection.
39830type VpnConnectionProperties struct {
39831	// RemoteVpnSite - Id of the connected vpn site.
39832	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
39833	// RoutingWeight - Routing weight for vpn connection.
39834	RoutingWeight *int32 `json:"routingWeight,omitempty"`
39835	// DpdTimeoutSeconds - The dead peer detection timeout for a vpn connection in seconds.
39836	DpdTimeoutSeconds *int32 `json:"dpdTimeoutSeconds,omitempty"`
39837	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
39838	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
39839	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
39840	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
39841	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
39842	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
39843	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
39844	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
39845	// ConnectionBandwidth - Expected bandwidth in MBPS.
39846	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
39847	// SharedKey - SharedKey for the vpn connection.
39848	SharedKey *string `json:"sharedKey,omitempty"`
39849	// EnableBgp - EnableBgp flag.
39850	EnableBgp *bool `json:"enableBgp,omitempty"`
39851	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
39852	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
39853	// IpsecPolicies - The IPSec Policies to be considered by this connection.
39854	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
39855	// EnableRateLimiting - EnableBgp flag.
39856	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
39857	// EnableInternetSecurity - Enable internet security.
39858	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
39859	// UseLocalAzureIPAddress - Use local azure ip to initiate connection.
39860	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
39861	// ProvisioningState - READ-ONLY; The provisioning state of the VPN connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
39862	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
39863	// VpnLinkConnections - List of all vpn site link connections to the gateway.
39864	VpnLinkConnections *[]VpnSiteLinkConnection `json:"vpnLinkConnections,omitempty"`
39865}
39866
39867// MarshalJSON is the custom marshaler for VpnConnectionProperties.
39868func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
39869	objectMap := make(map[string]interface{})
39870	if vcp.RemoteVpnSite != nil {
39871		objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
39872	}
39873	if vcp.RoutingWeight != nil {
39874		objectMap["routingWeight"] = vcp.RoutingWeight
39875	}
39876	if vcp.DpdTimeoutSeconds != nil {
39877		objectMap["dpdTimeoutSeconds"] = vcp.DpdTimeoutSeconds
39878	}
39879	if vcp.ConnectionStatus != "" {
39880		objectMap["connectionStatus"] = vcp.ConnectionStatus
39881	}
39882	if vcp.VpnConnectionProtocolType != "" {
39883		objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType
39884	}
39885	if vcp.ConnectionBandwidth != nil {
39886		objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth
39887	}
39888	if vcp.SharedKey != nil {
39889		objectMap["sharedKey"] = vcp.SharedKey
39890	}
39891	if vcp.EnableBgp != nil {
39892		objectMap["enableBgp"] = vcp.EnableBgp
39893	}
39894	if vcp.UsePolicyBasedTrafficSelectors != nil {
39895		objectMap["usePolicyBasedTrafficSelectors"] = vcp.UsePolicyBasedTrafficSelectors
39896	}
39897	if vcp.IpsecPolicies != nil {
39898		objectMap["ipsecPolicies"] = vcp.IpsecPolicies
39899	}
39900	if vcp.EnableRateLimiting != nil {
39901		objectMap["enableRateLimiting"] = vcp.EnableRateLimiting
39902	}
39903	if vcp.EnableInternetSecurity != nil {
39904		objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity
39905	}
39906	if vcp.UseLocalAzureIPAddress != nil {
39907		objectMap["useLocalAzureIpAddress"] = vcp.UseLocalAzureIPAddress
39908	}
39909	if vcp.VpnLinkConnections != nil {
39910		objectMap["vpnLinkConnections"] = vcp.VpnLinkConnections
39911	}
39912	return json.Marshal(objectMap)
39913}
39914
39915// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
39916// long-running operation.
39917type VpnConnectionsCreateOrUpdateFuture struct {
39918	azure.FutureAPI
39919	// Result returns the result of the asynchronous operation.
39920	// If the operation has not completed it will return an error.
39921	Result func(VpnConnectionsClient) (VpnConnection, error)
39922}
39923
39924// UnmarshalJSON is the custom unmarshaller for CreateFuture.
39925func (future *VpnConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
39926	var azFuture azure.Future
39927	if err := json.Unmarshal(body, &azFuture); err != nil {
39928		return err
39929	}
39930	future.FutureAPI = &azFuture
39931	future.Result = future.result
39932	return nil
39933}
39934
39935// result is the default implementation for VpnConnectionsCreateOrUpdateFuture.Result.
39936func (future *VpnConnectionsCreateOrUpdateFuture) result(client VpnConnectionsClient) (vc VpnConnection, err error) {
39937	var done bool
39938	done, err = future.DoneWithContext(context.Background(), client)
39939	if err != nil {
39940		err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
39941		return
39942	}
39943	if !done {
39944		vc.Response.Response = future.Response()
39945		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture")
39946		return
39947	}
39948	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
39949	if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
39950		vc, err = client.CreateOrUpdateResponder(vc.Response.Response)
39951		if err != nil {
39952			err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
39953		}
39954	}
39955	return
39956}
39957
39958// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
39959// operation.
39960type VpnConnectionsDeleteFuture struct {
39961	azure.FutureAPI
39962	// Result returns the result of the asynchronous operation.
39963	// If the operation has not completed it will return an error.
39964	Result func(VpnConnectionsClient) (autorest.Response, error)
39965}
39966
39967// UnmarshalJSON is the custom unmarshaller for CreateFuture.
39968func (future *VpnConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
39969	var azFuture azure.Future
39970	if err := json.Unmarshal(body, &azFuture); err != nil {
39971		return err
39972	}
39973	future.FutureAPI = &azFuture
39974	future.Result = future.result
39975	return nil
39976}
39977
39978// result is the default implementation for VpnConnectionsDeleteFuture.Result.
39979func (future *VpnConnectionsDeleteFuture) result(client VpnConnectionsClient) (ar autorest.Response, err error) {
39980	var done bool
39981	done, err = future.DoneWithContext(context.Background(), client)
39982	if err != nil {
39983		err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
39984		return
39985	}
39986	if !done {
39987		ar.Response = future.Response()
39988		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture")
39989		return
39990	}
39991	ar.Response = future.Response()
39992	return
39993}
39994
39995// VpnDeviceScriptParameters vpn device configuration script generation parameters.
39996type VpnDeviceScriptParameters struct {
39997	// Vendor - The vendor for the vpn device.
39998	Vendor *string `json:"vendor,omitempty"`
39999	// DeviceFamily - The device family for the vpn device.
40000	DeviceFamily *string `json:"deviceFamily,omitempty"`
40001	// FirmwareVersion - The firmware version for the vpn device.
40002	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
40003}
40004
40005// VpnGateway vpnGateway Resource.
40006type VpnGateway struct {
40007	autorest.Response `json:"-"`
40008	// VpnGatewayProperties - Properties of the VPN gateway.
40009	*VpnGatewayProperties `json:"properties,omitempty"`
40010	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40011	Etag *string `json:"etag,omitempty"`
40012	// ID - Resource ID.
40013	ID *string `json:"id,omitempty"`
40014	// Name - READ-ONLY; Resource name.
40015	Name *string `json:"name,omitempty"`
40016	// Type - READ-ONLY; Resource type.
40017	Type *string `json:"type,omitempty"`
40018	// Location - Resource location.
40019	Location *string `json:"location,omitempty"`
40020	// Tags - Resource tags.
40021	Tags map[string]*string `json:"tags"`
40022}
40023
40024// MarshalJSON is the custom marshaler for VpnGateway.
40025func (vg VpnGateway) MarshalJSON() ([]byte, error) {
40026	objectMap := make(map[string]interface{})
40027	if vg.VpnGatewayProperties != nil {
40028		objectMap["properties"] = vg.VpnGatewayProperties
40029	}
40030	if vg.ID != nil {
40031		objectMap["id"] = vg.ID
40032	}
40033	if vg.Location != nil {
40034		objectMap["location"] = vg.Location
40035	}
40036	if vg.Tags != nil {
40037		objectMap["tags"] = vg.Tags
40038	}
40039	return json.Marshal(objectMap)
40040}
40041
40042// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
40043func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
40044	var m map[string]*json.RawMessage
40045	err := json.Unmarshal(body, &m)
40046	if err != nil {
40047		return err
40048	}
40049	for k, v := range m {
40050		switch k {
40051		case "properties":
40052			if v != nil {
40053				var vpnGatewayProperties VpnGatewayProperties
40054				err = json.Unmarshal(*v, &vpnGatewayProperties)
40055				if err != nil {
40056					return err
40057				}
40058				vg.VpnGatewayProperties = &vpnGatewayProperties
40059			}
40060		case "etag":
40061			if v != nil {
40062				var etag string
40063				err = json.Unmarshal(*v, &etag)
40064				if err != nil {
40065					return err
40066				}
40067				vg.Etag = &etag
40068			}
40069		case "id":
40070			if v != nil {
40071				var ID string
40072				err = json.Unmarshal(*v, &ID)
40073				if err != nil {
40074					return err
40075				}
40076				vg.ID = &ID
40077			}
40078		case "name":
40079			if v != nil {
40080				var name string
40081				err = json.Unmarshal(*v, &name)
40082				if err != nil {
40083					return err
40084				}
40085				vg.Name = &name
40086			}
40087		case "type":
40088			if v != nil {
40089				var typeVar string
40090				err = json.Unmarshal(*v, &typeVar)
40091				if err != nil {
40092					return err
40093				}
40094				vg.Type = &typeVar
40095			}
40096		case "location":
40097			if v != nil {
40098				var location string
40099				err = json.Unmarshal(*v, &location)
40100				if err != nil {
40101					return err
40102				}
40103				vg.Location = &location
40104			}
40105		case "tags":
40106			if v != nil {
40107				var tags map[string]*string
40108				err = json.Unmarshal(*v, &tags)
40109				if err != nil {
40110					return err
40111				}
40112				vg.Tags = tags
40113			}
40114		}
40115	}
40116
40117	return nil
40118}
40119
40120// VpnGatewayProperties parameters for VpnGateway.
40121type VpnGatewayProperties struct {
40122	// VirtualHub - The VirtualHub to which the gateway belongs.
40123	VirtualHub *SubResource `json:"virtualHub,omitempty"`
40124	// Connections - List of all vpn connections to the gateway.
40125	Connections *[]VpnConnection `json:"connections,omitempty"`
40126	// BgpSettings - Local network gateway's BGP speaker settings.
40127	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
40128	// ProvisioningState - READ-ONLY; The provisioning state of the VPN gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
40129	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
40130	// VpnGatewayScaleUnit - The scale unit for this vpn gateway.
40131	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
40132}
40133
40134// MarshalJSON is the custom marshaler for VpnGatewayProperties.
40135func (vgp VpnGatewayProperties) MarshalJSON() ([]byte, error) {
40136	objectMap := make(map[string]interface{})
40137	if vgp.VirtualHub != nil {
40138		objectMap["virtualHub"] = vgp.VirtualHub
40139	}
40140	if vgp.Connections != nil {
40141		objectMap["connections"] = vgp.Connections
40142	}
40143	if vgp.BgpSettings != nil {
40144		objectMap["bgpSettings"] = vgp.BgpSettings
40145	}
40146	if vgp.VpnGatewayScaleUnit != nil {
40147		objectMap["vpnGatewayScaleUnit"] = vgp.VpnGatewayScaleUnit
40148	}
40149	return json.Marshal(objectMap)
40150}
40151
40152// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
40153// long-running operation.
40154type VpnGatewaysCreateOrUpdateFuture struct {
40155	azure.FutureAPI
40156	// Result returns the result of the asynchronous operation.
40157	// If the operation has not completed it will return an error.
40158	Result func(VpnGatewaysClient) (VpnGateway, error)
40159}
40160
40161// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40162func (future *VpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
40163	var azFuture azure.Future
40164	if err := json.Unmarshal(body, &azFuture); err != nil {
40165		return err
40166	}
40167	future.FutureAPI = &azFuture
40168	future.Result = future.result
40169	return nil
40170}
40171
40172// result is the default implementation for VpnGatewaysCreateOrUpdateFuture.Result.
40173func (future *VpnGatewaysCreateOrUpdateFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
40174	var done bool
40175	done, err = future.DoneWithContext(context.Background(), client)
40176	if err != nil {
40177		err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
40178		return
40179	}
40180	if !done {
40181		vg.Response.Response = future.Response()
40182		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture")
40183		return
40184	}
40185	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
40186	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
40187		vg, err = client.CreateOrUpdateResponder(vg.Response.Response)
40188		if err != nil {
40189			err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request")
40190		}
40191	}
40192	return
40193}
40194
40195// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
40196// operation.
40197type VpnGatewaysDeleteFuture struct {
40198	azure.FutureAPI
40199	// Result returns the result of the asynchronous operation.
40200	// If the operation has not completed it will return an error.
40201	Result func(VpnGatewaysClient) (autorest.Response, error)
40202}
40203
40204// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40205func (future *VpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
40206	var azFuture azure.Future
40207	if err := json.Unmarshal(body, &azFuture); err != nil {
40208		return err
40209	}
40210	future.FutureAPI = &azFuture
40211	future.Result = future.result
40212	return nil
40213}
40214
40215// result is the default implementation for VpnGatewaysDeleteFuture.Result.
40216func (future *VpnGatewaysDeleteFuture) result(client VpnGatewaysClient) (ar autorest.Response, err error) {
40217	var done bool
40218	done, err = future.DoneWithContext(context.Background(), client)
40219	if err != nil {
40220		err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
40221		return
40222	}
40223	if !done {
40224		ar.Response = future.Response()
40225		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture")
40226		return
40227	}
40228	ar.Response = future.Response()
40229	return
40230}
40231
40232// VpnGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running
40233// operation.
40234type VpnGatewaysResetFuture struct {
40235	azure.FutureAPI
40236	// Result returns the result of the asynchronous operation.
40237	// If the operation has not completed it will return an error.
40238	Result func(VpnGatewaysClient) (VpnGateway, error)
40239}
40240
40241// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40242func (future *VpnGatewaysResetFuture) UnmarshalJSON(body []byte) error {
40243	var azFuture azure.Future
40244	if err := json.Unmarshal(body, &azFuture); err != nil {
40245		return err
40246	}
40247	future.FutureAPI = &azFuture
40248	future.Result = future.result
40249	return nil
40250}
40251
40252// result is the default implementation for VpnGatewaysResetFuture.Result.
40253func (future *VpnGatewaysResetFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
40254	var done bool
40255	done, err = future.DoneWithContext(context.Background(), client)
40256	if err != nil {
40257		err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", future.Response(), "Polling failure")
40258		return
40259	}
40260	if !done {
40261		vg.Response.Response = future.Response()
40262		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysResetFuture")
40263		return
40264	}
40265	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
40266	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
40267		vg, err = client.ResetResponder(vg.Response.Response)
40268		if err != nil {
40269			err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", vg.Response.Response, "Failure responding to request")
40270		}
40271	}
40272	return
40273}
40274
40275// VpnLinkBgpSettings BGP settings details for a link.
40276type VpnLinkBgpSettings struct {
40277	// Asn - The BGP speaker's ASN.
40278	Asn *int64 `json:"asn,omitempty"`
40279	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
40280	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
40281}
40282
40283// VpnLinkProviderProperties list of properties of a link provider.
40284type VpnLinkProviderProperties struct {
40285	// LinkProviderName - Name of the link provider.
40286	LinkProviderName *string `json:"linkProviderName,omitempty"`
40287	// LinkSpeedInMbps - Link speed.
40288	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
40289}
40290
40291// VpnPacketCaptureStartParameters start packet capture parameters on virtual network gateway.
40292type VpnPacketCaptureStartParameters struct {
40293	// FilterData - Start Packet capture parameters.
40294	FilterData *string `json:"filterData,omitempty"`
40295}
40296
40297// VpnPacketCaptureStopParameters stop packet capture parameters.
40298type VpnPacketCaptureStopParameters struct {
40299	// SasURL - SAS url for packet capture on virtual network gateway.
40300	SasURL *string `json:"sasUrl,omitempty"`
40301}
40302
40303// VpnProfileResponse vpn Profile Response for package generation.
40304type VpnProfileResponse struct {
40305	autorest.Response `json:"-"`
40306	// ProfileURL - URL to the VPN profile.
40307	ProfileURL *string `json:"profileUrl,omitempty"`
40308}
40309
40310// VpnServerConfigRadiusClientRootCertificate properties of the Radius client root certificate of
40311// VpnServerConfiguration.
40312type VpnServerConfigRadiusClientRootCertificate struct {
40313	// Name - The certificate name.
40314	Name *string `json:"name,omitempty"`
40315	// Thumbprint - The Radius client root certificate thumbprint.
40316	Thumbprint *string `json:"thumbprint,omitempty"`
40317}
40318
40319// VpnServerConfigRadiusServerRootCertificate properties of Radius Server root certificate of
40320// VpnServerConfiguration.
40321type VpnServerConfigRadiusServerRootCertificate struct {
40322	// Name - The certificate name.
40323	Name *string `json:"name,omitempty"`
40324	// PublicCertData - The certificate public data.
40325	PublicCertData *string `json:"publicCertData,omitempty"`
40326}
40327
40328// VpnServerConfiguration vpnServerConfiguration Resource.
40329type VpnServerConfiguration struct {
40330	autorest.Response `json:"-"`
40331	// VpnServerConfigurationProperties - Properties of the P2SVpnServer configuration.
40332	*VpnServerConfigurationProperties `json:"properties,omitempty"`
40333	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40334	Etag *string `json:"etag,omitempty"`
40335	// ID - Resource ID.
40336	ID *string `json:"id,omitempty"`
40337	// Name - READ-ONLY; Resource name.
40338	Name *string `json:"name,omitempty"`
40339	// Type - READ-ONLY; Resource type.
40340	Type *string `json:"type,omitempty"`
40341	// Location - Resource location.
40342	Location *string `json:"location,omitempty"`
40343	// Tags - Resource tags.
40344	Tags map[string]*string `json:"tags"`
40345}
40346
40347// MarshalJSON is the custom marshaler for VpnServerConfiguration.
40348func (vsc VpnServerConfiguration) MarshalJSON() ([]byte, error) {
40349	objectMap := make(map[string]interface{})
40350	if vsc.VpnServerConfigurationProperties != nil {
40351		objectMap["properties"] = vsc.VpnServerConfigurationProperties
40352	}
40353	if vsc.ID != nil {
40354		objectMap["id"] = vsc.ID
40355	}
40356	if vsc.Location != nil {
40357		objectMap["location"] = vsc.Location
40358	}
40359	if vsc.Tags != nil {
40360		objectMap["tags"] = vsc.Tags
40361	}
40362	return json.Marshal(objectMap)
40363}
40364
40365// UnmarshalJSON is the custom unmarshaler for VpnServerConfiguration struct.
40366func (vsc *VpnServerConfiguration) UnmarshalJSON(body []byte) error {
40367	var m map[string]*json.RawMessage
40368	err := json.Unmarshal(body, &m)
40369	if err != nil {
40370		return err
40371	}
40372	for k, v := range m {
40373		switch k {
40374		case "properties":
40375			if v != nil {
40376				var vpnServerConfigurationProperties VpnServerConfigurationProperties
40377				err = json.Unmarshal(*v, &vpnServerConfigurationProperties)
40378				if err != nil {
40379					return err
40380				}
40381				vsc.VpnServerConfigurationProperties = &vpnServerConfigurationProperties
40382			}
40383		case "etag":
40384			if v != nil {
40385				var etag string
40386				err = json.Unmarshal(*v, &etag)
40387				if err != nil {
40388					return err
40389				}
40390				vsc.Etag = &etag
40391			}
40392		case "id":
40393			if v != nil {
40394				var ID string
40395				err = json.Unmarshal(*v, &ID)
40396				if err != nil {
40397					return err
40398				}
40399				vsc.ID = &ID
40400			}
40401		case "name":
40402			if v != nil {
40403				var name string
40404				err = json.Unmarshal(*v, &name)
40405				if err != nil {
40406					return err
40407				}
40408				vsc.Name = &name
40409			}
40410		case "type":
40411			if v != nil {
40412				var typeVar string
40413				err = json.Unmarshal(*v, &typeVar)
40414				if err != nil {
40415					return err
40416				}
40417				vsc.Type = &typeVar
40418			}
40419		case "location":
40420			if v != nil {
40421				var location string
40422				err = json.Unmarshal(*v, &location)
40423				if err != nil {
40424					return err
40425				}
40426				vsc.Location = &location
40427			}
40428		case "tags":
40429			if v != nil {
40430				var tags map[string]*string
40431				err = json.Unmarshal(*v, &tags)
40432				if err != nil {
40433					return err
40434				}
40435				vsc.Tags = tags
40436			}
40437		}
40438	}
40439
40440	return nil
40441}
40442
40443// VpnServerConfigurationProperties parameters for VpnServerConfiguration.
40444type VpnServerConfigurationProperties struct {
40445	// Name - The name of the VpnServerConfiguration that is unique within a resource group.
40446	Name *string `json:"name,omitempty"`
40447	// VpnProtocols - VPN protocols for the VpnServerConfiguration.
40448	VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"`
40449	// VpnAuthenticationTypes - VPN authentication types for the VpnServerConfiguration.
40450	VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"`
40451	// VpnClientRootCertificates - VPN client root certificate of VpnServerConfiguration.
40452	VpnClientRootCertificates *[]VpnServerConfigVpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
40453	// VpnClientRevokedCertificates - VPN client revoked certificate of VpnServerConfiguration.
40454	VpnClientRevokedCertificates *[]VpnServerConfigVpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
40455	// RadiusServerRootCertificates - Radius Server root certificate of VpnServerConfiguration.
40456	RadiusServerRootCertificates *[]VpnServerConfigRadiusServerRootCertificate `json:"radiusServerRootCertificates,omitempty"`
40457	// RadiusClientRootCertificates - Radius client root certificate of VpnServerConfiguration.
40458	RadiusClientRootCertificates *[]VpnServerConfigRadiusClientRootCertificate `json:"radiusClientRootCertificates,omitempty"`
40459	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for VpnServerConfiguration.
40460	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
40461	// RadiusServerAddress - The radius server address property of the VpnServerConfiguration resource for point to site client connection.
40462	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
40463	// RadiusServerSecret - The radius secret property of the VpnServerConfiguration resource for point to site client connection.
40464	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
40465	// RadiusServers - Multiple Radius Server configuration for VpnServerConfiguration.
40466	RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"`
40467	// AadAuthenticationParameters - The set of aad vpn authentication parameters.
40468	AadAuthenticationParameters *AadAuthenticationParameters `json:"aadAuthenticationParameters,omitempty"`
40469	// ProvisioningState - READ-ONLY; The provisioning state of the VpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
40470	ProvisioningState *string `json:"provisioningState,omitempty"`
40471	// P2SVpnGateways - READ-ONLY; List of references to P2SVpnGateways.
40472	P2SVpnGateways *[]P2SVpnGateway `json:"p2SVpnGateways,omitempty"`
40473	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40474	Etag *string `json:"etag,omitempty"`
40475}
40476
40477// MarshalJSON is the custom marshaler for VpnServerConfigurationProperties.
40478func (vscp VpnServerConfigurationProperties) MarshalJSON() ([]byte, error) {
40479	objectMap := make(map[string]interface{})
40480	if vscp.Name != nil {
40481		objectMap["name"] = vscp.Name
40482	}
40483	if vscp.VpnProtocols != nil {
40484		objectMap["vpnProtocols"] = vscp.VpnProtocols
40485	}
40486	if vscp.VpnAuthenticationTypes != nil {
40487		objectMap["vpnAuthenticationTypes"] = vscp.VpnAuthenticationTypes
40488	}
40489	if vscp.VpnClientRootCertificates != nil {
40490		objectMap["vpnClientRootCertificates"] = vscp.VpnClientRootCertificates
40491	}
40492	if vscp.VpnClientRevokedCertificates != nil {
40493		objectMap["vpnClientRevokedCertificates"] = vscp.VpnClientRevokedCertificates
40494	}
40495	if vscp.RadiusServerRootCertificates != nil {
40496		objectMap["radiusServerRootCertificates"] = vscp.RadiusServerRootCertificates
40497	}
40498	if vscp.RadiusClientRootCertificates != nil {
40499		objectMap["radiusClientRootCertificates"] = vscp.RadiusClientRootCertificates
40500	}
40501	if vscp.VpnClientIpsecPolicies != nil {
40502		objectMap["vpnClientIpsecPolicies"] = vscp.VpnClientIpsecPolicies
40503	}
40504	if vscp.RadiusServerAddress != nil {
40505		objectMap["radiusServerAddress"] = vscp.RadiusServerAddress
40506	}
40507	if vscp.RadiusServerSecret != nil {
40508		objectMap["radiusServerSecret"] = vscp.RadiusServerSecret
40509	}
40510	if vscp.RadiusServers != nil {
40511		objectMap["radiusServers"] = vscp.RadiusServers
40512	}
40513	if vscp.AadAuthenticationParameters != nil {
40514		objectMap["aadAuthenticationParameters"] = vscp.AadAuthenticationParameters
40515	}
40516	return json.Marshal(objectMap)
40517}
40518
40519// VpnServerConfigurationsAssociatedWithVirtualWanListFuture an abstraction for monitoring and retrieving
40520// the results of a long-running operation.
40521type VpnServerConfigurationsAssociatedWithVirtualWanListFuture struct {
40522	azure.FutureAPI
40523	// Result returns the result of the asynchronous operation.
40524	// If the operation has not completed it will return an error.
40525	Result func(VpnServerConfigurationsAssociatedWithVirtualWanClient) (VpnServerConfigurationsResponse, error)
40526}
40527
40528// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40529func (future *VpnServerConfigurationsAssociatedWithVirtualWanListFuture) UnmarshalJSON(body []byte) error {
40530	var azFuture azure.Future
40531	if err := json.Unmarshal(body, &azFuture); err != nil {
40532		return err
40533	}
40534	future.FutureAPI = &azFuture
40535	future.Result = future.result
40536	return nil
40537}
40538
40539// result is the default implementation for VpnServerConfigurationsAssociatedWithVirtualWanListFuture.Result.
40540func (future *VpnServerConfigurationsAssociatedWithVirtualWanListFuture) result(client VpnServerConfigurationsAssociatedWithVirtualWanClient) (vscr VpnServerConfigurationsResponse, err error) {
40541	var done bool
40542	done, err = future.DoneWithContext(context.Background(), client)
40543	if err != nil {
40544		err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture", "Result", future.Response(), "Polling failure")
40545		return
40546	}
40547	if !done {
40548		vscr.Response.Response = future.Response()
40549		err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture")
40550		return
40551	}
40552	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
40553	if vscr.Response.Response, err = future.GetResult(sender); err == nil && vscr.Response.Response.StatusCode != http.StatusNoContent {
40554		vscr, err = client.ListResponder(vscr.Response.Response)
40555		if err != nil {
40556			err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture", "Result", vscr.Response.Response, "Failure responding to request")
40557		}
40558	}
40559	return
40560}
40561
40562// VpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
40563// a long-running operation.
40564type VpnServerConfigurationsCreateOrUpdateFuture struct {
40565	azure.FutureAPI
40566	// Result returns the result of the asynchronous operation.
40567	// If the operation has not completed it will return an error.
40568	Result func(VpnServerConfigurationsClient) (VpnServerConfiguration, error)
40569}
40570
40571// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40572func (future *VpnServerConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
40573	var azFuture azure.Future
40574	if err := json.Unmarshal(body, &azFuture); err != nil {
40575		return err
40576	}
40577	future.FutureAPI = &azFuture
40578	future.Result = future.result
40579	return nil
40580}
40581
40582// result is the default implementation for VpnServerConfigurationsCreateOrUpdateFuture.Result.
40583func (future *VpnServerConfigurationsCreateOrUpdateFuture) result(client VpnServerConfigurationsClient) (vsc VpnServerConfiguration, err error) {
40584	var done bool
40585	done, err = future.DoneWithContext(context.Background(), client)
40586	if err != nil {
40587		err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
40588		return
40589	}
40590	if !done {
40591		vsc.Response.Response = future.Response()
40592		err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsCreateOrUpdateFuture")
40593		return
40594	}
40595	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
40596	if vsc.Response.Response, err = future.GetResult(sender); err == nil && vsc.Response.Response.StatusCode != http.StatusNoContent {
40597		vsc, err = client.CreateOrUpdateResponder(vsc.Response.Response)
40598		if err != nil {
40599			err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsCreateOrUpdateFuture", "Result", vsc.Response.Response, "Failure responding to request")
40600		}
40601	}
40602	return
40603}
40604
40605// VpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
40606// long-running operation.
40607type VpnServerConfigurationsDeleteFuture struct {
40608	azure.FutureAPI
40609	// Result returns the result of the asynchronous operation.
40610	// If the operation has not completed it will return an error.
40611	Result func(VpnServerConfigurationsClient) (autorest.Response, error)
40612}
40613
40614// UnmarshalJSON is the custom unmarshaller for CreateFuture.
40615func (future *VpnServerConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
40616	var azFuture azure.Future
40617	if err := json.Unmarshal(body, &azFuture); err != nil {
40618		return err
40619	}
40620	future.FutureAPI = &azFuture
40621	future.Result = future.result
40622	return nil
40623}
40624
40625// result is the default implementation for VpnServerConfigurationsDeleteFuture.Result.
40626func (future *VpnServerConfigurationsDeleteFuture) result(client VpnServerConfigurationsClient) (ar autorest.Response, err error) {
40627	var done bool
40628	done, err = future.DoneWithContext(context.Background(), client)
40629	if err != nil {
40630		err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
40631		return
40632	}
40633	if !done {
40634		ar.Response = future.Response()
40635		err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsDeleteFuture")
40636		return
40637	}
40638	ar.Response = future.Response()
40639	return
40640}
40641
40642// VpnServerConfigurationsResponse vpnServerConfigurations list associated with VirtualWan Response.
40643type VpnServerConfigurationsResponse struct {
40644	autorest.Response `json:"-"`
40645	// VpnServerConfigurationResourceIds - List of VpnServerConfigurations associated with VirtualWan.
40646	VpnServerConfigurationResourceIds *[]string `json:"vpnServerConfigurationResourceIds,omitempty"`
40647}
40648
40649// VpnServerConfigVpnClientRevokedCertificate properties of the revoked VPN client certificate of
40650// VpnServerConfiguration.
40651type VpnServerConfigVpnClientRevokedCertificate struct {
40652	// Name - The certificate name.
40653	Name *string `json:"name,omitempty"`
40654	// Thumbprint - The revoked VPN client certificate thumbprint.
40655	Thumbprint *string `json:"thumbprint,omitempty"`
40656}
40657
40658// VpnServerConfigVpnClientRootCertificate properties of VPN client root certificate of
40659// VpnServerConfiguration.
40660type VpnServerConfigVpnClientRootCertificate struct {
40661	// Name - The certificate name.
40662	Name *string `json:"name,omitempty"`
40663	// PublicCertData - The certificate public data.
40664	PublicCertData *string `json:"publicCertData,omitempty"`
40665}
40666
40667// VpnSite vpnSite Resource.
40668type VpnSite struct {
40669	autorest.Response `json:"-"`
40670	// VpnSiteProperties - Properties of the VPN site.
40671	*VpnSiteProperties `json:"properties,omitempty"`
40672	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40673	Etag *string `json:"etag,omitempty"`
40674	// ID - Resource ID.
40675	ID *string `json:"id,omitempty"`
40676	// Name - READ-ONLY; Resource name.
40677	Name *string `json:"name,omitempty"`
40678	// Type - READ-ONLY; Resource type.
40679	Type *string `json:"type,omitempty"`
40680	// Location - Resource location.
40681	Location *string `json:"location,omitempty"`
40682	// Tags - Resource tags.
40683	Tags map[string]*string `json:"tags"`
40684}
40685
40686// MarshalJSON is the custom marshaler for VpnSite.
40687func (vs VpnSite) MarshalJSON() ([]byte, error) {
40688	objectMap := make(map[string]interface{})
40689	if vs.VpnSiteProperties != nil {
40690		objectMap["properties"] = vs.VpnSiteProperties
40691	}
40692	if vs.ID != nil {
40693		objectMap["id"] = vs.ID
40694	}
40695	if vs.Location != nil {
40696		objectMap["location"] = vs.Location
40697	}
40698	if vs.Tags != nil {
40699		objectMap["tags"] = vs.Tags
40700	}
40701	return json.Marshal(objectMap)
40702}
40703
40704// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
40705func (vs *VpnSite) UnmarshalJSON(body []byte) error {
40706	var m map[string]*json.RawMessage
40707	err := json.Unmarshal(body, &m)
40708	if err != nil {
40709		return err
40710	}
40711	for k, v := range m {
40712		switch k {
40713		case "properties":
40714			if v != nil {
40715				var vpnSiteProperties VpnSiteProperties
40716				err = json.Unmarshal(*v, &vpnSiteProperties)
40717				if err != nil {
40718					return err
40719				}
40720				vs.VpnSiteProperties = &vpnSiteProperties
40721			}
40722		case "etag":
40723			if v != nil {
40724				var etag string
40725				err = json.Unmarshal(*v, &etag)
40726				if err != nil {
40727					return err
40728				}
40729				vs.Etag = &etag
40730			}
40731		case "id":
40732			if v != nil {
40733				var ID string
40734				err = json.Unmarshal(*v, &ID)
40735				if err != nil {
40736					return err
40737				}
40738				vs.ID = &ID
40739			}
40740		case "name":
40741			if v != nil {
40742				var name string
40743				err = json.Unmarshal(*v, &name)
40744				if err != nil {
40745					return err
40746				}
40747				vs.Name = &name
40748			}
40749		case "type":
40750			if v != nil {
40751				var typeVar string
40752				err = json.Unmarshal(*v, &typeVar)
40753				if err != nil {
40754					return err
40755				}
40756				vs.Type = &typeVar
40757			}
40758		case "location":
40759			if v != nil {
40760				var location string
40761				err = json.Unmarshal(*v, &location)
40762				if err != nil {
40763					return err
40764				}
40765				vs.Location = &location
40766			}
40767		case "tags":
40768			if v != nil {
40769				var tags map[string]*string
40770				err = json.Unmarshal(*v, &tags)
40771				if err != nil {
40772					return err
40773				}
40774				vs.Tags = tags
40775			}
40776		}
40777	}
40778
40779	return nil
40780}
40781
40782// VpnSiteID vpnSite Resource.
40783type VpnSiteID struct {
40784	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
40785	VpnSite *string `json:"vpnSite,omitempty"`
40786}
40787
40788// MarshalJSON is the custom marshaler for VpnSiteID.
40789func (vsi VpnSiteID) MarshalJSON() ([]byte, error) {
40790	objectMap := make(map[string]interface{})
40791	return json.Marshal(objectMap)
40792}
40793
40794// VpnSiteLink vpnSiteLink Resource.
40795type VpnSiteLink struct {
40796	autorest.Response `json:"-"`
40797	// VpnSiteLinkProperties - Properties of the VPN site link.
40798	*VpnSiteLinkProperties `json:"properties,omitempty"`
40799	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40800	Etag *string `json:"etag,omitempty"`
40801	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
40802	Name *string `json:"name,omitempty"`
40803	// Type - READ-ONLY; Resource type.
40804	Type *string `json:"type,omitempty"`
40805	// ID - Resource ID.
40806	ID *string `json:"id,omitempty"`
40807}
40808
40809// MarshalJSON is the custom marshaler for VpnSiteLink.
40810func (vsl VpnSiteLink) MarshalJSON() ([]byte, error) {
40811	objectMap := make(map[string]interface{})
40812	if vsl.VpnSiteLinkProperties != nil {
40813		objectMap["properties"] = vsl.VpnSiteLinkProperties
40814	}
40815	if vsl.Name != nil {
40816		objectMap["name"] = vsl.Name
40817	}
40818	if vsl.ID != nil {
40819		objectMap["id"] = vsl.ID
40820	}
40821	return json.Marshal(objectMap)
40822}
40823
40824// UnmarshalJSON is the custom unmarshaler for VpnSiteLink struct.
40825func (vsl *VpnSiteLink) UnmarshalJSON(body []byte) error {
40826	var m map[string]*json.RawMessage
40827	err := json.Unmarshal(body, &m)
40828	if err != nil {
40829		return err
40830	}
40831	for k, v := range m {
40832		switch k {
40833		case "properties":
40834			if v != nil {
40835				var vpnSiteLinkProperties VpnSiteLinkProperties
40836				err = json.Unmarshal(*v, &vpnSiteLinkProperties)
40837				if err != nil {
40838					return err
40839				}
40840				vsl.VpnSiteLinkProperties = &vpnSiteLinkProperties
40841			}
40842		case "etag":
40843			if v != nil {
40844				var etag string
40845				err = json.Unmarshal(*v, &etag)
40846				if err != nil {
40847					return err
40848				}
40849				vsl.Etag = &etag
40850			}
40851		case "name":
40852			if v != nil {
40853				var name string
40854				err = json.Unmarshal(*v, &name)
40855				if err != nil {
40856					return err
40857				}
40858				vsl.Name = &name
40859			}
40860		case "type":
40861			if v != nil {
40862				var typeVar string
40863				err = json.Unmarshal(*v, &typeVar)
40864				if err != nil {
40865					return err
40866				}
40867				vsl.Type = &typeVar
40868			}
40869		case "id":
40870			if v != nil {
40871				var ID string
40872				err = json.Unmarshal(*v, &ID)
40873				if err != nil {
40874					return err
40875				}
40876				vsl.ID = &ID
40877			}
40878		}
40879	}
40880
40881	return nil
40882}
40883
40884// VpnSiteLinkConnection vpnSiteLinkConnection Resource.
40885type VpnSiteLinkConnection struct {
40886	autorest.Response `json:"-"`
40887	// VpnSiteLinkConnectionProperties - Properties of the VPN site link connection.
40888	*VpnSiteLinkConnectionProperties `json:"properties,omitempty"`
40889	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
40890	Name *string `json:"name,omitempty"`
40891	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40892	Etag *string `json:"etag,omitempty"`
40893	// Type - READ-ONLY; Resource type.
40894	Type *string `json:"type,omitempty"`
40895	// ID - Resource ID.
40896	ID *string `json:"id,omitempty"`
40897}
40898
40899// MarshalJSON is the custom marshaler for VpnSiteLinkConnection.
40900func (vslc VpnSiteLinkConnection) MarshalJSON() ([]byte, error) {
40901	objectMap := make(map[string]interface{})
40902	if vslc.VpnSiteLinkConnectionProperties != nil {
40903		objectMap["properties"] = vslc.VpnSiteLinkConnectionProperties
40904	}
40905	if vslc.Name != nil {
40906		objectMap["name"] = vslc.Name
40907	}
40908	if vslc.ID != nil {
40909		objectMap["id"] = vslc.ID
40910	}
40911	return json.Marshal(objectMap)
40912}
40913
40914// UnmarshalJSON is the custom unmarshaler for VpnSiteLinkConnection struct.
40915func (vslc *VpnSiteLinkConnection) UnmarshalJSON(body []byte) error {
40916	var m map[string]*json.RawMessage
40917	err := json.Unmarshal(body, &m)
40918	if err != nil {
40919		return err
40920	}
40921	for k, v := range m {
40922		switch k {
40923		case "properties":
40924			if v != nil {
40925				var vpnSiteLinkConnectionProperties VpnSiteLinkConnectionProperties
40926				err = json.Unmarshal(*v, &vpnSiteLinkConnectionProperties)
40927				if err != nil {
40928					return err
40929				}
40930				vslc.VpnSiteLinkConnectionProperties = &vpnSiteLinkConnectionProperties
40931			}
40932		case "name":
40933			if v != nil {
40934				var name string
40935				err = json.Unmarshal(*v, &name)
40936				if err != nil {
40937					return err
40938				}
40939				vslc.Name = &name
40940			}
40941		case "etag":
40942			if v != nil {
40943				var etag string
40944				err = json.Unmarshal(*v, &etag)
40945				if err != nil {
40946					return err
40947				}
40948				vslc.Etag = &etag
40949			}
40950		case "type":
40951			if v != nil {
40952				var typeVar string
40953				err = json.Unmarshal(*v, &typeVar)
40954				if err != nil {
40955					return err
40956				}
40957				vslc.Type = &typeVar
40958			}
40959		case "id":
40960			if v != nil {
40961				var ID string
40962				err = json.Unmarshal(*v, &ID)
40963				if err != nil {
40964					return err
40965				}
40966				vslc.ID = &ID
40967			}
40968		}
40969	}
40970
40971	return nil
40972}
40973
40974// VpnSiteLinkConnectionProperties parameters for VpnConnection.
40975type VpnSiteLinkConnectionProperties struct {
40976	// VpnSiteLink - Id of the connected vpn site link.
40977	VpnSiteLink *SubResource `json:"vpnSiteLink,omitempty"`
40978	// RoutingWeight - Routing weight for vpn connection.
40979	RoutingWeight *int32 `json:"routingWeight,omitempty"`
40980	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
40981	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
40982	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
40983	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
40984	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
40985	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
40986	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
40987	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
40988	// ConnectionBandwidth - Expected bandwidth in MBPS.
40989	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
40990	// SharedKey - SharedKey for the vpn connection.
40991	SharedKey *string `json:"sharedKey,omitempty"`
40992	// EnableBgp - EnableBgp flag.
40993	EnableBgp *bool `json:"enableBgp,omitempty"`
40994	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
40995	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
40996	// IpsecPolicies - The IPSec Policies to be considered by this connection.
40997	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
40998	// EnableRateLimiting - EnableBgp flag.
40999	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
41000	// UseLocalAzureIPAddress - Use local azure ip to initiate connection.
41001	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
41002	// ProvisioningState - READ-ONLY; The provisioning state of the VPN site link connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
41003	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
41004}
41005
41006// MarshalJSON is the custom marshaler for VpnSiteLinkConnectionProperties.
41007func (vslcp VpnSiteLinkConnectionProperties) MarshalJSON() ([]byte, error) {
41008	objectMap := make(map[string]interface{})
41009	if vslcp.VpnSiteLink != nil {
41010		objectMap["vpnSiteLink"] = vslcp.VpnSiteLink
41011	}
41012	if vslcp.RoutingWeight != nil {
41013		objectMap["routingWeight"] = vslcp.RoutingWeight
41014	}
41015	if vslcp.ConnectionStatus != "" {
41016		objectMap["connectionStatus"] = vslcp.ConnectionStatus
41017	}
41018	if vslcp.VpnConnectionProtocolType != "" {
41019		objectMap["vpnConnectionProtocolType"] = vslcp.VpnConnectionProtocolType
41020	}
41021	if vslcp.ConnectionBandwidth != nil {
41022		objectMap["connectionBandwidth"] = vslcp.ConnectionBandwidth
41023	}
41024	if vslcp.SharedKey != nil {
41025		objectMap["sharedKey"] = vslcp.SharedKey
41026	}
41027	if vslcp.EnableBgp != nil {
41028		objectMap["enableBgp"] = vslcp.EnableBgp
41029	}
41030	if vslcp.UsePolicyBasedTrafficSelectors != nil {
41031		objectMap["usePolicyBasedTrafficSelectors"] = vslcp.UsePolicyBasedTrafficSelectors
41032	}
41033	if vslcp.IpsecPolicies != nil {
41034		objectMap["ipsecPolicies"] = vslcp.IpsecPolicies
41035	}
41036	if vslcp.EnableRateLimiting != nil {
41037		objectMap["enableRateLimiting"] = vslcp.EnableRateLimiting
41038	}
41039	if vslcp.UseLocalAzureIPAddress != nil {
41040		objectMap["useLocalAzureIpAddress"] = vslcp.UseLocalAzureIPAddress
41041	}
41042	return json.Marshal(objectMap)
41043}
41044
41045// VpnSiteLinkProperties parameters for VpnSite.
41046type VpnSiteLinkProperties struct {
41047	// LinkProperties - The link provider properties.
41048	LinkProperties *VpnLinkProviderProperties `json:"linkProperties,omitempty"`
41049	// IPAddress - The ip-address for the vpn-site-link.
41050	IPAddress *string `json:"ipAddress,omitempty"`
41051	// Fqdn - FQDN of vpn-site-link.
41052	Fqdn *string `json:"fqdn,omitempty"`
41053	// BgpProperties - The set of bgp properties.
41054	BgpProperties *VpnLinkBgpSettings `json:"bgpProperties,omitempty"`
41055	// ProvisioningState - READ-ONLY; The provisioning state of the VPN site link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
41056	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
41057}
41058
41059// MarshalJSON is the custom marshaler for VpnSiteLinkProperties.
41060func (vslp VpnSiteLinkProperties) MarshalJSON() ([]byte, error) {
41061	objectMap := make(map[string]interface{})
41062	if vslp.LinkProperties != nil {
41063		objectMap["linkProperties"] = vslp.LinkProperties
41064	}
41065	if vslp.IPAddress != nil {
41066		objectMap["ipAddress"] = vslp.IPAddress
41067	}
41068	if vslp.Fqdn != nil {
41069		objectMap["fqdn"] = vslp.Fqdn
41070	}
41071	if vslp.BgpProperties != nil {
41072		objectMap["bgpProperties"] = vslp.BgpProperties
41073	}
41074	return json.Marshal(objectMap)
41075}
41076
41077// VpnSiteProperties parameters for VpnSite.
41078type VpnSiteProperties struct {
41079	// VirtualWan - The VirtualWAN to which the vpnSite belongs.
41080	VirtualWan *SubResource `json:"virtualWan,omitempty"`
41081	// DeviceProperties - The device properties.
41082	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
41083	// IPAddress - The ip-address for the vpn-site.
41084	IPAddress *string `json:"ipAddress,omitempty"`
41085	// SiteKey - The key for vpn-site that can be used for connections.
41086	SiteKey *string `json:"siteKey,omitempty"`
41087	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
41088	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
41089	// BgpProperties - The set of bgp properties.
41090	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
41091	// ProvisioningState - READ-ONLY; The provisioning state of the VPN site resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
41092	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
41093	// IsSecuritySite - IsSecuritySite flag.
41094	IsSecuritySite *bool `json:"isSecuritySite,omitempty"`
41095	// VpnSiteLinks - List of all vpn site links.
41096	VpnSiteLinks *[]VpnSiteLink `json:"vpnSiteLinks,omitempty"`
41097}
41098
41099// MarshalJSON is the custom marshaler for VpnSiteProperties.
41100func (vsp VpnSiteProperties) MarshalJSON() ([]byte, error) {
41101	objectMap := make(map[string]interface{})
41102	if vsp.VirtualWan != nil {
41103		objectMap["virtualWan"] = vsp.VirtualWan
41104	}
41105	if vsp.DeviceProperties != nil {
41106		objectMap["deviceProperties"] = vsp.DeviceProperties
41107	}
41108	if vsp.IPAddress != nil {
41109		objectMap["ipAddress"] = vsp.IPAddress
41110	}
41111	if vsp.SiteKey != nil {
41112		objectMap["siteKey"] = vsp.SiteKey
41113	}
41114	if vsp.AddressSpace != nil {
41115		objectMap["addressSpace"] = vsp.AddressSpace
41116	}
41117	if vsp.BgpProperties != nil {
41118		objectMap["bgpProperties"] = vsp.BgpProperties
41119	}
41120	if vsp.IsSecuritySite != nil {
41121		objectMap["isSecuritySite"] = vsp.IsSecuritySite
41122	}
41123	if vsp.VpnSiteLinks != nil {
41124		objectMap["vpnSiteLinks"] = vsp.VpnSiteLinks
41125	}
41126	return json.Marshal(objectMap)
41127}
41128
41129// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
41130// long-running operation.
41131type VpnSitesConfigurationDownloadFuture struct {
41132	azure.FutureAPI
41133	// Result returns the result of the asynchronous operation.
41134	// If the operation has not completed it will return an error.
41135	Result func(VpnSitesConfigurationClient) (autorest.Response, error)
41136}
41137
41138// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41139func (future *VpnSitesConfigurationDownloadFuture) UnmarshalJSON(body []byte) error {
41140	var azFuture azure.Future
41141	if err := json.Unmarshal(body, &azFuture); err != nil {
41142		return err
41143	}
41144	future.FutureAPI = &azFuture
41145	future.Result = future.result
41146	return nil
41147}
41148
41149// result is the default implementation for VpnSitesConfigurationDownloadFuture.Result.
41150func (future *VpnSitesConfigurationDownloadFuture) result(client VpnSitesConfigurationClient) (ar autorest.Response, err error) {
41151	var done bool
41152	done, err = future.DoneWithContext(context.Background(), client)
41153	if err != nil {
41154		err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure")
41155		return
41156	}
41157	if !done {
41158		ar.Response = future.Response()
41159		err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture")
41160		return
41161	}
41162	ar.Response = future.Response()
41163	return
41164}
41165
41166// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
41167// operation.
41168type VpnSitesCreateOrUpdateFuture struct {
41169	azure.FutureAPI
41170	// Result returns the result of the asynchronous operation.
41171	// If the operation has not completed it will return an error.
41172	Result func(VpnSitesClient) (VpnSite, error)
41173}
41174
41175// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41176func (future *VpnSitesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
41177	var azFuture azure.Future
41178	if err := json.Unmarshal(body, &azFuture); err != nil {
41179		return err
41180	}
41181	future.FutureAPI = &azFuture
41182	future.Result = future.result
41183	return nil
41184}
41185
41186// result is the default implementation for VpnSitesCreateOrUpdateFuture.Result.
41187func (future *VpnSitesCreateOrUpdateFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
41188	var done bool
41189	done, err = future.DoneWithContext(context.Background(), client)
41190	if err != nil {
41191		err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
41192		return
41193	}
41194	if !done {
41195		vs.Response.Response = future.Response()
41196		err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture")
41197		return
41198	}
41199	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41200	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
41201		vs, err = client.CreateOrUpdateResponder(vs.Response.Response)
41202		if err != nil {
41203			err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request")
41204		}
41205	}
41206	return
41207}
41208
41209// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
41210// operation.
41211type VpnSitesDeleteFuture struct {
41212	azure.FutureAPI
41213	// Result returns the result of the asynchronous operation.
41214	// If the operation has not completed it will return an error.
41215	Result func(VpnSitesClient) (autorest.Response, error)
41216}
41217
41218// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41219func (future *VpnSitesDeleteFuture) UnmarshalJSON(body []byte) error {
41220	var azFuture azure.Future
41221	if err := json.Unmarshal(body, &azFuture); err != nil {
41222		return err
41223	}
41224	future.FutureAPI = &azFuture
41225	future.Result = future.result
41226	return nil
41227}
41228
41229// result is the default implementation for VpnSitesDeleteFuture.Result.
41230func (future *VpnSitesDeleteFuture) result(client VpnSitesClient) (ar autorest.Response, err error) {
41231	var done bool
41232	done, err = future.DoneWithContext(context.Background(), client)
41233	if err != nil {
41234		err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure")
41235		return
41236	}
41237	if !done {
41238		ar.Response = future.Response()
41239		err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture")
41240		return
41241	}
41242	ar.Response = future.Response()
41243	return
41244}
41245
41246// Watcher network watcher in a resource group.
41247type Watcher struct {
41248	autorest.Response `json:"-"`
41249	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
41250	Etag *string `json:"etag,omitempty"`
41251	// WatcherPropertiesFormat - Properties of the network watcher.
41252	*WatcherPropertiesFormat `json:"properties,omitempty"`
41253	// ID - Resource ID.
41254	ID *string `json:"id,omitempty"`
41255	// Name - READ-ONLY; Resource name.
41256	Name *string `json:"name,omitempty"`
41257	// Type - READ-ONLY; Resource type.
41258	Type *string `json:"type,omitempty"`
41259	// Location - Resource location.
41260	Location *string `json:"location,omitempty"`
41261	// Tags - Resource tags.
41262	Tags map[string]*string `json:"tags"`
41263}
41264
41265// MarshalJSON is the custom marshaler for Watcher.
41266func (w Watcher) MarshalJSON() ([]byte, error) {
41267	objectMap := make(map[string]interface{})
41268	if w.WatcherPropertiesFormat != nil {
41269		objectMap["properties"] = w.WatcherPropertiesFormat
41270	}
41271	if w.ID != nil {
41272		objectMap["id"] = w.ID
41273	}
41274	if w.Location != nil {
41275		objectMap["location"] = w.Location
41276	}
41277	if w.Tags != nil {
41278		objectMap["tags"] = w.Tags
41279	}
41280	return json.Marshal(objectMap)
41281}
41282
41283// UnmarshalJSON is the custom unmarshaler for Watcher struct.
41284func (w *Watcher) UnmarshalJSON(body []byte) error {
41285	var m map[string]*json.RawMessage
41286	err := json.Unmarshal(body, &m)
41287	if err != nil {
41288		return err
41289	}
41290	for k, v := range m {
41291		switch k {
41292		case "etag":
41293			if v != nil {
41294				var etag string
41295				err = json.Unmarshal(*v, &etag)
41296				if err != nil {
41297					return err
41298				}
41299				w.Etag = &etag
41300			}
41301		case "properties":
41302			if v != nil {
41303				var watcherPropertiesFormat WatcherPropertiesFormat
41304				err = json.Unmarshal(*v, &watcherPropertiesFormat)
41305				if err != nil {
41306					return err
41307				}
41308				w.WatcherPropertiesFormat = &watcherPropertiesFormat
41309			}
41310		case "id":
41311			if v != nil {
41312				var ID string
41313				err = json.Unmarshal(*v, &ID)
41314				if err != nil {
41315					return err
41316				}
41317				w.ID = &ID
41318			}
41319		case "name":
41320			if v != nil {
41321				var name string
41322				err = json.Unmarshal(*v, &name)
41323				if err != nil {
41324					return err
41325				}
41326				w.Name = &name
41327			}
41328		case "type":
41329			if v != nil {
41330				var typeVar string
41331				err = json.Unmarshal(*v, &typeVar)
41332				if err != nil {
41333					return err
41334				}
41335				w.Type = &typeVar
41336			}
41337		case "location":
41338			if v != nil {
41339				var location string
41340				err = json.Unmarshal(*v, &location)
41341				if err != nil {
41342					return err
41343				}
41344				w.Location = &location
41345			}
41346		case "tags":
41347			if v != nil {
41348				var tags map[string]*string
41349				err = json.Unmarshal(*v, &tags)
41350				if err != nil {
41351					return err
41352				}
41353				w.Tags = tags
41354			}
41355		}
41356	}
41357
41358	return nil
41359}
41360
41361// WatcherListResult response for ListNetworkWatchers API service call.
41362type WatcherListResult struct {
41363	autorest.Response `json:"-"`
41364	// Value - List of network watcher resources.
41365	Value *[]Watcher `json:"value,omitempty"`
41366}
41367
41368// WatcherPropertiesFormat the network watcher properties.
41369type WatcherPropertiesFormat struct {
41370	// ProvisioningState - READ-ONLY; The provisioning state of the network watcher resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
41371	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
41372}
41373
41374// MarshalJSON is the custom marshaler for WatcherPropertiesFormat.
41375func (wpf WatcherPropertiesFormat) MarshalJSON() ([]byte, error) {
41376	objectMap := make(map[string]interface{})
41377	return json.Marshal(objectMap)
41378}
41379
41380// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
41381// long-running operation.
41382type WatchersCheckConnectivityFuture struct {
41383	azure.FutureAPI
41384	// Result returns the result of the asynchronous operation.
41385	// If the operation has not completed it will return an error.
41386	Result func(WatchersClient) (ConnectivityInformation, error)
41387}
41388
41389// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41390func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error {
41391	var azFuture azure.Future
41392	if err := json.Unmarshal(body, &azFuture); err != nil {
41393		return err
41394	}
41395	future.FutureAPI = &azFuture
41396	future.Result = future.result
41397	return nil
41398}
41399
41400// result is the default implementation for WatchersCheckConnectivityFuture.Result.
41401func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) {
41402	var done bool
41403	done, err = future.DoneWithContext(context.Background(), client)
41404	if err != nil {
41405		err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
41406		return
41407	}
41408	if !done {
41409		ci.Response.Response = future.Response()
41410		err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
41411		return
41412	}
41413	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41414	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
41415		ci, err = client.CheckConnectivityResponder(ci.Response.Response)
41416		if err != nil {
41417			err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
41418		}
41419	}
41420	return
41421}
41422
41423// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
41424// operation.
41425type WatchersDeleteFuture struct {
41426	azure.FutureAPI
41427	// Result returns the result of the asynchronous operation.
41428	// If the operation has not completed it will return an error.
41429	Result func(WatchersClient) (autorest.Response, error)
41430}
41431
41432// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41433func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error {
41434	var azFuture azure.Future
41435	if err := json.Unmarshal(body, &azFuture); err != nil {
41436		return err
41437	}
41438	future.FutureAPI = &azFuture
41439	future.Result = future.result
41440	return nil
41441}
41442
41443// result is the default implementation for WatchersDeleteFuture.Result.
41444func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) {
41445	var done bool
41446	done, err = future.DoneWithContext(context.Background(), client)
41447	if err != nil {
41448		err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
41449		return
41450	}
41451	if !done {
41452		ar.Response = future.Response()
41453		err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
41454		return
41455	}
41456	ar.Response = future.Response()
41457	return
41458}
41459
41460// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
41461// long-running operation.
41462type WatchersGetAzureReachabilityReportFuture struct {
41463	azure.FutureAPI
41464	// Result returns the result of the asynchronous operation.
41465	// If the operation has not completed it will return an error.
41466	Result func(WatchersClient) (AzureReachabilityReport, error)
41467}
41468
41469// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41470func (future *WatchersGetAzureReachabilityReportFuture) UnmarshalJSON(body []byte) error {
41471	var azFuture azure.Future
41472	if err := json.Unmarshal(body, &azFuture); err != nil {
41473		return err
41474	}
41475	future.FutureAPI = &azFuture
41476	future.Result = future.result
41477	return nil
41478}
41479
41480// result is the default implementation for WatchersGetAzureReachabilityReportFuture.Result.
41481func (future *WatchersGetAzureReachabilityReportFuture) result(client WatchersClient) (arr AzureReachabilityReport, err error) {
41482	var done bool
41483	done, err = future.DoneWithContext(context.Background(), client)
41484	if err != nil {
41485		err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
41486		return
41487	}
41488	if !done {
41489		arr.Response.Response = future.Response()
41490		err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
41491		return
41492	}
41493	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41494	if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
41495		arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
41496		if err != nil {
41497			err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
41498		}
41499	}
41500	return
41501}
41502
41503// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
41504// long-running operation.
41505type WatchersGetFlowLogStatusFuture struct {
41506	azure.FutureAPI
41507	// Result returns the result of the asynchronous operation.
41508	// If the operation has not completed it will return an error.
41509	Result func(WatchersClient) (FlowLogInformation, error)
41510}
41511
41512// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41513func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error {
41514	var azFuture azure.Future
41515	if err := json.Unmarshal(body, &azFuture); err != nil {
41516		return err
41517	}
41518	future.FutureAPI = &azFuture
41519	future.Result = future.result
41520	return nil
41521}
41522
41523// result is the default implementation for WatchersGetFlowLogStatusFuture.Result.
41524func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
41525	var done bool
41526	done, err = future.DoneWithContext(context.Background(), client)
41527	if err != nil {
41528		err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
41529		return
41530	}
41531	if !done {
41532		fli.Response.Response = future.Response()
41533		err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
41534		return
41535	}
41536	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41537	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
41538		fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
41539		if err != nil {
41540			err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
41541		}
41542	}
41543	return
41544}
41545
41546// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
41547// of a long-running operation.
41548type WatchersGetNetworkConfigurationDiagnosticFuture struct {
41549	azure.FutureAPI
41550	// Result returns the result of the asynchronous operation.
41551	// If the operation has not completed it will return an error.
41552	Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
41553}
41554
41555// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41556func (future *WatchersGetNetworkConfigurationDiagnosticFuture) UnmarshalJSON(body []byte) error {
41557	var azFuture azure.Future
41558	if err := json.Unmarshal(body, &azFuture); err != nil {
41559		return err
41560	}
41561	future.FutureAPI = &azFuture
41562	future.Result = future.result
41563	return nil
41564}
41565
41566// result is the default implementation for WatchersGetNetworkConfigurationDiagnosticFuture.Result.
41567func (future *WatchersGetNetworkConfigurationDiagnosticFuture) result(client WatchersClient) (cdr ConfigurationDiagnosticResponse, err error) {
41568	var done bool
41569	done, err = future.DoneWithContext(context.Background(), client)
41570	if err != nil {
41571		err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", future.Response(), "Polling failure")
41572		return
41573	}
41574	if !done {
41575		cdr.Response.Response = future.Response()
41576		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNetworkConfigurationDiagnosticFuture")
41577		return
41578	}
41579	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41580	if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent {
41581		cdr, err = client.GetNetworkConfigurationDiagnosticResponder(cdr.Response.Response)
41582		if err != nil {
41583			err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", cdr.Response.Response, "Failure responding to request")
41584		}
41585	}
41586	return
41587}
41588
41589// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
41590// operation.
41591type WatchersGetNextHopFuture struct {
41592	azure.FutureAPI
41593	// Result returns the result of the asynchronous operation.
41594	// If the operation has not completed it will return an error.
41595	Result func(WatchersClient) (NextHopResult, error)
41596}
41597
41598// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41599func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error {
41600	var azFuture azure.Future
41601	if err := json.Unmarshal(body, &azFuture); err != nil {
41602		return err
41603	}
41604	future.FutureAPI = &azFuture
41605	future.Result = future.result
41606	return nil
41607}
41608
41609// result is the default implementation for WatchersGetNextHopFuture.Result.
41610func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) {
41611	var done bool
41612	done, err = future.DoneWithContext(context.Background(), client)
41613	if err != nil {
41614		err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
41615		return
41616	}
41617	if !done {
41618		nhr.Response.Response = future.Response()
41619		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
41620		return
41621	}
41622	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41623	if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
41624		nhr, err = client.GetNextHopResponder(nhr.Response.Response)
41625		if err != nil {
41626			err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
41627		}
41628	}
41629	return
41630}
41631
41632// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
41633// long-running operation.
41634type WatchersGetTroubleshootingFuture struct {
41635	azure.FutureAPI
41636	// Result returns the result of the asynchronous operation.
41637	// If the operation has not completed it will return an error.
41638	Result func(WatchersClient) (TroubleshootingResult, error)
41639}
41640
41641// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41642func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error {
41643	var azFuture azure.Future
41644	if err := json.Unmarshal(body, &azFuture); err != nil {
41645		return err
41646	}
41647	future.FutureAPI = &azFuture
41648	future.Result = future.result
41649	return nil
41650}
41651
41652// result is the default implementation for WatchersGetTroubleshootingFuture.Result.
41653func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
41654	var done bool
41655	done, err = future.DoneWithContext(context.Background(), client)
41656	if err != nil {
41657		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
41658		return
41659	}
41660	if !done {
41661		tr.Response.Response = future.Response()
41662		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
41663		return
41664	}
41665	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41666	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
41667		tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
41668		if err != nil {
41669			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
41670		}
41671	}
41672	return
41673}
41674
41675// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
41676// long-running operation.
41677type WatchersGetTroubleshootingResultFuture struct {
41678	azure.FutureAPI
41679	// Result returns the result of the asynchronous operation.
41680	// If the operation has not completed it will return an error.
41681	Result func(WatchersClient) (TroubleshootingResult, error)
41682}
41683
41684// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41685func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error {
41686	var azFuture azure.Future
41687	if err := json.Unmarshal(body, &azFuture); err != nil {
41688		return err
41689	}
41690	future.FutureAPI = &azFuture
41691	future.Result = future.result
41692	return nil
41693}
41694
41695// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result.
41696func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
41697	var done bool
41698	done, err = future.DoneWithContext(context.Background(), client)
41699	if err != nil {
41700		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
41701		return
41702	}
41703	if !done {
41704		tr.Response.Response = future.Response()
41705		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
41706		return
41707	}
41708	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41709	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
41710		tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
41711		if err != nil {
41712			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
41713		}
41714	}
41715	return
41716}
41717
41718// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
41719// long-running operation.
41720type WatchersGetVMSecurityRulesFuture struct {
41721	azure.FutureAPI
41722	// Result returns the result of the asynchronous operation.
41723	// If the operation has not completed it will return an error.
41724	Result func(WatchersClient) (SecurityGroupViewResult, error)
41725}
41726
41727// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41728func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error {
41729	var azFuture azure.Future
41730	if err := json.Unmarshal(body, &azFuture); err != nil {
41731		return err
41732	}
41733	future.FutureAPI = &azFuture
41734	future.Result = future.result
41735	return nil
41736}
41737
41738// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result.
41739func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
41740	var done bool
41741	done, err = future.DoneWithContext(context.Background(), client)
41742	if err != nil {
41743		err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
41744		return
41745	}
41746	if !done {
41747		sgvr.Response.Response = future.Response()
41748		err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
41749		return
41750	}
41751	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41752	if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
41753		sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
41754		if err != nil {
41755			err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
41756		}
41757	}
41758	return
41759}
41760
41761// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
41762// long-running operation.
41763type WatchersListAvailableProvidersFuture struct {
41764	azure.FutureAPI
41765	// Result returns the result of the asynchronous operation.
41766	// If the operation has not completed it will return an error.
41767	Result func(WatchersClient) (AvailableProvidersList, error)
41768}
41769
41770// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41771func (future *WatchersListAvailableProvidersFuture) UnmarshalJSON(body []byte) error {
41772	var azFuture azure.Future
41773	if err := json.Unmarshal(body, &azFuture); err != nil {
41774		return err
41775	}
41776	future.FutureAPI = &azFuture
41777	future.Result = future.result
41778	return nil
41779}
41780
41781// result is the default implementation for WatchersListAvailableProvidersFuture.Result.
41782func (future *WatchersListAvailableProvidersFuture) result(client WatchersClient) (apl AvailableProvidersList, err error) {
41783	var done bool
41784	done, err = future.DoneWithContext(context.Background(), client)
41785	if err != nil {
41786		err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
41787		return
41788	}
41789	if !done {
41790		apl.Response.Response = future.Response()
41791		err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
41792		return
41793	}
41794	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41795	if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
41796		apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
41797		if err != nil {
41798			err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
41799		}
41800	}
41801	return
41802}
41803
41804// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
41805// long-running operation.
41806type WatchersSetFlowLogConfigurationFuture struct {
41807	azure.FutureAPI
41808	// Result returns the result of the asynchronous operation.
41809	// If the operation has not completed it will return an error.
41810	Result func(WatchersClient) (FlowLogInformation, error)
41811}
41812
41813// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41814func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error {
41815	var azFuture azure.Future
41816	if err := json.Unmarshal(body, &azFuture); err != nil {
41817		return err
41818	}
41819	future.FutureAPI = &azFuture
41820	future.Result = future.result
41821	return nil
41822}
41823
41824// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result.
41825func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
41826	var done bool
41827	done, err = future.DoneWithContext(context.Background(), client)
41828	if err != nil {
41829		err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
41830		return
41831	}
41832	if !done {
41833		fli.Response.Response = future.Response()
41834		err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
41835		return
41836	}
41837	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41838	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
41839		fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
41840		if err != nil {
41841			err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
41842		}
41843	}
41844	return
41845}
41846
41847// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
41848// operation.
41849type WatchersVerifyIPFlowFuture struct {
41850	azure.FutureAPI
41851	// Result returns the result of the asynchronous operation.
41852	// If the operation has not completed it will return an error.
41853	Result func(WatchersClient) (VerificationIPFlowResult, error)
41854}
41855
41856// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41857func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error {
41858	var azFuture azure.Future
41859	if err := json.Unmarshal(body, &azFuture); err != nil {
41860		return err
41861	}
41862	future.FutureAPI = &azFuture
41863	future.Result = future.result
41864	return nil
41865}
41866
41867// result is the default implementation for WatchersVerifyIPFlowFuture.Result.
41868func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
41869	var done bool
41870	done, err = future.DoneWithContext(context.Background(), client)
41871	if err != nil {
41872		err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
41873		return
41874	}
41875	if !done {
41876		vifr.Response.Response = future.Response()
41877		err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
41878		return
41879	}
41880	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
41881	if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
41882		vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
41883		if err != nil {
41884			err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
41885		}
41886	}
41887	return
41888}
41889
41890// WebApplicationFirewallCustomRule defines contents of a web application rule.
41891type WebApplicationFirewallCustomRule struct {
41892	// Name - The name of the resource that is unique within a policy. This name can be used to access the resource.
41893	Name *string `json:"name,omitempty"`
41894	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
41895	Etag *string `json:"etag,omitempty"`
41896	// Priority - Priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
41897	Priority *int32 `json:"priority,omitempty"`
41898	// RuleType - The rule type. Possible values include: 'WebApplicationFirewallRuleTypeMatchRule', 'WebApplicationFirewallRuleTypeInvalid'
41899	RuleType WebApplicationFirewallRuleType `json:"ruleType,omitempty"`
41900	// MatchConditions - List of match conditions.
41901	MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"`
41902	// Action - Type of Actions. Possible values include: 'WebApplicationFirewallActionAllow', 'WebApplicationFirewallActionBlock', 'WebApplicationFirewallActionLog'
41903	Action WebApplicationFirewallAction `json:"action,omitempty"`
41904}
41905
41906// MarshalJSON is the custom marshaler for WebApplicationFirewallCustomRule.
41907func (wafcr WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) {
41908	objectMap := make(map[string]interface{})
41909	if wafcr.Name != nil {
41910		objectMap["name"] = wafcr.Name
41911	}
41912	if wafcr.Priority != nil {
41913		objectMap["priority"] = wafcr.Priority
41914	}
41915	if wafcr.RuleType != "" {
41916		objectMap["ruleType"] = wafcr.RuleType
41917	}
41918	if wafcr.MatchConditions != nil {
41919		objectMap["matchConditions"] = wafcr.MatchConditions
41920	}
41921	if wafcr.Action != "" {
41922		objectMap["action"] = wafcr.Action
41923	}
41924	return json.Marshal(objectMap)
41925}
41926
41927// WebApplicationFirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
41928// long-running operation.
41929type WebApplicationFirewallPoliciesDeleteFuture struct {
41930	azure.FutureAPI
41931	// Result returns the result of the asynchronous operation.
41932	// If the operation has not completed it will return an error.
41933	Result func(WebApplicationFirewallPoliciesClient) (autorest.Response, error)
41934}
41935
41936// UnmarshalJSON is the custom unmarshaller for CreateFuture.
41937func (future *WebApplicationFirewallPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
41938	var azFuture azure.Future
41939	if err := json.Unmarshal(body, &azFuture); err != nil {
41940		return err
41941	}
41942	future.FutureAPI = &azFuture
41943	future.Result = future.result
41944	return nil
41945}
41946
41947// result is the default implementation for WebApplicationFirewallPoliciesDeleteFuture.Result.
41948func (future *WebApplicationFirewallPoliciesDeleteFuture) result(client WebApplicationFirewallPoliciesClient) (ar autorest.Response, err error) {
41949	var done bool
41950	done, err = future.DoneWithContext(context.Background(), client)
41951	if err != nil {
41952		err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
41953		return
41954	}
41955	if !done {
41956		ar.Response = future.Response()
41957		err = azure.NewAsyncOpIncompleteError("network.WebApplicationFirewallPoliciesDeleteFuture")
41958		return
41959	}
41960	ar.Response = future.Response()
41961	return
41962}
41963
41964// WebApplicationFirewallPolicy defines web application firewall policy.
41965type WebApplicationFirewallPolicy struct {
41966	autorest.Response `json:"-"`
41967	// WebApplicationFirewallPolicyPropertiesFormat - Properties of the web application firewall policy.
41968	*WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"`
41969	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
41970	Etag *string `json:"etag,omitempty"`
41971	// ID - Resource ID.
41972	ID *string `json:"id,omitempty"`
41973	// Name - READ-ONLY; Resource name.
41974	Name *string `json:"name,omitempty"`
41975	// Type - READ-ONLY; Resource type.
41976	Type *string `json:"type,omitempty"`
41977	// Location - Resource location.
41978	Location *string `json:"location,omitempty"`
41979	// Tags - Resource tags.
41980	Tags map[string]*string `json:"tags"`
41981}
41982
41983// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicy.
41984func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) {
41985	objectMap := make(map[string]interface{})
41986	if wafp.WebApplicationFirewallPolicyPropertiesFormat != nil {
41987		objectMap["properties"] = wafp.WebApplicationFirewallPolicyPropertiesFormat
41988	}
41989	if wafp.ID != nil {
41990		objectMap["id"] = wafp.ID
41991	}
41992	if wafp.Location != nil {
41993		objectMap["location"] = wafp.Location
41994	}
41995	if wafp.Tags != nil {
41996		objectMap["tags"] = wafp.Tags
41997	}
41998	return json.Marshal(objectMap)
41999}
42000
42001// UnmarshalJSON is the custom unmarshaler for WebApplicationFirewallPolicy struct.
42002func (wafp *WebApplicationFirewallPolicy) UnmarshalJSON(body []byte) error {
42003	var m map[string]*json.RawMessage
42004	err := json.Unmarshal(body, &m)
42005	if err != nil {
42006		return err
42007	}
42008	for k, v := range m {
42009		switch k {
42010		case "properties":
42011			if v != nil {
42012				var webApplicationFirewallPolicyPropertiesFormat WebApplicationFirewallPolicyPropertiesFormat
42013				err = json.Unmarshal(*v, &webApplicationFirewallPolicyPropertiesFormat)
42014				if err != nil {
42015					return err
42016				}
42017				wafp.WebApplicationFirewallPolicyPropertiesFormat = &webApplicationFirewallPolicyPropertiesFormat
42018			}
42019		case "etag":
42020			if v != nil {
42021				var etag string
42022				err = json.Unmarshal(*v, &etag)
42023				if err != nil {
42024					return err
42025				}
42026				wafp.Etag = &etag
42027			}
42028		case "id":
42029			if v != nil {
42030				var ID string
42031				err = json.Unmarshal(*v, &ID)
42032				if err != nil {
42033					return err
42034				}
42035				wafp.ID = &ID
42036			}
42037		case "name":
42038			if v != nil {
42039				var name string
42040				err = json.Unmarshal(*v, &name)
42041				if err != nil {
42042					return err
42043				}
42044				wafp.Name = &name
42045			}
42046		case "type":
42047			if v != nil {
42048				var typeVar string
42049				err = json.Unmarshal(*v, &typeVar)
42050				if err != nil {
42051					return err
42052				}
42053				wafp.Type = &typeVar
42054			}
42055		case "location":
42056			if v != nil {
42057				var location string
42058				err = json.Unmarshal(*v, &location)
42059				if err != nil {
42060					return err
42061				}
42062				wafp.Location = &location
42063			}
42064		case "tags":
42065			if v != nil {
42066				var tags map[string]*string
42067				err = json.Unmarshal(*v, &tags)
42068				if err != nil {
42069					return err
42070				}
42071				wafp.Tags = tags
42072			}
42073		}
42074	}
42075
42076	return nil
42077}
42078
42079// WebApplicationFirewallPolicyListResult result of the request to list WebApplicationFirewallPolicies. It
42080// contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results.
42081type WebApplicationFirewallPolicyListResult struct {
42082	autorest.Response `json:"-"`
42083	// Value - READ-ONLY; List of WebApplicationFirewallPolicies within a resource group.
42084	Value *[]WebApplicationFirewallPolicy `json:"value,omitempty"`
42085	// NextLink - READ-ONLY; URL to get the next set of WebApplicationFirewallPolicy objects if there are any.
42086	NextLink *string `json:"nextLink,omitempty"`
42087}
42088
42089// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyListResult.
42090func (wafplr WebApplicationFirewallPolicyListResult) MarshalJSON() ([]byte, error) {
42091	objectMap := make(map[string]interface{})
42092	return json.Marshal(objectMap)
42093}
42094
42095// WebApplicationFirewallPolicyListResultIterator provides access to a complete listing of
42096// WebApplicationFirewallPolicy values.
42097type WebApplicationFirewallPolicyListResultIterator struct {
42098	i    int
42099	page WebApplicationFirewallPolicyListResultPage
42100}
42101
42102// NextWithContext advances to the next value.  If there was an error making
42103// the request the iterator does not advance and the error is returned.
42104func (iter *WebApplicationFirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
42105	if tracing.IsEnabled() {
42106		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultIterator.NextWithContext")
42107		defer func() {
42108			sc := -1
42109			if iter.Response().Response.Response != nil {
42110				sc = iter.Response().Response.Response.StatusCode
42111			}
42112			tracing.EndSpan(ctx, sc, err)
42113		}()
42114	}
42115	iter.i++
42116	if iter.i < len(iter.page.Values()) {
42117		return nil
42118	}
42119	err = iter.page.NextWithContext(ctx)
42120	if err != nil {
42121		iter.i--
42122		return err
42123	}
42124	iter.i = 0
42125	return nil
42126}
42127
42128// Next advances to the next value.  If there was an error making
42129// the request the iterator does not advance and the error is returned.
42130// Deprecated: Use NextWithContext() instead.
42131func (iter *WebApplicationFirewallPolicyListResultIterator) Next() error {
42132	return iter.NextWithContext(context.Background())
42133}
42134
42135// NotDone returns true if the enumeration should be started or is not yet complete.
42136func (iter WebApplicationFirewallPolicyListResultIterator) NotDone() bool {
42137	return iter.page.NotDone() && iter.i < len(iter.page.Values())
42138}
42139
42140// Response returns the raw server response from the last page request.
42141func (iter WebApplicationFirewallPolicyListResultIterator) Response() WebApplicationFirewallPolicyListResult {
42142	return iter.page.Response()
42143}
42144
42145// Value returns the current value or a zero-initialized value if the
42146// iterator has advanced beyond the end of the collection.
42147func (iter WebApplicationFirewallPolicyListResultIterator) Value() WebApplicationFirewallPolicy {
42148	if !iter.page.NotDone() {
42149		return WebApplicationFirewallPolicy{}
42150	}
42151	return iter.page.Values()[iter.i]
42152}
42153
42154// Creates a new instance of the WebApplicationFirewallPolicyListResultIterator type.
42155func NewWebApplicationFirewallPolicyListResultIterator(page WebApplicationFirewallPolicyListResultPage) WebApplicationFirewallPolicyListResultIterator {
42156	return WebApplicationFirewallPolicyListResultIterator{page: page}
42157}
42158
42159// IsEmpty returns true if the ListResult contains no values.
42160func (wafplr WebApplicationFirewallPolicyListResult) IsEmpty() bool {
42161	return wafplr.Value == nil || len(*wafplr.Value) == 0
42162}
42163
42164// hasNextLink returns true if the NextLink is not empty.
42165func (wafplr WebApplicationFirewallPolicyListResult) hasNextLink() bool {
42166	return wafplr.NextLink != nil && len(*wafplr.NextLink) != 0
42167}
42168
42169// webApplicationFirewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
42170// It returns nil if no more results exist.
42171func (wafplr WebApplicationFirewallPolicyListResult) webApplicationFirewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
42172	if !wafplr.hasNextLink() {
42173		return nil, nil
42174	}
42175	return autorest.Prepare((&http.Request{}).WithContext(ctx),
42176		autorest.AsJSON(),
42177		autorest.AsGet(),
42178		autorest.WithBaseURL(to.String(wafplr.NextLink)))
42179}
42180
42181// WebApplicationFirewallPolicyListResultPage contains a page of WebApplicationFirewallPolicy values.
42182type WebApplicationFirewallPolicyListResultPage struct {
42183	fn     func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)
42184	wafplr WebApplicationFirewallPolicyListResult
42185}
42186
42187// NextWithContext advances to the next page of values.  If there was an error making
42188// the request the page does not advance and the error is returned.
42189func (page *WebApplicationFirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
42190	if tracing.IsEnabled() {
42191		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultPage.NextWithContext")
42192		defer func() {
42193			sc := -1
42194			if page.Response().Response.Response != nil {
42195				sc = page.Response().Response.Response.StatusCode
42196			}
42197			tracing.EndSpan(ctx, sc, err)
42198		}()
42199	}
42200	for {
42201		next, err := page.fn(ctx, page.wafplr)
42202		if err != nil {
42203			return err
42204		}
42205		page.wafplr = next
42206		if !next.hasNextLink() || !next.IsEmpty() {
42207			break
42208		}
42209	}
42210	return nil
42211}
42212
42213// Next advances to the next page of values.  If there was an error making
42214// the request the page does not advance and the error is returned.
42215// Deprecated: Use NextWithContext() instead.
42216func (page *WebApplicationFirewallPolicyListResultPage) Next() error {
42217	return page.NextWithContext(context.Background())
42218}
42219
42220// NotDone returns true if the page enumeration should be started or is not yet complete.
42221func (page WebApplicationFirewallPolicyListResultPage) NotDone() bool {
42222	return !page.wafplr.IsEmpty()
42223}
42224
42225// Response returns the raw server response from the last page request.
42226func (page WebApplicationFirewallPolicyListResultPage) Response() WebApplicationFirewallPolicyListResult {
42227	return page.wafplr
42228}
42229
42230// Values returns the slice of values for the current page or nil if there are no values.
42231func (page WebApplicationFirewallPolicyListResultPage) Values() []WebApplicationFirewallPolicy {
42232	if page.wafplr.IsEmpty() {
42233		return nil
42234	}
42235	return *page.wafplr.Value
42236}
42237
42238// Creates a new instance of the WebApplicationFirewallPolicyListResultPage type.
42239func NewWebApplicationFirewallPolicyListResultPage(cur WebApplicationFirewallPolicyListResult, getNextPage func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)) WebApplicationFirewallPolicyListResultPage {
42240	return WebApplicationFirewallPolicyListResultPage{
42241		fn:     getNextPage,
42242		wafplr: cur,
42243	}
42244}
42245
42246// WebApplicationFirewallPolicyPropertiesFormat defines web application firewall policy properties.
42247type WebApplicationFirewallPolicyPropertiesFormat struct {
42248	// PolicySettings - The PolicySettings for policy.
42249	PolicySettings *PolicySettings `json:"policySettings,omitempty"`
42250	// CustomRules - The custom rules inside the policy.
42251	CustomRules *[]WebApplicationFirewallCustomRule `json:"customRules,omitempty"`
42252	// ApplicationGateways - READ-ONLY; A collection of references to application gateways.
42253	ApplicationGateways *[]ApplicationGateway `json:"applicationGateways,omitempty"`
42254	// ProvisioningState - READ-ONLY; The provisioning state of the web application firewall policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
42255	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
42256	// ResourceState - READ-ONLY; Resource status of the policy. Possible values include: 'WebApplicationFirewallPolicyResourceStateCreating', 'WebApplicationFirewallPolicyResourceStateEnabling', 'WebApplicationFirewallPolicyResourceStateEnabled', 'WebApplicationFirewallPolicyResourceStateDisabling', 'WebApplicationFirewallPolicyResourceStateDisabled', 'WebApplicationFirewallPolicyResourceStateDeleting'
42257	ResourceState WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"`
42258	// ManagedRules - Describes the managedRules structure.
42259	ManagedRules *ManagedRulesDefinition `json:"managedRules,omitempty"`
42260	// HTTPListeners - READ-ONLY; A collection of references to application gateway http listeners.
42261	HTTPListeners *[]SubResource `json:"httpListeners,omitempty"`
42262	// PathBasedRules - READ-ONLY; A collection of references to application gateway path rules.
42263	PathBasedRules *[]SubResource `json:"pathBasedRules,omitempty"`
42264}
42265
42266// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyPropertiesFormat.
42267func (wafppf WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
42268	objectMap := make(map[string]interface{})
42269	if wafppf.PolicySettings != nil {
42270		objectMap["policySettings"] = wafppf.PolicySettings
42271	}
42272	if wafppf.CustomRules != nil {
42273		objectMap["customRules"] = wafppf.CustomRules
42274	}
42275	if wafppf.ManagedRules != nil {
42276		objectMap["managedRules"] = wafppf.ManagedRules
42277	}
42278	return json.Marshal(objectMap)
42279}
42280