1package network
2
3// Copyright (c) Microsoft and contributors.  All rights reserved.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13//
14// See the License for the specific language governing permissions and
15// limitations under the License.
16//
17// Code generated by Microsoft (R) AutoRest Code Generator.
18// Changes may cause incorrect behavior and will be lost if the code is regenerated.
19
20import (
21	"context"
22	"encoding/json"
23	"github.com/Azure/go-autorest/autorest"
24	"github.com/Azure/go-autorest/autorest/azure"
25	"github.com/Azure/go-autorest/autorest/date"
26	"github.com/Azure/go-autorest/autorest/to"
27	"github.com/Azure/go-autorest/tracing"
28	"net/http"
29)
30
31// The package's fully qualified name.
32const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-05-01/network"
33
34// AadAuthenticationParameters AAD Vpn authentication type related parameters.
35type AadAuthenticationParameters struct {
36	// AadTenant - AAD Vpn authentication parameter AAD tenant.
37	AadTenant *string `json:"aadTenant,omitempty"`
38	// AadAudience - AAD Vpn authentication parameter AAD audience.
39	AadAudience *string `json:"aadAudience,omitempty"`
40	// AadIssuer - AAD Vpn authentication parameter AAD issuer.
41	AadIssuer *string `json:"aadIssuer,omitempty"`
42}
43
44// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the
45// virtual network.
46type AddressSpace struct {
47	// AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation.
48	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
49}
50
51// ApplicationGateway application gateway resource.
52type ApplicationGateway struct {
53	autorest.Response `json:"-"`
54	// ApplicationGatewayPropertiesFormat - Properties of the application gateway.
55	*ApplicationGatewayPropertiesFormat `json:"properties,omitempty"`
56	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
57	Etag *string `json:"etag,omitempty"`
58	// Zones - A list of availability zones denoting where the resource needs to come from.
59	Zones *[]string `json:"zones,omitempty"`
60	// Identity - The identity of the application gateway, if configured.
61	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
62	// ID - Resource ID.
63	ID *string `json:"id,omitempty"`
64	// Name - READ-ONLY; Resource name.
65	Name *string `json:"name,omitempty"`
66	// Type - READ-ONLY; Resource type.
67	Type *string `json:"type,omitempty"`
68	// Location - Resource location.
69	Location *string `json:"location,omitempty"`
70	// Tags - Resource tags.
71	Tags map[string]*string `json:"tags"`
72}
73
74// MarshalJSON is the custom marshaler for ApplicationGateway.
75func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
76	objectMap := make(map[string]interface{})
77	if ag.ApplicationGatewayPropertiesFormat != nil {
78		objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
79	}
80	if ag.Zones != nil {
81		objectMap["zones"] = ag.Zones
82	}
83	if ag.Identity != nil {
84		objectMap["identity"] = ag.Identity
85	}
86	if ag.ID != nil {
87		objectMap["id"] = ag.ID
88	}
89	if ag.Location != nil {
90		objectMap["location"] = ag.Location
91	}
92	if ag.Tags != nil {
93		objectMap["tags"] = ag.Tags
94	}
95	return json.Marshal(objectMap)
96}
97
98// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
99func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
100	var m map[string]*json.RawMessage
101	err := json.Unmarshal(body, &m)
102	if err != nil {
103		return err
104	}
105	for k, v := range m {
106		switch k {
107		case "properties":
108			if v != nil {
109				var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
110				err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
111				if err != nil {
112					return err
113				}
114				ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
115			}
116		case "etag":
117			if v != nil {
118				var etag string
119				err = json.Unmarshal(*v, &etag)
120				if err != nil {
121					return err
122				}
123				ag.Etag = &etag
124			}
125		case "zones":
126			if v != nil {
127				var zones []string
128				err = json.Unmarshal(*v, &zones)
129				if err != nil {
130					return err
131				}
132				ag.Zones = &zones
133			}
134		case "identity":
135			if v != nil {
136				var identity ManagedServiceIdentity
137				err = json.Unmarshal(*v, &identity)
138				if err != nil {
139					return err
140				}
141				ag.Identity = &identity
142			}
143		case "id":
144			if v != nil {
145				var ID string
146				err = json.Unmarshal(*v, &ID)
147				if err != nil {
148					return err
149				}
150				ag.ID = &ID
151			}
152		case "name":
153			if v != nil {
154				var name string
155				err = json.Unmarshal(*v, &name)
156				if err != nil {
157					return err
158				}
159				ag.Name = &name
160			}
161		case "type":
162			if v != nil {
163				var typeVar string
164				err = json.Unmarshal(*v, &typeVar)
165				if err != nil {
166					return err
167				}
168				ag.Type = &typeVar
169			}
170		case "location":
171			if v != nil {
172				var location string
173				err = json.Unmarshal(*v, &location)
174				if err != nil {
175					return err
176				}
177				ag.Location = &location
178			}
179		case "tags":
180			if v != nil {
181				var tags map[string]*string
182				err = json.Unmarshal(*v, &tags)
183				if err != nil {
184					return err
185				}
186				ag.Tags = tags
187			}
188		}
189	}
190
191	return nil
192}
193
194// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
195type ApplicationGatewayAuthenticationCertificate struct {
196	// ApplicationGatewayAuthenticationCertificatePropertiesFormat - Properties of the application gateway authentication certificate.
197	*ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
198	// Name - Name of the authentication certificate that is unique within an Application Gateway.
199	Name *string `json:"name,omitempty"`
200	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
201	Etag *string `json:"etag,omitempty"`
202	// Type - READ-ONLY; Type of the resource.
203	Type *string `json:"type,omitempty"`
204	// ID - Resource ID.
205	ID *string `json:"id,omitempty"`
206}
207
208// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
209func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
210	objectMap := make(map[string]interface{})
211	if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
212		objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
213	}
214	if agac.Name != nil {
215		objectMap["name"] = agac.Name
216	}
217	if agac.ID != nil {
218		objectMap["id"] = agac.ID
219	}
220	return json.Marshal(objectMap)
221}
222
223// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
224func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error {
225	var m map[string]*json.RawMessage
226	err := json.Unmarshal(body, &m)
227	if err != nil {
228		return err
229	}
230	for k, v := range m {
231		switch k {
232		case "properties":
233			if v != nil {
234				var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
235				err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
236				if err != nil {
237					return err
238				}
239				agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
240			}
241		case "name":
242			if v != nil {
243				var name string
244				err = json.Unmarshal(*v, &name)
245				if err != nil {
246					return err
247				}
248				agac.Name = &name
249			}
250		case "etag":
251			if v != nil {
252				var etag string
253				err = json.Unmarshal(*v, &etag)
254				if err != nil {
255					return err
256				}
257				agac.Etag = &etag
258			}
259		case "type":
260			if v != nil {
261				var typeVar string
262				err = json.Unmarshal(*v, &typeVar)
263				if err != nil {
264					return err
265				}
266				agac.Type = &typeVar
267			}
268		case "id":
269			if v != nil {
270				var ID string
271				err = json.Unmarshal(*v, &ID)
272				if err != nil {
273					return err
274				}
275				agac.ID = &ID
276			}
277		}
278	}
279
280	return nil
281}
282
283// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
284// application gateway.
285type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
286	// Data - Certificate public data.
287	Data *string `json:"data,omitempty"`
288	// ProvisioningState - READ-ONLY; The provisioning state of the authentication certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
289	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
290}
291
292// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificatePropertiesFormat.
293func (agacpf ApplicationGatewayAuthenticationCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
294	objectMap := make(map[string]interface{})
295	if agacpf.Data != nil {
296		objectMap["data"] = agacpf.Data
297	}
298	return json.Marshal(objectMap)
299}
300
301// ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration.
302type ApplicationGatewayAutoscaleConfiguration struct {
303	// MinCapacity - Lower bound on number of Application Gateway capacity.
304	MinCapacity *int32 `json:"minCapacity,omitempty"`
305	// MaxCapacity - Upper bound on number of Application Gateway capacity.
306	MaxCapacity *int32 `json:"maxCapacity,omitempty"`
307}
308
309// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
310// call.
311type ApplicationGatewayAvailableSslOptions struct {
312	autorest.Response `json:"-"`
313	// ApplicationGatewayAvailableSslOptionsPropertiesFormat - Properties of the application gateway available SSL options.
314	*ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
315	// ID - Resource ID.
316	ID *string `json:"id,omitempty"`
317	// Name - READ-ONLY; Resource name.
318	Name *string `json:"name,omitempty"`
319	// Type - READ-ONLY; Resource type.
320	Type *string `json:"type,omitempty"`
321	// Location - Resource location.
322	Location *string `json:"location,omitempty"`
323	// Tags - Resource tags.
324	Tags map[string]*string `json:"tags"`
325}
326
327// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions.
328func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
329	objectMap := make(map[string]interface{})
330	if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
331		objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
332	}
333	if agaso.ID != nil {
334		objectMap["id"] = agaso.ID
335	}
336	if agaso.Location != nil {
337		objectMap["location"] = agaso.Location
338	}
339	if agaso.Tags != nil {
340		objectMap["tags"] = agaso.Tags
341	}
342	return json.Marshal(objectMap)
343}
344
345// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
346func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error {
347	var m map[string]*json.RawMessage
348	err := json.Unmarshal(body, &m)
349	if err != nil {
350		return err
351	}
352	for k, v := range m {
353		switch k {
354		case "properties":
355			if v != nil {
356				var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
357				err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
358				if err != nil {
359					return err
360				}
361				agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
362			}
363		case "id":
364			if v != nil {
365				var ID string
366				err = json.Unmarshal(*v, &ID)
367				if err != nil {
368					return err
369				}
370				agaso.ID = &ID
371			}
372		case "name":
373			if v != nil {
374				var name string
375				err = json.Unmarshal(*v, &name)
376				if err != nil {
377					return err
378				}
379				agaso.Name = &name
380			}
381		case "type":
382			if v != nil {
383				var typeVar string
384				err = json.Unmarshal(*v, &typeVar)
385				if err != nil {
386					return err
387				}
388				agaso.Type = &typeVar
389			}
390		case "location":
391			if v != nil {
392				var location string
393				err = json.Unmarshal(*v, &location)
394				if err != nil {
395					return err
396				}
397				agaso.Location = &location
398			}
399		case "tags":
400			if v != nil {
401				var tags map[string]*string
402				err = json.Unmarshal(*v, &tags)
403				if err != nil {
404					return err
405				}
406				agaso.Tags = tags
407			}
408		}
409	}
410
411	return nil
412}
413
414// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
415// ApplicationGatewayAvailableSslOptions.
416type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
417	// PredefinedPolicies - List of available Ssl predefined policy.
418	PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
419	// DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
420	DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
421	// AvailableCipherSuites - List of available Ssl cipher suites.
422	AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
423	// AvailableProtocols - List of available Ssl protocols.
424	AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
425}
426
427// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
428// service call.
429type ApplicationGatewayAvailableSslPredefinedPolicies struct {
430	autorest.Response `json:"-"`
431	// Value - List of available Ssl predefined policy.
432	Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
433	// NextLink - URL to get the next set of results.
434	NextLink *string `json:"nextLink,omitempty"`
435}
436
437// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
438// ApplicationGatewaySslPredefinedPolicy values.
439type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
440	i    int
441	page ApplicationGatewayAvailableSslPredefinedPoliciesPage
442}
443
444// NextWithContext advances to the next value.  If there was an error making
445// the request the iterator does not advance and the error is returned.
446func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
447	if tracing.IsEnabled() {
448		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext")
449		defer func() {
450			sc := -1
451			if iter.Response().Response.Response != nil {
452				sc = iter.Response().Response.Response.StatusCode
453			}
454			tracing.EndSpan(ctx, sc, err)
455		}()
456	}
457	iter.i++
458	if iter.i < len(iter.page.Values()) {
459		return nil
460	}
461	err = iter.page.NextWithContext(ctx)
462	if err != nil {
463		iter.i--
464		return err
465	}
466	iter.i = 0
467	return nil
468}
469
470// Next advances to the next value.  If there was an error making
471// the request the iterator does not advance and the error is returned.
472// Deprecated: Use NextWithContext() instead.
473func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
474	return iter.NextWithContext(context.Background())
475}
476
477// NotDone returns true if the enumeration should be started or is not yet complete.
478func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
479	return iter.page.NotDone() && iter.i < len(iter.page.Values())
480}
481
482// Response returns the raw server response from the last page request.
483func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
484	return iter.page.Response()
485}
486
487// Value returns the current value or a zero-initialized value if the
488// iterator has advanced beyond the end of the collection.
489func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
490	if !iter.page.NotDone() {
491		return ApplicationGatewaySslPredefinedPolicy{}
492	}
493	return iter.page.Values()[iter.i]
494}
495
496// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
497func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
498	return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
499}
500
501// IsEmpty returns true if the ListResult contains no values.
502func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
503	return agaspp.Value == nil || len(*agaspp.Value) == 0
504}
505
506// hasNextLink returns true if the NextLink is not empty.
507func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool {
508	return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0
509}
510
511// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
512// It returns nil if no more results exist.
513func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
514	if !agaspp.hasNextLink() {
515		return nil, nil
516	}
517	return autorest.Prepare((&http.Request{}).WithContext(ctx),
518		autorest.AsJSON(),
519		autorest.AsGet(),
520		autorest.WithBaseURL(to.String(agaspp.NextLink)))
521}
522
523// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
524// ApplicationGatewaySslPredefinedPolicy values.
525type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
526	fn     func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
527	agaspp ApplicationGatewayAvailableSslPredefinedPolicies
528}
529
530// NextWithContext advances to the next page of values.  If there was an error making
531// the request the page does not advance and the error is returned.
532func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
533	if tracing.IsEnabled() {
534		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext")
535		defer func() {
536			sc := -1
537			if page.Response().Response.Response != nil {
538				sc = page.Response().Response.Response.StatusCode
539			}
540			tracing.EndSpan(ctx, sc, err)
541		}()
542	}
543	for {
544		next, err := page.fn(ctx, page.agaspp)
545		if err != nil {
546			return err
547		}
548		page.agaspp = next
549		if !next.hasNextLink() || !next.IsEmpty() {
550			break
551		}
552	}
553	return nil
554}
555
556// Next advances to the next page of values.  If there was an error making
557// the request the page does not advance and the error is returned.
558// Deprecated: Use NextWithContext() instead.
559func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
560	return page.NextWithContext(context.Background())
561}
562
563// NotDone returns true if the page enumeration should be started or is not yet complete.
564func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
565	return !page.agaspp.IsEmpty()
566}
567
568// Response returns the raw server response from the last page request.
569func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
570	return page.agaspp
571}
572
573// Values returns the slice of values for the current page or nil if there are no values.
574func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
575	if page.agaspp.IsEmpty() {
576		return nil
577	}
578	return *page.agaspp.Value
579}
580
581// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
582func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
583	return ApplicationGatewayAvailableSslPredefinedPoliciesPage{
584		fn:     getNextPage,
585		agaspp: cur,
586	}
587}
588
589// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
590// service call.
591type ApplicationGatewayAvailableWafRuleSetsResult struct {
592	autorest.Response `json:"-"`
593	// Value - The list of application gateway rule sets.
594	Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
595}
596
597// ApplicationGatewayBackendAddress backend address of an application gateway.
598type ApplicationGatewayBackendAddress struct {
599	// Fqdn - Fully qualified domain name (FQDN).
600	Fqdn *string `json:"fqdn,omitempty"`
601	// IPAddress - IP address.
602	IPAddress *string `json:"ipAddress,omitempty"`
603}
604
605// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
606type ApplicationGatewayBackendAddressPool struct {
607	// ApplicationGatewayBackendAddressPoolPropertiesFormat - Properties of the application gateway backend address pool.
608	*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
609	// Name - Name of the backend address pool that is unique within an Application Gateway.
610	Name *string `json:"name,omitempty"`
611	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
612	Etag *string `json:"etag,omitempty"`
613	// Type - READ-ONLY; Type of the resource.
614	Type *string `json:"type,omitempty"`
615	// ID - Resource ID.
616	ID *string `json:"id,omitempty"`
617}
618
619// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
620func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
621	objectMap := make(map[string]interface{})
622	if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
623		objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
624	}
625	if agbap.Name != nil {
626		objectMap["name"] = agbap.Name
627	}
628	if agbap.ID != nil {
629		objectMap["id"] = agbap.ID
630	}
631	return json.Marshal(objectMap)
632}
633
634// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
635func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
636	var m map[string]*json.RawMessage
637	err := json.Unmarshal(body, &m)
638	if err != nil {
639		return err
640	}
641	for k, v := range m {
642		switch k {
643		case "properties":
644			if v != nil {
645				var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
646				err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
647				if err != nil {
648					return err
649				}
650				agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
651			}
652		case "name":
653			if v != nil {
654				var name string
655				err = json.Unmarshal(*v, &name)
656				if err != nil {
657					return err
658				}
659				agbap.Name = &name
660			}
661		case "etag":
662			if v != nil {
663				var etag string
664				err = json.Unmarshal(*v, &etag)
665				if err != nil {
666					return err
667				}
668				agbap.Etag = &etag
669			}
670		case "type":
671			if v != nil {
672				var typeVar string
673				err = json.Unmarshal(*v, &typeVar)
674				if err != nil {
675					return err
676				}
677				agbap.Type = &typeVar
678			}
679		case "id":
680			if v != nil {
681				var ID string
682				err = json.Unmarshal(*v, &ID)
683				if err != nil {
684					return err
685				}
686				agbap.ID = &ID
687			}
688		}
689	}
690
691	return nil
692}
693
694// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
695// application gateway.
696type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
697	// BackendIPConfigurations - READ-ONLY; Collection of references to IPs defined in network interfaces.
698	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
699	// BackendAddresses - Backend addresses.
700	BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
701	// ProvisioningState - READ-ONLY; The provisioning state of the backend address pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
702	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
703}
704
705// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPoolPropertiesFormat.
706func (agbappf ApplicationGatewayBackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
707	objectMap := make(map[string]interface{})
708	if agbappf.BackendAddresses != nil {
709		objectMap["backendAddresses"] = agbappf.BackendAddresses
710	}
711	return json.Marshal(objectMap)
712}
713
714// ApplicationGatewayBackendHealth response for ApplicationGatewayBackendHealth API service call.
715type ApplicationGatewayBackendHealth struct {
716	autorest.Response `json:"-"`
717	// BackendAddressPools - A list of ApplicationGatewayBackendHealthPool resources.
718	BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
719}
720
721// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
722type ApplicationGatewayBackendHealthHTTPSettings struct {
723	// BackendHTTPSettings - Reference to an ApplicationGatewayBackendHttpSettings resource.
724	BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
725	// Servers - List of ApplicationGatewayBackendHealthServer resources.
726	Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
727}
728
729// ApplicationGatewayBackendHealthOnDemand result of on demand test probe.
730type ApplicationGatewayBackendHealthOnDemand struct {
731	autorest.Response `json:"-"`
732	// BackendAddressPool - Reference to an ApplicationGatewayBackendAddressPool resource.
733	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
734	// BackendHealthHTTPSettings - Application gateway BackendHealthHttp settings.
735	BackendHealthHTTPSettings *ApplicationGatewayBackendHealthHTTPSettings `json:"backendHealthHttpSettings,omitempty"`
736}
737
738// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
739type ApplicationGatewayBackendHealthPool struct {
740	// BackendAddressPool - Reference to an ApplicationGatewayBackendAddressPool resource.
741	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
742	// BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
743	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
744}
745
746// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
747type ApplicationGatewayBackendHealthServer struct {
748	// Address - IP address or FQDN of backend server.
749	Address *string `json:"address,omitempty"`
750	// IPConfiguration - Reference to IP configuration of backend server.
751	IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
752	// Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
753	Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
754	// HealthProbeLog - Health Probe Log.
755	HealthProbeLog *string `json:"healthProbeLog,omitempty"`
756}
757
758// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
759type ApplicationGatewayBackendHTTPSettings struct {
760	// ApplicationGatewayBackendHTTPSettingsPropertiesFormat - Properties of the application gateway backend HTTP settings.
761	*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
762	// Name - Name of the backend http settings that is unique within an Application Gateway.
763	Name *string `json:"name,omitempty"`
764	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
765	Etag *string `json:"etag,omitempty"`
766	// Type - READ-ONLY; Type of the resource.
767	Type *string `json:"type,omitempty"`
768	// ID - Resource ID.
769	ID *string `json:"id,omitempty"`
770}
771
772// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
773func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
774	objectMap := make(map[string]interface{})
775	if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
776		objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
777	}
778	if agbhs.Name != nil {
779		objectMap["name"] = agbhs.Name
780	}
781	if agbhs.ID != nil {
782		objectMap["id"] = agbhs.ID
783	}
784	return json.Marshal(objectMap)
785}
786
787// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
788func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
789	var m map[string]*json.RawMessage
790	err := json.Unmarshal(body, &m)
791	if err != nil {
792		return err
793	}
794	for k, v := range m {
795		switch k {
796		case "properties":
797			if v != nil {
798				var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
799				err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
800				if err != nil {
801					return err
802				}
803				agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
804			}
805		case "name":
806			if v != nil {
807				var name string
808				err = json.Unmarshal(*v, &name)
809				if err != nil {
810					return err
811				}
812				agbhs.Name = &name
813			}
814		case "etag":
815			if v != nil {
816				var etag string
817				err = json.Unmarshal(*v, &etag)
818				if err != nil {
819					return err
820				}
821				agbhs.Etag = &etag
822			}
823		case "type":
824			if v != nil {
825				var typeVar string
826				err = json.Unmarshal(*v, &typeVar)
827				if err != nil {
828					return err
829				}
830				agbhs.Type = &typeVar
831			}
832		case "id":
833			if v != nil {
834				var ID string
835				err = json.Unmarshal(*v, &ID)
836				if err != nil {
837					return err
838				}
839				agbhs.ID = &ID
840			}
841		}
842	}
843
844	return nil
845}
846
847// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
848// application gateway.
849type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
850	// Port - The destination port on the backend.
851	Port *int32 `json:"port,omitempty"`
852	// Protocol - The protocol used to communicate with the backend. Possible values include: 'HTTP', 'HTTPS'
853	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
854	// CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
855	CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
856	// 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.
857	RequestTimeout *int32 `json:"requestTimeout,omitempty"`
858	// Probe - Probe resource of an application gateway.
859	Probe *SubResource `json:"probe,omitempty"`
860	// AuthenticationCertificates - Array of references to application gateway authentication certificates.
861	AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
862	// TrustedRootCertificates - Array of references to application gateway trusted root certificates.
863	TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"`
864	// ConnectionDraining - Connection draining of the backend http settings resource.
865	ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
866	// HostName - Host header to be sent to the backend servers.
867	HostName *string `json:"hostName,omitempty"`
868	// PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
869	PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
870	// AffinityCookieName - Cookie name to use for the affinity cookie.
871	AffinityCookieName *string `json:"affinityCookieName,omitempty"`
872	// ProbeEnabled - Whether the probe is enabled. Default value is false.
873	ProbeEnabled *bool `json:"probeEnabled,omitempty"`
874	// Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
875	Path *string `json:"path,omitempty"`
876	// ProvisioningState - READ-ONLY; The provisioning state of the backend HTTP settings resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
877	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
878}
879
880// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettingsPropertiesFormat.
881func (agbhspf ApplicationGatewayBackendHTTPSettingsPropertiesFormat) MarshalJSON() ([]byte, error) {
882	objectMap := make(map[string]interface{})
883	if agbhspf.Port != nil {
884		objectMap["port"] = agbhspf.Port
885	}
886	if agbhspf.Protocol != "" {
887		objectMap["protocol"] = agbhspf.Protocol
888	}
889	if agbhspf.CookieBasedAffinity != "" {
890		objectMap["cookieBasedAffinity"] = agbhspf.CookieBasedAffinity
891	}
892	if agbhspf.RequestTimeout != nil {
893		objectMap["requestTimeout"] = agbhspf.RequestTimeout
894	}
895	if agbhspf.Probe != nil {
896		objectMap["probe"] = agbhspf.Probe
897	}
898	if agbhspf.AuthenticationCertificates != nil {
899		objectMap["authenticationCertificates"] = agbhspf.AuthenticationCertificates
900	}
901	if agbhspf.TrustedRootCertificates != nil {
902		objectMap["trustedRootCertificates"] = agbhspf.TrustedRootCertificates
903	}
904	if agbhspf.ConnectionDraining != nil {
905		objectMap["connectionDraining"] = agbhspf.ConnectionDraining
906	}
907	if agbhspf.HostName != nil {
908		objectMap["hostName"] = agbhspf.HostName
909	}
910	if agbhspf.PickHostNameFromBackendAddress != nil {
911		objectMap["pickHostNameFromBackendAddress"] = agbhspf.PickHostNameFromBackendAddress
912	}
913	if agbhspf.AffinityCookieName != nil {
914		objectMap["affinityCookieName"] = agbhspf.AffinityCookieName
915	}
916	if agbhspf.ProbeEnabled != nil {
917		objectMap["probeEnabled"] = agbhspf.ProbeEnabled
918	}
919	if agbhspf.Path != nil {
920		objectMap["path"] = agbhspf.Path
921	}
922	return json.Marshal(objectMap)
923}
924
925// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
926// be active for a specified time after the backend server got removed from the configuration.
927type ApplicationGatewayConnectionDraining struct {
928	// Enabled - Whether connection draining is enabled or not.
929	Enabled *bool `json:"enabled,omitempty"`
930	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
931	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
932}
933
934// ApplicationGatewayCustomError customer error of an application gateway.
935type ApplicationGatewayCustomError struct {
936	// StatusCode - Status code of the application gateway customer error. Possible values include: 'HTTPStatus403', 'HTTPStatus502'
937	StatusCode ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"`
938	// CustomErrorPageURL - Error page URL of the application gateway customer error.
939	CustomErrorPageURL *string `json:"customErrorPageUrl,omitempty"`
940}
941
942// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
943// rule group.
944type ApplicationGatewayFirewallDisabledRuleGroup struct {
945	// RuleGroupName - The name of the rule group that will be disabled.
946	RuleGroupName *string `json:"ruleGroupName,omitempty"`
947	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
948	Rules *[]int32 `json:"rules,omitempty"`
949}
950
951// ApplicationGatewayFirewallExclusion allow to exclude some variable satisfy the condition for the WAF
952// check.
953type ApplicationGatewayFirewallExclusion struct {
954	// MatchVariable - The variable to be excluded.
955	MatchVariable *string `json:"matchVariable,omitempty"`
956	// SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to.
957	SelectorMatchOperator *string `json:"selectorMatchOperator,omitempty"`
958	// Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
959	Selector *string `json:"selector,omitempty"`
960}
961
962// ApplicationGatewayFirewallRule a web application firewall rule.
963type ApplicationGatewayFirewallRule struct {
964	// RuleID - The identifier of the web application firewall rule.
965	RuleID *int32 `json:"ruleId,omitempty"`
966	// Description - The description of the web application firewall rule.
967	Description *string `json:"description,omitempty"`
968}
969
970// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
971type ApplicationGatewayFirewallRuleGroup struct {
972	// RuleGroupName - The name of the web application firewall rule group.
973	RuleGroupName *string `json:"ruleGroupName,omitempty"`
974	// Description - The description of the web application firewall rule group.
975	Description *string `json:"description,omitempty"`
976	// Rules - The rules of the web application firewall rule group.
977	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
978}
979
980// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
981type ApplicationGatewayFirewallRuleSet struct {
982	// ApplicationGatewayFirewallRuleSetPropertiesFormat - Properties of the application gateway firewall rule set.
983	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
984	// ID - Resource ID.
985	ID *string `json:"id,omitempty"`
986	// Name - READ-ONLY; Resource name.
987	Name *string `json:"name,omitempty"`
988	// Type - READ-ONLY; Resource type.
989	Type *string `json:"type,omitempty"`
990	// Location - Resource location.
991	Location *string `json:"location,omitempty"`
992	// Tags - Resource tags.
993	Tags map[string]*string `json:"tags"`
994}
995
996// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
997func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
998	objectMap := make(map[string]interface{})
999	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
1000		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
1001	}
1002	if agfrs.ID != nil {
1003		objectMap["id"] = agfrs.ID
1004	}
1005	if agfrs.Location != nil {
1006		objectMap["location"] = agfrs.Location
1007	}
1008	if agfrs.Tags != nil {
1009		objectMap["tags"] = agfrs.Tags
1010	}
1011	return json.Marshal(objectMap)
1012}
1013
1014// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
1015func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
1016	var m map[string]*json.RawMessage
1017	err := json.Unmarshal(body, &m)
1018	if err != nil {
1019		return err
1020	}
1021	for k, v := range m {
1022		switch k {
1023		case "properties":
1024			if v != nil {
1025				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
1026				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
1027				if err != nil {
1028					return err
1029				}
1030				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
1031			}
1032		case "id":
1033			if v != nil {
1034				var ID string
1035				err = json.Unmarshal(*v, &ID)
1036				if err != nil {
1037					return err
1038				}
1039				agfrs.ID = &ID
1040			}
1041		case "name":
1042			if v != nil {
1043				var name string
1044				err = json.Unmarshal(*v, &name)
1045				if err != nil {
1046					return err
1047				}
1048				agfrs.Name = &name
1049			}
1050		case "type":
1051			if v != nil {
1052				var typeVar string
1053				err = json.Unmarshal(*v, &typeVar)
1054				if err != nil {
1055					return err
1056				}
1057				agfrs.Type = &typeVar
1058			}
1059		case "location":
1060			if v != nil {
1061				var location string
1062				err = json.Unmarshal(*v, &location)
1063				if err != nil {
1064					return err
1065				}
1066				agfrs.Location = &location
1067			}
1068		case "tags":
1069			if v != nil {
1070				var tags map[string]*string
1071				err = json.Unmarshal(*v, &tags)
1072				if err != nil {
1073					return err
1074				}
1075				agfrs.Tags = tags
1076			}
1077		}
1078	}
1079
1080	return nil
1081}
1082
1083// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
1084type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
1085	// ProvisioningState - READ-ONLY; The provisioning state of the web application firewall rule set. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1086	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1087	// RuleSetType - The type of the web application firewall rule set.
1088	RuleSetType *string `json:"ruleSetType,omitempty"`
1089	// RuleSetVersion - The version of the web application firewall rule set type.
1090	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
1091	// RuleGroups - The rule groups of the web application firewall rule set.
1092	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
1093}
1094
1095// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSetPropertiesFormat.
1096func (agfrspf ApplicationGatewayFirewallRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) {
1097	objectMap := make(map[string]interface{})
1098	if agfrspf.RuleSetType != nil {
1099		objectMap["ruleSetType"] = agfrspf.RuleSetType
1100	}
1101	if agfrspf.RuleSetVersion != nil {
1102		objectMap["ruleSetVersion"] = agfrspf.RuleSetVersion
1103	}
1104	if agfrspf.RuleGroups != nil {
1105		objectMap["ruleGroups"] = agfrspf.RuleGroups
1106	}
1107	return json.Marshal(objectMap)
1108}
1109
1110// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
1111type ApplicationGatewayFrontendIPConfiguration struct {
1112	// ApplicationGatewayFrontendIPConfigurationPropertiesFormat - Properties of the application gateway frontend IP configuration.
1113	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1114	// Name - Name of the frontend IP configuration that is unique within an Application Gateway.
1115	Name *string `json:"name,omitempty"`
1116	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1117	Etag *string `json:"etag,omitempty"`
1118	// Type - READ-ONLY; Type of the resource.
1119	Type *string `json:"type,omitempty"`
1120	// ID - Resource ID.
1121	ID *string `json:"id,omitempty"`
1122}
1123
1124// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
1125func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
1126	objectMap := make(map[string]interface{})
1127	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
1128		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1129	}
1130	if agfic.Name != nil {
1131		objectMap["name"] = agfic.Name
1132	}
1133	if agfic.ID != nil {
1134		objectMap["id"] = agfic.ID
1135	}
1136	return json.Marshal(objectMap)
1137}
1138
1139// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
1140func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
1141	var m map[string]*json.RawMessage
1142	err := json.Unmarshal(body, &m)
1143	if err != nil {
1144		return err
1145	}
1146	for k, v := range m {
1147		switch k {
1148		case "properties":
1149			if v != nil {
1150				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1151				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
1152				if err != nil {
1153					return err
1154				}
1155				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
1156			}
1157		case "name":
1158			if v != nil {
1159				var name string
1160				err = json.Unmarshal(*v, &name)
1161				if err != nil {
1162					return err
1163				}
1164				agfic.Name = &name
1165			}
1166		case "etag":
1167			if v != nil {
1168				var etag string
1169				err = json.Unmarshal(*v, &etag)
1170				if err != nil {
1171					return err
1172				}
1173				agfic.Etag = &etag
1174			}
1175		case "type":
1176			if v != nil {
1177				var typeVar string
1178				err = json.Unmarshal(*v, &typeVar)
1179				if err != nil {
1180					return err
1181				}
1182				agfic.Type = &typeVar
1183			}
1184		case "id":
1185			if v != nil {
1186				var ID string
1187				err = json.Unmarshal(*v, &ID)
1188				if err != nil {
1189					return err
1190				}
1191				agfic.ID = &ID
1192			}
1193		}
1194	}
1195
1196	return nil
1197}
1198
1199// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
1200// application gateway.
1201type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
1202	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
1203	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
1204	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
1205	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
1206	// Subnet - Reference to the subnet resource.
1207	Subnet *SubResource `json:"subnet,omitempty"`
1208	// PublicIPAddress - Reference to the PublicIP resource.
1209	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
1210	// PrivateLinkConfiguration - Reference to the application gateway private link configuration.
1211	PrivateLinkConfiguration *SubResource `json:"privateLinkConfiguration,omitempty"`
1212	// ProvisioningState - READ-ONLY; The provisioning state of the frontend IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1213	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1214}
1215
1216// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfigurationPropertiesFormat.
1217func (agficpf ApplicationGatewayFrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
1218	objectMap := make(map[string]interface{})
1219	if agficpf.PrivateIPAddress != nil {
1220		objectMap["privateIPAddress"] = agficpf.PrivateIPAddress
1221	}
1222	if agficpf.PrivateIPAllocationMethod != "" {
1223		objectMap["privateIPAllocationMethod"] = agficpf.PrivateIPAllocationMethod
1224	}
1225	if agficpf.Subnet != nil {
1226		objectMap["subnet"] = agficpf.Subnet
1227	}
1228	if agficpf.PublicIPAddress != nil {
1229		objectMap["publicIPAddress"] = agficpf.PublicIPAddress
1230	}
1231	if agficpf.PrivateLinkConfiguration != nil {
1232		objectMap["privateLinkConfiguration"] = agficpf.PrivateLinkConfiguration
1233	}
1234	return json.Marshal(objectMap)
1235}
1236
1237// ApplicationGatewayFrontendPort frontend port of an application gateway.
1238type ApplicationGatewayFrontendPort struct {
1239	// ApplicationGatewayFrontendPortPropertiesFormat - Properties of the application gateway frontend port.
1240	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
1241	// Name - Name of the frontend port that is unique within an Application Gateway.
1242	Name *string `json:"name,omitempty"`
1243	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1244	Etag *string `json:"etag,omitempty"`
1245	// Type - READ-ONLY; Type of the resource.
1246	Type *string `json:"type,omitempty"`
1247	// ID - Resource ID.
1248	ID *string `json:"id,omitempty"`
1249}
1250
1251// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
1252func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
1253	objectMap := make(map[string]interface{})
1254	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
1255		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
1256	}
1257	if agfp.Name != nil {
1258		objectMap["name"] = agfp.Name
1259	}
1260	if agfp.ID != nil {
1261		objectMap["id"] = agfp.ID
1262	}
1263	return json.Marshal(objectMap)
1264}
1265
1266// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
1267func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
1268	var m map[string]*json.RawMessage
1269	err := json.Unmarshal(body, &m)
1270	if err != nil {
1271		return err
1272	}
1273	for k, v := range m {
1274		switch k {
1275		case "properties":
1276			if v != nil {
1277				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
1278				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
1279				if err != nil {
1280					return err
1281				}
1282				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
1283			}
1284		case "name":
1285			if v != nil {
1286				var name string
1287				err = json.Unmarshal(*v, &name)
1288				if err != nil {
1289					return err
1290				}
1291				agfp.Name = &name
1292			}
1293		case "etag":
1294			if v != nil {
1295				var etag string
1296				err = json.Unmarshal(*v, &etag)
1297				if err != nil {
1298					return err
1299				}
1300				agfp.Etag = &etag
1301			}
1302		case "type":
1303			if v != nil {
1304				var typeVar string
1305				err = json.Unmarshal(*v, &typeVar)
1306				if err != nil {
1307					return err
1308				}
1309				agfp.Type = &typeVar
1310			}
1311		case "id":
1312			if v != nil {
1313				var ID string
1314				err = json.Unmarshal(*v, &ID)
1315				if err != nil {
1316					return err
1317				}
1318				agfp.ID = &ID
1319			}
1320		}
1321	}
1322
1323	return nil
1324}
1325
1326// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1327type ApplicationGatewayFrontendPortPropertiesFormat struct {
1328	// Port - Frontend port.
1329	Port *int32 `json:"port,omitempty"`
1330	// ProvisioningState - READ-ONLY; The provisioning state of the frontend port resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1331	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1332}
1333
1334// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPortPropertiesFormat.
1335func (agfppf ApplicationGatewayFrontendPortPropertiesFormat) MarshalJSON() ([]byte, error) {
1336	objectMap := make(map[string]interface{})
1337	if agfppf.Port != nil {
1338		objectMap["port"] = agfppf.Port
1339	}
1340	return json.Marshal(objectMap)
1341}
1342
1343// ApplicationGatewayHeaderConfiguration header configuration of the Actions set in Application Gateway.
1344type ApplicationGatewayHeaderConfiguration struct {
1345	// HeaderName - Header name of the header configuration.
1346	HeaderName *string `json:"headerName,omitempty"`
1347	// HeaderValue - Header value of the header configuration.
1348	HeaderValue *string `json:"headerValue,omitempty"`
1349}
1350
1351// ApplicationGatewayHTTPListener http listener of an application gateway.
1352type ApplicationGatewayHTTPListener struct {
1353	// ApplicationGatewayHTTPListenerPropertiesFormat - Properties of the application gateway HTTP listener.
1354	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1355	// Name - Name of the HTTP listener that is unique within an Application Gateway.
1356	Name *string `json:"name,omitempty"`
1357	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1358	Etag *string `json:"etag,omitempty"`
1359	// Type - READ-ONLY; Type of the resource.
1360	Type *string `json:"type,omitempty"`
1361	// ID - Resource ID.
1362	ID *string `json:"id,omitempty"`
1363}
1364
1365// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
1366func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1367	objectMap := make(map[string]interface{})
1368	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1369		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1370	}
1371	if aghl.Name != nil {
1372		objectMap["name"] = aghl.Name
1373	}
1374	if aghl.ID != nil {
1375		objectMap["id"] = aghl.ID
1376	}
1377	return json.Marshal(objectMap)
1378}
1379
1380// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1381func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1382	var m map[string]*json.RawMessage
1383	err := json.Unmarshal(body, &m)
1384	if err != nil {
1385		return err
1386	}
1387	for k, v := range m {
1388		switch k {
1389		case "properties":
1390			if v != nil {
1391				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1392				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1393				if err != nil {
1394					return err
1395				}
1396				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1397			}
1398		case "name":
1399			if v != nil {
1400				var name string
1401				err = json.Unmarshal(*v, &name)
1402				if err != nil {
1403					return err
1404				}
1405				aghl.Name = &name
1406			}
1407		case "etag":
1408			if v != nil {
1409				var etag string
1410				err = json.Unmarshal(*v, &etag)
1411				if err != nil {
1412					return err
1413				}
1414				aghl.Etag = &etag
1415			}
1416		case "type":
1417			if v != nil {
1418				var typeVar string
1419				err = json.Unmarshal(*v, &typeVar)
1420				if err != nil {
1421					return err
1422				}
1423				aghl.Type = &typeVar
1424			}
1425		case "id":
1426			if v != nil {
1427				var ID string
1428				err = json.Unmarshal(*v, &ID)
1429				if err != nil {
1430					return err
1431				}
1432				aghl.ID = &ID
1433			}
1434		}
1435	}
1436
1437	return nil
1438}
1439
1440// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1441type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1442	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1443	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1444	// FrontendPort - Frontend port resource of an application gateway.
1445	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1446	// Protocol - Protocol of the HTTP listener. Possible values include: 'HTTP', 'HTTPS'
1447	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1448	// HostName - Host name of HTTP listener.
1449	HostName *string `json:"hostName,omitempty"`
1450	// SslCertificate - SSL certificate resource of an application gateway.
1451	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1452	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1453	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1454	// ProvisioningState - READ-ONLY; The provisioning state of the HTTP listener resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1455	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1456	// CustomErrorConfigurations - Custom error configurations of the HTTP listener.
1457	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1458	// FirewallPolicy - Reference to the FirewallPolicy resource.
1459	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
1460	// HostNames - List of Host names for HTTP Listener that allows special wildcard characters as well.
1461	HostNames *[]string `json:"hostNames,omitempty"`
1462}
1463
1464// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListenerPropertiesFormat.
1465func (aghlpf ApplicationGatewayHTTPListenerPropertiesFormat) MarshalJSON() ([]byte, error) {
1466	objectMap := make(map[string]interface{})
1467	if aghlpf.FrontendIPConfiguration != nil {
1468		objectMap["frontendIPConfiguration"] = aghlpf.FrontendIPConfiguration
1469	}
1470	if aghlpf.FrontendPort != nil {
1471		objectMap["frontendPort"] = aghlpf.FrontendPort
1472	}
1473	if aghlpf.Protocol != "" {
1474		objectMap["protocol"] = aghlpf.Protocol
1475	}
1476	if aghlpf.HostName != nil {
1477		objectMap["hostName"] = aghlpf.HostName
1478	}
1479	if aghlpf.SslCertificate != nil {
1480		objectMap["sslCertificate"] = aghlpf.SslCertificate
1481	}
1482	if aghlpf.RequireServerNameIndication != nil {
1483		objectMap["requireServerNameIndication"] = aghlpf.RequireServerNameIndication
1484	}
1485	if aghlpf.CustomErrorConfigurations != nil {
1486		objectMap["customErrorConfigurations"] = aghlpf.CustomErrorConfigurations
1487	}
1488	if aghlpf.FirewallPolicy != nil {
1489		objectMap["firewallPolicy"] = aghlpf.FirewallPolicy
1490	}
1491	if aghlpf.HostNames != nil {
1492		objectMap["hostNames"] = aghlpf.HostNames
1493	}
1494	return json.Marshal(objectMap)
1495}
1496
1497// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
1498// private IP configuration is allowed.
1499type ApplicationGatewayIPConfiguration struct {
1500	// ApplicationGatewayIPConfigurationPropertiesFormat - Properties of the application gateway IP configuration.
1501	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1502	// Name - Name of the IP configuration that is unique within an Application Gateway.
1503	Name *string `json:"name,omitempty"`
1504	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1505	Etag *string `json:"etag,omitempty"`
1506	// Type - READ-ONLY; Type of the resource.
1507	Type *string `json:"type,omitempty"`
1508	// ID - Resource ID.
1509	ID *string `json:"id,omitempty"`
1510}
1511
1512// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1513func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1514	objectMap := make(map[string]interface{})
1515	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1516		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1517	}
1518	if agic.Name != nil {
1519		objectMap["name"] = agic.Name
1520	}
1521	if agic.ID != nil {
1522		objectMap["id"] = agic.ID
1523	}
1524	return json.Marshal(objectMap)
1525}
1526
1527// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1528func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1529	var m map[string]*json.RawMessage
1530	err := json.Unmarshal(body, &m)
1531	if err != nil {
1532		return err
1533	}
1534	for k, v := range m {
1535		switch k {
1536		case "properties":
1537			if v != nil {
1538				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1539				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1540				if err != nil {
1541					return err
1542				}
1543				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1544			}
1545		case "name":
1546			if v != nil {
1547				var name string
1548				err = json.Unmarshal(*v, &name)
1549				if err != nil {
1550					return err
1551				}
1552				agic.Name = &name
1553			}
1554		case "etag":
1555			if v != nil {
1556				var etag string
1557				err = json.Unmarshal(*v, &etag)
1558				if err != nil {
1559					return err
1560				}
1561				agic.Etag = &etag
1562			}
1563		case "type":
1564			if v != nil {
1565				var typeVar string
1566				err = json.Unmarshal(*v, &typeVar)
1567				if err != nil {
1568					return err
1569				}
1570				agic.Type = &typeVar
1571			}
1572		case "id":
1573			if v != nil {
1574				var ID string
1575				err = json.Unmarshal(*v, &ID)
1576				if err != nil {
1577					return err
1578				}
1579				agic.ID = &ID
1580			}
1581		}
1582	}
1583
1584	return nil
1585}
1586
1587// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
1588// gateway.
1589type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1590	// Subnet - Reference to the subnet resource. A subnet from where application gateway gets its private address.
1591	Subnet *SubResource `json:"subnet,omitempty"`
1592	// ProvisioningState - READ-ONLY; The provisioning state of the application gateway IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1593	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1594}
1595
1596// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfigurationPropertiesFormat.
1597func (agicpf ApplicationGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
1598	objectMap := make(map[string]interface{})
1599	if agicpf.Subnet != nil {
1600		objectMap["subnet"] = agicpf.Subnet
1601	}
1602	return json.Marshal(objectMap)
1603}
1604
1605// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1606type ApplicationGatewayListResult struct {
1607	autorest.Response `json:"-"`
1608	// Value - List of an application gateways in a resource group.
1609	Value *[]ApplicationGateway `json:"value,omitempty"`
1610	// NextLink - URL to get the next set of results.
1611	NextLink *string `json:"nextLink,omitempty"`
1612}
1613
1614// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1615type ApplicationGatewayListResultIterator struct {
1616	i    int
1617	page ApplicationGatewayListResultPage
1618}
1619
1620// NextWithContext advances to the next value.  If there was an error making
1621// the request the iterator does not advance and the error is returned.
1622func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
1623	if tracing.IsEnabled() {
1624		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
1625		defer func() {
1626			sc := -1
1627			if iter.Response().Response.Response != nil {
1628				sc = iter.Response().Response.Response.StatusCode
1629			}
1630			tracing.EndSpan(ctx, sc, err)
1631		}()
1632	}
1633	iter.i++
1634	if iter.i < len(iter.page.Values()) {
1635		return nil
1636	}
1637	err = iter.page.NextWithContext(ctx)
1638	if err != nil {
1639		iter.i--
1640		return err
1641	}
1642	iter.i = 0
1643	return nil
1644}
1645
1646// Next advances to the next value.  If there was an error making
1647// the request the iterator does not advance and the error is returned.
1648// Deprecated: Use NextWithContext() instead.
1649func (iter *ApplicationGatewayListResultIterator) Next() error {
1650	return iter.NextWithContext(context.Background())
1651}
1652
1653// NotDone returns true if the enumeration should be started or is not yet complete.
1654func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1655	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1656}
1657
1658// Response returns the raw server response from the last page request.
1659func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1660	return iter.page.Response()
1661}
1662
1663// Value returns the current value or a zero-initialized value if the
1664// iterator has advanced beyond the end of the collection.
1665func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1666	if !iter.page.NotDone() {
1667		return ApplicationGateway{}
1668	}
1669	return iter.page.Values()[iter.i]
1670}
1671
1672// Creates a new instance of the ApplicationGatewayListResultIterator type.
1673func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
1674	return ApplicationGatewayListResultIterator{page: page}
1675}
1676
1677// IsEmpty returns true if the ListResult contains no values.
1678func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1679	return aglr.Value == nil || len(*aglr.Value) == 0
1680}
1681
1682// hasNextLink returns true if the NextLink is not empty.
1683func (aglr ApplicationGatewayListResult) hasNextLink() bool {
1684	return aglr.NextLink != nil && len(*aglr.NextLink) != 0
1685}
1686
1687// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1688// It returns nil if no more results exist.
1689func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
1690	if !aglr.hasNextLink() {
1691		return nil, nil
1692	}
1693	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1694		autorest.AsJSON(),
1695		autorest.AsGet(),
1696		autorest.WithBaseURL(to.String(aglr.NextLink)))
1697}
1698
1699// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1700type ApplicationGatewayListResultPage struct {
1701	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1702	aglr ApplicationGatewayListResult
1703}
1704
1705// NextWithContext advances to the next page of values.  If there was an error making
1706// the request the page does not advance and the error is returned.
1707func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
1708	if tracing.IsEnabled() {
1709		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
1710		defer func() {
1711			sc := -1
1712			if page.Response().Response.Response != nil {
1713				sc = page.Response().Response.Response.StatusCode
1714			}
1715			tracing.EndSpan(ctx, sc, err)
1716		}()
1717	}
1718	for {
1719		next, err := page.fn(ctx, page.aglr)
1720		if err != nil {
1721			return err
1722		}
1723		page.aglr = next
1724		if !next.hasNextLink() || !next.IsEmpty() {
1725			break
1726		}
1727	}
1728	return nil
1729}
1730
1731// Next advances to the next page of values.  If there was an error making
1732// the request the page does not advance and the error is returned.
1733// Deprecated: Use NextWithContext() instead.
1734func (page *ApplicationGatewayListResultPage) Next() error {
1735	return page.NextWithContext(context.Background())
1736}
1737
1738// NotDone returns true if the page enumeration should be started or is not yet complete.
1739func (page ApplicationGatewayListResultPage) NotDone() bool {
1740	return !page.aglr.IsEmpty()
1741}
1742
1743// Response returns the raw server response from the last page request.
1744func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1745	return page.aglr
1746}
1747
1748// Values returns the slice of values for the current page or nil if there are no values.
1749func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1750	if page.aglr.IsEmpty() {
1751		return nil
1752	}
1753	return *page.aglr.Value
1754}
1755
1756// Creates a new instance of the ApplicationGatewayListResultPage type.
1757func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
1758	return ApplicationGatewayListResultPage{
1759		fn:   getNextPage,
1760		aglr: cur,
1761	}
1762}
1763
1764// ApplicationGatewayOnDemandProbe details of on demand test probe request.
1765type ApplicationGatewayOnDemandProbe struct {
1766	// Protocol - The protocol used for the probe. Possible values include: 'HTTP', 'HTTPS'
1767	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1768	// Host - Host name to send the probe to.
1769	Host *string `json:"host,omitempty"`
1770	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>.
1771	Path *string `json:"path,omitempty"`
1772	// Timeout - The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds.
1773	Timeout *int32 `json:"timeout,omitempty"`
1774	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1775	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1776	// Match - Criterion for classifying a healthy probe response.
1777	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1778	// BackendAddressPool - Reference to backend pool of application gateway to which probe request will be sent.
1779	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1780	// BackendHTTPSettings - Reference to backend http setting of application gateway to be used for test probe.
1781	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1782}
1783
1784// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1785type ApplicationGatewayPathRule struct {
1786	// ApplicationGatewayPathRulePropertiesFormat - Properties of the application gateway path rule.
1787	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1788	// Name - Name of the path rule that is unique within an Application Gateway.
1789	Name *string `json:"name,omitempty"`
1790	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1791	Etag *string `json:"etag,omitempty"`
1792	// Type - READ-ONLY; Type of the resource.
1793	Type *string `json:"type,omitempty"`
1794	// ID - Resource ID.
1795	ID *string `json:"id,omitempty"`
1796}
1797
1798// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1799func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1800	objectMap := make(map[string]interface{})
1801	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1802		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1803	}
1804	if agpr.Name != nil {
1805		objectMap["name"] = agpr.Name
1806	}
1807	if agpr.ID != nil {
1808		objectMap["id"] = agpr.ID
1809	}
1810	return json.Marshal(objectMap)
1811}
1812
1813// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1814func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1815	var m map[string]*json.RawMessage
1816	err := json.Unmarshal(body, &m)
1817	if err != nil {
1818		return err
1819	}
1820	for k, v := range m {
1821		switch k {
1822		case "properties":
1823			if v != nil {
1824				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1825				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1826				if err != nil {
1827					return err
1828				}
1829				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1830			}
1831		case "name":
1832			if v != nil {
1833				var name string
1834				err = json.Unmarshal(*v, &name)
1835				if err != nil {
1836					return err
1837				}
1838				agpr.Name = &name
1839			}
1840		case "etag":
1841			if v != nil {
1842				var etag string
1843				err = json.Unmarshal(*v, &etag)
1844				if err != nil {
1845					return err
1846				}
1847				agpr.Etag = &etag
1848			}
1849		case "type":
1850			if v != nil {
1851				var typeVar string
1852				err = json.Unmarshal(*v, &typeVar)
1853				if err != nil {
1854					return err
1855				}
1856				agpr.Type = &typeVar
1857			}
1858		case "id":
1859			if v != nil {
1860				var ID string
1861				err = json.Unmarshal(*v, &ID)
1862				if err != nil {
1863					return err
1864				}
1865				agpr.ID = &ID
1866			}
1867		}
1868	}
1869
1870	return nil
1871}
1872
1873// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
1874type ApplicationGatewayPathRulePropertiesFormat struct {
1875	// Paths - Path rules of URL path map.
1876	Paths *[]string `json:"paths,omitempty"`
1877	// BackendAddressPool - Backend address pool resource of URL path map path rule.
1878	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1879	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
1880	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1881	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
1882	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
1883	// RewriteRuleSet - Rewrite rule set resource of URL path map path rule.
1884	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
1885	// ProvisioningState - READ-ONLY; The provisioning state of the path rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1886	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1887	// FirewallPolicy - Reference to the FirewallPolicy resource.
1888	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
1889}
1890
1891// MarshalJSON is the custom marshaler for ApplicationGatewayPathRulePropertiesFormat.
1892func (agprpf ApplicationGatewayPathRulePropertiesFormat) MarshalJSON() ([]byte, error) {
1893	objectMap := make(map[string]interface{})
1894	if agprpf.Paths != nil {
1895		objectMap["paths"] = agprpf.Paths
1896	}
1897	if agprpf.BackendAddressPool != nil {
1898		objectMap["backendAddressPool"] = agprpf.BackendAddressPool
1899	}
1900	if agprpf.BackendHTTPSettings != nil {
1901		objectMap["backendHttpSettings"] = agprpf.BackendHTTPSettings
1902	}
1903	if agprpf.RedirectConfiguration != nil {
1904		objectMap["redirectConfiguration"] = agprpf.RedirectConfiguration
1905	}
1906	if agprpf.RewriteRuleSet != nil {
1907		objectMap["rewriteRuleSet"] = agprpf.RewriteRuleSet
1908	}
1909	if agprpf.FirewallPolicy != nil {
1910		objectMap["firewallPolicy"] = agprpf.FirewallPolicy
1911	}
1912	return json.Marshal(objectMap)
1913}
1914
1915// ApplicationGatewayPrivateEndpointConnection private Endpoint connection on an application gateway.
1916type ApplicationGatewayPrivateEndpointConnection struct {
1917	autorest.Response `json:"-"`
1918	// ApplicationGatewayPrivateEndpointConnectionProperties - Properties of the application gateway private endpoint connection.
1919	*ApplicationGatewayPrivateEndpointConnectionProperties `json:"properties,omitempty"`
1920	// Name - Name of the private endpoint connection on an application gateway.
1921	Name *string `json:"name,omitempty"`
1922	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1923	Etag *string `json:"etag,omitempty"`
1924	// Type - READ-ONLY; Type of the resource.
1925	Type *string `json:"type,omitempty"`
1926	// ID - Resource ID.
1927	ID *string `json:"id,omitempty"`
1928}
1929
1930// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateEndpointConnection.
1931func (agpec ApplicationGatewayPrivateEndpointConnection) MarshalJSON() ([]byte, error) {
1932	objectMap := make(map[string]interface{})
1933	if agpec.ApplicationGatewayPrivateEndpointConnectionProperties != nil {
1934		objectMap["properties"] = agpec.ApplicationGatewayPrivateEndpointConnectionProperties
1935	}
1936	if agpec.Name != nil {
1937		objectMap["name"] = agpec.Name
1938	}
1939	if agpec.ID != nil {
1940		objectMap["id"] = agpec.ID
1941	}
1942	return json.Marshal(objectMap)
1943}
1944
1945// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPrivateEndpointConnection struct.
1946func (agpec *ApplicationGatewayPrivateEndpointConnection) UnmarshalJSON(body []byte) error {
1947	var m map[string]*json.RawMessage
1948	err := json.Unmarshal(body, &m)
1949	if err != nil {
1950		return err
1951	}
1952	for k, v := range m {
1953		switch k {
1954		case "properties":
1955			if v != nil {
1956				var applicationGatewayPrivateEndpointConnectionProperties ApplicationGatewayPrivateEndpointConnectionProperties
1957				err = json.Unmarshal(*v, &applicationGatewayPrivateEndpointConnectionProperties)
1958				if err != nil {
1959					return err
1960				}
1961				agpec.ApplicationGatewayPrivateEndpointConnectionProperties = &applicationGatewayPrivateEndpointConnectionProperties
1962			}
1963		case "name":
1964			if v != nil {
1965				var name string
1966				err = json.Unmarshal(*v, &name)
1967				if err != nil {
1968					return err
1969				}
1970				agpec.Name = &name
1971			}
1972		case "etag":
1973			if v != nil {
1974				var etag string
1975				err = json.Unmarshal(*v, &etag)
1976				if err != nil {
1977					return err
1978				}
1979				agpec.Etag = &etag
1980			}
1981		case "type":
1982			if v != nil {
1983				var typeVar string
1984				err = json.Unmarshal(*v, &typeVar)
1985				if err != nil {
1986					return err
1987				}
1988				agpec.Type = &typeVar
1989			}
1990		case "id":
1991			if v != nil {
1992				var ID string
1993				err = json.Unmarshal(*v, &ID)
1994				if err != nil {
1995					return err
1996				}
1997				agpec.ID = &ID
1998			}
1999		}
2000	}
2001
2002	return nil
2003}
2004
2005// ApplicationGatewayPrivateEndpointConnectionListResult response for
2006// ListApplicationGatewayPrivateEndpointConnection API service call. Gets all private endpoint connections
2007// for an application gateway.
2008type ApplicationGatewayPrivateEndpointConnectionListResult struct {
2009	autorest.Response `json:"-"`
2010	// Value - List of private endpoint connections on an application gateway.
2011	Value *[]ApplicationGatewayPrivateEndpointConnection `json:"value,omitempty"`
2012	// NextLink - URL to get the next set of results.
2013	NextLink *string `json:"nextLink,omitempty"`
2014}
2015
2016// ApplicationGatewayPrivateEndpointConnectionListResultIterator provides access to a complete listing of
2017// ApplicationGatewayPrivateEndpointConnection values.
2018type ApplicationGatewayPrivateEndpointConnectionListResultIterator struct {
2019	i    int
2020	page ApplicationGatewayPrivateEndpointConnectionListResultPage
2021}
2022
2023// NextWithContext advances to the next value.  If there was an error making
2024// the request the iterator does not advance and the error is returned.
2025func (iter *ApplicationGatewayPrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
2026	if tracing.IsEnabled() {
2027		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateEndpointConnectionListResultIterator.NextWithContext")
2028		defer func() {
2029			sc := -1
2030			if iter.Response().Response.Response != nil {
2031				sc = iter.Response().Response.Response.StatusCode
2032			}
2033			tracing.EndSpan(ctx, sc, err)
2034		}()
2035	}
2036	iter.i++
2037	if iter.i < len(iter.page.Values()) {
2038		return nil
2039	}
2040	err = iter.page.NextWithContext(ctx)
2041	if err != nil {
2042		iter.i--
2043		return err
2044	}
2045	iter.i = 0
2046	return nil
2047}
2048
2049// Next advances to the next value.  If there was an error making
2050// the request the iterator does not advance and the error is returned.
2051// Deprecated: Use NextWithContext() instead.
2052func (iter *ApplicationGatewayPrivateEndpointConnectionListResultIterator) Next() error {
2053	return iter.NextWithContext(context.Background())
2054}
2055
2056// NotDone returns true if the enumeration should be started or is not yet complete.
2057func (iter ApplicationGatewayPrivateEndpointConnectionListResultIterator) NotDone() bool {
2058	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2059}
2060
2061// Response returns the raw server response from the last page request.
2062func (iter ApplicationGatewayPrivateEndpointConnectionListResultIterator) Response() ApplicationGatewayPrivateEndpointConnectionListResult {
2063	return iter.page.Response()
2064}
2065
2066// Value returns the current value or a zero-initialized value if the
2067// iterator has advanced beyond the end of the collection.
2068func (iter ApplicationGatewayPrivateEndpointConnectionListResultIterator) Value() ApplicationGatewayPrivateEndpointConnection {
2069	if !iter.page.NotDone() {
2070		return ApplicationGatewayPrivateEndpointConnection{}
2071	}
2072	return iter.page.Values()[iter.i]
2073}
2074
2075// Creates a new instance of the ApplicationGatewayPrivateEndpointConnectionListResultIterator type.
2076func NewApplicationGatewayPrivateEndpointConnectionListResultIterator(page ApplicationGatewayPrivateEndpointConnectionListResultPage) ApplicationGatewayPrivateEndpointConnectionListResultIterator {
2077	return ApplicationGatewayPrivateEndpointConnectionListResultIterator{page: page}
2078}
2079
2080// IsEmpty returns true if the ListResult contains no values.
2081func (agpeclr ApplicationGatewayPrivateEndpointConnectionListResult) IsEmpty() bool {
2082	return agpeclr.Value == nil || len(*agpeclr.Value) == 0
2083}
2084
2085// hasNextLink returns true if the NextLink is not empty.
2086func (agpeclr ApplicationGatewayPrivateEndpointConnectionListResult) hasNextLink() bool {
2087	return agpeclr.NextLink != nil && len(*agpeclr.NextLink) != 0
2088}
2089
2090// applicationGatewayPrivateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results.
2091// It returns nil if no more results exist.
2092func (agpeclr ApplicationGatewayPrivateEndpointConnectionListResult) applicationGatewayPrivateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
2093	if !agpeclr.hasNextLink() {
2094		return nil, nil
2095	}
2096	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2097		autorest.AsJSON(),
2098		autorest.AsGet(),
2099		autorest.WithBaseURL(to.String(agpeclr.NextLink)))
2100}
2101
2102// ApplicationGatewayPrivateEndpointConnectionListResultPage contains a page of
2103// ApplicationGatewayPrivateEndpointConnection values.
2104type ApplicationGatewayPrivateEndpointConnectionListResultPage struct {
2105	fn      func(context.Context, ApplicationGatewayPrivateEndpointConnectionListResult) (ApplicationGatewayPrivateEndpointConnectionListResult, error)
2106	agpeclr ApplicationGatewayPrivateEndpointConnectionListResult
2107}
2108
2109// NextWithContext advances to the next page of values.  If there was an error making
2110// the request the page does not advance and the error is returned.
2111func (page *ApplicationGatewayPrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
2112	if tracing.IsEnabled() {
2113		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateEndpointConnectionListResultPage.NextWithContext")
2114		defer func() {
2115			sc := -1
2116			if page.Response().Response.Response != nil {
2117				sc = page.Response().Response.Response.StatusCode
2118			}
2119			tracing.EndSpan(ctx, sc, err)
2120		}()
2121	}
2122	for {
2123		next, err := page.fn(ctx, page.agpeclr)
2124		if err != nil {
2125			return err
2126		}
2127		page.agpeclr = next
2128		if !next.hasNextLink() || !next.IsEmpty() {
2129			break
2130		}
2131	}
2132	return nil
2133}
2134
2135// Next advances to the next page of values.  If there was an error making
2136// the request the page does not advance and the error is returned.
2137// Deprecated: Use NextWithContext() instead.
2138func (page *ApplicationGatewayPrivateEndpointConnectionListResultPage) Next() error {
2139	return page.NextWithContext(context.Background())
2140}
2141
2142// NotDone returns true if the page enumeration should be started or is not yet complete.
2143func (page ApplicationGatewayPrivateEndpointConnectionListResultPage) NotDone() bool {
2144	return !page.agpeclr.IsEmpty()
2145}
2146
2147// Response returns the raw server response from the last page request.
2148func (page ApplicationGatewayPrivateEndpointConnectionListResultPage) Response() ApplicationGatewayPrivateEndpointConnectionListResult {
2149	return page.agpeclr
2150}
2151
2152// Values returns the slice of values for the current page or nil if there are no values.
2153func (page ApplicationGatewayPrivateEndpointConnectionListResultPage) Values() []ApplicationGatewayPrivateEndpointConnection {
2154	if page.agpeclr.IsEmpty() {
2155		return nil
2156	}
2157	return *page.agpeclr.Value
2158}
2159
2160// Creates a new instance of the ApplicationGatewayPrivateEndpointConnectionListResultPage type.
2161func NewApplicationGatewayPrivateEndpointConnectionListResultPage(cur ApplicationGatewayPrivateEndpointConnectionListResult, getNextPage func(context.Context, ApplicationGatewayPrivateEndpointConnectionListResult) (ApplicationGatewayPrivateEndpointConnectionListResult, error)) ApplicationGatewayPrivateEndpointConnectionListResultPage {
2162	return ApplicationGatewayPrivateEndpointConnectionListResultPage{
2163		fn:      getNextPage,
2164		agpeclr: cur,
2165	}
2166}
2167
2168// ApplicationGatewayPrivateEndpointConnectionProperties properties of Private Link Resource of an
2169// application gateway.
2170type ApplicationGatewayPrivateEndpointConnectionProperties struct {
2171	// PrivateEndpoint - READ-ONLY; The resource of private end point.
2172	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
2173	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
2174	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
2175	// ProvisioningState - READ-ONLY; The provisioning state of the application gateway private endpoint connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2176	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2177	// LinkIdentifier - READ-ONLY; The consumer link id.
2178	LinkIdentifier *string `json:"linkIdentifier,omitempty"`
2179}
2180
2181// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateEndpointConnectionProperties.
2182func (agpecp ApplicationGatewayPrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) {
2183	objectMap := make(map[string]interface{})
2184	if agpecp.PrivateLinkServiceConnectionState != nil {
2185		objectMap["privateLinkServiceConnectionState"] = agpecp.PrivateLinkServiceConnectionState
2186	}
2187	return json.Marshal(objectMap)
2188}
2189
2190// ApplicationGatewayPrivateEndpointConnectionsDeleteFuture an abstraction for monitoring and retrieving
2191// the results of a long-running operation.
2192type ApplicationGatewayPrivateEndpointConnectionsDeleteFuture struct {
2193	azure.FutureAPI
2194	// Result returns the result of the asynchronous operation.
2195	// If the operation has not completed it will return an error.
2196	Result func(ApplicationGatewayPrivateEndpointConnectionsClient) (autorest.Response, error)
2197}
2198
2199// ApplicationGatewayPrivateEndpointConnectionsUpdateFuture an abstraction for monitoring and retrieving
2200// the results of a long-running operation.
2201type ApplicationGatewayPrivateEndpointConnectionsUpdateFuture struct {
2202	azure.FutureAPI
2203	// Result returns the result of the asynchronous operation.
2204	// If the operation has not completed it will return an error.
2205	Result func(ApplicationGatewayPrivateEndpointConnectionsClient) (ApplicationGatewayPrivateEndpointConnection, error)
2206}
2207
2208// ApplicationGatewayPrivateLinkConfiguration private Link Configuration on an application gateway.
2209type ApplicationGatewayPrivateLinkConfiguration struct {
2210	// ApplicationGatewayPrivateLinkConfigurationProperties - Properties of the application gateway private link configuration.
2211	*ApplicationGatewayPrivateLinkConfigurationProperties `json:"properties,omitempty"`
2212	// Name - Name of the private link configuration that is unique within an Application Gateway.
2213	Name *string `json:"name,omitempty"`
2214	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2215	Etag *string `json:"etag,omitempty"`
2216	// Type - READ-ONLY; Type of the resource.
2217	Type *string `json:"type,omitempty"`
2218	// ID - Resource ID.
2219	ID *string `json:"id,omitempty"`
2220}
2221
2222// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkConfiguration.
2223func (agplc ApplicationGatewayPrivateLinkConfiguration) MarshalJSON() ([]byte, error) {
2224	objectMap := make(map[string]interface{})
2225	if agplc.ApplicationGatewayPrivateLinkConfigurationProperties != nil {
2226		objectMap["properties"] = agplc.ApplicationGatewayPrivateLinkConfigurationProperties
2227	}
2228	if agplc.Name != nil {
2229		objectMap["name"] = agplc.Name
2230	}
2231	if agplc.ID != nil {
2232		objectMap["id"] = agplc.ID
2233	}
2234	return json.Marshal(objectMap)
2235}
2236
2237// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPrivateLinkConfiguration struct.
2238func (agplc *ApplicationGatewayPrivateLinkConfiguration) UnmarshalJSON(body []byte) error {
2239	var m map[string]*json.RawMessage
2240	err := json.Unmarshal(body, &m)
2241	if err != nil {
2242		return err
2243	}
2244	for k, v := range m {
2245		switch k {
2246		case "properties":
2247			if v != nil {
2248				var applicationGatewayPrivateLinkConfigurationProperties ApplicationGatewayPrivateLinkConfigurationProperties
2249				err = json.Unmarshal(*v, &applicationGatewayPrivateLinkConfigurationProperties)
2250				if err != nil {
2251					return err
2252				}
2253				agplc.ApplicationGatewayPrivateLinkConfigurationProperties = &applicationGatewayPrivateLinkConfigurationProperties
2254			}
2255		case "name":
2256			if v != nil {
2257				var name string
2258				err = json.Unmarshal(*v, &name)
2259				if err != nil {
2260					return err
2261				}
2262				agplc.Name = &name
2263			}
2264		case "etag":
2265			if v != nil {
2266				var etag string
2267				err = json.Unmarshal(*v, &etag)
2268				if err != nil {
2269					return err
2270				}
2271				agplc.Etag = &etag
2272			}
2273		case "type":
2274			if v != nil {
2275				var typeVar string
2276				err = json.Unmarshal(*v, &typeVar)
2277				if err != nil {
2278					return err
2279				}
2280				agplc.Type = &typeVar
2281			}
2282		case "id":
2283			if v != nil {
2284				var ID string
2285				err = json.Unmarshal(*v, &ID)
2286				if err != nil {
2287					return err
2288				}
2289				agplc.ID = &ID
2290			}
2291		}
2292	}
2293
2294	return nil
2295}
2296
2297// ApplicationGatewayPrivateLinkConfigurationProperties properties of private link configuration on an
2298// application gateway.
2299type ApplicationGatewayPrivateLinkConfigurationProperties struct {
2300	// IPConfigurations - An array of application gateway private link ip configurations.
2301	IPConfigurations *[]ApplicationGatewayPrivateLinkIPConfiguration `json:"ipConfigurations,omitempty"`
2302	// ProvisioningState - READ-ONLY; The provisioning state of the application gateway private link configuration. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2303	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2304}
2305
2306// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkConfigurationProperties.
2307func (agplcp ApplicationGatewayPrivateLinkConfigurationProperties) MarshalJSON() ([]byte, error) {
2308	objectMap := make(map[string]interface{})
2309	if agplcp.IPConfigurations != nil {
2310		objectMap["ipConfigurations"] = agplcp.IPConfigurations
2311	}
2312	return json.Marshal(objectMap)
2313}
2314
2315// ApplicationGatewayPrivateLinkIPConfiguration the application gateway private link ip configuration.
2316type ApplicationGatewayPrivateLinkIPConfiguration struct {
2317	// ApplicationGatewayPrivateLinkIPConfigurationProperties - Properties of an application gateway private link ip configuration.
2318	*ApplicationGatewayPrivateLinkIPConfigurationProperties `json:"properties,omitempty"`
2319	// Name - The name of application gateway private link ip configuration.
2320	Name *string `json:"name,omitempty"`
2321	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2322	Etag *string `json:"etag,omitempty"`
2323	// Type - READ-ONLY; The resource type.
2324	Type *string `json:"type,omitempty"`
2325	// ID - Resource ID.
2326	ID *string `json:"id,omitempty"`
2327}
2328
2329// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkIPConfiguration.
2330func (agplic ApplicationGatewayPrivateLinkIPConfiguration) MarshalJSON() ([]byte, error) {
2331	objectMap := make(map[string]interface{})
2332	if agplic.ApplicationGatewayPrivateLinkIPConfigurationProperties != nil {
2333		objectMap["properties"] = agplic.ApplicationGatewayPrivateLinkIPConfigurationProperties
2334	}
2335	if agplic.Name != nil {
2336		objectMap["name"] = agplic.Name
2337	}
2338	if agplic.ID != nil {
2339		objectMap["id"] = agplic.ID
2340	}
2341	return json.Marshal(objectMap)
2342}
2343
2344// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPrivateLinkIPConfiguration struct.
2345func (agplic *ApplicationGatewayPrivateLinkIPConfiguration) UnmarshalJSON(body []byte) error {
2346	var m map[string]*json.RawMessage
2347	err := json.Unmarshal(body, &m)
2348	if err != nil {
2349		return err
2350	}
2351	for k, v := range m {
2352		switch k {
2353		case "properties":
2354			if v != nil {
2355				var applicationGatewayPrivateLinkIPConfigurationProperties ApplicationGatewayPrivateLinkIPConfigurationProperties
2356				err = json.Unmarshal(*v, &applicationGatewayPrivateLinkIPConfigurationProperties)
2357				if err != nil {
2358					return err
2359				}
2360				agplic.ApplicationGatewayPrivateLinkIPConfigurationProperties = &applicationGatewayPrivateLinkIPConfigurationProperties
2361			}
2362		case "name":
2363			if v != nil {
2364				var name string
2365				err = json.Unmarshal(*v, &name)
2366				if err != nil {
2367					return err
2368				}
2369				agplic.Name = &name
2370			}
2371		case "etag":
2372			if v != nil {
2373				var etag string
2374				err = json.Unmarshal(*v, &etag)
2375				if err != nil {
2376					return err
2377				}
2378				agplic.Etag = &etag
2379			}
2380		case "type":
2381			if v != nil {
2382				var typeVar string
2383				err = json.Unmarshal(*v, &typeVar)
2384				if err != nil {
2385					return err
2386				}
2387				agplic.Type = &typeVar
2388			}
2389		case "id":
2390			if v != nil {
2391				var ID string
2392				err = json.Unmarshal(*v, &ID)
2393				if err != nil {
2394					return err
2395				}
2396				agplic.ID = &ID
2397			}
2398		}
2399	}
2400
2401	return nil
2402}
2403
2404// ApplicationGatewayPrivateLinkIPConfigurationProperties properties of an application gateway private link
2405// IP configuration.
2406type ApplicationGatewayPrivateLinkIPConfigurationProperties struct {
2407	// PrivateIPAddress - The private IP address of the IP configuration.
2408	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
2409	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
2410	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
2411	// Subnet - Reference to the subnet resource.
2412	Subnet *SubResource `json:"subnet,omitempty"`
2413	// Primary - Whether the ip configuration is primary or not.
2414	Primary *bool `json:"primary,omitempty"`
2415	// ProvisioningState - READ-ONLY; The provisioning state of the application gateway private link IP configuration. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2416	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2417}
2418
2419// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkIPConfigurationProperties.
2420func (agplicp ApplicationGatewayPrivateLinkIPConfigurationProperties) MarshalJSON() ([]byte, error) {
2421	objectMap := make(map[string]interface{})
2422	if agplicp.PrivateIPAddress != nil {
2423		objectMap["privateIPAddress"] = agplicp.PrivateIPAddress
2424	}
2425	if agplicp.PrivateIPAllocationMethod != "" {
2426		objectMap["privateIPAllocationMethod"] = agplicp.PrivateIPAllocationMethod
2427	}
2428	if agplicp.Subnet != nil {
2429		objectMap["subnet"] = agplicp.Subnet
2430	}
2431	if agplicp.Primary != nil {
2432		objectMap["primary"] = agplicp.Primary
2433	}
2434	return json.Marshal(objectMap)
2435}
2436
2437// ApplicationGatewayPrivateLinkResource privateLink Resource of an application gateway.
2438type ApplicationGatewayPrivateLinkResource struct {
2439	// ApplicationGatewayPrivateLinkResourceProperties - Properties of the application gateway private link resource.
2440	*ApplicationGatewayPrivateLinkResourceProperties `json:"properties,omitempty"`
2441	// Name - Name of the private link resource that is unique within an Application Gateway.
2442	Name *string `json:"name,omitempty"`
2443	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2444	Etag *string `json:"etag,omitempty"`
2445	// Type - READ-ONLY; Type of the resource.
2446	Type *string `json:"type,omitempty"`
2447	// ID - Resource ID.
2448	ID *string `json:"id,omitempty"`
2449}
2450
2451// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkResource.
2452func (agplr ApplicationGatewayPrivateLinkResource) MarshalJSON() ([]byte, error) {
2453	objectMap := make(map[string]interface{})
2454	if agplr.ApplicationGatewayPrivateLinkResourceProperties != nil {
2455		objectMap["properties"] = agplr.ApplicationGatewayPrivateLinkResourceProperties
2456	}
2457	if agplr.Name != nil {
2458		objectMap["name"] = agplr.Name
2459	}
2460	if agplr.ID != nil {
2461		objectMap["id"] = agplr.ID
2462	}
2463	return json.Marshal(objectMap)
2464}
2465
2466// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPrivateLinkResource struct.
2467func (agplr *ApplicationGatewayPrivateLinkResource) UnmarshalJSON(body []byte) error {
2468	var m map[string]*json.RawMessage
2469	err := json.Unmarshal(body, &m)
2470	if err != nil {
2471		return err
2472	}
2473	for k, v := range m {
2474		switch k {
2475		case "properties":
2476			if v != nil {
2477				var applicationGatewayPrivateLinkResourceProperties ApplicationGatewayPrivateLinkResourceProperties
2478				err = json.Unmarshal(*v, &applicationGatewayPrivateLinkResourceProperties)
2479				if err != nil {
2480					return err
2481				}
2482				agplr.ApplicationGatewayPrivateLinkResourceProperties = &applicationGatewayPrivateLinkResourceProperties
2483			}
2484		case "name":
2485			if v != nil {
2486				var name string
2487				err = json.Unmarshal(*v, &name)
2488				if err != nil {
2489					return err
2490				}
2491				agplr.Name = &name
2492			}
2493		case "etag":
2494			if v != nil {
2495				var etag string
2496				err = json.Unmarshal(*v, &etag)
2497				if err != nil {
2498					return err
2499				}
2500				agplr.Etag = &etag
2501			}
2502		case "type":
2503			if v != nil {
2504				var typeVar string
2505				err = json.Unmarshal(*v, &typeVar)
2506				if err != nil {
2507					return err
2508				}
2509				agplr.Type = &typeVar
2510			}
2511		case "id":
2512			if v != nil {
2513				var ID string
2514				err = json.Unmarshal(*v, &ID)
2515				if err != nil {
2516					return err
2517				}
2518				agplr.ID = &ID
2519			}
2520		}
2521	}
2522
2523	return nil
2524}
2525
2526// ApplicationGatewayPrivateLinkResourceListResult response for ListApplicationGatewayPrivateLinkResources
2527// API service call. Gets all private link resources for an application gateway.
2528type ApplicationGatewayPrivateLinkResourceListResult struct {
2529	autorest.Response `json:"-"`
2530	// Value - List of private link resources of an application gateway.
2531	Value *[]ApplicationGatewayPrivateLinkResource `json:"value,omitempty"`
2532	// NextLink - URL to get the next set of results.
2533	NextLink *string `json:"nextLink,omitempty"`
2534}
2535
2536// ApplicationGatewayPrivateLinkResourceListResultIterator provides access to a complete listing of
2537// ApplicationGatewayPrivateLinkResource values.
2538type ApplicationGatewayPrivateLinkResourceListResultIterator struct {
2539	i    int
2540	page ApplicationGatewayPrivateLinkResourceListResultPage
2541}
2542
2543// NextWithContext advances to the next value.  If there was an error making
2544// the request the iterator does not advance and the error is returned.
2545func (iter *ApplicationGatewayPrivateLinkResourceListResultIterator) NextWithContext(ctx context.Context) (err error) {
2546	if tracing.IsEnabled() {
2547		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateLinkResourceListResultIterator.NextWithContext")
2548		defer func() {
2549			sc := -1
2550			if iter.Response().Response.Response != nil {
2551				sc = iter.Response().Response.Response.StatusCode
2552			}
2553			tracing.EndSpan(ctx, sc, err)
2554		}()
2555	}
2556	iter.i++
2557	if iter.i < len(iter.page.Values()) {
2558		return nil
2559	}
2560	err = iter.page.NextWithContext(ctx)
2561	if err != nil {
2562		iter.i--
2563		return err
2564	}
2565	iter.i = 0
2566	return nil
2567}
2568
2569// Next advances to the next value.  If there was an error making
2570// the request the iterator does not advance and the error is returned.
2571// Deprecated: Use NextWithContext() instead.
2572func (iter *ApplicationGatewayPrivateLinkResourceListResultIterator) Next() error {
2573	return iter.NextWithContext(context.Background())
2574}
2575
2576// NotDone returns true if the enumeration should be started or is not yet complete.
2577func (iter ApplicationGatewayPrivateLinkResourceListResultIterator) NotDone() bool {
2578	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2579}
2580
2581// Response returns the raw server response from the last page request.
2582func (iter ApplicationGatewayPrivateLinkResourceListResultIterator) Response() ApplicationGatewayPrivateLinkResourceListResult {
2583	return iter.page.Response()
2584}
2585
2586// Value returns the current value or a zero-initialized value if the
2587// iterator has advanced beyond the end of the collection.
2588func (iter ApplicationGatewayPrivateLinkResourceListResultIterator) Value() ApplicationGatewayPrivateLinkResource {
2589	if !iter.page.NotDone() {
2590		return ApplicationGatewayPrivateLinkResource{}
2591	}
2592	return iter.page.Values()[iter.i]
2593}
2594
2595// Creates a new instance of the ApplicationGatewayPrivateLinkResourceListResultIterator type.
2596func NewApplicationGatewayPrivateLinkResourceListResultIterator(page ApplicationGatewayPrivateLinkResourceListResultPage) ApplicationGatewayPrivateLinkResourceListResultIterator {
2597	return ApplicationGatewayPrivateLinkResourceListResultIterator{page: page}
2598}
2599
2600// IsEmpty returns true if the ListResult contains no values.
2601func (agplrlr ApplicationGatewayPrivateLinkResourceListResult) IsEmpty() bool {
2602	return agplrlr.Value == nil || len(*agplrlr.Value) == 0
2603}
2604
2605// hasNextLink returns true if the NextLink is not empty.
2606func (agplrlr ApplicationGatewayPrivateLinkResourceListResult) hasNextLink() bool {
2607	return agplrlr.NextLink != nil && len(*agplrlr.NextLink) != 0
2608}
2609
2610// applicationGatewayPrivateLinkResourceListResultPreparer prepares a request to retrieve the next set of results.
2611// It returns nil if no more results exist.
2612func (agplrlr ApplicationGatewayPrivateLinkResourceListResult) applicationGatewayPrivateLinkResourceListResultPreparer(ctx context.Context) (*http.Request, error) {
2613	if !agplrlr.hasNextLink() {
2614		return nil, nil
2615	}
2616	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2617		autorest.AsJSON(),
2618		autorest.AsGet(),
2619		autorest.WithBaseURL(to.String(agplrlr.NextLink)))
2620}
2621
2622// ApplicationGatewayPrivateLinkResourceListResultPage contains a page of
2623// ApplicationGatewayPrivateLinkResource values.
2624type ApplicationGatewayPrivateLinkResourceListResultPage struct {
2625	fn      func(context.Context, ApplicationGatewayPrivateLinkResourceListResult) (ApplicationGatewayPrivateLinkResourceListResult, error)
2626	agplrlr ApplicationGatewayPrivateLinkResourceListResult
2627}
2628
2629// NextWithContext advances to the next page of values.  If there was an error making
2630// the request the page does not advance and the error is returned.
2631func (page *ApplicationGatewayPrivateLinkResourceListResultPage) NextWithContext(ctx context.Context) (err error) {
2632	if tracing.IsEnabled() {
2633		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateLinkResourceListResultPage.NextWithContext")
2634		defer func() {
2635			sc := -1
2636			if page.Response().Response.Response != nil {
2637				sc = page.Response().Response.Response.StatusCode
2638			}
2639			tracing.EndSpan(ctx, sc, err)
2640		}()
2641	}
2642	for {
2643		next, err := page.fn(ctx, page.agplrlr)
2644		if err != nil {
2645			return err
2646		}
2647		page.agplrlr = next
2648		if !next.hasNextLink() || !next.IsEmpty() {
2649			break
2650		}
2651	}
2652	return nil
2653}
2654
2655// Next advances to the next page of values.  If there was an error making
2656// the request the page does not advance and the error is returned.
2657// Deprecated: Use NextWithContext() instead.
2658func (page *ApplicationGatewayPrivateLinkResourceListResultPage) Next() error {
2659	return page.NextWithContext(context.Background())
2660}
2661
2662// NotDone returns true if the page enumeration should be started or is not yet complete.
2663func (page ApplicationGatewayPrivateLinkResourceListResultPage) NotDone() bool {
2664	return !page.agplrlr.IsEmpty()
2665}
2666
2667// Response returns the raw server response from the last page request.
2668func (page ApplicationGatewayPrivateLinkResourceListResultPage) Response() ApplicationGatewayPrivateLinkResourceListResult {
2669	return page.agplrlr
2670}
2671
2672// Values returns the slice of values for the current page or nil if there are no values.
2673func (page ApplicationGatewayPrivateLinkResourceListResultPage) Values() []ApplicationGatewayPrivateLinkResource {
2674	if page.agplrlr.IsEmpty() {
2675		return nil
2676	}
2677	return *page.agplrlr.Value
2678}
2679
2680// Creates a new instance of the ApplicationGatewayPrivateLinkResourceListResultPage type.
2681func NewApplicationGatewayPrivateLinkResourceListResultPage(cur ApplicationGatewayPrivateLinkResourceListResult, getNextPage func(context.Context, ApplicationGatewayPrivateLinkResourceListResult) (ApplicationGatewayPrivateLinkResourceListResult, error)) ApplicationGatewayPrivateLinkResourceListResultPage {
2682	return ApplicationGatewayPrivateLinkResourceListResultPage{
2683		fn:      getNextPage,
2684		agplrlr: cur,
2685	}
2686}
2687
2688// ApplicationGatewayPrivateLinkResourceProperties properties of a private link resource.
2689type ApplicationGatewayPrivateLinkResourceProperties struct {
2690	// GroupID - READ-ONLY; Group identifier of private link resource.
2691	GroupID *string `json:"groupId,omitempty"`
2692	// RequiredMembers - READ-ONLY; Required member names of private link resource.
2693	RequiredMembers *[]string `json:"requiredMembers,omitempty"`
2694	// RequiredZoneNames - Required DNS zone names of the the private link resource.
2695	RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
2696}
2697
2698// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkResourceProperties.
2699func (agplrp ApplicationGatewayPrivateLinkResourceProperties) MarshalJSON() ([]byte, error) {
2700	objectMap := make(map[string]interface{})
2701	if agplrp.RequiredZoneNames != nil {
2702		objectMap["requiredZoneNames"] = agplrp.RequiredZoneNames
2703	}
2704	return json.Marshal(objectMap)
2705}
2706
2707// ApplicationGatewayProbe probe of the application gateway.
2708type ApplicationGatewayProbe struct {
2709	// ApplicationGatewayProbePropertiesFormat - Properties of the application gateway probe.
2710	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
2711	// Name - Name of the probe that is unique within an Application Gateway.
2712	Name *string `json:"name,omitempty"`
2713	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2714	Etag *string `json:"etag,omitempty"`
2715	// Type - READ-ONLY; Type of the resource.
2716	Type *string `json:"type,omitempty"`
2717	// ID - Resource ID.
2718	ID *string `json:"id,omitempty"`
2719}
2720
2721// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
2722func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
2723	objectMap := make(map[string]interface{})
2724	if agp.ApplicationGatewayProbePropertiesFormat != nil {
2725		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
2726	}
2727	if agp.Name != nil {
2728		objectMap["name"] = agp.Name
2729	}
2730	if agp.ID != nil {
2731		objectMap["id"] = agp.ID
2732	}
2733	return json.Marshal(objectMap)
2734}
2735
2736// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
2737func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
2738	var m map[string]*json.RawMessage
2739	err := json.Unmarshal(body, &m)
2740	if err != nil {
2741		return err
2742	}
2743	for k, v := range m {
2744		switch k {
2745		case "properties":
2746			if v != nil {
2747				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
2748				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
2749				if err != nil {
2750					return err
2751				}
2752				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
2753			}
2754		case "name":
2755			if v != nil {
2756				var name string
2757				err = json.Unmarshal(*v, &name)
2758				if err != nil {
2759					return err
2760				}
2761				agp.Name = &name
2762			}
2763		case "etag":
2764			if v != nil {
2765				var etag string
2766				err = json.Unmarshal(*v, &etag)
2767				if err != nil {
2768					return err
2769				}
2770				agp.Etag = &etag
2771			}
2772		case "type":
2773			if v != nil {
2774				var typeVar string
2775				err = json.Unmarshal(*v, &typeVar)
2776				if err != nil {
2777					return err
2778				}
2779				agp.Type = &typeVar
2780			}
2781		case "id":
2782			if v != nil {
2783				var ID string
2784				err = json.Unmarshal(*v, &ID)
2785				if err != nil {
2786					return err
2787				}
2788				agp.ID = &ID
2789			}
2790		}
2791	}
2792
2793	return nil
2794}
2795
2796// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match.
2797type ApplicationGatewayProbeHealthResponseMatch struct {
2798	// Body - Body that must be contained in the health response. Default value is empty.
2799	Body *string `json:"body,omitempty"`
2800	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
2801	StatusCodes *[]string `json:"statusCodes,omitempty"`
2802}
2803
2804// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
2805type ApplicationGatewayProbePropertiesFormat struct {
2806	// Protocol - The protocol used for the probe. Possible values include: 'HTTP', 'HTTPS'
2807	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
2808	// Host - Host name to send the probe to.
2809	Host *string `json:"host,omitempty"`
2810	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>.
2811	Path *string `json:"path,omitempty"`
2812	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
2813	Interval *int32 `json:"interval,omitempty"`
2814	// 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.
2815	Timeout *int32 `json:"timeout,omitempty"`
2816	// 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.
2817	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
2818	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
2819	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
2820	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
2821	MinServers *int32 `json:"minServers,omitempty"`
2822	// Match - Criterion for classifying a healthy probe response.
2823	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
2824	// ProvisioningState - READ-ONLY; The provisioning state of the probe resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2825	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2826	// 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.
2827	Port *int32 `json:"port,omitempty"`
2828}
2829
2830// MarshalJSON is the custom marshaler for ApplicationGatewayProbePropertiesFormat.
2831func (agppf ApplicationGatewayProbePropertiesFormat) MarshalJSON() ([]byte, error) {
2832	objectMap := make(map[string]interface{})
2833	if agppf.Protocol != "" {
2834		objectMap["protocol"] = agppf.Protocol
2835	}
2836	if agppf.Host != nil {
2837		objectMap["host"] = agppf.Host
2838	}
2839	if agppf.Path != nil {
2840		objectMap["path"] = agppf.Path
2841	}
2842	if agppf.Interval != nil {
2843		objectMap["interval"] = agppf.Interval
2844	}
2845	if agppf.Timeout != nil {
2846		objectMap["timeout"] = agppf.Timeout
2847	}
2848	if agppf.UnhealthyThreshold != nil {
2849		objectMap["unhealthyThreshold"] = agppf.UnhealthyThreshold
2850	}
2851	if agppf.PickHostNameFromBackendHTTPSettings != nil {
2852		objectMap["pickHostNameFromBackendHttpSettings"] = agppf.PickHostNameFromBackendHTTPSettings
2853	}
2854	if agppf.MinServers != nil {
2855		objectMap["minServers"] = agppf.MinServers
2856	}
2857	if agppf.Match != nil {
2858		objectMap["match"] = agppf.Match
2859	}
2860	if agppf.Port != nil {
2861		objectMap["port"] = agppf.Port
2862	}
2863	return json.Marshal(objectMap)
2864}
2865
2866// ApplicationGatewayPropertiesFormat properties of the application gateway.
2867type ApplicationGatewayPropertiesFormat struct {
2868	// Sku - SKU of the application gateway resource.
2869	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
2870	// SslPolicy - SSL policy of the application gateway resource.
2871	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
2872	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
2873	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
2874	// 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).
2875	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
2876	// 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).
2877	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
2878	// 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).
2879	TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"`
2880	// 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).
2881	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
2882	// 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).
2883	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
2884	// 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).
2885	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
2886	// Probes - Probes of the application gateway resource.
2887	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
2888	// 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).
2889	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
2890	// 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).
2891	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
2892	// 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).
2893	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
2894	// 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).
2895	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
2896	// RequestRoutingRules - Request routing rules of the application gateway resource.
2897	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
2898	// RewriteRuleSets - Rewrite rules for the application gateway resource.
2899	RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"`
2900	// 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).
2901	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
2902	// WebApplicationFirewallConfiguration - Web application firewall configuration.
2903	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
2904	// FirewallPolicy - Reference to the FirewallPolicy resource.
2905	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
2906	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
2907	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
2908	// EnableFips - Whether FIPS is enabled on the application gateway resource.
2909	EnableFips *bool `json:"enableFips,omitempty"`
2910	// AutoscaleConfiguration - Autoscale Configuration.
2911	AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"`
2912	// PrivateLinkConfigurations - PrivateLink configurations on application gateway.
2913	PrivateLinkConfigurations *[]ApplicationGatewayPrivateLinkConfiguration `json:"privateLinkConfigurations,omitempty"`
2914	// PrivateEndpointConnections - READ-ONLY; Private Endpoint connections on application gateway.
2915	PrivateEndpointConnections *[]ApplicationGatewayPrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
2916	// ResourceGUID - READ-ONLY; The resource GUID property of the application gateway resource.
2917	ResourceGUID *string `json:"resourceGuid,omitempty"`
2918	// ProvisioningState - READ-ONLY; The provisioning state of the application gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2919	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2920	// CustomErrorConfigurations - Custom error configurations of the application gateway resource.
2921	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
2922	// ForceFirewallPolicyAssociation - If true, associates a firewall policy with an application gateway regardless whether the policy differs from the WAF Config.
2923	ForceFirewallPolicyAssociation *bool `json:"forceFirewallPolicyAssociation,omitempty"`
2924}
2925
2926// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
2927func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
2928	objectMap := make(map[string]interface{})
2929	if agpf.Sku != nil {
2930		objectMap["sku"] = agpf.Sku
2931	}
2932	if agpf.SslPolicy != nil {
2933		objectMap["sslPolicy"] = agpf.SslPolicy
2934	}
2935	if agpf.GatewayIPConfigurations != nil {
2936		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
2937	}
2938	if agpf.AuthenticationCertificates != nil {
2939		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
2940	}
2941	if agpf.TrustedRootCertificates != nil {
2942		objectMap["trustedRootCertificates"] = agpf.TrustedRootCertificates
2943	}
2944	if agpf.SslCertificates != nil {
2945		objectMap["sslCertificates"] = agpf.SslCertificates
2946	}
2947	if agpf.FrontendIPConfigurations != nil {
2948		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
2949	}
2950	if agpf.FrontendPorts != nil {
2951		objectMap["frontendPorts"] = agpf.FrontendPorts
2952	}
2953	if agpf.Probes != nil {
2954		objectMap["probes"] = agpf.Probes
2955	}
2956	if agpf.BackendAddressPools != nil {
2957		objectMap["backendAddressPools"] = agpf.BackendAddressPools
2958	}
2959	if agpf.BackendHTTPSettingsCollection != nil {
2960		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
2961	}
2962	if agpf.HTTPListeners != nil {
2963		objectMap["httpListeners"] = agpf.HTTPListeners
2964	}
2965	if agpf.URLPathMaps != nil {
2966		objectMap["urlPathMaps"] = agpf.URLPathMaps
2967	}
2968	if agpf.RequestRoutingRules != nil {
2969		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
2970	}
2971	if agpf.RewriteRuleSets != nil {
2972		objectMap["rewriteRuleSets"] = agpf.RewriteRuleSets
2973	}
2974	if agpf.RedirectConfigurations != nil {
2975		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
2976	}
2977	if agpf.WebApplicationFirewallConfiguration != nil {
2978		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
2979	}
2980	if agpf.FirewallPolicy != nil {
2981		objectMap["firewallPolicy"] = agpf.FirewallPolicy
2982	}
2983	if agpf.EnableHTTP2 != nil {
2984		objectMap["enableHttp2"] = agpf.EnableHTTP2
2985	}
2986	if agpf.EnableFips != nil {
2987		objectMap["enableFips"] = agpf.EnableFips
2988	}
2989	if agpf.AutoscaleConfiguration != nil {
2990		objectMap["autoscaleConfiguration"] = agpf.AutoscaleConfiguration
2991	}
2992	if agpf.PrivateLinkConfigurations != nil {
2993		objectMap["privateLinkConfigurations"] = agpf.PrivateLinkConfigurations
2994	}
2995	if agpf.CustomErrorConfigurations != nil {
2996		objectMap["customErrorConfigurations"] = agpf.CustomErrorConfigurations
2997	}
2998	if agpf.ForceFirewallPolicyAssociation != nil {
2999		objectMap["forceFirewallPolicyAssociation"] = agpf.ForceFirewallPolicyAssociation
3000	}
3001	return json.Marshal(objectMap)
3002}
3003
3004// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
3005type ApplicationGatewayRedirectConfiguration struct {
3006	// ApplicationGatewayRedirectConfigurationPropertiesFormat - Properties of the application gateway redirect configuration.
3007	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
3008	// Name - Name of the redirect configuration that is unique within an Application Gateway.
3009	Name *string `json:"name,omitempty"`
3010	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3011	Etag *string `json:"etag,omitempty"`
3012	// Type - READ-ONLY; Type of the resource.
3013	Type *string `json:"type,omitempty"`
3014	// ID - Resource ID.
3015	ID *string `json:"id,omitempty"`
3016}
3017
3018// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
3019func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
3020	objectMap := make(map[string]interface{})
3021	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
3022		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
3023	}
3024	if agrc.Name != nil {
3025		objectMap["name"] = agrc.Name
3026	}
3027	if agrc.ID != nil {
3028		objectMap["id"] = agrc.ID
3029	}
3030	return json.Marshal(objectMap)
3031}
3032
3033// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
3034func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
3035	var m map[string]*json.RawMessage
3036	err := json.Unmarshal(body, &m)
3037	if err != nil {
3038		return err
3039	}
3040	for k, v := range m {
3041		switch k {
3042		case "properties":
3043			if v != nil {
3044				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
3045				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
3046				if err != nil {
3047					return err
3048				}
3049				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
3050			}
3051		case "name":
3052			if v != nil {
3053				var name string
3054				err = json.Unmarshal(*v, &name)
3055				if err != nil {
3056					return err
3057				}
3058				agrc.Name = &name
3059			}
3060		case "etag":
3061			if v != nil {
3062				var etag string
3063				err = json.Unmarshal(*v, &etag)
3064				if err != nil {
3065					return err
3066				}
3067				agrc.Etag = &etag
3068			}
3069		case "type":
3070			if v != nil {
3071				var typeVar string
3072				err = json.Unmarshal(*v, &typeVar)
3073				if err != nil {
3074					return err
3075				}
3076				agrc.Type = &typeVar
3077			}
3078		case "id":
3079			if v != nil {
3080				var ID string
3081				err = json.Unmarshal(*v, &ID)
3082				if err != nil {
3083					return err
3084				}
3085				agrc.ID = &ID
3086			}
3087		}
3088	}
3089
3090	return nil
3091}
3092
3093// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
3094// application gateway.
3095type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
3096	// RedirectType - HTTP redirection type. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
3097	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
3098	// TargetListener - Reference to a listener to redirect the request to.
3099	TargetListener *SubResource `json:"targetListener,omitempty"`
3100	// TargetURL - Url to redirect the request to.
3101	TargetURL *string `json:"targetUrl,omitempty"`
3102	// IncludePath - Include path in the redirected url.
3103	IncludePath *bool `json:"includePath,omitempty"`
3104	// IncludeQueryString - Include query string in the redirected url.
3105	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
3106	// RequestRoutingRules - Request routing specifying redirect configuration.
3107	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
3108	// URLPathMaps - Url path maps specifying default redirect configuration.
3109	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
3110	// PathRules - Path rules specifying redirect configuration.
3111	PathRules *[]SubResource `json:"pathRules,omitempty"`
3112}
3113
3114// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
3115type ApplicationGatewayRequestRoutingRule struct {
3116	// ApplicationGatewayRequestRoutingRulePropertiesFormat - Properties of the application gateway request routing rule.
3117	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
3118	// Name - Name of the request routing rule that is unique within an Application Gateway.
3119	Name *string `json:"name,omitempty"`
3120	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3121	Etag *string `json:"etag,omitempty"`
3122	// Type - READ-ONLY; Type of the resource.
3123	Type *string `json:"type,omitempty"`
3124	// ID - Resource ID.
3125	ID *string `json:"id,omitempty"`
3126}
3127
3128// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
3129func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
3130	objectMap := make(map[string]interface{})
3131	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
3132		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
3133	}
3134	if agrrr.Name != nil {
3135		objectMap["name"] = agrrr.Name
3136	}
3137	if agrrr.ID != nil {
3138		objectMap["id"] = agrrr.ID
3139	}
3140	return json.Marshal(objectMap)
3141}
3142
3143// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
3144func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
3145	var m map[string]*json.RawMessage
3146	err := json.Unmarshal(body, &m)
3147	if err != nil {
3148		return err
3149	}
3150	for k, v := range m {
3151		switch k {
3152		case "properties":
3153			if v != nil {
3154				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
3155				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
3156				if err != nil {
3157					return err
3158				}
3159				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
3160			}
3161		case "name":
3162			if v != nil {
3163				var name string
3164				err = json.Unmarshal(*v, &name)
3165				if err != nil {
3166					return err
3167				}
3168				agrrr.Name = &name
3169			}
3170		case "etag":
3171			if v != nil {
3172				var etag string
3173				err = json.Unmarshal(*v, &etag)
3174				if err != nil {
3175					return err
3176				}
3177				agrrr.Etag = &etag
3178			}
3179		case "type":
3180			if v != nil {
3181				var typeVar string
3182				err = json.Unmarshal(*v, &typeVar)
3183				if err != nil {
3184					return err
3185				}
3186				agrrr.Type = &typeVar
3187			}
3188		case "id":
3189			if v != nil {
3190				var ID string
3191				err = json.Unmarshal(*v, &ID)
3192				if err != nil {
3193					return err
3194				}
3195				agrrr.ID = &ID
3196			}
3197		}
3198	}
3199
3200	return nil
3201}
3202
3203// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
3204// application gateway.
3205type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
3206	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
3207	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
3208	// Priority - Priority of the request routing rule.
3209	Priority *int32 `json:"priority,omitempty"`
3210	// BackendAddressPool - Backend address pool resource of the application gateway.
3211	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
3212	// BackendHTTPSettings - Backend http settings resource of the application gateway.
3213	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
3214	// HTTPListener - Http listener resource of the application gateway.
3215	HTTPListener *SubResource `json:"httpListener,omitempty"`
3216	// URLPathMap - URL path map resource of the application gateway.
3217	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
3218	// RewriteRuleSet - Rewrite Rule Set resource in Basic rule of the application gateway.
3219	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
3220	// RedirectConfiguration - Redirect configuration resource of the application gateway.
3221	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
3222	// ProvisioningState - READ-ONLY; The provisioning state of the request routing rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3223	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3224}
3225
3226// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRulePropertiesFormat.
3227func (agrrrpf ApplicationGatewayRequestRoutingRulePropertiesFormat) MarshalJSON() ([]byte, error) {
3228	objectMap := make(map[string]interface{})
3229	if agrrrpf.RuleType != "" {
3230		objectMap["ruleType"] = agrrrpf.RuleType
3231	}
3232	if agrrrpf.Priority != nil {
3233		objectMap["priority"] = agrrrpf.Priority
3234	}
3235	if agrrrpf.BackendAddressPool != nil {
3236		objectMap["backendAddressPool"] = agrrrpf.BackendAddressPool
3237	}
3238	if agrrrpf.BackendHTTPSettings != nil {
3239		objectMap["backendHttpSettings"] = agrrrpf.BackendHTTPSettings
3240	}
3241	if agrrrpf.HTTPListener != nil {
3242		objectMap["httpListener"] = agrrrpf.HTTPListener
3243	}
3244	if agrrrpf.URLPathMap != nil {
3245		objectMap["urlPathMap"] = agrrrpf.URLPathMap
3246	}
3247	if agrrrpf.RewriteRuleSet != nil {
3248		objectMap["rewriteRuleSet"] = agrrrpf.RewriteRuleSet
3249	}
3250	if agrrrpf.RedirectConfiguration != nil {
3251		objectMap["redirectConfiguration"] = agrrrpf.RedirectConfiguration
3252	}
3253	return json.Marshal(objectMap)
3254}
3255
3256// ApplicationGatewayRewriteRule rewrite rule of an application gateway.
3257type ApplicationGatewayRewriteRule struct {
3258	// Name - Name of the rewrite rule that is unique within an Application Gateway.
3259	Name *string `json:"name,omitempty"`
3260	// RuleSequence - Rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet.
3261	RuleSequence *int32 `json:"ruleSequence,omitempty"`
3262	// Conditions - Conditions based on which the action set execution will be evaluated.
3263	Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"`
3264	// ActionSet - Set of actions to be done as part of the rewrite Rule.
3265	ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"`
3266}
3267
3268// ApplicationGatewayRewriteRuleActionSet set of actions in the Rewrite Rule in Application Gateway.
3269type ApplicationGatewayRewriteRuleActionSet struct {
3270	// RequestHeaderConfigurations - Request Header Actions in the Action Set.
3271	RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"`
3272	// ResponseHeaderConfigurations - Response Header Actions in the Action Set.
3273	ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"`
3274	// URLConfiguration - Url Configuration Action in the Action Set.
3275	URLConfiguration *ApplicationGatewayURLConfiguration `json:"urlConfiguration,omitempty"`
3276}
3277
3278// ApplicationGatewayRewriteRuleCondition set of conditions in the Rewrite Rule in Application Gateway.
3279type ApplicationGatewayRewriteRuleCondition struct {
3280	// Variable - The condition parameter of the RewriteRuleCondition.
3281	Variable *string `json:"variable,omitempty"`
3282	// Pattern - The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition.
3283	Pattern *string `json:"pattern,omitempty"`
3284	// IgnoreCase - Setting this paramter to truth value with force the pattern to do a case in-sensitive comparison.
3285	IgnoreCase *bool `json:"ignoreCase,omitempty"`
3286	// Negate - Setting this value as truth will force to check the negation of the condition given by the user.
3287	Negate *bool `json:"negate,omitempty"`
3288}
3289
3290// ApplicationGatewayRewriteRuleSet rewrite rule set of an application gateway.
3291type ApplicationGatewayRewriteRuleSet struct {
3292	// ApplicationGatewayRewriteRuleSetPropertiesFormat - Properties of the application gateway rewrite rule set.
3293	*ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"`
3294	// Name - Name of the rewrite rule set that is unique within an Application Gateway.
3295	Name *string `json:"name,omitempty"`
3296	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3297	Etag *string `json:"etag,omitempty"`
3298	// ID - Resource ID.
3299	ID *string `json:"id,omitempty"`
3300}
3301
3302// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSet.
3303func (agrrs ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) {
3304	objectMap := make(map[string]interface{})
3305	if agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat != nil {
3306		objectMap["properties"] = agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat
3307	}
3308	if agrrs.Name != nil {
3309		objectMap["name"] = agrrs.Name
3310	}
3311	if agrrs.ID != nil {
3312		objectMap["id"] = agrrs.ID
3313	}
3314	return json.Marshal(objectMap)
3315}
3316
3317// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRewriteRuleSet struct.
3318func (agrrs *ApplicationGatewayRewriteRuleSet) UnmarshalJSON(body []byte) error {
3319	var m map[string]*json.RawMessage
3320	err := json.Unmarshal(body, &m)
3321	if err != nil {
3322		return err
3323	}
3324	for k, v := range m {
3325		switch k {
3326		case "properties":
3327			if v != nil {
3328				var applicationGatewayRewriteRuleSetPropertiesFormat ApplicationGatewayRewriteRuleSetPropertiesFormat
3329				err = json.Unmarshal(*v, &applicationGatewayRewriteRuleSetPropertiesFormat)
3330				if err != nil {
3331					return err
3332				}
3333				agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat = &applicationGatewayRewriteRuleSetPropertiesFormat
3334			}
3335		case "name":
3336			if v != nil {
3337				var name string
3338				err = json.Unmarshal(*v, &name)
3339				if err != nil {
3340					return err
3341				}
3342				agrrs.Name = &name
3343			}
3344		case "etag":
3345			if v != nil {
3346				var etag string
3347				err = json.Unmarshal(*v, &etag)
3348				if err != nil {
3349					return err
3350				}
3351				agrrs.Etag = &etag
3352			}
3353		case "id":
3354			if v != nil {
3355				var ID string
3356				err = json.Unmarshal(*v, &ID)
3357				if err != nil {
3358					return err
3359				}
3360				agrrs.ID = &ID
3361			}
3362		}
3363	}
3364
3365	return nil
3366}
3367
3368// ApplicationGatewayRewriteRuleSetPropertiesFormat properties of rewrite rule set of the application
3369// gateway.
3370type ApplicationGatewayRewriteRuleSetPropertiesFormat struct {
3371	// RewriteRules - Rewrite rules in the rewrite rule set.
3372	RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"`
3373	// ProvisioningState - READ-ONLY; The provisioning state of the rewrite rule set resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3374	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3375}
3376
3377// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSetPropertiesFormat.
3378func (agrrspf ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) {
3379	objectMap := make(map[string]interface{})
3380	if agrrspf.RewriteRules != nil {
3381		objectMap["rewriteRules"] = agrrspf.RewriteRules
3382	}
3383	return json.Marshal(objectMap)
3384}
3385
3386// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
3387// long-running operation.
3388type ApplicationGatewaysBackendHealthFuture struct {
3389	azure.FutureAPI
3390	// Result returns the result of the asynchronous operation.
3391	// If the operation has not completed it will return an error.
3392	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
3393}
3394
3395// ApplicationGatewaysBackendHealthOnDemandFuture an abstraction for monitoring and retrieving the results
3396// of a long-running operation.
3397type ApplicationGatewaysBackendHealthOnDemandFuture struct {
3398	azure.FutureAPI
3399	// Result returns the result of the asynchronous operation.
3400	// If the operation has not completed it will return an error.
3401	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealthOnDemand, error)
3402}
3403
3404// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
3405// long-running operation.
3406type ApplicationGatewaysCreateOrUpdateFuture struct {
3407	azure.FutureAPI
3408	// Result returns the result of the asynchronous operation.
3409	// If the operation has not completed it will return an error.
3410	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
3411}
3412
3413// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
3414// long-running operation.
3415type ApplicationGatewaysDeleteFuture struct {
3416	azure.FutureAPI
3417	// Result returns the result of the asynchronous operation.
3418	// If the operation has not completed it will return an error.
3419	Result func(ApplicationGatewaysClient) (autorest.Response, error)
3420}
3421
3422// ApplicationGatewaySku SKU of an application gateway.
3423type ApplicationGatewaySku struct {
3424	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
3425	Name ApplicationGatewaySkuName `json:"name,omitempty"`
3426	// Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
3427	Tier ApplicationGatewayTier `json:"tier,omitempty"`
3428	// Capacity - Capacity (instance count) of an application gateway.
3429	Capacity *int32 `json:"capacity,omitempty"`
3430}
3431
3432// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
3433type ApplicationGatewaySslCertificate struct {
3434	// ApplicationGatewaySslCertificatePropertiesFormat - Properties of the application gateway SSL certificate.
3435	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
3436	// Name - Name of the SSL certificate that is unique within an Application Gateway.
3437	Name *string `json:"name,omitempty"`
3438	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3439	Etag *string `json:"etag,omitempty"`
3440	// Type - READ-ONLY; Type of the resource.
3441	Type *string `json:"type,omitempty"`
3442	// ID - Resource ID.
3443	ID *string `json:"id,omitempty"`
3444}
3445
3446// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
3447func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
3448	objectMap := make(map[string]interface{})
3449	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
3450		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
3451	}
3452	if agsc.Name != nil {
3453		objectMap["name"] = agsc.Name
3454	}
3455	if agsc.ID != nil {
3456		objectMap["id"] = agsc.ID
3457	}
3458	return json.Marshal(objectMap)
3459}
3460
3461// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
3462func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
3463	var m map[string]*json.RawMessage
3464	err := json.Unmarshal(body, &m)
3465	if err != nil {
3466		return err
3467	}
3468	for k, v := range m {
3469		switch k {
3470		case "properties":
3471			if v != nil {
3472				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
3473				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
3474				if err != nil {
3475					return err
3476				}
3477				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
3478			}
3479		case "name":
3480			if v != nil {
3481				var name string
3482				err = json.Unmarshal(*v, &name)
3483				if err != nil {
3484					return err
3485				}
3486				agsc.Name = &name
3487			}
3488		case "etag":
3489			if v != nil {
3490				var etag string
3491				err = json.Unmarshal(*v, &etag)
3492				if err != nil {
3493					return err
3494				}
3495				agsc.Etag = &etag
3496			}
3497		case "type":
3498			if v != nil {
3499				var typeVar string
3500				err = json.Unmarshal(*v, &typeVar)
3501				if err != nil {
3502					return err
3503				}
3504				agsc.Type = &typeVar
3505			}
3506		case "id":
3507			if v != nil {
3508				var ID string
3509				err = json.Unmarshal(*v, &ID)
3510				if err != nil {
3511					return err
3512				}
3513				agsc.ID = &ID
3514			}
3515		}
3516	}
3517
3518	return nil
3519}
3520
3521// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
3522// gateway.
3523type ApplicationGatewaySslCertificatePropertiesFormat struct {
3524	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
3525	Data *string `json:"data,omitempty"`
3526	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
3527	Password *string `json:"password,omitempty"`
3528	// PublicCertData - READ-ONLY; Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
3529	PublicCertData *string `json:"publicCertData,omitempty"`
3530	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
3531	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
3532	// ProvisioningState - READ-ONLY; The provisioning state of the SSL certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3533	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3534}
3535
3536// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificatePropertiesFormat.
3537func (agscpf ApplicationGatewaySslCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
3538	objectMap := make(map[string]interface{})
3539	if agscpf.Data != nil {
3540		objectMap["data"] = agscpf.Data
3541	}
3542	if agscpf.Password != nil {
3543		objectMap["password"] = agscpf.Password
3544	}
3545	if agscpf.KeyVaultSecretID != nil {
3546		objectMap["keyVaultSecretId"] = agscpf.KeyVaultSecretID
3547	}
3548	return json.Marshal(objectMap)
3549}
3550
3551// ApplicationGatewaySslPolicy application Gateway Ssl policy.
3552type ApplicationGatewaySslPolicy struct {
3553	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
3554	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
3555	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
3556	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
3557	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
3558	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
3559	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
3560	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
3561	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
3562	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
3563}
3564
3565// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy.
3566type ApplicationGatewaySslPredefinedPolicy struct {
3567	autorest.Response `json:"-"`
3568	// Name - Name of the Ssl predefined policy.
3569	Name *string `json:"name,omitempty"`
3570	// ApplicationGatewaySslPredefinedPolicyPropertiesFormat - Properties of the application gateway SSL predefined policy.
3571	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
3572	// ID - Resource ID.
3573	ID *string `json:"id,omitempty"`
3574}
3575
3576// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
3577func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
3578	objectMap := make(map[string]interface{})
3579	if agspp.Name != nil {
3580		objectMap["name"] = agspp.Name
3581	}
3582	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
3583		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
3584	}
3585	if agspp.ID != nil {
3586		objectMap["id"] = agspp.ID
3587	}
3588	return json.Marshal(objectMap)
3589}
3590
3591// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
3592func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
3593	var m map[string]*json.RawMessage
3594	err := json.Unmarshal(body, &m)
3595	if err != nil {
3596		return err
3597	}
3598	for k, v := range m {
3599		switch k {
3600		case "name":
3601			if v != nil {
3602				var name string
3603				err = json.Unmarshal(*v, &name)
3604				if err != nil {
3605					return err
3606				}
3607				agspp.Name = &name
3608			}
3609		case "properties":
3610			if v != nil {
3611				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
3612				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
3613				if err != nil {
3614					return err
3615				}
3616				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
3617			}
3618		case "id":
3619			if v != nil {
3620				var ID string
3621				err = json.Unmarshal(*v, &ID)
3622				if err != nil {
3623					return err
3624				}
3625				agspp.ID = &ID
3626			}
3627		}
3628	}
3629
3630	return nil
3631}
3632
3633// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
3634// ApplicationGatewaySslPredefinedPolicy.
3635type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
3636	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
3637	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
3638	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
3639	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
3640}
3641
3642// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
3643// long-running operation.
3644type ApplicationGatewaysStartFuture struct {
3645	azure.FutureAPI
3646	// Result returns the result of the asynchronous operation.
3647	// If the operation has not completed it will return an error.
3648	Result func(ApplicationGatewaysClient) (autorest.Response, error)
3649}
3650
3651// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
3652// operation.
3653type ApplicationGatewaysStopFuture struct {
3654	azure.FutureAPI
3655	// Result returns the result of the asynchronous operation.
3656	// If the operation has not completed it will return an error.
3657	Result func(ApplicationGatewaysClient) (autorest.Response, error)
3658}
3659
3660// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway.
3661type ApplicationGatewayTrustedRootCertificate struct {
3662	// ApplicationGatewayTrustedRootCertificatePropertiesFormat - Properties of the application gateway trusted root certificate.
3663	*ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"`
3664	// Name - Name of the trusted root certificate that is unique within an Application Gateway.
3665	Name *string `json:"name,omitempty"`
3666	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3667	Etag *string `json:"etag,omitempty"`
3668	// Type - READ-ONLY; Type of the resource.
3669	Type *string `json:"type,omitempty"`
3670	// ID - Resource ID.
3671	ID *string `json:"id,omitempty"`
3672}
3673
3674// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificate.
3675func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) {
3676	objectMap := make(map[string]interface{})
3677	if agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat != nil {
3678		objectMap["properties"] = agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat
3679	}
3680	if agtrc.Name != nil {
3681		objectMap["name"] = agtrc.Name
3682	}
3683	if agtrc.ID != nil {
3684		objectMap["id"] = agtrc.ID
3685	}
3686	return json.Marshal(objectMap)
3687}
3688
3689// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedRootCertificate struct.
3690func (agtrc *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(body []byte) error {
3691	var m map[string]*json.RawMessage
3692	err := json.Unmarshal(body, &m)
3693	if err != nil {
3694		return err
3695	}
3696	for k, v := range m {
3697		switch k {
3698		case "properties":
3699			if v != nil {
3700				var applicationGatewayTrustedRootCertificatePropertiesFormat ApplicationGatewayTrustedRootCertificatePropertiesFormat
3701				err = json.Unmarshal(*v, &applicationGatewayTrustedRootCertificatePropertiesFormat)
3702				if err != nil {
3703					return err
3704				}
3705				agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat = &applicationGatewayTrustedRootCertificatePropertiesFormat
3706			}
3707		case "name":
3708			if v != nil {
3709				var name string
3710				err = json.Unmarshal(*v, &name)
3711				if err != nil {
3712					return err
3713				}
3714				agtrc.Name = &name
3715			}
3716		case "etag":
3717			if v != nil {
3718				var etag string
3719				err = json.Unmarshal(*v, &etag)
3720				if err != nil {
3721					return err
3722				}
3723				agtrc.Etag = &etag
3724			}
3725		case "type":
3726			if v != nil {
3727				var typeVar string
3728				err = json.Unmarshal(*v, &typeVar)
3729				if err != nil {
3730					return err
3731				}
3732				agtrc.Type = &typeVar
3733			}
3734		case "id":
3735			if v != nil {
3736				var ID string
3737				err = json.Unmarshal(*v, &ID)
3738				if err != nil {
3739					return err
3740				}
3741				agtrc.ID = &ID
3742			}
3743		}
3744	}
3745
3746	return nil
3747}
3748
3749// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an
3750// application gateway.
3751type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct {
3752	// Data - Certificate public data.
3753	Data *string `json:"data,omitempty"`
3754	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
3755	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
3756	// ProvisioningState - READ-ONLY; The provisioning state of the trusted root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3757	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3758}
3759
3760// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificatePropertiesFormat.
3761func (agtrcpf ApplicationGatewayTrustedRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
3762	objectMap := make(map[string]interface{})
3763	if agtrcpf.Data != nil {
3764		objectMap["data"] = agtrcpf.Data
3765	}
3766	if agtrcpf.KeyVaultSecretID != nil {
3767		objectMap["keyVaultSecretId"] = agtrcpf.KeyVaultSecretID
3768	}
3769	return json.Marshal(objectMap)
3770}
3771
3772// ApplicationGatewayURLConfiguration url configuration of the Actions set in Application Gateway.
3773type ApplicationGatewayURLConfiguration struct {
3774	// ModifiedPath - Url path which user has provided for url rewrite. Null means no path will be updated. Default value is null.
3775	ModifiedPath *string `json:"modifiedPath,omitempty"`
3776	// ModifiedQueryString - Query string which user has provided for url rewrite. Null means no query string will be updated. Default value is null.
3777	ModifiedQueryString *string `json:"modifiedQueryString,omitempty"`
3778	// 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.
3779	Reroute *bool `json:"reroute,omitempty"`
3780}
3781
3782// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
3783// PathBasedRouting.
3784type ApplicationGatewayURLPathMap struct {
3785	// ApplicationGatewayURLPathMapPropertiesFormat - Properties of the application gateway URL path map.
3786	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
3787	// Name - Name of the URL path map that is unique within an Application Gateway.
3788	Name *string `json:"name,omitempty"`
3789	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3790	Etag *string `json:"etag,omitempty"`
3791	// Type - READ-ONLY; Type of the resource.
3792	Type *string `json:"type,omitempty"`
3793	// ID - Resource ID.
3794	ID *string `json:"id,omitempty"`
3795}
3796
3797// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
3798func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
3799	objectMap := make(map[string]interface{})
3800	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
3801		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
3802	}
3803	if agupm.Name != nil {
3804		objectMap["name"] = agupm.Name
3805	}
3806	if agupm.ID != nil {
3807		objectMap["id"] = agupm.ID
3808	}
3809	return json.Marshal(objectMap)
3810}
3811
3812// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
3813func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
3814	var m map[string]*json.RawMessage
3815	err := json.Unmarshal(body, &m)
3816	if err != nil {
3817		return err
3818	}
3819	for k, v := range m {
3820		switch k {
3821		case "properties":
3822			if v != nil {
3823				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
3824				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
3825				if err != nil {
3826					return err
3827				}
3828				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
3829			}
3830		case "name":
3831			if v != nil {
3832				var name string
3833				err = json.Unmarshal(*v, &name)
3834				if err != nil {
3835					return err
3836				}
3837				agupm.Name = &name
3838			}
3839		case "etag":
3840			if v != nil {
3841				var etag string
3842				err = json.Unmarshal(*v, &etag)
3843				if err != nil {
3844					return err
3845				}
3846				agupm.Etag = &etag
3847			}
3848		case "type":
3849			if v != nil {
3850				var typeVar string
3851				err = json.Unmarshal(*v, &typeVar)
3852				if err != nil {
3853					return err
3854				}
3855				agupm.Type = &typeVar
3856			}
3857		case "id":
3858			if v != nil {
3859				var ID string
3860				err = json.Unmarshal(*v, &ID)
3861				if err != nil {
3862					return err
3863				}
3864				agupm.ID = &ID
3865			}
3866		}
3867	}
3868
3869	return nil
3870}
3871
3872// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
3873type ApplicationGatewayURLPathMapPropertiesFormat struct {
3874	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
3875	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
3876	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
3877	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
3878	// DefaultRewriteRuleSet - Default Rewrite rule set resource of URL path map.
3879	DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"`
3880	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
3881	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
3882	// PathRules - Path rule of URL path map resource.
3883	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
3884	// ProvisioningState - READ-ONLY; The provisioning state of the URL path map resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3885	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3886}
3887
3888// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMapPropertiesFormat.
3889func (agupmpf ApplicationGatewayURLPathMapPropertiesFormat) MarshalJSON() ([]byte, error) {
3890	objectMap := make(map[string]interface{})
3891	if agupmpf.DefaultBackendAddressPool != nil {
3892		objectMap["defaultBackendAddressPool"] = agupmpf.DefaultBackendAddressPool
3893	}
3894	if agupmpf.DefaultBackendHTTPSettings != nil {
3895		objectMap["defaultBackendHttpSettings"] = agupmpf.DefaultBackendHTTPSettings
3896	}
3897	if agupmpf.DefaultRewriteRuleSet != nil {
3898		objectMap["defaultRewriteRuleSet"] = agupmpf.DefaultRewriteRuleSet
3899	}
3900	if agupmpf.DefaultRedirectConfiguration != nil {
3901		objectMap["defaultRedirectConfiguration"] = agupmpf.DefaultRedirectConfiguration
3902	}
3903	if agupmpf.PathRules != nil {
3904		objectMap["pathRules"] = agupmpf.PathRules
3905	}
3906	return json.Marshal(objectMap)
3907}
3908
3909// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
3910// configuration.
3911type ApplicationGatewayWebApplicationFirewallConfiguration struct {
3912	// Enabled - Whether the web application firewall is enabled or not.
3913	Enabled *bool `json:"enabled,omitempty"`
3914	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
3915	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
3916	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
3917	RuleSetType *string `json:"ruleSetType,omitempty"`
3918	// RuleSetVersion - The version of the rule set type.
3919	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
3920	// DisabledRuleGroups - The disabled rule groups.
3921	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
3922	// RequestBodyCheck - Whether allow WAF to check request Body.
3923	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
3924	// MaxRequestBodySize - Maximum request body size for WAF.
3925	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
3926	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
3927	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
3928	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
3929	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
3930	// Exclusions - The exclusion list.
3931	Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"`
3932}
3933
3934// ApplicationRule rule of type application.
3935type ApplicationRule struct {
3936	// SourceAddresses - List of source IP addresses for this rule.
3937	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
3938	// DestinationAddresses - List of destination IP addresses or Service Tags.
3939	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
3940	// Protocols - Array of Application Protocols.
3941	Protocols *[]FirewallPolicyRuleApplicationProtocol `json:"protocols,omitempty"`
3942	// TargetFqdns - List of FQDNs for this rule.
3943	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
3944	// FqdnTags - List of FQDN Tags for this rule.
3945	FqdnTags *[]string `json:"fqdnTags,omitempty"`
3946	// SourceIPGroups - List of source IpGroups for this rule.
3947	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
3948	// Name - Name of the rule.
3949	Name *string `json:"name,omitempty"`
3950	// Description - Description of the rule.
3951	Description *string `json:"description,omitempty"`
3952	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule'
3953	RuleType RuleType `json:"ruleType,omitempty"`
3954}
3955
3956// MarshalJSON is the custom marshaler for ApplicationRule.
3957func (ar ApplicationRule) MarshalJSON() ([]byte, error) {
3958	ar.RuleType = RuleTypeApplicationRule
3959	objectMap := make(map[string]interface{})
3960	if ar.SourceAddresses != nil {
3961		objectMap["sourceAddresses"] = ar.SourceAddresses
3962	}
3963	if ar.DestinationAddresses != nil {
3964		objectMap["destinationAddresses"] = ar.DestinationAddresses
3965	}
3966	if ar.Protocols != nil {
3967		objectMap["protocols"] = ar.Protocols
3968	}
3969	if ar.TargetFqdns != nil {
3970		objectMap["targetFqdns"] = ar.TargetFqdns
3971	}
3972	if ar.FqdnTags != nil {
3973		objectMap["fqdnTags"] = ar.FqdnTags
3974	}
3975	if ar.SourceIPGroups != nil {
3976		objectMap["sourceIpGroups"] = ar.SourceIPGroups
3977	}
3978	if ar.Name != nil {
3979		objectMap["name"] = ar.Name
3980	}
3981	if ar.Description != nil {
3982		objectMap["description"] = ar.Description
3983	}
3984	if ar.RuleType != "" {
3985		objectMap["ruleType"] = ar.RuleType
3986	}
3987	return json.Marshal(objectMap)
3988}
3989
3990// AsApplicationRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
3991func (ar ApplicationRule) AsApplicationRule() (*ApplicationRule, bool) {
3992	return &ar, true
3993}
3994
3995// AsNatRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
3996func (ar ApplicationRule) AsNatRule() (*NatRule, bool) {
3997	return nil, false
3998}
3999
4000// AsRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
4001func (ar ApplicationRule) AsRule() (*Rule, bool) {
4002	return nil, false
4003}
4004
4005// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
4006func (ar ApplicationRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
4007	return nil, false
4008}
4009
4010// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
4011func (ar ApplicationRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
4012	return &ar, true
4013}
4014
4015// ApplicationSecurityGroup an application security group in a resource group.
4016type ApplicationSecurityGroup struct {
4017	autorest.Response `json:"-"`
4018	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
4019	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
4020	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4021	Etag *string `json:"etag,omitempty"`
4022	// ID - Resource ID.
4023	ID *string `json:"id,omitempty"`
4024	// Name - READ-ONLY; Resource name.
4025	Name *string `json:"name,omitempty"`
4026	// Type - READ-ONLY; Resource type.
4027	Type *string `json:"type,omitempty"`
4028	// Location - Resource location.
4029	Location *string `json:"location,omitempty"`
4030	// Tags - Resource tags.
4031	Tags map[string]*string `json:"tags"`
4032}
4033
4034// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
4035func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
4036	objectMap := make(map[string]interface{})
4037	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
4038		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
4039	}
4040	if asg.ID != nil {
4041		objectMap["id"] = asg.ID
4042	}
4043	if asg.Location != nil {
4044		objectMap["location"] = asg.Location
4045	}
4046	if asg.Tags != nil {
4047		objectMap["tags"] = asg.Tags
4048	}
4049	return json.Marshal(objectMap)
4050}
4051
4052// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
4053func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
4054	var m map[string]*json.RawMessage
4055	err := json.Unmarshal(body, &m)
4056	if err != nil {
4057		return err
4058	}
4059	for k, v := range m {
4060		switch k {
4061		case "properties":
4062			if v != nil {
4063				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
4064				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
4065				if err != nil {
4066					return err
4067				}
4068				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
4069			}
4070		case "etag":
4071			if v != nil {
4072				var etag string
4073				err = json.Unmarshal(*v, &etag)
4074				if err != nil {
4075					return err
4076				}
4077				asg.Etag = &etag
4078			}
4079		case "id":
4080			if v != nil {
4081				var ID string
4082				err = json.Unmarshal(*v, &ID)
4083				if err != nil {
4084					return err
4085				}
4086				asg.ID = &ID
4087			}
4088		case "name":
4089			if v != nil {
4090				var name string
4091				err = json.Unmarshal(*v, &name)
4092				if err != nil {
4093					return err
4094				}
4095				asg.Name = &name
4096			}
4097		case "type":
4098			if v != nil {
4099				var typeVar string
4100				err = json.Unmarshal(*v, &typeVar)
4101				if err != nil {
4102					return err
4103				}
4104				asg.Type = &typeVar
4105			}
4106		case "location":
4107			if v != nil {
4108				var location string
4109				err = json.Unmarshal(*v, &location)
4110				if err != nil {
4111					return err
4112				}
4113				asg.Location = &location
4114			}
4115		case "tags":
4116			if v != nil {
4117				var tags map[string]*string
4118				err = json.Unmarshal(*v, &tags)
4119				if err != nil {
4120					return err
4121				}
4122				asg.Tags = tags
4123			}
4124		}
4125	}
4126
4127	return nil
4128}
4129
4130// ApplicationSecurityGroupListResult a list of application security groups.
4131type ApplicationSecurityGroupListResult struct {
4132	autorest.Response `json:"-"`
4133	// Value - A list of application security groups.
4134	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
4135	// NextLink - READ-ONLY; The URL to get the next set of results.
4136	NextLink *string `json:"nextLink,omitempty"`
4137}
4138
4139// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
4140func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
4141	objectMap := make(map[string]interface{})
4142	if asglr.Value != nil {
4143		objectMap["value"] = asglr.Value
4144	}
4145	return json.Marshal(objectMap)
4146}
4147
4148// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
4149// ApplicationSecurityGroup values.
4150type ApplicationSecurityGroupListResultIterator struct {
4151	i    int
4152	page ApplicationSecurityGroupListResultPage
4153}
4154
4155// NextWithContext advances to the next value.  If there was an error making
4156// the request the iterator does not advance and the error is returned.
4157func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
4158	if tracing.IsEnabled() {
4159		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
4160		defer func() {
4161			sc := -1
4162			if iter.Response().Response.Response != nil {
4163				sc = iter.Response().Response.Response.StatusCode
4164			}
4165			tracing.EndSpan(ctx, sc, err)
4166		}()
4167	}
4168	iter.i++
4169	if iter.i < len(iter.page.Values()) {
4170		return nil
4171	}
4172	err = iter.page.NextWithContext(ctx)
4173	if err != nil {
4174		iter.i--
4175		return err
4176	}
4177	iter.i = 0
4178	return nil
4179}
4180
4181// Next advances to the next value.  If there was an error making
4182// the request the iterator does not advance and the error is returned.
4183// Deprecated: Use NextWithContext() instead.
4184func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
4185	return iter.NextWithContext(context.Background())
4186}
4187
4188// NotDone returns true if the enumeration should be started or is not yet complete.
4189func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
4190	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4191}
4192
4193// Response returns the raw server response from the last page request.
4194func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
4195	return iter.page.Response()
4196}
4197
4198// Value returns the current value or a zero-initialized value if the
4199// iterator has advanced beyond the end of the collection.
4200func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
4201	if !iter.page.NotDone() {
4202		return ApplicationSecurityGroup{}
4203	}
4204	return iter.page.Values()[iter.i]
4205}
4206
4207// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
4208func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
4209	return ApplicationSecurityGroupListResultIterator{page: page}
4210}
4211
4212// IsEmpty returns true if the ListResult contains no values.
4213func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
4214	return asglr.Value == nil || len(*asglr.Value) == 0
4215}
4216
4217// hasNextLink returns true if the NextLink is not empty.
4218func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
4219	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
4220}
4221
4222// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
4223// It returns nil if no more results exist.
4224func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
4225	if !asglr.hasNextLink() {
4226		return nil, nil
4227	}
4228	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4229		autorest.AsJSON(),
4230		autorest.AsGet(),
4231		autorest.WithBaseURL(to.String(asglr.NextLink)))
4232}
4233
4234// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
4235type ApplicationSecurityGroupListResultPage struct {
4236	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
4237	asglr ApplicationSecurityGroupListResult
4238}
4239
4240// NextWithContext advances to the next page of values.  If there was an error making
4241// the request the page does not advance and the error is returned.
4242func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
4243	if tracing.IsEnabled() {
4244		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
4245		defer func() {
4246			sc := -1
4247			if page.Response().Response.Response != nil {
4248				sc = page.Response().Response.Response.StatusCode
4249			}
4250			tracing.EndSpan(ctx, sc, err)
4251		}()
4252	}
4253	for {
4254		next, err := page.fn(ctx, page.asglr)
4255		if err != nil {
4256			return err
4257		}
4258		page.asglr = next
4259		if !next.hasNextLink() || !next.IsEmpty() {
4260			break
4261		}
4262	}
4263	return nil
4264}
4265
4266// Next advances to the next page of values.  If there was an error making
4267// the request the page does not advance and the error is returned.
4268// Deprecated: Use NextWithContext() instead.
4269func (page *ApplicationSecurityGroupListResultPage) Next() error {
4270	return page.NextWithContext(context.Background())
4271}
4272
4273// NotDone returns true if the page enumeration should be started or is not yet complete.
4274func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
4275	return !page.asglr.IsEmpty()
4276}
4277
4278// Response returns the raw server response from the last page request.
4279func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
4280	return page.asglr
4281}
4282
4283// Values returns the slice of values for the current page or nil if there are no values.
4284func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
4285	if page.asglr.IsEmpty() {
4286		return nil
4287	}
4288	return *page.asglr.Value
4289}
4290
4291// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
4292func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
4293	return ApplicationSecurityGroupListResultPage{
4294		fn:    getNextPage,
4295		asglr: cur,
4296	}
4297}
4298
4299// ApplicationSecurityGroupPropertiesFormat application security group properties.
4300type ApplicationSecurityGroupPropertiesFormat struct {
4301	// 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.
4302	ResourceGUID *string `json:"resourceGuid,omitempty"`
4303	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4304	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4305}
4306
4307// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
4308// of a long-running operation.
4309type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
4310	azure.FutureAPI
4311	// Result returns the result of the asynchronous operation.
4312	// If the operation has not completed it will return an error.
4313	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
4314}
4315
4316// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
4317// long-running operation.
4318type ApplicationSecurityGroupsDeleteFuture struct {
4319	azure.FutureAPI
4320	// Result returns the result of the asynchronous operation.
4321	// If the operation has not completed it will return an error.
4322	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
4323}
4324
4325// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
4326// that belongs to an ExpressRouteCircuit.
4327type AuthorizationListResult struct {
4328	autorest.Response `json:"-"`
4329	// Value - The authorizations in an ExpressRoute Circuit.
4330	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
4331	// NextLink - The URL to get the next set of results.
4332	NextLink *string `json:"nextLink,omitempty"`
4333}
4334
4335// AuthorizationListResultIterator provides access to a complete listing of
4336// ExpressRouteCircuitAuthorization values.
4337type AuthorizationListResultIterator struct {
4338	i    int
4339	page AuthorizationListResultPage
4340}
4341
4342// NextWithContext advances to the next value.  If there was an error making
4343// the request the iterator does not advance and the error is returned.
4344func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
4345	if tracing.IsEnabled() {
4346		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
4347		defer func() {
4348			sc := -1
4349			if iter.Response().Response.Response != nil {
4350				sc = iter.Response().Response.Response.StatusCode
4351			}
4352			tracing.EndSpan(ctx, sc, err)
4353		}()
4354	}
4355	iter.i++
4356	if iter.i < len(iter.page.Values()) {
4357		return nil
4358	}
4359	err = iter.page.NextWithContext(ctx)
4360	if err != nil {
4361		iter.i--
4362		return err
4363	}
4364	iter.i = 0
4365	return nil
4366}
4367
4368// Next advances to the next value.  If there was an error making
4369// the request the iterator does not advance and the error is returned.
4370// Deprecated: Use NextWithContext() instead.
4371func (iter *AuthorizationListResultIterator) Next() error {
4372	return iter.NextWithContext(context.Background())
4373}
4374
4375// NotDone returns true if the enumeration should be started or is not yet complete.
4376func (iter AuthorizationListResultIterator) NotDone() bool {
4377	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4378}
4379
4380// Response returns the raw server response from the last page request.
4381func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
4382	return iter.page.Response()
4383}
4384
4385// Value returns the current value or a zero-initialized value if the
4386// iterator has advanced beyond the end of the collection.
4387func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
4388	if !iter.page.NotDone() {
4389		return ExpressRouteCircuitAuthorization{}
4390	}
4391	return iter.page.Values()[iter.i]
4392}
4393
4394// Creates a new instance of the AuthorizationListResultIterator type.
4395func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
4396	return AuthorizationListResultIterator{page: page}
4397}
4398
4399// IsEmpty returns true if the ListResult contains no values.
4400func (alr AuthorizationListResult) IsEmpty() bool {
4401	return alr.Value == nil || len(*alr.Value) == 0
4402}
4403
4404// hasNextLink returns true if the NextLink is not empty.
4405func (alr AuthorizationListResult) hasNextLink() bool {
4406	return alr.NextLink != nil && len(*alr.NextLink) != 0
4407}
4408
4409// authorizationListResultPreparer prepares a request to retrieve the next set of results.
4410// It returns nil if no more results exist.
4411func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
4412	if !alr.hasNextLink() {
4413		return nil, nil
4414	}
4415	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4416		autorest.AsJSON(),
4417		autorest.AsGet(),
4418		autorest.WithBaseURL(to.String(alr.NextLink)))
4419}
4420
4421// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
4422type AuthorizationListResultPage struct {
4423	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
4424	alr AuthorizationListResult
4425}
4426
4427// NextWithContext advances to the next page of values.  If there was an error making
4428// the request the page does not advance and the error is returned.
4429func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
4430	if tracing.IsEnabled() {
4431		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
4432		defer func() {
4433			sc := -1
4434			if page.Response().Response.Response != nil {
4435				sc = page.Response().Response.Response.StatusCode
4436			}
4437			tracing.EndSpan(ctx, sc, err)
4438		}()
4439	}
4440	for {
4441		next, err := page.fn(ctx, page.alr)
4442		if err != nil {
4443			return err
4444		}
4445		page.alr = next
4446		if !next.hasNextLink() || !next.IsEmpty() {
4447			break
4448		}
4449	}
4450	return nil
4451}
4452
4453// Next advances to the next page of values.  If there was an error making
4454// the request the page does not advance and the error is returned.
4455// Deprecated: Use NextWithContext() instead.
4456func (page *AuthorizationListResultPage) Next() error {
4457	return page.NextWithContext(context.Background())
4458}
4459
4460// NotDone returns true if the page enumeration should be started or is not yet complete.
4461func (page AuthorizationListResultPage) NotDone() bool {
4462	return !page.alr.IsEmpty()
4463}
4464
4465// Response returns the raw server response from the last page request.
4466func (page AuthorizationListResultPage) Response() AuthorizationListResult {
4467	return page.alr
4468}
4469
4470// Values returns the slice of values for the current page or nil if there are no values.
4471func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
4472	if page.alr.IsEmpty() {
4473		return nil
4474	}
4475	return *page.alr.Value
4476}
4477
4478// Creates a new instance of the AuthorizationListResultPage type.
4479func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
4480	return AuthorizationListResultPage{
4481		fn:  getNextPage,
4482		alr: cur,
4483	}
4484}
4485
4486// AuthorizationPropertiesFormat properties of ExpressRouteCircuitAuthorization.
4487type AuthorizationPropertiesFormat struct {
4488	// AuthorizationKey - The authorization key.
4489	AuthorizationKey *string `json:"authorizationKey,omitempty"`
4490	// AuthorizationUseStatus - The authorization use status. Possible values include: 'Available', 'InUse'
4491	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
4492	// ProvisioningState - READ-ONLY; The provisioning state of the authorization resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4493	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4494}
4495
4496// MarshalJSON is the custom marshaler for AuthorizationPropertiesFormat.
4497func (apf AuthorizationPropertiesFormat) MarshalJSON() ([]byte, error) {
4498	objectMap := make(map[string]interface{})
4499	if apf.AuthorizationKey != nil {
4500		objectMap["authorizationKey"] = apf.AuthorizationKey
4501	}
4502	if apf.AuthorizationUseStatus != "" {
4503		objectMap["authorizationUseStatus"] = apf.AuthorizationUseStatus
4504	}
4505	return json.Marshal(objectMap)
4506}
4507
4508// AutoApprovedPrivateLinkService the information of an AutoApprovedPrivateLinkService.
4509type AutoApprovedPrivateLinkService struct {
4510	// PrivateLinkService - The id of the private link service resource.
4511	PrivateLinkService *string `json:"privateLinkService,omitempty"`
4512}
4513
4514// AutoApprovedPrivateLinkServicesResult an array of private link service id that can be linked to a
4515// private end point with auto approved.
4516type AutoApprovedPrivateLinkServicesResult struct {
4517	autorest.Response `json:"-"`
4518	// Value - An array of auto approved private link service.
4519	Value *[]AutoApprovedPrivateLinkService `json:"value,omitempty"`
4520	// NextLink - READ-ONLY; The URL to get the next set of results.
4521	NextLink *string `json:"nextLink,omitempty"`
4522}
4523
4524// MarshalJSON is the custom marshaler for AutoApprovedPrivateLinkServicesResult.
4525func (aaplsr AutoApprovedPrivateLinkServicesResult) MarshalJSON() ([]byte, error) {
4526	objectMap := make(map[string]interface{})
4527	if aaplsr.Value != nil {
4528		objectMap["value"] = aaplsr.Value
4529	}
4530	return json.Marshal(objectMap)
4531}
4532
4533// AutoApprovedPrivateLinkServicesResultIterator provides access to a complete listing of
4534// AutoApprovedPrivateLinkService values.
4535type AutoApprovedPrivateLinkServicesResultIterator struct {
4536	i    int
4537	page AutoApprovedPrivateLinkServicesResultPage
4538}
4539
4540// NextWithContext advances to the next value.  If there was an error making
4541// the request the iterator does not advance and the error is returned.
4542func (iter *AutoApprovedPrivateLinkServicesResultIterator) NextWithContext(ctx context.Context) (err error) {
4543	if tracing.IsEnabled() {
4544		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultIterator.NextWithContext")
4545		defer func() {
4546			sc := -1
4547			if iter.Response().Response.Response != nil {
4548				sc = iter.Response().Response.Response.StatusCode
4549			}
4550			tracing.EndSpan(ctx, sc, err)
4551		}()
4552	}
4553	iter.i++
4554	if iter.i < len(iter.page.Values()) {
4555		return nil
4556	}
4557	err = iter.page.NextWithContext(ctx)
4558	if err != nil {
4559		iter.i--
4560		return err
4561	}
4562	iter.i = 0
4563	return nil
4564}
4565
4566// Next advances to the next value.  If there was an error making
4567// the request the iterator does not advance and the error is returned.
4568// Deprecated: Use NextWithContext() instead.
4569func (iter *AutoApprovedPrivateLinkServicesResultIterator) Next() error {
4570	return iter.NextWithContext(context.Background())
4571}
4572
4573// NotDone returns true if the enumeration should be started or is not yet complete.
4574func (iter AutoApprovedPrivateLinkServicesResultIterator) NotDone() bool {
4575	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4576}
4577
4578// Response returns the raw server response from the last page request.
4579func (iter AutoApprovedPrivateLinkServicesResultIterator) Response() AutoApprovedPrivateLinkServicesResult {
4580	return iter.page.Response()
4581}
4582
4583// Value returns the current value or a zero-initialized value if the
4584// iterator has advanced beyond the end of the collection.
4585func (iter AutoApprovedPrivateLinkServicesResultIterator) Value() AutoApprovedPrivateLinkService {
4586	if !iter.page.NotDone() {
4587		return AutoApprovedPrivateLinkService{}
4588	}
4589	return iter.page.Values()[iter.i]
4590}
4591
4592// Creates a new instance of the AutoApprovedPrivateLinkServicesResultIterator type.
4593func NewAutoApprovedPrivateLinkServicesResultIterator(page AutoApprovedPrivateLinkServicesResultPage) AutoApprovedPrivateLinkServicesResultIterator {
4594	return AutoApprovedPrivateLinkServicesResultIterator{page: page}
4595}
4596
4597// IsEmpty returns true if the ListResult contains no values.
4598func (aaplsr AutoApprovedPrivateLinkServicesResult) IsEmpty() bool {
4599	return aaplsr.Value == nil || len(*aaplsr.Value) == 0
4600}
4601
4602// hasNextLink returns true if the NextLink is not empty.
4603func (aaplsr AutoApprovedPrivateLinkServicesResult) hasNextLink() bool {
4604	return aaplsr.NextLink != nil && len(*aaplsr.NextLink) != 0
4605}
4606
4607// autoApprovedPrivateLinkServicesResultPreparer prepares a request to retrieve the next set of results.
4608// It returns nil if no more results exist.
4609func (aaplsr AutoApprovedPrivateLinkServicesResult) autoApprovedPrivateLinkServicesResultPreparer(ctx context.Context) (*http.Request, error) {
4610	if !aaplsr.hasNextLink() {
4611		return nil, nil
4612	}
4613	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4614		autorest.AsJSON(),
4615		autorest.AsGet(),
4616		autorest.WithBaseURL(to.String(aaplsr.NextLink)))
4617}
4618
4619// AutoApprovedPrivateLinkServicesResultPage contains a page of AutoApprovedPrivateLinkService values.
4620type AutoApprovedPrivateLinkServicesResultPage struct {
4621	fn     func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)
4622	aaplsr AutoApprovedPrivateLinkServicesResult
4623}
4624
4625// NextWithContext advances to the next page of values.  If there was an error making
4626// the request the page does not advance and the error is returned.
4627func (page *AutoApprovedPrivateLinkServicesResultPage) NextWithContext(ctx context.Context) (err error) {
4628	if tracing.IsEnabled() {
4629		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultPage.NextWithContext")
4630		defer func() {
4631			sc := -1
4632			if page.Response().Response.Response != nil {
4633				sc = page.Response().Response.Response.StatusCode
4634			}
4635			tracing.EndSpan(ctx, sc, err)
4636		}()
4637	}
4638	for {
4639		next, err := page.fn(ctx, page.aaplsr)
4640		if err != nil {
4641			return err
4642		}
4643		page.aaplsr = next
4644		if !next.hasNextLink() || !next.IsEmpty() {
4645			break
4646		}
4647	}
4648	return nil
4649}
4650
4651// Next advances to the next page of values.  If there was an error making
4652// the request the page does not advance and the error is returned.
4653// Deprecated: Use NextWithContext() instead.
4654func (page *AutoApprovedPrivateLinkServicesResultPage) Next() error {
4655	return page.NextWithContext(context.Background())
4656}
4657
4658// NotDone returns true if the page enumeration should be started or is not yet complete.
4659func (page AutoApprovedPrivateLinkServicesResultPage) NotDone() bool {
4660	return !page.aaplsr.IsEmpty()
4661}
4662
4663// Response returns the raw server response from the last page request.
4664func (page AutoApprovedPrivateLinkServicesResultPage) Response() AutoApprovedPrivateLinkServicesResult {
4665	return page.aaplsr
4666}
4667
4668// Values returns the slice of values for the current page or nil if there are no values.
4669func (page AutoApprovedPrivateLinkServicesResultPage) Values() []AutoApprovedPrivateLinkService {
4670	if page.aaplsr.IsEmpty() {
4671		return nil
4672	}
4673	return *page.aaplsr.Value
4674}
4675
4676// Creates a new instance of the AutoApprovedPrivateLinkServicesResultPage type.
4677func NewAutoApprovedPrivateLinkServicesResultPage(cur AutoApprovedPrivateLinkServicesResult, getNextPage func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)) AutoApprovedPrivateLinkServicesResultPage {
4678	return AutoApprovedPrivateLinkServicesResultPage{
4679		fn:     getNextPage,
4680		aaplsr: cur,
4681	}
4682}
4683
4684// Availability availability of the metric.
4685type Availability struct {
4686	// TimeGrain - The time grain of the availability.
4687	TimeGrain *string `json:"timeGrain,omitempty"`
4688	// Retention - The retention of the availability.
4689	Retention *string `json:"retention,omitempty"`
4690	// BlobDuration - Duration of the availability blob.
4691	BlobDuration *string `json:"blobDuration,omitempty"`
4692}
4693
4694// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a
4695// subnet.
4696type AvailableDelegation struct {
4697	// Name - The name of the AvailableDelegation resource.
4698	Name *string `json:"name,omitempty"`
4699	// ID - A unique identifier of the AvailableDelegation resource.
4700	ID *string `json:"id,omitempty"`
4701	// Type - Resource type.
4702	Type *string `json:"type,omitempty"`
4703	// ServiceName - The name of the service and resource.
4704	ServiceName *string `json:"serviceName,omitempty"`
4705	// Actions - The actions permitted to the service upon delegation.
4706	Actions *[]string `json:"actions,omitempty"`
4707}
4708
4709// AvailableDelegationsResult an array of available delegations.
4710type AvailableDelegationsResult struct {
4711	autorest.Response `json:"-"`
4712	// Value - An array of available delegations.
4713	Value *[]AvailableDelegation `json:"value,omitempty"`
4714	// NextLink - READ-ONLY; The URL to get the next set of results.
4715	NextLink *string `json:"nextLink,omitempty"`
4716}
4717
4718// MarshalJSON is the custom marshaler for AvailableDelegationsResult.
4719func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) {
4720	objectMap := make(map[string]interface{})
4721	if adr.Value != nil {
4722		objectMap["value"] = adr.Value
4723	}
4724	return json.Marshal(objectMap)
4725}
4726
4727// AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values.
4728type AvailableDelegationsResultIterator struct {
4729	i    int
4730	page AvailableDelegationsResultPage
4731}
4732
4733// NextWithContext advances to the next value.  If there was an error making
4734// the request the iterator does not advance and the error is returned.
4735func (iter *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) {
4736	if tracing.IsEnabled() {
4737		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.NextWithContext")
4738		defer func() {
4739			sc := -1
4740			if iter.Response().Response.Response != nil {
4741				sc = iter.Response().Response.Response.StatusCode
4742			}
4743			tracing.EndSpan(ctx, sc, err)
4744		}()
4745	}
4746	iter.i++
4747	if iter.i < len(iter.page.Values()) {
4748		return nil
4749	}
4750	err = iter.page.NextWithContext(ctx)
4751	if err != nil {
4752		iter.i--
4753		return err
4754	}
4755	iter.i = 0
4756	return nil
4757}
4758
4759// Next advances to the next value.  If there was an error making
4760// the request the iterator does not advance and the error is returned.
4761// Deprecated: Use NextWithContext() instead.
4762func (iter *AvailableDelegationsResultIterator) Next() error {
4763	return iter.NextWithContext(context.Background())
4764}
4765
4766// NotDone returns true if the enumeration should be started or is not yet complete.
4767func (iter AvailableDelegationsResultIterator) NotDone() bool {
4768	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4769}
4770
4771// Response returns the raw server response from the last page request.
4772func (iter AvailableDelegationsResultIterator) Response() AvailableDelegationsResult {
4773	return iter.page.Response()
4774}
4775
4776// Value returns the current value or a zero-initialized value if the
4777// iterator has advanced beyond the end of the collection.
4778func (iter AvailableDelegationsResultIterator) Value() AvailableDelegation {
4779	if !iter.page.NotDone() {
4780		return AvailableDelegation{}
4781	}
4782	return iter.page.Values()[iter.i]
4783}
4784
4785// Creates a new instance of the AvailableDelegationsResultIterator type.
4786func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator {
4787	return AvailableDelegationsResultIterator{page: page}
4788}
4789
4790// IsEmpty returns true if the ListResult contains no values.
4791func (adr AvailableDelegationsResult) IsEmpty() bool {
4792	return adr.Value == nil || len(*adr.Value) == 0
4793}
4794
4795// hasNextLink returns true if the NextLink is not empty.
4796func (adr AvailableDelegationsResult) hasNextLink() bool {
4797	return adr.NextLink != nil && len(*adr.NextLink) != 0
4798}
4799
4800// availableDelegationsResultPreparer prepares a request to retrieve the next set of results.
4801// It returns nil if no more results exist.
4802func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) {
4803	if !adr.hasNextLink() {
4804		return nil, nil
4805	}
4806	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4807		autorest.AsJSON(),
4808		autorest.AsGet(),
4809		autorest.WithBaseURL(to.String(adr.NextLink)))
4810}
4811
4812// AvailableDelegationsResultPage contains a page of AvailableDelegation values.
4813type AvailableDelegationsResultPage struct {
4814	fn  func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)
4815	adr AvailableDelegationsResult
4816}
4817
4818// NextWithContext advances to the next page of values.  If there was an error making
4819// the request the page does not advance and the error is returned.
4820func (page *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) {
4821	if tracing.IsEnabled() {
4822		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.NextWithContext")
4823		defer func() {
4824			sc := -1
4825			if page.Response().Response.Response != nil {
4826				sc = page.Response().Response.Response.StatusCode
4827			}
4828			tracing.EndSpan(ctx, sc, err)
4829		}()
4830	}
4831	for {
4832		next, err := page.fn(ctx, page.adr)
4833		if err != nil {
4834			return err
4835		}
4836		page.adr = next
4837		if !next.hasNextLink() || !next.IsEmpty() {
4838			break
4839		}
4840	}
4841	return nil
4842}
4843
4844// Next advances to the next page of values.  If there was an error making
4845// the request the page does not advance and the error is returned.
4846// Deprecated: Use NextWithContext() instead.
4847func (page *AvailableDelegationsResultPage) Next() error {
4848	return page.NextWithContext(context.Background())
4849}
4850
4851// NotDone returns true if the page enumeration should be started or is not yet complete.
4852func (page AvailableDelegationsResultPage) NotDone() bool {
4853	return !page.adr.IsEmpty()
4854}
4855
4856// Response returns the raw server response from the last page request.
4857func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult {
4858	return page.adr
4859}
4860
4861// Values returns the slice of values for the current page or nil if there are no values.
4862func (page AvailableDelegationsResultPage) Values() []AvailableDelegation {
4863	if page.adr.IsEmpty() {
4864		return nil
4865	}
4866	return *page.adr.Value
4867}
4868
4869// Creates a new instance of the AvailableDelegationsResultPage type.
4870func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage {
4871	return AvailableDelegationsResultPage{
4872		fn:  getNextPage,
4873		adr: cur,
4874	}
4875}
4876
4877// AvailablePrivateEndpointType the information of an AvailablePrivateEndpointType.
4878type AvailablePrivateEndpointType struct {
4879	// Name - The name of the service and resource.
4880	Name *string `json:"name,omitempty"`
4881	// ID - A unique identifier of the AvailablePrivateEndpoint Type resource.
4882	ID *string `json:"id,omitempty"`
4883	// Type - Resource type.
4884	Type *string `json:"type,omitempty"`
4885	// ResourceName - The name of the service and resource.
4886	ResourceName *string `json:"resourceName,omitempty"`
4887}
4888
4889// AvailablePrivateEndpointTypesResult an array of available PrivateEndpoint types.
4890type AvailablePrivateEndpointTypesResult struct {
4891	autorest.Response `json:"-"`
4892	// Value - An array of available privateEndpoint type.
4893	Value *[]AvailablePrivateEndpointType `json:"value,omitempty"`
4894	// NextLink - READ-ONLY; The URL to get the next set of results.
4895	NextLink *string `json:"nextLink,omitempty"`
4896}
4897
4898// MarshalJSON is the custom marshaler for AvailablePrivateEndpointTypesResult.
4899func (apetr AvailablePrivateEndpointTypesResult) MarshalJSON() ([]byte, error) {
4900	objectMap := make(map[string]interface{})
4901	if apetr.Value != nil {
4902		objectMap["value"] = apetr.Value
4903	}
4904	return json.Marshal(objectMap)
4905}
4906
4907// AvailablePrivateEndpointTypesResultIterator provides access to a complete listing of
4908// AvailablePrivateEndpointType values.
4909type AvailablePrivateEndpointTypesResultIterator struct {
4910	i    int
4911	page AvailablePrivateEndpointTypesResultPage
4912}
4913
4914// NextWithContext advances to the next value.  If there was an error making
4915// the request the iterator does not advance and the error is returned.
4916func (iter *AvailablePrivateEndpointTypesResultIterator) NextWithContext(ctx context.Context) (err error) {
4917	if tracing.IsEnabled() {
4918		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultIterator.NextWithContext")
4919		defer func() {
4920			sc := -1
4921			if iter.Response().Response.Response != nil {
4922				sc = iter.Response().Response.Response.StatusCode
4923			}
4924			tracing.EndSpan(ctx, sc, err)
4925		}()
4926	}
4927	iter.i++
4928	if iter.i < len(iter.page.Values()) {
4929		return nil
4930	}
4931	err = iter.page.NextWithContext(ctx)
4932	if err != nil {
4933		iter.i--
4934		return err
4935	}
4936	iter.i = 0
4937	return nil
4938}
4939
4940// Next advances to the next value.  If there was an error making
4941// the request the iterator does not advance and the error is returned.
4942// Deprecated: Use NextWithContext() instead.
4943func (iter *AvailablePrivateEndpointTypesResultIterator) Next() error {
4944	return iter.NextWithContext(context.Background())
4945}
4946
4947// NotDone returns true if the enumeration should be started or is not yet complete.
4948func (iter AvailablePrivateEndpointTypesResultIterator) NotDone() bool {
4949	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4950}
4951
4952// Response returns the raw server response from the last page request.
4953func (iter AvailablePrivateEndpointTypesResultIterator) Response() AvailablePrivateEndpointTypesResult {
4954	return iter.page.Response()
4955}
4956
4957// Value returns the current value or a zero-initialized value if the
4958// iterator has advanced beyond the end of the collection.
4959func (iter AvailablePrivateEndpointTypesResultIterator) Value() AvailablePrivateEndpointType {
4960	if !iter.page.NotDone() {
4961		return AvailablePrivateEndpointType{}
4962	}
4963	return iter.page.Values()[iter.i]
4964}
4965
4966// Creates a new instance of the AvailablePrivateEndpointTypesResultIterator type.
4967func NewAvailablePrivateEndpointTypesResultIterator(page AvailablePrivateEndpointTypesResultPage) AvailablePrivateEndpointTypesResultIterator {
4968	return AvailablePrivateEndpointTypesResultIterator{page: page}
4969}
4970
4971// IsEmpty returns true if the ListResult contains no values.
4972func (apetr AvailablePrivateEndpointTypesResult) IsEmpty() bool {
4973	return apetr.Value == nil || len(*apetr.Value) == 0
4974}
4975
4976// hasNextLink returns true if the NextLink is not empty.
4977func (apetr AvailablePrivateEndpointTypesResult) hasNextLink() bool {
4978	return apetr.NextLink != nil && len(*apetr.NextLink) != 0
4979}
4980
4981// availablePrivateEndpointTypesResultPreparer prepares a request to retrieve the next set of results.
4982// It returns nil if no more results exist.
4983func (apetr AvailablePrivateEndpointTypesResult) availablePrivateEndpointTypesResultPreparer(ctx context.Context) (*http.Request, error) {
4984	if !apetr.hasNextLink() {
4985		return nil, nil
4986	}
4987	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4988		autorest.AsJSON(),
4989		autorest.AsGet(),
4990		autorest.WithBaseURL(to.String(apetr.NextLink)))
4991}
4992
4993// AvailablePrivateEndpointTypesResultPage contains a page of AvailablePrivateEndpointType values.
4994type AvailablePrivateEndpointTypesResultPage struct {
4995	fn    func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)
4996	apetr AvailablePrivateEndpointTypesResult
4997}
4998
4999// NextWithContext advances to the next page of values.  If there was an error making
5000// the request the page does not advance and the error is returned.
5001func (page *AvailablePrivateEndpointTypesResultPage) NextWithContext(ctx context.Context) (err error) {
5002	if tracing.IsEnabled() {
5003		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultPage.NextWithContext")
5004		defer func() {
5005			sc := -1
5006			if page.Response().Response.Response != nil {
5007				sc = page.Response().Response.Response.StatusCode
5008			}
5009			tracing.EndSpan(ctx, sc, err)
5010		}()
5011	}
5012	for {
5013		next, err := page.fn(ctx, page.apetr)
5014		if err != nil {
5015			return err
5016		}
5017		page.apetr = next
5018		if !next.hasNextLink() || !next.IsEmpty() {
5019			break
5020		}
5021	}
5022	return nil
5023}
5024
5025// Next advances to the next page of values.  If there was an error making
5026// the request the page does not advance and the error is returned.
5027// Deprecated: Use NextWithContext() instead.
5028func (page *AvailablePrivateEndpointTypesResultPage) Next() error {
5029	return page.NextWithContext(context.Background())
5030}
5031
5032// NotDone returns true if the page enumeration should be started or is not yet complete.
5033func (page AvailablePrivateEndpointTypesResultPage) NotDone() bool {
5034	return !page.apetr.IsEmpty()
5035}
5036
5037// Response returns the raw server response from the last page request.
5038func (page AvailablePrivateEndpointTypesResultPage) Response() AvailablePrivateEndpointTypesResult {
5039	return page.apetr
5040}
5041
5042// Values returns the slice of values for the current page or nil if there are no values.
5043func (page AvailablePrivateEndpointTypesResultPage) Values() []AvailablePrivateEndpointType {
5044	if page.apetr.IsEmpty() {
5045		return nil
5046	}
5047	return *page.apetr.Value
5048}
5049
5050// Creates a new instance of the AvailablePrivateEndpointTypesResultPage type.
5051func NewAvailablePrivateEndpointTypesResultPage(cur AvailablePrivateEndpointTypesResult, getNextPage func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)) AvailablePrivateEndpointTypesResultPage {
5052	return AvailablePrivateEndpointTypesResultPage{
5053		fn:    getNextPage,
5054		apetr: cur,
5055	}
5056}
5057
5058// AvailableProvidersList list of available countries with details.
5059type AvailableProvidersList struct {
5060	autorest.Response `json:"-"`
5061	// Countries - List of available countries.
5062	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
5063}
5064
5065// AvailableProvidersListCity city or town details.
5066type AvailableProvidersListCity struct {
5067	// CityName - The city or town name.
5068	CityName *string `json:"cityName,omitempty"`
5069	// Providers - A list of Internet service providers.
5070	Providers *[]string `json:"providers,omitempty"`
5071}
5072
5073// AvailableProvidersListCountry country details.
5074type AvailableProvidersListCountry struct {
5075	// CountryName - The country name.
5076	CountryName *string `json:"countryName,omitempty"`
5077	// Providers - A list of Internet service providers.
5078	Providers *[]string `json:"providers,omitempty"`
5079	// States - List of available states in the country.
5080	States *[]AvailableProvidersListState `json:"states,omitempty"`
5081}
5082
5083// AvailableProvidersListParameters constraints that determine the list of available Internet service
5084// providers.
5085type AvailableProvidersListParameters struct {
5086	// AzureLocations - A list of Azure regions.
5087	AzureLocations *[]string `json:"azureLocations,omitempty"`
5088	// Country - The country for available providers list.
5089	Country *string `json:"country,omitempty"`
5090	// State - The state for available providers list.
5091	State *string `json:"state,omitempty"`
5092	// City - The city or town for available providers list.
5093	City *string `json:"city,omitempty"`
5094}
5095
5096// AvailableProvidersListState state details.
5097type AvailableProvidersListState struct {
5098	// StateName - The state name.
5099	StateName *string `json:"stateName,omitempty"`
5100	// Providers - A list of Internet service providers.
5101	Providers *[]string `json:"providers,omitempty"`
5102	// Cities - List of available cities or towns in the state.
5103	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
5104}
5105
5106// AvailableServiceAlias the available service alias.
5107type AvailableServiceAlias struct {
5108	// Name - The name of the service alias.
5109	Name *string `json:"name,omitempty"`
5110	// ID - The ID of the service alias.
5111	ID *string `json:"id,omitempty"`
5112	// Type - The type of the resource.
5113	Type *string `json:"type,omitempty"`
5114	// ResourceName - The resource name of the service alias.
5115	ResourceName *string `json:"resourceName,omitempty"`
5116}
5117
5118// AvailableServiceAliasesResult an array of available service aliases.
5119type AvailableServiceAliasesResult struct {
5120	autorest.Response `json:"-"`
5121	// Value - An array of available service aliases.
5122	Value *[]AvailableServiceAlias `json:"value,omitempty"`
5123	// NextLink - READ-ONLY; The URL to get the next set of results.
5124	NextLink *string `json:"nextLink,omitempty"`
5125}
5126
5127// MarshalJSON is the custom marshaler for AvailableServiceAliasesResult.
5128func (asar AvailableServiceAliasesResult) MarshalJSON() ([]byte, error) {
5129	objectMap := make(map[string]interface{})
5130	if asar.Value != nil {
5131		objectMap["value"] = asar.Value
5132	}
5133	return json.Marshal(objectMap)
5134}
5135
5136// AvailableServiceAliasesResultIterator provides access to a complete listing of AvailableServiceAlias
5137// values.
5138type AvailableServiceAliasesResultIterator struct {
5139	i    int
5140	page AvailableServiceAliasesResultPage
5141}
5142
5143// NextWithContext advances to the next value.  If there was an error making
5144// the request the iterator does not advance and the error is returned.
5145func (iter *AvailableServiceAliasesResultIterator) NextWithContext(ctx context.Context) (err error) {
5146	if tracing.IsEnabled() {
5147		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesResultIterator.NextWithContext")
5148		defer func() {
5149			sc := -1
5150			if iter.Response().Response.Response != nil {
5151				sc = iter.Response().Response.Response.StatusCode
5152			}
5153			tracing.EndSpan(ctx, sc, err)
5154		}()
5155	}
5156	iter.i++
5157	if iter.i < len(iter.page.Values()) {
5158		return nil
5159	}
5160	err = iter.page.NextWithContext(ctx)
5161	if err != nil {
5162		iter.i--
5163		return err
5164	}
5165	iter.i = 0
5166	return nil
5167}
5168
5169// Next advances to the next value.  If there was an error making
5170// the request the iterator does not advance and the error is returned.
5171// Deprecated: Use NextWithContext() instead.
5172func (iter *AvailableServiceAliasesResultIterator) Next() error {
5173	return iter.NextWithContext(context.Background())
5174}
5175
5176// NotDone returns true if the enumeration should be started or is not yet complete.
5177func (iter AvailableServiceAliasesResultIterator) NotDone() bool {
5178	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5179}
5180
5181// Response returns the raw server response from the last page request.
5182func (iter AvailableServiceAliasesResultIterator) Response() AvailableServiceAliasesResult {
5183	return iter.page.Response()
5184}
5185
5186// Value returns the current value or a zero-initialized value if the
5187// iterator has advanced beyond the end of the collection.
5188func (iter AvailableServiceAliasesResultIterator) Value() AvailableServiceAlias {
5189	if !iter.page.NotDone() {
5190		return AvailableServiceAlias{}
5191	}
5192	return iter.page.Values()[iter.i]
5193}
5194
5195// Creates a new instance of the AvailableServiceAliasesResultIterator type.
5196func NewAvailableServiceAliasesResultIterator(page AvailableServiceAliasesResultPage) AvailableServiceAliasesResultIterator {
5197	return AvailableServiceAliasesResultIterator{page: page}
5198}
5199
5200// IsEmpty returns true if the ListResult contains no values.
5201func (asar AvailableServiceAliasesResult) IsEmpty() bool {
5202	return asar.Value == nil || len(*asar.Value) == 0
5203}
5204
5205// hasNextLink returns true if the NextLink is not empty.
5206func (asar AvailableServiceAliasesResult) hasNextLink() bool {
5207	return asar.NextLink != nil && len(*asar.NextLink) != 0
5208}
5209
5210// availableServiceAliasesResultPreparer prepares a request to retrieve the next set of results.
5211// It returns nil if no more results exist.
5212func (asar AvailableServiceAliasesResult) availableServiceAliasesResultPreparer(ctx context.Context) (*http.Request, error) {
5213	if !asar.hasNextLink() {
5214		return nil, nil
5215	}
5216	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5217		autorest.AsJSON(),
5218		autorest.AsGet(),
5219		autorest.WithBaseURL(to.String(asar.NextLink)))
5220}
5221
5222// AvailableServiceAliasesResultPage contains a page of AvailableServiceAlias values.
5223type AvailableServiceAliasesResultPage struct {
5224	fn   func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error)
5225	asar AvailableServiceAliasesResult
5226}
5227
5228// NextWithContext advances to the next page of values.  If there was an error making
5229// the request the page does not advance and the error is returned.
5230func (page *AvailableServiceAliasesResultPage) NextWithContext(ctx context.Context) (err error) {
5231	if tracing.IsEnabled() {
5232		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesResultPage.NextWithContext")
5233		defer func() {
5234			sc := -1
5235			if page.Response().Response.Response != nil {
5236				sc = page.Response().Response.Response.StatusCode
5237			}
5238			tracing.EndSpan(ctx, sc, err)
5239		}()
5240	}
5241	for {
5242		next, err := page.fn(ctx, page.asar)
5243		if err != nil {
5244			return err
5245		}
5246		page.asar = next
5247		if !next.hasNextLink() || !next.IsEmpty() {
5248			break
5249		}
5250	}
5251	return nil
5252}
5253
5254// Next advances to the next page of values.  If there was an error making
5255// the request the page does not advance and the error is returned.
5256// Deprecated: Use NextWithContext() instead.
5257func (page *AvailableServiceAliasesResultPage) Next() error {
5258	return page.NextWithContext(context.Background())
5259}
5260
5261// NotDone returns true if the page enumeration should be started or is not yet complete.
5262func (page AvailableServiceAliasesResultPage) NotDone() bool {
5263	return !page.asar.IsEmpty()
5264}
5265
5266// Response returns the raw server response from the last page request.
5267func (page AvailableServiceAliasesResultPage) Response() AvailableServiceAliasesResult {
5268	return page.asar
5269}
5270
5271// Values returns the slice of values for the current page or nil if there are no values.
5272func (page AvailableServiceAliasesResultPage) Values() []AvailableServiceAlias {
5273	if page.asar.IsEmpty() {
5274		return nil
5275	}
5276	return *page.asar.Value
5277}
5278
5279// Creates a new instance of the AvailableServiceAliasesResultPage type.
5280func NewAvailableServiceAliasesResultPage(cur AvailableServiceAliasesResult, getNextPage func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error)) AvailableServiceAliasesResultPage {
5281	return AvailableServiceAliasesResultPage{
5282		fn:   getNextPage,
5283		asar: cur,
5284	}
5285}
5286
5287// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
5288// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
5289// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
5290// operation succeeded, the response body includes the HTTP status code for the successful request. If the
5291// asynchronous operation failed, the response body includes the HTTP status code for the failed request
5292// and error information regarding the failure.
5293type AzureAsyncOperationResult struct {
5294	// Status - Status of the Azure async operation. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
5295	Status OperationStatus `json:"status,omitempty"`
5296	// Error - Details of the error occurred during specified asynchronous operation.
5297	Error *Error `json:"error,omitempty"`
5298}
5299
5300// AzureFirewall azure Firewall resource.
5301type AzureFirewall struct {
5302	autorest.Response `json:"-"`
5303	// AzureFirewallPropertiesFormat - Properties of the azure firewall.
5304	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
5305	// Zones - A list of availability zones denoting where the resource needs to come from.
5306	Zones *[]string `json:"zones,omitempty"`
5307	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5308	Etag *string `json:"etag,omitempty"`
5309	// ID - Resource ID.
5310	ID *string `json:"id,omitempty"`
5311	// Name - READ-ONLY; Resource name.
5312	Name *string `json:"name,omitempty"`
5313	// Type - READ-ONLY; Resource type.
5314	Type *string `json:"type,omitempty"`
5315	// Location - Resource location.
5316	Location *string `json:"location,omitempty"`
5317	// Tags - Resource tags.
5318	Tags map[string]*string `json:"tags"`
5319}
5320
5321// MarshalJSON is the custom marshaler for AzureFirewall.
5322func (af AzureFirewall) MarshalJSON() ([]byte, error) {
5323	objectMap := make(map[string]interface{})
5324	if af.AzureFirewallPropertiesFormat != nil {
5325		objectMap["properties"] = af.AzureFirewallPropertiesFormat
5326	}
5327	if af.Zones != nil {
5328		objectMap["zones"] = af.Zones
5329	}
5330	if af.ID != nil {
5331		objectMap["id"] = af.ID
5332	}
5333	if af.Location != nil {
5334		objectMap["location"] = af.Location
5335	}
5336	if af.Tags != nil {
5337		objectMap["tags"] = af.Tags
5338	}
5339	return json.Marshal(objectMap)
5340}
5341
5342// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
5343func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
5344	var m map[string]*json.RawMessage
5345	err := json.Unmarshal(body, &m)
5346	if err != nil {
5347		return err
5348	}
5349	for k, v := range m {
5350		switch k {
5351		case "properties":
5352			if v != nil {
5353				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
5354				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
5355				if err != nil {
5356					return err
5357				}
5358				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
5359			}
5360		case "zones":
5361			if v != nil {
5362				var zones []string
5363				err = json.Unmarshal(*v, &zones)
5364				if err != nil {
5365					return err
5366				}
5367				af.Zones = &zones
5368			}
5369		case "etag":
5370			if v != nil {
5371				var etag string
5372				err = json.Unmarshal(*v, &etag)
5373				if err != nil {
5374					return err
5375				}
5376				af.Etag = &etag
5377			}
5378		case "id":
5379			if v != nil {
5380				var ID string
5381				err = json.Unmarshal(*v, &ID)
5382				if err != nil {
5383					return err
5384				}
5385				af.ID = &ID
5386			}
5387		case "name":
5388			if v != nil {
5389				var name string
5390				err = json.Unmarshal(*v, &name)
5391				if err != nil {
5392					return err
5393				}
5394				af.Name = &name
5395			}
5396		case "type":
5397			if v != nil {
5398				var typeVar string
5399				err = json.Unmarshal(*v, &typeVar)
5400				if err != nil {
5401					return err
5402				}
5403				af.Type = &typeVar
5404			}
5405		case "location":
5406			if v != nil {
5407				var location string
5408				err = json.Unmarshal(*v, &location)
5409				if err != nil {
5410					return err
5411				}
5412				af.Location = &location
5413			}
5414		case "tags":
5415			if v != nil {
5416				var tags map[string]*string
5417				err = json.Unmarshal(*v, &tags)
5418				if err != nil {
5419					return err
5420				}
5421				af.Tags = tags
5422			}
5423		}
5424	}
5425
5426	return nil
5427}
5428
5429// AzureFirewallApplicationRule properties of an application rule.
5430type AzureFirewallApplicationRule struct {
5431	// Name - Name of the application rule.
5432	Name *string `json:"name,omitempty"`
5433	// Description - Description of the rule.
5434	Description *string `json:"description,omitempty"`
5435	// SourceAddresses - List of source IP addresses for this rule.
5436	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
5437	// Protocols - Array of ApplicationRuleProtocols.
5438	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
5439	// TargetFqdns - List of FQDNs for this rule.
5440	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
5441	// FqdnTags - List of FQDN Tags for this rule.
5442	FqdnTags *[]string `json:"fqdnTags,omitempty"`
5443	// SourceIPGroups - List of source IpGroups for this rule.
5444	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
5445}
5446
5447// AzureFirewallApplicationRuleCollection application rule collection resource.
5448type AzureFirewallApplicationRuleCollection struct {
5449	// AzureFirewallApplicationRuleCollectionPropertiesFormat - Properties of the azure firewall application rule collection.
5450	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
5451	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
5452	Name *string `json:"name,omitempty"`
5453	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5454	Etag *string `json:"etag,omitempty"`
5455	// ID - Resource ID.
5456	ID *string `json:"id,omitempty"`
5457}
5458
5459// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
5460func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
5461	objectMap := make(map[string]interface{})
5462	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
5463		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
5464	}
5465	if afarc.Name != nil {
5466		objectMap["name"] = afarc.Name
5467	}
5468	if afarc.ID != nil {
5469		objectMap["id"] = afarc.ID
5470	}
5471	return json.Marshal(objectMap)
5472}
5473
5474// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
5475func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
5476	var m map[string]*json.RawMessage
5477	err := json.Unmarshal(body, &m)
5478	if err != nil {
5479		return err
5480	}
5481	for k, v := range m {
5482		switch k {
5483		case "properties":
5484			if v != nil {
5485				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
5486				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
5487				if err != nil {
5488					return err
5489				}
5490				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
5491			}
5492		case "name":
5493			if v != nil {
5494				var name string
5495				err = json.Unmarshal(*v, &name)
5496				if err != nil {
5497					return err
5498				}
5499				afarc.Name = &name
5500			}
5501		case "etag":
5502			if v != nil {
5503				var etag string
5504				err = json.Unmarshal(*v, &etag)
5505				if err != nil {
5506					return err
5507				}
5508				afarc.Etag = &etag
5509			}
5510		case "id":
5511			if v != nil {
5512				var ID string
5513				err = json.Unmarshal(*v, &ID)
5514				if err != nil {
5515					return err
5516				}
5517				afarc.ID = &ID
5518			}
5519		}
5520	}
5521
5522	return nil
5523}
5524
5525// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
5526type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
5527	// Priority - Priority of the application rule collection resource.
5528	Priority *int32 `json:"priority,omitempty"`
5529	// Action - The action type of a rule collection.
5530	Action *AzureFirewallRCAction `json:"action,omitempty"`
5531	// Rules - Collection of rules used by a application rule collection.
5532	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
5533	// ProvisioningState - READ-ONLY; The provisioning state of the application rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5534	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5535}
5536
5537// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollectionPropertiesFormat.
5538func (afarcpf AzureFirewallApplicationRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) {
5539	objectMap := make(map[string]interface{})
5540	if afarcpf.Priority != nil {
5541		objectMap["priority"] = afarcpf.Priority
5542	}
5543	if afarcpf.Action != nil {
5544		objectMap["action"] = afarcpf.Action
5545	}
5546	if afarcpf.Rules != nil {
5547		objectMap["rules"] = afarcpf.Rules
5548	}
5549	return json.Marshal(objectMap)
5550}
5551
5552// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
5553type AzureFirewallApplicationRuleProtocol struct {
5554	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS', 'AzureFirewallApplicationRuleProtocolTypeMssql'
5555	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
5556	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
5557	Port *int32 `json:"port,omitempty"`
5558}
5559
5560// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource.
5561type AzureFirewallFqdnTag struct {
5562	// AzureFirewallFqdnTagPropertiesFormat - Properties of the azure firewall FQDN tag.
5563	*AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"`
5564	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5565	Etag *string `json:"etag,omitempty"`
5566	// ID - Resource ID.
5567	ID *string `json:"id,omitempty"`
5568	// Name - READ-ONLY; Resource name.
5569	Name *string `json:"name,omitempty"`
5570	// Type - READ-ONLY; Resource type.
5571	Type *string `json:"type,omitempty"`
5572	// Location - Resource location.
5573	Location *string `json:"location,omitempty"`
5574	// Tags - Resource tags.
5575	Tags map[string]*string `json:"tags"`
5576}
5577
5578// MarshalJSON is the custom marshaler for AzureFirewallFqdnTag.
5579func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) {
5580	objectMap := make(map[string]interface{})
5581	if afft.AzureFirewallFqdnTagPropertiesFormat != nil {
5582		objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat
5583	}
5584	if afft.ID != nil {
5585		objectMap["id"] = afft.ID
5586	}
5587	if afft.Location != nil {
5588		objectMap["location"] = afft.Location
5589	}
5590	if afft.Tags != nil {
5591		objectMap["tags"] = afft.Tags
5592	}
5593	return json.Marshal(objectMap)
5594}
5595
5596// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct.
5597func (afft *AzureFirewallFqdnTag) UnmarshalJSON(body []byte) error {
5598	var m map[string]*json.RawMessage
5599	err := json.Unmarshal(body, &m)
5600	if err != nil {
5601		return err
5602	}
5603	for k, v := range m {
5604		switch k {
5605		case "properties":
5606			if v != nil {
5607				var azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat
5608				err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat)
5609				if err != nil {
5610					return err
5611				}
5612				afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat
5613			}
5614		case "etag":
5615			if v != nil {
5616				var etag string
5617				err = json.Unmarshal(*v, &etag)
5618				if err != nil {
5619					return err
5620				}
5621				afft.Etag = &etag
5622			}
5623		case "id":
5624			if v != nil {
5625				var ID string
5626				err = json.Unmarshal(*v, &ID)
5627				if err != nil {
5628					return err
5629				}
5630				afft.ID = &ID
5631			}
5632		case "name":
5633			if v != nil {
5634				var name string
5635				err = json.Unmarshal(*v, &name)
5636				if err != nil {
5637					return err
5638				}
5639				afft.Name = &name
5640			}
5641		case "type":
5642			if v != nil {
5643				var typeVar string
5644				err = json.Unmarshal(*v, &typeVar)
5645				if err != nil {
5646					return err
5647				}
5648				afft.Type = &typeVar
5649			}
5650		case "location":
5651			if v != nil {
5652				var location string
5653				err = json.Unmarshal(*v, &location)
5654				if err != nil {
5655					return err
5656				}
5657				afft.Location = &location
5658			}
5659		case "tags":
5660			if v != nil {
5661				var tags map[string]*string
5662				err = json.Unmarshal(*v, &tags)
5663				if err != nil {
5664					return err
5665				}
5666				afft.Tags = tags
5667			}
5668		}
5669	}
5670
5671	return nil
5672}
5673
5674// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call.
5675type AzureFirewallFqdnTagListResult struct {
5676	autorest.Response `json:"-"`
5677	// Value - List of Azure Firewall FQDN Tags in a resource group.
5678	Value *[]AzureFirewallFqdnTag `json:"value,omitempty"`
5679	// NextLink - URL to get the next set of results.
5680	NextLink *string `json:"nextLink,omitempty"`
5681}
5682
5683// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag
5684// values.
5685type AzureFirewallFqdnTagListResultIterator struct {
5686	i    int
5687	page AzureFirewallFqdnTagListResultPage
5688}
5689
5690// NextWithContext advances to the next value.  If there was an error making
5691// the request the iterator does not advance and the error is returned.
5692func (iter *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) {
5693	if tracing.IsEnabled() {
5694		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.NextWithContext")
5695		defer func() {
5696			sc := -1
5697			if iter.Response().Response.Response != nil {
5698				sc = iter.Response().Response.Response.StatusCode
5699			}
5700			tracing.EndSpan(ctx, sc, err)
5701		}()
5702	}
5703	iter.i++
5704	if iter.i < len(iter.page.Values()) {
5705		return nil
5706	}
5707	err = iter.page.NextWithContext(ctx)
5708	if err != nil {
5709		iter.i--
5710		return err
5711	}
5712	iter.i = 0
5713	return nil
5714}
5715
5716// Next advances to the next value.  If there was an error making
5717// the request the iterator does not advance and the error is returned.
5718// Deprecated: Use NextWithContext() instead.
5719func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
5720	return iter.NextWithContext(context.Background())
5721}
5722
5723// NotDone returns true if the enumeration should be started or is not yet complete.
5724func (iter AzureFirewallFqdnTagListResultIterator) NotDone() bool {
5725	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5726}
5727
5728// Response returns the raw server response from the last page request.
5729func (iter AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult {
5730	return iter.page.Response()
5731}
5732
5733// Value returns the current value or a zero-initialized value if the
5734// iterator has advanced beyond the end of the collection.
5735func (iter AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag {
5736	if !iter.page.NotDone() {
5737		return AzureFirewallFqdnTag{}
5738	}
5739	return iter.page.Values()[iter.i]
5740}
5741
5742// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type.
5743func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator {
5744	return AzureFirewallFqdnTagListResultIterator{page: page}
5745}
5746
5747// IsEmpty returns true if the ListResult contains no values.
5748func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
5749	return afftlr.Value == nil || len(*afftlr.Value) == 0
5750}
5751
5752// hasNextLink returns true if the NextLink is not empty.
5753func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool {
5754	return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0
5755}
5756
5757// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results.
5758// It returns nil if no more results exist.
5759func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) {
5760	if !afftlr.hasNextLink() {
5761		return nil, nil
5762	}
5763	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5764		autorest.AsJSON(),
5765		autorest.AsGet(),
5766		autorest.WithBaseURL(to.String(afftlr.NextLink)))
5767}
5768
5769// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values.
5770type AzureFirewallFqdnTagListResultPage struct {
5771	fn     func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
5772	afftlr AzureFirewallFqdnTagListResult
5773}
5774
5775// NextWithContext advances to the next page of values.  If there was an error making
5776// the request the page does not advance and the error is returned.
5777func (page *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) {
5778	if tracing.IsEnabled() {
5779		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.NextWithContext")
5780		defer func() {
5781			sc := -1
5782			if page.Response().Response.Response != nil {
5783				sc = page.Response().Response.Response.StatusCode
5784			}
5785			tracing.EndSpan(ctx, sc, err)
5786		}()
5787	}
5788	for {
5789		next, err := page.fn(ctx, page.afftlr)
5790		if err != nil {
5791			return err
5792		}
5793		page.afftlr = next
5794		if !next.hasNextLink() || !next.IsEmpty() {
5795			break
5796		}
5797	}
5798	return nil
5799}
5800
5801// Next advances to the next page of values.  If there was an error making
5802// the request the page does not advance and the error is returned.
5803// Deprecated: Use NextWithContext() instead.
5804func (page *AzureFirewallFqdnTagListResultPage) Next() error {
5805	return page.NextWithContext(context.Background())
5806}
5807
5808// NotDone returns true if the page enumeration should be started or is not yet complete.
5809func (page AzureFirewallFqdnTagListResultPage) NotDone() bool {
5810	return !page.afftlr.IsEmpty()
5811}
5812
5813// Response returns the raw server response from the last page request.
5814func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult {
5815	return page.afftlr
5816}
5817
5818// Values returns the slice of values for the current page or nil if there are no values.
5819func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag {
5820	if page.afftlr.IsEmpty() {
5821		return nil
5822	}
5823	return *page.afftlr.Value
5824}
5825
5826// Creates a new instance of the AzureFirewallFqdnTagListResultPage type.
5827func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage {
5828	return AzureFirewallFqdnTagListResultPage{
5829		fn:     getNextPage,
5830		afftlr: cur,
5831	}
5832}
5833
5834// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties.
5835type AzureFirewallFqdnTagPropertiesFormat struct {
5836	// ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall FQDN tag resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5837	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5838	// FqdnTagName - READ-ONLY; The name of this FQDN Tag.
5839	FqdnTagName *string `json:"fqdnTagName,omitempty"`
5840}
5841
5842// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
5843type AzureFirewallIPConfiguration struct {
5844	// AzureFirewallIPConfigurationPropertiesFormat - Properties of the azure firewall IP configuration.
5845	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
5846	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
5847	Name *string `json:"name,omitempty"`
5848	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5849	Etag *string `json:"etag,omitempty"`
5850	// Type - READ-ONLY; Type of the resource.
5851	Type *string `json:"type,omitempty"`
5852	// ID - Resource ID.
5853	ID *string `json:"id,omitempty"`
5854}
5855
5856// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
5857func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
5858	objectMap := make(map[string]interface{})
5859	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
5860		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
5861	}
5862	if afic.Name != nil {
5863		objectMap["name"] = afic.Name
5864	}
5865	if afic.ID != nil {
5866		objectMap["id"] = afic.ID
5867	}
5868	return json.Marshal(objectMap)
5869}
5870
5871// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
5872func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
5873	var m map[string]*json.RawMessage
5874	err := json.Unmarshal(body, &m)
5875	if err != nil {
5876		return err
5877	}
5878	for k, v := range m {
5879		switch k {
5880		case "properties":
5881			if v != nil {
5882				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
5883				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
5884				if err != nil {
5885					return err
5886				}
5887				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
5888			}
5889		case "name":
5890			if v != nil {
5891				var name string
5892				err = json.Unmarshal(*v, &name)
5893				if err != nil {
5894					return err
5895				}
5896				afic.Name = &name
5897			}
5898		case "etag":
5899			if v != nil {
5900				var etag string
5901				err = json.Unmarshal(*v, &etag)
5902				if err != nil {
5903					return err
5904				}
5905				afic.Etag = &etag
5906			}
5907		case "type":
5908			if v != nil {
5909				var typeVar string
5910				err = json.Unmarshal(*v, &typeVar)
5911				if err != nil {
5912					return err
5913				}
5914				afic.Type = &typeVar
5915			}
5916		case "id":
5917			if v != nil {
5918				var ID string
5919				err = json.Unmarshal(*v, &ID)
5920				if err != nil {
5921					return err
5922				}
5923				afic.ID = &ID
5924			}
5925		}
5926	}
5927
5928	return nil
5929}
5930
5931// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
5932type AzureFirewallIPConfigurationPropertiesFormat struct {
5933	// PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
5934	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
5935	// Subnet - Reference to the subnet resource. This resource must be named 'AzureFirewallSubnet' or 'AzureFirewallManagementSubnet'.
5936	Subnet *SubResource `json:"subnet,omitempty"`
5937	// PublicIPAddress - Reference to the PublicIP resource. This field is a mandatory input if subnet is not null.
5938	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
5939	// ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5940	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5941}
5942
5943// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat.
5944func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
5945	objectMap := make(map[string]interface{})
5946	if aficpf.Subnet != nil {
5947		objectMap["subnet"] = aficpf.Subnet
5948	}
5949	if aficpf.PublicIPAddress != nil {
5950		objectMap["publicIPAddress"] = aficpf.PublicIPAddress
5951	}
5952	return json.Marshal(objectMap)
5953}
5954
5955// AzureFirewallIPGroups ipGroups associated with azure firewall.
5956type AzureFirewallIPGroups struct {
5957	// ID - READ-ONLY; Resource ID.
5958	ID *string `json:"id,omitempty"`
5959	// ChangeNumber - READ-ONLY; The iteration number.
5960	ChangeNumber *string `json:"changeNumber,omitempty"`
5961}
5962
5963// AzureFirewallListResult response for ListAzureFirewalls API service call.
5964type AzureFirewallListResult struct {
5965	autorest.Response `json:"-"`
5966	// Value - List of Azure Firewalls in a resource group.
5967	Value *[]AzureFirewall `json:"value,omitempty"`
5968	// NextLink - URL to get the next set of results.
5969	NextLink *string `json:"nextLink,omitempty"`
5970}
5971
5972// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
5973type AzureFirewallListResultIterator struct {
5974	i    int
5975	page AzureFirewallListResultPage
5976}
5977
5978// NextWithContext advances to the next value.  If there was an error making
5979// the request the iterator does not advance and the error is returned.
5980func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
5981	if tracing.IsEnabled() {
5982		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
5983		defer func() {
5984			sc := -1
5985			if iter.Response().Response.Response != nil {
5986				sc = iter.Response().Response.Response.StatusCode
5987			}
5988			tracing.EndSpan(ctx, sc, err)
5989		}()
5990	}
5991	iter.i++
5992	if iter.i < len(iter.page.Values()) {
5993		return nil
5994	}
5995	err = iter.page.NextWithContext(ctx)
5996	if err != nil {
5997		iter.i--
5998		return err
5999	}
6000	iter.i = 0
6001	return nil
6002}
6003
6004// Next advances to the next value.  If there was an error making
6005// the request the iterator does not advance and the error is returned.
6006// Deprecated: Use NextWithContext() instead.
6007func (iter *AzureFirewallListResultIterator) Next() error {
6008	return iter.NextWithContext(context.Background())
6009}
6010
6011// NotDone returns true if the enumeration should be started or is not yet complete.
6012func (iter AzureFirewallListResultIterator) NotDone() bool {
6013	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6014}
6015
6016// Response returns the raw server response from the last page request.
6017func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
6018	return iter.page.Response()
6019}
6020
6021// Value returns the current value or a zero-initialized value if the
6022// iterator has advanced beyond the end of the collection.
6023func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
6024	if !iter.page.NotDone() {
6025		return AzureFirewall{}
6026	}
6027	return iter.page.Values()[iter.i]
6028}
6029
6030// Creates a new instance of the AzureFirewallListResultIterator type.
6031func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
6032	return AzureFirewallListResultIterator{page: page}
6033}
6034
6035// IsEmpty returns true if the ListResult contains no values.
6036func (aflr AzureFirewallListResult) IsEmpty() bool {
6037	return aflr.Value == nil || len(*aflr.Value) == 0
6038}
6039
6040// hasNextLink returns true if the NextLink is not empty.
6041func (aflr AzureFirewallListResult) hasNextLink() bool {
6042	return aflr.NextLink != nil && len(*aflr.NextLink) != 0
6043}
6044
6045// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
6046// It returns nil if no more results exist.
6047func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
6048	if !aflr.hasNextLink() {
6049		return nil, nil
6050	}
6051	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6052		autorest.AsJSON(),
6053		autorest.AsGet(),
6054		autorest.WithBaseURL(to.String(aflr.NextLink)))
6055}
6056
6057// AzureFirewallListResultPage contains a page of AzureFirewall values.
6058type AzureFirewallListResultPage struct {
6059	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
6060	aflr AzureFirewallListResult
6061}
6062
6063// NextWithContext advances to the next page of values.  If there was an error making
6064// the request the page does not advance and the error is returned.
6065func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
6066	if tracing.IsEnabled() {
6067		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
6068		defer func() {
6069			sc := -1
6070			if page.Response().Response.Response != nil {
6071				sc = page.Response().Response.Response.StatusCode
6072			}
6073			tracing.EndSpan(ctx, sc, err)
6074		}()
6075	}
6076	for {
6077		next, err := page.fn(ctx, page.aflr)
6078		if err != nil {
6079			return err
6080		}
6081		page.aflr = next
6082		if !next.hasNextLink() || !next.IsEmpty() {
6083			break
6084		}
6085	}
6086	return nil
6087}
6088
6089// Next advances to the next page of values.  If there was an error making
6090// the request the page does not advance and the error is returned.
6091// Deprecated: Use NextWithContext() instead.
6092func (page *AzureFirewallListResultPage) Next() error {
6093	return page.NextWithContext(context.Background())
6094}
6095
6096// NotDone returns true if the page enumeration should be started or is not yet complete.
6097func (page AzureFirewallListResultPage) NotDone() bool {
6098	return !page.aflr.IsEmpty()
6099}
6100
6101// Response returns the raw server response from the last page request.
6102func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
6103	return page.aflr
6104}
6105
6106// Values returns the slice of values for the current page or nil if there are no values.
6107func (page AzureFirewallListResultPage) Values() []AzureFirewall {
6108	if page.aflr.IsEmpty() {
6109		return nil
6110	}
6111	return *page.aflr.Value
6112}
6113
6114// Creates a new instance of the AzureFirewallListResultPage type.
6115func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
6116	return AzureFirewallListResultPage{
6117		fn:   getNextPage,
6118		aflr: cur,
6119	}
6120}
6121
6122// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action.
6123type AzureFirewallNatRCAction struct {
6124	// Type - The type of action. Possible values include: 'Snat', 'Dnat'
6125	Type AzureFirewallNatRCActionType `json:"type,omitempty"`
6126}
6127
6128// AzureFirewallNatRule properties of a NAT rule.
6129type AzureFirewallNatRule struct {
6130	// Name - Name of the NAT rule.
6131	Name *string `json:"name,omitempty"`
6132	// Description - Description of the rule.
6133	Description *string `json:"description,omitempty"`
6134	// SourceAddresses - List of source IP addresses for this rule.
6135	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
6136	// DestinationAddresses - List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags.
6137	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
6138	// DestinationPorts - List of destination ports.
6139	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
6140	// Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule.
6141	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
6142	// TranslatedAddress - The translated address for this NAT rule.
6143	TranslatedAddress *string `json:"translatedAddress,omitempty"`
6144	// TranslatedPort - The translated port for this NAT rule.
6145	TranslatedPort *string `json:"translatedPort,omitempty"`
6146	// TranslatedFqdn - The translated FQDN for this NAT rule.
6147	TranslatedFqdn *string `json:"translatedFqdn,omitempty"`
6148	// SourceIPGroups - List of source IpGroups for this rule.
6149	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
6150}
6151
6152// AzureFirewallNatRuleCollection NAT rule collection resource.
6153type AzureFirewallNatRuleCollection struct {
6154	// AzureFirewallNatRuleCollectionProperties - Properties of the azure firewall NAT rule collection.
6155	*AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"`
6156	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
6157	Name *string `json:"name,omitempty"`
6158	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6159	Etag *string `json:"etag,omitempty"`
6160	// ID - Resource ID.
6161	ID *string `json:"id,omitempty"`
6162}
6163
6164// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection.
6165func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) {
6166	objectMap := make(map[string]interface{})
6167	if afnrc.AzureFirewallNatRuleCollectionProperties != nil {
6168		objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties
6169	}
6170	if afnrc.Name != nil {
6171		objectMap["name"] = afnrc.Name
6172	}
6173	if afnrc.ID != nil {
6174		objectMap["id"] = afnrc.ID
6175	}
6176	return json.Marshal(objectMap)
6177}
6178
6179// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct.
6180func (afnrc *AzureFirewallNatRuleCollection) UnmarshalJSON(body []byte) error {
6181	var m map[string]*json.RawMessage
6182	err := json.Unmarshal(body, &m)
6183	if err != nil {
6184		return err
6185	}
6186	for k, v := range m {
6187		switch k {
6188		case "properties":
6189			if v != nil {
6190				var azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties
6191				err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties)
6192				if err != nil {
6193					return err
6194				}
6195				afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties
6196			}
6197		case "name":
6198			if v != nil {
6199				var name string
6200				err = json.Unmarshal(*v, &name)
6201				if err != nil {
6202					return err
6203				}
6204				afnrc.Name = &name
6205			}
6206		case "etag":
6207			if v != nil {
6208				var etag string
6209				err = json.Unmarshal(*v, &etag)
6210				if err != nil {
6211					return err
6212				}
6213				afnrc.Etag = &etag
6214			}
6215		case "id":
6216			if v != nil {
6217				var ID string
6218				err = json.Unmarshal(*v, &ID)
6219				if err != nil {
6220					return err
6221				}
6222				afnrc.ID = &ID
6223			}
6224		}
6225	}
6226
6227	return nil
6228}
6229
6230// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection.
6231type AzureFirewallNatRuleCollectionProperties struct {
6232	// Priority - Priority of the NAT rule collection resource.
6233	Priority *int32 `json:"priority,omitempty"`
6234	// Action - The action type of a NAT rule collection.
6235	Action *AzureFirewallNatRCAction `json:"action,omitempty"`
6236	// Rules - Collection of rules used by a NAT rule collection.
6237	Rules *[]AzureFirewallNatRule `json:"rules,omitempty"`
6238	// ProvisioningState - READ-ONLY; The provisioning state of the NAT rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6239	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6240}
6241
6242// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollectionProperties.
6243func (afnrcp AzureFirewallNatRuleCollectionProperties) MarshalJSON() ([]byte, error) {
6244	objectMap := make(map[string]interface{})
6245	if afnrcp.Priority != nil {
6246		objectMap["priority"] = afnrcp.Priority
6247	}
6248	if afnrcp.Action != nil {
6249		objectMap["action"] = afnrcp.Action
6250	}
6251	if afnrcp.Rules != nil {
6252		objectMap["rules"] = afnrcp.Rules
6253	}
6254	return json.Marshal(objectMap)
6255}
6256
6257// AzureFirewallNetworkRule properties of the network rule.
6258type AzureFirewallNetworkRule struct {
6259	// Name - Name of the network rule.
6260	Name *string `json:"name,omitempty"`
6261	// Description - Description of the rule.
6262	Description *string `json:"description,omitempty"`
6263	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
6264	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
6265	// SourceAddresses - List of source IP addresses for this rule.
6266	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
6267	// DestinationAddresses - List of destination IP addresses.
6268	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
6269	// DestinationPorts - List of destination ports.
6270	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
6271	// DestinationFqdns - List of destination FQDNs.
6272	DestinationFqdns *[]string `json:"destinationFqdns,omitempty"`
6273	// SourceIPGroups - List of source IpGroups for this rule.
6274	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
6275	// DestinationIPGroups - List of destination IpGroups for this rule.
6276	DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"`
6277}
6278
6279// AzureFirewallNetworkRuleCollection network rule collection resource.
6280type AzureFirewallNetworkRuleCollection struct {
6281	// AzureFirewallNetworkRuleCollectionPropertiesFormat - Properties of the azure firewall network rule collection.
6282	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
6283	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
6284	Name *string `json:"name,omitempty"`
6285	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6286	Etag *string `json:"etag,omitempty"`
6287	// ID - Resource ID.
6288	ID *string `json:"id,omitempty"`
6289}
6290
6291// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
6292func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
6293	objectMap := make(map[string]interface{})
6294	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
6295		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
6296	}
6297	if afnrc.Name != nil {
6298		objectMap["name"] = afnrc.Name
6299	}
6300	if afnrc.ID != nil {
6301		objectMap["id"] = afnrc.ID
6302	}
6303	return json.Marshal(objectMap)
6304}
6305
6306// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
6307func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
6308	var m map[string]*json.RawMessage
6309	err := json.Unmarshal(body, &m)
6310	if err != nil {
6311		return err
6312	}
6313	for k, v := range m {
6314		switch k {
6315		case "properties":
6316			if v != nil {
6317				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
6318				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
6319				if err != nil {
6320					return err
6321				}
6322				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
6323			}
6324		case "name":
6325			if v != nil {
6326				var name string
6327				err = json.Unmarshal(*v, &name)
6328				if err != nil {
6329					return err
6330				}
6331				afnrc.Name = &name
6332			}
6333		case "etag":
6334			if v != nil {
6335				var etag string
6336				err = json.Unmarshal(*v, &etag)
6337				if err != nil {
6338					return err
6339				}
6340				afnrc.Etag = &etag
6341			}
6342		case "id":
6343			if v != nil {
6344				var ID string
6345				err = json.Unmarshal(*v, &ID)
6346				if err != nil {
6347					return err
6348				}
6349				afnrc.ID = &ID
6350			}
6351		}
6352	}
6353
6354	return nil
6355}
6356
6357// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
6358type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
6359	// Priority - Priority of the network rule collection resource.
6360	Priority *int32 `json:"priority,omitempty"`
6361	// Action - The action type of a rule collection.
6362	Action *AzureFirewallRCAction `json:"action,omitempty"`
6363	// Rules - Collection of rules used by a network rule collection.
6364	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
6365	// ProvisioningState - READ-ONLY; The provisioning state of the network rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6366	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6367}
6368
6369// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollectionPropertiesFormat.
6370func (afnrcpf AzureFirewallNetworkRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) {
6371	objectMap := make(map[string]interface{})
6372	if afnrcpf.Priority != nil {
6373		objectMap["priority"] = afnrcpf.Priority
6374	}
6375	if afnrcpf.Action != nil {
6376		objectMap["action"] = afnrcpf.Action
6377	}
6378	if afnrcpf.Rules != nil {
6379		objectMap["rules"] = afnrcpf.Rules
6380	}
6381	return json.Marshal(objectMap)
6382}
6383
6384// AzureFirewallPropertiesFormat properties of the Azure Firewall.
6385type AzureFirewallPropertiesFormat struct {
6386	// ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall.
6387	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
6388	// NatRuleCollections - Collection of NAT rule collections used by Azure Firewall.
6389	NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"`
6390	// NetworkRuleCollections - Collection of network rule collections used by Azure Firewall.
6391	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
6392	// IPConfigurations - IP configuration of the Azure Firewall resource.
6393	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
6394	// ManagementIPConfiguration - IP configuration of the Azure Firewall used for management traffic.
6395	ManagementIPConfiguration *AzureFirewallIPConfiguration `json:"managementIpConfiguration,omitempty"`
6396	// ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6397	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6398	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
6399	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
6400	// VirtualHub - The virtualHub to which the firewall belongs.
6401	VirtualHub *SubResource `json:"virtualHub,omitempty"`
6402	// FirewallPolicy - The firewallPolicy associated with this azure firewall.
6403	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
6404	// HubIPAddresses - IP addresses associated with AzureFirewall.
6405	HubIPAddresses *HubIPAddresses `json:"hubIPAddresses,omitempty"`
6406	// IPGroups - READ-ONLY; IpGroups associated with AzureFirewall.
6407	IPGroups *[]AzureFirewallIPGroups `json:"ipGroups,omitempty"`
6408	// Sku - The Azure Firewall Resource SKU.
6409	Sku *AzureFirewallSku `json:"sku,omitempty"`
6410	// AdditionalProperties - The additional properties used to further config this azure firewall.
6411	AdditionalProperties map[string]*string `json:"additionalProperties"`
6412}
6413
6414// MarshalJSON is the custom marshaler for AzureFirewallPropertiesFormat.
6415func (afpf AzureFirewallPropertiesFormat) MarshalJSON() ([]byte, error) {
6416	objectMap := make(map[string]interface{})
6417	if afpf.ApplicationRuleCollections != nil {
6418		objectMap["applicationRuleCollections"] = afpf.ApplicationRuleCollections
6419	}
6420	if afpf.NatRuleCollections != nil {
6421		objectMap["natRuleCollections"] = afpf.NatRuleCollections
6422	}
6423	if afpf.NetworkRuleCollections != nil {
6424		objectMap["networkRuleCollections"] = afpf.NetworkRuleCollections
6425	}
6426	if afpf.IPConfigurations != nil {
6427		objectMap["ipConfigurations"] = afpf.IPConfigurations
6428	}
6429	if afpf.ManagementIPConfiguration != nil {
6430		objectMap["managementIpConfiguration"] = afpf.ManagementIPConfiguration
6431	}
6432	if afpf.ThreatIntelMode != "" {
6433		objectMap["threatIntelMode"] = afpf.ThreatIntelMode
6434	}
6435	if afpf.VirtualHub != nil {
6436		objectMap["virtualHub"] = afpf.VirtualHub
6437	}
6438	if afpf.FirewallPolicy != nil {
6439		objectMap["firewallPolicy"] = afpf.FirewallPolicy
6440	}
6441	if afpf.HubIPAddresses != nil {
6442		objectMap["hubIPAddresses"] = afpf.HubIPAddresses
6443	}
6444	if afpf.Sku != nil {
6445		objectMap["sku"] = afpf.Sku
6446	}
6447	if afpf.AdditionalProperties != nil {
6448		objectMap["additionalProperties"] = afpf.AdditionalProperties
6449	}
6450	return json.Marshal(objectMap)
6451}
6452
6453// AzureFirewallPublicIPAddress public IP Address associated with azure firewall.
6454type AzureFirewallPublicIPAddress struct {
6455	// Address - Public IP Address value.
6456	Address *string `json:"address,omitempty"`
6457}
6458
6459// AzureFirewallRCAction properties of the AzureFirewallRCAction.
6460type AzureFirewallRCAction struct {
6461	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
6462	Type AzureFirewallRCActionType `json:"type,omitempty"`
6463}
6464
6465// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6466// long-running operation.
6467type AzureFirewallsCreateOrUpdateFuture struct {
6468	azure.FutureAPI
6469	// Result returns the result of the asynchronous operation.
6470	// If the operation has not completed it will return an error.
6471	Result func(AzureFirewallsClient) (AzureFirewall, error)
6472}
6473
6474// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
6475// operation.
6476type AzureFirewallsDeleteFuture struct {
6477	azure.FutureAPI
6478	// Result returns the result of the asynchronous operation.
6479	// If the operation has not completed it will return an error.
6480	Result func(AzureFirewallsClient) (autorest.Response, error)
6481}
6482
6483// AzureFirewallSku SKU of an Azure Firewall.
6484type AzureFirewallSku struct {
6485	// Name - Name of an Azure Firewall SKU. Possible values include: 'AZFWVNet', 'AZFWHub'
6486	Name AzureFirewallSkuName `json:"name,omitempty"`
6487	// Tier - Tier of an Azure Firewall. Possible values include: 'Standard', 'Premium'
6488	Tier AzureFirewallSkuTier `json:"tier,omitempty"`
6489}
6490
6491// AzureFirewallsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
6492// long-running operation.
6493type AzureFirewallsUpdateTagsFuture struct {
6494	azure.FutureAPI
6495	// Result returns the result of the asynchronous operation.
6496	// If the operation has not completed it will return an error.
6497	Result func(AzureFirewallsClient) (AzureFirewall, error)
6498}
6499
6500// AzureReachabilityReport azure reachability report details.
6501type AzureReachabilityReport struct {
6502	autorest.Response `json:"-"`
6503	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
6504	AggregationLevel *string `json:"aggregationLevel,omitempty"`
6505	// ProviderLocation - Parameters that define a geographic location.
6506	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
6507	// ReachabilityReport - List of Azure reachability report items.
6508	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
6509}
6510
6511// AzureReachabilityReportItem azure reachability report details for a given provider location.
6512type AzureReachabilityReportItem struct {
6513	// Provider - The Internet service provider.
6514	Provider *string `json:"provider,omitempty"`
6515	// AzureLocation - The Azure region.
6516	AzureLocation *string `json:"azureLocation,omitempty"`
6517	// Latencies - List of latency details for each of the time series.
6518	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
6519}
6520
6521// AzureReachabilityReportLatencyInfo details on latency for a time series.
6522type AzureReachabilityReportLatencyInfo struct {
6523	// TimeStamp - The time stamp.
6524	TimeStamp *date.Time `json:"timeStamp,omitempty"`
6525	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
6526	Score *int32 `json:"score,omitempty"`
6527}
6528
6529// AzureReachabilityReportLocation parameters that define a geographic location.
6530type AzureReachabilityReportLocation struct {
6531	// Country - The name of the country.
6532	Country *string `json:"country,omitempty"`
6533	// State - The name of the state.
6534	State *string `json:"state,omitempty"`
6535	// City - The name of the city or town.
6536	City *string `json:"city,omitempty"`
6537}
6538
6539// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
6540type AzureReachabilityReportParameters struct {
6541	// ProviderLocation - Parameters that define a geographic location.
6542	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
6543	// Providers - List of Internet service providers.
6544	Providers *[]string `json:"providers,omitempty"`
6545	// AzureLocations - Optional Azure regions to scope the query to.
6546	AzureLocations *[]string `json:"azureLocations,omitempty"`
6547	// StartTime - The start time for the Azure reachability report.
6548	StartTime *date.Time `json:"startTime,omitempty"`
6549	// EndTime - The end time for the Azure reachability report.
6550	EndTime *date.Time `json:"endTime,omitempty"`
6551}
6552
6553// BackendAddressPool pool of backend IP addresses.
6554type BackendAddressPool struct {
6555	autorest.Response `json:"-"`
6556	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
6557	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
6558	// 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.
6559	Name *string `json:"name,omitempty"`
6560	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6561	Etag *string `json:"etag,omitempty"`
6562	// Type - READ-ONLY; Type of the resource.
6563	Type *string `json:"type,omitempty"`
6564	// ID - Resource ID.
6565	ID *string `json:"id,omitempty"`
6566}
6567
6568// MarshalJSON is the custom marshaler for BackendAddressPool.
6569func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
6570	objectMap := make(map[string]interface{})
6571	if bap.BackendAddressPoolPropertiesFormat != nil {
6572		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
6573	}
6574	if bap.Name != nil {
6575		objectMap["name"] = bap.Name
6576	}
6577	if bap.ID != nil {
6578		objectMap["id"] = bap.ID
6579	}
6580	return json.Marshal(objectMap)
6581}
6582
6583// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
6584func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
6585	var m map[string]*json.RawMessage
6586	err := json.Unmarshal(body, &m)
6587	if err != nil {
6588		return err
6589	}
6590	for k, v := range m {
6591		switch k {
6592		case "properties":
6593			if v != nil {
6594				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
6595				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
6596				if err != nil {
6597					return err
6598				}
6599				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
6600			}
6601		case "name":
6602			if v != nil {
6603				var name string
6604				err = json.Unmarshal(*v, &name)
6605				if err != nil {
6606					return err
6607				}
6608				bap.Name = &name
6609			}
6610		case "etag":
6611			if v != nil {
6612				var etag string
6613				err = json.Unmarshal(*v, &etag)
6614				if err != nil {
6615					return err
6616				}
6617				bap.Etag = &etag
6618			}
6619		case "type":
6620			if v != nil {
6621				var typeVar string
6622				err = json.Unmarshal(*v, &typeVar)
6623				if err != nil {
6624					return err
6625				}
6626				bap.Type = &typeVar
6627			}
6628		case "id":
6629			if v != nil {
6630				var ID string
6631				err = json.Unmarshal(*v, &ID)
6632				if err != nil {
6633					return err
6634				}
6635				bap.ID = &ID
6636			}
6637		}
6638	}
6639
6640	return nil
6641}
6642
6643// BackendAddressPoolPropertiesFormat properties of the backend address pool.
6644type BackendAddressPoolPropertiesFormat struct {
6645	// LoadBalancerBackendAddresses - An array of backend addresses.
6646	LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"`
6647	// BackendIPConfigurations - READ-ONLY; An array of references to IP addresses defined in network interfaces.
6648	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
6649	// LoadBalancingRules - READ-ONLY; An array of references to load balancing rules that use this backend address pool.
6650	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
6651	// OutboundRule - READ-ONLY; A reference to an outbound rule that uses this backend address pool.
6652	OutboundRule *SubResource `json:"outboundRule,omitempty"`
6653	// OutboundRules - READ-ONLY; An array of references to outbound rules that use this backend address pool.
6654	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
6655	// ProvisioningState - READ-ONLY; The provisioning state of the backend address pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6656	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6657}
6658
6659// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
6660func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
6661	objectMap := make(map[string]interface{})
6662	if bappf.LoadBalancerBackendAddresses != nil {
6663		objectMap["loadBalancerBackendAddresses"] = bappf.LoadBalancerBackendAddresses
6664	}
6665	return json.Marshal(objectMap)
6666}
6667
6668// BastionActiveSession the session detail for a target.
6669type BastionActiveSession struct {
6670	// SessionID - READ-ONLY; A unique id for the session.
6671	SessionID *string `json:"sessionId,omitempty"`
6672	// StartTime - READ-ONLY; The time when the session started.
6673	StartTime interface{} `json:"startTime,omitempty"`
6674	// TargetSubscriptionID - READ-ONLY; The subscription id for the target virtual machine.
6675	TargetSubscriptionID *string `json:"targetSubscriptionId,omitempty"`
6676	// ResourceType - READ-ONLY; The type of the resource.
6677	ResourceType *string `json:"resourceType,omitempty"`
6678	// TargetHostName - READ-ONLY; The host name of the target.
6679	TargetHostName *string `json:"targetHostName,omitempty"`
6680	// TargetResourceGroup - READ-ONLY; The resource group of the target.
6681	TargetResourceGroup *string `json:"targetResourceGroup,omitempty"`
6682	// UserName - READ-ONLY; The user name who is active on this session.
6683	UserName *string `json:"userName,omitempty"`
6684	// TargetIPAddress - READ-ONLY; The IP Address of the target.
6685	TargetIPAddress *string `json:"targetIpAddress,omitempty"`
6686	// Protocol - READ-ONLY; The protocol used to connect to the target. Possible values include: 'SSH', 'RDP'
6687	Protocol BastionConnectProtocol `json:"protocol,omitempty"`
6688	// TargetResourceID - READ-ONLY; The resource id of the target.
6689	TargetResourceID *string `json:"targetResourceId,omitempty"`
6690	// SessionDurationInMins - READ-ONLY; Duration in mins the session has been active.
6691	SessionDurationInMins *float64 `json:"sessionDurationInMins,omitempty"`
6692}
6693
6694// BastionActiveSessionListResult response for GetActiveSessions.
6695type BastionActiveSessionListResult struct {
6696	autorest.Response `json:"-"`
6697	// Value - List of active sessions on the bastion.
6698	Value *[]BastionActiveSession `json:"value,omitempty"`
6699	// NextLink - The URL to get the next set of results.
6700	NextLink *string `json:"nextLink,omitempty"`
6701}
6702
6703// BastionActiveSessionListResultIterator provides access to a complete listing of BastionActiveSession
6704// values.
6705type BastionActiveSessionListResultIterator struct {
6706	i    int
6707	page BastionActiveSessionListResultPage
6708}
6709
6710// NextWithContext advances to the next value.  If there was an error making
6711// the request the iterator does not advance and the error is returned.
6712func (iter *BastionActiveSessionListResultIterator) NextWithContext(ctx context.Context) (err error) {
6713	if tracing.IsEnabled() {
6714		ctx = tracing.StartSpan(ctx, fqdn+"/BastionActiveSessionListResultIterator.NextWithContext")
6715		defer func() {
6716			sc := -1
6717			if iter.Response().Response.Response != nil {
6718				sc = iter.Response().Response.Response.StatusCode
6719			}
6720			tracing.EndSpan(ctx, sc, err)
6721		}()
6722	}
6723	iter.i++
6724	if iter.i < len(iter.page.Values()) {
6725		return nil
6726	}
6727	err = iter.page.NextWithContext(ctx)
6728	if err != nil {
6729		iter.i--
6730		return err
6731	}
6732	iter.i = 0
6733	return nil
6734}
6735
6736// Next advances to the next value.  If there was an error making
6737// the request the iterator does not advance and the error is returned.
6738// Deprecated: Use NextWithContext() instead.
6739func (iter *BastionActiveSessionListResultIterator) Next() error {
6740	return iter.NextWithContext(context.Background())
6741}
6742
6743// NotDone returns true if the enumeration should be started or is not yet complete.
6744func (iter BastionActiveSessionListResultIterator) NotDone() bool {
6745	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6746}
6747
6748// Response returns the raw server response from the last page request.
6749func (iter BastionActiveSessionListResultIterator) Response() BastionActiveSessionListResult {
6750	return iter.page.Response()
6751}
6752
6753// Value returns the current value or a zero-initialized value if the
6754// iterator has advanced beyond the end of the collection.
6755func (iter BastionActiveSessionListResultIterator) Value() BastionActiveSession {
6756	if !iter.page.NotDone() {
6757		return BastionActiveSession{}
6758	}
6759	return iter.page.Values()[iter.i]
6760}
6761
6762// Creates a new instance of the BastionActiveSessionListResultIterator type.
6763func NewBastionActiveSessionListResultIterator(page BastionActiveSessionListResultPage) BastionActiveSessionListResultIterator {
6764	return BastionActiveSessionListResultIterator{page: page}
6765}
6766
6767// IsEmpty returns true if the ListResult contains no values.
6768func (baslr BastionActiveSessionListResult) IsEmpty() bool {
6769	return baslr.Value == nil || len(*baslr.Value) == 0
6770}
6771
6772// hasNextLink returns true if the NextLink is not empty.
6773func (baslr BastionActiveSessionListResult) hasNextLink() bool {
6774	return baslr.NextLink != nil && len(*baslr.NextLink) != 0
6775}
6776
6777// bastionActiveSessionListResultPreparer prepares a request to retrieve the next set of results.
6778// It returns nil if no more results exist.
6779func (baslr BastionActiveSessionListResult) bastionActiveSessionListResultPreparer(ctx context.Context) (*http.Request, error) {
6780	if !baslr.hasNextLink() {
6781		return nil, nil
6782	}
6783	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6784		autorest.AsJSON(),
6785		autorest.AsGet(),
6786		autorest.WithBaseURL(to.String(baslr.NextLink)))
6787}
6788
6789// BastionActiveSessionListResultPage contains a page of BastionActiveSession values.
6790type BastionActiveSessionListResultPage struct {
6791	fn    func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error)
6792	baslr BastionActiveSessionListResult
6793}
6794
6795// NextWithContext advances to the next page of values.  If there was an error making
6796// the request the page does not advance and the error is returned.
6797func (page *BastionActiveSessionListResultPage) NextWithContext(ctx context.Context) (err error) {
6798	if tracing.IsEnabled() {
6799		ctx = tracing.StartSpan(ctx, fqdn+"/BastionActiveSessionListResultPage.NextWithContext")
6800		defer func() {
6801			sc := -1
6802			if page.Response().Response.Response != nil {
6803				sc = page.Response().Response.Response.StatusCode
6804			}
6805			tracing.EndSpan(ctx, sc, err)
6806		}()
6807	}
6808	for {
6809		next, err := page.fn(ctx, page.baslr)
6810		if err != nil {
6811			return err
6812		}
6813		page.baslr = next
6814		if !next.hasNextLink() || !next.IsEmpty() {
6815			break
6816		}
6817	}
6818	return nil
6819}
6820
6821// Next advances to the next page of values.  If there was an error making
6822// the request the page does not advance and the error is returned.
6823// Deprecated: Use NextWithContext() instead.
6824func (page *BastionActiveSessionListResultPage) Next() error {
6825	return page.NextWithContext(context.Background())
6826}
6827
6828// NotDone returns true if the page enumeration should be started or is not yet complete.
6829func (page BastionActiveSessionListResultPage) NotDone() bool {
6830	return !page.baslr.IsEmpty()
6831}
6832
6833// Response returns the raw server response from the last page request.
6834func (page BastionActiveSessionListResultPage) Response() BastionActiveSessionListResult {
6835	return page.baslr
6836}
6837
6838// Values returns the slice of values for the current page or nil if there are no values.
6839func (page BastionActiveSessionListResultPage) Values() []BastionActiveSession {
6840	if page.baslr.IsEmpty() {
6841		return nil
6842	}
6843	return *page.baslr.Value
6844}
6845
6846// Creates a new instance of the BastionActiveSessionListResultPage type.
6847func NewBastionActiveSessionListResultPage(cur BastionActiveSessionListResult, getNextPage func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error)) BastionActiveSessionListResultPage {
6848	return BastionActiveSessionListResultPage{
6849		fn:    getNextPage,
6850		baslr: cur,
6851	}
6852}
6853
6854// BastionHost bastion Host resource.
6855type BastionHost struct {
6856	autorest.Response `json:"-"`
6857	// BastionHostPropertiesFormat - Represents the bastion host resource.
6858	*BastionHostPropertiesFormat `json:"properties,omitempty"`
6859	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6860	Etag *string `json:"etag,omitempty"`
6861	// ID - Resource ID.
6862	ID *string `json:"id,omitempty"`
6863	// Name - READ-ONLY; Resource name.
6864	Name *string `json:"name,omitempty"`
6865	// Type - READ-ONLY; Resource type.
6866	Type *string `json:"type,omitempty"`
6867	// Location - Resource location.
6868	Location *string `json:"location,omitempty"`
6869	// Tags - Resource tags.
6870	Tags map[string]*string `json:"tags"`
6871}
6872
6873// MarshalJSON is the custom marshaler for BastionHost.
6874func (bh BastionHost) MarshalJSON() ([]byte, error) {
6875	objectMap := make(map[string]interface{})
6876	if bh.BastionHostPropertiesFormat != nil {
6877		objectMap["properties"] = bh.BastionHostPropertiesFormat
6878	}
6879	if bh.ID != nil {
6880		objectMap["id"] = bh.ID
6881	}
6882	if bh.Location != nil {
6883		objectMap["location"] = bh.Location
6884	}
6885	if bh.Tags != nil {
6886		objectMap["tags"] = bh.Tags
6887	}
6888	return json.Marshal(objectMap)
6889}
6890
6891// UnmarshalJSON is the custom unmarshaler for BastionHost struct.
6892func (bh *BastionHost) UnmarshalJSON(body []byte) error {
6893	var m map[string]*json.RawMessage
6894	err := json.Unmarshal(body, &m)
6895	if err != nil {
6896		return err
6897	}
6898	for k, v := range m {
6899		switch k {
6900		case "properties":
6901			if v != nil {
6902				var bastionHostPropertiesFormat BastionHostPropertiesFormat
6903				err = json.Unmarshal(*v, &bastionHostPropertiesFormat)
6904				if err != nil {
6905					return err
6906				}
6907				bh.BastionHostPropertiesFormat = &bastionHostPropertiesFormat
6908			}
6909		case "etag":
6910			if v != nil {
6911				var etag string
6912				err = json.Unmarshal(*v, &etag)
6913				if err != nil {
6914					return err
6915				}
6916				bh.Etag = &etag
6917			}
6918		case "id":
6919			if v != nil {
6920				var ID string
6921				err = json.Unmarshal(*v, &ID)
6922				if err != nil {
6923					return err
6924				}
6925				bh.ID = &ID
6926			}
6927		case "name":
6928			if v != nil {
6929				var name string
6930				err = json.Unmarshal(*v, &name)
6931				if err != nil {
6932					return err
6933				}
6934				bh.Name = &name
6935			}
6936		case "type":
6937			if v != nil {
6938				var typeVar string
6939				err = json.Unmarshal(*v, &typeVar)
6940				if err != nil {
6941					return err
6942				}
6943				bh.Type = &typeVar
6944			}
6945		case "location":
6946			if v != nil {
6947				var location string
6948				err = json.Unmarshal(*v, &location)
6949				if err != nil {
6950					return err
6951				}
6952				bh.Location = &location
6953			}
6954		case "tags":
6955			if v != nil {
6956				var tags map[string]*string
6957				err = json.Unmarshal(*v, &tags)
6958				if err != nil {
6959					return err
6960				}
6961				bh.Tags = tags
6962			}
6963		}
6964	}
6965
6966	return nil
6967}
6968
6969// BastionHostIPConfiguration IP configuration of an Bastion Host.
6970type BastionHostIPConfiguration struct {
6971	// BastionHostIPConfigurationPropertiesFormat - Represents the ip configuration associated with the resource.
6972	*BastionHostIPConfigurationPropertiesFormat `json:"properties,omitempty"`
6973	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
6974	Name *string `json:"name,omitempty"`
6975	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6976	Etag *string `json:"etag,omitempty"`
6977	// Type - READ-ONLY; Ip configuration type.
6978	Type *string `json:"type,omitempty"`
6979	// ID - Resource ID.
6980	ID *string `json:"id,omitempty"`
6981}
6982
6983// MarshalJSON is the custom marshaler for BastionHostIPConfiguration.
6984func (bhic BastionHostIPConfiguration) MarshalJSON() ([]byte, error) {
6985	objectMap := make(map[string]interface{})
6986	if bhic.BastionHostIPConfigurationPropertiesFormat != nil {
6987		objectMap["properties"] = bhic.BastionHostIPConfigurationPropertiesFormat
6988	}
6989	if bhic.Name != nil {
6990		objectMap["name"] = bhic.Name
6991	}
6992	if bhic.ID != nil {
6993		objectMap["id"] = bhic.ID
6994	}
6995	return json.Marshal(objectMap)
6996}
6997
6998// UnmarshalJSON is the custom unmarshaler for BastionHostIPConfiguration struct.
6999func (bhic *BastionHostIPConfiguration) UnmarshalJSON(body []byte) error {
7000	var m map[string]*json.RawMessage
7001	err := json.Unmarshal(body, &m)
7002	if err != nil {
7003		return err
7004	}
7005	for k, v := range m {
7006		switch k {
7007		case "properties":
7008			if v != nil {
7009				var bastionHostIPConfigurationPropertiesFormat BastionHostIPConfigurationPropertiesFormat
7010				err = json.Unmarshal(*v, &bastionHostIPConfigurationPropertiesFormat)
7011				if err != nil {
7012					return err
7013				}
7014				bhic.BastionHostIPConfigurationPropertiesFormat = &bastionHostIPConfigurationPropertiesFormat
7015			}
7016		case "name":
7017			if v != nil {
7018				var name string
7019				err = json.Unmarshal(*v, &name)
7020				if err != nil {
7021					return err
7022				}
7023				bhic.Name = &name
7024			}
7025		case "etag":
7026			if v != nil {
7027				var etag string
7028				err = json.Unmarshal(*v, &etag)
7029				if err != nil {
7030					return err
7031				}
7032				bhic.Etag = &etag
7033			}
7034		case "type":
7035			if v != nil {
7036				var typeVar string
7037				err = json.Unmarshal(*v, &typeVar)
7038				if err != nil {
7039					return err
7040				}
7041				bhic.Type = &typeVar
7042			}
7043		case "id":
7044			if v != nil {
7045				var ID string
7046				err = json.Unmarshal(*v, &ID)
7047				if err != nil {
7048					return err
7049				}
7050				bhic.ID = &ID
7051			}
7052		}
7053	}
7054
7055	return nil
7056}
7057
7058// BastionHostIPConfigurationPropertiesFormat properties of IP configuration of an Bastion Host.
7059type BastionHostIPConfigurationPropertiesFormat struct {
7060	// Subnet - Reference of the subnet resource.
7061	Subnet *SubResource `json:"subnet,omitempty"`
7062	// PublicIPAddress - Reference of the PublicIP resource.
7063	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
7064	// ProvisioningState - READ-ONLY; The provisioning state of the bastion host IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
7065	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
7066	// PrivateIPAllocationMethod - Private IP allocation method. Possible values include: 'Static', 'Dynamic'
7067	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
7068}
7069
7070// MarshalJSON is the custom marshaler for BastionHostIPConfigurationPropertiesFormat.
7071func (bhicpf BastionHostIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
7072	objectMap := make(map[string]interface{})
7073	if bhicpf.Subnet != nil {
7074		objectMap["subnet"] = bhicpf.Subnet
7075	}
7076	if bhicpf.PublicIPAddress != nil {
7077		objectMap["publicIPAddress"] = bhicpf.PublicIPAddress
7078	}
7079	if bhicpf.PrivateIPAllocationMethod != "" {
7080		objectMap["privateIPAllocationMethod"] = bhicpf.PrivateIPAllocationMethod
7081	}
7082	return json.Marshal(objectMap)
7083}
7084
7085// BastionHostListResult response for ListBastionHosts API service call.
7086type BastionHostListResult struct {
7087	autorest.Response `json:"-"`
7088	// Value - List of Bastion Hosts in a resource group.
7089	Value *[]BastionHost `json:"value,omitempty"`
7090	// NextLink - URL to get the next set of results.
7091	NextLink *string `json:"nextLink,omitempty"`
7092}
7093
7094// BastionHostListResultIterator provides access to a complete listing of BastionHost values.
7095type BastionHostListResultIterator struct {
7096	i    int
7097	page BastionHostListResultPage
7098}
7099
7100// NextWithContext advances to the next value.  If there was an error making
7101// the request the iterator does not advance and the error is returned.
7102func (iter *BastionHostListResultIterator) NextWithContext(ctx context.Context) (err error) {
7103	if tracing.IsEnabled() {
7104		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultIterator.NextWithContext")
7105		defer func() {
7106			sc := -1
7107			if iter.Response().Response.Response != nil {
7108				sc = iter.Response().Response.Response.StatusCode
7109			}
7110			tracing.EndSpan(ctx, sc, err)
7111		}()
7112	}
7113	iter.i++
7114	if iter.i < len(iter.page.Values()) {
7115		return nil
7116	}
7117	err = iter.page.NextWithContext(ctx)
7118	if err != nil {
7119		iter.i--
7120		return err
7121	}
7122	iter.i = 0
7123	return nil
7124}
7125
7126// Next advances to the next value.  If there was an error making
7127// the request the iterator does not advance and the error is returned.
7128// Deprecated: Use NextWithContext() instead.
7129func (iter *BastionHostListResultIterator) Next() error {
7130	return iter.NextWithContext(context.Background())
7131}
7132
7133// NotDone returns true if the enumeration should be started or is not yet complete.
7134func (iter BastionHostListResultIterator) NotDone() bool {
7135	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7136}
7137
7138// Response returns the raw server response from the last page request.
7139func (iter BastionHostListResultIterator) Response() BastionHostListResult {
7140	return iter.page.Response()
7141}
7142
7143// Value returns the current value or a zero-initialized value if the
7144// iterator has advanced beyond the end of the collection.
7145func (iter BastionHostListResultIterator) Value() BastionHost {
7146	if !iter.page.NotDone() {
7147		return BastionHost{}
7148	}
7149	return iter.page.Values()[iter.i]
7150}
7151
7152// Creates a new instance of the BastionHostListResultIterator type.
7153func NewBastionHostListResultIterator(page BastionHostListResultPage) BastionHostListResultIterator {
7154	return BastionHostListResultIterator{page: page}
7155}
7156
7157// IsEmpty returns true if the ListResult contains no values.
7158func (bhlr BastionHostListResult) IsEmpty() bool {
7159	return bhlr.Value == nil || len(*bhlr.Value) == 0
7160}
7161
7162// hasNextLink returns true if the NextLink is not empty.
7163func (bhlr BastionHostListResult) hasNextLink() bool {
7164	return bhlr.NextLink != nil && len(*bhlr.NextLink) != 0
7165}
7166
7167// bastionHostListResultPreparer prepares a request to retrieve the next set of results.
7168// It returns nil if no more results exist.
7169func (bhlr BastionHostListResult) bastionHostListResultPreparer(ctx context.Context) (*http.Request, error) {
7170	if !bhlr.hasNextLink() {
7171		return nil, nil
7172	}
7173	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7174		autorest.AsJSON(),
7175		autorest.AsGet(),
7176		autorest.WithBaseURL(to.String(bhlr.NextLink)))
7177}
7178
7179// BastionHostListResultPage contains a page of BastionHost values.
7180type BastionHostListResultPage struct {
7181	fn   func(context.Context, BastionHostListResult) (BastionHostListResult, error)
7182	bhlr BastionHostListResult
7183}
7184
7185// NextWithContext advances to the next page of values.  If there was an error making
7186// the request the page does not advance and the error is returned.
7187func (page *BastionHostListResultPage) NextWithContext(ctx context.Context) (err error) {
7188	if tracing.IsEnabled() {
7189		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultPage.NextWithContext")
7190		defer func() {
7191			sc := -1
7192			if page.Response().Response.Response != nil {
7193				sc = page.Response().Response.Response.StatusCode
7194			}
7195			tracing.EndSpan(ctx, sc, err)
7196		}()
7197	}
7198	for {
7199		next, err := page.fn(ctx, page.bhlr)
7200		if err != nil {
7201			return err
7202		}
7203		page.bhlr = next
7204		if !next.hasNextLink() || !next.IsEmpty() {
7205			break
7206		}
7207	}
7208	return nil
7209}
7210
7211// Next advances to the next page of values.  If there was an error making
7212// the request the page does not advance and the error is returned.
7213// Deprecated: Use NextWithContext() instead.
7214func (page *BastionHostListResultPage) Next() error {
7215	return page.NextWithContext(context.Background())
7216}
7217
7218// NotDone returns true if the page enumeration should be started or is not yet complete.
7219func (page BastionHostListResultPage) NotDone() bool {
7220	return !page.bhlr.IsEmpty()
7221}
7222
7223// Response returns the raw server response from the last page request.
7224func (page BastionHostListResultPage) Response() BastionHostListResult {
7225	return page.bhlr
7226}
7227
7228// Values returns the slice of values for the current page or nil if there are no values.
7229func (page BastionHostListResultPage) Values() []BastionHost {
7230	if page.bhlr.IsEmpty() {
7231		return nil
7232	}
7233	return *page.bhlr.Value
7234}
7235
7236// Creates a new instance of the BastionHostListResultPage type.
7237func NewBastionHostListResultPage(cur BastionHostListResult, getNextPage func(context.Context, BastionHostListResult) (BastionHostListResult, error)) BastionHostListResultPage {
7238	return BastionHostListResultPage{
7239		fn:   getNextPage,
7240		bhlr: cur,
7241	}
7242}
7243
7244// BastionHostPropertiesFormat properties of the Bastion Host.
7245type BastionHostPropertiesFormat struct {
7246	// IPConfigurations - IP configuration of the Bastion Host resource.
7247	IPConfigurations *[]BastionHostIPConfiguration `json:"ipConfigurations,omitempty"`
7248	// DNSName - FQDN for the endpoint on which bastion host is accessible.
7249	DNSName *string `json:"dnsName,omitempty"`
7250	// ProvisioningState - READ-ONLY; The provisioning state of the bastion host resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
7251	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
7252}
7253
7254// MarshalJSON is the custom marshaler for BastionHostPropertiesFormat.
7255func (bhpf BastionHostPropertiesFormat) MarshalJSON() ([]byte, error) {
7256	objectMap := make(map[string]interface{})
7257	if bhpf.IPConfigurations != nil {
7258		objectMap["ipConfigurations"] = bhpf.IPConfigurations
7259	}
7260	if bhpf.DNSName != nil {
7261		objectMap["dnsName"] = bhpf.DNSName
7262	}
7263	return json.Marshal(objectMap)
7264}
7265
7266// BastionHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7267// long-running operation.
7268type BastionHostsCreateOrUpdateFuture struct {
7269	azure.FutureAPI
7270	// Result returns the result of the asynchronous operation.
7271	// If the operation has not completed it will return an error.
7272	Result func(BastionHostsClient) (BastionHost, error)
7273}
7274
7275// BastionHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
7276// operation.
7277type BastionHostsDeleteFuture struct {
7278	azure.FutureAPI
7279	// Result returns the result of the asynchronous operation.
7280	// If the operation has not completed it will return an error.
7281	Result func(BastionHostsClient) (autorest.Response, error)
7282}
7283
7284// BastionSessionDeleteResult response for DisconnectActiveSessions.
7285type BastionSessionDeleteResult struct {
7286	autorest.Response `json:"-"`
7287	// Value - List of sessions with their corresponding state.
7288	Value *[]BastionSessionState `json:"value,omitempty"`
7289	// NextLink - The URL to get the next set of results.
7290	NextLink *string `json:"nextLink,omitempty"`
7291}
7292
7293// BastionSessionDeleteResultIterator provides access to a complete listing of BastionSessionState values.
7294type BastionSessionDeleteResultIterator struct {
7295	i    int
7296	page BastionSessionDeleteResultPage
7297}
7298
7299// NextWithContext advances to the next value.  If there was an error making
7300// the request the iterator does not advance and the error is returned.
7301func (iter *BastionSessionDeleteResultIterator) NextWithContext(ctx context.Context) (err error) {
7302	if tracing.IsEnabled() {
7303		ctx = tracing.StartSpan(ctx, fqdn+"/BastionSessionDeleteResultIterator.NextWithContext")
7304		defer func() {
7305			sc := -1
7306			if iter.Response().Response.Response != nil {
7307				sc = iter.Response().Response.Response.StatusCode
7308			}
7309			tracing.EndSpan(ctx, sc, err)
7310		}()
7311	}
7312	iter.i++
7313	if iter.i < len(iter.page.Values()) {
7314		return nil
7315	}
7316	err = iter.page.NextWithContext(ctx)
7317	if err != nil {
7318		iter.i--
7319		return err
7320	}
7321	iter.i = 0
7322	return nil
7323}
7324
7325// Next advances to the next value.  If there was an error making
7326// the request the iterator does not advance and the error is returned.
7327// Deprecated: Use NextWithContext() instead.
7328func (iter *BastionSessionDeleteResultIterator) Next() error {
7329	return iter.NextWithContext(context.Background())
7330}
7331
7332// NotDone returns true if the enumeration should be started or is not yet complete.
7333func (iter BastionSessionDeleteResultIterator) NotDone() bool {
7334	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7335}
7336
7337// Response returns the raw server response from the last page request.
7338func (iter BastionSessionDeleteResultIterator) Response() BastionSessionDeleteResult {
7339	return iter.page.Response()
7340}
7341
7342// Value returns the current value or a zero-initialized value if the
7343// iterator has advanced beyond the end of the collection.
7344func (iter BastionSessionDeleteResultIterator) Value() BastionSessionState {
7345	if !iter.page.NotDone() {
7346		return BastionSessionState{}
7347	}
7348	return iter.page.Values()[iter.i]
7349}
7350
7351// Creates a new instance of the BastionSessionDeleteResultIterator type.
7352func NewBastionSessionDeleteResultIterator(page BastionSessionDeleteResultPage) BastionSessionDeleteResultIterator {
7353	return BastionSessionDeleteResultIterator{page: page}
7354}
7355
7356// IsEmpty returns true if the ListResult contains no values.
7357func (bsdr BastionSessionDeleteResult) IsEmpty() bool {
7358	return bsdr.Value == nil || len(*bsdr.Value) == 0
7359}
7360
7361// hasNextLink returns true if the NextLink is not empty.
7362func (bsdr BastionSessionDeleteResult) hasNextLink() bool {
7363	return bsdr.NextLink != nil && len(*bsdr.NextLink) != 0
7364}
7365
7366// bastionSessionDeleteResultPreparer prepares a request to retrieve the next set of results.
7367// It returns nil if no more results exist.
7368func (bsdr BastionSessionDeleteResult) bastionSessionDeleteResultPreparer(ctx context.Context) (*http.Request, error) {
7369	if !bsdr.hasNextLink() {
7370		return nil, nil
7371	}
7372	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7373		autorest.AsJSON(),
7374		autorest.AsGet(),
7375		autorest.WithBaseURL(to.String(bsdr.NextLink)))
7376}
7377
7378// BastionSessionDeleteResultPage contains a page of BastionSessionState values.
7379type BastionSessionDeleteResultPage struct {
7380	fn   func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error)
7381	bsdr BastionSessionDeleteResult
7382}
7383
7384// NextWithContext advances to the next page of values.  If there was an error making
7385// the request the page does not advance and the error is returned.
7386func (page *BastionSessionDeleteResultPage) NextWithContext(ctx context.Context) (err error) {
7387	if tracing.IsEnabled() {
7388		ctx = tracing.StartSpan(ctx, fqdn+"/BastionSessionDeleteResultPage.NextWithContext")
7389		defer func() {
7390			sc := -1
7391			if page.Response().Response.Response != nil {
7392				sc = page.Response().Response.Response.StatusCode
7393			}
7394			tracing.EndSpan(ctx, sc, err)
7395		}()
7396	}
7397	for {
7398		next, err := page.fn(ctx, page.bsdr)
7399		if err != nil {
7400			return err
7401		}
7402		page.bsdr = next
7403		if !next.hasNextLink() || !next.IsEmpty() {
7404			break
7405		}
7406	}
7407	return nil
7408}
7409
7410// Next advances to the next page of values.  If there was an error making
7411// the request the page does not advance and the error is returned.
7412// Deprecated: Use NextWithContext() instead.
7413func (page *BastionSessionDeleteResultPage) Next() error {
7414	return page.NextWithContext(context.Background())
7415}
7416
7417// NotDone returns true if the page enumeration should be started or is not yet complete.
7418func (page BastionSessionDeleteResultPage) NotDone() bool {
7419	return !page.bsdr.IsEmpty()
7420}
7421
7422// Response returns the raw server response from the last page request.
7423func (page BastionSessionDeleteResultPage) Response() BastionSessionDeleteResult {
7424	return page.bsdr
7425}
7426
7427// Values returns the slice of values for the current page or nil if there are no values.
7428func (page BastionSessionDeleteResultPage) Values() []BastionSessionState {
7429	if page.bsdr.IsEmpty() {
7430		return nil
7431	}
7432	return *page.bsdr.Value
7433}
7434
7435// Creates a new instance of the BastionSessionDeleteResultPage type.
7436func NewBastionSessionDeleteResultPage(cur BastionSessionDeleteResult, getNextPage func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error)) BastionSessionDeleteResultPage {
7437	return BastionSessionDeleteResultPage{
7438		fn:   getNextPage,
7439		bsdr: cur,
7440	}
7441}
7442
7443// BastionSessionState the session state detail for a target.
7444type BastionSessionState struct {
7445	// SessionID - READ-ONLY; A unique id for the session.
7446	SessionID *string `json:"sessionId,omitempty"`
7447	// Message - READ-ONLY; Used for extra information.
7448	Message *string `json:"message,omitempty"`
7449	// State - READ-ONLY; The state of the session. Disconnected/Failed/NotFound.
7450	State *string `json:"state,omitempty"`
7451}
7452
7453// BastionShareableLink bastion Shareable Link.
7454type BastionShareableLink struct {
7455	// VM - Reference of the virtual machine resource.
7456	VM *VM `json:"vm,omitempty"`
7457	// Bsl - READ-ONLY; The unique Bastion Shareable Link to the virtual machine.
7458	Bsl *string `json:"bsl,omitempty"`
7459	// CreatedAt - READ-ONLY; The time when the link was created.
7460	CreatedAt *string `json:"createdAt,omitempty"`
7461	// Message - READ-ONLY; Optional field indicating the warning or error message related to the vm in case of partial failure.
7462	Message *string `json:"message,omitempty"`
7463}
7464
7465// MarshalJSON is the custom marshaler for BastionShareableLink.
7466func (bsl BastionShareableLink) MarshalJSON() ([]byte, error) {
7467	objectMap := make(map[string]interface{})
7468	if bsl.VM != nil {
7469		objectMap["vm"] = bsl.VM
7470	}
7471	return json.Marshal(objectMap)
7472}
7473
7474// BastionShareableLinkListRequest post request for all the Bastion Shareable Link endpoints.
7475type BastionShareableLinkListRequest struct {
7476	// Vms - List of VM references.
7477	Vms *[]BastionShareableLink `json:"vms,omitempty"`
7478}
7479
7480// BastionShareableLinkListResult response for all the Bastion Shareable Link endpoints.
7481type BastionShareableLinkListResult struct {
7482	autorest.Response `json:"-"`
7483	// Value - List of Bastion Shareable Links for the request.
7484	Value *[]BastionShareableLink `json:"value,omitempty"`
7485	// NextLink - The URL to get the next set of results.
7486	NextLink *string `json:"nextLink,omitempty"`
7487}
7488
7489// BastionShareableLinkListResultIterator provides access to a complete listing of BastionShareableLink
7490// values.
7491type BastionShareableLinkListResultIterator struct {
7492	i    int
7493	page BastionShareableLinkListResultPage
7494}
7495
7496// NextWithContext advances to the next value.  If there was an error making
7497// the request the iterator does not advance and the error is returned.
7498func (iter *BastionShareableLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
7499	if tracing.IsEnabled() {
7500		ctx = tracing.StartSpan(ctx, fqdn+"/BastionShareableLinkListResultIterator.NextWithContext")
7501		defer func() {
7502			sc := -1
7503			if iter.Response().Response.Response != nil {
7504				sc = iter.Response().Response.Response.StatusCode
7505			}
7506			tracing.EndSpan(ctx, sc, err)
7507		}()
7508	}
7509	iter.i++
7510	if iter.i < len(iter.page.Values()) {
7511		return nil
7512	}
7513	err = iter.page.NextWithContext(ctx)
7514	if err != nil {
7515		iter.i--
7516		return err
7517	}
7518	iter.i = 0
7519	return nil
7520}
7521
7522// Next advances to the next value.  If there was an error making
7523// the request the iterator does not advance and the error is returned.
7524// Deprecated: Use NextWithContext() instead.
7525func (iter *BastionShareableLinkListResultIterator) Next() error {
7526	return iter.NextWithContext(context.Background())
7527}
7528
7529// NotDone returns true if the enumeration should be started or is not yet complete.
7530func (iter BastionShareableLinkListResultIterator) NotDone() bool {
7531	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7532}
7533
7534// Response returns the raw server response from the last page request.
7535func (iter BastionShareableLinkListResultIterator) Response() BastionShareableLinkListResult {
7536	return iter.page.Response()
7537}
7538
7539// Value returns the current value or a zero-initialized value if the
7540// iterator has advanced beyond the end of the collection.
7541func (iter BastionShareableLinkListResultIterator) Value() BastionShareableLink {
7542	if !iter.page.NotDone() {
7543		return BastionShareableLink{}
7544	}
7545	return iter.page.Values()[iter.i]
7546}
7547
7548// Creates a new instance of the BastionShareableLinkListResultIterator type.
7549func NewBastionShareableLinkListResultIterator(page BastionShareableLinkListResultPage) BastionShareableLinkListResultIterator {
7550	return BastionShareableLinkListResultIterator{page: page}
7551}
7552
7553// IsEmpty returns true if the ListResult contains no values.
7554func (bsllr BastionShareableLinkListResult) IsEmpty() bool {
7555	return bsllr.Value == nil || len(*bsllr.Value) == 0
7556}
7557
7558// hasNextLink returns true if the NextLink is not empty.
7559func (bsllr BastionShareableLinkListResult) hasNextLink() bool {
7560	return bsllr.NextLink != nil && len(*bsllr.NextLink) != 0
7561}
7562
7563// bastionShareableLinkListResultPreparer prepares a request to retrieve the next set of results.
7564// It returns nil if no more results exist.
7565func (bsllr BastionShareableLinkListResult) bastionShareableLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
7566	if !bsllr.hasNextLink() {
7567		return nil, nil
7568	}
7569	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7570		autorest.AsJSON(),
7571		autorest.AsGet(),
7572		autorest.WithBaseURL(to.String(bsllr.NextLink)))
7573}
7574
7575// BastionShareableLinkListResultPage contains a page of BastionShareableLink values.
7576type BastionShareableLinkListResultPage struct {
7577	fn    func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error)
7578	bsllr BastionShareableLinkListResult
7579}
7580
7581// NextWithContext advances to the next page of values.  If there was an error making
7582// the request the page does not advance and the error is returned.
7583func (page *BastionShareableLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
7584	if tracing.IsEnabled() {
7585		ctx = tracing.StartSpan(ctx, fqdn+"/BastionShareableLinkListResultPage.NextWithContext")
7586		defer func() {
7587			sc := -1
7588			if page.Response().Response.Response != nil {
7589				sc = page.Response().Response.Response.StatusCode
7590			}
7591			tracing.EndSpan(ctx, sc, err)
7592		}()
7593	}
7594	for {
7595		next, err := page.fn(ctx, page.bsllr)
7596		if err != nil {
7597			return err
7598		}
7599		page.bsllr = next
7600		if !next.hasNextLink() || !next.IsEmpty() {
7601			break
7602		}
7603	}
7604	return nil
7605}
7606
7607// Next advances to the next page of values.  If there was an error making
7608// the request the page does not advance and the error is returned.
7609// Deprecated: Use NextWithContext() instead.
7610func (page *BastionShareableLinkListResultPage) Next() error {
7611	return page.NextWithContext(context.Background())
7612}
7613
7614// NotDone returns true if the page enumeration should be started or is not yet complete.
7615func (page BastionShareableLinkListResultPage) NotDone() bool {
7616	return !page.bsllr.IsEmpty()
7617}
7618
7619// Response returns the raw server response from the last page request.
7620func (page BastionShareableLinkListResultPage) Response() BastionShareableLinkListResult {
7621	return page.bsllr
7622}
7623
7624// Values returns the slice of values for the current page or nil if there are no values.
7625func (page BastionShareableLinkListResultPage) Values() []BastionShareableLink {
7626	if page.bsllr.IsEmpty() {
7627		return nil
7628	}
7629	return *page.bsllr.Value
7630}
7631
7632// Creates a new instance of the BastionShareableLinkListResultPage type.
7633func NewBastionShareableLinkListResultPage(cur BastionShareableLinkListResult, getNextPage func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error)) BastionShareableLinkListResultPage {
7634	return BastionShareableLinkListResultPage{
7635		fn:    getNextPage,
7636		bsllr: cur,
7637	}
7638}
7639
7640// BGPCommunity contains bgp community information offered in Service Community resources.
7641type BGPCommunity struct {
7642	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
7643	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
7644	// CommunityName - The name of the bgp community. e.g. Skype.
7645	CommunityName *string `json:"communityName,omitempty"`
7646	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
7647	CommunityValue *string `json:"communityValue,omitempty"`
7648	// CommunityPrefixes - The prefixes that the bgp community contains.
7649	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
7650	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
7651	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
7652	// ServiceGroup - The service group of the bgp community contains.
7653	ServiceGroup *string `json:"serviceGroup,omitempty"`
7654}
7655
7656// BgpConnection virtual Appliance Site resource.
7657type BgpConnection struct {
7658	autorest.Response `json:"-"`
7659	// BgpConnectionProperties - The properties of the Bgp connections.
7660	*BgpConnectionProperties `json:"properties,omitempty"`
7661	// Name - Name of the connection.
7662	Name *string `json:"name,omitempty"`
7663	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7664	Etag *string `json:"etag,omitempty"`
7665	// Type - READ-ONLY; Connection type.
7666	Type *string `json:"type,omitempty"`
7667	// ID - Resource ID.
7668	ID *string `json:"id,omitempty"`
7669}
7670
7671// MarshalJSON is the custom marshaler for BgpConnection.
7672func (bc BgpConnection) MarshalJSON() ([]byte, error) {
7673	objectMap := make(map[string]interface{})
7674	if bc.BgpConnectionProperties != nil {
7675		objectMap["properties"] = bc.BgpConnectionProperties
7676	}
7677	if bc.Name != nil {
7678		objectMap["name"] = bc.Name
7679	}
7680	if bc.ID != nil {
7681		objectMap["id"] = bc.ID
7682	}
7683	return json.Marshal(objectMap)
7684}
7685
7686// UnmarshalJSON is the custom unmarshaler for BgpConnection struct.
7687func (bc *BgpConnection) UnmarshalJSON(body []byte) error {
7688	var m map[string]*json.RawMessage
7689	err := json.Unmarshal(body, &m)
7690	if err != nil {
7691		return err
7692	}
7693	for k, v := range m {
7694		switch k {
7695		case "properties":
7696			if v != nil {
7697				var bgpConnectionProperties BgpConnectionProperties
7698				err = json.Unmarshal(*v, &bgpConnectionProperties)
7699				if err != nil {
7700					return err
7701				}
7702				bc.BgpConnectionProperties = &bgpConnectionProperties
7703			}
7704		case "name":
7705			if v != nil {
7706				var name string
7707				err = json.Unmarshal(*v, &name)
7708				if err != nil {
7709					return err
7710				}
7711				bc.Name = &name
7712			}
7713		case "etag":
7714			if v != nil {
7715				var etag string
7716				err = json.Unmarshal(*v, &etag)
7717				if err != nil {
7718					return err
7719				}
7720				bc.Etag = &etag
7721			}
7722		case "type":
7723			if v != nil {
7724				var typeVar string
7725				err = json.Unmarshal(*v, &typeVar)
7726				if err != nil {
7727					return err
7728				}
7729				bc.Type = &typeVar
7730			}
7731		case "id":
7732			if v != nil {
7733				var ID string
7734				err = json.Unmarshal(*v, &ID)
7735				if err != nil {
7736					return err
7737				}
7738				bc.ID = &ID
7739			}
7740		}
7741	}
7742
7743	return nil
7744}
7745
7746// BgpConnectionProperties properties of the bgp connection.
7747type BgpConnectionProperties struct {
7748	// PeerAsn - Peer ASN.
7749	PeerAsn *int64 `json:"peerAsn,omitempty"`
7750	// PeerIP - Peer IP.
7751	PeerIP *string `json:"peerIp,omitempty"`
7752	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
7753	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
7754	// ConnectionState - READ-ONLY; The current state of the VirtualHub to Peer. Possible values include: 'HubBgpConnectionStatusUnknown', 'HubBgpConnectionStatusConnecting', 'HubBgpConnectionStatusConnected', 'HubBgpConnectionStatusNotConnected'
7755	ConnectionState HubBgpConnectionStatus `json:"connectionState,omitempty"`
7756}
7757
7758// MarshalJSON is the custom marshaler for BgpConnectionProperties.
7759func (bcp BgpConnectionProperties) MarshalJSON() ([]byte, error) {
7760	objectMap := make(map[string]interface{})
7761	if bcp.PeerAsn != nil {
7762		objectMap["peerAsn"] = bcp.PeerAsn
7763	}
7764	if bcp.PeerIP != nil {
7765		objectMap["peerIp"] = bcp.PeerIP
7766	}
7767	return json.Marshal(objectMap)
7768}
7769
7770// BgpPeerStatus BGP peer status details.
7771type BgpPeerStatus struct {
7772	// LocalAddress - READ-ONLY; The virtual network gateway's local address.
7773	LocalAddress *string `json:"localAddress,omitempty"`
7774	// Neighbor - READ-ONLY; The remote BGP peer.
7775	Neighbor *string `json:"neighbor,omitempty"`
7776	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer.
7777	Asn *int64 `json:"asn,omitempty"`
7778	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
7779	State BgpPeerState `json:"state,omitempty"`
7780	// ConnectedDuration - READ-ONLY; For how long the peering has been up.
7781	ConnectedDuration *string `json:"connectedDuration,omitempty"`
7782	// RoutesReceived - READ-ONLY; The number of routes learned from this peer.
7783	RoutesReceived *int64 `json:"routesReceived,omitempty"`
7784	// MessagesSent - READ-ONLY; The number of BGP messages sent.
7785	MessagesSent *int64 `json:"messagesSent,omitempty"`
7786	// MessagesReceived - READ-ONLY; The number of BGP messages received.
7787	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
7788}
7789
7790// BgpPeerStatusListResult response for list BGP peer status API service call.
7791type BgpPeerStatusListResult struct {
7792	autorest.Response `json:"-"`
7793	// Value - List of BGP peers.
7794	Value *[]BgpPeerStatus `json:"value,omitempty"`
7795}
7796
7797// BgpServiceCommunity service Community Properties.
7798type BgpServiceCommunity struct {
7799	// BgpServiceCommunityPropertiesFormat - Properties of the BGP service community.
7800	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
7801	// ID - Resource ID.
7802	ID *string `json:"id,omitempty"`
7803	// Name - READ-ONLY; Resource name.
7804	Name *string `json:"name,omitempty"`
7805	// Type - READ-ONLY; Resource type.
7806	Type *string `json:"type,omitempty"`
7807	// Location - Resource location.
7808	Location *string `json:"location,omitempty"`
7809	// Tags - Resource tags.
7810	Tags map[string]*string `json:"tags"`
7811}
7812
7813// MarshalJSON is the custom marshaler for BgpServiceCommunity.
7814func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
7815	objectMap := make(map[string]interface{})
7816	if bsc.BgpServiceCommunityPropertiesFormat != nil {
7817		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
7818	}
7819	if bsc.ID != nil {
7820		objectMap["id"] = bsc.ID
7821	}
7822	if bsc.Location != nil {
7823		objectMap["location"] = bsc.Location
7824	}
7825	if bsc.Tags != nil {
7826		objectMap["tags"] = bsc.Tags
7827	}
7828	return json.Marshal(objectMap)
7829}
7830
7831// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
7832func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
7833	var m map[string]*json.RawMessage
7834	err := json.Unmarshal(body, &m)
7835	if err != nil {
7836		return err
7837	}
7838	for k, v := range m {
7839		switch k {
7840		case "properties":
7841			if v != nil {
7842				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
7843				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
7844				if err != nil {
7845					return err
7846				}
7847				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
7848			}
7849		case "id":
7850			if v != nil {
7851				var ID string
7852				err = json.Unmarshal(*v, &ID)
7853				if err != nil {
7854					return err
7855				}
7856				bsc.ID = &ID
7857			}
7858		case "name":
7859			if v != nil {
7860				var name string
7861				err = json.Unmarshal(*v, &name)
7862				if err != nil {
7863					return err
7864				}
7865				bsc.Name = &name
7866			}
7867		case "type":
7868			if v != nil {
7869				var typeVar string
7870				err = json.Unmarshal(*v, &typeVar)
7871				if err != nil {
7872					return err
7873				}
7874				bsc.Type = &typeVar
7875			}
7876		case "location":
7877			if v != nil {
7878				var location string
7879				err = json.Unmarshal(*v, &location)
7880				if err != nil {
7881					return err
7882				}
7883				bsc.Location = &location
7884			}
7885		case "tags":
7886			if v != nil {
7887				var tags map[string]*string
7888				err = json.Unmarshal(*v, &tags)
7889				if err != nil {
7890					return err
7891				}
7892				bsc.Tags = tags
7893			}
7894		}
7895	}
7896
7897	return nil
7898}
7899
7900// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
7901type BgpServiceCommunityListResult struct {
7902	autorest.Response `json:"-"`
7903	// Value - A list of service community resources.
7904	Value *[]BgpServiceCommunity `json:"value,omitempty"`
7905	// NextLink - The URL to get the next set of results.
7906	NextLink *string `json:"nextLink,omitempty"`
7907}
7908
7909// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
7910// values.
7911type BgpServiceCommunityListResultIterator struct {
7912	i    int
7913	page BgpServiceCommunityListResultPage
7914}
7915
7916// NextWithContext advances to the next value.  If there was an error making
7917// the request the iterator does not advance and the error is returned.
7918func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
7919	if tracing.IsEnabled() {
7920		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
7921		defer func() {
7922			sc := -1
7923			if iter.Response().Response.Response != nil {
7924				sc = iter.Response().Response.Response.StatusCode
7925			}
7926			tracing.EndSpan(ctx, sc, err)
7927		}()
7928	}
7929	iter.i++
7930	if iter.i < len(iter.page.Values()) {
7931		return nil
7932	}
7933	err = iter.page.NextWithContext(ctx)
7934	if err != nil {
7935		iter.i--
7936		return err
7937	}
7938	iter.i = 0
7939	return nil
7940}
7941
7942// Next advances to the next value.  If there was an error making
7943// the request the iterator does not advance and the error is returned.
7944// Deprecated: Use NextWithContext() instead.
7945func (iter *BgpServiceCommunityListResultIterator) Next() error {
7946	return iter.NextWithContext(context.Background())
7947}
7948
7949// NotDone returns true if the enumeration should be started or is not yet complete.
7950func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
7951	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7952}
7953
7954// Response returns the raw server response from the last page request.
7955func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
7956	return iter.page.Response()
7957}
7958
7959// Value returns the current value or a zero-initialized value if the
7960// iterator has advanced beyond the end of the collection.
7961func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
7962	if !iter.page.NotDone() {
7963		return BgpServiceCommunity{}
7964	}
7965	return iter.page.Values()[iter.i]
7966}
7967
7968// Creates a new instance of the BgpServiceCommunityListResultIterator type.
7969func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
7970	return BgpServiceCommunityListResultIterator{page: page}
7971}
7972
7973// IsEmpty returns true if the ListResult contains no values.
7974func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
7975	return bsclr.Value == nil || len(*bsclr.Value) == 0
7976}
7977
7978// hasNextLink returns true if the NextLink is not empty.
7979func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
7980	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
7981}
7982
7983// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
7984// It returns nil if no more results exist.
7985func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
7986	if !bsclr.hasNextLink() {
7987		return nil, nil
7988	}
7989	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7990		autorest.AsJSON(),
7991		autorest.AsGet(),
7992		autorest.WithBaseURL(to.String(bsclr.NextLink)))
7993}
7994
7995// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
7996type BgpServiceCommunityListResultPage struct {
7997	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
7998	bsclr BgpServiceCommunityListResult
7999}
8000
8001// NextWithContext advances to the next page of values.  If there was an error making
8002// the request the page does not advance and the error is returned.
8003func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
8004	if tracing.IsEnabled() {
8005		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
8006		defer func() {
8007			sc := -1
8008			if page.Response().Response.Response != nil {
8009				sc = page.Response().Response.Response.StatusCode
8010			}
8011			tracing.EndSpan(ctx, sc, err)
8012		}()
8013	}
8014	for {
8015		next, err := page.fn(ctx, page.bsclr)
8016		if err != nil {
8017			return err
8018		}
8019		page.bsclr = next
8020		if !next.hasNextLink() || !next.IsEmpty() {
8021			break
8022		}
8023	}
8024	return nil
8025}
8026
8027// Next advances to the next page of values.  If there was an error making
8028// the request the page does not advance and the error is returned.
8029// Deprecated: Use NextWithContext() instead.
8030func (page *BgpServiceCommunityListResultPage) Next() error {
8031	return page.NextWithContext(context.Background())
8032}
8033
8034// NotDone returns true if the page enumeration should be started or is not yet complete.
8035func (page BgpServiceCommunityListResultPage) NotDone() bool {
8036	return !page.bsclr.IsEmpty()
8037}
8038
8039// Response returns the raw server response from the last page request.
8040func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
8041	return page.bsclr
8042}
8043
8044// Values returns the slice of values for the current page or nil if there are no values.
8045func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
8046	if page.bsclr.IsEmpty() {
8047		return nil
8048	}
8049	return *page.bsclr.Value
8050}
8051
8052// Creates a new instance of the BgpServiceCommunityListResultPage type.
8053func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
8054	return BgpServiceCommunityListResultPage{
8055		fn:    getNextPage,
8056		bsclr: cur,
8057	}
8058}
8059
8060// BgpServiceCommunityPropertiesFormat properties of Service Community.
8061type BgpServiceCommunityPropertiesFormat struct {
8062	// ServiceName - The name of the bgp community. e.g. Skype.
8063	ServiceName *string `json:"serviceName,omitempty"`
8064	// BgpCommunities - A list of bgp communities.
8065	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
8066}
8067
8068// BgpSettings BGP settings details.
8069type BgpSettings struct {
8070	// Asn - The BGP speaker's ASN.
8071	Asn *int64 `json:"asn,omitempty"`
8072	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
8073	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
8074	// PeerWeight - The weight added to routes learned from this BGP speaker.
8075	PeerWeight *int32 `json:"peerWeight,omitempty"`
8076	// BgpPeeringAddresses - BGP peering address with IP configuration ID for virtual network gateway.
8077	BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"`
8078}
8079
8080// BreakOutCategoryPolicies network Virtual Appliance Sku Properties.
8081type BreakOutCategoryPolicies struct {
8082	// Allow - Flag to control breakout of o365 allow category.
8083	Allow *bool `json:"allow,omitempty"`
8084	// Optimize - Flag to control breakout of o365 optimize category.
8085	Optimize *bool `json:"optimize,omitempty"`
8086	// Default - Flag to control breakout of o365 default category.
8087	Default *bool `json:"default,omitempty"`
8088}
8089
8090// CheckPrivateLinkServiceVisibilityRequest request body of the CheckPrivateLinkServiceVisibility API
8091// service call.
8092type CheckPrivateLinkServiceVisibilityRequest struct {
8093	// PrivateLinkServiceAlias - The alias of the private link service.
8094	PrivateLinkServiceAlias *string `json:"privateLinkServiceAlias,omitempty"`
8095}
8096
8097// CloudError an error response from the service.
8098type CloudError struct {
8099	// Error - Cloud error body.
8100	Error *CloudErrorBody `json:"error,omitempty"`
8101}
8102
8103// CloudErrorBody an error response from the service.
8104type CloudErrorBody struct {
8105	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
8106	Code *string `json:"code,omitempty"`
8107	// Message - A message describing the error, intended to be suitable for display in a user interface.
8108	Message *string `json:"message,omitempty"`
8109	// Target - The target of the particular error. For example, the name of the property in error.
8110	Target *string `json:"target,omitempty"`
8111	// Details - A list of additional details about the error.
8112	Details *[]CloudErrorBody `json:"details,omitempty"`
8113}
8114
8115// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
8116type ConfigurationDiagnosticParameters struct {
8117	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
8118	TargetResourceID *string `json:"targetResourceId,omitempty"`
8119	// VerbosityLevel - Verbosity level. Possible values include: 'Normal', 'Minimum', 'Full'
8120	VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"`
8121	// Profiles - List of network configuration diagnostic profiles.
8122	Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"`
8123}
8124
8125// ConfigurationDiagnosticProfile parameters to compare with network configuration.
8126type ConfigurationDiagnosticProfile struct {
8127	// Direction - The direction of the traffic. Possible values include: 'Inbound', 'Outbound'
8128	Direction Direction `json:"direction,omitempty"`
8129	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
8130	Protocol *string `json:"protocol,omitempty"`
8131	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
8132	Source *string `json:"source,omitempty"`
8133	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
8134	Destination *string `json:"destination,omitempty"`
8135	// DestinationPort - Traffic destination port. Accepted values are '*' and a single port in the range (0 - 65535).
8136	DestinationPort *string `json:"destinationPort,omitempty"`
8137}
8138
8139// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
8140type ConfigurationDiagnosticResponse struct {
8141	autorest.Response `json:"-"`
8142	// Results - READ-ONLY; List of network configuration diagnostic results.
8143	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
8144}
8145
8146// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
8147// query.
8148type ConfigurationDiagnosticResult struct {
8149	// Profile - Network configuration diagnostic profile.
8150	Profile *ConfigurationDiagnosticProfile `json:"profile,omitempty"`
8151	// NetworkSecurityGroupResult - Network security group result.
8152	NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"`
8153}
8154
8155// ConnectionMonitor parameters that define the operation to create a connection monitor.
8156type ConnectionMonitor struct {
8157	// Location - Connection monitor location.
8158	Location *string `json:"location,omitempty"`
8159	// Tags - Connection monitor tags.
8160	Tags map[string]*string `json:"tags"`
8161	// ConnectionMonitorParameters - Properties of the connection monitor.
8162	*ConnectionMonitorParameters `json:"properties,omitempty"`
8163}
8164
8165// MarshalJSON is the custom marshaler for ConnectionMonitor.
8166func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
8167	objectMap := make(map[string]interface{})
8168	if cm.Location != nil {
8169		objectMap["location"] = cm.Location
8170	}
8171	if cm.Tags != nil {
8172		objectMap["tags"] = cm.Tags
8173	}
8174	if cm.ConnectionMonitorParameters != nil {
8175		objectMap["properties"] = cm.ConnectionMonitorParameters
8176	}
8177	return json.Marshal(objectMap)
8178}
8179
8180// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
8181func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
8182	var m map[string]*json.RawMessage
8183	err := json.Unmarshal(body, &m)
8184	if err != nil {
8185		return err
8186	}
8187	for k, v := range m {
8188		switch k {
8189		case "location":
8190			if v != nil {
8191				var location string
8192				err = json.Unmarshal(*v, &location)
8193				if err != nil {
8194					return err
8195				}
8196				cm.Location = &location
8197			}
8198		case "tags":
8199			if v != nil {
8200				var tags map[string]*string
8201				err = json.Unmarshal(*v, &tags)
8202				if err != nil {
8203					return err
8204				}
8205				cm.Tags = tags
8206			}
8207		case "properties":
8208			if v != nil {
8209				var connectionMonitorParameters ConnectionMonitorParameters
8210				err = json.Unmarshal(*v, &connectionMonitorParameters)
8211				if err != nil {
8212					return err
8213				}
8214				cm.ConnectionMonitorParameters = &connectionMonitorParameters
8215			}
8216		}
8217	}
8218
8219	return nil
8220}
8221
8222// ConnectionMonitorDestination describes the destination of connection monitor.
8223type ConnectionMonitorDestination struct {
8224	// ResourceID - The ID of the resource used as the destination by connection monitor.
8225	ResourceID *string `json:"resourceId,omitempty"`
8226	// Address - Address of the connection monitor destination (IP or domain name).
8227	Address *string `json:"address,omitempty"`
8228	// Port - The destination port used by connection monitor.
8229	Port *int32 `json:"port,omitempty"`
8230}
8231
8232// ConnectionMonitorEndpoint describes the connection monitor endpoint.
8233type ConnectionMonitorEndpoint struct {
8234	// Name - The name of the connection monitor endpoint.
8235	Name *string `json:"name,omitempty"`
8236	// ResourceID - Resource ID of the connection monitor endpoint.
8237	ResourceID *string `json:"resourceId,omitempty"`
8238	// Address - Address of the connection monitor endpoint (IP or domain name).
8239	Address *string `json:"address,omitempty"`
8240	// Filter - Filter for sub-items within the endpoint.
8241	Filter *ConnectionMonitorEndpointFilter `json:"filter,omitempty"`
8242}
8243
8244// ConnectionMonitorEndpointFilter describes the connection monitor endpoint filter.
8245type ConnectionMonitorEndpointFilter struct {
8246	// Type - The behavior of the endpoint filter. Currently only 'Include' is supported. Possible values include: 'Include'
8247	Type ConnectionMonitorEndpointFilterType `json:"type,omitempty"`
8248	// Items - List of items in the filter.
8249	Items *[]ConnectionMonitorEndpointFilterItem `json:"items,omitempty"`
8250}
8251
8252// ConnectionMonitorEndpointFilterItem describes the connection monitor endpoint filter item.
8253type ConnectionMonitorEndpointFilterItem struct {
8254	// Type - The type of item included in the filter. Currently only 'AgentAddress' is supported. Possible values include: 'AgentAddress'
8255	Type ConnectionMonitorEndpointFilterItemType `json:"type,omitempty"`
8256	// Address - The address of the filter item.
8257	Address *string `json:"address,omitempty"`
8258}
8259
8260// ConnectionMonitorHTTPConfiguration describes the HTTP configuration.
8261type ConnectionMonitorHTTPConfiguration struct {
8262	// Port - The port to connect to.
8263	Port *int32 `json:"port,omitempty"`
8264	// Method - The HTTP method to use. Possible values include: 'Get', 'Post'
8265	Method HTTPConfigurationMethod `json:"method,omitempty"`
8266	// Path - The path component of the URI. For instance, "/dir1/dir2".
8267	Path *string `json:"path,omitempty"`
8268	// RequestHeaders - The HTTP headers to transmit with the request.
8269	RequestHeaders *[]HTTPHeader `json:"requestHeaders,omitempty"`
8270	// ValidStatusCodeRanges - HTTP status codes to consider successful. For instance, "2xx,301-304,418".
8271	ValidStatusCodeRanges *[]string `json:"validStatusCodeRanges,omitempty"`
8272	// PreferHTTPS - Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit.
8273	PreferHTTPS *bool `json:"preferHTTPS,omitempty"`
8274}
8275
8276// ConnectionMonitorIcmpConfiguration describes the ICMP configuration.
8277type ConnectionMonitorIcmpConfiguration struct {
8278	// DisableTraceRoute - Value indicating whether path evaluation with trace route should be disabled.
8279	DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"`
8280}
8281
8282// ConnectionMonitorListResult list of connection monitors.
8283type ConnectionMonitorListResult struct {
8284	autorest.Response `json:"-"`
8285	// Value - Information about connection monitors.
8286	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
8287}
8288
8289// ConnectionMonitorOutput describes a connection monitor output destination.
8290type ConnectionMonitorOutput struct {
8291	// Type - Connection monitor output destination type. Currently, only "Workspace" is supported. Possible values include: 'Workspace'
8292	Type OutputType `json:"type,omitempty"`
8293	// WorkspaceSettings - Describes the settings for producing output into a log analytics workspace.
8294	WorkspaceSettings *ConnectionMonitorWorkspaceSettings `json:"workspaceSettings,omitempty"`
8295}
8296
8297// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
8298type ConnectionMonitorParameters struct {
8299	// Source - Describes the source of connection monitor.
8300	Source *ConnectionMonitorSource `json:"source,omitempty"`
8301	// Destination - Describes the destination of connection monitor.
8302	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
8303	// AutoStart - Determines if the connection monitor will start automatically once created.
8304	AutoStart *bool `json:"autoStart,omitempty"`
8305	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
8306	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
8307	// Endpoints - List of connection monitor endpoints.
8308	Endpoints *[]ConnectionMonitorEndpoint `json:"endpoints,omitempty"`
8309	// TestConfigurations - List of connection monitor test configurations.
8310	TestConfigurations *[]ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"`
8311	// TestGroups - List of connection monitor test groups.
8312	TestGroups *[]ConnectionMonitorTestGroup `json:"testGroups,omitempty"`
8313	// Outputs - List of connection monitor outputs.
8314	Outputs *[]ConnectionMonitorOutput `json:"outputs,omitempty"`
8315	// Notes - Optional notes to be associated with the connection monitor.
8316	Notes *string `json:"notes,omitempty"`
8317}
8318
8319// ConnectionMonitorQueryResult list of connection states snapshots.
8320type ConnectionMonitorQueryResult struct {
8321	autorest.Response `json:"-"`
8322	// SourceStatus - Status of connection monitor source. Possible values include: 'ConnectionMonitorSourceStatusUnknown', 'ConnectionMonitorSourceStatusActive', 'ConnectionMonitorSourceStatusInactive'
8323	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
8324	// States - Information about connection states.
8325	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
8326}
8327
8328// ConnectionMonitorResult information about the connection monitor.
8329type ConnectionMonitorResult struct {
8330	autorest.Response `json:"-"`
8331	// Name - READ-ONLY; Name of the connection monitor.
8332	Name *string `json:"name,omitempty"`
8333	// ID - READ-ONLY; ID of the connection monitor.
8334	ID *string `json:"id,omitempty"`
8335	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8336	Etag *string `json:"etag,omitempty"`
8337	// Type - READ-ONLY; Connection monitor type.
8338	Type *string `json:"type,omitempty"`
8339	// Location - Connection monitor location.
8340	Location *string `json:"location,omitempty"`
8341	// Tags - Connection monitor tags.
8342	Tags map[string]*string `json:"tags"`
8343	// ConnectionMonitorResultProperties - Properties of the connection monitor result.
8344	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
8345}
8346
8347// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
8348func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
8349	objectMap := make(map[string]interface{})
8350	if cmr.Location != nil {
8351		objectMap["location"] = cmr.Location
8352	}
8353	if cmr.Tags != nil {
8354		objectMap["tags"] = cmr.Tags
8355	}
8356	if cmr.ConnectionMonitorResultProperties != nil {
8357		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
8358	}
8359	return json.Marshal(objectMap)
8360}
8361
8362// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
8363func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
8364	var m map[string]*json.RawMessage
8365	err := json.Unmarshal(body, &m)
8366	if err != nil {
8367		return err
8368	}
8369	for k, v := range m {
8370		switch k {
8371		case "name":
8372			if v != nil {
8373				var name string
8374				err = json.Unmarshal(*v, &name)
8375				if err != nil {
8376					return err
8377				}
8378				cmr.Name = &name
8379			}
8380		case "id":
8381			if v != nil {
8382				var ID string
8383				err = json.Unmarshal(*v, &ID)
8384				if err != nil {
8385					return err
8386				}
8387				cmr.ID = &ID
8388			}
8389		case "etag":
8390			if v != nil {
8391				var etag string
8392				err = json.Unmarshal(*v, &etag)
8393				if err != nil {
8394					return err
8395				}
8396				cmr.Etag = &etag
8397			}
8398		case "type":
8399			if v != nil {
8400				var typeVar string
8401				err = json.Unmarshal(*v, &typeVar)
8402				if err != nil {
8403					return err
8404				}
8405				cmr.Type = &typeVar
8406			}
8407		case "location":
8408			if v != nil {
8409				var location string
8410				err = json.Unmarshal(*v, &location)
8411				if err != nil {
8412					return err
8413				}
8414				cmr.Location = &location
8415			}
8416		case "tags":
8417			if v != nil {
8418				var tags map[string]*string
8419				err = json.Unmarshal(*v, &tags)
8420				if err != nil {
8421					return err
8422				}
8423				cmr.Tags = tags
8424			}
8425		case "properties":
8426			if v != nil {
8427				var connectionMonitorResultProperties ConnectionMonitorResultProperties
8428				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
8429				if err != nil {
8430					return err
8431				}
8432				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
8433			}
8434		}
8435	}
8436
8437	return nil
8438}
8439
8440// ConnectionMonitorResultProperties describes the properties of a connection monitor.
8441type ConnectionMonitorResultProperties struct {
8442	// ProvisioningState - READ-ONLY; The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
8443	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8444	// StartTime - READ-ONLY; The date and time when the connection monitor was started.
8445	StartTime *date.Time `json:"startTime,omitempty"`
8446	// MonitoringStatus - READ-ONLY; The monitoring status of the connection monitor.
8447	MonitoringStatus *string `json:"monitoringStatus,omitempty"`
8448	// ConnectionMonitorType - READ-ONLY; Type of connection monitor. Possible values include: 'MultiEndpoint', 'SingleSourceDestination'
8449	ConnectionMonitorType ConnectionMonitorType `json:"connectionMonitorType,omitempty"`
8450	// Source - Describes the source of connection monitor.
8451	Source *ConnectionMonitorSource `json:"source,omitempty"`
8452	// Destination - Describes the destination of connection monitor.
8453	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
8454	// AutoStart - Determines if the connection monitor will start automatically once created.
8455	AutoStart *bool `json:"autoStart,omitempty"`
8456	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
8457	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
8458	// Endpoints - List of connection monitor endpoints.
8459	Endpoints *[]ConnectionMonitorEndpoint `json:"endpoints,omitempty"`
8460	// TestConfigurations - List of connection monitor test configurations.
8461	TestConfigurations *[]ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"`
8462	// TestGroups - List of connection monitor test groups.
8463	TestGroups *[]ConnectionMonitorTestGroup `json:"testGroups,omitempty"`
8464	// Outputs - List of connection monitor outputs.
8465	Outputs *[]ConnectionMonitorOutput `json:"outputs,omitempty"`
8466	// Notes - Optional notes to be associated with the connection monitor.
8467	Notes *string `json:"notes,omitempty"`
8468}
8469
8470// MarshalJSON is the custom marshaler for ConnectionMonitorResultProperties.
8471func (cmrp ConnectionMonitorResultProperties) MarshalJSON() ([]byte, error) {
8472	objectMap := make(map[string]interface{})
8473	if cmrp.Source != nil {
8474		objectMap["source"] = cmrp.Source
8475	}
8476	if cmrp.Destination != nil {
8477		objectMap["destination"] = cmrp.Destination
8478	}
8479	if cmrp.AutoStart != nil {
8480		objectMap["autoStart"] = cmrp.AutoStart
8481	}
8482	if cmrp.MonitoringIntervalInSeconds != nil {
8483		objectMap["monitoringIntervalInSeconds"] = cmrp.MonitoringIntervalInSeconds
8484	}
8485	if cmrp.Endpoints != nil {
8486		objectMap["endpoints"] = cmrp.Endpoints
8487	}
8488	if cmrp.TestConfigurations != nil {
8489		objectMap["testConfigurations"] = cmrp.TestConfigurations
8490	}
8491	if cmrp.TestGroups != nil {
8492		objectMap["testGroups"] = cmrp.TestGroups
8493	}
8494	if cmrp.Outputs != nil {
8495		objectMap["outputs"] = cmrp.Outputs
8496	}
8497	if cmrp.Notes != nil {
8498		objectMap["notes"] = cmrp.Notes
8499	}
8500	return json.Marshal(objectMap)
8501}
8502
8503// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8504// long-running operation.
8505type ConnectionMonitorsCreateOrUpdateFuture struct {
8506	azure.FutureAPI
8507	// Result returns the result of the asynchronous operation.
8508	// If the operation has not completed it will return an error.
8509	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
8510}
8511
8512// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
8513// long-running operation.
8514type ConnectionMonitorsDeleteFuture struct {
8515	azure.FutureAPI
8516	// Result returns the result of the asynchronous operation.
8517	// If the operation has not completed it will return an error.
8518	Result func(ConnectionMonitorsClient) (autorest.Response, error)
8519}
8520
8521// ConnectionMonitorSource describes the source of connection monitor.
8522type ConnectionMonitorSource struct {
8523	// ResourceID - The ID of the resource used as the source by connection monitor.
8524	ResourceID *string `json:"resourceId,omitempty"`
8525	// Port - The source port used by connection monitor.
8526	Port *int32 `json:"port,omitempty"`
8527}
8528
8529// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
8530// operation.
8531type ConnectionMonitorsQueryFuture struct {
8532	azure.FutureAPI
8533	// Result returns the result of the asynchronous operation.
8534	// If the operation has not completed it will return an error.
8535	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
8536}
8537
8538// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
8539// operation.
8540type ConnectionMonitorsStartFuture struct {
8541	azure.FutureAPI
8542	// Result returns the result of the asynchronous operation.
8543	// If the operation has not completed it will return an error.
8544	Result func(ConnectionMonitorsClient) (autorest.Response, error)
8545}
8546
8547// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
8548// operation.
8549type ConnectionMonitorsStopFuture struct {
8550	azure.FutureAPI
8551	// Result returns the result of the asynchronous operation.
8552	// If the operation has not completed it will return an error.
8553	Result func(ConnectionMonitorsClient) (autorest.Response, error)
8554}
8555
8556// ConnectionMonitorSuccessThreshold describes the threshold for declaring a test successful.
8557type ConnectionMonitorSuccessThreshold struct {
8558	// ChecksFailedPercent - The maximum percentage of failed checks permitted for a test to evaluate as successful.
8559	ChecksFailedPercent *int32 `json:"checksFailedPercent,omitempty"`
8560	// RoundTripTimeMs - The maximum round-trip time in milliseconds permitted for a test to evaluate as successful.
8561	RoundTripTimeMs *float64 `json:"roundTripTimeMs,omitempty"`
8562}
8563
8564// ConnectionMonitorTCPConfiguration describes the TCP configuration.
8565type ConnectionMonitorTCPConfiguration struct {
8566	// Port - The port to connect to.
8567	Port *int32 `json:"port,omitempty"`
8568	// DisableTraceRoute - Value indicating whether path evaluation with trace route should be disabled.
8569	DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"`
8570}
8571
8572// ConnectionMonitorTestConfiguration describes a connection monitor test configuration.
8573type ConnectionMonitorTestConfiguration struct {
8574	// Name - The name of the connection monitor test configuration.
8575	Name *string `json:"name,omitempty"`
8576	// TestFrequencySec - The frequency of test evaluation, in seconds.
8577	TestFrequencySec *int32 `json:"testFrequencySec,omitempty"`
8578	// Protocol - The protocol to use in test evaluation. Possible values include: 'ConnectionMonitorTestConfigurationProtocolTCP', 'ConnectionMonitorTestConfigurationProtocolHTTP', 'ConnectionMonitorTestConfigurationProtocolIcmp'
8579	Protocol ConnectionMonitorTestConfigurationProtocol `json:"protocol,omitempty"`
8580	// 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'
8581	PreferredIPVersion PreferredIPVersion `json:"preferredIPVersion,omitempty"`
8582	// HTTPConfiguration - The parameters used to perform test evaluation over HTTP.
8583	HTTPConfiguration *ConnectionMonitorHTTPConfiguration `json:"httpConfiguration,omitempty"`
8584	// TCPConfiguration - The parameters used to perform test evaluation over TCP.
8585	TCPConfiguration *ConnectionMonitorTCPConfiguration `json:"tcpConfiguration,omitempty"`
8586	// IcmpConfiguration - The parameters used to perform test evaluation over ICMP.
8587	IcmpConfiguration *ConnectionMonitorIcmpConfiguration `json:"icmpConfiguration,omitempty"`
8588	// SuccessThreshold - The threshold for declaring a test successful.
8589	SuccessThreshold *ConnectionMonitorSuccessThreshold `json:"successThreshold,omitempty"`
8590}
8591
8592// ConnectionMonitorTestGroup describes the connection monitor test group.
8593type ConnectionMonitorTestGroup struct {
8594	// Name - The name of the connection monitor test group.
8595	Name *string `json:"name,omitempty"`
8596	// Disable - Value indicating whether test group is disabled.
8597	Disable *bool `json:"disable,omitempty"`
8598	// TestConfigurations - List of test configuration names.
8599	TestConfigurations *[]string `json:"testConfigurations,omitempty"`
8600	// Sources - List of source endpoint names.
8601	Sources *[]string `json:"sources,omitempty"`
8602	// Destinations - List of destination endpoint names.
8603	Destinations *[]string `json:"destinations,omitempty"`
8604}
8605
8606// ConnectionMonitorWorkspaceSettings describes the settings for producing output into a log analytics
8607// workspace.
8608type ConnectionMonitorWorkspaceSettings struct {
8609	// WorkspaceResourceID - Log analytics workspace resource ID.
8610	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
8611}
8612
8613// ConnectionResetSharedKey the virtual network connection reset shared key.
8614type ConnectionResetSharedKey struct {
8615	autorest.Response `json:"-"`
8616	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
8617	KeyLength *int32 `json:"keyLength,omitempty"`
8618}
8619
8620// ConnectionSharedKey response for GetConnectionSharedKey API service call.
8621type ConnectionSharedKey struct {
8622	autorest.Response `json:"-"`
8623	// Value - The virtual network connection shared key value.
8624	Value *string `json:"value,omitempty"`
8625	// ID - Resource ID.
8626	ID *string `json:"id,omitempty"`
8627}
8628
8629// ConnectionStateSnapshot connection state snapshot.
8630type ConnectionStateSnapshot struct {
8631	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
8632	ConnectionState ConnectionState `json:"connectionState,omitempty"`
8633	// StartTime - The start time of the connection snapshot.
8634	StartTime *date.Time `json:"startTime,omitempty"`
8635	// EndTime - The end time of the connection snapshot.
8636	EndTime *date.Time `json:"endTime,omitempty"`
8637	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
8638	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
8639	// AvgLatencyInMs - Average latency in ms.
8640	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
8641	// MinLatencyInMs - Minimum latency in ms.
8642	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
8643	// MaxLatencyInMs - Maximum latency in ms.
8644	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
8645	// ProbesSent - The number of sent probes.
8646	ProbesSent *int32 `json:"probesSent,omitempty"`
8647	// ProbesFailed - The number of failed probes.
8648	ProbesFailed *int32 `json:"probesFailed,omitempty"`
8649	// Hops - READ-ONLY; List of hops between the source and the destination.
8650	Hops *[]ConnectivityHop `json:"hops,omitempty"`
8651}
8652
8653// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
8654func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
8655	objectMap := make(map[string]interface{})
8656	if CSS.ConnectionState != "" {
8657		objectMap["connectionState"] = CSS.ConnectionState
8658	}
8659	if CSS.StartTime != nil {
8660		objectMap["startTime"] = CSS.StartTime
8661	}
8662	if CSS.EndTime != nil {
8663		objectMap["endTime"] = CSS.EndTime
8664	}
8665	if CSS.EvaluationState != "" {
8666		objectMap["evaluationState"] = CSS.EvaluationState
8667	}
8668	if CSS.AvgLatencyInMs != nil {
8669		objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
8670	}
8671	if CSS.MinLatencyInMs != nil {
8672		objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
8673	}
8674	if CSS.MaxLatencyInMs != nil {
8675		objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
8676	}
8677	if CSS.ProbesSent != nil {
8678		objectMap["probesSent"] = CSS.ProbesSent
8679	}
8680	if CSS.ProbesFailed != nil {
8681		objectMap["probesFailed"] = CSS.ProbesFailed
8682	}
8683	return json.Marshal(objectMap)
8684}
8685
8686// ConnectivityDestination parameters that define destination of connection.
8687type ConnectivityDestination struct {
8688	// ResourceID - The ID of the resource to which a connection attempt will be made.
8689	ResourceID *string `json:"resourceId,omitempty"`
8690	// Address - The IP address or URI the resource to which a connection attempt will be made.
8691	Address *string `json:"address,omitempty"`
8692	// Port - Port on which check connectivity will be performed.
8693	Port *int32 `json:"port,omitempty"`
8694}
8695
8696// ConnectivityHop information about a hop between the source and the destination.
8697type ConnectivityHop struct {
8698	// Type - READ-ONLY; The type of the hop.
8699	Type *string `json:"type,omitempty"`
8700	// ID - READ-ONLY; The ID of the hop.
8701	ID *string `json:"id,omitempty"`
8702	// Address - READ-ONLY; The IP address of the hop.
8703	Address *string `json:"address,omitempty"`
8704	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
8705	ResourceID *string `json:"resourceId,omitempty"`
8706	// NextHopIds - READ-ONLY; List of next hop identifiers.
8707	NextHopIds *[]string `json:"nextHopIds,omitempty"`
8708	// PreviousHopIds - READ-ONLY; List of previous hop identifiers.
8709	PreviousHopIds *[]string `json:"previousHopIds,omitempty"`
8710	// Links - READ-ONLY; List of hop links.
8711	Links *[]HopLink `json:"links,omitempty"`
8712	// PreviousLinks - READ-ONLY; List of previous hop links.
8713	PreviousLinks *[]HopLink `json:"previousLinks,omitempty"`
8714	// Issues - READ-ONLY; List of issues.
8715	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
8716}
8717
8718// ConnectivityInformation information on the connectivity status.
8719type ConnectivityInformation struct {
8720	autorest.Response `json:"-"`
8721	// Hops - READ-ONLY; List of hops between the source and the destination.
8722	Hops *[]ConnectivityHop `json:"hops,omitempty"`
8723	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
8724	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
8725	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
8726	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
8727	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
8728	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
8729	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
8730	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
8731	// ProbesSent - READ-ONLY; Total number of probes sent.
8732	ProbesSent *int32 `json:"probesSent,omitempty"`
8733	// ProbesFailed - READ-ONLY; Number of failed probes.
8734	ProbesFailed *int32 `json:"probesFailed,omitempty"`
8735}
8736
8737// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
8738type ConnectivityIssue struct {
8739	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
8740	Origin Origin `json:"origin,omitempty"`
8741	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
8742	Severity Severity `json:"severity,omitempty"`
8743	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
8744	Type IssueType `json:"type,omitempty"`
8745	// Context - READ-ONLY; Provides additional context on the issue.
8746	Context *[]map[string]*string `json:"context,omitempty"`
8747}
8748
8749// ConnectivityParameters parameters that determine how the connectivity check will be performed.
8750type ConnectivityParameters struct {
8751	// Source - The source of the connection.
8752	Source *ConnectivitySource `json:"source,omitempty"`
8753	// Destination - The destination of connection.
8754	Destination *ConnectivityDestination `json:"destination,omitempty"`
8755	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
8756	Protocol Protocol `json:"protocol,omitempty"`
8757	// ProtocolConfiguration - Configuration of the protocol.
8758	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
8759	// PreferredIPVersion - Preferred IP version of the connection. Possible values include: 'IPv4', 'IPv6'
8760	PreferredIPVersion IPVersion `json:"preferredIPVersion,omitempty"`
8761}
8762
8763// ConnectivitySource parameters that define the source of the connection.
8764type ConnectivitySource struct {
8765	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
8766	ResourceID *string `json:"resourceId,omitempty"`
8767	// Port - The source port from which a connectivity check will be performed.
8768	Port *int32 `json:"port,omitempty"`
8769}
8770
8771// Container reference to container resource in remote resource provider.
8772type Container struct {
8773	// ID - Resource ID.
8774	ID *string `json:"id,omitempty"`
8775}
8776
8777// ContainerNetworkInterface container network interface child resource.
8778type ContainerNetworkInterface struct {
8779	// ContainerNetworkInterfacePropertiesFormat - Container network interface properties.
8780	*ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"`
8781	// Name - The name of the resource. This name can be used to access the resource.
8782	Name *string `json:"name,omitempty"`
8783	// Type - READ-ONLY; Sub Resource type.
8784	Type *string `json:"type,omitempty"`
8785	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8786	Etag *string `json:"etag,omitempty"`
8787	// ID - Resource ID.
8788	ID *string `json:"id,omitempty"`
8789}
8790
8791// MarshalJSON is the custom marshaler for ContainerNetworkInterface.
8792func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) {
8793	objectMap := make(map[string]interface{})
8794	if cni.ContainerNetworkInterfacePropertiesFormat != nil {
8795		objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat
8796	}
8797	if cni.Name != nil {
8798		objectMap["name"] = cni.Name
8799	}
8800	if cni.ID != nil {
8801		objectMap["id"] = cni.ID
8802	}
8803	return json.Marshal(objectMap)
8804}
8805
8806// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct.
8807func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error {
8808	var m map[string]*json.RawMessage
8809	err := json.Unmarshal(body, &m)
8810	if err != nil {
8811		return err
8812	}
8813	for k, v := range m {
8814		switch k {
8815		case "properties":
8816			if v != nil {
8817				var containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat
8818				err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat)
8819				if err != nil {
8820					return err
8821				}
8822				cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat
8823			}
8824		case "name":
8825			if v != nil {
8826				var name string
8827				err = json.Unmarshal(*v, &name)
8828				if err != nil {
8829					return err
8830				}
8831				cni.Name = &name
8832			}
8833		case "type":
8834			if v != nil {
8835				var typeVar string
8836				err = json.Unmarshal(*v, &typeVar)
8837				if err != nil {
8838					return err
8839				}
8840				cni.Type = &typeVar
8841			}
8842		case "etag":
8843			if v != nil {
8844				var etag string
8845				err = json.Unmarshal(*v, &etag)
8846				if err != nil {
8847					return err
8848				}
8849				cni.Etag = &etag
8850			}
8851		case "id":
8852			if v != nil {
8853				var ID string
8854				err = json.Unmarshal(*v, &ID)
8855				if err != nil {
8856					return err
8857				}
8858				cni.ID = &ID
8859			}
8860		}
8861	}
8862
8863	return nil
8864}
8865
8866// ContainerNetworkInterfaceConfiguration container network interface configuration child resource.
8867type ContainerNetworkInterfaceConfiguration struct {
8868	// ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties.
8869	*ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"`
8870	// Name - The name of the resource. This name can be used to access the resource.
8871	Name *string `json:"name,omitempty"`
8872	// Type - READ-ONLY; Sub Resource type.
8873	Type *string `json:"type,omitempty"`
8874	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8875	Etag *string `json:"etag,omitempty"`
8876	// ID - Resource ID.
8877	ID *string `json:"id,omitempty"`
8878}
8879
8880// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration.
8881func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
8882	objectMap := make(map[string]interface{})
8883	if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil {
8884		objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat
8885	}
8886	if cnic.Name != nil {
8887		objectMap["name"] = cnic.Name
8888	}
8889	if cnic.ID != nil {
8890		objectMap["id"] = cnic.ID
8891	}
8892	return json.Marshal(objectMap)
8893}
8894
8895// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct.
8896func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error {
8897	var m map[string]*json.RawMessage
8898	err := json.Unmarshal(body, &m)
8899	if err != nil {
8900		return err
8901	}
8902	for k, v := range m {
8903		switch k {
8904		case "properties":
8905			if v != nil {
8906				var containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat
8907				err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat)
8908				if err != nil {
8909					return err
8910				}
8911				cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat
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				cnic.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				cnic.Type = &typeVar
8930			}
8931		case "etag":
8932			if v != nil {
8933				var etag string
8934				err = json.Unmarshal(*v, &etag)
8935				if err != nil {
8936					return err
8937				}
8938				cnic.Etag = &etag
8939			}
8940		case "id":
8941			if v != nil {
8942				var ID string
8943				err = json.Unmarshal(*v, &ID)
8944				if err != nil {
8945					return err
8946				}
8947				cnic.ID = &ID
8948			}
8949		}
8950	}
8951
8952	return nil
8953}
8954
8955// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration
8956// properties.
8957type ContainerNetworkInterfaceConfigurationPropertiesFormat struct {
8958	// IPConfigurations - A list of ip configurations of the container network interface configuration.
8959	IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"`
8960	// ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration.
8961	ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"`
8962	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
8963	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8964}
8965
8966// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat.
8967func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
8968	objectMap := make(map[string]interface{})
8969	if cnicpf.IPConfigurations != nil {
8970		objectMap["ipConfigurations"] = cnicpf.IPConfigurations
8971	}
8972	if cnicpf.ContainerNetworkInterfaces != nil {
8973		objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces
8974	}
8975	return json.Marshal(objectMap)
8976}
8977
8978// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface.
8979type ContainerNetworkInterfaceIPConfiguration struct {
8980	// ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration.
8981	*ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
8982	// Name - The name of the resource. This name can be used to access the resource.
8983	Name *string `json:"name,omitempty"`
8984	// Type - READ-ONLY; Sub Resource type.
8985	Type *string `json:"type,omitempty"`
8986	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8987	Etag *string `json:"etag,omitempty"`
8988}
8989
8990// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration.
8991func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
8992	objectMap := make(map[string]interface{})
8993	if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil {
8994		objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat
8995	}
8996	if cniic.Name != nil {
8997		objectMap["name"] = cniic.Name
8998	}
8999	return json.Marshal(objectMap)
9000}
9001
9002// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct.
9003func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
9004	var m map[string]*json.RawMessage
9005	err := json.Unmarshal(body, &m)
9006	if err != nil {
9007		return err
9008	}
9009	for k, v := range m {
9010		switch k {
9011		case "properties":
9012			if v != nil {
9013				var containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat
9014				err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat)
9015				if err != nil {
9016					return err
9017				}
9018				cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat
9019			}
9020		case "name":
9021			if v != nil {
9022				var name string
9023				err = json.Unmarshal(*v, &name)
9024				if err != nil {
9025					return err
9026				}
9027				cniic.Name = &name
9028			}
9029		case "type":
9030			if v != nil {
9031				var typeVar string
9032				err = json.Unmarshal(*v, &typeVar)
9033				if err != nil {
9034					return err
9035				}
9036				cniic.Type = &typeVar
9037			}
9038		case "etag":
9039			if v != nil {
9040				var etag string
9041				err = json.Unmarshal(*v, &etag)
9042				if err != nil {
9043					return err
9044				}
9045				cniic.Etag = &etag
9046			}
9047		}
9048	}
9049
9050	return nil
9051}
9052
9053// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface
9054// IP configuration.
9055type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
9056	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9057	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9058}
9059
9060// ContainerNetworkInterfacePropertiesFormat properties of container network interface.
9061type ContainerNetworkInterfacePropertiesFormat struct {
9062	// ContainerNetworkInterfaceConfiguration - READ-ONLY; Container network interface configuration from which this container network interface is created.
9063	ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"`
9064	// Container - Reference to the container to which this container network interface is attached.
9065	Container *Container `json:"container,omitempty"`
9066	// IPConfigurations - READ-ONLY; Reference to the ip configuration on this container nic.
9067	IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
9068	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9069	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9070}
9071
9072// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat.
9073func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
9074	objectMap := make(map[string]interface{})
9075	if cnipf.Container != nil {
9076		objectMap["container"] = cnipf.Container
9077	}
9078	return json.Marshal(objectMap)
9079}
9080
9081// CustomDNSConfigPropertiesFormat contains custom Dns resolution configuration from customer.
9082type CustomDNSConfigPropertiesFormat struct {
9083	// Fqdn - Fqdn that resolves to private endpoint ip address.
9084	Fqdn *string `json:"fqdn,omitempty"`
9085	// IPAddresses - A list of private ip addresses of the private endpoint.
9086	IPAddresses *[]string `json:"ipAddresses,omitempty"`
9087}
9088
9089// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9090// long-running operation.
9091type DdosCustomPoliciesCreateOrUpdateFuture struct {
9092	azure.FutureAPI
9093	// Result returns the result of the asynchronous operation.
9094	// If the operation has not completed it will return an error.
9095	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
9096}
9097
9098// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
9099// long-running operation.
9100type DdosCustomPoliciesDeleteFuture struct {
9101	azure.FutureAPI
9102	// Result returns the result of the asynchronous operation.
9103	// If the operation has not completed it will return an error.
9104	Result func(DdosCustomPoliciesClient) (autorest.Response, error)
9105}
9106
9107// DdosCustomPolicy a DDoS custom policy in a resource group.
9108type DdosCustomPolicy struct {
9109	autorest.Response `json:"-"`
9110	// DdosCustomPolicyPropertiesFormat - Properties of the DDoS custom policy.
9111	*DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"`
9112	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9113	Etag *string `json:"etag,omitempty"`
9114	// ID - Resource ID.
9115	ID *string `json:"id,omitempty"`
9116	// Name - READ-ONLY; Resource name.
9117	Name *string `json:"name,omitempty"`
9118	// Type - READ-ONLY; Resource type.
9119	Type *string `json:"type,omitempty"`
9120	// Location - Resource location.
9121	Location *string `json:"location,omitempty"`
9122	// Tags - Resource tags.
9123	Tags map[string]*string `json:"tags"`
9124}
9125
9126// MarshalJSON is the custom marshaler for DdosCustomPolicy.
9127func (dcp DdosCustomPolicy) MarshalJSON() ([]byte, error) {
9128	objectMap := make(map[string]interface{})
9129	if dcp.DdosCustomPolicyPropertiesFormat != nil {
9130		objectMap["properties"] = dcp.DdosCustomPolicyPropertiesFormat
9131	}
9132	if dcp.ID != nil {
9133		objectMap["id"] = dcp.ID
9134	}
9135	if dcp.Location != nil {
9136		objectMap["location"] = dcp.Location
9137	}
9138	if dcp.Tags != nil {
9139		objectMap["tags"] = dcp.Tags
9140	}
9141	return json.Marshal(objectMap)
9142}
9143
9144// UnmarshalJSON is the custom unmarshaler for DdosCustomPolicy struct.
9145func (dcp *DdosCustomPolicy) UnmarshalJSON(body []byte) error {
9146	var m map[string]*json.RawMessage
9147	err := json.Unmarshal(body, &m)
9148	if err != nil {
9149		return err
9150	}
9151	for k, v := range m {
9152		switch k {
9153		case "properties":
9154			if v != nil {
9155				var ddosCustomPolicyPropertiesFormat DdosCustomPolicyPropertiesFormat
9156				err = json.Unmarshal(*v, &ddosCustomPolicyPropertiesFormat)
9157				if err != nil {
9158					return err
9159				}
9160				dcp.DdosCustomPolicyPropertiesFormat = &ddosCustomPolicyPropertiesFormat
9161			}
9162		case "etag":
9163			if v != nil {
9164				var etag string
9165				err = json.Unmarshal(*v, &etag)
9166				if err != nil {
9167					return err
9168				}
9169				dcp.Etag = &etag
9170			}
9171		case "id":
9172			if v != nil {
9173				var ID string
9174				err = json.Unmarshal(*v, &ID)
9175				if err != nil {
9176					return err
9177				}
9178				dcp.ID = &ID
9179			}
9180		case "name":
9181			if v != nil {
9182				var name string
9183				err = json.Unmarshal(*v, &name)
9184				if err != nil {
9185					return err
9186				}
9187				dcp.Name = &name
9188			}
9189		case "type":
9190			if v != nil {
9191				var typeVar string
9192				err = json.Unmarshal(*v, &typeVar)
9193				if err != nil {
9194					return err
9195				}
9196				dcp.Type = &typeVar
9197			}
9198		case "location":
9199			if v != nil {
9200				var location string
9201				err = json.Unmarshal(*v, &location)
9202				if err != nil {
9203					return err
9204				}
9205				dcp.Location = &location
9206			}
9207		case "tags":
9208			if v != nil {
9209				var tags map[string]*string
9210				err = json.Unmarshal(*v, &tags)
9211				if err != nil {
9212					return err
9213				}
9214				dcp.Tags = tags
9215			}
9216		}
9217	}
9218
9219	return nil
9220}
9221
9222// DdosCustomPolicyPropertiesFormat dDoS custom policy properties.
9223type DdosCustomPolicyPropertiesFormat struct {
9224	// 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.
9225	ResourceGUID *string `json:"resourceGuid,omitempty"`
9226	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS custom policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9227	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9228	// PublicIPAddresses - READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only.
9229	PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"`
9230	// ProtocolCustomSettings - The protocol-specific DDoS policy customization parameters.
9231	ProtocolCustomSettings *[]ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"`
9232}
9233
9234// MarshalJSON is the custom marshaler for DdosCustomPolicyPropertiesFormat.
9235func (dcppf DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
9236	objectMap := make(map[string]interface{})
9237	if dcppf.ProtocolCustomSettings != nil {
9238		objectMap["protocolCustomSettings"] = dcppf.ProtocolCustomSettings
9239	}
9240	return json.Marshal(objectMap)
9241}
9242
9243// DdosProtectionPlan a DDoS protection plan in a resource group.
9244type DdosProtectionPlan struct {
9245	autorest.Response `json:"-"`
9246	// ID - READ-ONLY; Resource ID.
9247	ID *string `json:"id,omitempty"`
9248	// Name - READ-ONLY; Resource name.
9249	Name *string `json:"name,omitempty"`
9250	// Type - READ-ONLY; Resource type.
9251	Type *string `json:"type,omitempty"`
9252	// Location - Resource location.
9253	Location *string `json:"location,omitempty"`
9254	// Tags - Resource tags.
9255	Tags map[string]*string `json:"tags"`
9256	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
9257	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
9258	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9259	Etag *string `json:"etag,omitempty"`
9260}
9261
9262// MarshalJSON is the custom marshaler for DdosProtectionPlan.
9263func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
9264	objectMap := make(map[string]interface{})
9265	if dpp.Location != nil {
9266		objectMap["location"] = dpp.Location
9267	}
9268	if dpp.Tags != nil {
9269		objectMap["tags"] = dpp.Tags
9270	}
9271	if dpp.DdosProtectionPlanPropertiesFormat != nil {
9272		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
9273	}
9274	return json.Marshal(objectMap)
9275}
9276
9277// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
9278func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
9279	var m map[string]*json.RawMessage
9280	err := json.Unmarshal(body, &m)
9281	if err != nil {
9282		return err
9283	}
9284	for k, v := range m {
9285		switch k {
9286		case "id":
9287			if v != nil {
9288				var ID string
9289				err = json.Unmarshal(*v, &ID)
9290				if err != nil {
9291					return err
9292				}
9293				dpp.ID = &ID
9294			}
9295		case "name":
9296			if v != nil {
9297				var name string
9298				err = json.Unmarshal(*v, &name)
9299				if err != nil {
9300					return err
9301				}
9302				dpp.Name = &name
9303			}
9304		case "type":
9305			if v != nil {
9306				var typeVar string
9307				err = json.Unmarshal(*v, &typeVar)
9308				if err != nil {
9309					return err
9310				}
9311				dpp.Type = &typeVar
9312			}
9313		case "location":
9314			if v != nil {
9315				var location string
9316				err = json.Unmarshal(*v, &location)
9317				if err != nil {
9318					return err
9319				}
9320				dpp.Location = &location
9321			}
9322		case "tags":
9323			if v != nil {
9324				var tags map[string]*string
9325				err = json.Unmarshal(*v, &tags)
9326				if err != nil {
9327					return err
9328				}
9329				dpp.Tags = tags
9330			}
9331		case "properties":
9332			if v != nil {
9333				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
9334				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
9335				if err != nil {
9336					return err
9337				}
9338				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
9339			}
9340		case "etag":
9341			if v != nil {
9342				var etag string
9343				err = json.Unmarshal(*v, &etag)
9344				if err != nil {
9345					return err
9346				}
9347				dpp.Etag = &etag
9348			}
9349		}
9350	}
9351
9352	return nil
9353}
9354
9355// DdosProtectionPlanListResult a list of DDoS protection plans.
9356type DdosProtectionPlanListResult struct {
9357	autorest.Response `json:"-"`
9358	// Value - A list of DDoS protection plans.
9359	Value *[]DdosProtectionPlan `json:"value,omitempty"`
9360	// NextLink - READ-ONLY; The URL to get the next set of results.
9361	NextLink *string `json:"nextLink,omitempty"`
9362}
9363
9364// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
9365func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
9366	objectMap := make(map[string]interface{})
9367	if dpplr.Value != nil {
9368		objectMap["value"] = dpplr.Value
9369	}
9370	return json.Marshal(objectMap)
9371}
9372
9373// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
9374type DdosProtectionPlanListResultIterator struct {
9375	i    int
9376	page DdosProtectionPlanListResultPage
9377}
9378
9379// NextWithContext advances to the next value.  If there was an error making
9380// the request the iterator does not advance and the error is returned.
9381func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
9382	if tracing.IsEnabled() {
9383		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
9384		defer func() {
9385			sc := -1
9386			if iter.Response().Response.Response != nil {
9387				sc = iter.Response().Response.Response.StatusCode
9388			}
9389			tracing.EndSpan(ctx, sc, err)
9390		}()
9391	}
9392	iter.i++
9393	if iter.i < len(iter.page.Values()) {
9394		return nil
9395	}
9396	err = iter.page.NextWithContext(ctx)
9397	if err != nil {
9398		iter.i--
9399		return err
9400	}
9401	iter.i = 0
9402	return nil
9403}
9404
9405// Next advances to the next value.  If there was an error making
9406// the request the iterator does not advance and the error is returned.
9407// Deprecated: Use NextWithContext() instead.
9408func (iter *DdosProtectionPlanListResultIterator) Next() error {
9409	return iter.NextWithContext(context.Background())
9410}
9411
9412// NotDone returns true if the enumeration should be started or is not yet complete.
9413func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
9414	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9415}
9416
9417// Response returns the raw server response from the last page request.
9418func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
9419	return iter.page.Response()
9420}
9421
9422// Value returns the current value or a zero-initialized value if the
9423// iterator has advanced beyond the end of the collection.
9424func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
9425	if !iter.page.NotDone() {
9426		return DdosProtectionPlan{}
9427	}
9428	return iter.page.Values()[iter.i]
9429}
9430
9431// Creates a new instance of the DdosProtectionPlanListResultIterator type.
9432func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
9433	return DdosProtectionPlanListResultIterator{page: page}
9434}
9435
9436// IsEmpty returns true if the ListResult contains no values.
9437func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
9438	return dpplr.Value == nil || len(*dpplr.Value) == 0
9439}
9440
9441// hasNextLink returns true if the NextLink is not empty.
9442func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
9443	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
9444}
9445
9446// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
9447// It returns nil if no more results exist.
9448func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
9449	if !dpplr.hasNextLink() {
9450		return nil, nil
9451	}
9452	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9453		autorest.AsJSON(),
9454		autorest.AsGet(),
9455		autorest.WithBaseURL(to.String(dpplr.NextLink)))
9456}
9457
9458// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
9459type DdosProtectionPlanListResultPage struct {
9460	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
9461	dpplr DdosProtectionPlanListResult
9462}
9463
9464// NextWithContext advances to the next page of values.  If there was an error making
9465// the request the page does not advance and the error is returned.
9466func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
9467	if tracing.IsEnabled() {
9468		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
9469		defer func() {
9470			sc := -1
9471			if page.Response().Response.Response != nil {
9472				sc = page.Response().Response.Response.StatusCode
9473			}
9474			tracing.EndSpan(ctx, sc, err)
9475		}()
9476	}
9477	for {
9478		next, err := page.fn(ctx, page.dpplr)
9479		if err != nil {
9480			return err
9481		}
9482		page.dpplr = next
9483		if !next.hasNextLink() || !next.IsEmpty() {
9484			break
9485		}
9486	}
9487	return nil
9488}
9489
9490// Next advances to the next page of values.  If there was an error making
9491// the request the page does not advance and the error is returned.
9492// Deprecated: Use NextWithContext() instead.
9493func (page *DdosProtectionPlanListResultPage) Next() error {
9494	return page.NextWithContext(context.Background())
9495}
9496
9497// NotDone returns true if the page enumeration should be started or is not yet complete.
9498func (page DdosProtectionPlanListResultPage) NotDone() bool {
9499	return !page.dpplr.IsEmpty()
9500}
9501
9502// Response returns the raw server response from the last page request.
9503func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
9504	return page.dpplr
9505}
9506
9507// Values returns the slice of values for the current page or nil if there are no values.
9508func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
9509	if page.dpplr.IsEmpty() {
9510		return nil
9511	}
9512	return *page.dpplr.Value
9513}
9514
9515// Creates a new instance of the DdosProtectionPlanListResultPage type.
9516func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
9517	return DdosProtectionPlanListResultPage{
9518		fn:    getNextPage,
9519		dpplr: cur,
9520	}
9521}
9522
9523// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
9524type DdosProtectionPlanPropertiesFormat struct {
9525	// 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.
9526	ResourceGUID *string `json:"resourceGuid,omitempty"`
9527	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9528	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9529	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
9530	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
9531}
9532
9533// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9534// long-running operation.
9535type DdosProtectionPlansCreateOrUpdateFuture struct {
9536	azure.FutureAPI
9537	// Result returns the result of the asynchronous operation.
9538	// If the operation has not completed it will return an error.
9539	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
9540}
9541
9542// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
9543// long-running operation.
9544type DdosProtectionPlansDeleteFuture struct {
9545	azure.FutureAPI
9546	// Result returns the result of the asynchronous operation.
9547	// If the operation has not completed it will return an error.
9548	Result func(DdosProtectionPlansClient) (autorest.Response, error)
9549}
9550
9551// DdosSettings contains the DDoS protection settings of the public IP.
9552type DdosSettings struct {
9553	// DdosCustomPolicy - The DDoS custom policy associated with the public IP.
9554	DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"`
9555	// 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'
9556	ProtectionCoverage DdosSettingsProtectionCoverage `json:"protectionCoverage,omitempty"`
9557	// ProtectedIP - Enables DDoS protection on the public IP.
9558	ProtectedIP *bool `json:"protectedIP,omitempty"`
9559}
9560
9561// Delegation details the service to which the subnet is delegated.
9562type Delegation struct {
9563	// ServiceDelegationPropertiesFormat - Properties of the subnet.
9564	*ServiceDelegationPropertiesFormat `json:"properties,omitempty"`
9565	// Name - The name of the resource that is unique within a subnet. This name can be used to access the resource.
9566	Name *string `json:"name,omitempty"`
9567	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9568	Etag *string `json:"etag,omitempty"`
9569	// ID - Resource ID.
9570	ID *string `json:"id,omitempty"`
9571}
9572
9573// MarshalJSON is the custom marshaler for Delegation.
9574func (d Delegation) MarshalJSON() ([]byte, error) {
9575	objectMap := make(map[string]interface{})
9576	if d.ServiceDelegationPropertiesFormat != nil {
9577		objectMap["properties"] = d.ServiceDelegationPropertiesFormat
9578	}
9579	if d.Name != nil {
9580		objectMap["name"] = d.Name
9581	}
9582	if d.ID != nil {
9583		objectMap["id"] = d.ID
9584	}
9585	return json.Marshal(objectMap)
9586}
9587
9588// UnmarshalJSON is the custom unmarshaler for Delegation struct.
9589func (d *Delegation) UnmarshalJSON(body []byte) error {
9590	var m map[string]*json.RawMessage
9591	err := json.Unmarshal(body, &m)
9592	if err != nil {
9593		return err
9594	}
9595	for k, v := range m {
9596		switch k {
9597		case "properties":
9598			if v != nil {
9599				var serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat
9600				err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat)
9601				if err != nil {
9602					return err
9603				}
9604				d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat
9605			}
9606		case "name":
9607			if v != nil {
9608				var name string
9609				err = json.Unmarshal(*v, &name)
9610				if err != nil {
9611					return err
9612				}
9613				d.Name = &name
9614			}
9615		case "etag":
9616			if v != nil {
9617				var etag string
9618				err = json.Unmarshal(*v, &etag)
9619				if err != nil {
9620					return err
9621				}
9622				d.Etag = &etag
9623			}
9624		case "id":
9625			if v != nil {
9626				var ID string
9627				err = json.Unmarshal(*v, &ID)
9628				if err != nil {
9629					return err
9630				}
9631				d.ID = &ID
9632			}
9633		}
9634	}
9635
9636	return nil
9637}
9638
9639// DeleteBastionShareableLinkFuture an abstraction for monitoring and retrieving the results of a
9640// long-running operation.
9641type DeleteBastionShareableLinkFuture struct {
9642	azure.FutureAPI
9643	// Result returns the result of the asynchronous operation.
9644	// If the operation has not completed it will return an error.
9645	Result func(BaseClient) (autorest.Response, error)
9646}
9647
9648// DeviceProperties list of properties of the device.
9649type DeviceProperties struct {
9650	// DeviceVendor - Name of the device Vendor.
9651	DeviceVendor *string `json:"deviceVendor,omitempty"`
9652	// DeviceModel - Model of the device.
9653	DeviceModel *string `json:"deviceModel,omitempty"`
9654	// LinkSpeedInMbps - Link speed.
9655	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
9656}
9657
9658// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
9659// network. Standard DHCP option for a subnet overrides VNET DHCP options.
9660type DhcpOptions struct {
9661	// DNSServers - The list of DNS servers IP addresses.
9662	DNSServers *[]string `json:"dnsServers,omitempty"`
9663}
9664
9665// Dimension dimension of the metric.
9666type Dimension struct {
9667	// Name - The name of the dimension.
9668	Name *string `json:"name,omitempty"`
9669	// DisplayName - The display name of the dimension.
9670	DisplayName *string `json:"displayName,omitempty"`
9671	// InternalName - The internal name of the dimension.
9672	InternalName *string `json:"internalName,omitempty"`
9673}
9674
9675// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
9676type DNSNameAvailabilityResult struct {
9677	autorest.Response `json:"-"`
9678	// Available - Domain availability (True/False).
9679	Available *bool `json:"available,omitempty"`
9680}
9681
9682// DNSSettings DNS Proxy Settings in Firewall Policy.
9683type DNSSettings struct {
9684	// Servers - List of Custom DNS Servers.
9685	Servers *[]string `json:"servers,omitempty"`
9686	// EnableProxy - Enable DNS Proxy on Firewalls attached to the Firewall Policy.
9687	EnableProxy *bool `json:"enableProxy,omitempty"`
9688	// RequireProxyForNetworkRules - FQDNs in Network Rules are supported when set to true.
9689	RequireProxyForNetworkRules *bool `json:"requireProxyForNetworkRules,omitempty"`
9690}
9691
9692// EffectiveNetworkSecurityGroup effective network security group.
9693type EffectiveNetworkSecurityGroup struct {
9694	// NetworkSecurityGroup - The ID of network security group that is applied.
9695	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
9696	// Association - Associated resources.
9697	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
9698	// EffectiveSecurityRules - A collection of effective security rules.
9699	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
9700	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
9701	TagMap map[string][]string `json:"tagMap"`
9702}
9703
9704// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
9705func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
9706	objectMap := make(map[string]interface{})
9707	if ensg.NetworkSecurityGroup != nil {
9708		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
9709	}
9710	if ensg.Association != nil {
9711		objectMap["association"] = ensg.Association
9712	}
9713	if ensg.EffectiveSecurityRules != nil {
9714		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
9715	}
9716	if ensg.TagMap != nil {
9717		objectMap["tagMap"] = ensg.TagMap
9718	}
9719	return json.Marshal(objectMap)
9720}
9721
9722// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
9723type EffectiveNetworkSecurityGroupAssociation struct {
9724	// Subnet - The ID of the subnet if assigned.
9725	Subnet *SubResource `json:"subnet,omitempty"`
9726	// NetworkInterface - The ID of the network interface if assigned.
9727	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
9728}
9729
9730// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
9731// call.
9732type EffectiveNetworkSecurityGroupListResult struct {
9733	autorest.Response `json:"-"`
9734	// Value - A list of effective network security groups.
9735	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
9736	// NextLink - READ-ONLY; The URL to get the next set of results.
9737	NextLink *string `json:"nextLink,omitempty"`
9738}
9739
9740// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
9741func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
9742	objectMap := make(map[string]interface{})
9743	if ensglr.Value != nil {
9744		objectMap["value"] = ensglr.Value
9745	}
9746	return json.Marshal(objectMap)
9747}
9748
9749// EffectiveNetworkSecurityRule effective network security rules.
9750type EffectiveNetworkSecurityRule struct {
9751	// Name - The name of the security rule specified by the user (if created by the user).
9752	Name *string `json:"name,omitempty"`
9753	// Protocol - The network protocol this rule applies to. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
9754	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
9755	// SourcePortRange - The source port or range.
9756	SourcePortRange *string `json:"sourcePortRange,omitempty"`
9757	// DestinationPortRange - The destination port or range.
9758	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
9759	// 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 (*).
9760	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
9761	// 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 (*).
9762	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
9763	// SourceAddressPrefix - The source address prefix.
9764	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
9765	// DestinationAddressPrefix - The destination address prefix.
9766	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
9767	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
9768	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
9769	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
9770	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
9771	// ExpandedSourceAddressPrefix - The expanded source address prefix.
9772	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
9773	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
9774	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
9775	// Access - Whether network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
9776	Access SecurityRuleAccess `json:"access,omitempty"`
9777	// Priority - The priority of the rule.
9778	Priority *int32 `json:"priority,omitempty"`
9779	// Direction - The direction of the rule. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
9780	Direction SecurityRuleDirection `json:"direction,omitempty"`
9781}
9782
9783// EffectiveRoute effective Route.
9784type EffectiveRoute struct {
9785	// Name - The name of the user defined route. This is optional.
9786	Name *string `json:"name,omitempty"`
9787	// DisableBgpRoutePropagation - If true, on-premises routes are not propagated to the network interfaces in the subnet.
9788	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
9789	// Source - Who created the route. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
9790	Source EffectiveRouteSource `json:"source,omitempty"`
9791	// State - The value of effective route. Possible values include: 'Active', 'Invalid'
9792	State EffectiveRouteState `json:"state,omitempty"`
9793	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
9794	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
9795	// NextHopIPAddress - The IP address of the next hop of the effective route.
9796	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
9797	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
9798	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
9799}
9800
9801// EffectiveRouteListResult response for list effective route API service call.
9802type EffectiveRouteListResult struct {
9803	autorest.Response `json:"-"`
9804	// Value - A list of effective routes.
9805	Value *[]EffectiveRoute `json:"value,omitempty"`
9806	// NextLink - READ-ONLY; The URL to get the next set of results.
9807	NextLink *string `json:"nextLink,omitempty"`
9808}
9809
9810// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
9811func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
9812	objectMap := make(map[string]interface{})
9813	if erlr.Value != nil {
9814		objectMap["value"] = erlr.Value
9815	}
9816	return json.Marshal(objectMap)
9817}
9818
9819// EffectiveRoutesParameters the parameters specifying the resource whose effective routes are being
9820// requested.
9821type EffectiveRoutesParameters struct {
9822	// ResourceID - The resource whose effective routes are being requested.
9823	ResourceID *Resource `json:"resourceId,omitempty"`
9824	// VirtualWanResourceType - The type of the specified resource like RouteTable, ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection and P2SConnection.
9825	VirtualWanResourceType *string `json:"virtualWanResourceType,omitempty"`
9826}
9827
9828// EndpointServiceResult endpoint service.
9829type EndpointServiceResult struct {
9830	// Name - READ-ONLY; Name of the endpoint service.
9831	Name *string `json:"name,omitempty"`
9832	// Type - READ-ONLY; Type of the endpoint service.
9833	Type *string `json:"type,omitempty"`
9834	// ID - Resource ID.
9835	ID *string `json:"id,omitempty"`
9836}
9837
9838// MarshalJSON is the custom marshaler for EndpointServiceResult.
9839func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
9840	objectMap := make(map[string]interface{})
9841	if esr.ID != nil {
9842		objectMap["id"] = esr.ID
9843	}
9844	return json.Marshal(objectMap)
9845}
9846
9847// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
9848type EndpointServicesListResult struct {
9849	autorest.Response `json:"-"`
9850	// Value - List of available endpoint services in a region.
9851	Value *[]EndpointServiceResult `json:"value,omitempty"`
9852	// NextLink - The URL to get the next set of results.
9853	NextLink *string `json:"nextLink,omitempty"`
9854}
9855
9856// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
9857// values.
9858type EndpointServicesListResultIterator struct {
9859	i    int
9860	page EndpointServicesListResultPage
9861}
9862
9863// NextWithContext advances to the next value.  If there was an error making
9864// the request the iterator does not advance and the error is returned.
9865func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
9866	if tracing.IsEnabled() {
9867		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
9868		defer func() {
9869			sc := -1
9870			if iter.Response().Response.Response != nil {
9871				sc = iter.Response().Response.Response.StatusCode
9872			}
9873			tracing.EndSpan(ctx, sc, err)
9874		}()
9875	}
9876	iter.i++
9877	if iter.i < len(iter.page.Values()) {
9878		return nil
9879	}
9880	err = iter.page.NextWithContext(ctx)
9881	if err != nil {
9882		iter.i--
9883		return err
9884	}
9885	iter.i = 0
9886	return nil
9887}
9888
9889// Next advances to the next value.  If there was an error making
9890// the request the iterator does not advance and the error is returned.
9891// Deprecated: Use NextWithContext() instead.
9892func (iter *EndpointServicesListResultIterator) Next() error {
9893	return iter.NextWithContext(context.Background())
9894}
9895
9896// NotDone returns true if the enumeration should be started or is not yet complete.
9897func (iter EndpointServicesListResultIterator) NotDone() bool {
9898	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9899}
9900
9901// Response returns the raw server response from the last page request.
9902func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
9903	return iter.page.Response()
9904}
9905
9906// Value returns the current value or a zero-initialized value if the
9907// iterator has advanced beyond the end of the collection.
9908func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
9909	if !iter.page.NotDone() {
9910		return EndpointServiceResult{}
9911	}
9912	return iter.page.Values()[iter.i]
9913}
9914
9915// Creates a new instance of the EndpointServicesListResultIterator type.
9916func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
9917	return EndpointServicesListResultIterator{page: page}
9918}
9919
9920// IsEmpty returns true if the ListResult contains no values.
9921func (eslr EndpointServicesListResult) IsEmpty() bool {
9922	return eslr.Value == nil || len(*eslr.Value) == 0
9923}
9924
9925// hasNextLink returns true if the NextLink is not empty.
9926func (eslr EndpointServicesListResult) hasNextLink() bool {
9927	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
9928}
9929
9930// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
9931// It returns nil if no more results exist.
9932func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
9933	if !eslr.hasNextLink() {
9934		return nil, nil
9935	}
9936	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9937		autorest.AsJSON(),
9938		autorest.AsGet(),
9939		autorest.WithBaseURL(to.String(eslr.NextLink)))
9940}
9941
9942// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
9943type EndpointServicesListResultPage struct {
9944	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
9945	eslr EndpointServicesListResult
9946}
9947
9948// NextWithContext advances to the next page of values.  If there was an error making
9949// the request the page does not advance and the error is returned.
9950func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
9951	if tracing.IsEnabled() {
9952		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
9953		defer func() {
9954			sc := -1
9955			if page.Response().Response.Response != nil {
9956				sc = page.Response().Response.Response.StatusCode
9957			}
9958			tracing.EndSpan(ctx, sc, err)
9959		}()
9960	}
9961	for {
9962		next, err := page.fn(ctx, page.eslr)
9963		if err != nil {
9964			return err
9965		}
9966		page.eslr = next
9967		if !next.hasNextLink() || !next.IsEmpty() {
9968			break
9969		}
9970	}
9971	return nil
9972}
9973
9974// Next advances to the next page of values.  If there was an error making
9975// the request the page does not advance and the error is returned.
9976// Deprecated: Use NextWithContext() instead.
9977func (page *EndpointServicesListResultPage) Next() error {
9978	return page.NextWithContext(context.Background())
9979}
9980
9981// NotDone returns true if the page enumeration should be started or is not yet complete.
9982func (page EndpointServicesListResultPage) NotDone() bool {
9983	return !page.eslr.IsEmpty()
9984}
9985
9986// Response returns the raw server response from the last page request.
9987func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
9988	return page.eslr
9989}
9990
9991// Values returns the slice of values for the current page or nil if there are no values.
9992func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
9993	if page.eslr.IsEmpty() {
9994		return nil
9995	}
9996	return *page.eslr.Value
9997}
9998
9999// Creates a new instance of the EndpointServicesListResultPage type.
10000func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
10001	return EndpointServicesListResultPage{
10002		fn:   getNextPage,
10003		eslr: cur,
10004	}
10005}
10006
10007// Error common error representation.
10008type Error struct {
10009	// Code - Error code.
10010	Code *string `json:"code,omitempty"`
10011	// Message - Error message.
10012	Message *string `json:"message,omitempty"`
10013	// Target - Error target.
10014	Target *string `json:"target,omitempty"`
10015	// Details - Error details.
10016	Details *[]ErrorDetails `json:"details,omitempty"`
10017	// InnerError - Inner error message.
10018	InnerError *string `json:"innerError,omitempty"`
10019}
10020
10021// ErrorDetails common error details representation.
10022type ErrorDetails struct {
10023	// Code - Error code.
10024	Code *string `json:"code,omitempty"`
10025	// Target - Error target.
10026	Target *string `json:"target,omitempty"`
10027	// Message - Error message.
10028	Message *string `json:"message,omitempty"`
10029}
10030
10031// ErrorResponse the error object.
10032type ErrorResponse struct {
10033	// Error - The error details object.
10034	Error *ErrorDetails `json:"error,omitempty"`
10035}
10036
10037// EvaluatedNetworkSecurityGroup results of network security group evaluation.
10038type EvaluatedNetworkSecurityGroup struct {
10039	// NetworkSecurityGroupID - Network security group ID.
10040	NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
10041	// AppliedTo - Resource ID of nic or subnet to which network security group is applied.
10042	AppliedTo *string `json:"appliedTo,omitempty"`
10043	// MatchedRule - Matched network security rule.
10044	MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
10045	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
10046	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
10047}
10048
10049// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
10050func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
10051	objectMap := make(map[string]interface{})
10052	if ensg.NetworkSecurityGroupID != nil {
10053		objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
10054	}
10055	if ensg.AppliedTo != nil {
10056		objectMap["appliedTo"] = ensg.AppliedTo
10057	}
10058	if ensg.MatchedRule != nil {
10059		objectMap["matchedRule"] = ensg.MatchedRule
10060	}
10061	return json.Marshal(objectMap)
10062}
10063
10064// ExpressRouteCircuit expressRouteCircuit resource.
10065type ExpressRouteCircuit struct {
10066	autorest.Response `json:"-"`
10067	// Sku - The SKU.
10068	Sku *ExpressRouteCircuitSku `json:"sku,omitempty"`
10069	// ExpressRouteCircuitPropertiesFormat - Properties of the express route circuit.
10070	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
10071	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10072	Etag *string `json:"etag,omitempty"`
10073	// ID - Resource ID.
10074	ID *string `json:"id,omitempty"`
10075	// Name - READ-ONLY; Resource name.
10076	Name *string `json:"name,omitempty"`
10077	// Type - READ-ONLY; Resource type.
10078	Type *string `json:"type,omitempty"`
10079	// Location - Resource location.
10080	Location *string `json:"location,omitempty"`
10081	// Tags - Resource tags.
10082	Tags map[string]*string `json:"tags"`
10083}
10084
10085// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
10086func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
10087	objectMap := make(map[string]interface{})
10088	if erc.Sku != nil {
10089		objectMap["sku"] = erc.Sku
10090	}
10091	if erc.ExpressRouteCircuitPropertiesFormat != nil {
10092		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
10093	}
10094	if erc.ID != nil {
10095		objectMap["id"] = erc.ID
10096	}
10097	if erc.Location != nil {
10098		objectMap["location"] = erc.Location
10099	}
10100	if erc.Tags != nil {
10101		objectMap["tags"] = erc.Tags
10102	}
10103	return json.Marshal(objectMap)
10104}
10105
10106// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
10107func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
10108	var m map[string]*json.RawMessage
10109	err := json.Unmarshal(body, &m)
10110	if err != nil {
10111		return err
10112	}
10113	for k, v := range m {
10114		switch k {
10115		case "sku":
10116			if v != nil {
10117				var sku ExpressRouteCircuitSku
10118				err = json.Unmarshal(*v, &sku)
10119				if err != nil {
10120					return err
10121				}
10122				erc.Sku = &sku
10123			}
10124		case "properties":
10125			if v != nil {
10126				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
10127				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
10128				if err != nil {
10129					return err
10130				}
10131				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
10132			}
10133		case "etag":
10134			if v != nil {
10135				var etag string
10136				err = json.Unmarshal(*v, &etag)
10137				if err != nil {
10138					return err
10139				}
10140				erc.Etag = &etag
10141			}
10142		case "id":
10143			if v != nil {
10144				var ID string
10145				err = json.Unmarshal(*v, &ID)
10146				if err != nil {
10147					return err
10148				}
10149				erc.ID = &ID
10150			}
10151		case "name":
10152			if v != nil {
10153				var name string
10154				err = json.Unmarshal(*v, &name)
10155				if err != nil {
10156					return err
10157				}
10158				erc.Name = &name
10159			}
10160		case "type":
10161			if v != nil {
10162				var typeVar string
10163				err = json.Unmarshal(*v, &typeVar)
10164				if err != nil {
10165					return err
10166				}
10167				erc.Type = &typeVar
10168			}
10169		case "location":
10170			if v != nil {
10171				var location string
10172				err = json.Unmarshal(*v, &location)
10173				if err != nil {
10174					return err
10175				}
10176				erc.Location = &location
10177			}
10178		case "tags":
10179			if v != nil {
10180				var tags map[string]*string
10181				err = json.Unmarshal(*v, &tags)
10182				if err != nil {
10183					return err
10184				}
10185				erc.Tags = tags
10186			}
10187		}
10188	}
10189
10190	return nil
10191}
10192
10193// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
10194type ExpressRouteCircuitArpTable struct {
10195	// Age - Entry age in minutes.
10196	Age *int32 `json:"age,omitempty"`
10197	// Interface - Interface address.
10198	Interface *string `json:"interface,omitempty"`
10199	// IPAddress - The IP address.
10200	IPAddress *string `json:"ipAddress,omitempty"`
10201	// MacAddress - The MAC address.
10202	MacAddress *string `json:"macAddress,omitempty"`
10203}
10204
10205// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
10206type ExpressRouteCircuitAuthorization struct {
10207	autorest.Response `json:"-"`
10208	// AuthorizationPropertiesFormat - Properties of the express route circuit authorization.
10209	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
10210	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10211	Name *string `json:"name,omitempty"`
10212	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10213	Etag *string `json:"etag,omitempty"`
10214	// Type - READ-ONLY; Type of the resource.
10215	Type *string `json:"type,omitempty"`
10216	// ID - Resource ID.
10217	ID *string `json:"id,omitempty"`
10218}
10219
10220// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
10221func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
10222	objectMap := make(map[string]interface{})
10223	if erca.AuthorizationPropertiesFormat != nil {
10224		objectMap["properties"] = erca.AuthorizationPropertiesFormat
10225	}
10226	if erca.Name != nil {
10227		objectMap["name"] = erca.Name
10228	}
10229	if erca.ID != nil {
10230		objectMap["id"] = erca.ID
10231	}
10232	return json.Marshal(objectMap)
10233}
10234
10235// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
10236func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
10237	var m map[string]*json.RawMessage
10238	err := json.Unmarshal(body, &m)
10239	if err != nil {
10240		return err
10241	}
10242	for k, v := range m {
10243		switch k {
10244		case "properties":
10245			if v != nil {
10246				var authorizationPropertiesFormat AuthorizationPropertiesFormat
10247				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
10248				if err != nil {
10249					return err
10250				}
10251				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
10252			}
10253		case "name":
10254			if v != nil {
10255				var name string
10256				err = json.Unmarshal(*v, &name)
10257				if err != nil {
10258					return err
10259				}
10260				erca.Name = &name
10261			}
10262		case "etag":
10263			if v != nil {
10264				var etag string
10265				err = json.Unmarshal(*v, &etag)
10266				if err != nil {
10267					return err
10268				}
10269				erca.Etag = &etag
10270			}
10271		case "type":
10272			if v != nil {
10273				var typeVar string
10274				err = json.Unmarshal(*v, &typeVar)
10275				if err != nil {
10276					return err
10277				}
10278				erca.Type = &typeVar
10279			}
10280		case "id":
10281			if v != nil {
10282				var ID string
10283				err = json.Unmarshal(*v, &ID)
10284				if err != nil {
10285					return err
10286				}
10287				erca.ID = &ID
10288			}
10289		}
10290	}
10291
10292	return nil
10293}
10294
10295// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
10296// results of a long-running operation.
10297type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
10298	azure.FutureAPI
10299	// Result returns the result of the asynchronous operation.
10300	// If the operation has not completed it will return an error.
10301	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
10302}
10303
10304// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
10305// of a long-running operation.
10306type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
10307	azure.FutureAPI
10308	// Result returns the result of the asynchronous operation.
10309	// If the operation has not completed it will return an error.
10310	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
10311}
10312
10313// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
10314// resource.
10315type ExpressRouteCircuitConnection struct {
10316	autorest.Response `json:"-"`
10317	// ExpressRouteCircuitConnectionPropertiesFormat - Properties of the express route circuit connection.
10318	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
10319	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10320	Name *string `json:"name,omitempty"`
10321	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10322	Etag *string `json:"etag,omitempty"`
10323	// Type - READ-ONLY; Type of the resource.
10324	Type *string `json:"type,omitempty"`
10325	// ID - Resource ID.
10326	ID *string `json:"id,omitempty"`
10327}
10328
10329// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
10330func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
10331	objectMap := make(map[string]interface{})
10332	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
10333		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
10334	}
10335	if ercc.Name != nil {
10336		objectMap["name"] = ercc.Name
10337	}
10338	if ercc.ID != nil {
10339		objectMap["id"] = ercc.ID
10340	}
10341	return json.Marshal(objectMap)
10342}
10343
10344// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
10345func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
10346	var m map[string]*json.RawMessage
10347	err := json.Unmarshal(body, &m)
10348	if err != nil {
10349		return err
10350	}
10351	for k, v := range m {
10352		switch k {
10353		case "properties":
10354			if v != nil {
10355				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
10356				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
10357				if err != nil {
10358					return err
10359				}
10360				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
10361			}
10362		case "name":
10363			if v != nil {
10364				var name string
10365				err = json.Unmarshal(*v, &name)
10366				if err != nil {
10367					return err
10368				}
10369				ercc.Name = &name
10370			}
10371		case "etag":
10372			if v != nil {
10373				var etag string
10374				err = json.Unmarshal(*v, &etag)
10375				if err != nil {
10376					return err
10377				}
10378				ercc.Etag = &etag
10379			}
10380		case "type":
10381			if v != nil {
10382				var typeVar string
10383				err = json.Unmarshal(*v, &typeVar)
10384				if err != nil {
10385					return err
10386				}
10387				ercc.Type = &typeVar
10388			}
10389		case "id":
10390			if v != nil {
10391				var ID string
10392				err = json.Unmarshal(*v, &ID)
10393				if err != nil {
10394					return err
10395				}
10396				ercc.ID = &ID
10397			}
10398		}
10399	}
10400
10401	return nil
10402}
10403
10404// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all
10405// global reach connections that belongs to a Private Peering for an ExpressRouteCircuit.
10406type ExpressRouteCircuitConnectionListResult struct {
10407	autorest.Response `json:"-"`
10408	// Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit.
10409	Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"`
10410	// NextLink - The URL to get the next set of results.
10411	NextLink *string `json:"nextLink,omitempty"`
10412}
10413
10414// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
10415// ExpressRouteCircuitConnection values.
10416type ExpressRouteCircuitConnectionListResultIterator struct {
10417	i    int
10418	page ExpressRouteCircuitConnectionListResultPage
10419}
10420
10421// NextWithContext advances to the next value.  If there was an error making
10422// the request the iterator does not advance and the error is returned.
10423func (iter *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
10424	if tracing.IsEnabled() {
10425		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.NextWithContext")
10426		defer func() {
10427			sc := -1
10428			if iter.Response().Response.Response != nil {
10429				sc = iter.Response().Response.Response.StatusCode
10430			}
10431			tracing.EndSpan(ctx, sc, err)
10432		}()
10433	}
10434	iter.i++
10435	if iter.i < len(iter.page.Values()) {
10436		return nil
10437	}
10438	err = iter.page.NextWithContext(ctx)
10439	if err != nil {
10440		iter.i--
10441		return err
10442	}
10443	iter.i = 0
10444	return nil
10445}
10446
10447// Next advances to the next value.  If there was an error making
10448// the request the iterator does not advance and the error is returned.
10449// Deprecated: Use NextWithContext() instead.
10450func (iter *ExpressRouteCircuitConnectionListResultIterator) Next() error {
10451	return iter.NextWithContext(context.Background())
10452}
10453
10454// NotDone returns true if the enumeration should be started or is not yet complete.
10455func (iter ExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
10456	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10457}
10458
10459// Response returns the raw server response from the last page request.
10460func (iter ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult {
10461	return iter.page.Response()
10462}
10463
10464// Value returns the current value or a zero-initialized value if the
10465// iterator has advanced beyond the end of the collection.
10466func (iter ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection {
10467	if !iter.page.NotDone() {
10468		return ExpressRouteCircuitConnection{}
10469	}
10470	return iter.page.Values()[iter.i]
10471}
10472
10473// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type.
10474func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator {
10475	return ExpressRouteCircuitConnectionListResultIterator{page: page}
10476}
10477
10478// IsEmpty returns true if the ListResult contains no values.
10479func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool {
10480	return ercclr.Value == nil || len(*ercclr.Value) == 0
10481}
10482
10483// hasNextLink returns true if the NextLink is not empty.
10484func (ercclr ExpressRouteCircuitConnectionListResult) hasNextLink() bool {
10485	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
10486}
10487
10488// expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
10489// It returns nil if no more results exist.
10490func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
10491	if !ercclr.hasNextLink() {
10492		return nil, nil
10493	}
10494	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10495		autorest.AsJSON(),
10496		autorest.AsGet(),
10497		autorest.WithBaseURL(to.String(ercclr.NextLink)))
10498}
10499
10500// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values.
10501type ExpressRouteCircuitConnectionListResultPage struct {
10502	fn     func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)
10503	ercclr ExpressRouteCircuitConnectionListResult
10504}
10505
10506// NextWithContext advances to the next page of values.  If there was an error making
10507// the request the page does not advance and the error is returned.
10508func (page *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
10509	if tracing.IsEnabled() {
10510		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.NextWithContext")
10511		defer func() {
10512			sc := -1
10513			if page.Response().Response.Response != nil {
10514				sc = page.Response().Response.Response.StatusCode
10515			}
10516			tracing.EndSpan(ctx, sc, err)
10517		}()
10518	}
10519	for {
10520		next, err := page.fn(ctx, page.ercclr)
10521		if err != nil {
10522			return err
10523		}
10524		page.ercclr = next
10525		if !next.hasNextLink() || !next.IsEmpty() {
10526			break
10527		}
10528	}
10529	return nil
10530}
10531
10532// Next advances to the next page of values.  If there was an error making
10533// the request the page does not advance and the error is returned.
10534// Deprecated: Use NextWithContext() instead.
10535func (page *ExpressRouteCircuitConnectionListResultPage) Next() error {
10536	return page.NextWithContext(context.Background())
10537}
10538
10539// NotDone returns true if the page enumeration should be started or is not yet complete.
10540func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool {
10541	return !page.ercclr.IsEmpty()
10542}
10543
10544// Response returns the raw server response from the last page request.
10545func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult {
10546	return page.ercclr
10547}
10548
10549// Values returns the slice of values for the current page or nil if there are no values.
10550func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection {
10551	if page.ercclr.IsEmpty() {
10552		return nil
10553	}
10554	return *page.ercclr.Value
10555}
10556
10557// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type.
10558func NewExpressRouteCircuitConnectionListResultPage(cur ExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage {
10559	return ExpressRouteCircuitConnectionListResultPage{
10560		fn:     getNextPage,
10561		ercclr: cur,
10562	}
10563}
10564
10565// ExpressRouteCircuitConnectionPropertiesFormat properties of the express route circuit connection.
10566type ExpressRouteCircuitConnectionPropertiesFormat struct {
10567	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
10568	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
10569	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
10570	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
10571	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
10572	AddressPrefix *string `json:"addressPrefix,omitempty"`
10573	// AuthorizationKey - The authorization key.
10574	AuthorizationKey *string `json:"authorizationKey,omitempty"`
10575	// Ipv6CircuitConnectionConfig - IPv6 Address PrefixProperties of the express route circuit connection.
10576	Ipv6CircuitConnectionConfig *Ipv6CircuitConnectionConfig `json:"ipv6CircuitConnectionConfig,omitempty"`
10577	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
10578	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
10579	// ProvisioningState - READ-ONLY; The provisioning state of the express route circuit connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10580	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10581}
10582
10583// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
10584func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
10585	objectMap := make(map[string]interface{})
10586	if erccpf.ExpressRouteCircuitPeering != nil {
10587		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
10588	}
10589	if erccpf.PeerExpressRouteCircuitPeering != nil {
10590		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
10591	}
10592	if erccpf.AddressPrefix != nil {
10593		objectMap["addressPrefix"] = erccpf.AddressPrefix
10594	}
10595	if erccpf.AuthorizationKey != nil {
10596		objectMap["authorizationKey"] = erccpf.AuthorizationKey
10597	}
10598	if erccpf.Ipv6CircuitConnectionConfig != nil {
10599		objectMap["ipv6CircuitConnectionConfig"] = erccpf.Ipv6CircuitConnectionConfig
10600	}
10601	if erccpf.CircuitConnectionStatus != "" {
10602		objectMap["circuitConnectionStatus"] = erccpf.CircuitConnectionStatus
10603	}
10604	return json.Marshal(objectMap)
10605}
10606
10607// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
10608// results of a long-running operation.
10609type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
10610	azure.FutureAPI
10611	// Result returns the result of the asynchronous operation.
10612	// If the operation has not completed it will return an error.
10613	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
10614}
10615
10616// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
10617// long-running operation.
10618type ExpressRouteCircuitConnectionsDeleteFuture struct {
10619	azure.FutureAPI
10620	// Result returns the result of the asynchronous operation.
10621	// If the operation has not completed it will return an error.
10622	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
10623}
10624
10625// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
10626type ExpressRouteCircuitListResult struct {
10627	autorest.Response `json:"-"`
10628	// Value - A list of ExpressRouteCircuits in a resource group.
10629	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
10630	// NextLink - The URL to get the next set of results.
10631	NextLink *string `json:"nextLink,omitempty"`
10632}
10633
10634// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
10635// values.
10636type ExpressRouteCircuitListResultIterator struct {
10637	i    int
10638	page ExpressRouteCircuitListResultPage
10639}
10640
10641// NextWithContext advances to the next value.  If there was an error making
10642// the request the iterator does not advance and the error is returned.
10643func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
10644	if tracing.IsEnabled() {
10645		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
10646		defer func() {
10647			sc := -1
10648			if iter.Response().Response.Response != nil {
10649				sc = iter.Response().Response.Response.StatusCode
10650			}
10651			tracing.EndSpan(ctx, sc, err)
10652		}()
10653	}
10654	iter.i++
10655	if iter.i < len(iter.page.Values()) {
10656		return nil
10657	}
10658	err = iter.page.NextWithContext(ctx)
10659	if err != nil {
10660		iter.i--
10661		return err
10662	}
10663	iter.i = 0
10664	return nil
10665}
10666
10667// Next advances to the next value.  If there was an error making
10668// the request the iterator does not advance and the error is returned.
10669// Deprecated: Use NextWithContext() instead.
10670func (iter *ExpressRouteCircuitListResultIterator) Next() error {
10671	return iter.NextWithContext(context.Background())
10672}
10673
10674// NotDone returns true if the enumeration should be started or is not yet complete.
10675func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
10676	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10677}
10678
10679// Response returns the raw server response from the last page request.
10680func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
10681	return iter.page.Response()
10682}
10683
10684// Value returns the current value or a zero-initialized value if the
10685// iterator has advanced beyond the end of the collection.
10686func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
10687	if !iter.page.NotDone() {
10688		return ExpressRouteCircuit{}
10689	}
10690	return iter.page.Values()[iter.i]
10691}
10692
10693// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
10694func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
10695	return ExpressRouteCircuitListResultIterator{page: page}
10696}
10697
10698// IsEmpty returns true if the ListResult contains no values.
10699func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
10700	return erclr.Value == nil || len(*erclr.Value) == 0
10701}
10702
10703// hasNextLink returns true if the NextLink is not empty.
10704func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
10705	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
10706}
10707
10708// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
10709// It returns nil if no more results exist.
10710func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
10711	if !erclr.hasNextLink() {
10712		return nil, nil
10713	}
10714	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10715		autorest.AsJSON(),
10716		autorest.AsGet(),
10717		autorest.WithBaseURL(to.String(erclr.NextLink)))
10718}
10719
10720// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
10721type ExpressRouteCircuitListResultPage struct {
10722	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
10723	erclr ExpressRouteCircuitListResult
10724}
10725
10726// NextWithContext advances to the next page of values.  If there was an error making
10727// the request the page does not advance and the error is returned.
10728func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
10729	if tracing.IsEnabled() {
10730		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
10731		defer func() {
10732			sc := -1
10733			if page.Response().Response.Response != nil {
10734				sc = page.Response().Response.Response.StatusCode
10735			}
10736			tracing.EndSpan(ctx, sc, err)
10737		}()
10738	}
10739	for {
10740		next, err := page.fn(ctx, page.erclr)
10741		if err != nil {
10742			return err
10743		}
10744		page.erclr = next
10745		if !next.hasNextLink() || !next.IsEmpty() {
10746			break
10747		}
10748	}
10749	return nil
10750}
10751
10752// Next advances to the next page of values.  If there was an error making
10753// the request the page does not advance and the error is returned.
10754// Deprecated: Use NextWithContext() instead.
10755func (page *ExpressRouteCircuitListResultPage) Next() error {
10756	return page.NextWithContext(context.Background())
10757}
10758
10759// NotDone returns true if the page enumeration should be started or is not yet complete.
10760func (page ExpressRouteCircuitListResultPage) NotDone() bool {
10761	return !page.erclr.IsEmpty()
10762}
10763
10764// Response returns the raw server response from the last page request.
10765func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
10766	return page.erclr
10767}
10768
10769// Values returns the slice of values for the current page or nil if there are no values.
10770func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
10771	if page.erclr.IsEmpty() {
10772		return nil
10773	}
10774	return *page.erclr.Value
10775}
10776
10777// Creates a new instance of the ExpressRouteCircuitListResultPage type.
10778func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
10779	return ExpressRouteCircuitListResultPage{
10780		fn:    getNextPage,
10781		erclr: cur,
10782	}
10783}
10784
10785// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
10786type ExpressRouteCircuitPeering struct {
10787	autorest.Response `json:"-"`
10788	// ExpressRouteCircuitPeeringPropertiesFormat - Properties of the express route circuit peering.
10789	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
10790	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10791	Name *string `json:"name,omitempty"`
10792	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10793	Etag *string `json:"etag,omitempty"`
10794	// Type - READ-ONLY; Type of the resource.
10795	Type *string `json:"type,omitempty"`
10796	// ID - Resource ID.
10797	ID *string `json:"id,omitempty"`
10798}
10799
10800// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
10801func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
10802	objectMap := make(map[string]interface{})
10803	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
10804		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
10805	}
10806	if ercp.Name != nil {
10807		objectMap["name"] = ercp.Name
10808	}
10809	if ercp.ID != nil {
10810		objectMap["id"] = ercp.ID
10811	}
10812	return json.Marshal(objectMap)
10813}
10814
10815// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
10816func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
10817	var m map[string]*json.RawMessage
10818	err := json.Unmarshal(body, &m)
10819	if err != nil {
10820		return err
10821	}
10822	for k, v := range m {
10823		switch k {
10824		case "properties":
10825			if v != nil {
10826				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
10827				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
10828				if err != nil {
10829					return err
10830				}
10831				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
10832			}
10833		case "name":
10834			if v != nil {
10835				var name string
10836				err = json.Unmarshal(*v, &name)
10837				if err != nil {
10838					return err
10839				}
10840				ercp.Name = &name
10841			}
10842		case "etag":
10843			if v != nil {
10844				var etag string
10845				err = json.Unmarshal(*v, &etag)
10846				if err != nil {
10847					return err
10848				}
10849				ercp.Etag = &etag
10850			}
10851		case "type":
10852			if v != nil {
10853				var typeVar string
10854				err = json.Unmarshal(*v, &typeVar)
10855				if err != nil {
10856					return err
10857				}
10858				ercp.Type = &typeVar
10859			}
10860		case "id":
10861			if v != nil {
10862				var ID string
10863				err = json.Unmarshal(*v, &ID)
10864				if err != nil {
10865					return err
10866				}
10867				ercp.ID = &ID
10868			}
10869		}
10870	}
10871
10872	return nil
10873}
10874
10875// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
10876type ExpressRouteCircuitPeeringConfig struct {
10877	// AdvertisedPublicPrefixes - The reference to AdvertisedPublicPrefixes.
10878	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
10879	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering.
10880	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
10881	// AdvertisedPublicPrefixesState - READ-ONLY; The advertised public prefix state of the Peering resource. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
10882	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
10883	// LegacyMode - The legacy mode of the peering.
10884	LegacyMode *int32 `json:"legacyMode,omitempty"`
10885	// CustomerASN - The CustomerASN of the peering.
10886	CustomerASN *int32 `json:"customerASN,omitempty"`
10887	// RoutingRegistryName - The RoutingRegistryName of the configuration.
10888	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
10889}
10890
10891// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringConfig.
10892func (ercpc ExpressRouteCircuitPeeringConfig) MarshalJSON() ([]byte, error) {
10893	objectMap := make(map[string]interface{})
10894	if ercpc.AdvertisedPublicPrefixes != nil {
10895		objectMap["advertisedPublicPrefixes"] = ercpc.AdvertisedPublicPrefixes
10896	}
10897	if ercpc.AdvertisedCommunities != nil {
10898		objectMap["advertisedCommunities"] = ercpc.AdvertisedCommunities
10899	}
10900	if ercpc.LegacyMode != nil {
10901		objectMap["legacyMode"] = ercpc.LegacyMode
10902	}
10903	if ercpc.CustomerASN != nil {
10904		objectMap["customerASN"] = ercpc.CustomerASN
10905	}
10906	if ercpc.RoutingRegistryName != nil {
10907		objectMap["routingRegistryName"] = ercpc.RoutingRegistryName
10908	}
10909	return json.Marshal(objectMap)
10910}
10911
10912// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier.
10913type ExpressRouteCircuitPeeringID struct {
10914	// ID - The ID of the ExpressRoute circuit peering.
10915	ID *string `json:"id,omitempty"`
10916}
10917
10918// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
10919// that belong to an ExpressRouteCircuit.
10920type ExpressRouteCircuitPeeringListResult struct {
10921	autorest.Response `json:"-"`
10922	// Value - The peerings in an express route circuit.
10923	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
10924	// NextLink - The URL to get the next set of results.
10925	NextLink *string `json:"nextLink,omitempty"`
10926}
10927
10928// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
10929// ExpressRouteCircuitPeering values.
10930type ExpressRouteCircuitPeeringListResultIterator struct {
10931	i    int
10932	page ExpressRouteCircuitPeeringListResultPage
10933}
10934
10935// NextWithContext advances to the next value.  If there was an error making
10936// the request the iterator does not advance and the error is returned.
10937func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
10938	if tracing.IsEnabled() {
10939		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
10940		defer func() {
10941			sc := -1
10942			if iter.Response().Response.Response != nil {
10943				sc = iter.Response().Response.Response.StatusCode
10944			}
10945			tracing.EndSpan(ctx, sc, err)
10946		}()
10947	}
10948	iter.i++
10949	if iter.i < len(iter.page.Values()) {
10950		return nil
10951	}
10952	err = iter.page.NextWithContext(ctx)
10953	if err != nil {
10954		iter.i--
10955		return err
10956	}
10957	iter.i = 0
10958	return nil
10959}
10960
10961// Next advances to the next value.  If there was an error making
10962// the request the iterator does not advance and the error is returned.
10963// Deprecated: Use NextWithContext() instead.
10964func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
10965	return iter.NextWithContext(context.Background())
10966}
10967
10968// NotDone returns true if the enumeration should be started or is not yet complete.
10969func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
10970	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10971}
10972
10973// Response returns the raw server response from the last page request.
10974func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
10975	return iter.page.Response()
10976}
10977
10978// Value returns the current value or a zero-initialized value if the
10979// iterator has advanced beyond the end of the collection.
10980func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
10981	if !iter.page.NotDone() {
10982		return ExpressRouteCircuitPeering{}
10983	}
10984	return iter.page.Values()[iter.i]
10985}
10986
10987// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
10988func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
10989	return ExpressRouteCircuitPeeringListResultIterator{page: page}
10990}
10991
10992// IsEmpty returns true if the ListResult contains no values.
10993func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
10994	return ercplr.Value == nil || len(*ercplr.Value) == 0
10995}
10996
10997// hasNextLink returns true if the NextLink is not empty.
10998func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
10999	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
11000}
11001
11002// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
11003// It returns nil if no more results exist.
11004func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
11005	if !ercplr.hasNextLink() {
11006		return nil, nil
11007	}
11008	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11009		autorest.AsJSON(),
11010		autorest.AsGet(),
11011		autorest.WithBaseURL(to.String(ercplr.NextLink)))
11012}
11013
11014// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
11015type ExpressRouteCircuitPeeringListResultPage struct {
11016	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
11017	ercplr ExpressRouteCircuitPeeringListResult
11018}
11019
11020// NextWithContext advances to the next page of values.  If there was an error making
11021// the request the page does not advance and the error is returned.
11022func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
11023	if tracing.IsEnabled() {
11024		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
11025		defer func() {
11026			sc := -1
11027			if page.Response().Response.Response != nil {
11028				sc = page.Response().Response.Response.StatusCode
11029			}
11030			tracing.EndSpan(ctx, sc, err)
11031		}()
11032	}
11033	for {
11034		next, err := page.fn(ctx, page.ercplr)
11035		if err != nil {
11036			return err
11037		}
11038		page.ercplr = next
11039		if !next.hasNextLink() || !next.IsEmpty() {
11040			break
11041		}
11042	}
11043	return nil
11044}
11045
11046// Next advances to the next page of values.  If there was an error making
11047// the request the page does not advance and the error is returned.
11048// Deprecated: Use NextWithContext() instead.
11049func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
11050	return page.NextWithContext(context.Background())
11051}
11052
11053// NotDone returns true if the page enumeration should be started or is not yet complete.
11054func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
11055	return !page.ercplr.IsEmpty()
11056}
11057
11058// Response returns the raw server response from the last page request.
11059func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
11060	return page.ercplr
11061}
11062
11063// Values returns the slice of values for the current page or nil if there are no values.
11064func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
11065	if page.ercplr.IsEmpty() {
11066		return nil
11067	}
11068	return *page.ercplr.Value
11069}
11070
11071// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
11072func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
11073	return ExpressRouteCircuitPeeringListResultPage{
11074		fn:     getNextPage,
11075		ercplr: cur,
11076	}
11077}
11078
11079// ExpressRouteCircuitPeeringPropertiesFormat properties of the express route circuit peering.
11080type ExpressRouteCircuitPeeringPropertiesFormat struct {
11081	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
11082	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
11083	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
11084	State ExpressRoutePeeringState `json:"state,omitempty"`
11085	// AzureASN - The Azure ASN.
11086	AzureASN *int32 `json:"azureASN,omitempty"`
11087	// PeerASN - The peer ASN.
11088	PeerASN *int64 `json:"peerASN,omitempty"`
11089	// PrimaryPeerAddressPrefix - The primary address prefix.
11090	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
11091	// SecondaryPeerAddressPrefix - The secondary address prefix.
11092	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
11093	// PrimaryAzurePort - The primary port.
11094	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
11095	// SecondaryAzurePort - The secondary port.
11096	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
11097	// SharedKey - The shared key.
11098	SharedKey *string `json:"sharedKey,omitempty"`
11099	// VlanID - The VLAN ID.
11100	VlanID *int32 `json:"vlanId,omitempty"`
11101	// MicrosoftPeeringConfig - The Microsoft peering configuration.
11102	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
11103	// Stats - The peering stats of express route circuit.
11104	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
11105	// ProvisioningState - READ-ONLY; The provisioning state of the express route circuit peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
11106	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11107	// GatewayManagerEtag - The GatewayManager Etag.
11108	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
11109	// LastModifiedBy - READ-ONLY; Who was the last to modify the peering.
11110	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
11111	// RouteFilter - The reference to the RouteFilter resource.
11112	RouteFilter *SubResource `json:"routeFilter,omitempty"`
11113	// Ipv6PeeringConfig - The IPv6 peering configuration.
11114	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
11115	// ExpressRouteConnection - The ExpressRoute connection.
11116	ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"`
11117	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
11118	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
11119	// PeeredConnections - READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit.
11120	PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"`
11121}
11122
11123// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringPropertiesFormat.
11124func (ercppf ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
11125	objectMap := make(map[string]interface{})
11126	if ercppf.PeeringType != "" {
11127		objectMap["peeringType"] = ercppf.PeeringType
11128	}
11129	if ercppf.State != "" {
11130		objectMap["state"] = ercppf.State
11131	}
11132	if ercppf.AzureASN != nil {
11133		objectMap["azureASN"] = ercppf.AzureASN
11134	}
11135	if ercppf.PeerASN != nil {
11136		objectMap["peerASN"] = ercppf.PeerASN
11137	}
11138	if ercppf.PrimaryPeerAddressPrefix != nil {
11139		objectMap["primaryPeerAddressPrefix"] = ercppf.PrimaryPeerAddressPrefix
11140	}
11141	if ercppf.SecondaryPeerAddressPrefix != nil {
11142		objectMap["secondaryPeerAddressPrefix"] = ercppf.SecondaryPeerAddressPrefix
11143	}
11144	if ercppf.PrimaryAzurePort != nil {
11145		objectMap["primaryAzurePort"] = ercppf.PrimaryAzurePort
11146	}
11147	if ercppf.SecondaryAzurePort != nil {
11148		objectMap["secondaryAzurePort"] = ercppf.SecondaryAzurePort
11149	}
11150	if ercppf.SharedKey != nil {
11151		objectMap["sharedKey"] = ercppf.SharedKey
11152	}
11153	if ercppf.VlanID != nil {
11154		objectMap["vlanId"] = ercppf.VlanID
11155	}
11156	if ercppf.MicrosoftPeeringConfig != nil {
11157		objectMap["microsoftPeeringConfig"] = ercppf.MicrosoftPeeringConfig
11158	}
11159	if ercppf.Stats != nil {
11160		objectMap["stats"] = ercppf.Stats
11161	}
11162	if ercppf.GatewayManagerEtag != nil {
11163		objectMap["gatewayManagerEtag"] = ercppf.GatewayManagerEtag
11164	}
11165	if ercppf.RouteFilter != nil {
11166		objectMap["routeFilter"] = ercppf.RouteFilter
11167	}
11168	if ercppf.Ipv6PeeringConfig != nil {
11169		objectMap["ipv6PeeringConfig"] = ercppf.Ipv6PeeringConfig
11170	}
11171	if ercppf.ExpressRouteConnection != nil {
11172		objectMap["expressRouteConnection"] = ercppf.ExpressRouteConnection
11173	}
11174	if ercppf.Connections != nil {
11175		objectMap["connections"] = ercppf.Connections
11176	}
11177	return json.Marshal(objectMap)
11178}
11179
11180// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
11181// of a long-running operation.
11182type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
11183	azure.FutureAPI
11184	// Result returns the result of the asynchronous operation.
11185	// If the operation has not completed it will return an error.
11186	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
11187}
11188
11189// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
11190// long-running operation.
11191type ExpressRouteCircuitPeeringsDeleteFuture struct {
11192	azure.FutureAPI
11193	// Result returns the result of the asynchronous operation.
11194	// If the operation has not completed it will return an error.
11195	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
11196}
11197
11198// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
11199type ExpressRouteCircuitPropertiesFormat struct {
11200	// AllowClassicOperations - Allow classic operations.
11201	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
11202	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
11203	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
11204	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
11205	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
11206	// Authorizations - The list of authorizations.
11207	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
11208	// Peerings - The list of peerings.
11209	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
11210	// ServiceKey - The ServiceKey.
11211	ServiceKey *string `json:"serviceKey,omitempty"`
11212	// ServiceProviderNotes - The ServiceProviderNotes.
11213	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
11214	// ServiceProviderProperties - The ServiceProviderProperties.
11215	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
11216	// ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.
11217	ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"`
11218	// BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.
11219	BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"`
11220	// Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation.
11221	Stag *int32 `json:"stag,omitempty"`
11222	// ProvisioningState - READ-ONLY; The provisioning state of the express route circuit resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
11223	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11224	// GatewayManagerEtag - The GatewayManager Etag.
11225	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
11226	// GlobalReachEnabled - Flag denoting global reach status.
11227	GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"`
11228}
11229
11230// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat.
11231func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) {
11232	objectMap := make(map[string]interface{})
11233	if ercpf.AllowClassicOperations != nil {
11234		objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations
11235	}
11236	if ercpf.CircuitProvisioningState != nil {
11237		objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState
11238	}
11239	if ercpf.ServiceProviderProvisioningState != "" {
11240		objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState
11241	}
11242	if ercpf.Authorizations != nil {
11243		objectMap["authorizations"] = ercpf.Authorizations
11244	}
11245	if ercpf.Peerings != nil {
11246		objectMap["peerings"] = ercpf.Peerings
11247	}
11248	if ercpf.ServiceKey != nil {
11249		objectMap["serviceKey"] = ercpf.ServiceKey
11250	}
11251	if ercpf.ServiceProviderNotes != nil {
11252		objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes
11253	}
11254	if ercpf.ServiceProviderProperties != nil {
11255		objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties
11256	}
11257	if ercpf.ExpressRoutePort != nil {
11258		objectMap["expressRoutePort"] = ercpf.ExpressRoutePort
11259	}
11260	if ercpf.BandwidthInGbps != nil {
11261		objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps
11262	}
11263	if ercpf.GatewayManagerEtag != nil {
11264		objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag
11265	}
11266	if ercpf.GlobalReachEnabled != nil {
11267		objectMap["globalReachEnabled"] = ercpf.GlobalReachEnabled
11268	}
11269	return json.Marshal(objectMap)
11270}
11271
11272// ExpressRouteCircuitReference reference to an express route circuit.
11273type ExpressRouteCircuitReference struct {
11274	// ID - Corresponding Express Route Circuit Id.
11275	ID *string `json:"id,omitempty"`
11276}
11277
11278// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit.
11279type ExpressRouteCircuitRoutesTable struct {
11280	// NetworkProperty - IP address of a network entity.
11281	NetworkProperty *string `json:"network,omitempty"`
11282	// NextHop - NextHop address.
11283	NextHop *string `json:"nextHop,omitempty"`
11284	// LocPrf - Local preference value as set with the set local-preference route-map configuration command.
11285	LocPrf *string `json:"locPrf,omitempty"`
11286	// Weight - Route Weight.
11287	Weight *int32 `json:"weight,omitempty"`
11288	// Path - Autonomous system paths to the destination network.
11289	Path *string `json:"path,omitempty"`
11290}
11291
11292// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
11293type ExpressRouteCircuitRoutesTableSummary struct {
11294	// Neighbor - IP address of the neighbor.
11295	Neighbor *string `json:"neighbor,omitempty"`
11296	// V - BGP version number spoken to the neighbor.
11297	V *int32 `json:"v,omitempty"`
11298	// As - Autonomous system number.
11299	As *int32 `json:"as,omitempty"`
11300	// 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.
11301	UpDown *string `json:"upDown,omitempty"`
11302	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
11303	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
11304}
11305
11306// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
11307// Circuits API.
11308type ExpressRouteCircuitsArpTableListResult struct {
11309	autorest.Response `json:"-"`
11310	// Value - A list of the ARP tables.
11311	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
11312	// NextLink - The URL to get the next set of results.
11313	NextLink *string `json:"nextLink,omitempty"`
11314}
11315
11316// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11317// long-running operation.
11318type ExpressRouteCircuitsCreateOrUpdateFuture struct {
11319	azure.FutureAPI
11320	// Result returns the result of the asynchronous operation.
11321	// If the operation has not completed it will return an error.
11322	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
11323}
11324
11325// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
11326// long-running operation.
11327type ExpressRouteCircuitsDeleteFuture struct {
11328	azure.FutureAPI
11329	// Result returns the result of the asynchronous operation.
11330	// If the operation has not completed it will return an error.
11331	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
11332}
11333
11334// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
11335// ExpressRouteCircuit.
11336type ExpressRouteCircuitServiceProviderProperties struct {
11337	// ServiceProviderName - The serviceProviderName.
11338	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
11339	// PeeringLocation - The peering location.
11340	PeeringLocation *string `json:"peeringLocation,omitempty"`
11341	// BandwidthInMbps - The BandwidthInMbps.
11342	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
11343}
11344
11345// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
11346type ExpressRouteCircuitSku struct {
11347	// Name - The name of the SKU.
11348	Name *string `json:"name,omitempty"`
11349	// Tier - The tier of the SKU. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic', 'ExpressRouteCircuitSkuTierLocal'
11350	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
11351	// Family - The family of the SKU. Possible values include: 'UnlimitedData', 'MeteredData'
11352	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
11353}
11354
11355// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
11356// long-running operation.
11357type ExpressRouteCircuitsListArpTableFuture 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) (ExpressRouteCircuitsArpTableListResult, error)
11362}
11363
11364// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
11365// long-running operation.
11366type ExpressRouteCircuitsListRoutesTableFuture struct {
11367	azure.FutureAPI
11368	// Result returns the result of the asynchronous operation.
11369	// If the operation has not completed it will return an error.
11370	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
11371}
11372
11373// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
11374// results of a long-running operation.
11375type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
11376	azure.FutureAPI
11377	// Result returns the result of the asynchronous operation.
11378	// If the operation has not completed it will return an error.
11379	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
11380}
11381
11382// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
11383// Circuits API.
11384type ExpressRouteCircuitsRoutesTableListResult struct {
11385	autorest.Response `json:"-"`
11386	// Value - The list of routes table.
11387	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
11388	// NextLink - The URL to get the next set of results.
11389	NextLink *string `json:"nextLink,omitempty"`
11390}
11391
11392// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
11393// Express Route Circuits API.
11394type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
11395	autorest.Response `json:"-"`
11396	// Value - A list of the routes table.
11397	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
11398	// NextLink - The URL to get the next set of results.
11399	NextLink *string `json:"nextLink,omitempty"`
11400}
11401
11402// ExpressRouteCircuitStats contains stats associated with the peering.
11403type ExpressRouteCircuitStats struct {
11404	autorest.Response `json:"-"`
11405	// PrimarybytesIn - The Primary BytesIn of the peering.
11406	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
11407	// PrimarybytesOut - The primary BytesOut of the peering.
11408	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
11409	// SecondarybytesIn - The secondary BytesIn of the peering.
11410	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
11411	// SecondarybytesOut - The secondary BytesOut of the peering.
11412	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
11413}
11414
11415// ExpressRouteConnection expressRouteConnection resource.
11416type ExpressRouteConnection struct {
11417	autorest.Response `json:"-"`
11418	// ExpressRouteConnectionProperties - Properties of the express route connection.
11419	*ExpressRouteConnectionProperties `json:"properties,omitempty"`
11420	// Name - The name of the resource.
11421	Name *string `json:"name,omitempty"`
11422	// ID - Resource ID.
11423	ID *string `json:"id,omitempty"`
11424}
11425
11426// MarshalJSON is the custom marshaler for ExpressRouteConnection.
11427func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) {
11428	objectMap := make(map[string]interface{})
11429	if erc.ExpressRouteConnectionProperties != nil {
11430		objectMap["properties"] = erc.ExpressRouteConnectionProperties
11431	}
11432	if erc.Name != nil {
11433		objectMap["name"] = erc.Name
11434	}
11435	if erc.ID != nil {
11436		objectMap["id"] = erc.ID
11437	}
11438	return json.Marshal(objectMap)
11439}
11440
11441// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct.
11442func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error {
11443	var m map[string]*json.RawMessage
11444	err := json.Unmarshal(body, &m)
11445	if err != nil {
11446		return err
11447	}
11448	for k, v := range m {
11449		switch k {
11450		case "properties":
11451			if v != nil {
11452				var expressRouteConnectionProperties ExpressRouteConnectionProperties
11453				err = json.Unmarshal(*v, &expressRouteConnectionProperties)
11454				if err != nil {
11455					return err
11456				}
11457				erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties
11458			}
11459		case "name":
11460			if v != nil {
11461				var name string
11462				err = json.Unmarshal(*v, &name)
11463				if err != nil {
11464					return err
11465				}
11466				erc.Name = &name
11467			}
11468		case "id":
11469			if v != nil {
11470				var ID string
11471				err = json.Unmarshal(*v, &ID)
11472				if err != nil {
11473					return err
11474				}
11475				erc.ID = &ID
11476			}
11477		}
11478	}
11479
11480	return nil
11481}
11482
11483// ExpressRouteConnectionID the ID of the ExpressRouteConnection.
11484type ExpressRouteConnectionID struct {
11485	// ID - READ-ONLY; The ID of the ExpressRouteConnection.
11486	ID *string `json:"id,omitempty"`
11487}
11488
11489// ExpressRouteConnectionList expressRouteConnection list.
11490type ExpressRouteConnectionList struct {
11491	autorest.Response `json:"-"`
11492	// Value - The list of ExpressRoute connections.
11493	Value *[]ExpressRouteConnection `json:"value,omitempty"`
11494}
11495
11496// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource.
11497type ExpressRouteConnectionProperties struct {
11498	// ProvisioningState - READ-ONLY; The provisioning state of the express route connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
11499	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11500	// ExpressRouteCircuitPeering - The ExpressRoute circuit peering.
11501	ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"`
11502	// AuthorizationKey - Authorization key to establish the connection.
11503	AuthorizationKey *string `json:"authorizationKey,omitempty"`
11504	// RoutingWeight - The routing weight associated to the connection.
11505	RoutingWeight *int32 `json:"routingWeight,omitempty"`
11506	// EnableInternetSecurity - Enable internet security.
11507	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
11508	// RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection.
11509	RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"`
11510}
11511
11512// MarshalJSON is the custom marshaler for ExpressRouteConnectionProperties.
11513func (ercp ExpressRouteConnectionProperties) MarshalJSON() ([]byte, error) {
11514	objectMap := make(map[string]interface{})
11515	if ercp.ExpressRouteCircuitPeering != nil {
11516		objectMap["expressRouteCircuitPeering"] = ercp.ExpressRouteCircuitPeering
11517	}
11518	if ercp.AuthorizationKey != nil {
11519		objectMap["authorizationKey"] = ercp.AuthorizationKey
11520	}
11521	if ercp.RoutingWeight != nil {
11522		objectMap["routingWeight"] = ercp.RoutingWeight
11523	}
11524	if ercp.EnableInternetSecurity != nil {
11525		objectMap["enableInternetSecurity"] = ercp.EnableInternetSecurity
11526	}
11527	if ercp.RoutingConfiguration != nil {
11528		objectMap["routingConfiguration"] = ercp.RoutingConfiguration
11529	}
11530	return json.Marshal(objectMap)
11531}
11532
11533// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
11534// a long-running operation.
11535type ExpressRouteConnectionsCreateOrUpdateFuture struct {
11536	azure.FutureAPI
11537	// Result returns the result of the asynchronous operation.
11538	// If the operation has not completed it will return an error.
11539	Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error)
11540}
11541
11542// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
11543// long-running operation.
11544type ExpressRouteConnectionsDeleteFuture struct {
11545	azure.FutureAPI
11546	// Result returns the result of the asynchronous operation.
11547	// If the operation has not completed it will return an error.
11548	Result func(ExpressRouteConnectionsClient) (autorest.Response, error)
11549}
11550
11551// ExpressRouteCrossConnection expressRouteCrossConnection resource.
11552type ExpressRouteCrossConnection struct {
11553	autorest.Response `json:"-"`
11554	// ExpressRouteCrossConnectionProperties - Properties of the express route cross connection.
11555	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
11556	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11557	Etag *string `json:"etag,omitempty"`
11558	// ID - Resource ID.
11559	ID *string `json:"id,omitempty"`
11560	// Name - READ-ONLY; Resource name.
11561	Name *string `json:"name,omitempty"`
11562	// Type - READ-ONLY; Resource type.
11563	Type *string `json:"type,omitempty"`
11564	// Location - Resource location.
11565	Location *string `json:"location,omitempty"`
11566	// Tags - Resource tags.
11567	Tags map[string]*string `json:"tags"`
11568}
11569
11570// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
11571func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
11572	objectMap := make(map[string]interface{})
11573	if ercc.ExpressRouteCrossConnectionProperties != nil {
11574		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
11575	}
11576	if ercc.ID != nil {
11577		objectMap["id"] = ercc.ID
11578	}
11579	if ercc.Location != nil {
11580		objectMap["location"] = ercc.Location
11581	}
11582	if ercc.Tags != nil {
11583		objectMap["tags"] = ercc.Tags
11584	}
11585	return json.Marshal(objectMap)
11586}
11587
11588// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
11589func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
11590	var m map[string]*json.RawMessage
11591	err := json.Unmarshal(body, &m)
11592	if err != nil {
11593		return err
11594	}
11595	for k, v := range m {
11596		switch k {
11597		case "properties":
11598			if v != nil {
11599				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
11600				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
11601				if err != nil {
11602					return err
11603				}
11604				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
11605			}
11606		case "etag":
11607			if v != nil {
11608				var etag string
11609				err = json.Unmarshal(*v, &etag)
11610				if err != nil {
11611					return err
11612				}
11613				ercc.Etag = &etag
11614			}
11615		case "id":
11616			if v != nil {
11617				var ID string
11618				err = json.Unmarshal(*v, &ID)
11619				if err != nil {
11620					return err
11621				}
11622				ercc.ID = &ID
11623			}
11624		case "name":
11625			if v != nil {
11626				var name string
11627				err = json.Unmarshal(*v, &name)
11628				if err != nil {
11629					return err
11630				}
11631				ercc.Name = &name
11632			}
11633		case "type":
11634			if v != nil {
11635				var typeVar string
11636				err = json.Unmarshal(*v, &typeVar)
11637				if err != nil {
11638					return err
11639				}
11640				ercc.Type = &typeVar
11641			}
11642		case "location":
11643			if v != nil {
11644				var location string
11645				err = json.Unmarshal(*v, &location)
11646				if err != nil {
11647					return err
11648				}
11649				ercc.Location = &location
11650			}
11651		case "tags":
11652			if v != nil {
11653				var tags map[string]*string
11654				err = json.Unmarshal(*v, &tags)
11655				if err != nil {
11656					return err
11657				}
11658				ercc.Tags = tags
11659			}
11660		}
11661	}
11662
11663	return nil
11664}
11665
11666// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
11667type ExpressRouteCrossConnectionListResult struct {
11668	autorest.Response `json:"-"`
11669	// Value - A list of ExpressRouteCrossConnection resources.
11670	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
11671	// NextLink - READ-ONLY; The URL to get the next set of results.
11672	NextLink *string `json:"nextLink,omitempty"`
11673}
11674
11675// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
11676func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
11677	objectMap := make(map[string]interface{})
11678	if ercclr.Value != nil {
11679		objectMap["value"] = ercclr.Value
11680	}
11681	return json.Marshal(objectMap)
11682}
11683
11684// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
11685// ExpressRouteCrossConnection values.
11686type ExpressRouteCrossConnectionListResultIterator struct {
11687	i    int
11688	page ExpressRouteCrossConnectionListResultPage
11689}
11690
11691// NextWithContext advances to the next value.  If there was an error making
11692// the request the iterator does not advance and the error is returned.
11693func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
11694	if tracing.IsEnabled() {
11695		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
11696		defer func() {
11697			sc := -1
11698			if iter.Response().Response.Response != nil {
11699				sc = iter.Response().Response.Response.StatusCode
11700			}
11701			tracing.EndSpan(ctx, sc, err)
11702		}()
11703	}
11704	iter.i++
11705	if iter.i < len(iter.page.Values()) {
11706		return nil
11707	}
11708	err = iter.page.NextWithContext(ctx)
11709	if err != nil {
11710		iter.i--
11711		return err
11712	}
11713	iter.i = 0
11714	return nil
11715}
11716
11717// Next advances to the next value.  If there was an error making
11718// the request the iterator does not advance and the error is returned.
11719// Deprecated: Use NextWithContext() instead.
11720func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
11721	return iter.NextWithContext(context.Background())
11722}
11723
11724// NotDone returns true if the enumeration should be started or is not yet complete.
11725func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
11726	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11727}
11728
11729// Response returns the raw server response from the last page request.
11730func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
11731	return iter.page.Response()
11732}
11733
11734// Value returns the current value or a zero-initialized value if the
11735// iterator has advanced beyond the end of the collection.
11736func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
11737	if !iter.page.NotDone() {
11738		return ExpressRouteCrossConnection{}
11739	}
11740	return iter.page.Values()[iter.i]
11741}
11742
11743// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
11744func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
11745	return ExpressRouteCrossConnectionListResultIterator{page: page}
11746}
11747
11748// IsEmpty returns true if the ListResult contains no values.
11749func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
11750	return ercclr.Value == nil || len(*ercclr.Value) == 0
11751}
11752
11753// hasNextLink returns true if the NextLink is not empty.
11754func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
11755	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
11756}
11757
11758// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
11759// It returns nil if no more results exist.
11760func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
11761	if !ercclr.hasNextLink() {
11762		return nil, nil
11763	}
11764	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11765		autorest.AsJSON(),
11766		autorest.AsGet(),
11767		autorest.WithBaseURL(to.String(ercclr.NextLink)))
11768}
11769
11770// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
11771type ExpressRouteCrossConnectionListResultPage struct {
11772	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
11773	ercclr ExpressRouteCrossConnectionListResult
11774}
11775
11776// NextWithContext advances to the next page of values.  If there was an error making
11777// the request the page does not advance and the error is returned.
11778func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
11779	if tracing.IsEnabled() {
11780		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
11781		defer func() {
11782			sc := -1
11783			if page.Response().Response.Response != nil {
11784				sc = page.Response().Response.Response.StatusCode
11785			}
11786			tracing.EndSpan(ctx, sc, err)
11787		}()
11788	}
11789	for {
11790		next, err := page.fn(ctx, page.ercclr)
11791		if err != nil {
11792			return err
11793		}
11794		page.ercclr = next
11795		if !next.hasNextLink() || !next.IsEmpty() {
11796			break
11797		}
11798	}
11799	return nil
11800}
11801
11802// Next advances to the next page of values.  If there was an error making
11803// the request the page does not advance and the error is returned.
11804// Deprecated: Use NextWithContext() instead.
11805func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
11806	return page.NextWithContext(context.Background())
11807}
11808
11809// NotDone returns true if the page enumeration should be started or is not yet complete.
11810func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
11811	return !page.ercclr.IsEmpty()
11812}
11813
11814// Response returns the raw server response from the last page request.
11815func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
11816	return page.ercclr
11817}
11818
11819// Values returns the slice of values for the current page or nil if there are no values.
11820func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
11821	if page.ercclr.IsEmpty() {
11822		return nil
11823	}
11824	return *page.ercclr.Value
11825}
11826
11827// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
11828func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
11829	return ExpressRouteCrossConnectionListResultPage{
11830		fn:     getNextPage,
11831		ercclr: cur,
11832	}
11833}
11834
11835// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
11836type ExpressRouteCrossConnectionPeering struct {
11837	autorest.Response `json:"-"`
11838	// ExpressRouteCrossConnectionPeeringProperties - Properties of the express route cross connection peering.
11839	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
11840	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11841	Name *string `json:"name,omitempty"`
11842	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11843	Etag *string `json:"etag,omitempty"`
11844	// ID - Resource ID.
11845	ID *string `json:"id,omitempty"`
11846}
11847
11848// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
11849func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
11850	objectMap := make(map[string]interface{})
11851	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
11852		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
11853	}
11854	if erccp.Name != nil {
11855		objectMap["name"] = erccp.Name
11856	}
11857	if erccp.ID != nil {
11858		objectMap["id"] = erccp.ID
11859	}
11860	return json.Marshal(objectMap)
11861}
11862
11863// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
11864func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
11865	var m map[string]*json.RawMessage
11866	err := json.Unmarshal(body, &m)
11867	if err != nil {
11868		return err
11869	}
11870	for k, v := range m {
11871		switch k {
11872		case "properties":
11873			if v != nil {
11874				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
11875				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
11876				if err != nil {
11877					return err
11878				}
11879				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
11880			}
11881		case "name":
11882			if v != nil {
11883				var name string
11884				err = json.Unmarshal(*v, &name)
11885				if err != nil {
11886					return err
11887				}
11888				erccp.Name = &name
11889			}
11890		case "etag":
11891			if v != nil {
11892				var etag string
11893				err = json.Unmarshal(*v, &etag)
11894				if err != nil {
11895					return err
11896				}
11897				erccp.Etag = &etag
11898			}
11899		case "id":
11900			if v != nil {
11901				var ID string
11902				err = json.Unmarshal(*v, &ID)
11903				if err != nil {
11904					return err
11905				}
11906				erccp.ID = &ID
11907			}
11908		}
11909	}
11910
11911	return nil
11912}
11913
11914// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
11915// that belong to an ExpressRouteCrossConnection.
11916type ExpressRouteCrossConnectionPeeringList struct {
11917	autorest.Response `json:"-"`
11918	// Value - The peerings in an express route cross connection.
11919	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
11920	// NextLink - READ-ONLY; The URL to get the next set of results.
11921	NextLink *string `json:"nextLink,omitempty"`
11922}
11923
11924// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
11925func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
11926	objectMap := make(map[string]interface{})
11927	if erccpl.Value != nil {
11928		objectMap["value"] = erccpl.Value
11929	}
11930	return json.Marshal(objectMap)
11931}
11932
11933// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
11934// ExpressRouteCrossConnectionPeering values.
11935type ExpressRouteCrossConnectionPeeringListIterator struct {
11936	i    int
11937	page ExpressRouteCrossConnectionPeeringListPage
11938}
11939
11940// NextWithContext advances to the next value.  If there was an error making
11941// the request the iterator does not advance and the error is returned.
11942func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
11943	if tracing.IsEnabled() {
11944		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
11945		defer func() {
11946			sc := -1
11947			if iter.Response().Response.Response != nil {
11948				sc = iter.Response().Response.Response.StatusCode
11949			}
11950			tracing.EndSpan(ctx, sc, err)
11951		}()
11952	}
11953	iter.i++
11954	if iter.i < len(iter.page.Values()) {
11955		return nil
11956	}
11957	err = iter.page.NextWithContext(ctx)
11958	if err != nil {
11959		iter.i--
11960		return err
11961	}
11962	iter.i = 0
11963	return nil
11964}
11965
11966// Next advances to the next value.  If there was an error making
11967// the request the iterator does not advance and the error is returned.
11968// Deprecated: Use NextWithContext() instead.
11969func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
11970	return iter.NextWithContext(context.Background())
11971}
11972
11973// NotDone returns true if the enumeration should be started or is not yet complete.
11974func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
11975	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11976}
11977
11978// Response returns the raw server response from the last page request.
11979func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
11980	return iter.page.Response()
11981}
11982
11983// Value returns the current value or a zero-initialized value if the
11984// iterator has advanced beyond the end of the collection.
11985func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
11986	if !iter.page.NotDone() {
11987		return ExpressRouteCrossConnectionPeering{}
11988	}
11989	return iter.page.Values()[iter.i]
11990}
11991
11992// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
11993func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
11994	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
11995}
11996
11997// IsEmpty returns true if the ListResult contains no values.
11998func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
11999	return erccpl.Value == nil || len(*erccpl.Value) == 0
12000}
12001
12002// hasNextLink returns true if the NextLink is not empty.
12003func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
12004	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
12005}
12006
12007// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
12008// It returns nil if no more results exist.
12009func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
12010	if !erccpl.hasNextLink() {
12011		return nil, nil
12012	}
12013	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12014		autorest.AsJSON(),
12015		autorest.AsGet(),
12016		autorest.WithBaseURL(to.String(erccpl.NextLink)))
12017}
12018
12019// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
12020type ExpressRouteCrossConnectionPeeringListPage struct {
12021	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
12022	erccpl ExpressRouteCrossConnectionPeeringList
12023}
12024
12025// NextWithContext 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.
12027func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
12028	if tracing.IsEnabled() {
12029		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
12030		defer func() {
12031			sc := -1
12032			if page.Response().Response.Response != nil {
12033				sc = page.Response().Response.Response.StatusCode
12034			}
12035			tracing.EndSpan(ctx, sc, err)
12036		}()
12037	}
12038	for {
12039		next, err := page.fn(ctx, page.erccpl)
12040		if err != nil {
12041			return err
12042		}
12043		page.erccpl = next
12044		if !next.hasNextLink() || !next.IsEmpty() {
12045			break
12046		}
12047	}
12048	return nil
12049}
12050
12051// Next advances to the next page of values.  If there was an error making
12052// the request the page does not advance and the error is returned.
12053// Deprecated: Use NextWithContext() instead.
12054func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
12055	return page.NextWithContext(context.Background())
12056}
12057
12058// NotDone returns true if the page enumeration should be started or is not yet complete.
12059func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
12060	return !page.erccpl.IsEmpty()
12061}
12062
12063// Response returns the raw server response from the last page request.
12064func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
12065	return page.erccpl
12066}
12067
12068// Values returns the slice of values for the current page or nil if there are no values.
12069func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
12070	if page.erccpl.IsEmpty() {
12071		return nil
12072	}
12073	return *page.erccpl.Value
12074}
12075
12076// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
12077func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
12078	return ExpressRouteCrossConnectionPeeringListPage{
12079		fn:     getNextPage,
12080		erccpl: cur,
12081	}
12082}
12083
12084// ExpressRouteCrossConnectionPeeringProperties properties of express route cross connection peering.
12085type ExpressRouteCrossConnectionPeeringProperties struct {
12086	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
12087	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
12088	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
12089	State ExpressRoutePeeringState `json:"state,omitempty"`
12090	// AzureASN - READ-ONLY; The Azure ASN.
12091	AzureASN *int32 `json:"azureASN,omitempty"`
12092	// PeerASN - The peer ASN.
12093	PeerASN *int64 `json:"peerASN,omitempty"`
12094	// PrimaryPeerAddressPrefix - The primary address prefix.
12095	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
12096	// SecondaryPeerAddressPrefix - The secondary address prefix.
12097	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
12098	// PrimaryAzurePort - READ-ONLY; The primary port.
12099	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
12100	// SecondaryAzurePort - READ-ONLY; The secondary port.
12101	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
12102	// SharedKey - The shared key.
12103	SharedKey *string `json:"sharedKey,omitempty"`
12104	// VlanID - The VLAN ID.
12105	VlanID *int32 `json:"vlanId,omitempty"`
12106	// MicrosoftPeeringConfig - The Microsoft peering configuration.
12107	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
12108	// ProvisioningState - READ-ONLY; The provisioning state of the express route cross connection peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12109	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12110	// GatewayManagerEtag - The GatewayManager Etag.
12111	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
12112	// LastModifiedBy - READ-ONLY; Who was the last to modify the peering.
12113	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
12114	// Ipv6PeeringConfig - The IPv6 peering configuration.
12115	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
12116}
12117
12118// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
12119func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
12120	objectMap := make(map[string]interface{})
12121	if erccpp.PeeringType != "" {
12122		objectMap["peeringType"] = erccpp.PeeringType
12123	}
12124	if erccpp.State != "" {
12125		objectMap["state"] = erccpp.State
12126	}
12127	if erccpp.PeerASN != nil {
12128		objectMap["peerASN"] = erccpp.PeerASN
12129	}
12130	if erccpp.PrimaryPeerAddressPrefix != nil {
12131		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
12132	}
12133	if erccpp.SecondaryPeerAddressPrefix != nil {
12134		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
12135	}
12136	if erccpp.SharedKey != nil {
12137		objectMap["sharedKey"] = erccpp.SharedKey
12138	}
12139	if erccpp.VlanID != nil {
12140		objectMap["vlanId"] = erccpp.VlanID
12141	}
12142	if erccpp.MicrosoftPeeringConfig != nil {
12143		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
12144	}
12145	if erccpp.GatewayManagerEtag != nil {
12146		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
12147	}
12148	if erccpp.Ipv6PeeringConfig != nil {
12149		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
12150	}
12151	return json.Marshal(objectMap)
12152}
12153
12154// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
12155// results of a long-running operation.
12156type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
12157	azure.FutureAPI
12158	// Result returns the result of the asynchronous operation.
12159	// If the operation has not completed it will return an error.
12160	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
12161}
12162
12163// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
12164// of a long-running operation.
12165type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
12166	azure.FutureAPI
12167	// Result returns the result of the asynchronous operation.
12168	// If the operation has not completed it will return an error.
12169	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
12170}
12171
12172// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
12173type ExpressRouteCrossConnectionProperties struct {
12174	// PrimaryAzurePort - READ-ONLY; The name of the primary port.
12175	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
12176	// SecondaryAzurePort - READ-ONLY; The name of the secondary port.
12177	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
12178	// STag - READ-ONLY; The identifier of the circuit traffic.
12179	STag *int32 `json:"sTag,omitempty"`
12180	// PeeringLocation - The peering location of the ExpressRoute circuit.
12181	PeeringLocation *string `json:"peeringLocation,omitempty"`
12182	// BandwidthInMbps - The circuit bandwidth In Mbps.
12183	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
12184	// ExpressRouteCircuit - The ExpressRouteCircuit.
12185	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
12186	// ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
12187	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
12188	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
12189	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
12190	// ProvisioningState - READ-ONLY; The provisioning state of the express route cross connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12191	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12192	// Peerings - The list of peerings.
12193	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
12194}
12195
12196// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
12197func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
12198	objectMap := make(map[string]interface{})
12199	if erccp.PeeringLocation != nil {
12200		objectMap["peeringLocation"] = erccp.PeeringLocation
12201	}
12202	if erccp.BandwidthInMbps != nil {
12203		objectMap["bandwidthInMbps"] = erccp.BandwidthInMbps
12204	}
12205	if erccp.ExpressRouteCircuit != nil {
12206		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
12207	}
12208	if erccp.ServiceProviderProvisioningState != "" {
12209		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
12210	}
12211	if erccp.ServiceProviderNotes != nil {
12212		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
12213	}
12214	if erccp.Peerings != nil {
12215		objectMap["peerings"] = erccp.Peerings
12216	}
12217	return json.Marshal(objectMap)
12218}
12219
12220// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
12221type ExpressRouteCrossConnectionRoutesTableSummary struct {
12222	// Neighbor - IP address of Neighbor router.
12223	Neighbor *string `json:"neighbor,omitempty"`
12224	// Asn - Autonomous system number.
12225	Asn *int32 `json:"asn,omitempty"`
12226	// 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.
12227	UpDown *string `json:"upDown,omitempty"`
12228	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
12229	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
12230}
12231
12232// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
12233// results of a long-running operation.
12234type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
12235	azure.FutureAPI
12236	// Result returns the result of the asynchronous operation.
12237	// If the operation has not completed it will return an error.
12238	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
12239}
12240
12241// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
12242// of a long-running operation.
12243type ExpressRouteCrossConnectionsListArpTableFuture struct {
12244	azure.FutureAPI
12245	// Result returns the result of the asynchronous operation.
12246	// If the operation has not completed it will return an error.
12247	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
12248}
12249
12250// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
12251// results of a long-running operation.
12252type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
12253	azure.FutureAPI
12254	// Result returns the result of the asynchronous operation.
12255	// If the operation has not completed it will return an error.
12256	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
12257}
12258
12259// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
12260// the results of a long-running operation.
12261type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
12262	azure.FutureAPI
12263	// Result returns the result of the asynchronous operation.
12264	// If the operation has not completed it will return an error.
12265	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
12266}
12267
12268// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
12269// the Express Route Cross Connections.
12270type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
12271	autorest.Response `json:"-"`
12272	// Value - A list of the routes table.
12273	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
12274	// NextLink - READ-ONLY; The URL to get the next set of results.
12275	NextLink *string `json:"nextLink,omitempty"`
12276}
12277
12278// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
12279func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
12280	objectMap := make(map[string]interface{})
12281	if erccrtslr.Value != nil {
12282		objectMap["value"] = erccrtslr.Value
12283	}
12284	return json.Marshal(objectMap)
12285}
12286
12287// ExpressRouteGateway expressRoute gateway resource.
12288type ExpressRouteGateway struct {
12289	autorest.Response `json:"-"`
12290	// ExpressRouteGatewayProperties - Properties of the express route gateway.
12291	*ExpressRouteGatewayProperties `json:"properties,omitempty"`
12292	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12293	Etag *string `json:"etag,omitempty"`
12294	// ID - Resource ID.
12295	ID *string `json:"id,omitempty"`
12296	// Name - READ-ONLY; Resource name.
12297	Name *string `json:"name,omitempty"`
12298	// Type - READ-ONLY; Resource type.
12299	Type *string `json:"type,omitempty"`
12300	// Location - Resource location.
12301	Location *string `json:"location,omitempty"`
12302	// Tags - Resource tags.
12303	Tags map[string]*string `json:"tags"`
12304}
12305
12306// MarshalJSON is the custom marshaler for ExpressRouteGateway.
12307func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) {
12308	objectMap := make(map[string]interface{})
12309	if erg.ExpressRouteGatewayProperties != nil {
12310		objectMap["properties"] = erg.ExpressRouteGatewayProperties
12311	}
12312	if erg.ID != nil {
12313		objectMap["id"] = erg.ID
12314	}
12315	if erg.Location != nil {
12316		objectMap["location"] = erg.Location
12317	}
12318	if erg.Tags != nil {
12319		objectMap["tags"] = erg.Tags
12320	}
12321	return json.Marshal(objectMap)
12322}
12323
12324// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct.
12325func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error {
12326	var m map[string]*json.RawMessage
12327	err := json.Unmarshal(body, &m)
12328	if err != nil {
12329		return err
12330	}
12331	for k, v := range m {
12332		switch k {
12333		case "properties":
12334			if v != nil {
12335				var expressRouteGatewayProperties ExpressRouteGatewayProperties
12336				err = json.Unmarshal(*v, &expressRouteGatewayProperties)
12337				if err != nil {
12338					return err
12339				}
12340				erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties
12341			}
12342		case "etag":
12343			if v != nil {
12344				var etag string
12345				err = json.Unmarshal(*v, &etag)
12346				if err != nil {
12347					return err
12348				}
12349				erg.Etag = &etag
12350			}
12351		case "id":
12352			if v != nil {
12353				var ID string
12354				err = json.Unmarshal(*v, &ID)
12355				if err != nil {
12356					return err
12357				}
12358				erg.ID = &ID
12359			}
12360		case "name":
12361			if v != nil {
12362				var name string
12363				err = json.Unmarshal(*v, &name)
12364				if err != nil {
12365					return err
12366				}
12367				erg.Name = &name
12368			}
12369		case "type":
12370			if v != nil {
12371				var typeVar string
12372				err = json.Unmarshal(*v, &typeVar)
12373				if err != nil {
12374					return err
12375				}
12376				erg.Type = &typeVar
12377			}
12378		case "location":
12379			if v != nil {
12380				var location string
12381				err = json.Unmarshal(*v, &location)
12382				if err != nil {
12383					return err
12384				}
12385				erg.Location = &location
12386			}
12387		case "tags":
12388			if v != nil {
12389				var tags map[string]*string
12390				err = json.Unmarshal(*v, &tags)
12391				if err != nil {
12392					return err
12393				}
12394				erg.Tags = tags
12395			}
12396		}
12397	}
12398
12399	return nil
12400}
12401
12402// ExpressRouteGatewayList list of ExpressRoute gateways.
12403type ExpressRouteGatewayList struct {
12404	autorest.Response `json:"-"`
12405	// Value - List of ExpressRoute gateways.
12406	Value *[]ExpressRouteGateway `json:"value,omitempty"`
12407}
12408
12409// ExpressRouteGatewayProperties expressRoute gateway resource properties.
12410type ExpressRouteGatewayProperties struct {
12411	// AutoScaleConfiguration - Configuration for auto scaling.
12412	AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"`
12413	// ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway.
12414	ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"`
12415	// ProvisioningState - READ-ONLY; The provisioning state of the express route gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12416	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12417	// VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed.
12418	VirtualHub *VirtualHubID `json:"virtualHub,omitempty"`
12419}
12420
12421// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties.
12422func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) {
12423	objectMap := make(map[string]interface{})
12424	if ergp.AutoScaleConfiguration != nil {
12425		objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration
12426	}
12427	if ergp.VirtualHub != nil {
12428		objectMap["virtualHub"] = ergp.VirtualHub
12429	}
12430	return json.Marshal(objectMap)
12431}
12432
12433// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling.
12434type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct {
12435	// Bounds - Minimum and maximum number of scale units to deploy.
12436	Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"`
12437}
12438
12439// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to
12440// deploy.
12441type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct {
12442	// Min - Minimum number of scale units deployed for ExpressRoute gateway.
12443	Min *int32 `json:"min,omitempty"`
12444	// Max - Maximum number of scale units deployed for ExpressRoute gateway.
12445	Max *int32 `json:"max,omitempty"`
12446}
12447
12448// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12449// long-running operation.
12450type ExpressRouteGatewaysCreateOrUpdateFuture struct {
12451	azure.FutureAPI
12452	// Result returns the result of the asynchronous operation.
12453	// If the operation has not completed it will return an error.
12454	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
12455}
12456
12457// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
12458// long-running operation.
12459type ExpressRouteGatewaysDeleteFuture struct {
12460	azure.FutureAPI
12461	// Result returns the result of the asynchronous operation.
12462	// If the operation has not completed it will return an error.
12463	Result func(ExpressRouteGatewaysClient) (autorest.Response, error)
12464}
12465
12466// ExpressRouteLink expressRouteLink child resource definition.
12467type ExpressRouteLink struct {
12468	autorest.Response `json:"-"`
12469	// ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties.
12470	*ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"`
12471	// Name - Name of child port resource that is unique among child port resources of the parent.
12472	Name *string `json:"name,omitempty"`
12473	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12474	Etag *string `json:"etag,omitempty"`
12475	// ID - Resource ID.
12476	ID *string `json:"id,omitempty"`
12477}
12478
12479// MarshalJSON is the custom marshaler for ExpressRouteLink.
12480func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) {
12481	objectMap := make(map[string]interface{})
12482	if erl.ExpressRouteLinkPropertiesFormat != nil {
12483		objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat
12484	}
12485	if erl.Name != nil {
12486		objectMap["name"] = erl.Name
12487	}
12488	if erl.ID != nil {
12489		objectMap["id"] = erl.ID
12490	}
12491	return json.Marshal(objectMap)
12492}
12493
12494// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct.
12495func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error {
12496	var m map[string]*json.RawMessage
12497	err := json.Unmarshal(body, &m)
12498	if err != nil {
12499		return err
12500	}
12501	for k, v := range m {
12502		switch k {
12503		case "properties":
12504			if v != nil {
12505				var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat
12506				err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat)
12507				if err != nil {
12508					return err
12509				}
12510				erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat
12511			}
12512		case "name":
12513			if v != nil {
12514				var name string
12515				err = json.Unmarshal(*v, &name)
12516				if err != nil {
12517					return err
12518				}
12519				erl.Name = &name
12520			}
12521		case "etag":
12522			if v != nil {
12523				var etag string
12524				err = json.Unmarshal(*v, &etag)
12525				if err != nil {
12526					return err
12527				}
12528				erl.Etag = &etag
12529			}
12530		case "id":
12531			if v != nil {
12532				var ID string
12533				err = json.Unmarshal(*v, &ID)
12534				if err != nil {
12535					return err
12536				}
12537				erl.ID = &ID
12538			}
12539		}
12540	}
12541
12542	return nil
12543}
12544
12545// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call.
12546type ExpressRouteLinkListResult struct {
12547	autorest.Response `json:"-"`
12548	// Value - The list of ExpressRouteLink sub-resources.
12549	Value *[]ExpressRouteLink `json:"value,omitempty"`
12550	// NextLink - The URL to get the next set of results.
12551	NextLink *string `json:"nextLink,omitempty"`
12552}
12553
12554// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values.
12555type ExpressRouteLinkListResultIterator struct {
12556	i    int
12557	page ExpressRouteLinkListResultPage
12558}
12559
12560// NextWithContext advances to the next value.  If there was an error making
12561// the request the iterator does not advance and the error is returned.
12562func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
12563	if tracing.IsEnabled() {
12564		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext")
12565		defer func() {
12566			sc := -1
12567			if iter.Response().Response.Response != nil {
12568				sc = iter.Response().Response.Response.StatusCode
12569			}
12570			tracing.EndSpan(ctx, sc, err)
12571		}()
12572	}
12573	iter.i++
12574	if iter.i < len(iter.page.Values()) {
12575		return nil
12576	}
12577	err = iter.page.NextWithContext(ctx)
12578	if err != nil {
12579		iter.i--
12580		return err
12581	}
12582	iter.i = 0
12583	return nil
12584}
12585
12586// Next advances to the next value.  If there was an error making
12587// the request the iterator does not advance and the error is returned.
12588// Deprecated: Use NextWithContext() instead.
12589func (iter *ExpressRouteLinkListResultIterator) Next() error {
12590	return iter.NextWithContext(context.Background())
12591}
12592
12593// NotDone returns true if the enumeration should be started or is not yet complete.
12594func (iter ExpressRouteLinkListResultIterator) NotDone() bool {
12595	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12596}
12597
12598// Response returns the raw server response from the last page request.
12599func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult {
12600	return iter.page.Response()
12601}
12602
12603// Value returns the current value or a zero-initialized value if the
12604// iterator has advanced beyond the end of the collection.
12605func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink {
12606	if !iter.page.NotDone() {
12607		return ExpressRouteLink{}
12608	}
12609	return iter.page.Values()[iter.i]
12610}
12611
12612// Creates a new instance of the ExpressRouteLinkListResultIterator type.
12613func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator {
12614	return ExpressRouteLinkListResultIterator{page: page}
12615}
12616
12617// IsEmpty returns true if the ListResult contains no values.
12618func (erllr ExpressRouteLinkListResult) IsEmpty() bool {
12619	return erllr.Value == nil || len(*erllr.Value) == 0
12620}
12621
12622// hasNextLink returns true if the NextLink is not empty.
12623func (erllr ExpressRouteLinkListResult) hasNextLink() bool {
12624	return erllr.NextLink != nil && len(*erllr.NextLink) != 0
12625}
12626
12627// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results.
12628// It returns nil if no more results exist.
12629func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
12630	if !erllr.hasNextLink() {
12631		return nil, nil
12632	}
12633	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12634		autorest.AsJSON(),
12635		autorest.AsGet(),
12636		autorest.WithBaseURL(to.String(erllr.NextLink)))
12637}
12638
12639// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values.
12640type ExpressRouteLinkListResultPage struct {
12641	fn    func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)
12642	erllr ExpressRouteLinkListResult
12643}
12644
12645// NextWithContext advances to the next page of values.  If there was an error making
12646// the request the page does not advance and the error is returned.
12647func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
12648	if tracing.IsEnabled() {
12649		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext")
12650		defer func() {
12651			sc := -1
12652			if page.Response().Response.Response != nil {
12653				sc = page.Response().Response.Response.StatusCode
12654			}
12655			tracing.EndSpan(ctx, sc, err)
12656		}()
12657	}
12658	for {
12659		next, err := page.fn(ctx, page.erllr)
12660		if err != nil {
12661			return err
12662		}
12663		page.erllr = next
12664		if !next.hasNextLink() || !next.IsEmpty() {
12665			break
12666		}
12667	}
12668	return nil
12669}
12670
12671// Next advances to the next page of values.  If there was an error making
12672// the request the page does not advance and the error is returned.
12673// Deprecated: Use NextWithContext() instead.
12674func (page *ExpressRouteLinkListResultPage) Next() error {
12675	return page.NextWithContext(context.Background())
12676}
12677
12678// NotDone returns true if the page enumeration should be started or is not yet complete.
12679func (page ExpressRouteLinkListResultPage) NotDone() bool {
12680	return !page.erllr.IsEmpty()
12681}
12682
12683// Response returns the raw server response from the last page request.
12684func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult {
12685	return page.erllr
12686}
12687
12688// Values returns the slice of values for the current page or nil if there are no values.
12689func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink {
12690	if page.erllr.IsEmpty() {
12691		return nil
12692	}
12693	return *page.erllr.Value
12694}
12695
12696// Creates a new instance of the ExpressRouteLinkListResultPage type.
12697func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage {
12698	return ExpressRouteLinkListResultPage{
12699		fn:    getNextPage,
12700		erllr: cur,
12701	}
12702}
12703
12704// ExpressRouteLinkMacSecConfig expressRouteLink Mac Security Configuration.
12705type ExpressRouteLinkMacSecConfig struct {
12706	// CknSecretIdentifier - Keyvault Secret Identifier URL containing Mac security CKN key.
12707	CknSecretIdentifier *string `json:"cknSecretIdentifier,omitempty"`
12708	// CakSecretIdentifier - Keyvault Secret Identifier URL containing Mac security CAK key.
12709	CakSecretIdentifier *string `json:"cakSecretIdentifier,omitempty"`
12710	// Cipher - Mac security cipher. Possible values include: 'GcmAes128', 'GcmAes256'
12711	Cipher ExpressRouteLinkMacSecCipher `json:"cipher,omitempty"`
12712}
12713
12714// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources.
12715type ExpressRouteLinkPropertiesFormat struct {
12716	// RouterName - READ-ONLY; Name of Azure router associated with physical port.
12717	RouterName *string `json:"routerName,omitempty"`
12718	// InterfaceName - READ-ONLY; Name of Azure router interface.
12719	InterfaceName *string `json:"interfaceName,omitempty"`
12720	// PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port.
12721	PatchPanelID *string `json:"patchPanelId,omitempty"`
12722	// RackID - READ-ONLY; Mapping of physical patch panel to rack.
12723	RackID *string `json:"rackId,omitempty"`
12724	// ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'LC', 'SC'
12725	ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"`
12726	// AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled'
12727	AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"`
12728	// ProvisioningState - READ-ONLY; The provisioning state of the express route link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12729	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12730	// MacSecConfig - MacSec configuration.
12731	MacSecConfig *ExpressRouteLinkMacSecConfig `json:"macSecConfig,omitempty"`
12732}
12733
12734// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat.
12735func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
12736	objectMap := make(map[string]interface{})
12737	if erlpf.AdminState != "" {
12738		objectMap["adminState"] = erlpf.AdminState
12739	}
12740	if erlpf.MacSecConfig != nil {
12741		objectMap["macSecConfig"] = erlpf.MacSecConfig
12742	}
12743	return json.Marshal(objectMap)
12744}
12745
12746// ExpressRoutePort expressRoutePort resource definition.
12747type ExpressRoutePort struct {
12748	autorest.Response `json:"-"`
12749	// ExpressRoutePortPropertiesFormat - ExpressRoutePort properties.
12750	*ExpressRoutePortPropertiesFormat `json:"properties,omitempty"`
12751	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12752	Etag *string `json:"etag,omitempty"`
12753	// Identity - The identity of ExpressRoutePort, if configured.
12754	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
12755	// ID - Resource ID.
12756	ID *string `json:"id,omitempty"`
12757	// Name - READ-ONLY; Resource name.
12758	Name *string `json:"name,omitempty"`
12759	// Type - READ-ONLY; Resource type.
12760	Type *string `json:"type,omitempty"`
12761	// Location - Resource location.
12762	Location *string `json:"location,omitempty"`
12763	// Tags - Resource tags.
12764	Tags map[string]*string `json:"tags"`
12765}
12766
12767// MarshalJSON is the custom marshaler for ExpressRoutePort.
12768func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) {
12769	objectMap := make(map[string]interface{})
12770	if erp.ExpressRoutePortPropertiesFormat != nil {
12771		objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat
12772	}
12773	if erp.Identity != nil {
12774		objectMap["identity"] = erp.Identity
12775	}
12776	if erp.ID != nil {
12777		objectMap["id"] = erp.ID
12778	}
12779	if erp.Location != nil {
12780		objectMap["location"] = erp.Location
12781	}
12782	if erp.Tags != nil {
12783		objectMap["tags"] = erp.Tags
12784	}
12785	return json.Marshal(objectMap)
12786}
12787
12788// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct.
12789func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error {
12790	var m map[string]*json.RawMessage
12791	err := json.Unmarshal(body, &m)
12792	if err != nil {
12793		return err
12794	}
12795	for k, v := range m {
12796		switch k {
12797		case "properties":
12798			if v != nil {
12799				var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat
12800				err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat)
12801				if err != nil {
12802					return err
12803				}
12804				erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat
12805			}
12806		case "etag":
12807			if v != nil {
12808				var etag string
12809				err = json.Unmarshal(*v, &etag)
12810				if err != nil {
12811					return err
12812				}
12813				erp.Etag = &etag
12814			}
12815		case "identity":
12816			if v != nil {
12817				var identity ManagedServiceIdentity
12818				err = json.Unmarshal(*v, &identity)
12819				if err != nil {
12820					return err
12821				}
12822				erp.Identity = &identity
12823			}
12824		case "id":
12825			if v != nil {
12826				var ID string
12827				err = json.Unmarshal(*v, &ID)
12828				if err != nil {
12829					return err
12830				}
12831				erp.ID = &ID
12832			}
12833		case "name":
12834			if v != nil {
12835				var name string
12836				err = json.Unmarshal(*v, &name)
12837				if err != nil {
12838					return err
12839				}
12840				erp.Name = &name
12841			}
12842		case "type":
12843			if v != nil {
12844				var typeVar string
12845				err = json.Unmarshal(*v, &typeVar)
12846				if err != nil {
12847					return err
12848				}
12849				erp.Type = &typeVar
12850			}
12851		case "location":
12852			if v != nil {
12853				var location string
12854				err = json.Unmarshal(*v, &location)
12855				if err != nil {
12856					return err
12857				}
12858				erp.Location = &location
12859			}
12860		case "tags":
12861			if v != nil {
12862				var tags map[string]*string
12863				err = json.Unmarshal(*v, &tags)
12864				if err != nil {
12865					return err
12866				}
12867				erp.Tags = tags
12868			}
12869		}
12870	}
12871
12872	return nil
12873}
12874
12875// ExpressRoutePortListResult response for ListExpressRoutePorts API service call.
12876type ExpressRoutePortListResult struct {
12877	autorest.Response `json:"-"`
12878	// Value - A list of ExpressRoutePort resources.
12879	Value *[]ExpressRoutePort `json:"value,omitempty"`
12880	// NextLink - The URL to get the next set of results.
12881	NextLink *string `json:"nextLink,omitempty"`
12882}
12883
12884// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values.
12885type ExpressRoutePortListResultIterator struct {
12886	i    int
12887	page ExpressRoutePortListResultPage
12888}
12889
12890// NextWithContext advances to the next value.  If there was an error making
12891// the request the iterator does not advance and the error is returned.
12892func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) {
12893	if tracing.IsEnabled() {
12894		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext")
12895		defer func() {
12896			sc := -1
12897			if iter.Response().Response.Response != nil {
12898				sc = iter.Response().Response.Response.StatusCode
12899			}
12900			tracing.EndSpan(ctx, sc, err)
12901		}()
12902	}
12903	iter.i++
12904	if iter.i < len(iter.page.Values()) {
12905		return nil
12906	}
12907	err = iter.page.NextWithContext(ctx)
12908	if err != nil {
12909		iter.i--
12910		return err
12911	}
12912	iter.i = 0
12913	return nil
12914}
12915
12916// Next advances to the next value.  If there was an error making
12917// the request the iterator does not advance and the error is returned.
12918// Deprecated: Use NextWithContext() instead.
12919func (iter *ExpressRoutePortListResultIterator) Next() error {
12920	return iter.NextWithContext(context.Background())
12921}
12922
12923// NotDone returns true if the enumeration should be started or is not yet complete.
12924func (iter ExpressRoutePortListResultIterator) NotDone() bool {
12925	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12926}
12927
12928// Response returns the raw server response from the last page request.
12929func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult {
12930	return iter.page.Response()
12931}
12932
12933// Value returns the current value or a zero-initialized value if the
12934// iterator has advanced beyond the end of the collection.
12935func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort {
12936	if !iter.page.NotDone() {
12937		return ExpressRoutePort{}
12938	}
12939	return iter.page.Values()[iter.i]
12940}
12941
12942// Creates a new instance of the ExpressRoutePortListResultIterator type.
12943func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator {
12944	return ExpressRoutePortListResultIterator{page: page}
12945}
12946
12947// IsEmpty returns true if the ListResult contains no values.
12948func (erplr ExpressRoutePortListResult) IsEmpty() bool {
12949	return erplr.Value == nil || len(*erplr.Value) == 0
12950}
12951
12952// hasNextLink returns true if the NextLink is not empty.
12953func (erplr ExpressRoutePortListResult) hasNextLink() bool {
12954	return erplr.NextLink != nil && len(*erplr.NextLink) != 0
12955}
12956
12957// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results.
12958// It returns nil if no more results exist.
12959func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) {
12960	if !erplr.hasNextLink() {
12961		return nil, nil
12962	}
12963	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12964		autorest.AsJSON(),
12965		autorest.AsGet(),
12966		autorest.WithBaseURL(to.String(erplr.NextLink)))
12967}
12968
12969// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values.
12970type ExpressRoutePortListResultPage struct {
12971	fn    func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)
12972	erplr ExpressRoutePortListResult
12973}
12974
12975// NextWithContext advances to the next page of values.  If there was an error making
12976// the request the page does not advance and the error is returned.
12977func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) {
12978	if tracing.IsEnabled() {
12979		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext")
12980		defer func() {
12981			sc := -1
12982			if page.Response().Response.Response != nil {
12983				sc = page.Response().Response.Response.StatusCode
12984			}
12985			tracing.EndSpan(ctx, sc, err)
12986		}()
12987	}
12988	for {
12989		next, err := page.fn(ctx, page.erplr)
12990		if err != nil {
12991			return err
12992		}
12993		page.erplr = next
12994		if !next.hasNextLink() || !next.IsEmpty() {
12995			break
12996		}
12997	}
12998	return nil
12999}
13000
13001// Next advances to the next page of values.  If there was an error making
13002// the request the page does not advance and the error is returned.
13003// Deprecated: Use NextWithContext() instead.
13004func (page *ExpressRoutePortListResultPage) Next() error {
13005	return page.NextWithContext(context.Background())
13006}
13007
13008// NotDone returns true if the page enumeration should be started or is not yet complete.
13009func (page ExpressRoutePortListResultPage) NotDone() bool {
13010	return !page.erplr.IsEmpty()
13011}
13012
13013// Response returns the raw server response from the last page request.
13014func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult {
13015	return page.erplr
13016}
13017
13018// Values returns the slice of values for the current page or nil if there are no values.
13019func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort {
13020	if page.erplr.IsEmpty() {
13021		return nil
13022	}
13023	return *page.erplr.Value
13024}
13025
13026// Creates a new instance of the ExpressRoutePortListResultPage type.
13027func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage {
13028	return ExpressRoutePortListResultPage{
13029		fn:    getNextPage,
13030		erplr: cur,
13031	}
13032}
13033
13034// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources.
13035type ExpressRoutePortPropertiesFormat struct {
13036	// PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically.
13037	PeeringLocation *string `json:"peeringLocation,omitempty"`
13038	// BandwidthInGbps - Bandwidth of procured ports in Gbps.
13039	BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"`
13040	// ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths.
13041	ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"`
13042	// Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s).
13043	Mtu *string `json:"mtu,omitempty"`
13044	// Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ'
13045	Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"`
13046	// EtherType - READ-ONLY; Ether type of the physical port.
13047	EtherType *string `json:"etherType,omitempty"`
13048	// AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization.
13049	AllocationDate *string `json:"allocationDate,omitempty"`
13050	// Links - The set of physical links of the ExpressRoutePort resource.
13051	Links *[]ExpressRouteLink `json:"links,omitempty"`
13052	// Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource.
13053	Circuits *[]SubResource `json:"circuits,omitempty"`
13054	// ProvisioningState - READ-ONLY; The provisioning state of the express route port resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
13055	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13056	// ResourceGUID - READ-ONLY; The resource GUID property of the express route port resource.
13057	ResourceGUID *string `json:"resourceGuid,omitempty"`
13058}
13059
13060// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat.
13061func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) {
13062	objectMap := make(map[string]interface{})
13063	if erppf.PeeringLocation != nil {
13064		objectMap["peeringLocation"] = erppf.PeeringLocation
13065	}
13066	if erppf.BandwidthInGbps != nil {
13067		objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps
13068	}
13069	if erppf.Encapsulation != "" {
13070		objectMap["encapsulation"] = erppf.Encapsulation
13071	}
13072	if erppf.Links != nil {
13073		objectMap["links"] = erppf.Links
13074	}
13075	return json.Marshal(objectMap)
13076}
13077
13078// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13079// long-running operation.
13080type ExpressRoutePortsCreateOrUpdateFuture struct {
13081	azure.FutureAPI
13082	// Result returns the result of the asynchronous operation.
13083	// If the operation has not completed it will return an error.
13084	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
13085}
13086
13087// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13088// operation.
13089type ExpressRoutePortsDeleteFuture struct {
13090	azure.FutureAPI
13091	// Result returns the result of the asynchronous operation.
13092	// If the operation has not completed it will return an error.
13093	Result func(ExpressRoutePortsClient) (autorest.Response, error)
13094}
13095
13096// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
13097type ExpressRoutePortsLocation struct {
13098	autorest.Response `json:"-"`
13099	// ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties.
13100	*ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"`
13101	// ID - Resource ID.
13102	ID *string `json:"id,omitempty"`
13103	// Name - READ-ONLY; Resource name.
13104	Name *string `json:"name,omitempty"`
13105	// Type - READ-ONLY; Resource type.
13106	Type *string `json:"type,omitempty"`
13107	// Location - Resource location.
13108	Location *string `json:"location,omitempty"`
13109	// Tags - Resource tags.
13110	Tags map[string]*string `json:"tags"`
13111}
13112
13113// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation.
13114func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) {
13115	objectMap := make(map[string]interface{})
13116	if erpl.ExpressRoutePortsLocationPropertiesFormat != nil {
13117		objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat
13118	}
13119	if erpl.ID != nil {
13120		objectMap["id"] = erpl.ID
13121	}
13122	if erpl.Location != nil {
13123		objectMap["location"] = erpl.Location
13124	}
13125	if erpl.Tags != nil {
13126		objectMap["tags"] = erpl.Tags
13127	}
13128	return json.Marshal(objectMap)
13129}
13130
13131// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct.
13132func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error {
13133	var m map[string]*json.RawMessage
13134	err := json.Unmarshal(body, &m)
13135	if err != nil {
13136		return err
13137	}
13138	for k, v := range m {
13139		switch k {
13140		case "properties":
13141			if v != nil {
13142				var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat
13143				err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat)
13144				if err != nil {
13145					return err
13146				}
13147				erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat
13148			}
13149		case "id":
13150			if v != nil {
13151				var ID string
13152				err = json.Unmarshal(*v, &ID)
13153				if err != nil {
13154					return err
13155				}
13156				erpl.ID = &ID
13157			}
13158		case "name":
13159			if v != nil {
13160				var name string
13161				err = json.Unmarshal(*v, &name)
13162				if err != nil {
13163					return err
13164				}
13165				erpl.Name = &name
13166			}
13167		case "type":
13168			if v != nil {
13169				var typeVar string
13170				err = json.Unmarshal(*v, &typeVar)
13171				if err != nil {
13172					return err
13173				}
13174				erpl.Type = &typeVar
13175			}
13176		case "location":
13177			if v != nil {
13178				var location string
13179				err = json.Unmarshal(*v, &location)
13180				if err != nil {
13181					return err
13182				}
13183				erpl.Location = &location
13184			}
13185		case "tags":
13186			if v != nil {
13187				var tags map[string]*string
13188				err = json.Unmarshal(*v, &tags)
13189				if err != nil {
13190					return err
13191				}
13192				erpl.Tags = tags
13193			}
13194		}
13195	}
13196
13197	return nil
13198}
13199
13200// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths.
13201type ExpressRoutePortsLocationBandwidths struct {
13202	// OfferName - READ-ONLY; Bandwidth descriptive name.
13203	OfferName *string `json:"offerName,omitempty"`
13204	// ValueInGbps - READ-ONLY; Bandwidth value in Gbps.
13205	ValueInGbps *int32 `json:"valueInGbps,omitempty"`
13206}
13207
13208// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
13209type ExpressRoutePortsLocationListResult struct {
13210	autorest.Response `json:"-"`
13211	// Value - The list of all ExpressRoutePort peering locations.
13212	Value *[]ExpressRoutePortsLocation `json:"value,omitempty"`
13213	// NextLink - The URL to get the next set of results.
13214	NextLink *string `json:"nextLink,omitempty"`
13215}
13216
13217// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of
13218// ExpressRoutePortsLocation values.
13219type ExpressRoutePortsLocationListResultIterator struct {
13220	i    int
13221	page ExpressRoutePortsLocationListResultPage
13222}
13223
13224// NextWithContext advances to the next value.  If there was an error making
13225// the request the iterator does not advance and the error is returned.
13226func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
13227	if tracing.IsEnabled() {
13228		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext")
13229		defer func() {
13230			sc := -1
13231			if iter.Response().Response.Response != nil {
13232				sc = iter.Response().Response.Response.StatusCode
13233			}
13234			tracing.EndSpan(ctx, sc, err)
13235		}()
13236	}
13237	iter.i++
13238	if iter.i < len(iter.page.Values()) {
13239		return nil
13240	}
13241	err = iter.page.NextWithContext(ctx)
13242	if err != nil {
13243		iter.i--
13244		return err
13245	}
13246	iter.i = 0
13247	return nil
13248}
13249
13250// Next advances to the next value.  If there was an error making
13251// the request the iterator does not advance and the error is returned.
13252// Deprecated: Use NextWithContext() instead.
13253func (iter *ExpressRoutePortsLocationListResultIterator) Next() error {
13254	return iter.NextWithContext(context.Background())
13255}
13256
13257// NotDone returns true if the enumeration should be started or is not yet complete.
13258func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool {
13259	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13260}
13261
13262// Response returns the raw server response from the last page request.
13263func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult {
13264	return iter.page.Response()
13265}
13266
13267// Value returns the current value or a zero-initialized value if the
13268// iterator has advanced beyond the end of the collection.
13269func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation {
13270	if !iter.page.NotDone() {
13271		return ExpressRoutePortsLocation{}
13272	}
13273	return iter.page.Values()[iter.i]
13274}
13275
13276// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type.
13277func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator {
13278	return ExpressRoutePortsLocationListResultIterator{page: page}
13279}
13280
13281// IsEmpty returns true if the ListResult contains no values.
13282func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool {
13283	return erpllr.Value == nil || len(*erpllr.Value) == 0
13284}
13285
13286// hasNextLink returns true if the NextLink is not empty.
13287func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool {
13288	return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0
13289}
13290
13291// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results.
13292// It returns nil if no more results exist.
13293func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) {
13294	if !erpllr.hasNextLink() {
13295		return nil, nil
13296	}
13297	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13298		autorest.AsJSON(),
13299		autorest.AsGet(),
13300		autorest.WithBaseURL(to.String(erpllr.NextLink)))
13301}
13302
13303// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values.
13304type ExpressRoutePortsLocationListResultPage struct {
13305	fn     func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)
13306	erpllr ExpressRoutePortsLocationListResult
13307}
13308
13309// NextWithContext advances to the next page of values.  If there was an error making
13310// the request the page does not advance and the error is returned.
13311func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) {
13312	if tracing.IsEnabled() {
13313		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext")
13314		defer func() {
13315			sc := -1
13316			if page.Response().Response.Response != nil {
13317				sc = page.Response().Response.Response.StatusCode
13318			}
13319			tracing.EndSpan(ctx, sc, err)
13320		}()
13321	}
13322	for {
13323		next, err := page.fn(ctx, page.erpllr)
13324		if err != nil {
13325			return err
13326		}
13327		page.erpllr = next
13328		if !next.hasNextLink() || !next.IsEmpty() {
13329			break
13330		}
13331	}
13332	return nil
13333}
13334
13335// Next advances to the next page of values.  If there was an error making
13336// the request the page does not advance and the error is returned.
13337// Deprecated: Use NextWithContext() instead.
13338func (page *ExpressRoutePortsLocationListResultPage) Next() error {
13339	return page.NextWithContext(context.Background())
13340}
13341
13342// NotDone returns true if the page enumeration should be started or is not yet complete.
13343func (page ExpressRoutePortsLocationListResultPage) NotDone() bool {
13344	return !page.erpllr.IsEmpty()
13345}
13346
13347// Response returns the raw server response from the last page request.
13348func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult {
13349	return page.erpllr
13350}
13351
13352// Values returns the slice of values for the current page or nil if there are no values.
13353func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation {
13354	if page.erpllr.IsEmpty() {
13355		return nil
13356	}
13357	return *page.erpllr.Value
13358}
13359
13360// Creates a new instance of the ExpressRoutePortsLocationListResultPage type.
13361func NewExpressRoutePortsLocationListResultPage(cur ExpressRoutePortsLocationListResult, getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage {
13362	return ExpressRoutePortsLocationListResultPage{
13363		fn:     getNextPage,
13364		erpllr: cur,
13365	}
13366}
13367
13368// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location
13369// resources.
13370type ExpressRoutePortsLocationPropertiesFormat struct {
13371	// Address - READ-ONLY; Address of peering location.
13372	Address *string `json:"address,omitempty"`
13373	// Contact - READ-ONLY; Contact details of peering locations.
13374	Contact *string `json:"contact,omitempty"`
13375	// AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths.
13376	AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"`
13377	// ProvisioningState - READ-ONLY; The provisioning state of the express route port location resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
13378	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13379}
13380
13381// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat.
13382func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) {
13383	objectMap := make(map[string]interface{})
13384	if erplpf.AvailableBandwidths != nil {
13385		objectMap["availableBandwidths"] = erplpf.AvailableBandwidths
13386	}
13387	return json.Marshal(objectMap)
13388}
13389
13390// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
13391type ExpressRouteServiceProvider struct {
13392	// ExpressRouteServiceProviderPropertiesFormat - Properties of the express route service provider.
13393	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
13394	// ID - Resource ID.
13395	ID *string `json:"id,omitempty"`
13396	// Name - READ-ONLY; Resource name.
13397	Name *string `json:"name,omitempty"`
13398	// Type - READ-ONLY; Resource type.
13399	Type *string `json:"type,omitempty"`
13400	// Location - Resource location.
13401	Location *string `json:"location,omitempty"`
13402	// Tags - Resource tags.
13403	Tags map[string]*string `json:"tags"`
13404}
13405
13406// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
13407func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
13408	objectMap := make(map[string]interface{})
13409	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
13410		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
13411	}
13412	if ersp.ID != nil {
13413		objectMap["id"] = ersp.ID
13414	}
13415	if ersp.Location != nil {
13416		objectMap["location"] = ersp.Location
13417	}
13418	if ersp.Tags != nil {
13419		objectMap["tags"] = ersp.Tags
13420	}
13421	return json.Marshal(objectMap)
13422}
13423
13424// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
13425func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
13426	var m map[string]*json.RawMessage
13427	err := json.Unmarshal(body, &m)
13428	if err != nil {
13429		return err
13430	}
13431	for k, v := range m {
13432		switch k {
13433		case "properties":
13434			if v != nil {
13435				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
13436				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
13437				if err != nil {
13438					return err
13439				}
13440				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
13441			}
13442		case "id":
13443			if v != nil {
13444				var ID string
13445				err = json.Unmarshal(*v, &ID)
13446				if err != nil {
13447					return err
13448				}
13449				ersp.ID = &ID
13450			}
13451		case "name":
13452			if v != nil {
13453				var name string
13454				err = json.Unmarshal(*v, &name)
13455				if err != nil {
13456					return err
13457				}
13458				ersp.Name = &name
13459			}
13460		case "type":
13461			if v != nil {
13462				var typeVar string
13463				err = json.Unmarshal(*v, &typeVar)
13464				if err != nil {
13465					return err
13466				}
13467				ersp.Type = &typeVar
13468			}
13469		case "location":
13470			if v != nil {
13471				var location string
13472				err = json.Unmarshal(*v, &location)
13473				if err != nil {
13474					return err
13475				}
13476				ersp.Location = &location
13477			}
13478		case "tags":
13479			if v != nil {
13480				var tags map[string]*string
13481				err = json.Unmarshal(*v, &tags)
13482				if err != nil {
13483					return err
13484				}
13485				ersp.Tags = tags
13486			}
13487		}
13488	}
13489
13490	return nil
13491}
13492
13493// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
13494// resources.
13495type ExpressRouteServiceProviderBandwidthsOffered struct {
13496	// OfferName - The OfferName.
13497	OfferName *string `json:"offerName,omitempty"`
13498	// ValueInMbps - The ValueInMbps.
13499	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
13500}
13501
13502// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
13503type ExpressRouteServiceProviderListResult struct {
13504	autorest.Response `json:"-"`
13505	// Value - A list of ExpressRouteResourceProvider resources.
13506	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
13507	// NextLink - The URL to get the next set of results.
13508	NextLink *string `json:"nextLink,omitempty"`
13509}
13510
13511// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
13512// ExpressRouteServiceProvider values.
13513type ExpressRouteServiceProviderListResultIterator struct {
13514	i    int
13515	page ExpressRouteServiceProviderListResultPage
13516}
13517
13518// NextWithContext advances to the next value.  If there was an error making
13519// the request the iterator does not advance and the error is returned.
13520func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
13521	if tracing.IsEnabled() {
13522		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
13523		defer func() {
13524			sc := -1
13525			if iter.Response().Response.Response != nil {
13526				sc = iter.Response().Response.Response.StatusCode
13527			}
13528			tracing.EndSpan(ctx, sc, err)
13529		}()
13530	}
13531	iter.i++
13532	if iter.i < len(iter.page.Values()) {
13533		return nil
13534	}
13535	err = iter.page.NextWithContext(ctx)
13536	if err != nil {
13537		iter.i--
13538		return err
13539	}
13540	iter.i = 0
13541	return nil
13542}
13543
13544// Next advances to the next value.  If there was an error making
13545// the request the iterator does not advance and the error is returned.
13546// Deprecated: Use NextWithContext() instead.
13547func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
13548	return iter.NextWithContext(context.Background())
13549}
13550
13551// NotDone returns true if the enumeration should be started or is not yet complete.
13552func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
13553	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13554}
13555
13556// Response returns the raw server response from the last page request.
13557func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
13558	return iter.page.Response()
13559}
13560
13561// Value returns the current value or a zero-initialized value if the
13562// iterator has advanced beyond the end of the collection.
13563func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
13564	if !iter.page.NotDone() {
13565		return ExpressRouteServiceProvider{}
13566	}
13567	return iter.page.Values()[iter.i]
13568}
13569
13570// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
13571func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
13572	return ExpressRouteServiceProviderListResultIterator{page: page}
13573}
13574
13575// IsEmpty returns true if the ListResult contains no values.
13576func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
13577	return ersplr.Value == nil || len(*ersplr.Value) == 0
13578}
13579
13580// hasNextLink returns true if the NextLink is not empty.
13581func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
13582	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
13583}
13584
13585// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
13586// It returns nil if no more results exist.
13587func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
13588	if !ersplr.hasNextLink() {
13589		return nil, nil
13590	}
13591	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13592		autorest.AsJSON(),
13593		autorest.AsGet(),
13594		autorest.WithBaseURL(to.String(ersplr.NextLink)))
13595}
13596
13597// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
13598type ExpressRouteServiceProviderListResultPage struct {
13599	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
13600	ersplr ExpressRouteServiceProviderListResult
13601}
13602
13603// NextWithContext advances to the next page of values.  If there was an error making
13604// the request the page does not advance and the error is returned.
13605func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
13606	if tracing.IsEnabled() {
13607		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
13608		defer func() {
13609			sc := -1
13610			if page.Response().Response.Response != nil {
13611				sc = page.Response().Response.Response.StatusCode
13612			}
13613			tracing.EndSpan(ctx, sc, err)
13614		}()
13615	}
13616	for {
13617		next, err := page.fn(ctx, page.ersplr)
13618		if err != nil {
13619			return err
13620		}
13621		page.ersplr = next
13622		if !next.hasNextLink() || !next.IsEmpty() {
13623			break
13624		}
13625	}
13626	return nil
13627}
13628
13629// Next advances to the next page of values.  If there was an error making
13630// the request the page does not advance and the error is returned.
13631// Deprecated: Use NextWithContext() instead.
13632func (page *ExpressRouteServiceProviderListResultPage) Next() error {
13633	return page.NextWithContext(context.Background())
13634}
13635
13636// NotDone returns true if the page enumeration should be started or is not yet complete.
13637func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
13638	return !page.ersplr.IsEmpty()
13639}
13640
13641// Response returns the raw server response from the last page request.
13642func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
13643	return page.ersplr
13644}
13645
13646// Values returns the slice of values for the current page or nil if there are no values.
13647func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
13648	if page.ersplr.IsEmpty() {
13649		return nil
13650	}
13651	return *page.ersplr.Value
13652}
13653
13654// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
13655func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
13656	return ExpressRouteServiceProviderListResultPage{
13657		fn:     getNextPage,
13658		ersplr: cur,
13659	}
13660}
13661
13662// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
13663type ExpressRouteServiceProviderPropertiesFormat struct {
13664	// PeeringLocations - A list of peering locations.
13665	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
13666	// BandwidthsOffered - A list of bandwidths offered.
13667	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
13668	// ProvisioningState - READ-ONLY; The provisioning state of the express route service provider resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
13669	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13670}
13671
13672// MarshalJSON is the custom marshaler for ExpressRouteServiceProviderPropertiesFormat.
13673func (ersppf ExpressRouteServiceProviderPropertiesFormat) MarshalJSON() ([]byte, error) {
13674	objectMap := make(map[string]interface{})
13675	if ersppf.PeeringLocations != nil {
13676		objectMap["peeringLocations"] = ersppf.PeeringLocations
13677	}
13678	if ersppf.BandwidthsOffered != nil {
13679		objectMap["bandwidthsOffered"] = ersppf.BandwidthsOffered
13680	}
13681	return json.Marshal(objectMap)
13682}
13683
13684// FirewallPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13685// long-running operation.
13686type FirewallPoliciesCreateOrUpdateFuture struct {
13687	azure.FutureAPI
13688	// Result returns the result of the asynchronous operation.
13689	// If the operation has not completed it will return an error.
13690	Result func(FirewallPoliciesClient) (FirewallPolicy, error)
13691}
13692
13693// FirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13694// operation.
13695type FirewallPoliciesDeleteFuture struct {
13696	azure.FutureAPI
13697	// Result returns the result of the asynchronous operation.
13698	// If the operation has not completed it will return an error.
13699	Result func(FirewallPoliciesClient) (autorest.Response, error)
13700}
13701
13702// FirewallPolicy firewallPolicy Resource.
13703type FirewallPolicy struct {
13704	autorest.Response `json:"-"`
13705	// FirewallPolicyPropertiesFormat - Properties of the firewall policy.
13706	*FirewallPolicyPropertiesFormat `json:"properties,omitempty"`
13707	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
13708	Etag *string `json:"etag,omitempty"`
13709	// ID - Resource ID.
13710	ID *string `json:"id,omitempty"`
13711	// Name - READ-ONLY; Resource name.
13712	Name *string `json:"name,omitempty"`
13713	// Type - READ-ONLY; Resource type.
13714	Type *string `json:"type,omitempty"`
13715	// Location - Resource location.
13716	Location *string `json:"location,omitempty"`
13717	// Tags - Resource tags.
13718	Tags map[string]*string `json:"tags"`
13719}
13720
13721// MarshalJSON is the custom marshaler for FirewallPolicy.
13722func (fp FirewallPolicy) MarshalJSON() ([]byte, error) {
13723	objectMap := make(map[string]interface{})
13724	if fp.FirewallPolicyPropertiesFormat != nil {
13725		objectMap["properties"] = fp.FirewallPolicyPropertiesFormat
13726	}
13727	if fp.ID != nil {
13728		objectMap["id"] = fp.ID
13729	}
13730	if fp.Location != nil {
13731		objectMap["location"] = fp.Location
13732	}
13733	if fp.Tags != nil {
13734		objectMap["tags"] = fp.Tags
13735	}
13736	return json.Marshal(objectMap)
13737}
13738
13739// UnmarshalJSON is the custom unmarshaler for FirewallPolicy struct.
13740func (fp *FirewallPolicy) UnmarshalJSON(body []byte) error {
13741	var m map[string]*json.RawMessage
13742	err := json.Unmarshal(body, &m)
13743	if err != nil {
13744		return err
13745	}
13746	for k, v := range m {
13747		switch k {
13748		case "properties":
13749			if v != nil {
13750				var firewallPolicyPropertiesFormat FirewallPolicyPropertiesFormat
13751				err = json.Unmarshal(*v, &firewallPolicyPropertiesFormat)
13752				if err != nil {
13753					return err
13754				}
13755				fp.FirewallPolicyPropertiesFormat = &firewallPolicyPropertiesFormat
13756			}
13757		case "etag":
13758			if v != nil {
13759				var etag string
13760				err = json.Unmarshal(*v, &etag)
13761				if err != nil {
13762					return err
13763				}
13764				fp.Etag = &etag
13765			}
13766		case "id":
13767			if v != nil {
13768				var ID string
13769				err = json.Unmarshal(*v, &ID)
13770				if err != nil {
13771					return err
13772				}
13773				fp.ID = &ID
13774			}
13775		case "name":
13776			if v != nil {
13777				var name string
13778				err = json.Unmarshal(*v, &name)
13779				if err != nil {
13780					return err
13781				}
13782				fp.Name = &name
13783			}
13784		case "type":
13785			if v != nil {
13786				var typeVar string
13787				err = json.Unmarshal(*v, &typeVar)
13788				if err != nil {
13789					return err
13790				}
13791				fp.Type = &typeVar
13792			}
13793		case "location":
13794			if v != nil {
13795				var location string
13796				err = json.Unmarshal(*v, &location)
13797				if err != nil {
13798					return err
13799				}
13800				fp.Location = &location
13801			}
13802		case "tags":
13803			if v != nil {
13804				var tags map[string]*string
13805				err = json.Unmarshal(*v, &tags)
13806				if err != nil {
13807					return err
13808				}
13809				fp.Tags = tags
13810			}
13811		}
13812	}
13813
13814	return nil
13815}
13816
13817// FirewallPolicyFilterRuleCollection firewall Policy Filter Rule Collection.
13818type FirewallPolicyFilterRuleCollection struct {
13819	// Action - The action type of a Filter rule collection.
13820	Action *FirewallPolicyFilterRuleCollectionAction `json:"action,omitempty"`
13821	// Rules - List of rules included in a rule collection.
13822	Rules *[]BasicFirewallPolicyRule `json:"rules,omitempty"`
13823	// Name - The name of the rule collection.
13824	Name *string `json:"name,omitempty"`
13825	// Priority - Priority of the Firewall Policy Rule Collection resource.
13826	Priority *int32 `json:"priority,omitempty"`
13827	// RuleCollectionType - Possible values include: 'RuleCollectionTypeFirewallPolicyRuleCollection', 'RuleCollectionTypeFirewallPolicyNatRuleCollection', 'RuleCollectionTypeFirewallPolicyFilterRuleCollection'
13828	RuleCollectionType RuleCollectionType `json:"ruleCollectionType,omitempty"`
13829}
13830
13831// MarshalJSON is the custom marshaler for FirewallPolicyFilterRuleCollection.
13832func (fpfrc FirewallPolicyFilterRuleCollection) MarshalJSON() ([]byte, error) {
13833	fpfrc.RuleCollectionType = RuleCollectionTypeFirewallPolicyFilterRuleCollection
13834	objectMap := make(map[string]interface{})
13835	if fpfrc.Action != nil {
13836		objectMap["action"] = fpfrc.Action
13837	}
13838	if fpfrc.Rules != nil {
13839		objectMap["rules"] = fpfrc.Rules
13840	}
13841	if fpfrc.Name != nil {
13842		objectMap["name"] = fpfrc.Name
13843	}
13844	if fpfrc.Priority != nil {
13845		objectMap["priority"] = fpfrc.Priority
13846	}
13847	if fpfrc.RuleCollectionType != "" {
13848		objectMap["ruleCollectionType"] = fpfrc.RuleCollectionType
13849	}
13850	return json.Marshal(objectMap)
13851}
13852
13853// AsFirewallPolicyNatRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection.
13854func (fpfrc FirewallPolicyFilterRuleCollection) AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool) {
13855	return nil, false
13856}
13857
13858// AsFirewallPolicyFilterRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection.
13859func (fpfrc FirewallPolicyFilterRuleCollection) AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool) {
13860	return &fpfrc, true
13861}
13862
13863// AsFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection.
13864func (fpfrc FirewallPolicyFilterRuleCollection) AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool) {
13865	return nil, false
13866}
13867
13868// AsBasicFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection.
13869func (fpfrc FirewallPolicyFilterRuleCollection) AsBasicFirewallPolicyRuleCollection() (BasicFirewallPolicyRuleCollection, bool) {
13870	return &fpfrc, true
13871}
13872
13873// UnmarshalJSON is the custom unmarshaler for FirewallPolicyFilterRuleCollection struct.
13874func (fpfrc *FirewallPolicyFilterRuleCollection) UnmarshalJSON(body []byte) error {
13875	var m map[string]*json.RawMessage
13876	err := json.Unmarshal(body, &m)
13877	if err != nil {
13878		return err
13879	}
13880	for k, v := range m {
13881		switch k {
13882		case "action":
13883			if v != nil {
13884				var action FirewallPolicyFilterRuleCollectionAction
13885				err = json.Unmarshal(*v, &action)
13886				if err != nil {
13887					return err
13888				}
13889				fpfrc.Action = &action
13890			}
13891		case "rules":
13892			if v != nil {
13893				rules, err := unmarshalBasicFirewallPolicyRuleArray(*v)
13894				if err != nil {
13895					return err
13896				}
13897				fpfrc.Rules = &rules
13898			}
13899		case "name":
13900			if v != nil {
13901				var name string
13902				err = json.Unmarshal(*v, &name)
13903				if err != nil {
13904					return err
13905				}
13906				fpfrc.Name = &name
13907			}
13908		case "priority":
13909			if v != nil {
13910				var priority int32
13911				err = json.Unmarshal(*v, &priority)
13912				if err != nil {
13913					return err
13914				}
13915				fpfrc.Priority = &priority
13916			}
13917		case "ruleCollectionType":
13918			if v != nil {
13919				var ruleCollectionType RuleCollectionType
13920				err = json.Unmarshal(*v, &ruleCollectionType)
13921				if err != nil {
13922					return err
13923				}
13924				fpfrc.RuleCollectionType = ruleCollectionType
13925			}
13926		}
13927	}
13928
13929	return nil
13930}
13931
13932// FirewallPolicyFilterRuleCollectionAction properties of the FirewallPolicyFilterRuleCollectionAction.
13933type FirewallPolicyFilterRuleCollectionAction struct {
13934	// Type - The type of action. Possible values include: 'FirewallPolicyFilterRuleCollectionActionTypeAllow', 'FirewallPolicyFilterRuleCollectionActionTypeDeny'
13935	Type FirewallPolicyFilterRuleCollectionActionType `json:"type,omitempty"`
13936}
13937
13938// FirewallPolicyListResult response for ListFirewallPolicies API service call.
13939type FirewallPolicyListResult struct {
13940	autorest.Response `json:"-"`
13941	// Value - List of Firewall Policies in a resource group.
13942	Value *[]FirewallPolicy `json:"value,omitempty"`
13943	// NextLink - URL to get the next set of results.
13944	NextLink *string `json:"nextLink,omitempty"`
13945}
13946
13947// FirewallPolicyListResultIterator provides access to a complete listing of FirewallPolicy values.
13948type FirewallPolicyListResultIterator struct {
13949	i    int
13950	page FirewallPolicyListResultPage
13951}
13952
13953// NextWithContext advances to the next value.  If there was an error making
13954// the request the iterator does not advance and the error is returned.
13955func (iter *FirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
13956	if tracing.IsEnabled() {
13957		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultIterator.NextWithContext")
13958		defer func() {
13959			sc := -1
13960			if iter.Response().Response.Response != nil {
13961				sc = iter.Response().Response.Response.StatusCode
13962			}
13963			tracing.EndSpan(ctx, sc, err)
13964		}()
13965	}
13966	iter.i++
13967	if iter.i < len(iter.page.Values()) {
13968		return nil
13969	}
13970	err = iter.page.NextWithContext(ctx)
13971	if err != nil {
13972		iter.i--
13973		return err
13974	}
13975	iter.i = 0
13976	return nil
13977}
13978
13979// Next advances to the next value.  If there was an error making
13980// the request the iterator does not advance and the error is returned.
13981// Deprecated: Use NextWithContext() instead.
13982func (iter *FirewallPolicyListResultIterator) Next() error {
13983	return iter.NextWithContext(context.Background())
13984}
13985
13986// NotDone returns true if the enumeration should be started or is not yet complete.
13987func (iter FirewallPolicyListResultIterator) NotDone() bool {
13988	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13989}
13990
13991// Response returns the raw server response from the last page request.
13992func (iter FirewallPolicyListResultIterator) Response() FirewallPolicyListResult {
13993	return iter.page.Response()
13994}
13995
13996// Value returns the current value or a zero-initialized value if the
13997// iterator has advanced beyond the end of the collection.
13998func (iter FirewallPolicyListResultIterator) Value() FirewallPolicy {
13999	if !iter.page.NotDone() {
14000		return FirewallPolicy{}
14001	}
14002	return iter.page.Values()[iter.i]
14003}
14004
14005// Creates a new instance of the FirewallPolicyListResultIterator type.
14006func NewFirewallPolicyListResultIterator(page FirewallPolicyListResultPage) FirewallPolicyListResultIterator {
14007	return FirewallPolicyListResultIterator{page: page}
14008}
14009
14010// IsEmpty returns true if the ListResult contains no values.
14011func (fplr FirewallPolicyListResult) IsEmpty() bool {
14012	return fplr.Value == nil || len(*fplr.Value) == 0
14013}
14014
14015// hasNextLink returns true if the NextLink is not empty.
14016func (fplr FirewallPolicyListResult) hasNextLink() bool {
14017	return fplr.NextLink != nil && len(*fplr.NextLink) != 0
14018}
14019
14020// firewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
14021// It returns nil if no more results exist.
14022func (fplr FirewallPolicyListResult) firewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
14023	if !fplr.hasNextLink() {
14024		return nil, nil
14025	}
14026	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14027		autorest.AsJSON(),
14028		autorest.AsGet(),
14029		autorest.WithBaseURL(to.String(fplr.NextLink)))
14030}
14031
14032// FirewallPolicyListResultPage contains a page of FirewallPolicy values.
14033type FirewallPolicyListResultPage struct {
14034	fn   func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)
14035	fplr FirewallPolicyListResult
14036}
14037
14038// NextWithContext advances to the next page of values.  If there was an error making
14039// the request the page does not advance and the error is returned.
14040func (page *FirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
14041	if tracing.IsEnabled() {
14042		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultPage.NextWithContext")
14043		defer func() {
14044			sc := -1
14045			if page.Response().Response.Response != nil {
14046				sc = page.Response().Response.Response.StatusCode
14047			}
14048			tracing.EndSpan(ctx, sc, err)
14049		}()
14050	}
14051	for {
14052		next, err := page.fn(ctx, page.fplr)
14053		if err != nil {
14054			return err
14055		}
14056		page.fplr = next
14057		if !next.hasNextLink() || !next.IsEmpty() {
14058			break
14059		}
14060	}
14061	return nil
14062}
14063
14064// Next advances to the next page of values.  If there was an error making
14065// the request the page does not advance and the error is returned.
14066// Deprecated: Use NextWithContext() instead.
14067func (page *FirewallPolicyListResultPage) Next() error {
14068	return page.NextWithContext(context.Background())
14069}
14070
14071// NotDone returns true if the page enumeration should be started or is not yet complete.
14072func (page FirewallPolicyListResultPage) NotDone() bool {
14073	return !page.fplr.IsEmpty()
14074}
14075
14076// Response returns the raw server response from the last page request.
14077func (page FirewallPolicyListResultPage) Response() FirewallPolicyListResult {
14078	return page.fplr
14079}
14080
14081// Values returns the slice of values for the current page or nil if there are no values.
14082func (page FirewallPolicyListResultPage) Values() []FirewallPolicy {
14083	if page.fplr.IsEmpty() {
14084		return nil
14085	}
14086	return *page.fplr.Value
14087}
14088
14089// Creates a new instance of the FirewallPolicyListResultPage type.
14090func NewFirewallPolicyListResultPage(cur FirewallPolicyListResult, getNextPage func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)) FirewallPolicyListResultPage {
14091	return FirewallPolicyListResultPage{
14092		fn:   getNextPage,
14093		fplr: cur,
14094	}
14095}
14096
14097// FirewallPolicyNatRuleCollection firewall Policy NAT Rule Collection.
14098type FirewallPolicyNatRuleCollection struct {
14099	// Action - The action type of a Nat rule collection.
14100	Action *FirewallPolicyNatRuleCollectionAction `json:"action,omitempty"`
14101	// Rules - List of rules included in a rule collection.
14102	Rules *[]BasicFirewallPolicyRule `json:"rules,omitempty"`
14103	// Name - The name of the rule collection.
14104	Name *string `json:"name,omitempty"`
14105	// Priority - Priority of the Firewall Policy Rule Collection resource.
14106	Priority *int32 `json:"priority,omitempty"`
14107	// RuleCollectionType - Possible values include: 'RuleCollectionTypeFirewallPolicyRuleCollection', 'RuleCollectionTypeFirewallPolicyNatRuleCollection', 'RuleCollectionTypeFirewallPolicyFilterRuleCollection'
14108	RuleCollectionType RuleCollectionType `json:"ruleCollectionType,omitempty"`
14109}
14110
14111// MarshalJSON is the custom marshaler for FirewallPolicyNatRuleCollection.
14112func (fpnrc FirewallPolicyNatRuleCollection) MarshalJSON() ([]byte, error) {
14113	fpnrc.RuleCollectionType = RuleCollectionTypeFirewallPolicyNatRuleCollection
14114	objectMap := make(map[string]interface{})
14115	if fpnrc.Action != nil {
14116		objectMap["action"] = fpnrc.Action
14117	}
14118	if fpnrc.Rules != nil {
14119		objectMap["rules"] = fpnrc.Rules
14120	}
14121	if fpnrc.Name != nil {
14122		objectMap["name"] = fpnrc.Name
14123	}
14124	if fpnrc.Priority != nil {
14125		objectMap["priority"] = fpnrc.Priority
14126	}
14127	if fpnrc.RuleCollectionType != "" {
14128		objectMap["ruleCollectionType"] = fpnrc.RuleCollectionType
14129	}
14130	return json.Marshal(objectMap)
14131}
14132
14133// AsFirewallPolicyNatRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection.
14134func (fpnrc FirewallPolicyNatRuleCollection) AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool) {
14135	return &fpnrc, true
14136}
14137
14138// AsFirewallPolicyFilterRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection.
14139func (fpnrc FirewallPolicyNatRuleCollection) AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool) {
14140	return nil, false
14141}
14142
14143// AsFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection.
14144func (fpnrc FirewallPolicyNatRuleCollection) AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool) {
14145	return nil, false
14146}
14147
14148// AsBasicFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection.
14149func (fpnrc FirewallPolicyNatRuleCollection) AsBasicFirewallPolicyRuleCollection() (BasicFirewallPolicyRuleCollection, bool) {
14150	return &fpnrc, true
14151}
14152
14153// UnmarshalJSON is the custom unmarshaler for FirewallPolicyNatRuleCollection struct.
14154func (fpnrc *FirewallPolicyNatRuleCollection) UnmarshalJSON(body []byte) error {
14155	var m map[string]*json.RawMessage
14156	err := json.Unmarshal(body, &m)
14157	if err != nil {
14158		return err
14159	}
14160	for k, v := range m {
14161		switch k {
14162		case "action":
14163			if v != nil {
14164				var action FirewallPolicyNatRuleCollectionAction
14165				err = json.Unmarshal(*v, &action)
14166				if err != nil {
14167					return err
14168				}
14169				fpnrc.Action = &action
14170			}
14171		case "rules":
14172			if v != nil {
14173				rules, err := unmarshalBasicFirewallPolicyRuleArray(*v)
14174				if err != nil {
14175					return err
14176				}
14177				fpnrc.Rules = &rules
14178			}
14179		case "name":
14180			if v != nil {
14181				var name string
14182				err = json.Unmarshal(*v, &name)
14183				if err != nil {
14184					return err
14185				}
14186				fpnrc.Name = &name
14187			}
14188		case "priority":
14189			if v != nil {
14190				var priority int32
14191				err = json.Unmarshal(*v, &priority)
14192				if err != nil {
14193					return err
14194				}
14195				fpnrc.Priority = &priority
14196			}
14197		case "ruleCollectionType":
14198			if v != nil {
14199				var ruleCollectionType RuleCollectionType
14200				err = json.Unmarshal(*v, &ruleCollectionType)
14201				if err != nil {
14202					return err
14203				}
14204				fpnrc.RuleCollectionType = ruleCollectionType
14205			}
14206		}
14207	}
14208
14209	return nil
14210}
14211
14212// FirewallPolicyNatRuleCollectionAction properties of the FirewallPolicyNatRuleCollectionAction.
14213type FirewallPolicyNatRuleCollectionAction struct {
14214	// Type - The type of action. Possible values include: 'DNAT'
14215	Type FirewallPolicyNatRuleCollectionActionType `json:"type,omitempty"`
14216}
14217
14218// FirewallPolicyPropertiesFormat firewall Policy definition.
14219type FirewallPolicyPropertiesFormat struct {
14220	// RuleCollectionGroups - READ-ONLY; List of references to FirewallPolicyRuleCollectionGroups.
14221	RuleCollectionGroups *[]SubResource `json:"ruleCollectionGroups,omitempty"`
14222	// ProvisioningState - READ-ONLY; The provisioning state of the firewall policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
14223	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14224	// BasePolicy - The parent firewall policy from which rules are inherited.
14225	BasePolicy *SubResource `json:"basePolicy,omitempty"`
14226	// Firewalls - READ-ONLY; List of references to Azure Firewalls that this Firewall Policy is associated with.
14227	Firewalls *[]SubResource `json:"firewalls,omitempty"`
14228	// ChildPolicies - READ-ONLY; List of references to Child Firewall Policies.
14229	ChildPolicies *[]SubResource `json:"childPolicies,omitempty"`
14230	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
14231	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
14232	// ThreatIntelWhitelist - ThreatIntel Whitelist for Firewall Policy.
14233	ThreatIntelWhitelist *FirewallPolicyThreatIntelWhitelist `json:"threatIntelWhitelist,omitempty"`
14234	// DNSSettings - DNS Proxy Settings definition.
14235	DNSSettings *DNSSettings `json:"dnsSettings,omitempty"`
14236}
14237
14238// MarshalJSON is the custom marshaler for FirewallPolicyPropertiesFormat.
14239func (fppf FirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
14240	objectMap := make(map[string]interface{})
14241	if fppf.BasePolicy != nil {
14242		objectMap["basePolicy"] = fppf.BasePolicy
14243	}
14244	if fppf.ThreatIntelMode != "" {
14245		objectMap["threatIntelMode"] = fppf.ThreatIntelMode
14246	}
14247	if fppf.ThreatIntelWhitelist != nil {
14248		objectMap["threatIntelWhitelist"] = fppf.ThreatIntelWhitelist
14249	}
14250	if fppf.DNSSettings != nil {
14251		objectMap["dnsSettings"] = fppf.DNSSettings
14252	}
14253	return json.Marshal(objectMap)
14254}
14255
14256// BasicFirewallPolicyRule properties of a rule.
14257type BasicFirewallPolicyRule interface {
14258	AsApplicationRule() (*ApplicationRule, bool)
14259	AsNatRule() (*NatRule, bool)
14260	AsRule() (*Rule, bool)
14261	AsFirewallPolicyRule() (*FirewallPolicyRule, bool)
14262}
14263
14264// FirewallPolicyRule properties of a rule.
14265type FirewallPolicyRule struct {
14266	// Name - Name of the rule.
14267	Name *string `json:"name,omitempty"`
14268	// Description - Description of the rule.
14269	Description *string `json:"description,omitempty"`
14270	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule'
14271	RuleType RuleType `json:"ruleType,omitempty"`
14272}
14273
14274func unmarshalBasicFirewallPolicyRule(body []byte) (BasicFirewallPolicyRule, error) {
14275	var m map[string]interface{}
14276	err := json.Unmarshal(body, &m)
14277	if err != nil {
14278		return nil, err
14279	}
14280
14281	switch m["ruleType"] {
14282	case string(RuleTypeApplicationRule):
14283		var ar ApplicationRule
14284		err := json.Unmarshal(body, &ar)
14285		return ar, err
14286	case string(RuleTypeNatRule):
14287		var nr NatRule
14288		err := json.Unmarshal(body, &nr)
14289		return nr, err
14290	case string(RuleTypeNetworkRule):
14291		var r Rule
14292		err := json.Unmarshal(body, &r)
14293		return r, err
14294	default:
14295		var fpr FirewallPolicyRule
14296		err := json.Unmarshal(body, &fpr)
14297		return fpr, err
14298	}
14299}
14300func unmarshalBasicFirewallPolicyRuleArray(body []byte) ([]BasicFirewallPolicyRule, error) {
14301	var rawMessages []*json.RawMessage
14302	err := json.Unmarshal(body, &rawMessages)
14303	if err != nil {
14304		return nil, err
14305	}
14306
14307	fprArray := make([]BasicFirewallPolicyRule, len(rawMessages))
14308
14309	for index, rawMessage := range rawMessages {
14310		fpr, err := unmarshalBasicFirewallPolicyRule(*rawMessage)
14311		if err != nil {
14312			return nil, err
14313		}
14314		fprArray[index] = fpr
14315	}
14316	return fprArray, nil
14317}
14318
14319// MarshalJSON is the custom marshaler for FirewallPolicyRule.
14320func (fpr FirewallPolicyRule) MarshalJSON() ([]byte, error) {
14321	fpr.RuleType = RuleTypeFirewallPolicyRule
14322	objectMap := make(map[string]interface{})
14323	if fpr.Name != nil {
14324		objectMap["name"] = fpr.Name
14325	}
14326	if fpr.Description != nil {
14327		objectMap["description"] = fpr.Description
14328	}
14329	if fpr.RuleType != "" {
14330		objectMap["ruleType"] = fpr.RuleType
14331	}
14332	return json.Marshal(objectMap)
14333}
14334
14335// AsApplicationRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
14336func (fpr FirewallPolicyRule) AsApplicationRule() (*ApplicationRule, bool) {
14337	return nil, false
14338}
14339
14340// AsNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
14341func (fpr FirewallPolicyRule) AsNatRule() (*NatRule, bool) {
14342	return nil, false
14343}
14344
14345// AsRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
14346func (fpr FirewallPolicyRule) AsRule() (*Rule, bool) {
14347	return nil, false
14348}
14349
14350// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
14351func (fpr FirewallPolicyRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
14352	return &fpr, true
14353}
14354
14355// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
14356func (fpr FirewallPolicyRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
14357	return &fpr, true
14358}
14359
14360// FirewallPolicyRuleApplicationProtocol properties of the application rule protocol.
14361type FirewallPolicyRuleApplicationProtocol struct {
14362	// ProtocolType - Protocol type. Possible values include: 'FirewallPolicyRuleApplicationProtocolTypeHTTP', 'FirewallPolicyRuleApplicationProtocolTypeHTTPS'
14363	ProtocolType FirewallPolicyRuleApplicationProtocolType `json:"protocolType,omitempty"`
14364	// Port - Port number for the protocol, cannot be greater than 64000.
14365	Port *int32 `json:"port,omitempty"`
14366}
14367
14368// BasicFirewallPolicyRuleCollection properties of the rule collection.
14369type BasicFirewallPolicyRuleCollection interface {
14370	AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool)
14371	AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool)
14372	AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool)
14373}
14374
14375// FirewallPolicyRuleCollection properties of the rule collection.
14376type FirewallPolicyRuleCollection struct {
14377	// Name - The name of the rule collection.
14378	Name *string `json:"name,omitempty"`
14379	// Priority - Priority of the Firewall Policy Rule Collection resource.
14380	Priority *int32 `json:"priority,omitempty"`
14381	// RuleCollectionType - Possible values include: 'RuleCollectionTypeFirewallPolicyRuleCollection', 'RuleCollectionTypeFirewallPolicyNatRuleCollection', 'RuleCollectionTypeFirewallPolicyFilterRuleCollection'
14382	RuleCollectionType RuleCollectionType `json:"ruleCollectionType,omitempty"`
14383}
14384
14385func unmarshalBasicFirewallPolicyRuleCollection(body []byte) (BasicFirewallPolicyRuleCollection, error) {
14386	var m map[string]interface{}
14387	err := json.Unmarshal(body, &m)
14388	if err != nil {
14389		return nil, err
14390	}
14391
14392	switch m["ruleCollectionType"] {
14393	case string(RuleCollectionTypeFirewallPolicyNatRuleCollection):
14394		var fpnrc FirewallPolicyNatRuleCollection
14395		err := json.Unmarshal(body, &fpnrc)
14396		return fpnrc, err
14397	case string(RuleCollectionTypeFirewallPolicyFilterRuleCollection):
14398		var fpfrc FirewallPolicyFilterRuleCollection
14399		err := json.Unmarshal(body, &fpfrc)
14400		return fpfrc, err
14401	default:
14402		var fprc FirewallPolicyRuleCollection
14403		err := json.Unmarshal(body, &fprc)
14404		return fprc, err
14405	}
14406}
14407func unmarshalBasicFirewallPolicyRuleCollectionArray(body []byte) ([]BasicFirewallPolicyRuleCollection, error) {
14408	var rawMessages []*json.RawMessage
14409	err := json.Unmarshal(body, &rawMessages)
14410	if err != nil {
14411		return nil, err
14412	}
14413
14414	fprcArray := make([]BasicFirewallPolicyRuleCollection, len(rawMessages))
14415
14416	for index, rawMessage := range rawMessages {
14417		fprc, err := unmarshalBasicFirewallPolicyRuleCollection(*rawMessage)
14418		if err != nil {
14419			return nil, err
14420		}
14421		fprcArray[index] = fprc
14422	}
14423	return fprcArray, nil
14424}
14425
14426// MarshalJSON is the custom marshaler for FirewallPolicyRuleCollection.
14427func (fprc FirewallPolicyRuleCollection) MarshalJSON() ([]byte, error) {
14428	fprc.RuleCollectionType = RuleCollectionTypeFirewallPolicyRuleCollection
14429	objectMap := make(map[string]interface{})
14430	if fprc.Name != nil {
14431		objectMap["name"] = fprc.Name
14432	}
14433	if fprc.Priority != nil {
14434		objectMap["priority"] = fprc.Priority
14435	}
14436	if fprc.RuleCollectionType != "" {
14437		objectMap["ruleCollectionType"] = fprc.RuleCollectionType
14438	}
14439	return json.Marshal(objectMap)
14440}
14441
14442// AsFirewallPolicyNatRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection.
14443func (fprc FirewallPolicyRuleCollection) AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool) {
14444	return nil, false
14445}
14446
14447// AsFirewallPolicyFilterRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection.
14448func (fprc FirewallPolicyRuleCollection) AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool) {
14449	return nil, false
14450}
14451
14452// AsFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection.
14453func (fprc FirewallPolicyRuleCollection) AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool) {
14454	return &fprc, true
14455}
14456
14457// AsBasicFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection.
14458func (fprc FirewallPolicyRuleCollection) AsBasicFirewallPolicyRuleCollection() (BasicFirewallPolicyRuleCollection, bool) {
14459	return &fprc, true
14460}
14461
14462// FirewallPolicyRuleCollectionGroup rule Collection Group resource.
14463type FirewallPolicyRuleCollectionGroup struct {
14464	autorest.Response `json:"-"`
14465	// FirewallPolicyRuleCollectionGroupProperties - The properties of the firewall policy rule collection group.
14466	*FirewallPolicyRuleCollectionGroupProperties `json:"properties,omitempty"`
14467	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14468	Name *string `json:"name,omitempty"`
14469	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
14470	Etag *string `json:"etag,omitempty"`
14471	// Type - READ-ONLY; Rule Group type.
14472	Type *string `json:"type,omitempty"`
14473	// ID - Resource ID.
14474	ID *string `json:"id,omitempty"`
14475}
14476
14477// MarshalJSON is the custom marshaler for FirewallPolicyRuleCollectionGroup.
14478func (fprcg FirewallPolicyRuleCollectionGroup) MarshalJSON() ([]byte, error) {
14479	objectMap := make(map[string]interface{})
14480	if fprcg.FirewallPolicyRuleCollectionGroupProperties != nil {
14481		objectMap["properties"] = fprcg.FirewallPolicyRuleCollectionGroupProperties
14482	}
14483	if fprcg.Name != nil {
14484		objectMap["name"] = fprcg.Name
14485	}
14486	if fprcg.ID != nil {
14487		objectMap["id"] = fprcg.ID
14488	}
14489	return json.Marshal(objectMap)
14490}
14491
14492// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleCollectionGroup struct.
14493func (fprcg *FirewallPolicyRuleCollectionGroup) UnmarshalJSON(body []byte) error {
14494	var m map[string]*json.RawMessage
14495	err := json.Unmarshal(body, &m)
14496	if err != nil {
14497		return err
14498	}
14499	for k, v := range m {
14500		switch k {
14501		case "properties":
14502			if v != nil {
14503				var firewallPolicyRuleCollectionGroupProperties FirewallPolicyRuleCollectionGroupProperties
14504				err = json.Unmarshal(*v, &firewallPolicyRuleCollectionGroupProperties)
14505				if err != nil {
14506					return err
14507				}
14508				fprcg.FirewallPolicyRuleCollectionGroupProperties = &firewallPolicyRuleCollectionGroupProperties
14509			}
14510		case "name":
14511			if v != nil {
14512				var name string
14513				err = json.Unmarshal(*v, &name)
14514				if err != nil {
14515					return err
14516				}
14517				fprcg.Name = &name
14518			}
14519		case "etag":
14520			if v != nil {
14521				var etag string
14522				err = json.Unmarshal(*v, &etag)
14523				if err != nil {
14524					return err
14525				}
14526				fprcg.Etag = &etag
14527			}
14528		case "type":
14529			if v != nil {
14530				var typeVar string
14531				err = json.Unmarshal(*v, &typeVar)
14532				if err != nil {
14533					return err
14534				}
14535				fprcg.Type = &typeVar
14536			}
14537		case "id":
14538			if v != nil {
14539				var ID string
14540				err = json.Unmarshal(*v, &ID)
14541				if err != nil {
14542					return err
14543				}
14544				fprcg.ID = &ID
14545			}
14546		}
14547	}
14548
14549	return nil
14550}
14551
14552// FirewallPolicyRuleCollectionGroupListResult response for ListFirewallPolicyRuleCollectionGroups API
14553// service call.
14554type FirewallPolicyRuleCollectionGroupListResult struct {
14555	autorest.Response `json:"-"`
14556	// Value - List of FirewallPolicyRuleCollectionGroups in a FirewallPolicy.
14557	Value *[]FirewallPolicyRuleCollectionGroup `json:"value,omitempty"`
14558	// NextLink - URL to get the next set of results.
14559	NextLink *string `json:"nextLink,omitempty"`
14560}
14561
14562// FirewallPolicyRuleCollectionGroupListResultIterator provides access to a complete listing of
14563// FirewallPolicyRuleCollectionGroup values.
14564type FirewallPolicyRuleCollectionGroupListResultIterator struct {
14565	i    int
14566	page FirewallPolicyRuleCollectionGroupListResultPage
14567}
14568
14569// NextWithContext advances to the next value.  If there was an error making
14570// the request the iterator does not advance and the error is returned.
14571func (iter *FirewallPolicyRuleCollectionGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
14572	if tracing.IsEnabled() {
14573		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleCollectionGroupListResultIterator.NextWithContext")
14574		defer func() {
14575			sc := -1
14576			if iter.Response().Response.Response != nil {
14577				sc = iter.Response().Response.Response.StatusCode
14578			}
14579			tracing.EndSpan(ctx, sc, err)
14580		}()
14581	}
14582	iter.i++
14583	if iter.i < len(iter.page.Values()) {
14584		return nil
14585	}
14586	err = iter.page.NextWithContext(ctx)
14587	if err != nil {
14588		iter.i--
14589		return err
14590	}
14591	iter.i = 0
14592	return nil
14593}
14594
14595// Next advances to the next value.  If there was an error making
14596// the request the iterator does not advance and the error is returned.
14597// Deprecated: Use NextWithContext() instead.
14598func (iter *FirewallPolicyRuleCollectionGroupListResultIterator) Next() error {
14599	return iter.NextWithContext(context.Background())
14600}
14601
14602// NotDone returns true if the enumeration should be started or is not yet complete.
14603func (iter FirewallPolicyRuleCollectionGroupListResultIterator) NotDone() bool {
14604	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14605}
14606
14607// Response returns the raw server response from the last page request.
14608func (iter FirewallPolicyRuleCollectionGroupListResultIterator) Response() FirewallPolicyRuleCollectionGroupListResult {
14609	return iter.page.Response()
14610}
14611
14612// Value returns the current value or a zero-initialized value if the
14613// iterator has advanced beyond the end of the collection.
14614func (iter FirewallPolicyRuleCollectionGroupListResultIterator) Value() FirewallPolicyRuleCollectionGroup {
14615	if !iter.page.NotDone() {
14616		return FirewallPolicyRuleCollectionGroup{}
14617	}
14618	return iter.page.Values()[iter.i]
14619}
14620
14621// Creates a new instance of the FirewallPolicyRuleCollectionGroupListResultIterator type.
14622func NewFirewallPolicyRuleCollectionGroupListResultIterator(page FirewallPolicyRuleCollectionGroupListResultPage) FirewallPolicyRuleCollectionGroupListResultIterator {
14623	return FirewallPolicyRuleCollectionGroupListResultIterator{page: page}
14624}
14625
14626// IsEmpty returns true if the ListResult contains no values.
14627func (fprcglr FirewallPolicyRuleCollectionGroupListResult) IsEmpty() bool {
14628	return fprcglr.Value == nil || len(*fprcglr.Value) == 0
14629}
14630
14631// hasNextLink returns true if the NextLink is not empty.
14632func (fprcglr FirewallPolicyRuleCollectionGroupListResult) hasNextLink() bool {
14633	return fprcglr.NextLink != nil && len(*fprcglr.NextLink) != 0
14634}
14635
14636// firewallPolicyRuleCollectionGroupListResultPreparer prepares a request to retrieve the next set of results.
14637// It returns nil if no more results exist.
14638func (fprcglr FirewallPolicyRuleCollectionGroupListResult) firewallPolicyRuleCollectionGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
14639	if !fprcglr.hasNextLink() {
14640		return nil, nil
14641	}
14642	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14643		autorest.AsJSON(),
14644		autorest.AsGet(),
14645		autorest.WithBaseURL(to.String(fprcglr.NextLink)))
14646}
14647
14648// FirewallPolicyRuleCollectionGroupListResultPage contains a page of FirewallPolicyRuleCollectionGroup
14649// values.
14650type FirewallPolicyRuleCollectionGroupListResultPage struct {
14651	fn      func(context.Context, FirewallPolicyRuleCollectionGroupListResult) (FirewallPolicyRuleCollectionGroupListResult, error)
14652	fprcglr FirewallPolicyRuleCollectionGroupListResult
14653}
14654
14655// NextWithContext advances to the next page of values.  If there was an error making
14656// the request the page does not advance and the error is returned.
14657func (page *FirewallPolicyRuleCollectionGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
14658	if tracing.IsEnabled() {
14659		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleCollectionGroupListResultPage.NextWithContext")
14660		defer func() {
14661			sc := -1
14662			if page.Response().Response.Response != nil {
14663				sc = page.Response().Response.Response.StatusCode
14664			}
14665			tracing.EndSpan(ctx, sc, err)
14666		}()
14667	}
14668	for {
14669		next, err := page.fn(ctx, page.fprcglr)
14670		if err != nil {
14671			return err
14672		}
14673		page.fprcglr = next
14674		if !next.hasNextLink() || !next.IsEmpty() {
14675			break
14676		}
14677	}
14678	return nil
14679}
14680
14681// Next advances to the next page of values.  If there was an error making
14682// the request the page does not advance and the error is returned.
14683// Deprecated: Use NextWithContext() instead.
14684func (page *FirewallPolicyRuleCollectionGroupListResultPage) Next() error {
14685	return page.NextWithContext(context.Background())
14686}
14687
14688// NotDone returns true if the page enumeration should be started or is not yet complete.
14689func (page FirewallPolicyRuleCollectionGroupListResultPage) NotDone() bool {
14690	return !page.fprcglr.IsEmpty()
14691}
14692
14693// Response returns the raw server response from the last page request.
14694func (page FirewallPolicyRuleCollectionGroupListResultPage) Response() FirewallPolicyRuleCollectionGroupListResult {
14695	return page.fprcglr
14696}
14697
14698// Values returns the slice of values for the current page or nil if there are no values.
14699func (page FirewallPolicyRuleCollectionGroupListResultPage) Values() []FirewallPolicyRuleCollectionGroup {
14700	if page.fprcglr.IsEmpty() {
14701		return nil
14702	}
14703	return *page.fprcglr.Value
14704}
14705
14706// Creates a new instance of the FirewallPolicyRuleCollectionGroupListResultPage type.
14707func NewFirewallPolicyRuleCollectionGroupListResultPage(cur FirewallPolicyRuleCollectionGroupListResult, getNextPage func(context.Context, FirewallPolicyRuleCollectionGroupListResult) (FirewallPolicyRuleCollectionGroupListResult, error)) FirewallPolicyRuleCollectionGroupListResultPage {
14708	return FirewallPolicyRuleCollectionGroupListResultPage{
14709		fn:      getNextPage,
14710		fprcglr: cur,
14711	}
14712}
14713
14714// FirewallPolicyRuleCollectionGroupProperties properties of the rule collection group.
14715type FirewallPolicyRuleCollectionGroupProperties struct {
14716	// Priority - Priority of the Firewall Policy Rule Collection Group resource.
14717	Priority *int32 `json:"priority,omitempty"`
14718	// RuleCollections - Group of Firewall Policy rule collections.
14719	RuleCollections *[]BasicFirewallPolicyRuleCollection `json:"ruleCollections,omitempty"`
14720	// ProvisioningState - READ-ONLY; The provisioning state of the firewall policy rule collection group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
14721	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14722}
14723
14724// MarshalJSON is the custom marshaler for FirewallPolicyRuleCollectionGroupProperties.
14725func (fprcgp FirewallPolicyRuleCollectionGroupProperties) MarshalJSON() ([]byte, error) {
14726	objectMap := make(map[string]interface{})
14727	if fprcgp.Priority != nil {
14728		objectMap["priority"] = fprcgp.Priority
14729	}
14730	if fprcgp.RuleCollections != nil {
14731		objectMap["ruleCollections"] = fprcgp.RuleCollections
14732	}
14733	return json.Marshal(objectMap)
14734}
14735
14736// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleCollectionGroupProperties struct.
14737func (fprcgp *FirewallPolicyRuleCollectionGroupProperties) UnmarshalJSON(body []byte) error {
14738	var m map[string]*json.RawMessage
14739	err := json.Unmarshal(body, &m)
14740	if err != nil {
14741		return err
14742	}
14743	for k, v := range m {
14744		switch k {
14745		case "priority":
14746			if v != nil {
14747				var priority int32
14748				err = json.Unmarshal(*v, &priority)
14749				if err != nil {
14750					return err
14751				}
14752				fprcgp.Priority = &priority
14753			}
14754		case "ruleCollections":
14755			if v != nil {
14756				ruleCollections, err := unmarshalBasicFirewallPolicyRuleCollectionArray(*v)
14757				if err != nil {
14758					return err
14759				}
14760				fprcgp.RuleCollections = &ruleCollections
14761			}
14762		case "provisioningState":
14763			if v != nil {
14764				var provisioningState ProvisioningState
14765				err = json.Unmarshal(*v, &provisioningState)
14766				if err != nil {
14767					return err
14768				}
14769				fprcgp.ProvisioningState = provisioningState
14770			}
14771		}
14772	}
14773
14774	return nil
14775}
14776
14777// FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
14778// results of a long-running operation.
14779type FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture struct {
14780	azure.FutureAPI
14781	// Result returns the result of the asynchronous operation.
14782	// If the operation has not completed it will return an error.
14783	Result func(FirewallPolicyRuleCollectionGroupsClient) (FirewallPolicyRuleCollectionGroup, error)
14784}
14785
14786// FirewallPolicyRuleCollectionGroupsDeleteFuture an abstraction for monitoring and retrieving the results
14787// of a long-running operation.
14788type FirewallPolicyRuleCollectionGroupsDeleteFuture struct {
14789	azure.FutureAPI
14790	// Result returns the result of the asynchronous operation.
14791	// If the operation has not completed it will return an error.
14792	Result func(FirewallPolicyRuleCollectionGroupsClient) (autorest.Response, error)
14793}
14794
14795// FirewallPolicyThreatIntelWhitelist threatIntel Whitelist for Firewall Policy.
14796type FirewallPolicyThreatIntelWhitelist struct {
14797	// IPAddresses - List of IP addresses for the ThreatIntel Whitelist.
14798	IPAddresses *[]string `json:"ipAddresses,omitempty"`
14799	// Fqdns - List of FQDNs for the ThreatIntel Whitelist.
14800	Fqdns *[]string `json:"fqdns,omitempty"`
14801}
14802
14803// FlowLog a flow log resource.
14804type FlowLog struct {
14805	autorest.Response `json:"-"`
14806	// FlowLogPropertiesFormat - Properties of the flow log.
14807	*FlowLogPropertiesFormat `json:"properties,omitempty"`
14808	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
14809	Etag *string `json:"etag,omitempty"`
14810	// ID - Resource ID.
14811	ID *string `json:"id,omitempty"`
14812	// Name - READ-ONLY; Resource name.
14813	Name *string `json:"name,omitempty"`
14814	// Type - READ-ONLY; Resource type.
14815	Type *string `json:"type,omitempty"`
14816	// Location - Resource location.
14817	Location *string `json:"location,omitempty"`
14818	// Tags - Resource tags.
14819	Tags map[string]*string `json:"tags"`
14820}
14821
14822// MarshalJSON is the custom marshaler for FlowLog.
14823func (fl FlowLog) MarshalJSON() ([]byte, error) {
14824	objectMap := make(map[string]interface{})
14825	if fl.FlowLogPropertiesFormat != nil {
14826		objectMap["properties"] = fl.FlowLogPropertiesFormat
14827	}
14828	if fl.ID != nil {
14829		objectMap["id"] = fl.ID
14830	}
14831	if fl.Location != nil {
14832		objectMap["location"] = fl.Location
14833	}
14834	if fl.Tags != nil {
14835		objectMap["tags"] = fl.Tags
14836	}
14837	return json.Marshal(objectMap)
14838}
14839
14840// UnmarshalJSON is the custom unmarshaler for FlowLog struct.
14841func (fl *FlowLog) UnmarshalJSON(body []byte) error {
14842	var m map[string]*json.RawMessage
14843	err := json.Unmarshal(body, &m)
14844	if err != nil {
14845		return err
14846	}
14847	for k, v := range m {
14848		switch k {
14849		case "properties":
14850			if v != nil {
14851				var flowLogPropertiesFormat FlowLogPropertiesFormat
14852				err = json.Unmarshal(*v, &flowLogPropertiesFormat)
14853				if err != nil {
14854					return err
14855				}
14856				fl.FlowLogPropertiesFormat = &flowLogPropertiesFormat
14857			}
14858		case "etag":
14859			if v != nil {
14860				var etag string
14861				err = json.Unmarshal(*v, &etag)
14862				if err != nil {
14863					return err
14864				}
14865				fl.Etag = &etag
14866			}
14867		case "id":
14868			if v != nil {
14869				var ID string
14870				err = json.Unmarshal(*v, &ID)
14871				if err != nil {
14872					return err
14873				}
14874				fl.ID = &ID
14875			}
14876		case "name":
14877			if v != nil {
14878				var name string
14879				err = json.Unmarshal(*v, &name)
14880				if err != nil {
14881					return err
14882				}
14883				fl.Name = &name
14884			}
14885		case "type":
14886			if v != nil {
14887				var typeVar string
14888				err = json.Unmarshal(*v, &typeVar)
14889				if err != nil {
14890					return err
14891				}
14892				fl.Type = &typeVar
14893			}
14894		case "location":
14895			if v != nil {
14896				var location string
14897				err = json.Unmarshal(*v, &location)
14898				if err != nil {
14899					return err
14900				}
14901				fl.Location = &location
14902			}
14903		case "tags":
14904			if v != nil {
14905				var tags map[string]*string
14906				err = json.Unmarshal(*v, &tags)
14907				if err != nil {
14908					return err
14909				}
14910				fl.Tags = tags
14911			}
14912		}
14913	}
14914
14915	return nil
14916}
14917
14918// FlowLogFormatParameters parameters that define the flow log format.
14919type FlowLogFormatParameters struct {
14920	// Type - The file type of flow log. Possible values include: 'JSON'
14921	Type FlowLogFormatType `json:"type,omitempty"`
14922	// Version - The version (revision) of the flow log.
14923	Version *int32 `json:"version,omitempty"`
14924}
14925
14926// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
14927type FlowLogInformation struct {
14928	autorest.Response `json:"-"`
14929	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
14930	TargetResourceID *string `json:"targetResourceId,omitempty"`
14931	// FlowLogProperties - Properties of the flow log.
14932	*FlowLogProperties `json:"properties,omitempty"`
14933	// FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
14934	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
14935}
14936
14937// MarshalJSON is the custom marshaler for FlowLogInformation.
14938func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
14939	objectMap := make(map[string]interface{})
14940	if fli.TargetResourceID != nil {
14941		objectMap["targetResourceId"] = fli.TargetResourceID
14942	}
14943	if fli.FlowLogProperties != nil {
14944		objectMap["properties"] = fli.FlowLogProperties
14945	}
14946	if fli.FlowAnalyticsConfiguration != nil {
14947		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
14948	}
14949	return json.Marshal(objectMap)
14950}
14951
14952// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
14953func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
14954	var m map[string]*json.RawMessage
14955	err := json.Unmarshal(body, &m)
14956	if err != nil {
14957		return err
14958	}
14959	for k, v := range m {
14960		switch k {
14961		case "targetResourceId":
14962			if v != nil {
14963				var targetResourceID string
14964				err = json.Unmarshal(*v, &targetResourceID)
14965				if err != nil {
14966					return err
14967				}
14968				fli.TargetResourceID = &targetResourceID
14969			}
14970		case "properties":
14971			if v != nil {
14972				var flowLogProperties FlowLogProperties
14973				err = json.Unmarshal(*v, &flowLogProperties)
14974				if err != nil {
14975					return err
14976				}
14977				fli.FlowLogProperties = &flowLogProperties
14978			}
14979		case "flowAnalyticsConfiguration":
14980			if v != nil {
14981				var flowAnalyticsConfiguration TrafficAnalyticsProperties
14982				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
14983				if err != nil {
14984					return err
14985				}
14986				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
14987			}
14988		}
14989	}
14990
14991	return nil
14992}
14993
14994// FlowLogListResult list of flow logs.
14995type FlowLogListResult struct {
14996	autorest.Response `json:"-"`
14997	// Value - Information about flow log resource.
14998	Value *[]FlowLog `json:"value,omitempty"`
14999	// NextLink - READ-ONLY; The URL to get the next set of results.
15000	NextLink *string `json:"nextLink,omitempty"`
15001}
15002
15003// MarshalJSON is the custom marshaler for FlowLogListResult.
15004func (fllr FlowLogListResult) MarshalJSON() ([]byte, error) {
15005	objectMap := make(map[string]interface{})
15006	if fllr.Value != nil {
15007		objectMap["value"] = fllr.Value
15008	}
15009	return json.Marshal(objectMap)
15010}
15011
15012// FlowLogListResultIterator provides access to a complete listing of FlowLog values.
15013type FlowLogListResultIterator struct {
15014	i    int
15015	page FlowLogListResultPage
15016}
15017
15018// NextWithContext advances to the next value.  If there was an error making
15019// the request the iterator does not advance and the error is returned.
15020func (iter *FlowLogListResultIterator) NextWithContext(ctx context.Context) (err error) {
15021	if tracing.IsEnabled() {
15022		ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogListResultIterator.NextWithContext")
15023		defer func() {
15024			sc := -1
15025			if iter.Response().Response.Response != nil {
15026				sc = iter.Response().Response.Response.StatusCode
15027			}
15028			tracing.EndSpan(ctx, sc, err)
15029		}()
15030	}
15031	iter.i++
15032	if iter.i < len(iter.page.Values()) {
15033		return nil
15034	}
15035	err = iter.page.NextWithContext(ctx)
15036	if err != nil {
15037		iter.i--
15038		return err
15039	}
15040	iter.i = 0
15041	return nil
15042}
15043
15044// Next advances to the next value.  If there was an error making
15045// the request the iterator does not advance and the error is returned.
15046// Deprecated: Use NextWithContext() instead.
15047func (iter *FlowLogListResultIterator) Next() error {
15048	return iter.NextWithContext(context.Background())
15049}
15050
15051// NotDone returns true if the enumeration should be started or is not yet complete.
15052func (iter FlowLogListResultIterator) NotDone() bool {
15053	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15054}
15055
15056// Response returns the raw server response from the last page request.
15057func (iter FlowLogListResultIterator) Response() FlowLogListResult {
15058	return iter.page.Response()
15059}
15060
15061// Value returns the current value or a zero-initialized value if the
15062// iterator has advanced beyond the end of the collection.
15063func (iter FlowLogListResultIterator) Value() FlowLog {
15064	if !iter.page.NotDone() {
15065		return FlowLog{}
15066	}
15067	return iter.page.Values()[iter.i]
15068}
15069
15070// Creates a new instance of the FlowLogListResultIterator type.
15071func NewFlowLogListResultIterator(page FlowLogListResultPage) FlowLogListResultIterator {
15072	return FlowLogListResultIterator{page: page}
15073}
15074
15075// IsEmpty returns true if the ListResult contains no values.
15076func (fllr FlowLogListResult) IsEmpty() bool {
15077	return fllr.Value == nil || len(*fllr.Value) == 0
15078}
15079
15080// hasNextLink returns true if the NextLink is not empty.
15081func (fllr FlowLogListResult) hasNextLink() bool {
15082	return fllr.NextLink != nil && len(*fllr.NextLink) != 0
15083}
15084
15085// flowLogListResultPreparer prepares a request to retrieve the next set of results.
15086// It returns nil if no more results exist.
15087func (fllr FlowLogListResult) flowLogListResultPreparer(ctx context.Context) (*http.Request, error) {
15088	if !fllr.hasNextLink() {
15089		return nil, nil
15090	}
15091	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15092		autorest.AsJSON(),
15093		autorest.AsGet(),
15094		autorest.WithBaseURL(to.String(fllr.NextLink)))
15095}
15096
15097// FlowLogListResultPage contains a page of FlowLog values.
15098type FlowLogListResultPage struct {
15099	fn   func(context.Context, FlowLogListResult) (FlowLogListResult, error)
15100	fllr FlowLogListResult
15101}
15102
15103// NextWithContext advances to the next page of values.  If there was an error making
15104// the request the page does not advance and the error is returned.
15105func (page *FlowLogListResultPage) NextWithContext(ctx context.Context) (err error) {
15106	if tracing.IsEnabled() {
15107		ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogListResultPage.NextWithContext")
15108		defer func() {
15109			sc := -1
15110			if page.Response().Response.Response != nil {
15111				sc = page.Response().Response.Response.StatusCode
15112			}
15113			tracing.EndSpan(ctx, sc, err)
15114		}()
15115	}
15116	for {
15117		next, err := page.fn(ctx, page.fllr)
15118		if err != nil {
15119			return err
15120		}
15121		page.fllr = next
15122		if !next.hasNextLink() || !next.IsEmpty() {
15123			break
15124		}
15125	}
15126	return nil
15127}
15128
15129// Next advances to the next page of values.  If there was an error making
15130// the request the page does not advance and the error is returned.
15131// Deprecated: Use NextWithContext() instead.
15132func (page *FlowLogListResultPage) Next() error {
15133	return page.NextWithContext(context.Background())
15134}
15135
15136// NotDone returns true if the page enumeration should be started or is not yet complete.
15137func (page FlowLogListResultPage) NotDone() bool {
15138	return !page.fllr.IsEmpty()
15139}
15140
15141// Response returns the raw server response from the last page request.
15142func (page FlowLogListResultPage) Response() FlowLogListResult {
15143	return page.fllr
15144}
15145
15146// Values returns the slice of values for the current page or nil if there are no values.
15147func (page FlowLogListResultPage) Values() []FlowLog {
15148	if page.fllr.IsEmpty() {
15149		return nil
15150	}
15151	return *page.fllr.Value
15152}
15153
15154// Creates a new instance of the FlowLogListResultPage type.
15155func NewFlowLogListResultPage(cur FlowLogListResult, getNextPage func(context.Context, FlowLogListResult) (FlowLogListResult, error)) FlowLogListResultPage {
15156	return FlowLogListResultPage{
15157		fn:   getNextPage,
15158		fllr: cur,
15159	}
15160}
15161
15162// FlowLogProperties parameters that define the configuration of flow log.
15163type FlowLogProperties struct {
15164	// StorageID - ID of the storage account which is used to store the flow log.
15165	StorageID *string `json:"storageId,omitempty"`
15166	// Enabled - Flag to enable/disable flow logging.
15167	Enabled *bool `json:"enabled,omitempty"`
15168	// RetentionPolicy - Parameters that define the retention policy for flow log.
15169	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
15170	// Format - Parameters that define the flow log format.
15171	Format *FlowLogFormatParameters `json:"format,omitempty"`
15172}
15173
15174// FlowLogPropertiesFormat parameters that define the configuration of flow log.
15175type FlowLogPropertiesFormat struct {
15176	// TargetResourceID - ID of network security group to which flow log will be applied.
15177	TargetResourceID *string `json:"targetResourceId,omitempty"`
15178	// TargetResourceGUID - READ-ONLY; Guid of network security group to which flow log will be applied.
15179	TargetResourceGUID *string `json:"targetResourceGuid,omitempty"`
15180	// StorageID - ID of the storage account which is used to store the flow log.
15181	StorageID *string `json:"storageId,omitempty"`
15182	// Enabled - Flag to enable/disable flow logging.
15183	Enabled *bool `json:"enabled,omitempty"`
15184	// RetentionPolicy - Parameters that define the retention policy for flow log.
15185	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
15186	// Format - Parameters that define the flow log format.
15187	Format *FlowLogFormatParameters `json:"format,omitempty"`
15188	// FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
15189	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
15190	// ProvisioningState - READ-ONLY; The provisioning state of the flow log. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
15191	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15192}
15193
15194// MarshalJSON is the custom marshaler for FlowLogPropertiesFormat.
15195func (flpf FlowLogPropertiesFormat) MarshalJSON() ([]byte, error) {
15196	objectMap := make(map[string]interface{})
15197	if flpf.TargetResourceID != nil {
15198		objectMap["targetResourceId"] = flpf.TargetResourceID
15199	}
15200	if flpf.StorageID != nil {
15201		objectMap["storageId"] = flpf.StorageID
15202	}
15203	if flpf.Enabled != nil {
15204		objectMap["enabled"] = flpf.Enabled
15205	}
15206	if flpf.RetentionPolicy != nil {
15207		objectMap["retentionPolicy"] = flpf.RetentionPolicy
15208	}
15209	if flpf.Format != nil {
15210		objectMap["format"] = flpf.Format
15211	}
15212	if flpf.FlowAnalyticsConfiguration != nil {
15213		objectMap["flowAnalyticsConfiguration"] = flpf.FlowAnalyticsConfiguration
15214	}
15215	return json.Marshal(objectMap)
15216}
15217
15218// FlowLogsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
15219// operation.
15220type FlowLogsCreateOrUpdateFuture struct {
15221	azure.FutureAPI
15222	// Result returns the result of the asynchronous operation.
15223	// If the operation has not completed it will return an error.
15224	Result func(FlowLogsClient) (FlowLog, error)
15225}
15226
15227// FlowLogsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15228// operation.
15229type FlowLogsDeleteFuture struct {
15230	azure.FutureAPI
15231	// Result returns the result of the asynchronous operation.
15232	// If the operation has not completed it will return an error.
15233	Result func(FlowLogsClient) (autorest.Response, error)
15234}
15235
15236// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
15237// (optional) status.
15238type FlowLogStatusParameters struct {
15239	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
15240	TargetResourceID *string `json:"targetResourceId,omitempty"`
15241}
15242
15243// FrontendIPConfiguration frontend IP address of the load balancer.
15244type FrontendIPConfiguration struct {
15245	autorest.Response `json:"-"`
15246	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
15247	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
15248	// 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.
15249	Name *string `json:"name,omitempty"`
15250	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15251	Etag *string `json:"etag,omitempty"`
15252	// Type - READ-ONLY; Type of the resource.
15253	Type *string `json:"type,omitempty"`
15254	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
15255	Zones *[]string `json:"zones,omitempty"`
15256	// ID - Resource ID.
15257	ID *string `json:"id,omitempty"`
15258}
15259
15260// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
15261func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
15262	objectMap := make(map[string]interface{})
15263	if fic.FrontendIPConfigurationPropertiesFormat != nil {
15264		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
15265	}
15266	if fic.Name != nil {
15267		objectMap["name"] = fic.Name
15268	}
15269	if fic.Zones != nil {
15270		objectMap["zones"] = fic.Zones
15271	}
15272	if fic.ID != nil {
15273		objectMap["id"] = fic.ID
15274	}
15275	return json.Marshal(objectMap)
15276}
15277
15278// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
15279func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
15280	var m map[string]*json.RawMessage
15281	err := json.Unmarshal(body, &m)
15282	if err != nil {
15283		return err
15284	}
15285	for k, v := range m {
15286		switch k {
15287		case "properties":
15288			if v != nil {
15289				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
15290				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
15291				if err != nil {
15292					return err
15293				}
15294				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
15295			}
15296		case "name":
15297			if v != nil {
15298				var name string
15299				err = json.Unmarshal(*v, &name)
15300				if err != nil {
15301					return err
15302				}
15303				fic.Name = &name
15304			}
15305		case "etag":
15306			if v != nil {
15307				var etag string
15308				err = json.Unmarshal(*v, &etag)
15309				if err != nil {
15310					return err
15311				}
15312				fic.Etag = &etag
15313			}
15314		case "type":
15315			if v != nil {
15316				var typeVar string
15317				err = json.Unmarshal(*v, &typeVar)
15318				if err != nil {
15319					return err
15320				}
15321				fic.Type = &typeVar
15322			}
15323		case "zones":
15324			if v != nil {
15325				var zones []string
15326				err = json.Unmarshal(*v, &zones)
15327				if err != nil {
15328					return err
15329				}
15330				fic.Zones = &zones
15331			}
15332		case "id":
15333			if v != nil {
15334				var ID string
15335				err = json.Unmarshal(*v, &ID)
15336				if err != nil {
15337					return err
15338				}
15339				fic.ID = &ID
15340			}
15341		}
15342	}
15343
15344	return nil
15345}
15346
15347// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
15348type FrontendIPConfigurationPropertiesFormat struct {
15349	// InboundNatRules - READ-ONLY; An array of references to inbound rules that use this frontend IP.
15350	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
15351	// InboundNatPools - READ-ONLY; An array of references to inbound pools that use this frontend IP.
15352	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
15353	// OutboundRules - READ-ONLY; An array of references to outbound rules that use this frontend IP.
15354	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
15355	// LoadBalancingRules - READ-ONLY; An array of references to load balancing rules that use this frontend IP.
15356	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
15357	// PrivateIPAddress - The private IP address of the IP configuration.
15358	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
15359	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values include: 'Static', 'Dynamic'
15360	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
15361	// PrivateIPAddressVersion - Whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPv4', 'IPv6'
15362	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
15363	// Subnet - The reference to the subnet resource.
15364	Subnet *Subnet `json:"subnet,omitempty"`
15365	// PublicIPAddress - The reference to the Public IP resource.
15366	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
15367	// PublicIPPrefix - The reference to the Public IP Prefix resource.
15368	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
15369	// ProvisioningState - READ-ONLY; The provisioning state of the frontend IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
15370	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15371}
15372
15373// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
15374func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
15375	objectMap := make(map[string]interface{})
15376	if ficpf.PrivateIPAddress != nil {
15377		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
15378	}
15379	if ficpf.PrivateIPAllocationMethod != "" {
15380		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
15381	}
15382	if ficpf.PrivateIPAddressVersion != "" {
15383		objectMap["privateIPAddressVersion"] = ficpf.PrivateIPAddressVersion
15384	}
15385	if ficpf.Subnet != nil {
15386		objectMap["subnet"] = ficpf.Subnet
15387	}
15388	if ficpf.PublicIPAddress != nil {
15389		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
15390	}
15391	if ficpf.PublicIPPrefix != nil {
15392		objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix
15393	}
15394	return json.Marshal(objectMap)
15395}
15396
15397// GatewayRoute gateway routing details.
15398type GatewayRoute struct {
15399	// LocalAddress - READ-ONLY; The gateway's local address.
15400	LocalAddress *string `json:"localAddress,omitempty"`
15401	// NetworkProperty - READ-ONLY; The route's network prefix.
15402	NetworkProperty *string `json:"network,omitempty"`
15403	// NextHop - READ-ONLY; The route's next hop.
15404	NextHop *string `json:"nextHop,omitempty"`
15405	// SourcePeer - READ-ONLY; The peer this route was learned from.
15406	SourcePeer *string `json:"sourcePeer,omitempty"`
15407	// Origin - READ-ONLY; The source this route was learned from.
15408	Origin *string `json:"origin,omitempty"`
15409	// AsPath - READ-ONLY; The route's AS path sequence.
15410	AsPath *string `json:"asPath,omitempty"`
15411	// Weight - READ-ONLY; The route's weight.
15412	Weight *int32 `json:"weight,omitempty"`
15413}
15414
15415// GatewayRouteListResult list of virtual network gateway routes.
15416type GatewayRouteListResult struct {
15417	autorest.Response `json:"-"`
15418	// Value - List of gateway routes.
15419	Value *[]GatewayRoute `json:"value,omitempty"`
15420}
15421
15422// GeneratevirtualwanvpnserverconfigurationvpnprofileFuture an abstraction for monitoring and retrieving
15423// the results of a long-running operation.
15424type GeneratevirtualwanvpnserverconfigurationvpnprofileFuture struct {
15425	azure.FutureAPI
15426	// Result returns the result of the asynchronous operation.
15427	// If the operation has not completed it will return an error.
15428	Result func(BaseClient) (VpnProfileResponse, error)
15429}
15430
15431// GetActiveSessionsAllFuture an abstraction for monitoring and retrieving the results of a long-running
15432// operation.
15433type GetActiveSessionsAllFuture struct {
15434	azure.FutureAPI
15435	// Result returns the result of the asynchronous operation.
15436	// If the operation has not completed it will return an error.
15437	Result func(BaseClient) (BastionActiveSessionListResultPage, error)
15438}
15439
15440// GetActiveSessionsFuture an abstraction for monitoring and retrieving the results of a long-running
15441// operation.
15442type GetActiveSessionsFuture struct {
15443	azure.FutureAPI
15444	// Result returns the result of the asynchronous operation.
15445	// If the operation has not completed it will return an error.
15446	Result func(BaseClient) (BastionActiveSessionListResultPage, error)
15447}
15448
15449// GetVpnSitesConfigurationRequest list of Vpn-Sites.
15450type GetVpnSitesConfigurationRequest struct {
15451	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
15452	VpnSites *[]string `json:"vpnSites,omitempty"`
15453	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites.
15454	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
15455}
15456
15457// HopLink hop link.
15458type HopLink struct {
15459	// NextHopID - READ-ONLY; The ID of the next hop.
15460	NextHopID *string `json:"nextHopId,omitempty"`
15461	// LinkType - READ-ONLY; Link type.
15462	LinkType *string `json:"linkType,omitempty"`
15463	// HopLinkProperties - Hop link properties.
15464	*HopLinkProperties `json:"properties,omitempty"`
15465	// Issues - READ-ONLY; List of issues.
15466	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
15467	// Context - READ-ONLY; Provides additional context on links.
15468	Context map[string]*string `json:"context"`
15469	// ResourceID - READ-ONLY; Resource ID.
15470	ResourceID *string `json:"resourceId,omitempty"`
15471}
15472
15473// MarshalJSON is the custom marshaler for HopLink.
15474func (hl HopLink) MarshalJSON() ([]byte, error) {
15475	objectMap := make(map[string]interface{})
15476	if hl.HopLinkProperties != nil {
15477		objectMap["properties"] = hl.HopLinkProperties
15478	}
15479	return json.Marshal(objectMap)
15480}
15481
15482// UnmarshalJSON is the custom unmarshaler for HopLink struct.
15483func (hl *HopLink) UnmarshalJSON(body []byte) error {
15484	var m map[string]*json.RawMessage
15485	err := json.Unmarshal(body, &m)
15486	if err != nil {
15487		return err
15488	}
15489	for k, v := range m {
15490		switch k {
15491		case "nextHopId":
15492			if v != nil {
15493				var nextHopID string
15494				err = json.Unmarshal(*v, &nextHopID)
15495				if err != nil {
15496					return err
15497				}
15498				hl.NextHopID = &nextHopID
15499			}
15500		case "linkType":
15501			if v != nil {
15502				var linkType string
15503				err = json.Unmarshal(*v, &linkType)
15504				if err != nil {
15505					return err
15506				}
15507				hl.LinkType = &linkType
15508			}
15509		case "properties":
15510			if v != nil {
15511				var hopLinkProperties HopLinkProperties
15512				err = json.Unmarshal(*v, &hopLinkProperties)
15513				if err != nil {
15514					return err
15515				}
15516				hl.HopLinkProperties = &hopLinkProperties
15517			}
15518		case "issues":
15519			if v != nil {
15520				var issues []ConnectivityIssue
15521				err = json.Unmarshal(*v, &issues)
15522				if err != nil {
15523					return err
15524				}
15525				hl.Issues = &issues
15526			}
15527		case "context":
15528			if v != nil {
15529				var context map[string]*string
15530				err = json.Unmarshal(*v, &context)
15531				if err != nil {
15532					return err
15533				}
15534				hl.Context = context
15535			}
15536		case "resourceId":
15537			if v != nil {
15538				var resourceID string
15539				err = json.Unmarshal(*v, &resourceID)
15540				if err != nil {
15541					return err
15542				}
15543				hl.ResourceID = &resourceID
15544			}
15545		}
15546	}
15547
15548	return nil
15549}
15550
15551// HopLinkProperties hop link properties.
15552type HopLinkProperties struct {
15553	// RoundTripTimeMin - READ-ONLY; Minimum roundtrip time in milliseconds.
15554	RoundTripTimeMin *int32 `json:"roundTripTimeMin,omitempty"`
15555	// RoundTripTimeAvg - READ-ONLY; Average roundtrip time in milliseconds.
15556	RoundTripTimeAvg *int32 `json:"roundTripTimeAvg,omitempty"`
15557	// RoundTripTimeMax - READ-ONLY; Maximum roundtrip time in milliseconds.
15558	RoundTripTimeMax *int32 `json:"roundTripTimeMax,omitempty"`
15559}
15560
15561// HTTPConfiguration HTTP configuration of the connectivity check.
15562type HTTPConfiguration struct {
15563	// Method - HTTP method. Possible values include: 'HTTPMethodGet'
15564	Method HTTPMethod `json:"method,omitempty"`
15565	// Headers - List of HTTP headers.
15566	Headers *[]HTTPHeader `json:"headers,omitempty"`
15567	// ValidStatusCodes - Valid status codes.
15568	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
15569}
15570
15571// HTTPHeader the HTTP header.
15572type HTTPHeader struct {
15573	// Name - The name in HTTP header.
15574	Name *string `json:"name,omitempty"`
15575	// Value - The value in HTTP header.
15576	Value *string `json:"value,omitempty"`
15577}
15578
15579// HubIPAddresses IP addresses associated with azure firewall.
15580type HubIPAddresses struct {
15581	// PublicIPs - Public IP addresses associated with azure firewall.
15582	PublicIPs *HubPublicIPAddresses `json:"publicIPs,omitempty"`
15583	// PrivateIPAddress - Private IP Address associated with azure firewall.
15584	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
15585}
15586
15587// HubIPConfiguration ipConfigurations.
15588type HubIPConfiguration struct {
15589	autorest.Response `json:"-"`
15590	// HubIPConfigurationPropertiesFormat - The properties of the Virtual Hub IPConfigurations.
15591	*HubIPConfigurationPropertiesFormat `json:"properties,omitempty"`
15592	// Name - Name of the Ip Configuration.
15593	Name *string `json:"name,omitempty"`
15594	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15595	Etag *string `json:"etag,omitempty"`
15596	// Type - READ-ONLY; Ipconfiguration type.
15597	Type *string `json:"type,omitempty"`
15598	// ID - Resource ID.
15599	ID *string `json:"id,omitempty"`
15600}
15601
15602// MarshalJSON is the custom marshaler for HubIPConfiguration.
15603func (hic HubIPConfiguration) MarshalJSON() ([]byte, error) {
15604	objectMap := make(map[string]interface{})
15605	if hic.HubIPConfigurationPropertiesFormat != nil {
15606		objectMap["properties"] = hic.HubIPConfigurationPropertiesFormat
15607	}
15608	if hic.Name != nil {
15609		objectMap["name"] = hic.Name
15610	}
15611	if hic.ID != nil {
15612		objectMap["id"] = hic.ID
15613	}
15614	return json.Marshal(objectMap)
15615}
15616
15617// UnmarshalJSON is the custom unmarshaler for HubIPConfiguration struct.
15618func (hic *HubIPConfiguration) UnmarshalJSON(body []byte) error {
15619	var m map[string]*json.RawMessage
15620	err := json.Unmarshal(body, &m)
15621	if err != nil {
15622		return err
15623	}
15624	for k, v := range m {
15625		switch k {
15626		case "properties":
15627			if v != nil {
15628				var hubIPConfigurationPropertiesFormat HubIPConfigurationPropertiesFormat
15629				err = json.Unmarshal(*v, &hubIPConfigurationPropertiesFormat)
15630				if err != nil {
15631					return err
15632				}
15633				hic.HubIPConfigurationPropertiesFormat = &hubIPConfigurationPropertiesFormat
15634			}
15635		case "name":
15636			if v != nil {
15637				var name string
15638				err = json.Unmarshal(*v, &name)
15639				if err != nil {
15640					return err
15641				}
15642				hic.Name = &name
15643			}
15644		case "etag":
15645			if v != nil {
15646				var etag string
15647				err = json.Unmarshal(*v, &etag)
15648				if err != nil {
15649					return err
15650				}
15651				hic.Etag = &etag
15652			}
15653		case "type":
15654			if v != nil {
15655				var typeVar string
15656				err = json.Unmarshal(*v, &typeVar)
15657				if err != nil {
15658					return err
15659				}
15660				hic.Type = &typeVar
15661			}
15662		case "id":
15663			if v != nil {
15664				var ID string
15665				err = json.Unmarshal(*v, &ID)
15666				if err != nil {
15667					return err
15668				}
15669				hic.ID = &ID
15670			}
15671		}
15672	}
15673
15674	return nil
15675}
15676
15677// HubIPConfigurationPropertiesFormat properties of IP configuration.
15678type HubIPConfigurationPropertiesFormat struct {
15679	// PrivateIPAddress - The private IP address of the IP configuration.
15680	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
15681	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
15682	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
15683	// Subnet - The reference to the subnet resource.
15684	Subnet *Subnet `json:"subnet,omitempty"`
15685	// PublicIPAddress - The reference to the public IP resource.
15686	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
15687	// ProvisioningState - READ-ONLY; The provisioning state of the IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
15688	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15689}
15690
15691// MarshalJSON is the custom marshaler for HubIPConfigurationPropertiesFormat.
15692func (hicpf HubIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
15693	objectMap := make(map[string]interface{})
15694	if hicpf.PrivateIPAddress != nil {
15695		objectMap["privateIPAddress"] = hicpf.PrivateIPAddress
15696	}
15697	if hicpf.PrivateIPAllocationMethod != "" {
15698		objectMap["privateIPAllocationMethod"] = hicpf.PrivateIPAllocationMethod
15699	}
15700	if hicpf.Subnet != nil {
15701		objectMap["subnet"] = hicpf.Subnet
15702	}
15703	if hicpf.PublicIPAddress != nil {
15704		objectMap["publicIPAddress"] = hicpf.PublicIPAddress
15705	}
15706	return json.Marshal(objectMap)
15707}
15708
15709// HubPublicIPAddresses public IP addresses associated with azure firewall.
15710type HubPublicIPAddresses struct {
15711	// Addresses - The list of Public IP addresses associated with azure firewall or IP addresses to be retained.
15712	Addresses *[]AzureFirewallPublicIPAddress `json:"addresses,omitempty"`
15713	// Count - The number of Public IP addresses associated with azure firewall.
15714	Count *int32 `json:"count,omitempty"`
15715}
15716
15717// HubRoute routeTable route.
15718type HubRoute struct {
15719	// Name - The name of the Route that is unique within a RouteTable. This name can be used to access this route.
15720	Name *string `json:"name,omitempty"`
15721	// DestinationType - The type of destinations (eg: CIDR, ResourceId, Service).
15722	DestinationType *string `json:"destinationType,omitempty"`
15723	// Destinations - List of all destinations.
15724	Destinations *[]string `json:"destinations,omitempty"`
15725	// NextHopType - The type of next hop (eg: ResourceId).
15726	NextHopType *string `json:"nextHopType,omitempty"`
15727	// NextHop - NextHop resource ID.
15728	NextHop *string `json:"nextHop,omitempty"`
15729}
15730
15731// HubRouteTable routeTable resource in a virtual hub.
15732type HubRouteTable struct {
15733	autorest.Response `json:"-"`
15734	// HubRouteTableProperties - Properties of the RouteTable resource.
15735	*HubRouteTableProperties `json:"properties,omitempty"`
15736	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15737	Name *string `json:"name,omitempty"`
15738	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15739	Etag *string `json:"etag,omitempty"`
15740	// Type - READ-ONLY; Resource type.
15741	Type *string `json:"type,omitempty"`
15742	// ID - Resource ID.
15743	ID *string `json:"id,omitempty"`
15744}
15745
15746// MarshalJSON is the custom marshaler for HubRouteTable.
15747func (hrt HubRouteTable) MarshalJSON() ([]byte, error) {
15748	objectMap := make(map[string]interface{})
15749	if hrt.HubRouteTableProperties != nil {
15750		objectMap["properties"] = hrt.HubRouteTableProperties
15751	}
15752	if hrt.Name != nil {
15753		objectMap["name"] = hrt.Name
15754	}
15755	if hrt.ID != nil {
15756		objectMap["id"] = hrt.ID
15757	}
15758	return json.Marshal(objectMap)
15759}
15760
15761// UnmarshalJSON is the custom unmarshaler for HubRouteTable struct.
15762func (hrt *HubRouteTable) UnmarshalJSON(body []byte) error {
15763	var m map[string]*json.RawMessage
15764	err := json.Unmarshal(body, &m)
15765	if err != nil {
15766		return err
15767	}
15768	for k, v := range m {
15769		switch k {
15770		case "properties":
15771			if v != nil {
15772				var hubRouteTableProperties HubRouteTableProperties
15773				err = json.Unmarshal(*v, &hubRouteTableProperties)
15774				if err != nil {
15775					return err
15776				}
15777				hrt.HubRouteTableProperties = &hubRouteTableProperties
15778			}
15779		case "name":
15780			if v != nil {
15781				var name string
15782				err = json.Unmarshal(*v, &name)
15783				if err != nil {
15784					return err
15785				}
15786				hrt.Name = &name
15787			}
15788		case "etag":
15789			if v != nil {
15790				var etag string
15791				err = json.Unmarshal(*v, &etag)
15792				if err != nil {
15793					return err
15794				}
15795				hrt.Etag = &etag
15796			}
15797		case "type":
15798			if v != nil {
15799				var typeVar string
15800				err = json.Unmarshal(*v, &typeVar)
15801				if err != nil {
15802					return err
15803				}
15804				hrt.Type = &typeVar
15805			}
15806		case "id":
15807			if v != nil {
15808				var ID string
15809				err = json.Unmarshal(*v, &ID)
15810				if err != nil {
15811					return err
15812				}
15813				hrt.ID = &ID
15814			}
15815		}
15816	}
15817
15818	return nil
15819}
15820
15821// HubRouteTableProperties parameters for RouteTable.
15822type HubRouteTableProperties struct {
15823	// Routes - List of all routes.
15824	Routes *[]HubRoute `json:"routes,omitempty"`
15825	// Labels - List of labels associated with this route table.
15826	Labels *[]string `json:"labels,omitempty"`
15827	// AssociatedConnections - READ-ONLY; List of all connections associated with this route table.
15828	AssociatedConnections *[]string `json:"associatedConnections,omitempty"`
15829	// PropagatingConnections - READ-ONLY; List of all connections that advertise to this route table.
15830	PropagatingConnections *[]string `json:"propagatingConnections,omitempty"`
15831	// ProvisioningState - READ-ONLY; The provisioning state of the RouteTable resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
15832	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15833}
15834
15835// MarshalJSON is the custom marshaler for HubRouteTableProperties.
15836func (hrtp HubRouteTableProperties) MarshalJSON() ([]byte, error) {
15837	objectMap := make(map[string]interface{})
15838	if hrtp.Routes != nil {
15839		objectMap["routes"] = hrtp.Routes
15840	}
15841	if hrtp.Labels != nil {
15842		objectMap["labels"] = hrtp.Labels
15843	}
15844	return json.Marshal(objectMap)
15845}
15846
15847// HubRouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15848// long-running operation.
15849type HubRouteTablesCreateOrUpdateFuture struct {
15850	azure.FutureAPI
15851	// Result returns the result of the asynchronous operation.
15852	// If the operation has not completed it will return an error.
15853	Result func(HubRouteTablesClient) (HubRouteTable, error)
15854}
15855
15856// HubRouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15857// operation.
15858type HubRouteTablesDeleteFuture struct {
15859	azure.FutureAPI
15860	// Result returns the result of the asynchronous operation.
15861	// If the operation has not completed it will return an error.
15862	Result func(HubRouteTablesClient) (autorest.Response, error)
15863}
15864
15865// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
15866type HubVirtualNetworkConnection struct {
15867	autorest.Response `json:"-"`
15868	// HubVirtualNetworkConnectionProperties - Properties of the hub virtual network connection.
15869	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
15870	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15871	Name *string `json:"name,omitempty"`
15872	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15873	Etag *string `json:"etag,omitempty"`
15874	// ID - Resource ID.
15875	ID *string `json:"id,omitempty"`
15876}
15877
15878// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
15879func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
15880	objectMap := make(map[string]interface{})
15881	if hvnc.HubVirtualNetworkConnectionProperties != nil {
15882		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
15883	}
15884	if hvnc.Name != nil {
15885		objectMap["name"] = hvnc.Name
15886	}
15887	if hvnc.ID != nil {
15888		objectMap["id"] = hvnc.ID
15889	}
15890	return json.Marshal(objectMap)
15891}
15892
15893// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
15894func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
15895	var m map[string]*json.RawMessage
15896	err := json.Unmarshal(body, &m)
15897	if err != nil {
15898		return err
15899	}
15900	for k, v := range m {
15901		switch k {
15902		case "properties":
15903			if v != nil {
15904				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
15905				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
15906				if err != nil {
15907					return err
15908				}
15909				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
15910			}
15911		case "name":
15912			if v != nil {
15913				var name string
15914				err = json.Unmarshal(*v, &name)
15915				if err != nil {
15916					return err
15917				}
15918				hvnc.Name = &name
15919			}
15920		case "etag":
15921			if v != nil {
15922				var etag string
15923				err = json.Unmarshal(*v, &etag)
15924				if err != nil {
15925					return err
15926				}
15927				hvnc.Etag = &etag
15928			}
15929		case "id":
15930			if v != nil {
15931				var ID string
15932				err = json.Unmarshal(*v, &ID)
15933				if err != nil {
15934					return err
15935				}
15936				hvnc.ID = &ID
15937			}
15938		}
15939	}
15940
15941	return nil
15942}
15943
15944// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection.
15945type HubVirtualNetworkConnectionProperties struct {
15946	// RemoteVirtualNetwork - Reference to the remote virtual network.
15947	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
15948	// AllowHubToRemoteVnetTransit - Deprecated: VirtualHub to RemoteVnet transit to enabled or not.
15949	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
15950	// AllowRemoteVnetToUseHubVnetGateways - Deprecated: Allow RemoteVnet to use Virtual Hub's gateways.
15951	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
15952	// EnableInternetSecurity - Enable internet security.
15953	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
15954	// RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection.
15955	RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"`
15956	// ProvisioningState - READ-ONLY; The provisioning state of the hub virtual network connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
15957	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15958}
15959
15960// MarshalJSON is the custom marshaler for HubVirtualNetworkConnectionProperties.
15961func (hvncp HubVirtualNetworkConnectionProperties) MarshalJSON() ([]byte, error) {
15962	objectMap := make(map[string]interface{})
15963	if hvncp.RemoteVirtualNetwork != nil {
15964		objectMap["remoteVirtualNetwork"] = hvncp.RemoteVirtualNetwork
15965	}
15966	if hvncp.AllowHubToRemoteVnetTransit != nil {
15967		objectMap["allowHubToRemoteVnetTransit"] = hvncp.AllowHubToRemoteVnetTransit
15968	}
15969	if hvncp.AllowRemoteVnetToUseHubVnetGateways != nil {
15970		objectMap["allowRemoteVnetToUseHubVnetGateways"] = hvncp.AllowRemoteVnetToUseHubVnetGateways
15971	}
15972	if hvncp.EnableInternetSecurity != nil {
15973		objectMap["enableInternetSecurity"] = hvncp.EnableInternetSecurity
15974	}
15975	if hvncp.RoutingConfiguration != nil {
15976		objectMap["routingConfiguration"] = hvncp.RoutingConfiguration
15977	}
15978	return json.Marshal(objectMap)
15979}
15980
15981// HubVirtualNetworkConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
15982// results of a long-running operation.
15983type HubVirtualNetworkConnectionsCreateOrUpdateFuture struct {
15984	azure.FutureAPI
15985	// Result returns the result of the asynchronous operation.
15986	// If the operation has not completed it will return an error.
15987	Result func(HubVirtualNetworkConnectionsClient) (HubVirtualNetworkConnection, error)
15988}
15989
15990// HubVirtualNetworkConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
15991// long-running operation.
15992type HubVirtualNetworkConnectionsDeleteFuture struct {
15993	azure.FutureAPI
15994	// Result returns the result of the asynchronous operation.
15995	// If the operation has not completed it will return an error.
15996	Result func(HubVirtualNetworkConnectionsClient) (autorest.Response, error)
15997}
15998
15999// InboundNatPool inbound NAT pool of the load balancer.
16000type InboundNatPool struct {
16001	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
16002	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
16003	// 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.
16004	Name *string `json:"name,omitempty"`
16005	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
16006	Etag *string `json:"etag,omitempty"`
16007	// Type - READ-ONLY; Type of the resource.
16008	Type *string `json:"type,omitempty"`
16009	// ID - Resource ID.
16010	ID *string `json:"id,omitempty"`
16011}
16012
16013// MarshalJSON is the custom marshaler for InboundNatPool.
16014func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
16015	objectMap := make(map[string]interface{})
16016	if inp.InboundNatPoolPropertiesFormat != nil {
16017		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
16018	}
16019	if inp.Name != nil {
16020		objectMap["name"] = inp.Name
16021	}
16022	if inp.ID != nil {
16023		objectMap["id"] = inp.ID
16024	}
16025	return json.Marshal(objectMap)
16026}
16027
16028// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
16029func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
16030	var m map[string]*json.RawMessage
16031	err := json.Unmarshal(body, &m)
16032	if err != nil {
16033		return err
16034	}
16035	for k, v := range m {
16036		switch k {
16037		case "properties":
16038			if v != nil {
16039				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
16040				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
16041				if err != nil {
16042					return err
16043				}
16044				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
16045			}
16046		case "name":
16047			if v != nil {
16048				var name string
16049				err = json.Unmarshal(*v, &name)
16050				if err != nil {
16051					return err
16052				}
16053				inp.Name = &name
16054			}
16055		case "etag":
16056			if v != nil {
16057				var etag string
16058				err = json.Unmarshal(*v, &etag)
16059				if err != nil {
16060					return err
16061				}
16062				inp.Etag = &etag
16063			}
16064		case "type":
16065			if v != nil {
16066				var typeVar string
16067				err = json.Unmarshal(*v, &typeVar)
16068				if err != nil {
16069					return err
16070				}
16071				inp.Type = &typeVar
16072			}
16073		case "id":
16074			if v != nil {
16075				var ID string
16076				err = json.Unmarshal(*v, &ID)
16077				if err != nil {
16078					return err
16079				}
16080				inp.ID = &ID
16081			}
16082		}
16083	}
16084
16085	return nil
16086}
16087
16088// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
16089type InboundNatPoolPropertiesFormat struct {
16090	// FrontendIPConfiguration - A reference to frontend IP addresses.
16091	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
16092	// Protocol - The reference to the transport protocol used by the inbound NAT pool. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
16093	Protocol TransportProtocol `json:"protocol,omitempty"`
16094	// 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.
16095	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
16096	// 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.
16097	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
16098	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
16099	BackendPort *int32 `json:"backendPort,omitempty"`
16100	// 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.
16101	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
16102	// 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.
16103	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
16104	// 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.
16105	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
16106	// ProvisioningState - READ-ONLY; The provisioning state of the inbound NAT pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
16107	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16108}
16109
16110// MarshalJSON is the custom marshaler for InboundNatPoolPropertiesFormat.
16111func (inppf InboundNatPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
16112	objectMap := make(map[string]interface{})
16113	if inppf.FrontendIPConfiguration != nil {
16114		objectMap["frontendIPConfiguration"] = inppf.FrontendIPConfiguration
16115	}
16116	if inppf.Protocol != "" {
16117		objectMap["protocol"] = inppf.Protocol
16118	}
16119	if inppf.FrontendPortRangeStart != nil {
16120		objectMap["frontendPortRangeStart"] = inppf.FrontendPortRangeStart
16121	}
16122	if inppf.FrontendPortRangeEnd != nil {
16123		objectMap["frontendPortRangeEnd"] = inppf.FrontendPortRangeEnd
16124	}
16125	if inppf.BackendPort != nil {
16126		objectMap["backendPort"] = inppf.BackendPort
16127	}
16128	if inppf.IdleTimeoutInMinutes != nil {
16129		objectMap["idleTimeoutInMinutes"] = inppf.IdleTimeoutInMinutes
16130	}
16131	if inppf.EnableFloatingIP != nil {
16132		objectMap["enableFloatingIP"] = inppf.EnableFloatingIP
16133	}
16134	if inppf.EnableTCPReset != nil {
16135		objectMap["enableTcpReset"] = inppf.EnableTCPReset
16136	}
16137	return json.Marshal(objectMap)
16138}
16139
16140// InboundNatRule inbound NAT rule of the load balancer.
16141type InboundNatRule struct {
16142	autorest.Response `json:"-"`
16143	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
16144	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
16145	// 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.
16146	Name *string `json:"name,omitempty"`
16147	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
16148	Etag *string `json:"etag,omitempty"`
16149	// Type - READ-ONLY; Type of the resource.
16150	Type *string `json:"type,omitempty"`
16151	// ID - Resource ID.
16152	ID *string `json:"id,omitempty"`
16153}
16154
16155// MarshalJSON is the custom marshaler for InboundNatRule.
16156func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
16157	objectMap := make(map[string]interface{})
16158	if inr.InboundNatRulePropertiesFormat != nil {
16159		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
16160	}
16161	if inr.Name != nil {
16162		objectMap["name"] = inr.Name
16163	}
16164	if inr.ID != nil {
16165		objectMap["id"] = inr.ID
16166	}
16167	return json.Marshal(objectMap)
16168}
16169
16170// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
16171func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
16172	var m map[string]*json.RawMessage
16173	err := json.Unmarshal(body, &m)
16174	if err != nil {
16175		return err
16176	}
16177	for k, v := range m {
16178		switch k {
16179		case "properties":
16180			if v != nil {
16181				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
16182				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
16183				if err != nil {
16184					return err
16185				}
16186				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
16187			}
16188		case "name":
16189			if v != nil {
16190				var name string
16191				err = json.Unmarshal(*v, &name)
16192				if err != nil {
16193					return err
16194				}
16195				inr.Name = &name
16196			}
16197		case "etag":
16198			if v != nil {
16199				var etag string
16200				err = json.Unmarshal(*v, &etag)
16201				if err != nil {
16202					return err
16203				}
16204				inr.Etag = &etag
16205			}
16206		case "type":
16207			if v != nil {
16208				var typeVar string
16209				err = json.Unmarshal(*v, &typeVar)
16210				if err != nil {
16211					return err
16212				}
16213				inr.Type = &typeVar
16214			}
16215		case "id":
16216			if v != nil {
16217				var ID string
16218				err = json.Unmarshal(*v, &ID)
16219				if err != nil {
16220					return err
16221				}
16222				inr.ID = &ID
16223			}
16224		}
16225	}
16226
16227	return nil
16228}
16229
16230// InboundNatRuleListResult response for ListInboundNatRule API service call.
16231type InboundNatRuleListResult struct {
16232	autorest.Response `json:"-"`
16233	// Value - A list of inbound nat rules in a load balancer.
16234	Value *[]InboundNatRule `json:"value,omitempty"`
16235	// NextLink - READ-ONLY; The URL to get the next set of results.
16236	NextLink *string `json:"nextLink,omitempty"`
16237}
16238
16239// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
16240func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
16241	objectMap := make(map[string]interface{})
16242	if inrlr.Value != nil {
16243		objectMap["value"] = inrlr.Value
16244	}
16245	return json.Marshal(objectMap)
16246}
16247
16248// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
16249type InboundNatRuleListResultIterator struct {
16250	i    int
16251	page InboundNatRuleListResultPage
16252}
16253
16254// NextWithContext advances to the next value.  If there was an error making
16255// the request the iterator does not advance and the error is returned.
16256func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
16257	if tracing.IsEnabled() {
16258		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
16259		defer func() {
16260			sc := -1
16261			if iter.Response().Response.Response != nil {
16262				sc = iter.Response().Response.Response.StatusCode
16263			}
16264			tracing.EndSpan(ctx, sc, err)
16265		}()
16266	}
16267	iter.i++
16268	if iter.i < len(iter.page.Values()) {
16269		return nil
16270	}
16271	err = iter.page.NextWithContext(ctx)
16272	if err != nil {
16273		iter.i--
16274		return err
16275	}
16276	iter.i = 0
16277	return nil
16278}
16279
16280// Next advances to the next value.  If there was an error making
16281// the request the iterator does not advance and the error is returned.
16282// Deprecated: Use NextWithContext() instead.
16283func (iter *InboundNatRuleListResultIterator) Next() error {
16284	return iter.NextWithContext(context.Background())
16285}
16286
16287// NotDone returns true if the enumeration should be started or is not yet complete.
16288func (iter InboundNatRuleListResultIterator) NotDone() bool {
16289	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16290}
16291
16292// Response returns the raw server response from the last page request.
16293func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
16294	return iter.page.Response()
16295}
16296
16297// Value returns the current value or a zero-initialized value if the
16298// iterator has advanced beyond the end of the collection.
16299func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
16300	if !iter.page.NotDone() {
16301		return InboundNatRule{}
16302	}
16303	return iter.page.Values()[iter.i]
16304}
16305
16306// Creates a new instance of the InboundNatRuleListResultIterator type.
16307func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
16308	return InboundNatRuleListResultIterator{page: page}
16309}
16310
16311// IsEmpty returns true if the ListResult contains no values.
16312func (inrlr InboundNatRuleListResult) IsEmpty() bool {
16313	return inrlr.Value == nil || len(*inrlr.Value) == 0
16314}
16315
16316// hasNextLink returns true if the NextLink is not empty.
16317func (inrlr InboundNatRuleListResult) hasNextLink() bool {
16318	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
16319}
16320
16321// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
16322// It returns nil if no more results exist.
16323func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
16324	if !inrlr.hasNextLink() {
16325		return nil, nil
16326	}
16327	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16328		autorest.AsJSON(),
16329		autorest.AsGet(),
16330		autorest.WithBaseURL(to.String(inrlr.NextLink)))
16331}
16332
16333// InboundNatRuleListResultPage contains a page of InboundNatRule values.
16334type InboundNatRuleListResultPage struct {
16335	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
16336	inrlr InboundNatRuleListResult
16337}
16338
16339// NextWithContext advances to the next page of values.  If there was an error making
16340// the request the page does not advance and the error is returned.
16341func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
16342	if tracing.IsEnabled() {
16343		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
16344		defer func() {
16345			sc := -1
16346			if page.Response().Response.Response != nil {
16347				sc = page.Response().Response.Response.StatusCode
16348			}
16349			tracing.EndSpan(ctx, sc, err)
16350		}()
16351	}
16352	for {
16353		next, err := page.fn(ctx, page.inrlr)
16354		if err != nil {
16355			return err
16356		}
16357		page.inrlr = next
16358		if !next.hasNextLink() || !next.IsEmpty() {
16359			break
16360		}
16361	}
16362	return nil
16363}
16364
16365// Next advances to the next page of values.  If there was an error making
16366// the request the page does not advance and the error is returned.
16367// Deprecated: Use NextWithContext() instead.
16368func (page *InboundNatRuleListResultPage) Next() error {
16369	return page.NextWithContext(context.Background())
16370}
16371
16372// NotDone returns true if the page enumeration should be started or is not yet complete.
16373func (page InboundNatRuleListResultPage) NotDone() bool {
16374	return !page.inrlr.IsEmpty()
16375}
16376
16377// Response returns the raw server response from the last page request.
16378func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
16379	return page.inrlr
16380}
16381
16382// Values returns the slice of values for the current page or nil if there are no values.
16383func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
16384	if page.inrlr.IsEmpty() {
16385		return nil
16386	}
16387	return *page.inrlr.Value
16388}
16389
16390// Creates a new instance of the InboundNatRuleListResultPage type.
16391func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
16392	return InboundNatRuleListResultPage{
16393		fn:    getNextPage,
16394		inrlr: cur,
16395	}
16396}
16397
16398// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
16399type InboundNatRulePropertiesFormat struct {
16400	// FrontendIPConfiguration - A reference to frontend IP addresses.
16401	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
16402	// 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.
16403	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
16404	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
16405	Protocol TransportProtocol `json:"protocol,omitempty"`
16406	// 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.
16407	FrontendPort *int32 `json:"frontendPort,omitempty"`
16408	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
16409	BackendPort *int32 `json:"backendPort,omitempty"`
16410	// 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.
16411	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
16412	// 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.
16413	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
16414	// 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.
16415	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
16416	// ProvisioningState - READ-ONLY; The provisioning state of the inbound NAT rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
16417	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16418}
16419
16420// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
16421func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
16422	objectMap := make(map[string]interface{})
16423	if inrpf.FrontendIPConfiguration != nil {
16424		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
16425	}
16426	if inrpf.Protocol != "" {
16427		objectMap["protocol"] = inrpf.Protocol
16428	}
16429	if inrpf.FrontendPort != nil {
16430		objectMap["frontendPort"] = inrpf.FrontendPort
16431	}
16432	if inrpf.BackendPort != nil {
16433		objectMap["backendPort"] = inrpf.BackendPort
16434	}
16435	if inrpf.IdleTimeoutInMinutes != nil {
16436		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
16437	}
16438	if inrpf.EnableFloatingIP != nil {
16439		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
16440	}
16441	if inrpf.EnableTCPReset != nil {
16442		objectMap["enableTcpReset"] = inrpf.EnableTCPReset
16443	}
16444	return json.Marshal(objectMap)
16445}
16446
16447// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16448// long-running operation.
16449type InboundNatRulesCreateOrUpdateFuture struct {
16450	azure.FutureAPI
16451	// Result returns the result of the asynchronous operation.
16452	// If the operation has not completed it will return an error.
16453	Result func(InboundNatRulesClient) (InboundNatRule, error)
16454}
16455
16456// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16457// operation.
16458type InboundNatRulesDeleteFuture struct {
16459	azure.FutureAPI
16460	// Result returns the result of the asynchronous operation.
16461	// If the operation has not completed it will return an error.
16462	Result func(InboundNatRulesClient) (autorest.Response, error)
16463}
16464
16465// IntentPolicy network Intent Policy resource.
16466type IntentPolicy struct {
16467	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
16468	Etag *string `json:"etag,omitempty"`
16469	// ID - Resource ID.
16470	ID *string `json:"id,omitempty"`
16471	// Name - READ-ONLY; Resource name.
16472	Name *string `json:"name,omitempty"`
16473	// Type - READ-ONLY; Resource type.
16474	Type *string `json:"type,omitempty"`
16475	// Location - Resource location.
16476	Location *string `json:"location,omitempty"`
16477	// Tags - Resource tags.
16478	Tags map[string]*string `json:"tags"`
16479}
16480
16481// MarshalJSON is the custom marshaler for IntentPolicy.
16482func (IP IntentPolicy) MarshalJSON() ([]byte, error) {
16483	objectMap := make(map[string]interface{})
16484	if IP.ID != nil {
16485		objectMap["id"] = IP.ID
16486	}
16487	if IP.Location != nil {
16488		objectMap["location"] = IP.Location
16489	}
16490	if IP.Tags != nil {
16491		objectMap["tags"] = IP.Tags
16492	}
16493	return json.Marshal(objectMap)
16494}
16495
16496// IntentPolicyConfiguration details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest.
16497type IntentPolicyConfiguration struct {
16498	// NetworkIntentPolicyName - The name of the Network Intent Policy for storing in target subscription.
16499	NetworkIntentPolicyName *string `json:"networkIntentPolicyName,omitempty"`
16500	// SourceNetworkIntentPolicy - Source network intent policy.
16501	SourceNetworkIntentPolicy *IntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"`
16502}
16503
16504// Interface a network interface in a resource group.
16505type Interface struct {
16506	autorest.Response `json:"-"`
16507	// InterfacePropertiesFormat - Properties of the network interface.
16508	*InterfacePropertiesFormat `json:"properties,omitempty"`
16509	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
16510	Etag *string `json:"etag,omitempty"`
16511	// ID - Resource ID.
16512	ID *string `json:"id,omitempty"`
16513	// Name - READ-ONLY; Resource name.
16514	Name *string `json:"name,omitempty"`
16515	// Type - READ-ONLY; Resource type.
16516	Type *string `json:"type,omitempty"`
16517	// Location - Resource location.
16518	Location *string `json:"location,omitempty"`
16519	// Tags - Resource tags.
16520	Tags map[string]*string `json:"tags"`
16521}
16522
16523// MarshalJSON is the custom marshaler for Interface.
16524func (i Interface) MarshalJSON() ([]byte, error) {
16525	objectMap := make(map[string]interface{})
16526	if i.InterfacePropertiesFormat != nil {
16527		objectMap["properties"] = i.InterfacePropertiesFormat
16528	}
16529	if i.ID != nil {
16530		objectMap["id"] = i.ID
16531	}
16532	if i.Location != nil {
16533		objectMap["location"] = i.Location
16534	}
16535	if i.Tags != nil {
16536		objectMap["tags"] = i.Tags
16537	}
16538	return json.Marshal(objectMap)
16539}
16540
16541// UnmarshalJSON is the custom unmarshaler for Interface struct.
16542func (i *Interface) UnmarshalJSON(body []byte) error {
16543	var m map[string]*json.RawMessage
16544	err := json.Unmarshal(body, &m)
16545	if err != nil {
16546		return err
16547	}
16548	for k, v := range m {
16549		switch k {
16550		case "properties":
16551			if v != nil {
16552				var interfacePropertiesFormat InterfacePropertiesFormat
16553				err = json.Unmarshal(*v, &interfacePropertiesFormat)
16554				if err != nil {
16555					return err
16556				}
16557				i.InterfacePropertiesFormat = &interfacePropertiesFormat
16558			}
16559		case "etag":
16560			if v != nil {
16561				var etag string
16562				err = json.Unmarshal(*v, &etag)
16563				if err != nil {
16564					return err
16565				}
16566				i.Etag = &etag
16567			}
16568		case "id":
16569			if v != nil {
16570				var ID string
16571				err = json.Unmarshal(*v, &ID)
16572				if err != nil {
16573					return err
16574				}
16575				i.ID = &ID
16576			}
16577		case "name":
16578			if v != nil {
16579				var name string
16580				err = json.Unmarshal(*v, &name)
16581				if err != nil {
16582					return err
16583				}
16584				i.Name = &name
16585			}
16586		case "type":
16587			if v != nil {
16588				var typeVar string
16589				err = json.Unmarshal(*v, &typeVar)
16590				if err != nil {
16591					return err
16592				}
16593				i.Type = &typeVar
16594			}
16595		case "location":
16596			if v != nil {
16597				var location string
16598				err = json.Unmarshal(*v, &location)
16599				if err != nil {
16600					return err
16601				}
16602				i.Location = &location
16603			}
16604		case "tags":
16605			if v != nil {
16606				var tags map[string]*string
16607				err = json.Unmarshal(*v, &tags)
16608				if err != nil {
16609					return err
16610				}
16611				i.Tags = tags
16612			}
16613		}
16614	}
16615
16616	return nil
16617}
16618
16619// InterfaceAssociation network interface and its custom security rules.
16620type InterfaceAssociation struct {
16621	// ID - READ-ONLY; Network interface ID.
16622	ID *string `json:"id,omitempty"`
16623	// SecurityRules - Collection of custom security rules.
16624	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
16625}
16626
16627// MarshalJSON is the custom marshaler for InterfaceAssociation.
16628func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
16629	objectMap := make(map[string]interface{})
16630	if ia.SecurityRules != nil {
16631		objectMap["securityRules"] = ia.SecurityRules
16632	}
16633	return json.Marshal(objectMap)
16634}
16635
16636// InterfaceDNSSettings DNS settings of a network interface.
16637type InterfaceDNSSettings struct {
16638	// 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.
16639	DNSServers *[]string `json:"dnsServers,omitempty"`
16640	// 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.
16641	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
16642	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
16643	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
16644	// InternalFqdn - READ-ONLY; Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
16645	InternalFqdn *string `json:"internalFqdn,omitempty"`
16646	// 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.
16647	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
16648}
16649
16650// MarshalJSON is the custom marshaler for InterfaceDNSSettings.
16651func (ids InterfaceDNSSettings) MarshalJSON() ([]byte, error) {
16652	objectMap := make(map[string]interface{})
16653	if ids.DNSServers != nil {
16654		objectMap["dnsServers"] = ids.DNSServers
16655	}
16656	if ids.InternalDNSNameLabel != nil {
16657		objectMap["internalDnsNameLabel"] = ids.InternalDNSNameLabel
16658	}
16659	return json.Marshal(objectMap)
16660}
16661
16662// InterfaceIPConfiguration iPConfiguration in a network interface.
16663type InterfaceIPConfiguration struct {
16664	autorest.Response `json:"-"`
16665	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
16666	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
16667	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16668	Name *string `json:"name,omitempty"`
16669	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
16670	Etag *string `json:"etag,omitempty"`
16671	// ID - Resource ID.
16672	ID *string `json:"id,omitempty"`
16673}
16674
16675// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
16676func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
16677	objectMap := make(map[string]interface{})
16678	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
16679		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
16680	}
16681	if iic.Name != nil {
16682		objectMap["name"] = iic.Name
16683	}
16684	if iic.ID != nil {
16685		objectMap["id"] = iic.ID
16686	}
16687	return json.Marshal(objectMap)
16688}
16689
16690// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
16691func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
16692	var m map[string]*json.RawMessage
16693	err := json.Unmarshal(body, &m)
16694	if err != nil {
16695		return err
16696	}
16697	for k, v := range m {
16698		switch k {
16699		case "properties":
16700			if v != nil {
16701				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
16702				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
16703				if err != nil {
16704					return err
16705				}
16706				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
16707			}
16708		case "name":
16709			if v != nil {
16710				var name string
16711				err = json.Unmarshal(*v, &name)
16712				if err != nil {
16713					return err
16714				}
16715				iic.Name = &name
16716			}
16717		case "etag":
16718			if v != nil {
16719				var etag string
16720				err = json.Unmarshal(*v, &etag)
16721				if err != nil {
16722					return err
16723				}
16724				iic.Etag = &etag
16725			}
16726		case "id":
16727			if v != nil {
16728				var ID string
16729				err = json.Unmarshal(*v, &ID)
16730				if err != nil {
16731					return err
16732				}
16733				iic.ID = &ID
16734			}
16735		}
16736	}
16737
16738	return nil
16739}
16740
16741// InterfaceIPConfigurationListResult response for list ip configurations API service call.
16742type InterfaceIPConfigurationListResult struct {
16743	autorest.Response `json:"-"`
16744	// Value - A list of ip configurations.
16745	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
16746	// NextLink - READ-ONLY; The URL to get the next set of results.
16747	NextLink *string `json:"nextLink,omitempty"`
16748}
16749
16750// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
16751func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
16752	objectMap := make(map[string]interface{})
16753	if iiclr.Value != nil {
16754		objectMap["value"] = iiclr.Value
16755	}
16756	return json.Marshal(objectMap)
16757}
16758
16759// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
16760// InterfaceIPConfiguration values.
16761type InterfaceIPConfigurationListResultIterator struct {
16762	i    int
16763	page InterfaceIPConfigurationListResultPage
16764}
16765
16766// NextWithContext advances to the next value.  If there was an error making
16767// the request the iterator does not advance and the error is returned.
16768func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
16769	if tracing.IsEnabled() {
16770		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
16771		defer func() {
16772			sc := -1
16773			if iter.Response().Response.Response != nil {
16774				sc = iter.Response().Response.Response.StatusCode
16775			}
16776			tracing.EndSpan(ctx, sc, err)
16777		}()
16778	}
16779	iter.i++
16780	if iter.i < len(iter.page.Values()) {
16781		return nil
16782	}
16783	err = iter.page.NextWithContext(ctx)
16784	if err != nil {
16785		iter.i--
16786		return err
16787	}
16788	iter.i = 0
16789	return nil
16790}
16791
16792// Next advances to the next value.  If there was an error making
16793// the request the iterator does not advance and the error is returned.
16794// Deprecated: Use NextWithContext() instead.
16795func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
16796	return iter.NextWithContext(context.Background())
16797}
16798
16799// NotDone returns true if the enumeration should be started or is not yet complete.
16800func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
16801	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16802}
16803
16804// Response returns the raw server response from the last page request.
16805func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
16806	return iter.page.Response()
16807}
16808
16809// Value returns the current value or a zero-initialized value if the
16810// iterator has advanced beyond the end of the collection.
16811func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
16812	if !iter.page.NotDone() {
16813		return InterfaceIPConfiguration{}
16814	}
16815	return iter.page.Values()[iter.i]
16816}
16817
16818// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
16819func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
16820	return InterfaceIPConfigurationListResultIterator{page: page}
16821}
16822
16823// IsEmpty returns true if the ListResult contains no values.
16824func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
16825	return iiclr.Value == nil || len(*iiclr.Value) == 0
16826}
16827
16828// hasNextLink returns true if the NextLink is not empty.
16829func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
16830	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
16831}
16832
16833// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
16834// It returns nil if no more results exist.
16835func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
16836	if !iiclr.hasNextLink() {
16837		return nil, nil
16838	}
16839	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16840		autorest.AsJSON(),
16841		autorest.AsGet(),
16842		autorest.WithBaseURL(to.String(iiclr.NextLink)))
16843}
16844
16845// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
16846type InterfaceIPConfigurationListResultPage struct {
16847	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
16848	iiclr InterfaceIPConfigurationListResult
16849}
16850
16851// NextWithContext advances to the next page of values.  If there was an error making
16852// the request the page does not advance and the error is returned.
16853func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
16854	if tracing.IsEnabled() {
16855		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
16856		defer func() {
16857			sc := -1
16858			if page.Response().Response.Response != nil {
16859				sc = page.Response().Response.Response.StatusCode
16860			}
16861			tracing.EndSpan(ctx, sc, err)
16862		}()
16863	}
16864	for {
16865		next, err := page.fn(ctx, page.iiclr)
16866		if err != nil {
16867			return err
16868		}
16869		page.iiclr = next
16870		if !next.hasNextLink() || !next.IsEmpty() {
16871			break
16872		}
16873	}
16874	return nil
16875}
16876
16877// Next advances to the next page of values.  If there was an error making
16878// the request the page does not advance and the error is returned.
16879// Deprecated: Use NextWithContext() instead.
16880func (page *InterfaceIPConfigurationListResultPage) Next() error {
16881	return page.NextWithContext(context.Background())
16882}
16883
16884// NotDone returns true if the page enumeration should be started or is not yet complete.
16885func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
16886	return !page.iiclr.IsEmpty()
16887}
16888
16889// Response returns the raw server response from the last page request.
16890func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
16891	return page.iiclr
16892}
16893
16894// Values returns the slice of values for the current page or nil if there are no values.
16895func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
16896	if page.iiclr.IsEmpty() {
16897		return nil
16898	}
16899	return *page.iiclr.Value
16900}
16901
16902// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
16903func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
16904	return InterfaceIPConfigurationListResultPage{
16905		fn:    getNextPage,
16906		iiclr: cur,
16907	}
16908}
16909
16910// InterfaceIPConfigurationPrivateLinkConnectionProperties privateLinkConnection properties for the network
16911// interface.
16912type InterfaceIPConfigurationPrivateLinkConnectionProperties struct {
16913	// GroupID - READ-ONLY; The group ID for current private link connection.
16914	GroupID *string `json:"groupId,omitempty"`
16915	// RequiredMemberName - READ-ONLY; The required member name for current private link connection.
16916	RequiredMemberName *string `json:"requiredMemberName,omitempty"`
16917	// Fqdns - READ-ONLY; List of FQDNs for current private link connection.
16918	Fqdns *[]string `json:"fqdns,omitempty"`
16919}
16920
16921// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
16922type InterfaceIPConfigurationPropertiesFormat struct {
16923	// VirtualNetworkTaps - The reference to Virtual Network Taps.
16924	VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"`
16925	// ApplicationGatewayBackendAddressPools - The reference to ApplicationGatewayBackendAddressPool resource.
16926	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
16927	// LoadBalancerBackendAddressPools - The reference to LoadBalancerBackendAddressPool resource.
16928	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
16929	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
16930	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
16931	// PrivateIPAddress - Private IP address of the IP configuration.
16932	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
16933	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
16934	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
16935	// PrivateIPAddressVersion - Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPv4', 'IPv6'
16936	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
16937	// Subnet - Subnet bound to the IP configuration.
16938	Subnet *Subnet `json:"subnet,omitempty"`
16939	// Primary - Whether this is a primary customer address on the network interface.
16940	Primary *bool `json:"primary,omitempty"`
16941	// PublicIPAddress - Public IP address bound to the IP configuration.
16942	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
16943	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
16944	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
16945	// ProvisioningState - READ-ONLY; The provisioning state of the network interface IP configuration. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
16946	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16947	// PrivateLinkConnectionProperties - READ-ONLY; PrivateLinkConnection properties for the network interface.
16948	PrivateLinkConnectionProperties *InterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"`
16949}
16950
16951// MarshalJSON is the custom marshaler for InterfaceIPConfigurationPropertiesFormat.
16952func (iicpf InterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
16953	objectMap := make(map[string]interface{})
16954	if iicpf.VirtualNetworkTaps != nil {
16955		objectMap["virtualNetworkTaps"] = iicpf.VirtualNetworkTaps
16956	}
16957	if iicpf.ApplicationGatewayBackendAddressPools != nil {
16958		objectMap["applicationGatewayBackendAddressPools"] = iicpf.ApplicationGatewayBackendAddressPools
16959	}
16960	if iicpf.LoadBalancerBackendAddressPools != nil {
16961		objectMap["loadBalancerBackendAddressPools"] = iicpf.LoadBalancerBackendAddressPools
16962	}
16963	if iicpf.LoadBalancerInboundNatRules != nil {
16964		objectMap["loadBalancerInboundNatRules"] = iicpf.LoadBalancerInboundNatRules
16965	}
16966	if iicpf.PrivateIPAddress != nil {
16967		objectMap["privateIPAddress"] = iicpf.PrivateIPAddress
16968	}
16969	if iicpf.PrivateIPAllocationMethod != "" {
16970		objectMap["privateIPAllocationMethod"] = iicpf.PrivateIPAllocationMethod
16971	}
16972	if iicpf.PrivateIPAddressVersion != "" {
16973		objectMap["privateIPAddressVersion"] = iicpf.PrivateIPAddressVersion
16974	}
16975	if iicpf.Subnet != nil {
16976		objectMap["subnet"] = iicpf.Subnet
16977	}
16978	if iicpf.Primary != nil {
16979		objectMap["primary"] = iicpf.Primary
16980	}
16981	if iicpf.PublicIPAddress != nil {
16982		objectMap["publicIPAddress"] = iicpf.PublicIPAddress
16983	}
16984	if iicpf.ApplicationSecurityGroups != nil {
16985		objectMap["applicationSecurityGroups"] = iicpf.ApplicationSecurityGroups
16986	}
16987	return json.Marshal(objectMap)
16988}
16989
16990// InterfaceListResult response for the ListNetworkInterface API service call.
16991type InterfaceListResult struct {
16992	autorest.Response `json:"-"`
16993	// Value - A list of network interfaces in a resource group.
16994	Value *[]Interface `json:"value,omitempty"`
16995	// NextLink - READ-ONLY; The URL to get the next set of results.
16996	NextLink *string `json:"nextLink,omitempty"`
16997}
16998
16999// MarshalJSON is the custom marshaler for InterfaceListResult.
17000func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
17001	objectMap := make(map[string]interface{})
17002	if ilr.Value != nil {
17003		objectMap["value"] = ilr.Value
17004	}
17005	return json.Marshal(objectMap)
17006}
17007
17008// InterfaceListResultIterator provides access to a complete listing of Interface values.
17009type InterfaceListResultIterator struct {
17010	i    int
17011	page InterfaceListResultPage
17012}
17013
17014// NextWithContext advances to the next value.  If there was an error making
17015// the request the iterator does not advance and the error is returned.
17016func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
17017	if tracing.IsEnabled() {
17018		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
17019		defer func() {
17020			sc := -1
17021			if iter.Response().Response.Response != nil {
17022				sc = iter.Response().Response.Response.StatusCode
17023			}
17024			tracing.EndSpan(ctx, sc, err)
17025		}()
17026	}
17027	iter.i++
17028	if iter.i < len(iter.page.Values()) {
17029		return nil
17030	}
17031	err = iter.page.NextWithContext(ctx)
17032	if err != nil {
17033		iter.i--
17034		return err
17035	}
17036	iter.i = 0
17037	return nil
17038}
17039
17040// Next advances to the next value.  If there was an error making
17041// the request the iterator does not advance and the error is returned.
17042// Deprecated: Use NextWithContext() instead.
17043func (iter *InterfaceListResultIterator) Next() error {
17044	return iter.NextWithContext(context.Background())
17045}
17046
17047// NotDone returns true if the enumeration should be started or is not yet complete.
17048func (iter InterfaceListResultIterator) NotDone() bool {
17049	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17050}
17051
17052// Response returns the raw server response from the last page request.
17053func (iter InterfaceListResultIterator) Response() InterfaceListResult {
17054	return iter.page.Response()
17055}
17056
17057// Value returns the current value or a zero-initialized value if the
17058// iterator has advanced beyond the end of the collection.
17059func (iter InterfaceListResultIterator) Value() Interface {
17060	if !iter.page.NotDone() {
17061		return Interface{}
17062	}
17063	return iter.page.Values()[iter.i]
17064}
17065
17066// Creates a new instance of the InterfaceListResultIterator type.
17067func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
17068	return InterfaceListResultIterator{page: page}
17069}
17070
17071// IsEmpty returns true if the ListResult contains no values.
17072func (ilr InterfaceListResult) IsEmpty() bool {
17073	return ilr.Value == nil || len(*ilr.Value) == 0
17074}
17075
17076// hasNextLink returns true if the NextLink is not empty.
17077func (ilr InterfaceListResult) hasNextLink() bool {
17078	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
17079}
17080
17081// interfaceListResultPreparer prepares a request to retrieve the next set of results.
17082// It returns nil if no more results exist.
17083func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
17084	if !ilr.hasNextLink() {
17085		return nil, nil
17086	}
17087	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17088		autorest.AsJSON(),
17089		autorest.AsGet(),
17090		autorest.WithBaseURL(to.String(ilr.NextLink)))
17091}
17092
17093// InterfaceListResultPage contains a page of Interface values.
17094type InterfaceListResultPage struct {
17095	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
17096	ilr InterfaceListResult
17097}
17098
17099// NextWithContext advances to the next page of values.  If there was an error making
17100// the request the page does not advance and the error is returned.
17101func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
17102	if tracing.IsEnabled() {
17103		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
17104		defer func() {
17105			sc := -1
17106			if page.Response().Response.Response != nil {
17107				sc = page.Response().Response.Response.StatusCode
17108			}
17109			tracing.EndSpan(ctx, sc, err)
17110		}()
17111	}
17112	for {
17113		next, err := page.fn(ctx, page.ilr)
17114		if err != nil {
17115			return err
17116		}
17117		page.ilr = next
17118		if !next.hasNextLink() || !next.IsEmpty() {
17119			break
17120		}
17121	}
17122	return nil
17123}
17124
17125// Next advances to the next page of values.  If there was an error making
17126// the request the page does not advance and the error is returned.
17127// Deprecated: Use NextWithContext() instead.
17128func (page *InterfaceListResultPage) Next() error {
17129	return page.NextWithContext(context.Background())
17130}
17131
17132// NotDone returns true if the page enumeration should be started or is not yet complete.
17133func (page InterfaceListResultPage) NotDone() bool {
17134	return !page.ilr.IsEmpty()
17135}
17136
17137// Response returns the raw server response from the last page request.
17138func (page InterfaceListResultPage) Response() InterfaceListResult {
17139	return page.ilr
17140}
17141
17142// Values returns the slice of values for the current page or nil if there are no values.
17143func (page InterfaceListResultPage) Values() []Interface {
17144	if page.ilr.IsEmpty() {
17145		return nil
17146	}
17147	return *page.ilr.Value
17148}
17149
17150// Creates a new instance of the InterfaceListResultPage type.
17151func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
17152	return InterfaceListResultPage{
17153		fn:  getNextPage,
17154		ilr: cur,
17155	}
17156}
17157
17158// InterfaceLoadBalancerListResult response for list ip configurations API service call.
17159type InterfaceLoadBalancerListResult struct {
17160	autorest.Response `json:"-"`
17161	// Value - A list of load balancers.
17162	Value *[]LoadBalancer `json:"value,omitempty"`
17163	// NextLink - READ-ONLY; The URL to get the next set of results.
17164	NextLink *string `json:"nextLink,omitempty"`
17165}
17166
17167// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
17168func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
17169	objectMap := make(map[string]interface{})
17170	if ilblr.Value != nil {
17171		objectMap["value"] = ilblr.Value
17172	}
17173	return json.Marshal(objectMap)
17174}
17175
17176// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
17177type InterfaceLoadBalancerListResultIterator struct {
17178	i    int
17179	page InterfaceLoadBalancerListResultPage
17180}
17181
17182// NextWithContext advances to the next value.  If there was an error making
17183// the request the iterator does not advance and the error is returned.
17184func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
17185	if tracing.IsEnabled() {
17186		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
17187		defer func() {
17188			sc := -1
17189			if iter.Response().Response.Response != nil {
17190				sc = iter.Response().Response.Response.StatusCode
17191			}
17192			tracing.EndSpan(ctx, sc, err)
17193		}()
17194	}
17195	iter.i++
17196	if iter.i < len(iter.page.Values()) {
17197		return nil
17198	}
17199	err = iter.page.NextWithContext(ctx)
17200	if err != nil {
17201		iter.i--
17202		return err
17203	}
17204	iter.i = 0
17205	return nil
17206}
17207
17208// Next advances to the next value.  If there was an error making
17209// the request the iterator does not advance and the error is returned.
17210// Deprecated: Use NextWithContext() instead.
17211func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
17212	return iter.NextWithContext(context.Background())
17213}
17214
17215// NotDone returns true if the enumeration should be started or is not yet complete.
17216func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
17217	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17218}
17219
17220// Response returns the raw server response from the last page request.
17221func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
17222	return iter.page.Response()
17223}
17224
17225// Value returns the current value or a zero-initialized value if the
17226// iterator has advanced beyond the end of the collection.
17227func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
17228	if !iter.page.NotDone() {
17229		return LoadBalancer{}
17230	}
17231	return iter.page.Values()[iter.i]
17232}
17233
17234// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
17235func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
17236	return InterfaceLoadBalancerListResultIterator{page: page}
17237}
17238
17239// IsEmpty returns true if the ListResult contains no values.
17240func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
17241	return ilblr.Value == nil || len(*ilblr.Value) == 0
17242}
17243
17244// hasNextLink returns true if the NextLink is not empty.
17245func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
17246	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
17247}
17248
17249// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
17250// It returns nil if no more results exist.
17251func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
17252	if !ilblr.hasNextLink() {
17253		return nil, nil
17254	}
17255	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17256		autorest.AsJSON(),
17257		autorest.AsGet(),
17258		autorest.WithBaseURL(to.String(ilblr.NextLink)))
17259}
17260
17261// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
17262type InterfaceLoadBalancerListResultPage struct {
17263	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
17264	ilblr InterfaceLoadBalancerListResult
17265}
17266
17267// NextWithContext advances to the next page of values.  If there was an error making
17268// the request the page does not advance and the error is returned.
17269func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
17270	if tracing.IsEnabled() {
17271		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
17272		defer func() {
17273			sc := -1
17274			if page.Response().Response.Response != nil {
17275				sc = page.Response().Response.Response.StatusCode
17276			}
17277			tracing.EndSpan(ctx, sc, err)
17278		}()
17279	}
17280	for {
17281		next, err := page.fn(ctx, page.ilblr)
17282		if err != nil {
17283			return err
17284		}
17285		page.ilblr = next
17286		if !next.hasNextLink() || !next.IsEmpty() {
17287			break
17288		}
17289	}
17290	return nil
17291}
17292
17293// Next advances to the next page of values.  If there was an error making
17294// the request the page does not advance and the error is returned.
17295// Deprecated: Use NextWithContext() instead.
17296func (page *InterfaceLoadBalancerListResultPage) Next() error {
17297	return page.NextWithContext(context.Background())
17298}
17299
17300// NotDone returns true if the page enumeration should be started or is not yet complete.
17301func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
17302	return !page.ilblr.IsEmpty()
17303}
17304
17305// Response returns the raw server response from the last page request.
17306func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
17307	return page.ilblr
17308}
17309
17310// Values returns the slice of values for the current page or nil if there are no values.
17311func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
17312	if page.ilblr.IsEmpty() {
17313		return nil
17314	}
17315	return *page.ilblr.Value
17316}
17317
17318// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
17319func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
17320	return InterfaceLoadBalancerListResultPage{
17321		fn:    getNextPage,
17322		ilblr: cur,
17323	}
17324}
17325
17326// InterfacePropertiesFormat networkInterface properties.
17327type InterfacePropertiesFormat struct {
17328	// VirtualMachine - READ-ONLY; The reference to a virtual machine.
17329	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
17330	// NetworkSecurityGroup - The reference to the NetworkSecurityGroup resource.
17331	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
17332	// PrivateEndpoint - READ-ONLY; A reference to the private endpoint to which the network interface is linked.
17333	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
17334	// IPConfigurations - A list of IPConfigurations of the network interface.
17335	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
17336	// TapConfigurations - READ-ONLY; A list of TapConfigurations of the network interface.
17337	TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"`
17338	// DNSSettings - The DNS settings in network interface.
17339	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
17340	// MacAddress - READ-ONLY; The MAC address of the network interface.
17341	MacAddress *string `json:"macAddress,omitempty"`
17342	// Primary - READ-ONLY; Whether this is a primary network interface on a virtual machine.
17343	Primary *bool `json:"primary,omitempty"`
17344	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
17345	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
17346	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
17347	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
17348	// HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources.
17349	HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"`
17350	// ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource.
17351	ResourceGUID *string `json:"resourceGuid,omitempty"`
17352	// ProvisioningState - READ-ONLY; The provisioning state of the network interface resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17353	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17354}
17355
17356// MarshalJSON is the custom marshaler for InterfacePropertiesFormat.
17357func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
17358	objectMap := make(map[string]interface{})
17359	if ipf.NetworkSecurityGroup != nil {
17360		objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup
17361	}
17362	if ipf.IPConfigurations != nil {
17363		objectMap["ipConfigurations"] = ipf.IPConfigurations
17364	}
17365	if ipf.DNSSettings != nil {
17366		objectMap["dnsSettings"] = ipf.DNSSettings
17367	}
17368	if ipf.EnableAcceleratedNetworking != nil {
17369		objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking
17370	}
17371	if ipf.EnableIPForwarding != nil {
17372		objectMap["enableIPForwarding"] = ipf.EnableIPForwarding
17373	}
17374	return json.Marshal(objectMap)
17375}
17376
17377// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17378// long-running operation.
17379type InterfacesCreateOrUpdateFuture struct {
17380	azure.FutureAPI
17381	// Result returns the result of the asynchronous operation.
17382	// If the operation has not completed it will return an error.
17383	Result func(InterfacesClient) (Interface, error)
17384}
17385
17386// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17387// operation.
17388type InterfacesDeleteFuture struct {
17389	azure.FutureAPI
17390	// Result returns the result of the asynchronous operation.
17391	// If the operation has not completed it will return an error.
17392	Result func(InterfacesClient) (autorest.Response, error)
17393}
17394
17395// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
17396// long-running operation.
17397type InterfacesGetEffectiveRouteTableFuture struct {
17398	azure.FutureAPI
17399	// Result returns the result of the asynchronous operation.
17400	// If the operation has not completed it will return an error.
17401	Result func(InterfacesClient) (EffectiveRouteListResult, error)
17402}
17403
17404// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
17405// results of a long-running operation.
17406type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
17407	azure.FutureAPI
17408	// Result returns the result of the asynchronous operation.
17409	// If the operation has not completed it will return an error.
17410	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
17411}
17412
17413// InterfaceTapConfiguration tap configuration in a Network Interface.
17414type InterfaceTapConfiguration struct {
17415	autorest.Response `json:"-"`
17416	// InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration.
17417	*InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"`
17418	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17419	Name *string `json:"name,omitempty"`
17420	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
17421	Etag *string `json:"etag,omitempty"`
17422	// Type - READ-ONLY; Sub Resource type.
17423	Type *string `json:"type,omitempty"`
17424	// ID - Resource ID.
17425	ID *string `json:"id,omitempty"`
17426}
17427
17428// MarshalJSON is the custom marshaler for InterfaceTapConfiguration.
17429func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) {
17430	objectMap := make(map[string]interface{})
17431	if itc.InterfaceTapConfigurationPropertiesFormat != nil {
17432		objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat
17433	}
17434	if itc.Name != nil {
17435		objectMap["name"] = itc.Name
17436	}
17437	if itc.ID != nil {
17438		objectMap["id"] = itc.ID
17439	}
17440	return json.Marshal(objectMap)
17441}
17442
17443// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct.
17444func (itc *InterfaceTapConfiguration) UnmarshalJSON(body []byte) error {
17445	var m map[string]*json.RawMessage
17446	err := json.Unmarshal(body, &m)
17447	if err != nil {
17448		return err
17449	}
17450	for k, v := range m {
17451		switch k {
17452		case "properties":
17453			if v != nil {
17454				var interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat
17455				err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat)
17456				if err != nil {
17457					return err
17458				}
17459				itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat
17460			}
17461		case "name":
17462			if v != nil {
17463				var name string
17464				err = json.Unmarshal(*v, &name)
17465				if err != nil {
17466					return err
17467				}
17468				itc.Name = &name
17469			}
17470		case "etag":
17471			if v != nil {
17472				var etag string
17473				err = json.Unmarshal(*v, &etag)
17474				if err != nil {
17475					return err
17476				}
17477				itc.Etag = &etag
17478			}
17479		case "type":
17480			if v != nil {
17481				var typeVar string
17482				err = json.Unmarshal(*v, &typeVar)
17483				if err != nil {
17484					return err
17485				}
17486				itc.Type = &typeVar
17487			}
17488		case "id":
17489			if v != nil {
17490				var ID string
17491				err = json.Unmarshal(*v, &ID)
17492				if err != nil {
17493					return err
17494				}
17495				itc.ID = &ID
17496			}
17497		}
17498	}
17499
17500	return nil
17501}
17502
17503// InterfaceTapConfigurationListResult response for list tap configurations API service call.
17504type InterfaceTapConfigurationListResult struct {
17505	autorest.Response `json:"-"`
17506	// Value - A list of tap configurations.
17507	Value *[]InterfaceTapConfiguration `json:"value,omitempty"`
17508	// NextLink - READ-ONLY; The URL to get the next set of results.
17509	NextLink *string `json:"nextLink,omitempty"`
17510}
17511
17512// MarshalJSON is the custom marshaler for InterfaceTapConfigurationListResult.
17513func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) {
17514	objectMap := make(map[string]interface{})
17515	if itclr.Value != nil {
17516		objectMap["value"] = itclr.Value
17517	}
17518	return json.Marshal(objectMap)
17519}
17520
17521// InterfaceTapConfigurationListResultIterator provides access to a complete listing of
17522// InterfaceTapConfiguration values.
17523type InterfaceTapConfigurationListResultIterator struct {
17524	i    int
17525	page InterfaceTapConfigurationListResultPage
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 *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
17531	if tracing.IsEnabled() {
17532		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.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 *InterfaceTapConfigurationListResultIterator) 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 InterfaceTapConfigurationListResultIterator) 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 InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult {
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 InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration {
17574	if !iter.page.NotDone() {
17575		return InterfaceTapConfiguration{}
17576	}
17577	return iter.page.Values()[iter.i]
17578}
17579
17580// Creates a new instance of the InterfaceTapConfigurationListResultIterator type.
17581func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator {
17582	return InterfaceTapConfigurationListResultIterator{page: page}
17583}
17584
17585// IsEmpty returns true if the ListResult contains no values.
17586func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
17587	return itclr.Value == nil || len(*itclr.Value) == 0
17588}
17589
17590// hasNextLink returns true if the NextLink is not empty.
17591func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool {
17592	return itclr.NextLink != nil && len(*itclr.NextLink) != 0
17593}
17594
17595// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results.
17596// It returns nil if no more results exist.
17597func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
17598	if !itclr.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(itclr.NextLink)))
17605}
17606
17607// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values.
17608type InterfaceTapConfigurationListResultPage struct {
17609	fn    func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
17610	itclr InterfaceTapConfigurationListResult
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 *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
17616	if tracing.IsEnabled() {
17617		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.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.itclr)
17628		if err != nil {
17629			return err
17630		}
17631		page.itclr = 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 *InterfaceTapConfigurationListResultPage) 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 InterfaceTapConfigurationListResultPage) NotDone() bool {
17648	return !page.itclr.IsEmpty()
17649}
17650
17651// Response returns the raw server response from the last page request.
17652func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult {
17653	return page.itclr
17654}
17655
17656// Values returns the slice of values for the current page or nil if there are no values.
17657func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration {
17658	if page.itclr.IsEmpty() {
17659		return nil
17660	}
17661	return *page.itclr.Value
17662}
17663
17664// Creates a new instance of the InterfaceTapConfigurationListResultPage type.
17665func NewInterfaceTapConfigurationListResultPage(cur InterfaceTapConfigurationListResult, getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage {
17666	return InterfaceTapConfigurationListResultPage{
17667		fn:    getNextPage,
17668		itclr: cur,
17669	}
17670}
17671
17672// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration.
17673type InterfaceTapConfigurationPropertiesFormat struct {
17674	// VirtualNetworkTap - The reference to the Virtual Network Tap resource.
17675	VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"`
17676	// ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17677	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17678}
17679
17680// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat.
17681func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
17682	objectMap := make(map[string]interface{})
17683	if itcpf.VirtualNetworkTap != nil {
17684		objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap
17685	}
17686	return json.Marshal(objectMap)
17687}
17688
17689// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
17690// of a long-running operation.
17691type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
17692	azure.FutureAPI
17693	// Result returns the result of the asynchronous operation.
17694	// If the operation has not completed it will return an error.
17695	Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error)
17696}
17697
17698// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
17699// long-running operation.
17700type InterfaceTapConfigurationsDeleteFuture struct {
17701	azure.FutureAPI
17702	// Result returns the result of the asynchronous operation.
17703	// If the operation has not completed it will return an error.
17704	Result func(InterfaceTapConfigurationsClient) (autorest.Response, error)
17705}
17706
17707// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call.
17708type IPAddressAvailabilityResult struct {
17709	autorest.Response `json:"-"`
17710	// Available - Private IP address availability.
17711	Available *bool `json:"available,omitempty"`
17712	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
17713	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
17714}
17715
17716// IPAllocation ipAllocation resource.
17717type IPAllocation struct {
17718	autorest.Response `json:"-"`
17719	// IPAllocationPropertiesFormat - Properties of the IpAllocation.
17720	*IPAllocationPropertiesFormat `json:"properties,omitempty"`
17721	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
17722	Etag *string `json:"etag,omitempty"`
17723	// ID - Resource ID.
17724	ID *string `json:"id,omitempty"`
17725	// Name - READ-ONLY; Resource name.
17726	Name *string `json:"name,omitempty"`
17727	// Type - READ-ONLY; Resource type.
17728	Type *string `json:"type,omitempty"`
17729	// Location - Resource location.
17730	Location *string `json:"location,omitempty"`
17731	// Tags - Resource tags.
17732	Tags map[string]*string `json:"tags"`
17733}
17734
17735// MarshalJSON is the custom marshaler for IPAllocation.
17736func (ia IPAllocation) MarshalJSON() ([]byte, error) {
17737	objectMap := make(map[string]interface{})
17738	if ia.IPAllocationPropertiesFormat != nil {
17739		objectMap["properties"] = ia.IPAllocationPropertiesFormat
17740	}
17741	if ia.ID != nil {
17742		objectMap["id"] = ia.ID
17743	}
17744	if ia.Location != nil {
17745		objectMap["location"] = ia.Location
17746	}
17747	if ia.Tags != nil {
17748		objectMap["tags"] = ia.Tags
17749	}
17750	return json.Marshal(objectMap)
17751}
17752
17753// UnmarshalJSON is the custom unmarshaler for IPAllocation struct.
17754func (ia *IPAllocation) UnmarshalJSON(body []byte) error {
17755	var m map[string]*json.RawMessage
17756	err := json.Unmarshal(body, &m)
17757	if err != nil {
17758		return err
17759	}
17760	for k, v := range m {
17761		switch k {
17762		case "properties":
17763			if v != nil {
17764				var IPAllocationPropertiesFormat IPAllocationPropertiesFormat
17765				err = json.Unmarshal(*v, &IPAllocationPropertiesFormat)
17766				if err != nil {
17767					return err
17768				}
17769				ia.IPAllocationPropertiesFormat = &IPAllocationPropertiesFormat
17770			}
17771		case "etag":
17772			if v != nil {
17773				var etag string
17774				err = json.Unmarshal(*v, &etag)
17775				if err != nil {
17776					return err
17777				}
17778				ia.Etag = &etag
17779			}
17780		case "id":
17781			if v != nil {
17782				var ID string
17783				err = json.Unmarshal(*v, &ID)
17784				if err != nil {
17785					return err
17786				}
17787				ia.ID = &ID
17788			}
17789		case "name":
17790			if v != nil {
17791				var name string
17792				err = json.Unmarshal(*v, &name)
17793				if err != nil {
17794					return err
17795				}
17796				ia.Name = &name
17797			}
17798		case "type":
17799			if v != nil {
17800				var typeVar string
17801				err = json.Unmarshal(*v, &typeVar)
17802				if err != nil {
17803					return err
17804				}
17805				ia.Type = &typeVar
17806			}
17807		case "location":
17808			if v != nil {
17809				var location string
17810				err = json.Unmarshal(*v, &location)
17811				if err != nil {
17812					return err
17813				}
17814				ia.Location = &location
17815			}
17816		case "tags":
17817			if v != nil {
17818				var tags map[string]*string
17819				err = json.Unmarshal(*v, &tags)
17820				if err != nil {
17821					return err
17822				}
17823				ia.Tags = tags
17824			}
17825		}
17826	}
17827
17828	return nil
17829}
17830
17831// IPAllocationListResult response for the ListIpAllocations API service call.
17832type IPAllocationListResult struct {
17833	autorest.Response `json:"-"`
17834	// Value - A list of IpAllocation resources.
17835	Value *[]IPAllocation `json:"value,omitempty"`
17836	// NextLink - The URL to get the next set of results.
17837	NextLink *string `json:"nextLink,omitempty"`
17838}
17839
17840// IPAllocationListResultIterator provides access to a complete listing of IPAllocation values.
17841type IPAllocationListResultIterator struct {
17842	i    int
17843	page IPAllocationListResultPage
17844}
17845
17846// NextWithContext advances to the next value.  If there was an error making
17847// the request the iterator does not advance and the error is returned.
17848func (iter *IPAllocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
17849	if tracing.IsEnabled() {
17850		ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationListResultIterator.NextWithContext")
17851		defer func() {
17852			sc := -1
17853			if iter.Response().Response.Response != nil {
17854				sc = iter.Response().Response.Response.StatusCode
17855			}
17856			tracing.EndSpan(ctx, sc, err)
17857		}()
17858	}
17859	iter.i++
17860	if iter.i < len(iter.page.Values()) {
17861		return nil
17862	}
17863	err = iter.page.NextWithContext(ctx)
17864	if err != nil {
17865		iter.i--
17866		return err
17867	}
17868	iter.i = 0
17869	return nil
17870}
17871
17872// Next advances to the next value.  If there was an error making
17873// the request the iterator does not advance and the error is returned.
17874// Deprecated: Use NextWithContext() instead.
17875func (iter *IPAllocationListResultIterator) Next() error {
17876	return iter.NextWithContext(context.Background())
17877}
17878
17879// NotDone returns true if the enumeration should be started or is not yet complete.
17880func (iter IPAllocationListResultIterator) NotDone() bool {
17881	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17882}
17883
17884// Response returns the raw server response from the last page request.
17885func (iter IPAllocationListResultIterator) Response() IPAllocationListResult {
17886	return iter.page.Response()
17887}
17888
17889// Value returns the current value or a zero-initialized value if the
17890// iterator has advanced beyond the end of the collection.
17891func (iter IPAllocationListResultIterator) Value() IPAllocation {
17892	if !iter.page.NotDone() {
17893		return IPAllocation{}
17894	}
17895	return iter.page.Values()[iter.i]
17896}
17897
17898// Creates a new instance of the IPAllocationListResultIterator type.
17899func NewIPAllocationListResultIterator(page IPAllocationListResultPage) IPAllocationListResultIterator {
17900	return IPAllocationListResultIterator{page: page}
17901}
17902
17903// IsEmpty returns true if the ListResult contains no values.
17904func (ialr IPAllocationListResult) IsEmpty() bool {
17905	return ialr.Value == nil || len(*ialr.Value) == 0
17906}
17907
17908// hasNextLink returns true if the NextLink is not empty.
17909func (ialr IPAllocationListResult) hasNextLink() bool {
17910	return ialr.NextLink != nil && len(*ialr.NextLink) != 0
17911}
17912
17913// iPAllocationListResultPreparer prepares a request to retrieve the next set of results.
17914// It returns nil if no more results exist.
17915func (ialr IPAllocationListResult) iPAllocationListResultPreparer(ctx context.Context) (*http.Request, error) {
17916	if !ialr.hasNextLink() {
17917		return nil, nil
17918	}
17919	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17920		autorest.AsJSON(),
17921		autorest.AsGet(),
17922		autorest.WithBaseURL(to.String(ialr.NextLink)))
17923}
17924
17925// IPAllocationListResultPage contains a page of IPAllocation values.
17926type IPAllocationListResultPage struct {
17927	fn   func(context.Context, IPAllocationListResult) (IPAllocationListResult, error)
17928	ialr IPAllocationListResult
17929}
17930
17931// NextWithContext advances to the next page of values.  If there was an error making
17932// the request the page does not advance and the error is returned.
17933func (page *IPAllocationListResultPage) NextWithContext(ctx context.Context) (err error) {
17934	if tracing.IsEnabled() {
17935		ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationListResultPage.NextWithContext")
17936		defer func() {
17937			sc := -1
17938			if page.Response().Response.Response != nil {
17939				sc = page.Response().Response.Response.StatusCode
17940			}
17941			tracing.EndSpan(ctx, sc, err)
17942		}()
17943	}
17944	for {
17945		next, err := page.fn(ctx, page.ialr)
17946		if err != nil {
17947			return err
17948		}
17949		page.ialr = next
17950		if !next.hasNextLink() || !next.IsEmpty() {
17951			break
17952		}
17953	}
17954	return nil
17955}
17956
17957// Next advances to the next page of values.  If there was an error making
17958// the request the page does not advance and the error is returned.
17959// Deprecated: Use NextWithContext() instead.
17960func (page *IPAllocationListResultPage) Next() error {
17961	return page.NextWithContext(context.Background())
17962}
17963
17964// NotDone returns true if the page enumeration should be started or is not yet complete.
17965func (page IPAllocationListResultPage) NotDone() bool {
17966	return !page.ialr.IsEmpty()
17967}
17968
17969// Response returns the raw server response from the last page request.
17970func (page IPAllocationListResultPage) Response() IPAllocationListResult {
17971	return page.ialr
17972}
17973
17974// Values returns the slice of values for the current page or nil if there are no values.
17975func (page IPAllocationListResultPage) Values() []IPAllocation {
17976	if page.ialr.IsEmpty() {
17977		return nil
17978	}
17979	return *page.ialr.Value
17980}
17981
17982// Creates a new instance of the IPAllocationListResultPage type.
17983func NewIPAllocationListResultPage(cur IPAllocationListResult, getNextPage func(context.Context, IPAllocationListResult) (IPAllocationListResult, error)) IPAllocationListResultPage {
17984	return IPAllocationListResultPage{
17985		fn:   getNextPage,
17986		ialr: cur,
17987	}
17988}
17989
17990// IPAllocationPropertiesFormat properties of the IpAllocation.
17991type IPAllocationPropertiesFormat struct {
17992	// Subnet - READ-ONLY; The Subnet that using the prefix of this IpAllocation resource.
17993	Subnet *SubResource `json:"subnet,omitempty"`
17994	// VirtualNetwork - READ-ONLY; The VirtualNetwork that using the prefix of this IpAllocation resource.
17995	VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"`
17996	// Type - The type for the IpAllocation. Possible values include: 'Undefined', 'Hypernet'
17997	Type IPAllocationType `json:"type,omitempty"`
17998	// Prefix - The address prefix for the IpAllocation.
17999	Prefix *string `json:"prefix,omitempty"`
18000	// PrefixLength - The address prefix length for the IpAllocation.
18001	PrefixLength *int32 `json:"prefixLength,omitempty"`
18002	// PrefixType - The address prefix Type for the IpAllocation. Possible values include: 'IPv4', 'IPv6'
18003	PrefixType IPVersion `json:"prefixType,omitempty"`
18004	// IpamAllocationID - The IPAM allocation ID.
18005	IpamAllocationID *string `json:"ipamAllocationId,omitempty"`
18006	// AllocationTags - IpAllocation tags.
18007	AllocationTags map[string]*string `json:"allocationTags"`
18008}
18009
18010// MarshalJSON is the custom marshaler for IPAllocationPropertiesFormat.
18011func (iapf IPAllocationPropertiesFormat) MarshalJSON() ([]byte, error) {
18012	objectMap := make(map[string]interface{})
18013	if iapf.Type != "" {
18014		objectMap["type"] = iapf.Type
18015	}
18016	if iapf.Prefix != nil {
18017		objectMap["prefix"] = iapf.Prefix
18018	}
18019	if iapf.PrefixLength != nil {
18020		objectMap["prefixLength"] = iapf.PrefixLength
18021	}
18022	if iapf.PrefixType != "" {
18023		objectMap["prefixType"] = iapf.PrefixType
18024	}
18025	if iapf.IpamAllocationID != nil {
18026		objectMap["ipamAllocationId"] = iapf.IpamAllocationID
18027	}
18028	if iapf.AllocationTags != nil {
18029		objectMap["allocationTags"] = iapf.AllocationTags
18030	}
18031	return json.Marshal(objectMap)
18032}
18033
18034// IPAllocationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18035// long-running operation.
18036type IPAllocationsCreateOrUpdateFuture struct {
18037	azure.FutureAPI
18038	// Result returns the result of the asynchronous operation.
18039	// If the operation has not completed it will return an error.
18040	Result func(IPAllocationsClient) (IPAllocation, error)
18041}
18042
18043// IPAllocationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18044// operation.
18045type IPAllocationsDeleteFuture struct {
18046	azure.FutureAPI
18047	// Result returns the result of the asynchronous operation.
18048	// If the operation has not completed it will return an error.
18049	Result func(IPAllocationsClient) (autorest.Response, error)
18050}
18051
18052// IPConfiguration IP configuration.
18053type IPConfiguration struct {
18054	// IPConfigurationPropertiesFormat - Properties of the IP configuration.
18055	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
18056	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18057	Name *string `json:"name,omitempty"`
18058	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
18059	Etag *string `json:"etag,omitempty"`
18060	// ID - Resource ID.
18061	ID *string `json:"id,omitempty"`
18062}
18063
18064// MarshalJSON is the custom marshaler for IPConfiguration.
18065func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
18066	objectMap := make(map[string]interface{})
18067	if ic.IPConfigurationPropertiesFormat != nil {
18068		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
18069	}
18070	if ic.Name != nil {
18071		objectMap["name"] = ic.Name
18072	}
18073	if ic.ID != nil {
18074		objectMap["id"] = ic.ID
18075	}
18076	return json.Marshal(objectMap)
18077}
18078
18079// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
18080func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
18081	var m map[string]*json.RawMessage
18082	err := json.Unmarshal(body, &m)
18083	if err != nil {
18084		return err
18085	}
18086	for k, v := range m {
18087		switch k {
18088		case "properties":
18089			if v != nil {
18090				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
18091				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
18092				if err != nil {
18093					return err
18094				}
18095				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
18096			}
18097		case "name":
18098			if v != nil {
18099				var name string
18100				err = json.Unmarshal(*v, &name)
18101				if err != nil {
18102					return err
18103				}
18104				ic.Name = &name
18105			}
18106		case "etag":
18107			if v != nil {
18108				var etag string
18109				err = json.Unmarshal(*v, &etag)
18110				if err != nil {
18111					return err
18112				}
18113				ic.Etag = &etag
18114			}
18115		case "id":
18116			if v != nil {
18117				var ID string
18118				err = json.Unmarshal(*v, &ID)
18119				if err != nil {
18120					return err
18121				}
18122				ic.ID = &ID
18123			}
18124		}
18125	}
18126
18127	return nil
18128}
18129
18130// IPConfigurationBgpPeeringAddress properties of IPConfigurationBgpPeeringAddress.
18131type IPConfigurationBgpPeeringAddress struct {
18132	// IpconfigurationID - The ID of IP configuration which belongs to gateway.
18133	IpconfigurationID *string `json:"ipconfigurationId,omitempty"`
18134	// DefaultBgpIPAddresses - READ-ONLY; The list of default BGP peering addresses which belong to IP configuration.
18135	DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"`
18136	// CustomBgpIPAddresses - The list of custom BGP peering addresses which belong to IP configuration.
18137	CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"`
18138	// TunnelIPAddresses - READ-ONLY; The list of tunnel public IP addresses which belong to IP configuration.
18139	TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"`
18140}
18141
18142// MarshalJSON is the custom marshaler for IPConfigurationBgpPeeringAddress.
18143func (icbpa IPConfigurationBgpPeeringAddress) MarshalJSON() ([]byte, error) {
18144	objectMap := make(map[string]interface{})
18145	if icbpa.IpconfigurationID != nil {
18146		objectMap["ipconfigurationId"] = icbpa.IpconfigurationID
18147	}
18148	if icbpa.CustomBgpIPAddresses != nil {
18149		objectMap["customBgpIpAddresses"] = icbpa.CustomBgpIPAddresses
18150	}
18151	return json.Marshal(objectMap)
18152}
18153
18154// IPConfigurationProfile IP configuration profile child resource.
18155type IPConfigurationProfile struct {
18156	// IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile.
18157	*IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"`
18158	// Name - The name of the resource. This name can be used to access the resource.
18159	Name *string `json:"name,omitempty"`
18160	// Type - READ-ONLY; Sub Resource type.
18161	Type *string `json:"type,omitempty"`
18162	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
18163	Etag *string `json:"etag,omitempty"`
18164	// ID - Resource ID.
18165	ID *string `json:"id,omitempty"`
18166}
18167
18168// MarshalJSON is the custom marshaler for IPConfigurationProfile.
18169func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) {
18170	objectMap := make(map[string]interface{})
18171	if icp.IPConfigurationProfilePropertiesFormat != nil {
18172		objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat
18173	}
18174	if icp.Name != nil {
18175		objectMap["name"] = icp.Name
18176	}
18177	if icp.ID != nil {
18178		objectMap["id"] = icp.ID
18179	}
18180	return json.Marshal(objectMap)
18181}
18182
18183// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct.
18184func (icp *IPConfigurationProfile) UnmarshalJSON(body []byte) error {
18185	var m map[string]*json.RawMessage
18186	err := json.Unmarshal(body, &m)
18187	if err != nil {
18188		return err
18189	}
18190	for k, v := range m {
18191		switch k {
18192		case "properties":
18193			if v != nil {
18194				var IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat
18195				err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat)
18196				if err != nil {
18197					return err
18198				}
18199				icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat
18200			}
18201		case "name":
18202			if v != nil {
18203				var name string
18204				err = json.Unmarshal(*v, &name)
18205				if err != nil {
18206					return err
18207				}
18208				icp.Name = &name
18209			}
18210		case "type":
18211			if v != nil {
18212				var typeVar string
18213				err = json.Unmarshal(*v, &typeVar)
18214				if err != nil {
18215					return err
18216				}
18217				icp.Type = &typeVar
18218			}
18219		case "etag":
18220			if v != nil {
18221				var etag string
18222				err = json.Unmarshal(*v, &etag)
18223				if err != nil {
18224					return err
18225				}
18226				icp.Etag = &etag
18227			}
18228		case "id":
18229			if v != nil {
18230				var ID string
18231				err = json.Unmarshal(*v, &ID)
18232				if err != nil {
18233					return err
18234				}
18235				icp.ID = &ID
18236			}
18237		}
18238	}
18239
18240	return nil
18241}
18242
18243// IPConfigurationProfilePropertiesFormat IP configuration profile properties.
18244type IPConfigurationProfilePropertiesFormat struct {
18245	// Subnet - The reference to the subnet resource to create a container network interface ip configuration.
18246	Subnet *Subnet `json:"subnet,omitempty"`
18247	// ProvisioningState - READ-ONLY; The provisioning state of the IP configuration profile resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
18248	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
18249}
18250
18251// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat.
18252func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
18253	objectMap := make(map[string]interface{})
18254	if icppf.Subnet != nil {
18255		objectMap["subnet"] = icppf.Subnet
18256	}
18257	return json.Marshal(objectMap)
18258}
18259
18260// IPConfigurationPropertiesFormat properties of IP configuration.
18261type IPConfigurationPropertiesFormat struct {
18262	// PrivateIPAddress - The private IP address of the IP configuration.
18263	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
18264	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
18265	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
18266	// Subnet - The reference to the subnet resource.
18267	Subnet *Subnet `json:"subnet,omitempty"`
18268	// PublicIPAddress - The reference to the public IP resource.
18269	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
18270	// ProvisioningState - READ-ONLY; The provisioning state of the IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
18271	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
18272}
18273
18274// MarshalJSON is the custom marshaler for IPConfigurationPropertiesFormat.
18275func (icpf IPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
18276	objectMap := make(map[string]interface{})
18277	if icpf.PrivateIPAddress != nil {
18278		objectMap["privateIPAddress"] = icpf.PrivateIPAddress
18279	}
18280	if icpf.PrivateIPAllocationMethod != "" {
18281		objectMap["privateIPAllocationMethod"] = icpf.PrivateIPAllocationMethod
18282	}
18283	if icpf.Subnet != nil {
18284		objectMap["subnet"] = icpf.Subnet
18285	}
18286	if icpf.PublicIPAddress != nil {
18287		objectMap["publicIPAddress"] = icpf.PublicIPAddress
18288	}
18289	return json.Marshal(objectMap)
18290}
18291
18292// IPGroup the IpGroups resource information.
18293type IPGroup struct {
18294	autorest.Response `json:"-"`
18295	// IPGroupPropertiesFormat - Properties of the IpGroups.
18296	*IPGroupPropertiesFormat `json:"properties,omitempty"`
18297	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
18298	Etag *string `json:"etag,omitempty"`
18299	// ID - Resource ID.
18300	ID *string `json:"id,omitempty"`
18301	// Name - READ-ONLY; Resource name.
18302	Name *string `json:"name,omitempty"`
18303	// Type - READ-ONLY; Resource type.
18304	Type *string `json:"type,omitempty"`
18305	// Location - Resource location.
18306	Location *string `json:"location,omitempty"`
18307	// Tags - Resource tags.
18308	Tags map[string]*string `json:"tags"`
18309}
18310
18311// MarshalJSON is the custom marshaler for IPGroup.
18312func (ig IPGroup) MarshalJSON() ([]byte, error) {
18313	objectMap := make(map[string]interface{})
18314	if ig.IPGroupPropertiesFormat != nil {
18315		objectMap["properties"] = ig.IPGroupPropertiesFormat
18316	}
18317	if ig.ID != nil {
18318		objectMap["id"] = ig.ID
18319	}
18320	if ig.Location != nil {
18321		objectMap["location"] = ig.Location
18322	}
18323	if ig.Tags != nil {
18324		objectMap["tags"] = ig.Tags
18325	}
18326	return json.Marshal(objectMap)
18327}
18328
18329// UnmarshalJSON is the custom unmarshaler for IPGroup struct.
18330func (ig *IPGroup) UnmarshalJSON(body []byte) error {
18331	var m map[string]*json.RawMessage
18332	err := json.Unmarshal(body, &m)
18333	if err != nil {
18334		return err
18335	}
18336	for k, v := range m {
18337		switch k {
18338		case "properties":
18339			if v != nil {
18340				var IPGroupPropertiesFormat IPGroupPropertiesFormat
18341				err = json.Unmarshal(*v, &IPGroupPropertiesFormat)
18342				if err != nil {
18343					return err
18344				}
18345				ig.IPGroupPropertiesFormat = &IPGroupPropertiesFormat
18346			}
18347		case "etag":
18348			if v != nil {
18349				var etag string
18350				err = json.Unmarshal(*v, &etag)
18351				if err != nil {
18352					return err
18353				}
18354				ig.Etag = &etag
18355			}
18356		case "id":
18357			if v != nil {
18358				var ID string
18359				err = json.Unmarshal(*v, &ID)
18360				if err != nil {
18361					return err
18362				}
18363				ig.ID = &ID
18364			}
18365		case "name":
18366			if v != nil {
18367				var name string
18368				err = json.Unmarshal(*v, &name)
18369				if err != nil {
18370					return err
18371				}
18372				ig.Name = &name
18373			}
18374		case "type":
18375			if v != nil {
18376				var typeVar string
18377				err = json.Unmarshal(*v, &typeVar)
18378				if err != nil {
18379					return err
18380				}
18381				ig.Type = &typeVar
18382			}
18383		case "location":
18384			if v != nil {
18385				var location string
18386				err = json.Unmarshal(*v, &location)
18387				if err != nil {
18388					return err
18389				}
18390				ig.Location = &location
18391			}
18392		case "tags":
18393			if v != nil {
18394				var tags map[string]*string
18395				err = json.Unmarshal(*v, &tags)
18396				if err != nil {
18397					return err
18398				}
18399				ig.Tags = tags
18400			}
18401		}
18402	}
18403
18404	return nil
18405}
18406
18407// IPGroupListResult response for the ListIpGroups API service call.
18408type IPGroupListResult struct {
18409	autorest.Response `json:"-"`
18410	// Value - The list of IpGroups information resources.
18411	Value *[]IPGroup `json:"value,omitempty"`
18412	// NextLink - URL to get the next set of results.
18413	NextLink *string `json:"nextLink,omitempty"`
18414}
18415
18416// IPGroupListResultIterator provides access to a complete listing of IPGroup values.
18417type IPGroupListResultIterator struct {
18418	i    int
18419	page IPGroupListResultPage
18420}
18421
18422// NextWithContext advances to the next value.  If there was an error making
18423// the request the iterator does not advance and the error is returned.
18424func (iter *IPGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
18425	if tracing.IsEnabled() {
18426		ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupListResultIterator.NextWithContext")
18427		defer func() {
18428			sc := -1
18429			if iter.Response().Response.Response != nil {
18430				sc = iter.Response().Response.Response.StatusCode
18431			}
18432			tracing.EndSpan(ctx, sc, err)
18433		}()
18434	}
18435	iter.i++
18436	if iter.i < len(iter.page.Values()) {
18437		return nil
18438	}
18439	err = iter.page.NextWithContext(ctx)
18440	if err != nil {
18441		iter.i--
18442		return err
18443	}
18444	iter.i = 0
18445	return nil
18446}
18447
18448// Next advances to the next value.  If there was an error making
18449// the request the iterator does not advance and the error is returned.
18450// Deprecated: Use NextWithContext() instead.
18451func (iter *IPGroupListResultIterator) Next() error {
18452	return iter.NextWithContext(context.Background())
18453}
18454
18455// NotDone returns true if the enumeration should be started or is not yet complete.
18456func (iter IPGroupListResultIterator) NotDone() bool {
18457	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18458}
18459
18460// Response returns the raw server response from the last page request.
18461func (iter IPGroupListResultIterator) Response() IPGroupListResult {
18462	return iter.page.Response()
18463}
18464
18465// Value returns the current value or a zero-initialized value if the
18466// iterator has advanced beyond the end of the collection.
18467func (iter IPGroupListResultIterator) Value() IPGroup {
18468	if !iter.page.NotDone() {
18469		return IPGroup{}
18470	}
18471	return iter.page.Values()[iter.i]
18472}
18473
18474// Creates a new instance of the IPGroupListResultIterator type.
18475func NewIPGroupListResultIterator(page IPGroupListResultPage) IPGroupListResultIterator {
18476	return IPGroupListResultIterator{page: page}
18477}
18478
18479// IsEmpty returns true if the ListResult contains no values.
18480func (iglr IPGroupListResult) IsEmpty() bool {
18481	return iglr.Value == nil || len(*iglr.Value) == 0
18482}
18483
18484// hasNextLink returns true if the NextLink is not empty.
18485func (iglr IPGroupListResult) hasNextLink() bool {
18486	return iglr.NextLink != nil && len(*iglr.NextLink) != 0
18487}
18488
18489// iPGroupListResultPreparer prepares a request to retrieve the next set of results.
18490// It returns nil if no more results exist.
18491func (iglr IPGroupListResult) iPGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
18492	if !iglr.hasNextLink() {
18493		return nil, nil
18494	}
18495	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18496		autorest.AsJSON(),
18497		autorest.AsGet(),
18498		autorest.WithBaseURL(to.String(iglr.NextLink)))
18499}
18500
18501// IPGroupListResultPage contains a page of IPGroup values.
18502type IPGroupListResultPage struct {
18503	fn   func(context.Context, IPGroupListResult) (IPGroupListResult, error)
18504	iglr IPGroupListResult
18505}
18506
18507// NextWithContext advances to the next page of values.  If there was an error making
18508// the request the page does not advance and the error is returned.
18509func (page *IPGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
18510	if tracing.IsEnabled() {
18511		ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupListResultPage.NextWithContext")
18512		defer func() {
18513			sc := -1
18514			if page.Response().Response.Response != nil {
18515				sc = page.Response().Response.Response.StatusCode
18516			}
18517			tracing.EndSpan(ctx, sc, err)
18518		}()
18519	}
18520	for {
18521		next, err := page.fn(ctx, page.iglr)
18522		if err != nil {
18523			return err
18524		}
18525		page.iglr = next
18526		if !next.hasNextLink() || !next.IsEmpty() {
18527			break
18528		}
18529	}
18530	return nil
18531}
18532
18533// Next advances to the next page of values.  If there was an error making
18534// the request the page does not advance and the error is returned.
18535// Deprecated: Use NextWithContext() instead.
18536func (page *IPGroupListResultPage) Next() error {
18537	return page.NextWithContext(context.Background())
18538}
18539
18540// NotDone returns true if the page enumeration should be started or is not yet complete.
18541func (page IPGroupListResultPage) NotDone() bool {
18542	return !page.iglr.IsEmpty()
18543}
18544
18545// Response returns the raw server response from the last page request.
18546func (page IPGroupListResultPage) Response() IPGroupListResult {
18547	return page.iglr
18548}
18549
18550// Values returns the slice of values for the current page or nil if there are no values.
18551func (page IPGroupListResultPage) Values() []IPGroup {
18552	if page.iglr.IsEmpty() {
18553		return nil
18554	}
18555	return *page.iglr.Value
18556}
18557
18558// Creates a new instance of the IPGroupListResultPage type.
18559func NewIPGroupListResultPage(cur IPGroupListResult, getNextPage func(context.Context, IPGroupListResult) (IPGroupListResult, error)) IPGroupListResultPage {
18560	return IPGroupListResultPage{
18561		fn:   getNextPage,
18562		iglr: cur,
18563	}
18564}
18565
18566// IPGroupPropertiesFormat the IpGroups property information.
18567type IPGroupPropertiesFormat struct {
18568	// ProvisioningState - READ-ONLY; The provisioning state of the IpGroups resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
18569	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
18570	// IPAddresses - IpAddresses/IpAddressPrefixes in the IpGroups resource.
18571	IPAddresses *[]string `json:"ipAddresses,omitempty"`
18572	// Firewalls - READ-ONLY; List of references to Azure resources that this IpGroups is associated with.
18573	Firewalls *[]SubResource `json:"firewalls,omitempty"`
18574}
18575
18576// MarshalJSON is the custom marshaler for IPGroupPropertiesFormat.
18577func (igpf IPGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
18578	objectMap := make(map[string]interface{})
18579	if igpf.IPAddresses != nil {
18580		objectMap["ipAddresses"] = igpf.IPAddresses
18581	}
18582	return json.Marshal(objectMap)
18583}
18584
18585// IPGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
18586// operation.
18587type IPGroupsCreateOrUpdateFuture struct {
18588	azure.FutureAPI
18589	// Result returns the result of the asynchronous operation.
18590	// If the operation has not completed it will return an error.
18591	Result func(IPGroupsClient) (IPGroup, error)
18592}
18593
18594// IPGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18595// operation.
18596type IPGroupsDeleteFuture struct {
18597	azure.FutureAPI
18598	// Result returns the result of the asynchronous operation.
18599	// If the operation has not completed it will return an error.
18600	Result func(IPGroupsClient) (autorest.Response, error)
18601}
18602
18603// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection.
18604type IpsecPolicy struct {
18605	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
18606	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
18607	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
18608	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
18609	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
18610	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
18611	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
18612	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
18613	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
18614	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
18615	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
18616	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
18617	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
18618	DhGroup DhGroup `json:"dhGroup,omitempty"`
18619	// 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'
18620	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
18621}
18622
18623// IPTag contains the IpTag associated with the object.
18624type IPTag struct {
18625	// IPTagType - The IP tag type. Example: FirstPartyUsage.
18626	IPTagType *string `json:"ipTagType,omitempty"`
18627	// Tag - The value of the IP tag associated with the public IP. Example: SQL.
18628	Tag *string `json:"tag,omitempty"`
18629}
18630
18631// Ipv6CircuitConnectionConfig iPv6 Circuit Connection properties for global reach.
18632type Ipv6CircuitConnectionConfig struct {
18633	// AddressPrefix - /125 IP address space to carve out customer addresses for global reach.
18634	AddressPrefix *string `json:"addressPrefix,omitempty"`
18635	// CircuitConnectionStatus - READ-ONLY; Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
18636	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
18637}
18638
18639// MarshalJSON is the custom marshaler for Ipv6CircuitConnectionConfig.
18640func (i6ccc Ipv6CircuitConnectionConfig) MarshalJSON() ([]byte, error) {
18641	objectMap := make(map[string]interface{})
18642	if i6ccc.AddressPrefix != nil {
18643		objectMap["addressPrefix"] = i6ccc.AddressPrefix
18644	}
18645	return json.Marshal(objectMap)
18646}
18647
18648// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
18649type Ipv6ExpressRouteCircuitPeeringConfig struct {
18650	// PrimaryPeerAddressPrefix - The primary address prefix.
18651	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
18652	// SecondaryPeerAddressPrefix - The secondary address prefix.
18653	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
18654	// MicrosoftPeeringConfig - The Microsoft peering configuration.
18655	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
18656	// RouteFilter - The reference to the RouteFilter resource.
18657	RouteFilter *SubResource `json:"routeFilter,omitempty"`
18658	// State - The state of peering. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
18659	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
18660}
18661
18662// ListHubRouteTablesResult list of RouteTables and a URL nextLink to get the next set of results.
18663type ListHubRouteTablesResult struct {
18664	autorest.Response `json:"-"`
18665	// Value - List of RouteTables.
18666	Value *[]HubRouteTable `json:"value,omitempty"`
18667	// NextLink - URL to get the next set of operation list results if there are any.
18668	NextLink *string `json:"nextLink,omitempty"`
18669}
18670
18671// ListHubRouteTablesResultIterator provides access to a complete listing of HubRouteTable values.
18672type ListHubRouteTablesResultIterator struct {
18673	i    int
18674	page ListHubRouteTablesResultPage
18675}
18676
18677// NextWithContext advances to the next value.  If there was an error making
18678// the request the iterator does not advance and the error is returned.
18679func (iter *ListHubRouteTablesResultIterator) NextWithContext(ctx context.Context) (err error) {
18680	if tracing.IsEnabled() {
18681		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubRouteTablesResultIterator.NextWithContext")
18682		defer func() {
18683			sc := -1
18684			if iter.Response().Response.Response != nil {
18685				sc = iter.Response().Response.Response.StatusCode
18686			}
18687			tracing.EndSpan(ctx, sc, err)
18688		}()
18689	}
18690	iter.i++
18691	if iter.i < len(iter.page.Values()) {
18692		return nil
18693	}
18694	err = iter.page.NextWithContext(ctx)
18695	if err != nil {
18696		iter.i--
18697		return err
18698	}
18699	iter.i = 0
18700	return nil
18701}
18702
18703// Next advances to the next value.  If there was an error making
18704// the request the iterator does not advance and the error is returned.
18705// Deprecated: Use NextWithContext() instead.
18706func (iter *ListHubRouteTablesResultIterator) Next() error {
18707	return iter.NextWithContext(context.Background())
18708}
18709
18710// NotDone returns true if the enumeration should be started or is not yet complete.
18711func (iter ListHubRouteTablesResultIterator) NotDone() bool {
18712	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18713}
18714
18715// Response returns the raw server response from the last page request.
18716func (iter ListHubRouteTablesResultIterator) Response() ListHubRouteTablesResult {
18717	return iter.page.Response()
18718}
18719
18720// Value returns the current value or a zero-initialized value if the
18721// iterator has advanced beyond the end of the collection.
18722func (iter ListHubRouteTablesResultIterator) Value() HubRouteTable {
18723	if !iter.page.NotDone() {
18724		return HubRouteTable{}
18725	}
18726	return iter.page.Values()[iter.i]
18727}
18728
18729// Creates a new instance of the ListHubRouteTablesResultIterator type.
18730func NewListHubRouteTablesResultIterator(page ListHubRouteTablesResultPage) ListHubRouteTablesResultIterator {
18731	return ListHubRouteTablesResultIterator{page: page}
18732}
18733
18734// IsEmpty returns true if the ListResult contains no values.
18735func (lhrtr ListHubRouteTablesResult) IsEmpty() bool {
18736	return lhrtr.Value == nil || len(*lhrtr.Value) == 0
18737}
18738
18739// hasNextLink returns true if the NextLink is not empty.
18740func (lhrtr ListHubRouteTablesResult) hasNextLink() bool {
18741	return lhrtr.NextLink != nil && len(*lhrtr.NextLink) != 0
18742}
18743
18744// listHubRouteTablesResultPreparer prepares a request to retrieve the next set of results.
18745// It returns nil if no more results exist.
18746func (lhrtr ListHubRouteTablesResult) listHubRouteTablesResultPreparer(ctx context.Context) (*http.Request, error) {
18747	if !lhrtr.hasNextLink() {
18748		return nil, nil
18749	}
18750	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18751		autorest.AsJSON(),
18752		autorest.AsGet(),
18753		autorest.WithBaseURL(to.String(lhrtr.NextLink)))
18754}
18755
18756// ListHubRouteTablesResultPage contains a page of HubRouteTable values.
18757type ListHubRouteTablesResultPage struct {
18758	fn    func(context.Context, ListHubRouteTablesResult) (ListHubRouteTablesResult, error)
18759	lhrtr ListHubRouteTablesResult
18760}
18761
18762// NextWithContext advances to the next page of values.  If there was an error making
18763// the request the page does not advance and the error is returned.
18764func (page *ListHubRouteTablesResultPage) NextWithContext(ctx context.Context) (err error) {
18765	if tracing.IsEnabled() {
18766		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubRouteTablesResultPage.NextWithContext")
18767		defer func() {
18768			sc := -1
18769			if page.Response().Response.Response != nil {
18770				sc = page.Response().Response.Response.StatusCode
18771			}
18772			tracing.EndSpan(ctx, sc, err)
18773		}()
18774	}
18775	for {
18776		next, err := page.fn(ctx, page.lhrtr)
18777		if err != nil {
18778			return err
18779		}
18780		page.lhrtr = next
18781		if !next.hasNextLink() || !next.IsEmpty() {
18782			break
18783		}
18784	}
18785	return nil
18786}
18787
18788// Next advances to the next page of values.  If there was an error making
18789// the request the page does not advance and the error is returned.
18790// Deprecated: Use NextWithContext() instead.
18791func (page *ListHubRouteTablesResultPage) Next() error {
18792	return page.NextWithContext(context.Background())
18793}
18794
18795// NotDone returns true if the page enumeration should be started or is not yet complete.
18796func (page ListHubRouteTablesResultPage) NotDone() bool {
18797	return !page.lhrtr.IsEmpty()
18798}
18799
18800// Response returns the raw server response from the last page request.
18801func (page ListHubRouteTablesResultPage) Response() ListHubRouteTablesResult {
18802	return page.lhrtr
18803}
18804
18805// Values returns the slice of values for the current page or nil if there are no values.
18806func (page ListHubRouteTablesResultPage) Values() []HubRouteTable {
18807	if page.lhrtr.IsEmpty() {
18808		return nil
18809	}
18810	return *page.lhrtr.Value
18811}
18812
18813// Creates a new instance of the ListHubRouteTablesResultPage type.
18814func NewListHubRouteTablesResultPage(cur ListHubRouteTablesResult, getNextPage func(context.Context, ListHubRouteTablesResult) (ListHubRouteTablesResult, error)) ListHubRouteTablesResultPage {
18815	return ListHubRouteTablesResultPage{
18816		fn:    getNextPage,
18817		lhrtr: cur,
18818	}
18819}
18820
18821// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
18822// the next set of results.
18823type ListHubVirtualNetworkConnectionsResult struct {
18824	autorest.Response `json:"-"`
18825	// Value - List of HubVirtualNetworkConnections.
18826	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
18827	// NextLink - URL to get the next set of operation list results if there are any.
18828	NextLink *string `json:"nextLink,omitempty"`
18829}
18830
18831// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
18832// HubVirtualNetworkConnection values.
18833type ListHubVirtualNetworkConnectionsResultIterator struct {
18834	i    int
18835	page ListHubVirtualNetworkConnectionsResultPage
18836}
18837
18838// NextWithContext advances to the next value.  If there was an error making
18839// the request the iterator does not advance and the error is returned.
18840func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
18841	if tracing.IsEnabled() {
18842		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
18843		defer func() {
18844			sc := -1
18845			if iter.Response().Response.Response != nil {
18846				sc = iter.Response().Response.Response.StatusCode
18847			}
18848			tracing.EndSpan(ctx, sc, err)
18849		}()
18850	}
18851	iter.i++
18852	if iter.i < len(iter.page.Values()) {
18853		return nil
18854	}
18855	err = iter.page.NextWithContext(ctx)
18856	if err != nil {
18857		iter.i--
18858		return err
18859	}
18860	iter.i = 0
18861	return nil
18862}
18863
18864// Next advances to the next value.  If there was an error making
18865// the request the iterator does not advance and the error is returned.
18866// Deprecated: Use NextWithContext() instead.
18867func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
18868	return iter.NextWithContext(context.Background())
18869}
18870
18871// NotDone returns true if the enumeration should be started or is not yet complete.
18872func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
18873	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18874}
18875
18876// Response returns the raw server response from the last page request.
18877func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
18878	return iter.page.Response()
18879}
18880
18881// Value returns the current value or a zero-initialized value if the
18882// iterator has advanced beyond the end of the collection.
18883func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
18884	if !iter.page.NotDone() {
18885		return HubVirtualNetworkConnection{}
18886	}
18887	return iter.page.Values()[iter.i]
18888}
18889
18890// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
18891func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
18892	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
18893}
18894
18895// IsEmpty returns true if the ListResult contains no values.
18896func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
18897	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
18898}
18899
18900// hasNextLink returns true if the NextLink is not empty.
18901func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
18902	return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
18903}
18904
18905// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
18906// It returns nil if no more results exist.
18907func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
18908	if !lhvncr.hasNextLink() {
18909		return nil, nil
18910	}
18911	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18912		autorest.AsJSON(),
18913		autorest.AsGet(),
18914		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
18915}
18916
18917// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
18918type ListHubVirtualNetworkConnectionsResultPage struct {
18919	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
18920	lhvncr ListHubVirtualNetworkConnectionsResult
18921}
18922
18923// NextWithContext advances to the next page of values.  If there was an error making
18924// the request the page does not advance and the error is returned.
18925func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
18926	if tracing.IsEnabled() {
18927		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
18928		defer func() {
18929			sc := -1
18930			if page.Response().Response.Response != nil {
18931				sc = page.Response().Response.Response.StatusCode
18932			}
18933			tracing.EndSpan(ctx, sc, err)
18934		}()
18935	}
18936	for {
18937		next, err := page.fn(ctx, page.lhvncr)
18938		if err != nil {
18939			return err
18940		}
18941		page.lhvncr = next
18942		if !next.hasNextLink() || !next.IsEmpty() {
18943			break
18944		}
18945	}
18946	return nil
18947}
18948
18949// Next advances to the next page of values.  If there was an error making
18950// the request the page does not advance and the error is returned.
18951// Deprecated: Use NextWithContext() instead.
18952func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
18953	return page.NextWithContext(context.Background())
18954}
18955
18956// NotDone returns true if the page enumeration should be started or is not yet complete.
18957func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
18958	return !page.lhvncr.IsEmpty()
18959}
18960
18961// Response returns the raw server response from the last page request.
18962func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
18963	return page.lhvncr
18964}
18965
18966// Values returns the slice of values for the current page or nil if there are no values.
18967func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
18968	if page.lhvncr.IsEmpty() {
18969		return nil
18970	}
18971	return *page.lhvncr.Value
18972}
18973
18974// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
18975func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
18976	return ListHubVirtualNetworkConnectionsResultPage{
18977		fn:     getNextPage,
18978		lhvncr: cur,
18979	}
18980}
18981
18982// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of
18983// P2SVpnGateways and a URL nextLink to get the next set of results.
18984type ListP2SVpnGatewaysResult struct {
18985	autorest.Response `json:"-"`
18986	// Value - List of P2SVpnGateways.
18987	Value *[]P2SVpnGateway `json:"value,omitempty"`
18988	// NextLink - URL to get the next set of operation list results if there are any.
18989	NextLink *string `json:"nextLink,omitempty"`
18990}
18991
18992// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values.
18993type ListP2SVpnGatewaysResultIterator struct {
18994	i    int
18995	page ListP2SVpnGatewaysResultPage
18996}
18997
18998// NextWithContext advances to the next value.  If there was an error making
18999// the request the iterator does not advance and the error is returned.
19000func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
19001	if tracing.IsEnabled() {
19002		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.NextWithContext")
19003		defer func() {
19004			sc := -1
19005			if iter.Response().Response.Response != nil {
19006				sc = iter.Response().Response.Response.StatusCode
19007			}
19008			tracing.EndSpan(ctx, sc, err)
19009		}()
19010	}
19011	iter.i++
19012	if iter.i < len(iter.page.Values()) {
19013		return nil
19014	}
19015	err = iter.page.NextWithContext(ctx)
19016	if err != nil {
19017		iter.i--
19018		return err
19019	}
19020	iter.i = 0
19021	return nil
19022}
19023
19024// Next advances to the next value.  If there was an error making
19025// the request the iterator does not advance and the error is returned.
19026// Deprecated: Use NextWithContext() instead.
19027func (iter *ListP2SVpnGatewaysResultIterator) Next() error {
19028	return iter.NextWithContext(context.Background())
19029}
19030
19031// NotDone returns true if the enumeration should be started or is not yet complete.
19032func (iter ListP2SVpnGatewaysResultIterator) NotDone() bool {
19033	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19034}
19035
19036// Response returns the raw server response from the last page request.
19037func (iter ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult {
19038	return iter.page.Response()
19039}
19040
19041// Value returns the current value or a zero-initialized value if the
19042// iterator has advanced beyond the end of the collection.
19043func (iter ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway {
19044	if !iter.page.NotDone() {
19045		return P2SVpnGateway{}
19046	}
19047	return iter.page.Values()[iter.i]
19048}
19049
19050// Creates a new instance of the ListP2SVpnGatewaysResultIterator type.
19051func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator {
19052	return ListP2SVpnGatewaysResultIterator{page: page}
19053}
19054
19055// IsEmpty returns true if the ListResult contains no values.
19056func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
19057	return lpvgr.Value == nil || len(*lpvgr.Value) == 0
19058}
19059
19060// hasNextLink returns true if the NextLink is not empty.
19061func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool {
19062	return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0
19063}
19064
19065// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
19066// It returns nil if no more results exist.
19067func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
19068	if !lpvgr.hasNextLink() {
19069		return nil, nil
19070	}
19071	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19072		autorest.AsJSON(),
19073		autorest.AsGet(),
19074		autorest.WithBaseURL(to.String(lpvgr.NextLink)))
19075}
19076
19077// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values.
19078type ListP2SVpnGatewaysResultPage struct {
19079	fn    func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
19080	lpvgr ListP2SVpnGatewaysResult
19081}
19082
19083// NextWithContext advances to the next page of values.  If there was an error making
19084// the request the page does not advance and the error is returned.
19085func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
19086	if tracing.IsEnabled() {
19087		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext")
19088		defer func() {
19089			sc := -1
19090			if page.Response().Response.Response != nil {
19091				sc = page.Response().Response.Response.StatusCode
19092			}
19093			tracing.EndSpan(ctx, sc, err)
19094		}()
19095	}
19096	for {
19097		next, err := page.fn(ctx, page.lpvgr)
19098		if err != nil {
19099			return err
19100		}
19101		page.lpvgr = next
19102		if !next.hasNextLink() || !next.IsEmpty() {
19103			break
19104		}
19105	}
19106	return nil
19107}
19108
19109// Next advances to the next page of values.  If there was an error making
19110// the request the page does not advance and the error is returned.
19111// Deprecated: Use NextWithContext() instead.
19112func (page *ListP2SVpnGatewaysResultPage) Next() error {
19113	return page.NextWithContext(context.Background())
19114}
19115
19116// NotDone returns true if the page enumeration should be started or is not yet complete.
19117func (page ListP2SVpnGatewaysResultPage) NotDone() bool {
19118	return !page.lpvgr.IsEmpty()
19119}
19120
19121// Response returns the raw server response from the last page request.
19122func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult {
19123	return page.lpvgr
19124}
19125
19126// Values returns the slice of values for the current page or nil if there are no values.
19127func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway {
19128	if page.lpvgr.IsEmpty() {
19129		return nil
19130	}
19131	return *page.lpvgr.Value
19132}
19133
19134// Creates a new instance of the ListP2SVpnGatewaysResultPage type.
19135func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage {
19136	return ListP2SVpnGatewaysResultPage{
19137		fn:    getNextPage,
19138		lpvgr: cur,
19139	}
19140}
19141
19142// ListString ...
19143type ListString struct {
19144	autorest.Response `json:"-"`
19145	Value             *[]string `json:"value,omitempty"`
19146}
19147
19148// ListVirtualHubBgpConnectionResults virtualHubBgpConnections list.
19149type ListVirtualHubBgpConnectionResults struct {
19150	autorest.Response `json:"-"`
19151	// Value - The list of VirtualHubBgpConnections.
19152	Value *[]BgpConnection `json:"value,omitempty"`
19153	// NextLink - URL to get the next set of results.
19154	NextLink *string `json:"nextLink,omitempty"`
19155}
19156
19157// ListVirtualHubBgpConnectionResultsIterator provides access to a complete listing of BgpConnection
19158// values.
19159type ListVirtualHubBgpConnectionResultsIterator struct {
19160	i    int
19161	page ListVirtualHubBgpConnectionResultsPage
19162}
19163
19164// NextWithContext advances to the next value.  If there was an error making
19165// the request the iterator does not advance and the error is returned.
19166func (iter *ListVirtualHubBgpConnectionResultsIterator) NextWithContext(ctx context.Context) (err error) {
19167	if tracing.IsEnabled() {
19168		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubBgpConnectionResultsIterator.NextWithContext")
19169		defer func() {
19170			sc := -1
19171			if iter.Response().Response.Response != nil {
19172				sc = iter.Response().Response.Response.StatusCode
19173			}
19174			tracing.EndSpan(ctx, sc, err)
19175		}()
19176	}
19177	iter.i++
19178	if iter.i < len(iter.page.Values()) {
19179		return nil
19180	}
19181	err = iter.page.NextWithContext(ctx)
19182	if err != nil {
19183		iter.i--
19184		return err
19185	}
19186	iter.i = 0
19187	return nil
19188}
19189
19190// Next advances to the next value.  If there was an error making
19191// the request the iterator does not advance and the error is returned.
19192// Deprecated: Use NextWithContext() instead.
19193func (iter *ListVirtualHubBgpConnectionResultsIterator) Next() error {
19194	return iter.NextWithContext(context.Background())
19195}
19196
19197// NotDone returns true if the enumeration should be started or is not yet complete.
19198func (iter ListVirtualHubBgpConnectionResultsIterator) NotDone() bool {
19199	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19200}
19201
19202// Response returns the raw server response from the last page request.
19203func (iter ListVirtualHubBgpConnectionResultsIterator) Response() ListVirtualHubBgpConnectionResults {
19204	return iter.page.Response()
19205}
19206
19207// Value returns the current value or a zero-initialized value if the
19208// iterator has advanced beyond the end of the collection.
19209func (iter ListVirtualHubBgpConnectionResultsIterator) Value() BgpConnection {
19210	if !iter.page.NotDone() {
19211		return BgpConnection{}
19212	}
19213	return iter.page.Values()[iter.i]
19214}
19215
19216// Creates a new instance of the ListVirtualHubBgpConnectionResultsIterator type.
19217func NewListVirtualHubBgpConnectionResultsIterator(page ListVirtualHubBgpConnectionResultsPage) ListVirtualHubBgpConnectionResultsIterator {
19218	return ListVirtualHubBgpConnectionResultsIterator{page: page}
19219}
19220
19221// IsEmpty returns true if the ListResult contains no values.
19222func (lvhbcr ListVirtualHubBgpConnectionResults) IsEmpty() bool {
19223	return lvhbcr.Value == nil || len(*lvhbcr.Value) == 0
19224}
19225
19226// hasNextLink returns true if the NextLink is not empty.
19227func (lvhbcr ListVirtualHubBgpConnectionResults) hasNextLink() bool {
19228	return lvhbcr.NextLink != nil && len(*lvhbcr.NextLink) != 0
19229}
19230
19231// listVirtualHubBgpConnectionResultsPreparer prepares a request to retrieve the next set of results.
19232// It returns nil if no more results exist.
19233func (lvhbcr ListVirtualHubBgpConnectionResults) listVirtualHubBgpConnectionResultsPreparer(ctx context.Context) (*http.Request, error) {
19234	if !lvhbcr.hasNextLink() {
19235		return nil, nil
19236	}
19237	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19238		autorest.AsJSON(),
19239		autorest.AsGet(),
19240		autorest.WithBaseURL(to.String(lvhbcr.NextLink)))
19241}
19242
19243// ListVirtualHubBgpConnectionResultsPage contains a page of BgpConnection values.
19244type ListVirtualHubBgpConnectionResultsPage struct {
19245	fn     func(context.Context, ListVirtualHubBgpConnectionResults) (ListVirtualHubBgpConnectionResults, error)
19246	lvhbcr ListVirtualHubBgpConnectionResults
19247}
19248
19249// NextWithContext advances to the next page of values.  If there was an error making
19250// the request the page does not advance and the error is returned.
19251func (page *ListVirtualHubBgpConnectionResultsPage) NextWithContext(ctx context.Context) (err error) {
19252	if tracing.IsEnabled() {
19253		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubBgpConnectionResultsPage.NextWithContext")
19254		defer func() {
19255			sc := -1
19256			if page.Response().Response.Response != nil {
19257				sc = page.Response().Response.Response.StatusCode
19258			}
19259			tracing.EndSpan(ctx, sc, err)
19260		}()
19261	}
19262	for {
19263		next, err := page.fn(ctx, page.lvhbcr)
19264		if err != nil {
19265			return err
19266		}
19267		page.lvhbcr = next
19268		if !next.hasNextLink() || !next.IsEmpty() {
19269			break
19270		}
19271	}
19272	return nil
19273}
19274
19275// Next 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.
19277// Deprecated: Use NextWithContext() instead.
19278func (page *ListVirtualHubBgpConnectionResultsPage) Next() error {
19279	return page.NextWithContext(context.Background())
19280}
19281
19282// NotDone returns true if the page enumeration should be started or is not yet complete.
19283func (page ListVirtualHubBgpConnectionResultsPage) NotDone() bool {
19284	return !page.lvhbcr.IsEmpty()
19285}
19286
19287// Response returns the raw server response from the last page request.
19288func (page ListVirtualHubBgpConnectionResultsPage) Response() ListVirtualHubBgpConnectionResults {
19289	return page.lvhbcr
19290}
19291
19292// Values returns the slice of values for the current page or nil if there are no values.
19293func (page ListVirtualHubBgpConnectionResultsPage) Values() []BgpConnection {
19294	if page.lvhbcr.IsEmpty() {
19295		return nil
19296	}
19297	return *page.lvhbcr.Value
19298}
19299
19300// Creates a new instance of the ListVirtualHubBgpConnectionResultsPage type.
19301func NewListVirtualHubBgpConnectionResultsPage(cur ListVirtualHubBgpConnectionResults, getNextPage func(context.Context, ListVirtualHubBgpConnectionResults) (ListVirtualHubBgpConnectionResults, error)) ListVirtualHubBgpConnectionResultsPage {
19302	return ListVirtualHubBgpConnectionResultsPage{
19303		fn:     getNextPage,
19304		lvhbcr: cur,
19305	}
19306}
19307
19308// ListVirtualHubIPConfigurationResults virtualHubIpConfigurations list.
19309type ListVirtualHubIPConfigurationResults struct {
19310	autorest.Response `json:"-"`
19311	// Value - The list of VirtualHubIpConfigurations.
19312	Value *[]HubIPConfiguration `json:"value,omitempty"`
19313	// NextLink - URL to get the next set of results.
19314	NextLink *string `json:"nextLink,omitempty"`
19315}
19316
19317// ListVirtualHubIPConfigurationResultsIterator provides access to a complete listing of HubIPConfiguration
19318// values.
19319type ListVirtualHubIPConfigurationResultsIterator struct {
19320	i    int
19321	page ListVirtualHubIPConfigurationResultsPage
19322}
19323
19324// NextWithContext advances to the next value.  If there was an error making
19325// the request the iterator does not advance and the error is returned.
19326func (iter *ListVirtualHubIPConfigurationResultsIterator) NextWithContext(ctx context.Context) (err error) {
19327	if tracing.IsEnabled() {
19328		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubIPConfigurationResultsIterator.NextWithContext")
19329		defer func() {
19330			sc := -1
19331			if iter.Response().Response.Response != nil {
19332				sc = iter.Response().Response.Response.StatusCode
19333			}
19334			tracing.EndSpan(ctx, sc, err)
19335		}()
19336	}
19337	iter.i++
19338	if iter.i < len(iter.page.Values()) {
19339		return nil
19340	}
19341	err = iter.page.NextWithContext(ctx)
19342	if err != nil {
19343		iter.i--
19344		return err
19345	}
19346	iter.i = 0
19347	return nil
19348}
19349
19350// Next advances to the next value.  If there was an error making
19351// the request the iterator does not advance and the error is returned.
19352// Deprecated: Use NextWithContext() instead.
19353func (iter *ListVirtualHubIPConfigurationResultsIterator) Next() error {
19354	return iter.NextWithContext(context.Background())
19355}
19356
19357// NotDone returns true if the enumeration should be started or is not yet complete.
19358func (iter ListVirtualHubIPConfigurationResultsIterator) NotDone() bool {
19359	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19360}
19361
19362// Response returns the raw server response from the last page request.
19363func (iter ListVirtualHubIPConfigurationResultsIterator) Response() ListVirtualHubIPConfigurationResults {
19364	return iter.page.Response()
19365}
19366
19367// Value returns the current value or a zero-initialized value if the
19368// iterator has advanced beyond the end of the collection.
19369func (iter ListVirtualHubIPConfigurationResultsIterator) Value() HubIPConfiguration {
19370	if !iter.page.NotDone() {
19371		return HubIPConfiguration{}
19372	}
19373	return iter.page.Values()[iter.i]
19374}
19375
19376// Creates a new instance of the ListVirtualHubIPConfigurationResultsIterator type.
19377func NewListVirtualHubIPConfigurationResultsIterator(page ListVirtualHubIPConfigurationResultsPage) ListVirtualHubIPConfigurationResultsIterator {
19378	return ListVirtualHubIPConfigurationResultsIterator{page: page}
19379}
19380
19381// IsEmpty returns true if the ListResult contains no values.
19382func (lvhicr ListVirtualHubIPConfigurationResults) IsEmpty() bool {
19383	return lvhicr.Value == nil || len(*lvhicr.Value) == 0
19384}
19385
19386// hasNextLink returns true if the NextLink is not empty.
19387func (lvhicr ListVirtualHubIPConfigurationResults) hasNextLink() bool {
19388	return lvhicr.NextLink != nil && len(*lvhicr.NextLink) != 0
19389}
19390
19391// listVirtualHubIPConfigurationResultsPreparer prepares a request to retrieve the next set of results.
19392// It returns nil if no more results exist.
19393func (lvhicr ListVirtualHubIPConfigurationResults) listVirtualHubIPConfigurationResultsPreparer(ctx context.Context) (*http.Request, error) {
19394	if !lvhicr.hasNextLink() {
19395		return nil, nil
19396	}
19397	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19398		autorest.AsJSON(),
19399		autorest.AsGet(),
19400		autorest.WithBaseURL(to.String(lvhicr.NextLink)))
19401}
19402
19403// ListVirtualHubIPConfigurationResultsPage contains a page of HubIPConfiguration values.
19404type ListVirtualHubIPConfigurationResultsPage struct {
19405	fn     func(context.Context, ListVirtualHubIPConfigurationResults) (ListVirtualHubIPConfigurationResults, error)
19406	lvhicr ListVirtualHubIPConfigurationResults
19407}
19408
19409// NextWithContext advances to the next page of values.  If there was an error making
19410// the request the page does not advance and the error is returned.
19411func (page *ListVirtualHubIPConfigurationResultsPage) NextWithContext(ctx context.Context) (err error) {
19412	if tracing.IsEnabled() {
19413		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubIPConfigurationResultsPage.NextWithContext")
19414		defer func() {
19415			sc := -1
19416			if page.Response().Response.Response != nil {
19417				sc = page.Response().Response.Response.StatusCode
19418			}
19419			tracing.EndSpan(ctx, sc, err)
19420		}()
19421	}
19422	for {
19423		next, err := page.fn(ctx, page.lvhicr)
19424		if err != nil {
19425			return err
19426		}
19427		page.lvhicr = next
19428		if !next.hasNextLink() || !next.IsEmpty() {
19429			break
19430		}
19431	}
19432	return nil
19433}
19434
19435// Next advances to the next page of values.  If there was an error making
19436// the request the page does not advance and the error is returned.
19437// Deprecated: Use NextWithContext() instead.
19438func (page *ListVirtualHubIPConfigurationResultsPage) Next() error {
19439	return page.NextWithContext(context.Background())
19440}
19441
19442// NotDone returns true if the page enumeration should be started or is not yet complete.
19443func (page ListVirtualHubIPConfigurationResultsPage) NotDone() bool {
19444	return !page.lvhicr.IsEmpty()
19445}
19446
19447// Response returns the raw server response from the last page request.
19448func (page ListVirtualHubIPConfigurationResultsPage) Response() ListVirtualHubIPConfigurationResults {
19449	return page.lvhicr
19450}
19451
19452// Values returns the slice of values for the current page or nil if there are no values.
19453func (page ListVirtualHubIPConfigurationResultsPage) Values() []HubIPConfiguration {
19454	if page.lvhicr.IsEmpty() {
19455		return nil
19456	}
19457	return *page.lvhicr.Value
19458}
19459
19460// Creates a new instance of the ListVirtualHubIPConfigurationResultsPage type.
19461func NewListVirtualHubIPConfigurationResultsPage(cur ListVirtualHubIPConfigurationResults, getNextPage func(context.Context, ListVirtualHubIPConfigurationResults) (ListVirtualHubIPConfigurationResults, error)) ListVirtualHubIPConfigurationResultsPage {
19462	return ListVirtualHubIPConfigurationResultsPage{
19463		fn:     getNextPage,
19464		lvhicr: cur,
19465	}
19466}
19467
19468// ListVirtualHubRouteTableV2sResult list of VirtualHubRouteTableV2s and a URL nextLink to get the next set
19469// of results.
19470type ListVirtualHubRouteTableV2sResult struct {
19471	autorest.Response `json:"-"`
19472	// Value - List of VirtualHubRouteTableV2s.
19473	Value *[]VirtualHubRouteTableV2 `json:"value,omitempty"`
19474	// NextLink - URL to get the next set of operation list results if there are any.
19475	NextLink *string `json:"nextLink,omitempty"`
19476}
19477
19478// ListVirtualHubRouteTableV2sResultIterator provides access to a complete listing of
19479// VirtualHubRouteTableV2 values.
19480type ListVirtualHubRouteTableV2sResultIterator struct {
19481	i    int
19482	page ListVirtualHubRouteTableV2sResultPage
19483}
19484
19485// NextWithContext advances to the next value.  If there was an error making
19486// the request the iterator does not advance and the error is returned.
19487func (iter *ListVirtualHubRouteTableV2sResultIterator) NextWithContext(ctx context.Context) (err error) {
19488	if tracing.IsEnabled() {
19489		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubRouteTableV2sResultIterator.NextWithContext")
19490		defer func() {
19491			sc := -1
19492			if iter.Response().Response.Response != nil {
19493				sc = iter.Response().Response.Response.StatusCode
19494			}
19495			tracing.EndSpan(ctx, sc, err)
19496		}()
19497	}
19498	iter.i++
19499	if iter.i < len(iter.page.Values()) {
19500		return nil
19501	}
19502	err = iter.page.NextWithContext(ctx)
19503	if err != nil {
19504		iter.i--
19505		return err
19506	}
19507	iter.i = 0
19508	return nil
19509}
19510
19511// Next advances to the next value.  If there was an error making
19512// the request the iterator does not advance and the error is returned.
19513// Deprecated: Use NextWithContext() instead.
19514func (iter *ListVirtualHubRouteTableV2sResultIterator) Next() error {
19515	return iter.NextWithContext(context.Background())
19516}
19517
19518// NotDone returns true if the enumeration should be started or is not yet complete.
19519func (iter ListVirtualHubRouteTableV2sResultIterator) NotDone() bool {
19520	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19521}
19522
19523// Response returns the raw server response from the last page request.
19524func (iter ListVirtualHubRouteTableV2sResultIterator) Response() ListVirtualHubRouteTableV2sResult {
19525	return iter.page.Response()
19526}
19527
19528// Value returns the current value or a zero-initialized value if the
19529// iterator has advanced beyond the end of the collection.
19530func (iter ListVirtualHubRouteTableV2sResultIterator) Value() VirtualHubRouteTableV2 {
19531	if !iter.page.NotDone() {
19532		return VirtualHubRouteTableV2{}
19533	}
19534	return iter.page.Values()[iter.i]
19535}
19536
19537// Creates a new instance of the ListVirtualHubRouteTableV2sResultIterator type.
19538func NewListVirtualHubRouteTableV2sResultIterator(page ListVirtualHubRouteTableV2sResultPage) ListVirtualHubRouteTableV2sResultIterator {
19539	return ListVirtualHubRouteTableV2sResultIterator{page: page}
19540}
19541
19542// IsEmpty returns true if the ListResult contains no values.
19543func (lvhrtvr ListVirtualHubRouteTableV2sResult) IsEmpty() bool {
19544	return lvhrtvr.Value == nil || len(*lvhrtvr.Value) == 0
19545}
19546
19547// hasNextLink returns true if the NextLink is not empty.
19548func (lvhrtvr ListVirtualHubRouteTableV2sResult) hasNextLink() bool {
19549	return lvhrtvr.NextLink != nil && len(*lvhrtvr.NextLink) != 0
19550}
19551
19552// listVirtualHubRouteTableV2sResultPreparer prepares a request to retrieve the next set of results.
19553// It returns nil if no more results exist.
19554func (lvhrtvr ListVirtualHubRouteTableV2sResult) listVirtualHubRouteTableV2sResultPreparer(ctx context.Context) (*http.Request, error) {
19555	if !lvhrtvr.hasNextLink() {
19556		return nil, nil
19557	}
19558	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19559		autorest.AsJSON(),
19560		autorest.AsGet(),
19561		autorest.WithBaseURL(to.String(lvhrtvr.NextLink)))
19562}
19563
19564// ListVirtualHubRouteTableV2sResultPage contains a page of VirtualHubRouteTableV2 values.
19565type ListVirtualHubRouteTableV2sResultPage struct {
19566	fn      func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error)
19567	lvhrtvr ListVirtualHubRouteTableV2sResult
19568}
19569
19570// NextWithContext advances to the next page of values.  If there was an error making
19571// the request the page does not advance and the error is returned.
19572func (page *ListVirtualHubRouteTableV2sResultPage) NextWithContext(ctx context.Context) (err error) {
19573	if tracing.IsEnabled() {
19574		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubRouteTableV2sResultPage.NextWithContext")
19575		defer func() {
19576			sc := -1
19577			if page.Response().Response.Response != nil {
19578				sc = page.Response().Response.Response.StatusCode
19579			}
19580			tracing.EndSpan(ctx, sc, err)
19581		}()
19582	}
19583	for {
19584		next, err := page.fn(ctx, page.lvhrtvr)
19585		if err != nil {
19586			return err
19587		}
19588		page.lvhrtvr = next
19589		if !next.hasNextLink() || !next.IsEmpty() {
19590			break
19591		}
19592	}
19593	return nil
19594}
19595
19596// Next advances to the next page of values.  If there was an error making
19597// the request the page does not advance and the error is returned.
19598// Deprecated: Use NextWithContext() instead.
19599func (page *ListVirtualHubRouteTableV2sResultPage) Next() error {
19600	return page.NextWithContext(context.Background())
19601}
19602
19603// NotDone returns true if the page enumeration should be started or is not yet complete.
19604func (page ListVirtualHubRouteTableV2sResultPage) NotDone() bool {
19605	return !page.lvhrtvr.IsEmpty()
19606}
19607
19608// Response returns the raw server response from the last page request.
19609func (page ListVirtualHubRouteTableV2sResultPage) Response() ListVirtualHubRouteTableV2sResult {
19610	return page.lvhrtvr
19611}
19612
19613// Values returns the slice of values for the current page or nil if there are no values.
19614func (page ListVirtualHubRouteTableV2sResultPage) Values() []VirtualHubRouteTableV2 {
19615	if page.lvhrtvr.IsEmpty() {
19616		return nil
19617	}
19618	return *page.lvhrtvr.Value
19619}
19620
19621// Creates a new instance of the ListVirtualHubRouteTableV2sResultPage type.
19622func NewListVirtualHubRouteTableV2sResultPage(cur ListVirtualHubRouteTableV2sResult, getNextPage func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error)) ListVirtualHubRouteTableV2sResultPage {
19623	return ListVirtualHubRouteTableV2sResultPage{
19624		fn:      getNextPage,
19625		lvhrtvr: cur,
19626	}
19627}
19628
19629// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
19630// URL nextLink to get the next set of results.
19631type ListVirtualHubsResult struct {
19632	autorest.Response `json:"-"`
19633	// Value - List of VirtualHubs.
19634	Value *[]VirtualHub `json:"value,omitempty"`
19635	// NextLink - URL to get the next set of operation list results if there are any.
19636	NextLink *string `json:"nextLink,omitempty"`
19637}
19638
19639// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
19640type ListVirtualHubsResultIterator struct {
19641	i    int
19642	page ListVirtualHubsResultPage
19643}
19644
19645// NextWithContext advances to the next value.  If there was an error making
19646// the request the iterator does not advance and the error is returned.
19647func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
19648	if tracing.IsEnabled() {
19649		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
19650		defer func() {
19651			sc := -1
19652			if iter.Response().Response.Response != nil {
19653				sc = iter.Response().Response.Response.StatusCode
19654			}
19655			tracing.EndSpan(ctx, sc, err)
19656		}()
19657	}
19658	iter.i++
19659	if iter.i < len(iter.page.Values()) {
19660		return nil
19661	}
19662	err = iter.page.NextWithContext(ctx)
19663	if err != nil {
19664		iter.i--
19665		return err
19666	}
19667	iter.i = 0
19668	return nil
19669}
19670
19671// Next advances to the next value.  If there was an error making
19672// the request the iterator does not advance and the error is returned.
19673// Deprecated: Use NextWithContext() instead.
19674func (iter *ListVirtualHubsResultIterator) Next() error {
19675	return iter.NextWithContext(context.Background())
19676}
19677
19678// NotDone returns true if the enumeration should be started or is not yet complete.
19679func (iter ListVirtualHubsResultIterator) NotDone() bool {
19680	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19681}
19682
19683// Response returns the raw server response from the last page request.
19684func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
19685	return iter.page.Response()
19686}
19687
19688// Value returns the current value or a zero-initialized value if the
19689// iterator has advanced beyond the end of the collection.
19690func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
19691	if !iter.page.NotDone() {
19692		return VirtualHub{}
19693	}
19694	return iter.page.Values()[iter.i]
19695}
19696
19697// Creates a new instance of the ListVirtualHubsResultIterator type.
19698func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
19699	return ListVirtualHubsResultIterator{page: page}
19700}
19701
19702// IsEmpty returns true if the ListResult contains no values.
19703func (lvhr ListVirtualHubsResult) IsEmpty() bool {
19704	return lvhr.Value == nil || len(*lvhr.Value) == 0
19705}
19706
19707// hasNextLink returns true if the NextLink is not empty.
19708func (lvhr ListVirtualHubsResult) hasNextLink() bool {
19709	return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
19710}
19711
19712// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
19713// It returns nil if no more results exist.
19714func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
19715	if !lvhr.hasNextLink() {
19716		return nil, nil
19717	}
19718	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19719		autorest.AsJSON(),
19720		autorest.AsGet(),
19721		autorest.WithBaseURL(to.String(lvhr.NextLink)))
19722}
19723
19724// ListVirtualHubsResultPage contains a page of VirtualHub values.
19725type ListVirtualHubsResultPage struct {
19726	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
19727	lvhr ListVirtualHubsResult
19728}
19729
19730// NextWithContext advances to the next page of values.  If there was an error making
19731// the request the page does not advance and the error is returned.
19732func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
19733	if tracing.IsEnabled() {
19734		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
19735		defer func() {
19736			sc := -1
19737			if page.Response().Response.Response != nil {
19738				sc = page.Response().Response.Response.StatusCode
19739			}
19740			tracing.EndSpan(ctx, sc, err)
19741		}()
19742	}
19743	for {
19744		next, err := page.fn(ctx, page.lvhr)
19745		if err != nil {
19746			return err
19747		}
19748		page.lvhr = next
19749		if !next.hasNextLink() || !next.IsEmpty() {
19750			break
19751		}
19752	}
19753	return nil
19754}
19755
19756// Next advances to the next page of values.  If there was an error making
19757// the request the page does not advance and the error is returned.
19758// Deprecated: Use NextWithContext() instead.
19759func (page *ListVirtualHubsResultPage) Next() error {
19760	return page.NextWithContext(context.Background())
19761}
19762
19763// NotDone returns true if the page enumeration should be started or is not yet complete.
19764func (page ListVirtualHubsResultPage) NotDone() bool {
19765	return !page.lvhr.IsEmpty()
19766}
19767
19768// Response returns the raw server response from the last page request.
19769func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
19770	return page.lvhr
19771}
19772
19773// Values returns the slice of values for the current page or nil if there are no values.
19774func (page ListVirtualHubsResultPage) Values() []VirtualHub {
19775	if page.lvhr.IsEmpty() {
19776		return nil
19777	}
19778	return *page.lvhr.Value
19779}
19780
19781// Creates a new instance of the ListVirtualHubsResultPage type.
19782func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
19783	return ListVirtualHubsResultPage{
19784		fn:   getNextPage,
19785		lvhr: cur,
19786	}
19787}
19788
19789// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
19790// URL nextLink to get the next set of results.
19791type ListVirtualWANsResult struct {
19792	autorest.Response `json:"-"`
19793	// Value - List of VirtualWANs.
19794	Value *[]VirtualWAN `json:"value,omitempty"`
19795	// NextLink - URL to get the next set of operation list results if there are any.
19796	NextLink *string `json:"nextLink,omitempty"`
19797}
19798
19799// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
19800type ListVirtualWANsResultIterator struct {
19801	i    int
19802	page ListVirtualWANsResultPage
19803}
19804
19805// NextWithContext advances to the next value.  If there was an error making
19806// the request the iterator does not advance and the error is returned.
19807func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
19808	if tracing.IsEnabled() {
19809		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
19810		defer func() {
19811			sc := -1
19812			if iter.Response().Response.Response != nil {
19813				sc = iter.Response().Response.Response.StatusCode
19814			}
19815			tracing.EndSpan(ctx, sc, err)
19816		}()
19817	}
19818	iter.i++
19819	if iter.i < len(iter.page.Values()) {
19820		return nil
19821	}
19822	err = iter.page.NextWithContext(ctx)
19823	if err != nil {
19824		iter.i--
19825		return err
19826	}
19827	iter.i = 0
19828	return nil
19829}
19830
19831// Next advances to the next value.  If there was an error making
19832// the request the iterator does not advance and the error is returned.
19833// Deprecated: Use NextWithContext() instead.
19834func (iter *ListVirtualWANsResultIterator) Next() error {
19835	return iter.NextWithContext(context.Background())
19836}
19837
19838// NotDone returns true if the enumeration should be started or is not yet complete.
19839func (iter ListVirtualWANsResultIterator) NotDone() bool {
19840	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19841}
19842
19843// Response returns the raw server response from the last page request.
19844func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
19845	return iter.page.Response()
19846}
19847
19848// Value returns the current value or a zero-initialized value if the
19849// iterator has advanced beyond the end of the collection.
19850func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
19851	if !iter.page.NotDone() {
19852		return VirtualWAN{}
19853	}
19854	return iter.page.Values()[iter.i]
19855}
19856
19857// Creates a new instance of the ListVirtualWANsResultIterator type.
19858func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
19859	return ListVirtualWANsResultIterator{page: page}
19860}
19861
19862// IsEmpty returns true if the ListResult contains no values.
19863func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
19864	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
19865}
19866
19867// hasNextLink returns true if the NextLink is not empty.
19868func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
19869	return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
19870}
19871
19872// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
19873// It returns nil if no more results exist.
19874func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
19875	if !lvwnr.hasNextLink() {
19876		return nil, nil
19877	}
19878	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19879		autorest.AsJSON(),
19880		autorest.AsGet(),
19881		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
19882}
19883
19884// ListVirtualWANsResultPage contains a page of VirtualWAN values.
19885type ListVirtualWANsResultPage struct {
19886	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
19887	lvwnr ListVirtualWANsResult
19888}
19889
19890// NextWithContext advances to the next page of values.  If there was an error making
19891// the request the page does not advance and the error is returned.
19892func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
19893	if tracing.IsEnabled() {
19894		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
19895		defer func() {
19896			sc := -1
19897			if page.Response().Response.Response != nil {
19898				sc = page.Response().Response.Response.StatusCode
19899			}
19900			tracing.EndSpan(ctx, sc, err)
19901		}()
19902	}
19903	for {
19904		next, err := page.fn(ctx, page.lvwnr)
19905		if err != nil {
19906			return err
19907		}
19908		page.lvwnr = next
19909		if !next.hasNextLink() || !next.IsEmpty() {
19910			break
19911		}
19912	}
19913	return nil
19914}
19915
19916// Next advances to the next page of values.  If there was an error making
19917// the request the page does not advance and the error is returned.
19918// Deprecated: Use NextWithContext() instead.
19919func (page *ListVirtualWANsResultPage) Next() error {
19920	return page.NextWithContext(context.Background())
19921}
19922
19923// NotDone returns true if the page enumeration should be started or is not yet complete.
19924func (page ListVirtualWANsResultPage) NotDone() bool {
19925	return !page.lvwnr.IsEmpty()
19926}
19927
19928// Response returns the raw server response from the last page request.
19929func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
19930	return page.lvwnr
19931}
19932
19933// Values returns the slice of values for the current page or nil if there are no values.
19934func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
19935	if page.lvwnr.IsEmpty() {
19936		return nil
19937	}
19938	return *page.lvwnr.Value
19939}
19940
19941// Creates a new instance of the ListVirtualWANsResultPage type.
19942func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
19943	return ListVirtualWANsResultPage{
19944		fn:    getNextPage,
19945		lvwnr: cur,
19946	}
19947}
19948
19949// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
19950// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
19951type ListVpnConnectionsResult struct {
19952	autorest.Response `json:"-"`
19953	// Value - List of Vpn Connections.
19954	Value *[]VpnConnection `json:"value,omitempty"`
19955	// NextLink - URL to get the next set of operation list results if there are any.
19956	NextLink *string `json:"nextLink,omitempty"`
19957}
19958
19959// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
19960type ListVpnConnectionsResultIterator struct {
19961	i    int
19962	page ListVpnConnectionsResultPage
19963}
19964
19965// NextWithContext advances to the next value.  If there was an error making
19966// the request the iterator does not advance and the error is returned.
19967func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
19968	if tracing.IsEnabled() {
19969		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
19970		defer func() {
19971			sc := -1
19972			if iter.Response().Response.Response != nil {
19973				sc = iter.Response().Response.Response.StatusCode
19974			}
19975			tracing.EndSpan(ctx, sc, err)
19976		}()
19977	}
19978	iter.i++
19979	if iter.i < len(iter.page.Values()) {
19980		return nil
19981	}
19982	err = iter.page.NextWithContext(ctx)
19983	if err != nil {
19984		iter.i--
19985		return err
19986	}
19987	iter.i = 0
19988	return nil
19989}
19990
19991// Next advances to the next value.  If there was an error making
19992// the request the iterator does not advance and the error is returned.
19993// Deprecated: Use NextWithContext() instead.
19994func (iter *ListVpnConnectionsResultIterator) Next() error {
19995	return iter.NextWithContext(context.Background())
19996}
19997
19998// NotDone returns true if the enumeration should be started or is not yet complete.
19999func (iter ListVpnConnectionsResultIterator) NotDone() bool {
20000	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20001}
20002
20003// Response returns the raw server response from the last page request.
20004func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
20005	return iter.page.Response()
20006}
20007
20008// Value returns the current value or a zero-initialized value if the
20009// iterator has advanced beyond the end of the collection.
20010func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
20011	if !iter.page.NotDone() {
20012		return VpnConnection{}
20013	}
20014	return iter.page.Values()[iter.i]
20015}
20016
20017// Creates a new instance of the ListVpnConnectionsResultIterator type.
20018func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
20019	return ListVpnConnectionsResultIterator{page: page}
20020}
20021
20022// IsEmpty returns true if the ListResult contains no values.
20023func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
20024	return lvcr.Value == nil || len(*lvcr.Value) == 0
20025}
20026
20027// hasNextLink returns true if the NextLink is not empty.
20028func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
20029	return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
20030}
20031
20032// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
20033// It returns nil if no more results exist.
20034func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
20035	if !lvcr.hasNextLink() {
20036		return nil, nil
20037	}
20038	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20039		autorest.AsJSON(),
20040		autorest.AsGet(),
20041		autorest.WithBaseURL(to.String(lvcr.NextLink)))
20042}
20043
20044// ListVpnConnectionsResultPage contains a page of VpnConnection values.
20045type ListVpnConnectionsResultPage struct {
20046	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
20047	lvcr ListVpnConnectionsResult
20048}
20049
20050// NextWithContext advances to the next page of values.  If there was an error making
20051// the request the page does not advance and the error is returned.
20052func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
20053	if tracing.IsEnabled() {
20054		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
20055		defer func() {
20056			sc := -1
20057			if page.Response().Response.Response != nil {
20058				sc = page.Response().Response.Response.StatusCode
20059			}
20060			tracing.EndSpan(ctx, sc, err)
20061		}()
20062	}
20063	for {
20064		next, err := page.fn(ctx, page.lvcr)
20065		if err != nil {
20066			return err
20067		}
20068		page.lvcr = next
20069		if !next.hasNextLink() || !next.IsEmpty() {
20070			break
20071		}
20072	}
20073	return nil
20074}
20075
20076// Next advances to the next page of values.  If there was an error making
20077// the request the page does not advance and the error is returned.
20078// Deprecated: Use NextWithContext() instead.
20079func (page *ListVpnConnectionsResultPage) Next() error {
20080	return page.NextWithContext(context.Background())
20081}
20082
20083// NotDone returns true if the page enumeration should be started or is not yet complete.
20084func (page ListVpnConnectionsResultPage) NotDone() bool {
20085	return !page.lvcr.IsEmpty()
20086}
20087
20088// Response returns the raw server response from the last page request.
20089func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
20090	return page.lvcr
20091}
20092
20093// Values returns the slice of values for the current page or nil if there are no values.
20094func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
20095	if page.lvcr.IsEmpty() {
20096		return nil
20097	}
20098	return *page.lvcr.Value
20099}
20100
20101// Creates a new instance of the ListVpnConnectionsResultPage type.
20102func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
20103	return ListVpnConnectionsResultPage{
20104		fn:   getNextPage,
20105		lvcr: cur,
20106	}
20107}
20108
20109// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
20110// URL nextLink to get the next set of results.
20111type ListVpnGatewaysResult struct {
20112	autorest.Response `json:"-"`
20113	// Value - List of VpnGateways.
20114	Value *[]VpnGateway `json:"value,omitempty"`
20115	// NextLink - URL to get the next set of operation list results if there are any.
20116	NextLink *string `json:"nextLink,omitempty"`
20117}
20118
20119// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
20120type ListVpnGatewaysResultIterator struct {
20121	i    int
20122	page ListVpnGatewaysResultPage
20123}
20124
20125// NextWithContext advances to the next value.  If there was an error making
20126// the request the iterator does not advance and the error is returned.
20127func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
20128	if tracing.IsEnabled() {
20129		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
20130		defer func() {
20131			sc := -1
20132			if iter.Response().Response.Response != nil {
20133				sc = iter.Response().Response.Response.StatusCode
20134			}
20135			tracing.EndSpan(ctx, sc, err)
20136		}()
20137	}
20138	iter.i++
20139	if iter.i < len(iter.page.Values()) {
20140		return nil
20141	}
20142	err = iter.page.NextWithContext(ctx)
20143	if err != nil {
20144		iter.i--
20145		return err
20146	}
20147	iter.i = 0
20148	return nil
20149}
20150
20151// Next advances to the next value.  If there was an error making
20152// the request the iterator does not advance and the error is returned.
20153// Deprecated: Use NextWithContext() instead.
20154func (iter *ListVpnGatewaysResultIterator) Next() error {
20155	return iter.NextWithContext(context.Background())
20156}
20157
20158// NotDone returns true if the enumeration should be started or is not yet complete.
20159func (iter ListVpnGatewaysResultIterator) NotDone() bool {
20160	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20161}
20162
20163// Response returns the raw server response from the last page request.
20164func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
20165	return iter.page.Response()
20166}
20167
20168// Value returns the current value or a zero-initialized value if the
20169// iterator has advanced beyond the end of the collection.
20170func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
20171	if !iter.page.NotDone() {
20172		return VpnGateway{}
20173	}
20174	return iter.page.Values()[iter.i]
20175}
20176
20177// Creates a new instance of the ListVpnGatewaysResultIterator type.
20178func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
20179	return ListVpnGatewaysResultIterator{page: page}
20180}
20181
20182// IsEmpty returns true if the ListResult contains no values.
20183func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
20184	return lvgr.Value == nil || len(*lvgr.Value) == 0
20185}
20186
20187// hasNextLink returns true if the NextLink is not empty.
20188func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
20189	return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
20190}
20191
20192// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
20193// It returns nil if no more results exist.
20194func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
20195	if !lvgr.hasNextLink() {
20196		return nil, nil
20197	}
20198	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20199		autorest.AsJSON(),
20200		autorest.AsGet(),
20201		autorest.WithBaseURL(to.String(lvgr.NextLink)))
20202}
20203
20204// ListVpnGatewaysResultPage contains a page of VpnGateway values.
20205type ListVpnGatewaysResultPage struct {
20206	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
20207	lvgr ListVpnGatewaysResult
20208}
20209
20210// NextWithContext advances to the next page of values.  If there was an error making
20211// the request the page does not advance and the error is returned.
20212func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
20213	if tracing.IsEnabled() {
20214		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
20215		defer func() {
20216			sc := -1
20217			if page.Response().Response.Response != nil {
20218				sc = page.Response().Response.Response.StatusCode
20219			}
20220			tracing.EndSpan(ctx, sc, err)
20221		}()
20222	}
20223	for {
20224		next, err := page.fn(ctx, page.lvgr)
20225		if err != nil {
20226			return err
20227		}
20228		page.lvgr = next
20229		if !next.hasNextLink() || !next.IsEmpty() {
20230			break
20231		}
20232	}
20233	return nil
20234}
20235
20236// Next advances to the next page of values.  If there was an error making
20237// the request the page does not advance and the error is returned.
20238// Deprecated: Use NextWithContext() instead.
20239func (page *ListVpnGatewaysResultPage) Next() error {
20240	return page.NextWithContext(context.Background())
20241}
20242
20243// NotDone returns true if the page enumeration should be started or is not yet complete.
20244func (page ListVpnGatewaysResultPage) NotDone() bool {
20245	return !page.lvgr.IsEmpty()
20246}
20247
20248// Response returns the raw server response from the last page request.
20249func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
20250	return page.lvgr
20251}
20252
20253// Values returns the slice of values for the current page or nil if there are no values.
20254func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
20255	if page.lvgr.IsEmpty() {
20256		return nil
20257	}
20258	return *page.lvgr.Value
20259}
20260
20261// Creates a new instance of the ListVpnGatewaysResultPage type.
20262func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
20263	return ListVpnGatewaysResultPage{
20264		fn:   getNextPage,
20265		lvgr: cur,
20266	}
20267}
20268
20269// ListVpnServerConfigurationsResult result of the request to list all VpnServerConfigurations. It contains
20270// a list of VpnServerConfigurations and a URL nextLink to get the next set of results.
20271type ListVpnServerConfigurationsResult struct {
20272	autorest.Response `json:"-"`
20273	// Value - List of VpnServerConfigurations.
20274	Value *[]VpnServerConfiguration `json:"value,omitempty"`
20275	// NextLink - URL to get the next set of operation list results if there are any.
20276	NextLink *string `json:"nextLink,omitempty"`
20277}
20278
20279// ListVpnServerConfigurationsResultIterator provides access to a complete listing of
20280// VpnServerConfiguration values.
20281type ListVpnServerConfigurationsResultIterator struct {
20282	i    int
20283	page ListVpnServerConfigurationsResultPage
20284}
20285
20286// NextWithContext advances to the next value.  If there was an error making
20287// the request the iterator does not advance and the error is returned.
20288func (iter *ListVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) {
20289	if tracing.IsEnabled() {
20290		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnServerConfigurationsResultIterator.NextWithContext")
20291		defer func() {
20292			sc := -1
20293			if iter.Response().Response.Response != nil {
20294				sc = iter.Response().Response.Response.StatusCode
20295			}
20296			tracing.EndSpan(ctx, sc, err)
20297		}()
20298	}
20299	iter.i++
20300	if iter.i < len(iter.page.Values()) {
20301		return nil
20302	}
20303	err = iter.page.NextWithContext(ctx)
20304	if err != nil {
20305		iter.i--
20306		return err
20307	}
20308	iter.i = 0
20309	return nil
20310}
20311
20312// Next advances to the next value.  If there was an error making
20313// the request the iterator does not advance and the error is returned.
20314// Deprecated: Use NextWithContext() instead.
20315func (iter *ListVpnServerConfigurationsResultIterator) Next() error {
20316	return iter.NextWithContext(context.Background())
20317}
20318
20319// NotDone returns true if the enumeration should be started or is not yet complete.
20320func (iter ListVpnServerConfigurationsResultIterator) NotDone() bool {
20321	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20322}
20323
20324// Response returns the raw server response from the last page request.
20325func (iter ListVpnServerConfigurationsResultIterator) Response() ListVpnServerConfigurationsResult {
20326	return iter.page.Response()
20327}
20328
20329// Value returns the current value or a zero-initialized value if the
20330// iterator has advanced beyond the end of the collection.
20331func (iter ListVpnServerConfigurationsResultIterator) Value() VpnServerConfiguration {
20332	if !iter.page.NotDone() {
20333		return VpnServerConfiguration{}
20334	}
20335	return iter.page.Values()[iter.i]
20336}
20337
20338// Creates a new instance of the ListVpnServerConfigurationsResultIterator type.
20339func NewListVpnServerConfigurationsResultIterator(page ListVpnServerConfigurationsResultPage) ListVpnServerConfigurationsResultIterator {
20340	return ListVpnServerConfigurationsResultIterator{page: page}
20341}
20342
20343// IsEmpty returns true if the ListResult contains no values.
20344func (lvscr ListVpnServerConfigurationsResult) IsEmpty() bool {
20345	return lvscr.Value == nil || len(*lvscr.Value) == 0
20346}
20347
20348// hasNextLink returns true if the NextLink is not empty.
20349func (lvscr ListVpnServerConfigurationsResult) hasNextLink() bool {
20350	return lvscr.NextLink != nil && len(*lvscr.NextLink) != 0
20351}
20352
20353// listVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results.
20354// It returns nil if no more results exist.
20355func (lvscr ListVpnServerConfigurationsResult) listVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) {
20356	if !lvscr.hasNextLink() {
20357		return nil, nil
20358	}
20359	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20360		autorest.AsJSON(),
20361		autorest.AsGet(),
20362		autorest.WithBaseURL(to.String(lvscr.NextLink)))
20363}
20364
20365// ListVpnServerConfigurationsResultPage contains a page of VpnServerConfiguration values.
20366type ListVpnServerConfigurationsResultPage struct {
20367	fn    func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error)
20368	lvscr ListVpnServerConfigurationsResult
20369}
20370
20371// NextWithContext advances to the next page of values.  If there was an error making
20372// the request the page does not advance and the error is returned.
20373func (page *ListVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) {
20374	if tracing.IsEnabled() {
20375		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnServerConfigurationsResultPage.NextWithContext")
20376		defer func() {
20377			sc := -1
20378			if page.Response().Response.Response != nil {
20379				sc = page.Response().Response.Response.StatusCode
20380			}
20381			tracing.EndSpan(ctx, sc, err)
20382		}()
20383	}
20384	for {
20385		next, err := page.fn(ctx, page.lvscr)
20386		if err != nil {
20387			return err
20388		}
20389		page.lvscr = next
20390		if !next.hasNextLink() || !next.IsEmpty() {
20391			break
20392		}
20393	}
20394	return nil
20395}
20396
20397// Next advances to the next page of values.  If there was an error making
20398// the request the page does not advance and the error is returned.
20399// Deprecated: Use NextWithContext() instead.
20400func (page *ListVpnServerConfigurationsResultPage) Next() error {
20401	return page.NextWithContext(context.Background())
20402}
20403
20404// NotDone returns true if the page enumeration should be started or is not yet complete.
20405func (page ListVpnServerConfigurationsResultPage) NotDone() bool {
20406	return !page.lvscr.IsEmpty()
20407}
20408
20409// Response returns the raw server response from the last page request.
20410func (page ListVpnServerConfigurationsResultPage) Response() ListVpnServerConfigurationsResult {
20411	return page.lvscr
20412}
20413
20414// Values returns the slice of values for the current page or nil if there are no values.
20415func (page ListVpnServerConfigurationsResultPage) Values() []VpnServerConfiguration {
20416	if page.lvscr.IsEmpty() {
20417		return nil
20418	}
20419	return *page.lvscr.Value
20420}
20421
20422// Creates a new instance of the ListVpnServerConfigurationsResultPage type.
20423func NewListVpnServerConfigurationsResultPage(cur ListVpnServerConfigurationsResult, getNextPage func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error)) ListVpnServerConfigurationsResultPage {
20424	return ListVpnServerConfigurationsResultPage{
20425		fn:    getNextPage,
20426		lvscr: cur,
20427	}
20428}
20429
20430// ListVpnSiteLinkConnectionsResult result of the request to list all vpn connections to a virtual wan vpn
20431// gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
20432type ListVpnSiteLinkConnectionsResult struct {
20433	autorest.Response `json:"-"`
20434	// Value - List of VpnSiteLinkConnections.
20435	Value *[]VpnSiteLinkConnection `json:"value,omitempty"`
20436	// NextLink - URL to get the next set of operation list results if there are any.
20437	NextLink *string `json:"nextLink,omitempty"`
20438}
20439
20440// ListVpnSiteLinkConnectionsResultIterator provides access to a complete listing of VpnSiteLinkConnection
20441// values.
20442type ListVpnSiteLinkConnectionsResultIterator struct {
20443	i    int
20444	page ListVpnSiteLinkConnectionsResultPage
20445}
20446
20447// NextWithContext advances to the next value.  If there was an error making
20448// the request the iterator does not advance and the error is returned.
20449func (iter *ListVpnSiteLinkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
20450	if tracing.IsEnabled() {
20451		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultIterator.NextWithContext")
20452		defer func() {
20453			sc := -1
20454			if iter.Response().Response.Response != nil {
20455				sc = iter.Response().Response.Response.StatusCode
20456			}
20457			tracing.EndSpan(ctx, sc, err)
20458		}()
20459	}
20460	iter.i++
20461	if iter.i < len(iter.page.Values()) {
20462		return nil
20463	}
20464	err = iter.page.NextWithContext(ctx)
20465	if err != nil {
20466		iter.i--
20467		return err
20468	}
20469	iter.i = 0
20470	return nil
20471}
20472
20473// Next advances to the next value.  If there was an error making
20474// the request the iterator does not advance and the error is returned.
20475// Deprecated: Use NextWithContext() instead.
20476func (iter *ListVpnSiteLinkConnectionsResultIterator) Next() error {
20477	return iter.NextWithContext(context.Background())
20478}
20479
20480// NotDone returns true if the enumeration should be started or is not yet complete.
20481func (iter ListVpnSiteLinkConnectionsResultIterator) NotDone() bool {
20482	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20483}
20484
20485// Response returns the raw server response from the last page request.
20486func (iter ListVpnSiteLinkConnectionsResultIterator) Response() ListVpnSiteLinkConnectionsResult {
20487	return iter.page.Response()
20488}
20489
20490// Value returns the current value or a zero-initialized value if the
20491// iterator has advanced beyond the end of the collection.
20492func (iter ListVpnSiteLinkConnectionsResultIterator) Value() VpnSiteLinkConnection {
20493	if !iter.page.NotDone() {
20494		return VpnSiteLinkConnection{}
20495	}
20496	return iter.page.Values()[iter.i]
20497}
20498
20499// Creates a new instance of the ListVpnSiteLinkConnectionsResultIterator type.
20500func NewListVpnSiteLinkConnectionsResultIterator(page ListVpnSiteLinkConnectionsResultPage) ListVpnSiteLinkConnectionsResultIterator {
20501	return ListVpnSiteLinkConnectionsResultIterator{page: page}
20502}
20503
20504// IsEmpty returns true if the ListResult contains no values.
20505func (lvslcr ListVpnSiteLinkConnectionsResult) IsEmpty() bool {
20506	return lvslcr.Value == nil || len(*lvslcr.Value) == 0
20507}
20508
20509// hasNextLink returns true if the NextLink is not empty.
20510func (lvslcr ListVpnSiteLinkConnectionsResult) hasNextLink() bool {
20511	return lvslcr.NextLink != nil && len(*lvslcr.NextLink) != 0
20512}
20513
20514// listVpnSiteLinkConnectionsResultPreparer prepares a request to retrieve the next set of results.
20515// It returns nil if no more results exist.
20516func (lvslcr ListVpnSiteLinkConnectionsResult) listVpnSiteLinkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
20517	if !lvslcr.hasNextLink() {
20518		return nil, nil
20519	}
20520	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20521		autorest.AsJSON(),
20522		autorest.AsGet(),
20523		autorest.WithBaseURL(to.String(lvslcr.NextLink)))
20524}
20525
20526// ListVpnSiteLinkConnectionsResultPage contains a page of VpnSiteLinkConnection values.
20527type ListVpnSiteLinkConnectionsResultPage struct {
20528	fn     func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)
20529	lvslcr ListVpnSiteLinkConnectionsResult
20530}
20531
20532// NextWithContext advances to the next page of values.  If there was an error making
20533// the request the page does not advance and the error is returned.
20534func (page *ListVpnSiteLinkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
20535	if tracing.IsEnabled() {
20536		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultPage.NextWithContext")
20537		defer func() {
20538			sc := -1
20539			if page.Response().Response.Response != nil {
20540				sc = page.Response().Response.Response.StatusCode
20541			}
20542			tracing.EndSpan(ctx, sc, err)
20543		}()
20544	}
20545	for {
20546		next, err := page.fn(ctx, page.lvslcr)
20547		if err != nil {
20548			return err
20549		}
20550		page.lvslcr = next
20551		if !next.hasNextLink() || !next.IsEmpty() {
20552			break
20553		}
20554	}
20555	return nil
20556}
20557
20558// Next advances to the next page of values.  If there was an error making
20559// the request the page does not advance and the error is returned.
20560// Deprecated: Use NextWithContext() instead.
20561func (page *ListVpnSiteLinkConnectionsResultPage) Next() error {
20562	return page.NextWithContext(context.Background())
20563}
20564
20565// NotDone returns true if the page enumeration should be started or is not yet complete.
20566func (page ListVpnSiteLinkConnectionsResultPage) NotDone() bool {
20567	return !page.lvslcr.IsEmpty()
20568}
20569
20570// Response returns the raw server response from the last page request.
20571func (page ListVpnSiteLinkConnectionsResultPage) Response() ListVpnSiteLinkConnectionsResult {
20572	return page.lvslcr
20573}
20574
20575// Values returns the slice of values for the current page or nil if there are no values.
20576func (page ListVpnSiteLinkConnectionsResultPage) Values() []VpnSiteLinkConnection {
20577	if page.lvslcr.IsEmpty() {
20578		return nil
20579	}
20580	return *page.lvslcr.Value
20581}
20582
20583// Creates a new instance of the ListVpnSiteLinkConnectionsResultPage type.
20584func NewListVpnSiteLinkConnectionsResultPage(cur ListVpnSiteLinkConnectionsResult, getNextPage func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)) ListVpnSiteLinkConnectionsResultPage {
20585	return ListVpnSiteLinkConnectionsResultPage{
20586		fn:     getNextPage,
20587		lvslcr: cur,
20588	}
20589}
20590
20591// ListVpnSiteLinksResult result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks
20592// and a URL nextLink to get the next set of results.
20593type ListVpnSiteLinksResult struct {
20594	autorest.Response `json:"-"`
20595	// Value - List of VpnSitesLinks.
20596	Value *[]VpnSiteLink `json:"value,omitempty"`
20597	// NextLink - URL to get the next set of operation list results if there are any.
20598	NextLink *string `json:"nextLink,omitempty"`
20599}
20600
20601// ListVpnSiteLinksResultIterator provides access to a complete listing of VpnSiteLink values.
20602type ListVpnSiteLinksResultIterator struct {
20603	i    int
20604	page ListVpnSiteLinksResultPage
20605}
20606
20607// NextWithContext advances to the next value.  If there was an error making
20608// the request the iterator does not advance and the error is returned.
20609func (iter *ListVpnSiteLinksResultIterator) NextWithContext(ctx context.Context) (err error) {
20610	if tracing.IsEnabled() {
20611		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultIterator.NextWithContext")
20612		defer func() {
20613			sc := -1
20614			if iter.Response().Response.Response != nil {
20615				sc = iter.Response().Response.Response.StatusCode
20616			}
20617			tracing.EndSpan(ctx, sc, err)
20618		}()
20619	}
20620	iter.i++
20621	if iter.i < len(iter.page.Values()) {
20622		return nil
20623	}
20624	err = iter.page.NextWithContext(ctx)
20625	if err != nil {
20626		iter.i--
20627		return err
20628	}
20629	iter.i = 0
20630	return nil
20631}
20632
20633// Next advances to the next value.  If there was an error making
20634// the request the iterator does not advance and the error is returned.
20635// Deprecated: Use NextWithContext() instead.
20636func (iter *ListVpnSiteLinksResultIterator) Next() error {
20637	return iter.NextWithContext(context.Background())
20638}
20639
20640// NotDone returns true if the enumeration should be started or is not yet complete.
20641func (iter ListVpnSiteLinksResultIterator) NotDone() bool {
20642	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20643}
20644
20645// Response returns the raw server response from the last page request.
20646func (iter ListVpnSiteLinksResultIterator) Response() ListVpnSiteLinksResult {
20647	return iter.page.Response()
20648}
20649
20650// Value returns the current value or a zero-initialized value if the
20651// iterator has advanced beyond the end of the collection.
20652func (iter ListVpnSiteLinksResultIterator) Value() VpnSiteLink {
20653	if !iter.page.NotDone() {
20654		return VpnSiteLink{}
20655	}
20656	return iter.page.Values()[iter.i]
20657}
20658
20659// Creates a new instance of the ListVpnSiteLinksResultIterator type.
20660func NewListVpnSiteLinksResultIterator(page ListVpnSiteLinksResultPage) ListVpnSiteLinksResultIterator {
20661	return ListVpnSiteLinksResultIterator{page: page}
20662}
20663
20664// IsEmpty returns true if the ListResult contains no values.
20665func (lvslr ListVpnSiteLinksResult) IsEmpty() bool {
20666	return lvslr.Value == nil || len(*lvslr.Value) == 0
20667}
20668
20669// hasNextLink returns true if the NextLink is not empty.
20670func (lvslr ListVpnSiteLinksResult) hasNextLink() bool {
20671	return lvslr.NextLink != nil && len(*lvslr.NextLink) != 0
20672}
20673
20674// listVpnSiteLinksResultPreparer prepares a request to retrieve the next set of results.
20675// It returns nil if no more results exist.
20676func (lvslr ListVpnSiteLinksResult) listVpnSiteLinksResultPreparer(ctx context.Context) (*http.Request, error) {
20677	if !lvslr.hasNextLink() {
20678		return nil, nil
20679	}
20680	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20681		autorest.AsJSON(),
20682		autorest.AsGet(),
20683		autorest.WithBaseURL(to.String(lvslr.NextLink)))
20684}
20685
20686// ListVpnSiteLinksResultPage contains a page of VpnSiteLink values.
20687type ListVpnSiteLinksResultPage struct {
20688	fn    func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)
20689	lvslr ListVpnSiteLinksResult
20690}
20691
20692// NextWithContext advances to the next page of values.  If there was an error making
20693// the request the page does not advance and the error is returned.
20694func (page *ListVpnSiteLinksResultPage) NextWithContext(ctx context.Context) (err error) {
20695	if tracing.IsEnabled() {
20696		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultPage.NextWithContext")
20697		defer func() {
20698			sc := -1
20699			if page.Response().Response.Response != nil {
20700				sc = page.Response().Response.Response.StatusCode
20701			}
20702			tracing.EndSpan(ctx, sc, err)
20703		}()
20704	}
20705	for {
20706		next, err := page.fn(ctx, page.lvslr)
20707		if err != nil {
20708			return err
20709		}
20710		page.lvslr = next
20711		if !next.hasNextLink() || !next.IsEmpty() {
20712			break
20713		}
20714	}
20715	return nil
20716}
20717
20718// Next advances to the next page of values.  If there was an error making
20719// the request the page does not advance and the error is returned.
20720// Deprecated: Use NextWithContext() instead.
20721func (page *ListVpnSiteLinksResultPage) Next() error {
20722	return page.NextWithContext(context.Background())
20723}
20724
20725// NotDone returns true if the page enumeration should be started or is not yet complete.
20726func (page ListVpnSiteLinksResultPage) NotDone() bool {
20727	return !page.lvslr.IsEmpty()
20728}
20729
20730// Response returns the raw server response from the last page request.
20731func (page ListVpnSiteLinksResultPage) Response() ListVpnSiteLinksResult {
20732	return page.lvslr
20733}
20734
20735// Values returns the slice of values for the current page or nil if there are no values.
20736func (page ListVpnSiteLinksResultPage) Values() []VpnSiteLink {
20737	if page.lvslr.IsEmpty() {
20738		return nil
20739	}
20740	return *page.lvslr.Value
20741}
20742
20743// Creates a new instance of the ListVpnSiteLinksResultPage type.
20744func NewListVpnSiteLinksResultPage(cur ListVpnSiteLinksResult, getNextPage func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)) ListVpnSiteLinksResultPage {
20745	return ListVpnSiteLinksResultPage{
20746		fn:    getNextPage,
20747		lvslr: cur,
20748	}
20749}
20750
20751// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
20752// nextLink to get the next set of results.
20753type ListVpnSitesResult struct {
20754	autorest.Response `json:"-"`
20755	// Value - List of VpnSites.
20756	Value *[]VpnSite `json:"value,omitempty"`
20757	// NextLink - URL to get the next set of operation list results if there are any.
20758	NextLink *string `json:"nextLink,omitempty"`
20759}
20760
20761// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
20762type ListVpnSitesResultIterator struct {
20763	i    int
20764	page ListVpnSitesResultPage
20765}
20766
20767// NextWithContext advances to the next value.  If there was an error making
20768// the request the iterator does not advance and the error is returned.
20769func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
20770	if tracing.IsEnabled() {
20771		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
20772		defer func() {
20773			sc := -1
20774			if iter.Response().Response.Response != nil {
20775				sc = iter.Response().Response.Response.StatusCode
20776			}
20777			tracing.EndSpan(ctx, sc, err)
20778		}()
20779	}
20780	iter.i++
20781	if iter.i < len(iter.page.Values()) {
20782		return nil
20783	}
20784	err = iter.page.NextWithContext(ctx)
20785	if err != nil {
20786		iter.i--
20787		return err
20788	}
20789	iter.i = 0
20790	return nil
20791}
20792
20793// Next advances to the next value.  If there was an error making
20794// the request the iterator does not advance and the error is returned.
20795// Deprecated: Use NextWithContext() instead.
20796func (iter *ListVpnSitesResultIterator) Next() error {
20797	return iter.NextWithContext(context.Background())
20798}
20799
20800// NotDone returns true if the enumeration should be started or is not yet complete.
20801func (iter ListVpnSitesResultIterator) NotDone() bool {
20802	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20803}
20804
20805// Response returns the raw server response from the last page request.
20806func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
20807	return iter.page.Response()
20808}
20809
20810// Value returns the current value or a zero-initialized value if the
20811// iterator has advanced beyond the end of the collection.
20812func (iter ListVpnSitesResultIterator) Value() VpnSite {
20813	if !iter.page.NotDone() {
20814		return VpnSite{}
20815	}
20816	return iter.page.Values()[iter.i]
20817}
20818
20819// Creates a new instance of the ListVpnSitesResultIterator type.
20820func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
20821	return ListVpnSitesResultIterator{page: page}
20822}
20823
20824// IsEmpty returns true if the ListResult contains no values.
20825func (lvsr ListVpnSitesResult) IsEmpty() bool {
20826	return lvsr.Value == nil || len(*lvsr.Value) == 0
20827}
20828
20829// hasNextLink returns true if the NextLink is not empty.
20830func (lvsr ListVpnSitesResult) hasNextLink() bool {
20831	return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
20832}
20833
20834// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
20835// It returns nil if no more results exist.
20836func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
20837	if !lvsr.hasNextLink() {
20838		return nil, nil
20839	}
20840	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20841		autorest.AsJSON(),
20842		autorest.AsGet(),
20843		autorest.WithBaseURL(to.String(lvsr.NextLink)))
20844}
20845
20846// ListVpnSitesResultPage contains a page of VpnSite values.
20847type ListVpnSitesResultPage struct {
20848	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
20849	lvsr ListVpnSitesResult
20850}
20851
20852// NextWithContext advances to the next page of values.  If there was an error making
20853// the request the page does not advance and the error is returned.
20854func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
20855	if tracing.IsEnabled() {
20856		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
20857		defer func() {
20858			sc := -1
20859			if page.Response().Response.Response != nil {
20860				sc = page.Response().Response.Response.StatusCode
20861			}
20862			tracing.EndSpan(ctx, sc, err)
20863		}()
20864	}
20865	for {
20866		next, err := page.fn(ctx, page.lvsr)
20867		if err != nil {
20868			return err
20869		}
20870		page.lvsr = next
20871		if !next.hasNextLink() || !next.IsEmpty() {
20872			break
20873		}
20874	}
20875	return nil
20876}
20877
20878// Next advances to the next page of values.  If there was an error making
20879// the request the page does not advance and the error is returned.
20880// Deprecated: Use NextWithContext() instead.
20881func (page *ListVpnSitesResultPage) Next() error {
20882	return page.NextWithContext(context.Background())
20883}
20884
20885// NotDone returns true if the page enumeration should be started or is not yet complete.
20886func (page ListVpnSitesResultPage) NotDone() bool {
20887	return !page.lvsr.IsEmpty()
20888}
20889
20890// Response returns the raw server response from the last page request.
20891func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
20892	return page.lvsr
20893}
20894
20895// Values returns the slice of values for the current page or nil if there are no values.
20896func (page ListVpnSitesResultPage) Values() []VpnSite {
20897	if page.lvsr.IsEmpty() {
20898		return nil
20899	}
20900	return *page.lvsr.Value
20901}
20902
20903// Creates a new instance of the ListVpnSitesResultPage type.
20904func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
20905	return ListVpnSitesResultPage{
20906		fn:   getNextPage,
20907		lvsr: cur,
20908	}
20909}
20910
20911// LoadBalancer loadBalancer resource.
20912type LoadBalancer struct {
20913	autorest.Response `json:"-"`
20914	// Sku - The load balancer SKU.
20915	Sku *LoadBalancerSku `json:"sku,omitempty"`
20916	// LoadBalancerPropertiesFormat - Properties of load balancer.
20917	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
20918	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20919	Etag *string `json:"etag,omitempty"`
20920	// ID - Resource ID.
20921	ID *string `json:"id,omitempty"`
20922	// Name - READ-ONLY; Resource name.
20923	Name *string `json:"name,omitempty"`
20924	// Type - READ-ONLY; Resource type.
20925	Type *string `json:"type,omitempty"`
20926	// Location - Resource location.
20927	Location *string `json:"location,omitempty"`
20928	// Tags - Resource tags.
20929	Tags map[string]*string `json:"tags"`
20930}
20931
20932// MarshalJSON is the custom marshaler for LoadBalancer.
20933func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
20934	objectMap := make(map[string]interface{})
20935	if lb.Sku != nil {
20936		objectMap["sku"] = lb.Sku
20937	}
20938	if lb.LoadBalancerPropertiesFormat != nil {
20939		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
20940	}
20941	if lb.ID != nil {
20942		objectMap["id"] = lb.ID
20943	}
20944	if lb.Location != nil {
20945		objectMap["location"] = lb.Location
20946	}
20947	if lb.Tags != nil {
20948		objectMap["tags"] = lb.Tags
20949	}
20950	return json.Marshal(objectMap)
20951}
20952
20953// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
20954func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
20955	var m map[string]*json.RawMessage
20956	err := json.Unmarshal(body, &m)
20957	if err != nil {
20958		return err
20959	}
20960	for k, v := range m {
20961		switch k {
20962		case "sku":
20963			if v != nil {
20964				var sku LoadBalancerSku
20965				err = json.Unmarshal(*v, &sku)
20966				if err != nil {
20967					return err
20968				}
20969				lb.Sku = &sku
20970			}
20971		case "properties":
20972			if v != nil {
20973				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
20974				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
20975				if err != nil {
20976					return err
20977				}
20978				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
20979			}
20980		case "etag":
20981			if v != nil {
20982				var etag string
20983				err = json.Unmarshal(*v, &etag)
20984				if err != nil {
20985					return err
20986				}
20987				lb.Etag = &etag
20988			}
20989		case "id":
20990			if v != nil {
20991				var ID string
20992				err = json.Unmarshal(*v, &ID)
20993				if err != nil {
20994					return err
20995				}
20996				lb.ID = &ID
20997			}
20998		case "name":
20999			if v != nil {
21000				var name string
21001				err = json.Unmarshal(*v, &name)
21002				if err != nil {
21003					return err
21004				}
21005				lb.Name = &name
21006			}
21007		case "type":
21008			if v != nil {
21009				var typeVar string
21010				err = json.Unmarshal(*v, &typeVar)
21011				if err != nil {
21012					return err
21013				}
21014				lb.Type = &typeVar
21015			}
21016		case "location":
21017			if v != nil {
21018				var location string
21019				err = json.Unmarshal(*v, &location)
21020				if err != nil {
21021					return err
21022				}
21023				lb.Location = &location
21024			}
21025		case "tags":
21026			if v != nil {
21027				var tags map[string]*string
21028				err = json.Unmarshal(*v, &tags)
21029				if err != nil {
21030					return err
21031				}
21032				lb.Tags = tags
21033			}
21034		}
21035	}
21036
21037	return nil
21038}
21039
21040// LoadBalancerBackendAddress load balancer backend addresses.
21041type LoadBalancerBackendAddress struct {
21042	// LoadBalancerBackendAddressPropertiesFormat - Properties of load balancer backend address pool.
21043	*LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"`
21044	// Name - Name of the backend address.
21045	Name *string `json:"name,omitempty"`
21046}
21047
21048// MarshalJSON is the custom marshaler for LoadBalancerBackendAddress.
21049func (lbba LoadBalancerBackendAddress) MarshalJSON() ([]byte, error) {
21050	objectMap := make(map[string]interface{})
21051	if lbba.LoadBalancerBackendAddressPropertiesFormat != nil {
21052		objectMap["properties"] = lbba.LoadBalancerBackendAddressPropertiesFormat
21053	}
21054	if lbba.Name != nil {
21055		objectMap["name"] = lbba.Name
21056	}
21057	return json.Marshal(objectMap)
21058}
21059
21060// UnmarshalJSON is the custom unmarshaler for LoadBalancerBackendAddress struct.
21061func (lbba *LoadBalancerBackendAddress) UnmarshalJSON(body []byte) error {
21062	var m map[string]*json.RawMessage
21063	err := json.Unmarshal(body, &m)
21064	if err != nil {
21065		return err
21066	}
21067	for k, v := range m {
21068		switch k {
21069		case "properties":
21070			if v != nil {
21071				var loadBalancerBackendAddressPropertiesFormat LoadBalancerBackendAddressPropertiesFormat
21072				err = json.Unmarshal(*v, &loadBalancerBackendAddressPropertiesFormat)
21073				if err != nil {
21074					return err
21075				}
21076				lbba.LoadBalancerBackendAddressPropertiesFormat = &loadBalancerBackendAddressPropertiesFormat
21077			}
21078		case "name":
21079			if v != nil {
21080				var name string
21081				err = json.Unmarshal(*v, &name)
21082				if err != nil {
21083					return err
21084				}
21085				lbba.Name = &name
21086			}
21087		}
21088	}
21089
21090	return nil
21091}
21092
21093// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
21094type LoadBalancerBackendAddressPoolListResult struct {
21095	autorest.Response `json:"-"`
21096	// Value - A list of backend address pools in a load balancer.
21097	Value *[]BackendAddressPool `json:"value,omitempty"`
21098	// NextLink - READ-ONLY; The URL to get the next set of results.
21099	NextLink *string `json:"nextLink,omitempty"`
21100}
21101
21102// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
21103func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
21104	objectMap := make(map[string]interface{})
21105	if lbbaplr.Value != nil {
21106		objectMap["value"] = lbbaplr.Value
21107	}
21108	return json.Marshal(objectMap)
21109}
21110
21111// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
21112// BackendAddressPool values.
21113type LoadBalancerBackendAddressPoolListResultIterator struct {
21114	i    int
21115	page LoadBalancerBackendAddressPoolListResultPage
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 *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
21121	if tracing.IsEnabled() {
21122		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.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 *LoadBalancerBackendAddressPoolListResultIterator) 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 LoadBalancerBackendAddressPoolListResultIterator) 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 LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
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 LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
21164	if !iter.page.NotDone() {
21165		return BackendAddressPool{}
21166	}
21167	return iter.page.Values()[iter.i]
21168}
21169
21170// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
21171func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
21172	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
21173}
21174
21175// IsEmpty returns true if the ListResult contains no values.
21176func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
21177	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
21178}
21179
21180// hasNextLink returns true if the NextLink is not empty.
21181func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
21182	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
21183}
21184
21185// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
21186// It returns nil if no more results exist.
21187func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
21188	if !lbbaplr.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(lbbaplr.NextLink)))
21195}
21196
21197// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
21198type LoadBalancerBackendAddressPoolListResultPage struct {
21199	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
21200	lbbaplr LoadBalancerBackendAddressPoolListResult
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 *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
21206	if tracing.IsEnabled() {
21207		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.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.lbbaplr)
21218		if err != nil {
21219			return err
21220		}
21221		page.lbbaplr = 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 *LoadBalancerBackendAddressPoolListResultPage) 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 LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
21238	return !page.lbbaplr.IsEmpty()
21239}
21240
21241// Response returns the raw server response from the last page request.
21242func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
21243	return page.lbbaplr
21244}
21245
21246// Values returns the slice of values for the current page or nil if there are no values.
21247func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
21248	if page.lbbaplr.IsEmpty() {
21249		return nil
21250	}
21251	return *page.lbbaplr.Value
21252}
21253
21254// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
21255func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
21256	return LoadBalancerBackendAddressPoolListResultPage{
21257		fn:      getNextPage,
21258		lbbaplr: cur,
21259	}
21260}
21261
21262// LoadBalancerBackendAddressPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
21263// results of a long-running operation.
21264type LoadBalancerBackendAddressPoolsCreateOrUpdateFuture struct {
21265	azure.FutureAPI
21266	// Result returns the result of the asynchronous operation.
21267	// If the operation has not completed it will return an error.
21268	Result func(LoadBalancerBackendAddressPoolsClient) (BackendAddressPool, error)
21269}
21270
21271// LoadBalancerBackendAddressPoolsDeleteFuture an abstraction for monitoring and retrieving the results of
21272// a long-running operation.
21273type LoadBalancerBackendAddressPoolsDeleteFuture struct {
21274	azure.FutureAPI
21275	// Result returns the result of the asynchronous operation.
21276	// If the operation has not completed it will return an error.
21277	Result func(LoadBalancerBackendAddressPoolsClient) (autorest.Response, error)
21278}
21279
21280// LoadBalancerBackendAddressPropertiesFormat properties of the load balancer backend addresses.
21281type LoadBalancerBackendAddressPropertiesFormat struct {
21282	// VirtualNetwork - Reference to an existing virtual network.
21283	VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"`
21284	// IPAddress - IP Address belonging to the referenced virtual network.
21285	IPAddress *string `json:"ipAddress,omitempty"`
21286	// NetworkInterfaceIPConfiguration - READ-ONLY; Reference to IP address defined in network interfaces.
21287	NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"`
21288}
21289
21290// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPropertiesFormat.
21291func (lbbapf LoadBalancerBackendAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
21292	objectMap := make(map[string]interface{})
21293	if lbbapf.VirtualNetwork != nil {
21294		objectMap["virtualNetwork"] = lbbapf.VirtualNetwork
21295	}
21296	if lbbapf.IPAddress != nil {
21297		objectMap["ipAddress"] = lbbapf.IPAddress
21298	}
21299	return json.Marshal(objectMap)
21300}
21301
21302// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
21303type LoadBalancerFrontendIPConfigurationListResult struct {
21304	autorest.Response `json:"-"`
21305	// Value - A list of frontend IP configurations in a load balancer.
21306	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
21307	// NextLink - READ-ONLY; The URL to get the next set of results.
21308	NextLink *string `json:"nextLink,omitempty"`
21309}
21310
21311// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
21312func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
21313	objectMap := make(map[string]interface{})
21314	if lbficlr.Value != nil {
21315		objectMap["value"] = lbficlr.Value
21316	}
21317	return json.Marshal(objectMap)
21318}
21319
21320// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
21321// FrontendIPConfiguration values.
21322type LoadBalancerFrontendIPConfigurationListResultIterator struct {
21323	i    int
21324	page LoadBalancerFrontendIPConfigurationListResultPage
21325}
21326
21327// NextWithContext advances to the next value.  If there was an error making
21328// the request the iterator does not advance and the error is returned.
21329func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
21330	if tracing.IsEnabled() {
21331		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
21332		defer func() {
21333			sc := -1
21334			if iter.Response().Response.Response != nil {
21335				sc = iter.Response().Response.Response.StatusCode
21336			}
21337			tracing.EndSpan(ctx, sc, err)
21338		}()
21339	}
21340	iter.i++
21341	if iter.i < len(iter.page.Values()) {
21342		return nil
21343	}
21344	err = iter.page.NextWithContext(ctx)
21345	if err != nil {
21346		iter.i--
21347		return err
21348	}
21349	iter.i = 0
21350	return nil
21351}
21352
21353// Next advances to the next value.  If there was an error making
21354// the request the iterator does not advance and the error is returned.
21355// Deprecated: Use NextWithContext() instead.
21356func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
21357	return iter.NextWithContext(context.Background())
21358}
21359
21360// NotDone returns true if the enumeration should be started or is not yet complete.
21361func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
21362	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21363}
21364
21365// Response returns the raw server response from the last page request.
21366func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
21367	return iter.page.Response()
21368}
21369
21370// Value returns the current value or a zero-initialized value if the
21371// iterator has advanced beyond the end of the collection.
21372func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
21373	if !iter.page.NotDone() {
21374		return FrontendIPConfiguration{}
21375	}
21376	return iter.page.Values()[iter.i]
21377}
21378
21379// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
21380func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
21381	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
21382}
21383
21384// IsEmpty returns true if the ListResult contains no values.
21385func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
21386	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
21387}
21388
21389// hasNextLink returns true if the NextLink is not empty.
21390func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
21391	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
21392}
21393
21394// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
21395// It returns nil if no more results exist.
21396func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
21397	if !lbficlr.hasNextLink() {
21398		return nil, nil
21399	}
21400	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21401		autorest.AsJSON(),
21402		autorest.AsGet(),
21403		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
21404}
21405
21406// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
21407type LoadBalancerFrontendIPConfigurationListResultPage struct {
21408	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
21409	lbficlr LoadBalancerFrontendIPConfigurationListResult
21410}
21411
21412// NextWithContext advances to the next page of values.  If there was an error making
21413// the request the page does not advance and the error is returned.
21414func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
21415	if tracing.IsEnabled() {
21416		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
21417		defer func() {
21418			sc := -1
21419			if page.Response().Response.Response != nil {
21420				sc = page.Response().Response.Response.StatusCode
21421			}
21422			tracing.EndSpan(ctx, sc, err)
21423		}()
21424	}
21425	for {
21426		next, err := page.fn(ctx, page.lbficlr)
21427		if err != nil {
21428			return err
21429		}
21430		page.lbficlr = next
21431		if !next.hasNextLink() || !next.IsEmpty() {
21432			break
21433		}
21434	}
21435	return nil
21436}
21437
21438// Next advances to the next page of values.  If there was an error making
21439// the request the page does not advance and the error is returned.
21440// Deprecated: Use NextWithContext() instead.
21441func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
21442	return page.NextWithContext(context.Background())
21443}
21444
21445// NotDone returns true if the page enumeration should be started or is not yet complete.
21446func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
21447	return !page.lbficlr.IsEmpty()
21448}
21449
21450// Response returns the raw server response from the last page request.
21451func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
21452	return page.lbficlr
21453}
21454
21455// Values returns the slice of values for the current page or nil if there are no values.
21456func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
21457	if page.lbficlr.IsEmpty() {
21458		return nil
21459	}
21460	return *page.lbficlr.Value
21461}
21462
21463// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
21464func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
21465	return LoadBalancerFrontendIPConfigurationListResultPage{
21466		fn:      getNextPage,
21467		lbficlr: cur,
21468	}
21469}
21470
21471// LoadBalancerListResult response for ListLoadBalancers API service call.
21472type LoadBalancerListResult struct {
21473	autorest.Response `json:"-"`
21474	// Value - A list of load balancers in a resource group.
21475	Value *[]LoadBalancer `json:"value,omitempty"`
21476	// NextLink - READ-ONLY; The URL to get the next set of results.
21477	NextLink *string `json:"nextLink,omitempty"`
21478}
21479
21480// MarshalJSON is the custom marshaler for LoadBalancerListResult.
21481func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
21482	objectMap := make(map[string]interface{})
21483	if lblr.Value != nil {
21484		objectMap["value"] = lblr.Value
21485	}
21486	return json.Marshal(objectMap)
21487}
21488
21489// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
21490type LoadBalancerListResultIterator struct {
21491	i    int
21492	page LoadBalancerListResultPage
21493}
21494
21495// NextWithContext advances to the next value.  If there was an error making
21496// the request the iterator does not advance and the error is returned.
21497func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
21498	if tracing.IsEnabled() {
21499		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
21500		defer func() {
21501			sc := -1
21502			if iter.Response().Response.Response != nil {
21503				sc = iter.Response().Response.Response.StatusCode
21504			}
21505			tracing.EndSpan(ctx, sc, err)
21506		}()
21507	}
21508	iter.i++
21509	if iter.i < len(iter.page.Values()) {
21510		return nil
21511	}
21512	err = iter.page.NextWithContext(ctx)
21513	if err != nil {
21514		iter.i--
21515		return err
21516	}
21517	iter.i = 0
21518	return nil
21519}
21520
21521// Next advances to the next value.  If there was an error making
21522// the request the iterator does not advance and the error is returned.
21523// Deprecated: Use NextWithContext() instead.
21524func (iter *LoadBalancerListResultIterator) Next() error {
21525	return iter.NextWithContext(context.Background())
21526}
21527
21528// NotDone returns true if the enumeration should be started or is not yet complete.
21529func (iter LoadBalancerListResultIterator) NotDone() bool {
21530	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21531}
21532
21533// Response returns the raw server response from the last page request.
21534func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
21535	return iter.page.Response()
21536}
21537
21538// Value returns the current value or a zero-initialized value if the
21539// iterator has advanced beyond the end of the collection.
21540func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
21541	if !iter.page.NotDone() {
21542		return LoadBalancer{}
21543	}
21544	return iter.page.Values()[iter.i]
21545}
21546
21547// Creates a new instance of the LoadBalancerListResultIterator type.
21548func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
21549	return LoadBalancerListResultIterator{page: page}
21550}
21551
21552// IsEmpty returns true if the ListResult contains no values.
21553func (lblr LoadBalancerListResult) IsEmpty() bool {
21554	return lblr.Value == nil || len(*lblr.Value) == 0
21555}
21556
21557// hasNextLink returns true if the NextLink is not empty.
21558func (lblr LoadBalancerListResult) hasNextLink() bool {
21559	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
21560}
21561
21562// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
21563// It returns nil if no more results exist.
21564func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
21565	if !lblr.hasNextLink() {
21566		return nil, nil
21567	}
21568	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21569		autorest.AsJSON(),
21570		autorest.AsGet(),
21571		autorest.WithBaseURL(to.String(lblr.NextLink)))
21572}
21573
21574// LoadBalancerListResultPage contains a page of LoadBalancer values.
21575type LoadBalancerListResultPage struct {
21576	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
21577	lblr LoadBalancerListResult
21578}
21579
21580// NextWithContext advances to the next page of values.  If there was an error making
21581// the request the page does not advance and the error is returned.
21582func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
21583	if tracing.IsEnabled() {
21584		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
21585		defer func() {
21586			sc := -1
21587			if page.Response().Response.Response != nil {
21588				sc = page.Response().Response.Response.StatusCode
21589			}
21590			tracing.EndSpan(ctx, sc, err)
21591		}()
21592	}
21593	for {
21594		next, err := page.fn(ctx, page.lblr)
21595		if err != nil {
21596			return err
21597		}
21598		page.lblr = next
21599		if !next.hasNextLink() || !next.IsEmpty() {
21600			break
21601		}
21602	}
21603	return nil
21604}
21605
21606// Next advances to the next page of values.  If there was an error making
21607// the request the page does not advance and the error is returned.
21608// Deprecated: Use NextWithContext() instead.
21609func (page *LoadBalancerListResultPage) Next() error {
21610	return page.NextWithContext(context.Background())
21611}
21612
21613// NotDone returns true if the page enumeration should be started or is not yet complete.
21614func (page LoadBalancerListResultPage) NotDone() bool {
21615	return !page.lblr.IsEmpty()
21616}
21617
21618// Response returns the raw server response from the last page request.
21619func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
21620	return page.lblr
21621}
21622
21623// Values returns the slice of values for the current page or nil if there are no values.
21624func (page LoadBalancerListResultPage) Values() []LoadBalancer {
21625	if page.lblr.IsEmpty() {
21626		return nil
21627	}
21628	return *page.lblr.Value
21629}
21630
21631// Creates a new instance of the LoadBalancerListResultPage type.
21632func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
21633	return LoadBalancerListResultPage{
21634		fn:   getNextPage,
21635		lblr: cur,
21636	}
21637}
21638
21639// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
21640type LoadBalancerLoadBalancingRuleListResult struct {
21641	autorest.Response `json:"-"`
21642	// Value - A list of load balancing rules in a load balancer.
21643	Value *[]LoadBalancingRule `json:"value,omitempty"`
21644	// NextLink - READ-ONLY; The URL to get the next set of results.
21645	NextLink *string `json:"nextLink,omitempty"`
21646}
21647
21648// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
21649func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
21650	objectMap := make(map[string]interface{})
21651	if lblbrlr.Value != nil {
21652		objectMap["value"] = lblbrlr.Value
21653	}
21654	return json.Marshal(objectMap)
21655}
21656
21657// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
21658// LoadBalancingRule values.
21659type LoadBalancerLoadBalancingRuleListResultIterator struct {
21660	i    int
21661	page LoadBalancerLoadBalancingRuleListResultPage
21662}
21663
21664// NextWithContext advances to the next value.  If there was an error making
21665// the request the iterator does not advance and the error is returned.
21666func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
21667	if tracing.IsEnabled() {
21668		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
21669		defer func() {
21670			sc := -1
21671			if iter.Response().Response.Response != nil {
21672				sc = iter.Response().Response.Response.StatusCode
21673			}
21674			tracing.EndSpan(ctx, sc, err)
21675		}()
21676	}
21677	iter.i++
21678	if iter.i < len(iter.page.Values()) {
21679		return nil
21680	}
21681	err = iter.page.NextWithContext(ctx)
21682	if err != nil {
21683		iter.i--
21684		return err
21685	}
21686	iter.i = 0
21687	return nil
21688}
21689
21690// Next advances to the next value.  If there was an error making
21691// the request the iterator does not advance and the error is returned.
21692// Deprecated: Use NextWithContext() instead.
21693func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
21694	return iter.NextWithContext(context.Background())
21695}
21696
21697// NotDone returns true if the enumeration should be started or is not yet complete.
21698func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
21699	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21700}
21701
21702// Response returns the raw server response from the last page request.
21703func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
21704	return iter.page.Response()
21705}
21706
21707// Value returns the current value or a zero-initialized value if the
21708// iterator has advanced beyond the end of the collection.
21709func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
21710	if !iter.page.NotDone() {
21711		return LoadBalancingRule{}
21712	}
21713	return iter.page.Values()[iter.i]
21714}
21715
21716// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
21717func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
21718	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
21719}
21720
21721// IsEmpty returns true if the ListResult contains no values.
21722func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
21723	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
21724}
21725
21726// hasNextLink returns true if the NextLink is not empty.
21727func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
21728	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
21729}
21730
21731// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
21732// It returns nil if no more results exist.
21733func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
21734	if !lblbrlr.hasNextLink() {
21735		return nil, nil
21736	}
21737	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21738		autorest.AsJSON(),
21739		autorest.AsGet(),
21740		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
21741}
21742
21743// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
21744type LoadBalancerLoadBalancingRuleListResultPage struct {
21745	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
21746	lblbrlr LoadBalancerLoadBalancingRuleListResult
21747}
21748
21749// NextWithContext advances to the next page of values.  If there was an error making
21750// the request the page does not advance and the error is returned.
21751func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
21752	if tracing.IsEnabled() {
21753		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
21754		defer func() {
21755			sc := -1
21756			if page.Response().Response.Response != nil {
21757				sc = page.Response().Response.Response.StatusCode
21758			}
21759			tracing.EndSpan(ctx, sc, err)
21760		}()
21761	}
21762	for {
21763		next, err := page.fn(ctx, page.lblbrlr)
21764		if err != nil {
21765			return err
21766		}
21767		page.lblbrlr = next
21768		if !next.hasNextLink() || !next.IsEmpty() {
21769			break
21770		}
21771	}
21772	return nil
21773}
21774
21775// Next advances to the next page of values.  If there was an error making
21776// the request the page does not advance and the error is returned.
21777// Deprecated: Use NextWithContext() instead.
21778func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
21779	return page.NextWithContext(context.Background())
21780}
21781
21782// NotDone returns true if the page enumeration should be started or is not yet complete.
21783func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
21784	return !page.lblbrlr.IsEmpty()
21785}
21786
21787// Response returns the raw server response from the last page request.
21788func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
21789	return page.lblbrlr
21790}
21791
21792// Values returns the slice of values for the current page or nil if there are no values.
21793func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
21794	if page.lblbrlr.IsEmpty() {
21795		return nil
21796	}
21797	return *page.lblbrlr.Value
21798}
21799
21800// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
21801func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
21802	return LoadBalancerLoadBalancingRuleListResultPage{
21803		fn:      getNextPage,
21804		lblbrlr: cur,
21805	}
21806}
21807
21808// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call.
21809type LoadBalancerOutboundRuleListResult struct {
21810	autorest.Response `json:"-"`
21811	// Value - A list of outbound rules in a load balancer.
21812	Value *[]OutboundRule `json:"value,omitempty"`
21813	// NextLink - READ-ONLY; The URL to get the next set of results.
21814	NextLink *string `json:"nextLink,omitempty"`
21815}
21816
21817// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult.
21818func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) {
21819	objectMap := make(map[string]interface{})
21820	if lborlr.Value != nil {
21821		objectMap["value"] = lborlr.Value
21822	}
21823	return json.Marshal(objectMap)
21824}
21825
21826// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values.
21827type LoadBalancerOutboundRuleListResultIterator struct {
21828	i    int
21829	page LoadBalancerOutboundRuleListResultPage
21830}
21831
21832// NextWithContext advances to the next value.  If there was an error making
21833// the request the iterator does not advance and the error is returned.
21834func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
21835	if tracing.IsEnabled() {
21836		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext")
21837		defer func() {
21838			sc := -1
21839			if iter.Response().Response.Response != nil {
21840				sc = iter.Response().Response.Response.StatusCode
21841			}
21842			tracing.EndSpan(ctx, sc, err)
21843		}()
21844	}
21845	iter.i++
21846	if iter.i < len(iter.page.Values()) {
21847		return nil
21848	}
21849	err = iter.page.NextWithContext(ctx)
21850	if err != nil {
21851		iter.i--
21852		return err
21853	}
21854	iter.i = 0
21855	return nil
21856}
21857
21858// Next advances to the next value.  If there was an error making
21859// the request the iterator does not advance and the error is returned.
21860// Deprecated: Use NextWithContext() instead.
21861func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error {
21862	return iter.NextWithContext(context.Background())
21863}
21864
21865// NotDone returns true if the enumeration should be started or is not yet complete.
21866func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool {
21867	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21868}
21869
21870// Response returns the raw server response from the last page request.
21871func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult {
21872	return iter.page.Response()
21873}
21874
21875// Value returns the current value or a zero-initialized value if the
21876// iterator has advanced beyond the end of the collection.
21877func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule {
21878	if !iter.page.NotDone() {
21879		return OutboundRule{}
21880	}
21881	return iter.page.Values()[iter.i]
21882}
21883
21884// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type.
21885func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator {
21886	return LoadBalancerOutboundRuleListResultIterator{page: page}
21887}
21888
21889// IsEmpty returns true if the ListResult contains no values.
21890func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool {
21891	return lborlr.Value == nil || len(*lborlr.Value) == 0
21892}
21893
21894// hasNextLink returns true if the NextLink is not empty.
21895func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool {
21896	return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0
21897}
21898
21899// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results.
21900// It returns nil if no more results exist.
21901func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
21902	if !lborlr.hasNextLink() {
21903		return nil, nil
21904	}
21905	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21906		autorest.AsJSON(),
21907		autorest.AsGet(),
21908		autorest.WithBaseURL(to.String(lborlr.NextLink)))
21909}
21910
21911// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values.
21912type LoadBalancerOutboundRuleListResultPage struct {
21913	fn     func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)
21914	lborlr LoadBalancerOutboundRuleListResult
21915}
21916
21917// NextWithContext advances to the next page of values.  If there was an error making
21918// the request the page does not advance and the error is returned.
21919func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
21920	if tracing.IsEnabled() {
21921		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext")
21922		defer func() {
21923			sc := -1
21924			if page.Response().Response.Response != nil {
21925				sc = page.Response().Response.Response.StatusCode
21926			}
21927			tracing.EndSpan(ctx, sc, err)
21928		}()
21929	}
21930	for {
21931		next, err := page.fn(ctx, page.lborlr)
21932		if err != nil {
21933			return err
21934		}
21935		page.lborlr = next
21936		if !next.hasNextLink() || !next.IsEmpty() {
21937			break
21938		}
21939	}
21940	return nil
21941}
21942
21943// Next advances to the next page of values.  If there was an error making
21944// the request the page does not advance and the error is returned.
21945// Deprecated: Use NextWithContext() instead.
21946func (page *LoadBalancerOutboundRuleListResultPage) Next() error {
21947	return page.NextWithContext(context.Background())
21948}
21949
21950// NotDone returns true if the page enumeration should be started or is not yet complete.
21951func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool {
21952	return !page.lborlr.IsEmpty()
21953}
21954
21955// Response returns the raw server response from the last page request.
21956func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult {
21957	return page.lborlr
21958}
21959
21960// Values returns the slice of values for the current page or nil if there are no values.
21961func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule {
21962	if page.lborlr.IsEmpty() {
21963		return nil
21964	}
21965	return *page.lborlr.Value
21966}
21967
21968// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type.
21969func NewLoadBalancerOutboundRuleListResultPage(cur LoadBalancerOutboundRuleListResult, getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage {
21970	return LoadBalancerOutboundRuleListResultPage{
21971		fn:     getNextPage,
21972		lborlr: cur,
21973	}
21974}
21975
21976// LoadBalancerProbeListResult response for ListProbe API service call.
21977type LoadBalancerProbeListResult struct {
21978	autorest.Response `json:"-"`
21979	// Value - A list of probes in a load balancer.
21980	Value *[]Probe `json:"value,omitempty"`
21981	// NextLink - READ-ONLY; The URL to get the next set of results.
21982	NextLink *string `json:"nextLink,omitempty"`
21983}
21984
21985// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
21986func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
21987	objectMap := make(map[string]interface{})
21988	if lbplr.Value != nil {
21989		objectMap["value"] = lbplr.Value
21990	}
21991	return json.Marshal(objectMap)
21992}
21993
21994// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
21995type LoadBalancerProbeListResultIterator struct {
21996	i    int
21997	page LoadBalancerProbeListResultPage
21998}
21999
22000// NextWithContext advances to the next value.  If there was an error making
22001// the request the iterator does not advance and the error is returned.
22002func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
22003	if tracing.IsEnabled() {
22004		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
22005		defer func() {
22006			sc := -1
22007			if iter.Response().Response.Response != nil {
22008				sc = iter.Response().Response.Response.StatusCode
22009			}
22010			tracing.EndSpan(ctx, sc, err)
22011		}()
22012	}
22013	iter.i++
22014	if iter.i < len(iter.page.Values()) {
22015		return nil
22016	}
22017	err = iter.page.NextWithContext(ctx)
22018	if err != nil {
22019		iter.i--
22020		return err
22021	}
22022	iter.i = 0
22023	return nil
22024}
22025
22026// Next advances to the next value.  If there was an error making
22027// the request the iterator does not advance and the error is returned.
22028// Deprecated: Use NextWithContext() instead.
22029func (iter *LoadBalancerProbeListResultIterator) Next() error {
22030	return iter.NextWithContext(context.Background())
22031}
22032
22033// NotDone returns true if the enumeration should be started or is not yet complete.
22034func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
22035	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22036}
22037
22038// Response returns the raw server response from the last page request.
22039func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
22040	return iter.page.Response()
22041}
22042
22043// Value returns the current value or a zero-initialized value if the
22044// iterator has advanced beyond the end of the collection.
22045func (iter LoadBalancerProbeListResultIterator) Value() Probe {
22046	if !iter.page.NotDone() {
22047		return Probe{}
22048	}
22049	return iter.page.Values()[iter.i]
22050}
22051
22052// Creates a new instance of the LoadBalancerProbeListResultIterator type.
22053func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
22054	return LoadBalancerProbeListResultIterator{page: page}
22055}
22056
22057// IsEmpty returns true if the ListResult contains no values.
22058func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
22059	return lbplr.Value == nil || len(*lbplr.Value) == 0
22060}
22061
22062// hasNextLink returns true if the NextLink is not empty.
22063func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
22064	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
22065}
22066
22067// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
22068// It returns nil if no more results exist.
22069func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
22070	if !lbplr.hasNextLink() {
22071		return nil, nil
22072	}
22073	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22074		autorest.AsJSON(),
22075		autorest.AsGet(),
22076		autorest.WithBaseURL(to.String(lbplr.NextLink)))
22077}
22078
22079// LoadBalancerProbeListResultPage contains a page of Probe values.
22080type LoadBalancerProbeListResultPage struct {
22081	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
22082	lbplr LoadBalancerProbeListResult
22083}
22084
22085// NextWithContext advances to the next page of values.  If there was an error making
22086// the request the page does not advance and the error is returned.
22087func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
22088	if tracing.IsEnabled() {
22089		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
22090		defer func() {
22091			sc := -1
22092			if page.Response().Response.Response != nil {
22093				sc = page.Response().Response.Response.StatusCode
22094			}
22095			tracing.EndSpan(ctx, sc, err)
22096		}()
22097	}
22098	for {
22099		next, err := page.fn(ctx, page.lbplr)
22100		if err != nil {
22101			return err
22102		}
22103		page.lbplr = next
22104		if !next.hasNextLink() || !next.IsEmpty() {
22105			break
22106		}
22107	}
22108	return nil
22109}
22110
22111// Next advances to the next page of values.  If there was an error making
22112// the request the page does not advance and the error is returned.
22113// Deprecated: Use NextWithContext() instead.
22114func (page *LoadBalancerProbeListResultPage) Next() error {
22115	return page.NextWithContext(context.Background())
22116}
22117
22118// NotDone returns true if the page enumeration should be started or is not yet complete.
22119func (page LoadBalancerProbeListResultPage) NotDone() bool {
22120	return !page.lbplr.IsEmpty()
22121}
22122
22123// Response returns the raw server response from the last page request.
22124func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
22125	return page.lbplr
22126}
22127
22128// Values returns the slice of values for the current page or nil if there are no values.
22129func (page LoadBalancerProbeListResultPage) Values() []Probe {
22130	if page.lbplr.IsEmpty() {
22131		return nil
22132	}
22133	return *page.lbplr.Value
22134}
22135
22136// Creates a new instance of the LoadBalancerProbeListResultPage type.
22137func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
22138	return LoadBalancerProbeListResultPage{
22139		fn:    getNextPage,
22140		lbplr: cur,
22141	}
22142}
22143
22144// LoadBalancerPropertiesFormat properties of the load balancer.
22145type LoadBalancerPropertiesFormat struct {
22146	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer.
22147	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
22148	// BackendAddressPools - Collection of backend address pools used by a load balancer.
22149	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
22150	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning.
22151	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
22152	// Probes - Collection of probe objects used in the load balancer.
22153	Probes *[]Probe `json:"probes,omitempty"`
22154	// 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.
22155	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
22156	// 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.
22157	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
22158	// OutboundRules - The outbound rules.
22159	OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
22160	// ResourceGUID - READ-ONLY; The resource GUID property of the load balancer resource.
22161	ResourceGUID *string `json:"resourceGuid,omitempty"`
22162	// ProvisioningState - READ-ONLY; The provisioning state of the load balancer resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22163	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22164}
22165
22166// MarshalJSON is the custom marshaler for LoadBalancerPropertiesFormat.
22167func (lbpf LoadBalancerPropertiesFormat) MarshalJSON() ([]byte, error) {
22168	objectMap := make(map[string]interface{})
22169	if lbpf.FrontendIPConfigurations != nil {
22170		objectMap["frontendIPConfigurations"] = lbpf.FrontendIPConfigurations
22171	}
22172	if lbpf.BackendAddressPools != nil {
22173		objectMap["backendAddressPools"] = lbpf.BackendAddressPools
22174	}
22175	if lbpf.LoadBalancingRules != nil {
22176		objectMap["loadBalancingRules"] = lbpf.LoadBalancingRules
22177	}
22178	if lbpf.Probes != nil {
22179		objectMap["probes"] = lbpf.Probes
22180	}
22181	if lbpf.InboundNatRules != nil {
22182		objectMap["inboundNatRules"] = lbpf.InboundNatRules
22183	}
22184	if lbpf.InboundNatPools != nil {
22185		objectMap["inboundNatPools"] = lbpf.InboundNatPools
22186	}
22187	if lbpf.OutboundRules != nil {
22188		objectMap["outboundRules"] = lbpf.OutboundRules
22189	}
22190	return json.Marshal(objectMap)
22191}
22192
22193// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22194// long-running operation.
22195type LoadBalancersCreateOrUpdateFuture struct {
22196	azure.FutureAPI
22197	// Result returns the result of the asynchronous operation.
22198	// If the operation has not completed it will return an error.
22199	Result func(LoadBalancersClient) (LoadBalancer, error)
22200}
22201
22202// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22203// operation.
22204type LoadBalancersDeleteFuture struct {
22205	azure.FutureAPI
22206	// Result returns the result of the asynchronous operation.
22207	// If the operation has not completed it will return an error.
22208	Result func(LoadBalancersClient) (autorest.Response, error)
22209}
22210
22211// LoadBalancerSku SKU of a load balancer.
22212type LoadBalancerSku struct {
22213	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
22214	Name LoadBalancerSkuName `json:"name,omitempty"`
22215}
22216
22217// LoadBalancingRule a load balancing rule for a load balancer.
22218type LoadBalancingRule struct {
22219	autorest.Response `json:"-"`
22220	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
22221	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
22222	// 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.
22223	Name *string `json:"name,omitempty"`
22224	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22225	Etag *string `json:"etag,omitempty"`
22226	// Type - READ-ONLY; Type of the resource.
22227	Type *string `json:"type,omitempty"`
22228	// ID - Resource ID.
22229	ID *string `json:"id,omitempty"`
22230}
22231
22232// MarshalJSON is the custom marshaler for LoadBalancingRule.
22233func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
22234	objectMap := make(map[string]interface{})
22235	if lbr.LoadBalancingRulePropertiesFormat != nil {
22236		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
22237	}
22238	if lbr.Name != nil {
22239		objectMap["name"] = lbr.Name
22240	}
22241	if lbr.ID != nil {
22242		objectMap["id"] = lbr.ID
22243	}
22244	return json.Marshal(objectMap)
22245}
22246
22247// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
22248func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
22249	var m map[string]*json.RawMessage
22250	err := json.Unmarshal(body, &m)
22251	if err != nil {
22252		return err
22253	}
22254	for k, v := range m {
22255		switch k {
22256		case "properties":
22257			if v != nil {
22258				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
22259				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
22260				if err != nil {
22261					return err
22262				}
22263				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
22264			}
22265		case "name":
22266			if v != nil {
22267				var name string
22268				err = json.Unmarshal(*v, &name)
22269				if err != nil {
22270					return err
22271				}
22272				lbr.Name = &name
22273			}
22274		case "etag":
22275			if v != nil {
22276				var etag string
22277				err = json.Unmarshal(*v, &etag)
22278				if err != nil {
22279					return err
22280				}
22281				lbr.Etag = &etag
22282			}
22283		case "type":
22284			if v != nil {
22285				var typeVar string
22286				err = json.Unmarshal(*v, &typeVar)
22287				if err != nil {
22288					return err
22289				}
22290				lbr.Type = &typeVar
22291			}
22292		case "id":
22293			if v != nil {
22294				var ID string
22295				err = json.Unmarshal(*v, &ID)
22296				if err != nil {
22297					return err
22298				}
22299				lbr.ID = &ID
22300			}
22301		}
22302	}
22303
22304	return nil
22305}
22306
22307// LoadBalancingRulePropertiesFormat properties of the load balancer.
22308type LoadBalancingRulePropertiesFormat struct {
22309	// FrontendIPConfiguration - A reference to frontend IP addresses.
22310	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
22311	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
22312	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
22313	// Probe - The reference to the load balancer probe used by the load balancing rule.
22314	Probe *SubResource `json:"probe,omitempty"`
22315	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
22316	Protocol TransportProtocol `json:"protocol,omitempty"`
22317	// LoadDistribution - The load distribution policy for this rule. Possible values include: 'LoadDistributionDefault', 'LoadDistributionSourceIP', 'LoadDistributionSourceIPProtocol'
22318	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
22319	// 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".
22320	FrontendPort *int32 `json:"frontendPort,omitempty"`
22321	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port".
22322	BackendPort *int32 `json:"backendPort,omitempty"`
22323	// 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.
22324	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
22325	// 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.
22326	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
22327	// 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.
22328	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
22329	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
22330	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
22331	// ProvisioningState - READ-ONLY; The provisioning state of the load balancing rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22332	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22333}
22334
22335// MarshalJSON is the custom marshaler for LoadBalancingRulePropertiesFormat.
22336func (lbrpf LoadBalancingRulePropertiesFormat) MarshalJSON() ([]byte, error) {
22337	objectMap := make(map[string]interface{})
22338	if lbrpf.FrontendIPConfiguration != nil {
22339		objectMap["frontendIPConfiguration"] = lbrpf.FrontendIPConfiguration
22340	}
22341	if lbrpf.BackendAddressPool != nil {
22342		objectMap["backendAddressPool"] = lbrpf.BackendAddressPool
22343	}
22344	if lbrpf.Probe != nil {
22345		objectMap["probe"] = lbrpf.Probe
22346	}
22347	if lbrpf.Protocol != "" {
22348		objectMap["protocol"] = lbrpf.Protocol
22349	}
22350	if lbrpf.LoadDistribution != "" {
22351		objectMap["loadDistribution"] = lbrpf.LoadDistribution
22352	}
22353	if lbrpf.FrontendPort != nil {
22354		objectMap["frontendPort"] = lbrpf.FrontendPort
22355	}
22356	if lbrpf.BackendPort != nil {
22357		objectMap["backendPort"] = lbrpf.BackendPort
22358	}
22359	if lbrpf.IdleTimeoutInMinutes != nil {
22360		objectMap["idleTimeoutInMinutes"] = lbrpf.IdleTimeoutInMinutes
22361	}
22362	if lbrpf.EnableFloatingIP != nil {
22363		objectMap["enableFloatingIP"] = lbrpf.EnableFloatingIP
22364	}
22365	if lbrpf.EnableTCPReset != nil {
22366		objectMap["enableTcpReset"] = lbrpf.EnableTCPReset
22367	}
22368	if lbrpf.DisableOutboundSnat != nil {
22369		objectMap["disableOutboundSnat"] = lbrpf.DisableOutboundSnat
22370	}
22371	return json.Marshal(objectMap)
22372}
22373
22374// LocalNetworkGateway a common class for general resource information.
22375type LocalNetworkGateway struct {
22376	autorest.Response `json:"-"`
22377	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
22378	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
22379	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22380	Etag *string `json:"etag,omitempty"`
22381	// ID - Resource ID.
22382	ID *string `json:"id,omitempty"`
22383	// Name - READ-ONLY; Resource name.
22384	Name *string `json:"name,omitempty"`
22385	// Type - READ-ONLY; Resource type.
22386	Type *string `json:"type,omitempty"`
22387	// Location - Resource location.
22388	Location *string `json:"location,omitempty"`
22389	// Tags - Resource tags.
22390	Tags map[string]*string `json:"tags"`
22391}
22392
22393// MarshalJSON is the custom marshaler for LocalNetworkGateway.
22394func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
22395	objectMap := make(map[string]interface{})
22396	if lng.LocalNetworkGatewayPropertiesFormat != nil {
22397		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
22398	}
22399	if lng.ID != nil {
22400		objectMap["id"] = lng.ID
22401	}
22402	if lng.Location != nil {
22403		objectMap["location"] = lng.Location
22404	}
22405	if lng.Tags != nil {
22406		objectMap["tags"] = lng.Tags
22407	}
22408	return json.Marshal(objectMap)
22409}
22410
22411// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
22412func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
22413	var m map[string]*json.RawMessage
22414	err := json.Unmarshal(body, &m)
22415	if err != nil {
22416		return err
22417	}
22418	for k, v := range m {
22419		switch k {
22420		case "properties":
22421			if v != nil {
22422				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
22423				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
22424				if err != nil {
22425					return err
22426				}
22427				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
22428			}
22429		case "etag":
22430			if v != nil {
22431				var etag string
22432				err = json.Unmarshal(*v, &etag)
22433				if err != nil {
22434					return err
22435				}
22436				lng.Etag = &etag
22437			}
22438		case "id":
22439			if v != nil {
22440				var ID string
22441				err = json.Unmarshal(*v, &ID)
22442				if err != nil {
22443					return err
22444				}
22445				lng.ID = &ID
22446			}
22447		case "name":
22448			if v != nil {
22449				var name string
22450				err = json.Unmarshal(*v, &name)
22451				if err != nil {
22452					return err
22453				}
22454				lng.Name = &name
22455			}
22456		case "type":
22457			if v != nil {
22458				var typeVar string
22459				err = json.Unmarshal(*v, &typeVar)
22460				if err != nil {
22461					return err
22462				}
22463				lng.Type = &typeVar
22464			}
22465		case "location":
22466			if v != nil {
22467				var location string
22468				err = json.Unmarshal(*v, &location)
22469				if err != nil {
22470					return err
22471				}
22472				lng.Location = &location
22473			}
22474		case "tags":
22475			if v != nil {
22476				var tags map[string]*string
22477				err = json.Unmarshal(*v, &tags)
22478				if err != nil {
22479					return err
22480				}
22481				lng.Tags = tags
22482			}
22483		}
22484	}
22485
22486	return nil
22487}
22488
22489// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
22490type LocalNetworkGatewayListResult struct {
22491	autorest.Response `json:"-"`
22492	// Value - A list of local network gateways that exists in a resource group.
22493	Value *[]LocalNetworkGateway `json:"value,omitempty"`
22494	// NextLink - READ-ONLY; The URL to get the next set of results.
22495	NextLink *string `json:"nextLink,omitempty"`
22496}
22497
22498// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
22499func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
22500	objectMap := make(map[string]interface{})
22501	if lnglr.Value != nil {
22502		objectMap["value"] = lnglr.Value
22503	}
22504	return json.Marshal(objectMap)
22505}
22506
22507// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
22508// values.
22509type LocalNetworkGatewayListResultIterator struct {
22510	i    int
22511	page LocalNetworkGatewayListResultPage
22512}
22513
22514// NextWithContext advances to the next value.  If there was an error making
22515// the request the iterator does not advance and the error is returned.
22516func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
22517	if tracing.IsEnabled() {
22518		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
22519		defer func() {
22520			sc := -1
22521			if iter.Response().Response.Response != nil {
22522				sc = iter.Response().Response.Response.StatusCode
22523			}
22524			tracing.EndSpan(ctx, sc, err)
22525		}()
22526	}
22527	iter.i++
22528	if iter.i < len(iter.page.Values()) {
22529		return nil
22530	}
22531	err = iter.page.NextWithContext(ctx)
22532	if err != nil {
22533		iter.i--
22534		return err
22535	}
22536	iter.i = 0
22537	return nil
22538}
22539
22540// Next advances to the next value.  If there was an error making
22541// the request the iterator does not advance and the error is returned.
22542// Deprecated: Use NextWithContext() instead.
22543func (iter *LocalNetworkGatewayListResultIterator) Next() error {
22544	return iter.NextWithContext(context.Background())
22545}
22546
22547// NotDone returns true if the enumeration should be started or is not yet complete.
22548func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
22549	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22550}
22551
22552// Response returns the raw server response from the last page request.
22553func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
22554	return iter.page.Response()
22555}
22556
22557// Value returns the current value or a zero-initialized value if the
22558// iterator has advanced beyond the end of the collection.
22559func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
22560	if !iter.page.NotDone() {
22561		return LocalNetworkGateway{}
22562	}
22563	return iter.page.Values()[iter.i]
22564}
22565
22566// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
22567func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
22568	return LocalNetworkGatewayListResultIterator{page: page}
22569}
22570
22571// IsEmpty returns true if the ListResult contains no values.
22572func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
22573	return lnglr.Value == nil || len(*lnglr.Value) == 0
22574}
22575
22576// hasNextLink returns true if the NextLink is not empty.
22577func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
22578	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
22579}
22580
22581// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
22582// It returns nil if no more results exist.
22583func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
22584	if !lnglr.hasNextLink() {
22585		return nil, nil
22586	}
22587	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22588		autorest.AsJSON(),
22589		autorest.AsGet(),
22590		autorest.WithBaseURL(to.String(lnglr.NextLink)))
22591}
22592
22593// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
22594type LocalNetworkGatewayListResultPage struct {
22595	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
22596	lnglr LocalNetworkGatewayListResult
22597}
22598
22599// NextWithContext advances to the next page of values.  If there was an error making
22600// the request the page does not advance and the error is returned.
22601func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
22602	if tracing.IsEnabled() {
22603		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
22604		defer func() {
22605			sc := -1
22606			if page.Response().Response.Response != nil {
22607				sc = page.Response().Response.Response.StatusCode
22608			}
22609			tracing.EndSpan(ctx, sc, err)
22610		}()
22611	}
22612	for {
22613		next, err := page.fn(ctx, page.lnglr)
22614		if err != nil {
22615			return err
22616		}
22617		page.lnglr = next
22618		if !next.hasNextLink() || !next.IsEmpty() {
22619			break
22620		}
22621	}
22622	return nil
22623}
22624
22625// Next advances to the next page of values.  If there was an error making
22626// the request the page does not advance and the error is returned.
22627// Deprecated: Use NextWithContext() instead.
22628func (page *LocalNetworkGatewayListResultPage) Next() error {
22629	return page.NextWithContext(context.Background())
22630}
22631
22632// NotDone returns true if the page enumeration should be started or is not yet complete.
22633func (page LocalNetworkGatewayListResultPage) NotDone() bool {
22634	return !page.lnglr.IsEmpty()
22635}
22636
22637// Response returns the raw server response from the last page request.
22638func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
22639	return page.lnglr
22640}
22641
22642// Values returns the slice of values for the current page or nil if there are no values.
22643func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
22644	if page.lnglr.IsEmpty() {
22645		return nil
22646	}
22647	return *page.lnglr.Value
22648}
22649
22650// Creates a new instance of the LocalNetworkGatewayListResultPage type.
22651func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
22652	return LocalNetworkGatewayListResultPage{
22653		fn:    getNextPage,
22654		lnglr: cur,
22655	}
22656}
22657
22658// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties.
22659type LocalNetworkGatewayPropertiesFormat struct {
22660	// LocalNetworkAddressSpace - Local network site address space.
22661	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
22662	// GatewayIPAddress - IP address of local network gateway.
22663	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
22664	// Fqdn - FQDN of local network gateway.
22665	Fqdn *string `json:"fqdn,omitempty"`
22666	// BgpSettings - Local network gateway's BGP speaker settings.
22667	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
22668	// ResourceGUID - READ-ONLY; The resource GUID property of the local network gateway resource.
22669	ResourceGUID *string `json:"resourceGuid,omitempty"`
22670	// ProvisioningState - READ-ONLY; The provisioning state of the local network gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22671	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22672}
22673
22674// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
22675func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
22676	objectMap := make(map[string]interface{})
22677	if lngpf.LocalNetworkAddressSpace != nil {
22678		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
22679	}
22680	if lngpf.GatewayIPAddress != nil {
22681		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
22682	}
22683	if lngpf.Fqdn != nil {
22684		objectMap["fqdn"] = lngpf.Fqdn
22685	}
22686	if lngpf.BgpSettings != nil {
22687		objectMap["bgpSettings"] = lngpf.BgpSettings
22688	}
22689	return json.Marshal(objectMap)
22690}
22691
22692// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22693// long-running operation.
22694type LocalNetworkGatewaysCreateOrUpdateFuture struct {
22695	azure.FutureAPI
22696	// Result returns the result of the asynchronous operation.
22697	// If the operation has not completed it will return an error.
22698	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
22699}
22700
22701// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
22702// long-running operation.
22703type LocalNetworkGatewaysDeleteFuture struct {
22704	azure.FutureAPI
22705	// Result returns the result of the asynchronous operation.
22706	// If the operation has not completed it will return an error.
22707	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
22708}
22709
22710// LogSpecification description of logging specification.
22711type LogSpecification struct {
22712	// Name - The name of the specification.
22713	Name *string `json:"name,omitempty"`
22714	// DisplayName - The display name of the specification.
22715	DisplayName *string `json:"displayName,omitempty"`
22716	// BlobDuration - Duration of the blob.
22717	BlobDuration *string `json:"blobDuration,omitempty"`
22718}
22719
22720// ManagedRuleGroupOverride defines a managed rule group override setting.
22721type ManagedRuleGroupOverride struct {
22722	// RuleGroupName - The managed rule group to override.
22723	RuleGroupName *string `json:"ruleGroupName,omitempty"`
22724	// Rules - List of rules that will be disabled. If none specified, all rules in the group will be disabled.
22725	Rules *[]ManagedRuleOverride `json:"rules,omitempty"`
22726}
22727
22728// ManagedRuleOverride defines a managed rule group override setting.
22729type ManagedRuleOverride struct {
22730	// RuleID - Identifier for the managed rule.
22731	RuleID *string `json:"ruleId,omitempty"`
22732	// State - The state of the managed rule. Defaults to Disabled if not specified. Possible values include: 'ManagedRuleEnabledStateDisabled'
22733	State ManagedRuleEnabledState `json:"state,omitempty"`
22734}
22735
22736// ManagedRulesDefinition allow to exclude some variable satisfy the condition for the WAF check.
22737type ManagedRulesDefinition struct {
22738	// Exclusions - The Exclusions that are applied on the policy.
22739	Exclusions *[]OwaspCrsExclusionEntry `json:"exclusions,omitempty"`
22740	// ManagedRuleSets - The managed rule sets that are associated with the policy.
22741	ManagedRuleSets *[]ManagedRuleSet `json:"managedRuleSets,omitempty"`
22742}
22743
22744// ManagedRuleSet defines a managed rule set.
22745type ManagedRuleSet struct {
22746	// RuleSetType - Defines the rule set type to use.
22747	RuleSetType *string `json:"ruleSetType,omitempty"`
22748	// RuleSetVersion - Defines the version of the rule set to use.
22749	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
22750	// RuleGroupOverrides - Defines the rule group overrides to apply to the rule set.
22751	RuleGroupOverrides *[]ManagedRuleGroupOverride `json:"ruleGroupOverrides,omitempty"`
22752}
22753
22754// ManagedServiceIdentity identity for the resource.
22755type ManagedServiceIdentity struct {
22756	// PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
22757	PrincipalID *string `json:"principalId,omitempty"`
22758	// TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
22759	TenantID *string `json:"tenantId,omitempty"`
22760	// 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'
22761	Type ResourceIdentityType `json:"type,omitempty"`
22762	// 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}'.
22763	UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
22764}
22765
22766// MarshalJSON is the custom marshaler for ManagedServiceIdentity.
22767func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
22768	objectMap := make(map[string]interface{})
22769	if msi.Type != "" {
22770		objectMap["type"] = msi.Type
22771	}
22772	if msi.UserAssignedIdentities != nil {
22773		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
22774	}
22775	return json.Marshal(objectMap)
22776}
22777
22778// ManagedServiceIdentityUserAssignedIdentitiesValue ...
22779type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
22780	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
22781	PrincipalID *string `json:"principalId,omitempty"`
22782	// ClientID - READ-ONLY; The client id of user assigned identity.
22783	ClientID *string `json:"clientId,omitempty"`
22784}
22785
22786// MatchCondition define match conditions.
22787type MatchCondition struct {
22788	// MatchVariables - List of match variables.
22789	MatchVariables *[]MatchVariable `json:"matchVariables,omitempty"`
22790	// Operator - The operator to be matched. Possible values include: 'WebApplicationFirewallOperatorIPMatch', 'WebApplicationFirewallOperatorEqual', 'WebApplicationFirewallOperatorContains', 'WebApplicationFirewallOperatorLessThan', 'WebApplicationFirewallOperatorGreaterThan', 'WebApplicationFirewallOperatorLessThanOrEqual', 'WebApplicationFirewallOperatorGreaterThanOrEqual', 'WebApplicationFirewallOperatorBeginsWith', 'WebApplicationFirewallOperatorEndsWith', 'WebApplicationFirewallOperatorRegex', 'WebApplicationFirewallOperatorGeoMatch'
22791	Operator WebApplicationFirewallOperator `json:"operator,omitempty"`
22792	// NegationConditon - Whether this is negate condition or not.
22793	NegationConditon *bool `json:"negationConditon,omitempty"`
22794	// MatchValues - Match value.
22795	MatchValues *[]string `json:"matchValues,omitempty"`
22796	// Transforms - List of transforms.
22797	Transforms *[]WebApplicationFirewallTransform `json:"transforms,omitempty"`
22798}
22799
22800// MatchedRule matched rule.
22801type MatchedRule struct {
22802	// RuleName - Name of the matched network security rule.
22803	RuleName *string `json:"ruleName,omitempty"`
22804	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
22805	Action *string `json:"action,omitempty"`
22806}
22807
22808// MatchVariable define match variables.
22809type MatchVariable struct {
22810	// VariableName - Match Variable. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestURI', 'RequestHeaders', 'RequestBody', 'RequestCookies'
22811	VariableName WebApplicationFirewallMatchVariable `json:"variableName,omitempty"`
22812	// Selector - The selector of match variable.
22813	Selector *string `json:"selector,omitempty"`
22814}
22815
22816// MetricSpecification description of metrics specification.
22817type MetricSpecification struct {
22818	// Name - The name of the metric.
22819	Name *string `json:"name,omitempty"`
22820	// DisplayName - The display name of the metric.
22821	DisplayName *string `json:"displayName,omitempty"`
22822	// DisplayDescription - The description of the metric.
22823	DisplayDescription *string `json:"displayDescription,omitempty"`
22824	// Unit - Units the metric to be displayed in.
22825	Unit *string `json:"unit,omitempty"`
22826	// AggregationType - The aggregation type.
22827	AggregationType *string `json:"aggregationType,omitempty"`
22828	// Availabilities - List of availability.
22829	Availabilities *[]Availability `json:"availabilities,omitempty"`
22830	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
22831	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
22832	// FillGapWithZero - Whether gaps would be filled with zeros.
22833	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
22834	// MetricFilterPattern - Pattern for the filter of the metric.
22835	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
22836	// Dimensions - List of dimensions.
22837	Dimensions *[]Dimension `json:"dimensions,omitempty"`
22838	// IsInternal - Whether the metric is internal.
22839	IsInternal *bool `json:"isInternal,omitempty"`
22840	// SourceMdmAccount - The source MDM account.
22841	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
22842	// SourceMdmNamespace - The source MDM namespace.
22843	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
22844	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
22845	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
22846}
22847
22848// NatGateway nat Gateway resource.
22849type NatGateway struct {
22850	autorest.Response `json:"-"`
22851	// Sku - The nat gateway SKU.
22852	Sku *NatGatewaySku `json:"sku,omitempty"`
22853	// NatGatewayPropertiesFormat - Nat Gateway properties.
22854	*NatGatewayPropertiesFormat `json:"properties,omitempty"`
22855	// Zones - A list of availability zones denoting the zone in which Nat Gateway should be deployed.
22856	Zones *[]string `json:"zones,omitempty"`
22857	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22858	Etag *string `json:"etag,omitempty"`
22859	// ID - Resource ID.
22860	ID *string `json:"id,omitempty"`
22861	// Name - READ-ONLY; Resource name.
22862	Name *string `json:"name,omitempty"`
22863	// Type - READ-ONLY; Resource type.
22864	Type *string `json:"type,omitempty"`
22865	// Location - Resource location.
22866	Location *string `json:"location,omitempty"`
22867	// Tags - Resource tags.
22868	Tags map[string]*string `json:"tags"`
22869}
22870
22871// MarshalJSON is the custom marshaler for NatGateway.
22872func (ng NatGateway) MarshalJSON() ([]byte, error) {
22873	objectMap := make(map[string]interface{})
22874	if ng.Sku != nil {
22875		objectMap["sku"] = ng.Sku
22876	}
22877	if ng.NatGatewayPropertiesFormat != nil {
22878		objectMap["properties"] = ng.NatGatewayPropertiesFormat
22879	}
22880	if ng.Zones != nil {
22881		objectMap["zones"] = ng.Zones
22882	}
22883	if ng.ID != nil {
22884		objectMap["id"] = ng.ID
22885	}
22886	if ng.Location != nil {
22887		objectMap["location"] = ng.Location
22888	}
22889	if ng.Tags != nil {
22890		objectMap["tags"] = ng.Tags
22891	}
22892	return json.Marshal(objectMap)
22893}
22894
22895// UnmarshalJSON is the custom unmarshaler for NatGateway struct.
22896func (ng *NatGateway) UnmarshalJSON(body []byte) error {
22897	var m map[string]*json.RawMessage
22898	err := json.Unmarshal(body, &m)
22899	if err != nil {
22900		return err
22901	}
22902	for k, v := range m {
22903		switch k {
22904		case "sku":
22905			if v != nil {
22906				var sku NatGatewaySku
22907				err = json.Unmarshal(*v, &sku)
22908				if err != nil {
22909					return err
22910				}
22911				ng.Sku = &sku
22912			}
22913		case "properties":
22914			if v != nil {
22915				var natGatewayPropertiesFormat NatGatewayPropertiesFormat
22916				err = json.Unmarshal(*v, &natGatewayPropertiesFormat)
22917				if err != nil {
22918					return err
22919				}
22920				ng.NatGatewayPropertiesFormat = &natGatewayPropertiesFormat
22921			}
22922		case "zones":
22923			if v != nil {
22924				var zones []string
22925				err = json.Unmarshal(*v, &zones)
22926				if err != nil {
22927					return err
22928				}
22929				ng.Zones = &zones
22930			}
22931		case "etag":
22932			if v != nil {
22933				var etag string
22934				err = json.Unmarshal(*v, &etag)
22935				if err != nil {
22936					return err
22937				}
22938				ng.Etag = &etag
22939			}
22940		case "id":
22941			if v != nil {
22942				var ID string
22943				err = json.Unmarshal(*v, &ID)
22944				if err != nil {
22945					return err
22946				}
22947				ng.ID = &ID
22948			}
22949		case "name":
22950			if v != nil {
22951				var name string
22952				err = json.Unmarshal(*v, &name)
22953				if err != nil {
22954					return err
22955				}
22956				ng.Name = &name
22957			}
22958		case "type":
22959			if v != nil {
22960				var typeVar string
22961				err = json.Unmarshal(*v, &typeVar)
22962				if err != nil {
22963					return err
22964				}
22965				ng.Type = &typeVar
22966			}
22967		case "location":
22968			if v != nil {
22969				var location string
22970				err = json.Unmarshal(*v, &location)
22971				if err != nil {
22972					return err
22973				}
22974				ng.Location = &location
22975			}
22976		case "tags":
22977			if v != nil {
22978				var tags map[string]*string
22979				err = json.Unmarshal(*v, &tags)
22980				if err != nil {
22981					return err
22982				}
22983				ng.Tags = tags
22984			}
22985		}
22986	}
22987
22988	return nil
22989}
22990
22991// NatGatewayListResult response for ListNatGateways API service call.
22992type NatGatewayListResult struct {
22993	autorest.Response `json:"-"`
22994	// Value - A list of Nat Gateways that exists in a resource group.
22995	Value *[]NatGateway `json:"value,omitempty"`
22996	// NextLink - The URL to get the next set of results.
22997	NextLink *string `json:"nextLink,omitempty"`
22998}
22999
23000// NatGatewayListResultIterator provides access to a complete listing of NatGateway values.
23001type NatGatewayListResultIterator struct {
23002	i    int
23003	page NatGatewayListResultPage
23004}
23005
23006// NextWithContext advances to the next value.  If there was an error making
23007// the request the iterator does not advance and the error is returned.
23008func (iter *NatGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
23009	if tracing.IsEnabled() {
23010		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultIterator.NextWithContext")
23011		defer func() {
23012			sc := -1
23013			if iter.Response().Response.Response != nil {
23014				sc = iter.Response().Response.Response.StatusCode
23015			}
23016			tracing.EndSpan(ctx, sc, err)
23017		}()
23018	}
23019	iter.i++
23020	if iter.i < len(iter.page.Values()) {
23021		return nil
23022	}
23023	err = iter.page.NextWithContext(ctx)
23024	if err != nil {
23025		iter.i--
23026		return err
23027	}
23028	iter.i = 0
23029	return nil
23030}
23031
23032// Next advances to the next value.  If there was an error making
23033// the request the iterator does not advance and the error is returned.
23034// Deprecated: Use NextWithContext() instead.
23035func (iter *NatGatewayListResultIterator) Next() error {
23036	return iter.NextWithContext(context.Background())
23037}
23038
23039// NotDone returns true if the enumeration should be started or is not yet complete.
23040func (iter NatGatewayListResultIterator) NotDone() bool {
23041	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23042}
23043
23044// Response returns the raw server response from the last page request.
23045func (iter NatGatewayListResultIterator) Response() NatGatewayListResult {
23046	return iter.page.Response()
23047}
23048
23049// Value returns the current value or a zero-initialized value if the
23050// iterator has advanced beyond the end of the collection.
23051func (iter NatGatewayListResultIterator) Value() NatGateway {
23052	if !iter.page.NotDone() {
23053		return NatGateway{}
23054	}
23055	return iter.page.Values()[iter.i]
23056}
23057
23058// Creates a new instance of the NatGatewayListResultIterator type.
23059func NewNatGatewayListResultIterator(page NatGatewayListResultPage) NatGatewayListResultIterator {
23060	return NatGatewayListResultIterator{page: page}
23061}
23062
23063// IsEmpty returns true if the ListResult contains no values.
23064func (nglr NatGatewayListResult) IsEmpty() bool {
23065	return nglr.Value == nil || len(*nglr.Value) == 0
23066}
23067
23068// hasNextLink returns true if the NextLink is not empty.
23069func (nglr NatGatewayListResult) hasNextLink() bool {
23070	return nglr.NextLink != nil && len(*nglr.NextLink) != 0
23071}
23072
23073// natGatewayListResultPreparer prepares a request to retrieve the next set of results.
23074// It returns nil if no more results exist.
23075func (nglr NatGatewayListResult) natGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
23076	if !nglr.hasNextLink() {
23077		return nil, nil
23078	}
23079	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23080		autorest.AsJSON(),
23081		autorest.AsGet(),
23082		autorest.WithBaseURL(to.String(nglr.NextLink)))
23083}
23084
23085// NatGatewayListResultPage contains a page of NatGateway values.
23086type NatGatewayListResultPage struct {
23087	fn   func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)
23088	nglr NatGatewayListResult
23089}
23090
23091// NextWithContext advances to the next page of values.  If there was an error making
23092// the request the page does not advance and the error is returned.
23093func (page *NatGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
23094	if tracing.IsEnabled() {
23095		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultPage.NextWithContext")
23096		defer func() {
23097			sc := -1
23098			if page.Response().Response.Response != nil {
23099				sc = page.Response().Response.Response.StatusCode
23100			}
23101			tracing.EndSpan(ctx, sc, err)
23102		}()
23103	}
23104	for {
23105		next, err := page.fn(ctx, page.nglr)
23106		if err != nil {
23107			return err
23108		}
23109		page.nglr = next
23110		if !next.hasNextLink() || !next.IsEmpty() {
23111			break
23112		}
23113	}
23114	return nil
23115}
23116
23117// Next advances to the next page of values.  If there was an error making
23118// the request the page does not advance and the error is returned.
23119// Deprecated: Use NextWithContext() instead.
23120func (page *NatGatewayListResultPage) Next() error {
23121	return page.NextWithContext(context.Background())
23122}
23123
23124// NotDone returns true if the page enumeration should be started or is not yet complete.
23125func (page NatGatewayListResultPage) NotDone() bool {
23126	return !page.nglr.IsEmpty()
23127}
23128
23129// Response returns the raw server response from the last page request.
23130func (page NatGatewayListResultPage) Response() NatGatewayListResult {
23131	return page.nglr
23132}
23133
23134// Values returns the slice of values for the current page or nil if there are no values.
23135func (page NatGatewayListResultPage) Values() []NatGateway {
23136	if page.nglr.IsEmpty() {
23137		return nil
23138	}
23139	return *page.nglr.Value
23140}
23141
23142// Creates a new instance of the NatGatewayListResultPage type.
23143func NewNatGatewayListResultPage(cur NatGatewayListResult, getNextPage func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)) NatGatewayListResultPage {
23144	return NatGatewayListResultPage{
23145		fn:   getNextPage,
23146		nglr: cur,
23147	}
23148}
23149
23150// NatGatewayPropertiesFormat nat Gateway properties.
23151type NatGatewayPropertiesFormat struct {
23152	// IdleTimeoutInMinutes - The idle timeout of the nat gateway.
23153	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
23154	// PublicIPAddresses - An array of public ip addresses associated with the nat gateway resource.
23155	PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"`
23156	// PublicIPPrefixes - An array of public ip prefixes associated with the nat gateway resource.
23157	PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"`
23158	// Subnets - READ-ONLY; An array of references to the subnets using this nat gateway resource.
23159	Subnets *[]SubResource `json:"subnets,omitempty"`
23160	// ResourceGUID - READ-ONLY; The resource GUID property of the NAT gateway resource.
23161	ResourceGUID *string `json:"resourceGuid,omitempty"`
23162	// ProvisioningState - READ-ONLY; The provisioning state of the NAT gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
23163	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
23164}
23165
23166// MarshalJSON is the custom marshaler for NatGatewayPropertiesFormat.
23167func (ngpf NatGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
23168	objectMap := make(map[string]interface{})
23169	if ngpf.IdleTimeoutInMinutes != nil {
23170		objectMap["idleTimeoutInMinutes"] = ngpf.IdleTimeoutInMinutes
23171	}
23172	if ngpf.PublicIPAddresses != nil {
23173		objectMap["publicIpAddresses"] = ngpf.PublicIPAddresses
23174	}
23175	if ngpf.PublicIPPrefixes != nil {
23176		objectMap["publicIpPrefixes"] = ngpf.PublicIPPrefixes
23177	}
23178	return json.Marshal(objectMap)
23179}
23180
23181// NatGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23182// long-running operation.
23183type NatGatewaysCreateOrUpdateFuture struct {
23184	azure.FutureAPI
23185	// Result returns the result of the asynchronous operation.
23186	// If the operation has not completed it will return an error.
23187	Result func(NatGatewaysClient) (NatGateway, error)
23188}
23189
23190// NatGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23191// operation.
23192type NatGatewaysDeleteFuture struct {
23193	azure.FutureAPI
23194	// Result returns the result of the asynchronous operation.
23195	// If the operation has not completed it will return an error.
23196	Result func(NatGatewaysClient) (autorest.Response, error)
23197}
23198
23199// NatGatewaySku SKU of nat gateway.
23200type NatGatewaySku struct {
23201	// Name - Name of Nat Gateway SKU. Possible values include: 'NatGatewaySkuNameStandard'
23202	Name NatGatewaySkuName `json:"name,omitempty"`
23203}
23204
23205// NatRule rule of type nat.
23206type NatRule struct {
23207	// IPProtocols - Array of FirewallPolicyRuleNetworkProtocols.
23208	IPProtocols *[]FirewallPolicyRuleNetworkProtocol `json:"ipProtocols,omitempty"`
23209	// SourceAddresses - List of source IP addresses for this rule.
23210	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
23211	// DestinationAddresses - List of destination IP addresses or Service Tags.
23212	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
23213	// DestinationPorts - List of destination ports.
23214	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
23215	// TranslatedAddress - The translated address for this NAT rule.
23216	TranslatedAddress *string `json:"translatedAddress,omitempty"`
23217	// TranslatedPort - The translated port for this NAT rule.
23218	TranslatedPort *string `json:"translatedPort,omitempty"`
23219	// SourceIPGroups - List of source IpGroups for this rule.
23220	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
23221	// Name - Name of the rule.
23222	Name *string `json:"name,omitempty"`
23223	// Description - Description of the rule.
23224	Description *string `json:"description,omitempty"`
23225	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule'
23226	RuleType RuleType `json:"ruleType,omitempty"`
23227}
23228
23229// MarshalJSON is the custom marshaler for NatRule.
23230func (nr NatRule) MarshalJSON() ([]byte, error) {
23231	nr.RuleType = RuleTypeNatRule
23232	objectMap := make(map[string]interface{})
23233	if nr.IPProtocols != nil {
23234		objectMap["ipProtocols"] = nr.IPProtocols
23235	}
23236	if nr.SourceAddresses != nil {
23237		objectMap["sourceAddresses"] = nr.SourceAddresses
23238	}
23239	if nr.DestinationAddresses != nil {
23240		objectMap["destinationAddresses"] = nr.DestinationAddresses
23241	}
23242	if nr.DestinationPorts != nil {
23243		objectMap["destinationPorts"] = nr.DestinationPorts
23244	}
23245	if nr.TranslatedAddress != nil {
23246		objectMap["translatedAddress"] = nr.TranslatedAddress
23247	}
23248	if nr.TranslatedPort != nil {
23249		objectMap["translatedPort"] = nr.TranslatedPort
23250	}
23251	if nr.SourceIPGroups != nil {
23252		objectMap["sourceIpGroups"] = nr.SourceIPGroups
23253	}
23254	if nr.Name != nil {
23255		objectMap["name"] = nr.Name
23256	}
23257	if nr.Description != nil {
23258		objectMap["description"] = nr.Description
23259	}
23260	if nr.RuleType != "" {
23261		objectMap["ruleType"] = nr.RuleType
23262	}
23263	return json.Marshal(objectMap)
23264}
23265
23266// AsApplicationRule is the BasicFirewallPolicyRule implementation for NatRule.
23267func (nr NatRule) AsApplicationRule() (*ApplicationRule, bool) {
23268	return nil, false
23269}
23270
23271// AsNatRule is the BasicFirewallPolicyRule implementation for NatRule.
23272func (nr NatRule) AsNatRule() (*NatRule, bool) {
23273	return &nr, true
23274}
23275
23276// AsRule is the BasicFirewallPolicyRule implementation for NatRule.
23277func (nr NatRule) AsRule() (*Rule, bool) {
23278	return nil, false
23279}
23280
23281// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for NatRule.
23282func (nr NatRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
23283	return nil, false
23284}
23285
23286// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for NatRule.
23287func (nr NatRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
23288	return &nr, true
23289}
23290
23291// NextHopParameters parameters that define the source and destination endpoint.
23292type NextHopParameters struct {
23293	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
23294	TargetResourceID *string `json:"targetResourceId,omitempty"`
23295	// SourceIPAddress - The source IP address.
23296	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
23297	// DestinationIPAddress - The destination IP address.
23298	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
23299	// 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).
23300	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
23301}
23302
23303// NextHopResult the information about next hop from the specified VM.
23304type NextHopResult struct {
23305	autorest.Response `json:"-"`
23306	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
23307	NextHopType NextHopType `json:"nextHopType,omitempty"`
23308	// NextHopIPAddress - Next hop IP Address.
23309	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
23310	// 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'.
23311	RouteTableID *string `json:"routeTableId,omitempty"`
23312}
23313
23314// Office365PolicyProperties network Virtual Appliance Sku Properties.
23315type Office365PolicyProperties struct {
23316	// BreakOutCategories - Office 365 breakout categories.
23317	BreakOutCategories *BreakOutCategoryPolicies `json:"breakOutCategories,omitempty"`
23318}
23319
23320// Operation network REST API operation definition.
23321type Operation struct {
23322	// Name - Operation name: {provider}/{resource}/{operation}.
23323	Name *string `json:"name,omitempty"`
23324	// Display - Display metadata associated with the operation.
23325	Display *OperationDisplay `json:"display,omitempty"`
23326	// Origin - Origin of the operation.
23327	Origin *string `json:"origin,omitempty"`
23328	// OperationPropertiesFormat - Operation properties format.
23329	*OperationPropertiesFormat `json:"properties,omitempty"`
23330}
23331
23332// MarshalJSON is the custom marshaler for Operation.
23333func (o Operation) MarshalJSON() ([]byte, error) {
23334	objectMap := make(map[string]interface{})
23335	if o.Name != nil {
23336		objectMap["name"] = o.Name
23337	}
23338	if o.Display != nil {
23339		objectMap["display"] = o.Display
23340	}
23341	if o.Origin != nil {
23342		objectMap["origin"] = o.Origin
23343	}
23344	if o.OperationPropertiesFormat != nil {
23345		objectMap["properties"] = o.OperationPropertiesFormat
23346	}
23347	return json.Marshal(objectMap)
23348}
23349
23350// UnmarshalJSON is the custom unmarshaler for Operation struct.
23351func (o *Operation) UnmarshalJSON(body []byte) error {
23352	var m map[string]*json.RawMessage
23353	err := json.Unmarshal(body, &m)
23354	if err != nil {
23355		return err
23356	}
23357	for k, v := range m {
23358		switch k {
23359		case "name":
23360			if v != nil {
23361				var name string
23362				err = json.Unmarshal(*v, &name)
23363				if err != nil {
23364					return err
23365				}
23366				o.Name = &name
23367			}
23368		case "display":
23369			if v != nil {
23370				var display OperationDisplay
23371				err = json.Unmarshal(*v, &display)
23372				if err != nil {
23373					return err
23374				}
23375				o.Display = &display
23376			}
23377		case "origin":
23378			if v != nil {
23379				var origin string
23380				err = json.Unmarshal(*v, &origin)
23381				if err != nil {
23382					return err
23383				}
23384				o.Origin = &origin
23385			}
23386		case "properties":
23387			if v != nil {
23388				var operationPropertiesFormat OperationPropertiesFormat
23389				err = json.Unmarshal(*v, &operationPropertiesFormat)
23390				if err != nil {
23391					return err
23392				}
23393				o.OperationPropertiesFormat = &operationPropertiesFormat
23394			}
23395		}
23396	}
23397
23398	return nil
23399}
23400
23401// OperationDisplay display metadata associated with the operation.
23402type OperationDisplay struct {
23403	// Provider - Service provider: Microsoft Network.
23404	Provider *string `json:"provider,omitempty"`
23405	// Resource - Resource on which the operation is performed.
23406	Resource *string `json:"resource,omitempty"`
23407	// Operation - Type of the operation: get, read, delete, etc.
23408	Operation *string `json:"operation,omitempty"`
23409	// Description - Description of the operation.
23410	Description *string `json:"description,omitempty"`
23411}
23412
23413// OperationListResult result of the request to list Network operations. It contains a list of operations
23414// and a URL link to get the next set of results.
23415type OperationListResult struct {
23416	autorest.Response `json:"-"`
23417	// Value - List of Network operations supported by the Network resource provider.
23418	Value *[]Operation `json:"value,omitempty"`
23419	// NextLink - URL to get the next set of operation list results if there are any.
23420	NextLink *string `json:"nextLink,omitempty"`
23421}
23422
23423// OperationListResultIterator provides access to a complete listing of Operation values.
23424type OperationListResultIterator struct {
23425	i    int
23426	page OperationListResultPage
23427}
23428
23429// NextWithContext advances to the next value.  If there was an error making
23430// the request the iterator does not advance and the error is returned.
23431func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
23432	if tracing.IsEnabled() {
23433		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
23434		defer func() {
23435			sc := -1
23436			if iter.Response().Response.Response != nil {
23437				sc = iter.Response().Response.Response.StatusCode
23438			}
23439			tracing.EndSpan(ctx, sc, err)
23440		}()
23441	}
23442	iter.i++
23443	if iter.i < len(iter.page.Values()) {
23444		return nil
23445	}
23446	err = iter.page.NextWithContext(ctx)
23447	if err != nil {
23448		iter.i--
23449		return err
23450	}
23451	iter.i = 0
23452	return nil
23453}
23454
23455// Next advances to the next value.  If there was an error making
23456// the request the iterator does not advance and the error is returned.
23457// Deprecated: Use NextWithContext() instead.
23458func (iter *OperationListResultIterator) Next() error {
23459	return iter.NextWithContext(context.Background())
23460}
23461
23462// NotDone returns true if the enumeration should be started or is not yet complete.
23463func (iter OperationListResultIterator) NotDone() bool {
23464	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23465}
23466
23467// Response returns the raw server response from the last page request.
23468func (iter OperationListResultIterator) Response() OperationListResult {
23469	return iter.page.Response()
23470}
23471
23472// Value returns the current value or a zero-initialized value if the
23473// iterator has advanced beyond the end of the collection.
23474func (iter OperationListResultIterator) Value() Operation {
23475	if !iter.page.NotDone() {
23476		return Operation{}
23477	}
23478	return iter.page.Values()[iter.i]
23479}
23480
23481// Creates a new instance of the OperationListResultIterator type.
23482func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
23483	return OperationListResultIterator{page: page}
23484}
23485
23486// IsEmpty returns true if the ListResult contains no values.
23487func (olr OperationListResult) IsEmpty() bool {
23488	return olr.Value == nil || len(*olr.Value) == 0
23489}
23490
23491// hasNextLink returns true if the NextLink is not empty.
23492func (olr OperationListResult) hasNextLink() bool {
23493	return olr.NextLink != nil && len(*olr.NextLink) != 0
23494}
23495
23496// operationListResultPreparer prepares a request to retrieve the next set of results.
23497// It returns nil if no more results exist.
23498func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
23499	if !olr.hasNextLink() {
23500		return nil, nil
23501	}
23502	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23503		autorest.AsJSON(),
23504		autorest.AsGet(),
23505		autorest.WithBaseURL(to.String(olr.NextLink)))
23506}
23507
23508// OperationListResultPage contains a page of Operation values.
23509type OperationListResultPage struct {
23510	fn  func(context.Context, OperationListResult) (OperationListResult, error)
23511	olr OperationListResult
23512}
23513
23514// NextWithContext advances to the next page of values.  If there was an error making
23515// the request the page does not advance and the error is returned.
23516func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
23517	if tracing.IsEnabled() {
23518		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
23519		defer func() {
23520			sc := -1
23521			if page.Response().Response.Response != nil {
23522				sc = page.Response().Response.Response.StatusCode
23523			}
23524			tracing.EndSpan(ctx, sc, err)
23525		}()
23526	}
23527	for {
23528		next, err := page.fn(ctx, page.olr)
23529		if err != nil {
23530			return err
23531		}
23532		page.olr = next
23533		if !next.hasNextLink() || !next.IsEmpty() {
23534			break
23535		}
23536	}
23537	return nil
23538}
23539
23540// Next advances to the next page of values.  If there was an error making
23541// the request the page does not advance and the error is returned.
23542// Deprecated: Use NextWithContext() instead.
23543func (page *OperationListResultPage) Next() error {
23544	return page.NextWithContext(context.Background())
23545}
23546
23547// NotDone returns true if the page enumeration should be started or is not yet complete.
23548func (page OperationListResultPage) NotDone() bool {
23549	return !page.olr.IsEmpty()
23550}
23551
23552// Response returns the raw server response from the last page request.
23553func (page OperationListResultPage) Response() OperationListResult {
23554	return page.olr
23555}
23556
23557// Values returns the slice of values for the current page or nil if there are no values.
23558func (page OperationListResultPage) Values() []Operation {
23559	if page.olr.IsEmpty() {
23560		return nil
23561	}
23562	return *page.olr.Value
23563}
23564
23565// Creates a new instance of the OperationListResultPage type.
23566func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
23567	return OperationListResultPage{
23568		fn:  getNextPage,
23569		olr: cur,
23570	}
23571}
23572
23573// OperationPropertiesFormat description of operation properties format.
23574type OperationPropertiesFormat struct {
23575	// ServiceSpecification - Specification of the service.
23576	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
23577}
23578
23579// OperationPropertiesFormatServiceSpecification specification of the service.
23580type OperationPropertiesFormatServiceSpecification struct {
23581	// MetricSpecifications - Operation service specification.
23582	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
23583	// LogSpecifications - Operation log specification.
23584	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
23585}
23586
23587// OutboundRule outbound rule of the load balancer.
23588type OutboundRule struct {
23589	autorest.Response `json:"-"`
23590	// OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
23591	*OutboundRulePropertiesFormat `json:"properties,omitempty"`
23592	// 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.
23593	Name *string `json:"name,omitempty"`
23594	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
23595	Etag *string `json:"etag,omitempty"`
23596	// Type - READ-ONLY; Type of the resource.
23597	Type *string `json:"type,omitempty"`
23598	// ID - Resource ID.
23599	ID *string `json:"id,omitempty"`
23600}
23601
23602// MarshalJSON is the custom marshaler for OutboundRule.
23603func (or OutboundRule) MarshalJSON() ([]byte, error) {
23604	objectMap := make(map[string]interface{})
23605	if or.OutboundRulePropertiesFormat != nil {
23606		objectMap["properties"] = or.OutboundRulePropertiesFormat
23607	}
23608	if or.Name != nil {
23609		objectMap["name"] = or.Name
23610	}
23611	if or.ID != nil {
23612		objectMap["id"] = or.ID
23613	}
23614	return json.Marshal(objectMap)
23615}
23616
23617// UnmarshalJSON is the custom unmarshaler for OutboundRule struct.
23618func (or *OutboundRule) UnmarshalJSON(body []byte) error {
23619	var m map[string]*json.RawMessage
23620	err := json.Unmarshal(body, &m)
23621	if err != nil {
23622		return err
23623	}
23624	for k, v := range m {
23625		switch k {
23626		case "properties":
23627			if v != nil {
23628				var outboundRulePropertiesFormat OutboundRulePropertiesFormat
23629				err = json.Unmarshal(*v, &outboundRulePropertiesFormat)
23630				if err != nil {
23631					return err
23632				}
23633				or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat
23634			}
23635		case "name":
23636			if v != nil {
23637				var name string
23638				err = json.Unmarshal(*v, &name)
23639				if err != nil {
23640					return err
23641				}
23642				or.Name = &name
23643			}
23644		case "etag":
23645			if v != nil {
23646				var etag string
23647				err = json.Unmarshal(*v, &etag)
23648				if err != nil {
23649					return err
23650				}
23651				or.Etag = &etag
23652			}
23653		case "type":
23654			if v != nil {
23655				var typeVar string
23656				err = json.Unmarshal(*v, &typeVar)
23657				if err != nil {
23658					return err
23659				}
23660				or.Type = &typeVar
23661			}
23662		case "id":
23663			if v != nil {
23664				var ID string
23665				err = json.Unmarshal(*v, &ID)
23666				if err != nil {
23667					return err
23668				}
23669				or.ID = &ID
23670			}
23671		}
23672	}
23673
23674	return nil
23675}
23676
23677// OutboundRulePropertiesFormat outbound rule of the load balancer.
23678type OutboundRulePropertiesFormat struct {
23679	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
23680	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
23681	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
23682	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
23683	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
23684	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
23685	// ProvisioningState - READ-ONLY; The provisioning state of the outbound rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
23686	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
23687	// Protocol - The protocol for the outbound rule in load balancer. Possible values include: 'LoadBalancerOutboundRuleProtocolTCP', 'LoadBalancerOutboundRuleProtocolUDP', 'LoadBalancerOutboundRuleProtocolAll'
23688	Protocol LoadBalancerOutboundRuleProtocol `json:"protocol,omitempty"`
23689	// 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.
23690	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
23691	// IdleTimeoutInMinutes - The timeout for the TCP idle connection.
23692	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
23693}
23694
23695// MarshalJSON is the custom marshaler for OutboundRulePropertiesFormat.
23696func (orpf OutboundRulePropertiesFormat) MarshalJSON() ([]byte, error) {
23697	objectMap := make(map[string]interface{})
23698	if orpf.AllocatedOutboundPorts != nil {
23699		objectMap["allocatedOutboundPorts"] = orpf.AllocatedOutboundPorts
23700	}
23701	if orpf.FrontendIPConfigurations != nil {
23702		objectMap["frontendIPConfigurations"] = orpf.FrontendIPConfigurations
23703	}
23704	if orpf.BackendAddressPool != nil {
23705		objectMap["backendAddressPool"] = orpf.BackendAddressPool
23706	}
23707	if orpf.Protocol != "" {
23708		objectMap["protocol"] = orpf.Protocol
23709	}
23710	if orpf.EnableTCPReset != nil {
23711		objectMap["enableTcpReset"] = orpf.EnableTCPReset
23712	}
23713	if orpf.IdleTimeoutInMinutes != nil {
23714		objectMap["idleTimeoutInMinutes"] = orpf.IdleTimeoutInMinutes
23715	}
23716	return json.Marshal(objectMap)
23717}
23718
23719// OwaspCrsExclusionEntry allow to exclude some variable satisfy the condition for the WAF check.
23720type OwaspCrsExclusionEntry struct {
23721	// MatchVariable - The variable to be excluded. Possible values include: 'RequestHeaderNames', 'RequestCookieNames', 'RequestArgNames'
23722	MatchVariable OwaspCrsExclusionEntryMatchVariable `json:"matchVariable,omitempty"`
23723	// 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'
23724	SelectorMatchOperator OwaspCrsExclusionEntrySelectorMatchOperator `json:"selectorMatchOperator,omitempty"`
23725	// Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
23726	Selector *string `json:"selector,omitempty"`
23727}
23728
23729// P2SConnectionConfiguration p2SConnectionConfiguration Resource.
23730type P2SConnectionConfiguration struct {
23731	// P2SConnectionConfigurationProperties - Properties of the P2S connection configuration.
23732	*P2SConnectionConfigurationProperties `json:"properties,omitempty"`
23733	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
23734	Name *string `json:"name,omitempty"`
23735	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
23736	Etag *string `json:"etag,omitempty"`
23737	// ID - Resource ID.
23738	ID *string `json:"id,omitempty"`
23739}
23740
23741// MarshalJSON is the custom marshaler for P2SConnectionConfiguration.
23742func (pcc P2SConnectionConfiguration) MarshalJSON() ([]byte, error) {
23743	objectMap := make(map[string]interface{})
23744	if pcc.P2SConnectionConfigurationProperties != nil {
23745		objectMap["properties"] = pcc.P2SConnectionConfigurationProperties
23746	}
23747	if pcc.Name != nil {
23748		objectMap["name"] = pcc.Name
23749	}
23750	if pcc.ID != nil {
23751		objectMap["id"] = pcc.ID
23752	}
23753	return json.Marshal(objectMap)
23754}
23755
23756// UnmarshalJSON is the custom unmarshaler for P2SConnectionConfiguration struct.
23757func (pcc *P2SConnectionConfiguration) UnmarshalJSON(body []byte) error {
23758	var m map[string]*json.RawMessage
23759	err := json.Unmarshal(body, &m)
23760	if err != nil {
23761		return err
23762	}
23763	for k, v := range m {
23764		switch k {
23765		case "properties":
23766			if v != nil {
23767				var p2SConnectionConfigurationProperties P2SConnectionConfigurationProperties
23768				err = json.Unmarshal(*v, &p2SConnectionConfigurationProperties)
23769				if err != nil {
23770					return err
23771				}
23772				pcc.P2SConnectionConfigurationProperties = &p2SConnectionConfigurationProperties
23773			}
23774		case "name":
23775			if v != nil {
23776				var name string
23777				err = json.Unmarshal(*v, &name)
23778				if err != nil {
23779					return err
23780				}
23781				pcc.Name = &name
23782			}
23783		case "etag":
23784			if v != nil {
23785				var etag string
23786				err = json.Unmarshal(*v, &etag)
23787				if err != nil {
23788					return err
23789				}
23790				pcc.Etag = &etag
23791			}
23792		case "id":
23793			if v != nil {
23794				var ID string
23795				err = json.Unmarshal(*v, &ID)
23796				if err != nil {
23797					return err
23798				}
23799				pcc.ID = &ID
23800			}
23801		}
23802	}
23803
23804	return nil
23805}
23806
23807// P2SConnectionConfigurationProperties parameters for P2SConnectionConfiguration.
23808type P2SConnectionConfigurationProperties struct {
23809	// VpnClientAddressPool - The reference to the address space resource which represents Address space for P2S VpnClient.
23810	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
23811	// RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection.
23812	RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"`
23813	// ProvisioningState - READ-ONLY; The provisioning state of the P2SConnectionConfiguration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
23814	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
23815}
23816
23817// MarshalJSON is the custom marshaler for P2SConnectionConfigurationProperties.
23818func (pccp P2SConnectionConfigurationProperties) MarshalJSON() ([]byte, error) {
23819	objectMap := make(map[string]interface{})
23820	if pccp.VpnClientAddressPool != nil {
23821		objectMap["vpnClientAddressPool"] = pccp.VpnClientAddressPool
23822	}
23823	if pccp.RoutingConfiguration != nil {
23824		objectMap["routingConfiguration"] = pccp.RoutingConfiguration
23825	}
23826	return json.Marshal(objectMap)
23827}
23828
23829// P2SVpnConnectionHealth p2S Vpn connection detailed health written to sas url.
23830type P2SVpnConnectionHealth struct {
23831	autorest.Response `json:"-"`
23832	// SasURL - Returned sas url of the blob to which the p2s vpn connection detailed health will be written.
23833	SasURL *string `json:"sasUrl,omitempty"`
23834}
23835
23836// P2SVpnConnectionHealthRequest list of P2S Vpn connection health request.
23837type P2SVpnConnectionHealthRequest struct {
23838	// VpnUserNamesFilter - The list of p2s vpn user names whose p2s vpn connection detailed health to retrieve for.
23839	VpnUserNamesFilter *[]string `json:"vpnUserNamesFilter,omitempty"`
23840	// OutputBlobSasURL - The sas-url to download the P2S Vpn connection health detail.
23841	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
23842}
23843
23844// P2SVpnConnectionRequest list of p2s vpn connections to be disconnected.
23845type P2SVpnConnectionRequest struct {
23846	// VpnConnectionIds - List of p2s vpn connection Ids.
23847	VpnConnectionIds *[]string `json:"vpnConnectionIds,omitempty"`
23848}
23849
23850// P2SVpnGateway p2SVpnGateway Resource.
23851type P2SVpnGateway struct {
23852	autorest.Response `json:"-"`
23853	// P2SVpnGatewayProperties - Properties of the P2SVpnGateway.
23854	*P2SVpnGatewayProperties `json:"properties,omitempty"`
23855	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
23856	Etag *string `json:"etag,omitempty"`
23857	// ID - Resource ID.
23858	ID *string `json:"id,omitempty"`
23859	// Name - READ-ONLY; Resource name.
23860	Name *string `json:"name,omitempty"`
23861	// Type - READ-ONLY; Resource type.
23862	Type *string `json:"type,omitempty"`
23863	// Location - Resource location.
23864	Location *string `json:"location,omitempty"`
23865	// Tags - Resource tags.
23866	Tags map[string]*string `json:"tags"`
23867}
23868
23869// MarshalJSON is the custom marshaler for P2SVpnGateway.
23870func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) {
23871	objectMap := make(map[string]interface{})
23872	if pvg.P2SVpnGatewayProperties != nil {
23873		objectMap["properties"] = pvg.P2SVpnGatewayProperties
23874	}
23875	if pvg.ID != nil {
23876		objectMap["id"] = pvg.ID
23877	}
23878	if pvg.Location != nil {
23879		objectMap["location"] = pvg.Location
23880	}
23881	if pvg.Tags != nil {
23882		objectMap["tags"] = pvg.Tags
23883	}
23884	return json.Marshal(objectMap)
23885}
23886
23887// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct.
23888func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error {
23889	var m map[string]*json.RawMessage
23890	err := json.Unmarshal(body, &m)
23891	if err != nil {
23892		return err
23893	}
23894	for k, v := range m {
23895		switch k {
23896		case "properties":
23897			if v != nil {
23898				var p2SVpnGatewayProperties P2SVpnGatewayProperties
23899				err = json.Unmarshal(*v, &p2SVpnGatewayProperties)
23900				if err != nil {
23901					return err
23902				}
23903				pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties
23904			}
23905		case "etag":
23906			if v != nil {
23907				var etag string
23908				err = json.Unmarshal(*v, &etag)
23909				if err != nil {
23910					return err
23911				}
23912				pvg.Etag = &etag
23913			}
23914		case "id":
23915			if v != nil {
23916				var ID string
23917				err = json.Unmarshal(*v, &ID)
23918				if err != nil {
23919					return err
23920				}
23921				pvg.ID = &ID
23922			}
23923		case "name":
23924			if v != nil {
23925				var name string
23926				err = json.Unmarshal(*v, &name)
23927				if err != nil {
23928					return err
23929				}
23930				pvg.Name = &name
23931			}
23932		case "type":
23933			if v != nil {
23934				var typeVar string
23935				err = json.Unmarshal(*v, &typeVar)
23936				if err != nil {
23937					return err
23938				}
23939				pvg.Type = &typeVar
23940			}
23941		case "location":
23942			if v != nil {
23943				var location string
23944				err = json.Unmarshal(*v, &location)
23945				if err != nil {
23946					return err
23947				}
23948				pvg.Location = &location
23949			}
23950		case "tags":
23951			if v != nil {
23952				var tags map[string]*string
23953				err = json.Unmarshal(*v, &tags)
23954				if err != nil {
23955					return err
23956				}
23957				pvg.Tags = tags
23958			}
23959		}
23960	}
23961
23962	return nil
23963}
23964
23965// P2SVpnGatewayProperties parameters for P2SVpnGateway.
23966type P2SVpnGatewayProperties struct {
23967	// VirtualHub - The VirtualHub to which the gateway belongs.
23968	VirtualHub *SubResource `json:"virtualHub,omitempty"`
23969	// P2SConnectionConfigurations - List of all p2s connection configurations of the gateway.
23970	P2SConnectionConfigurations *[]P2SConnectionConfiguration `json:"p2SConnectionConfigurations,omitempty"`
23971	// ProvisioningState - READ-ONLY; The provisioning state of the P2S VPN gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
23972	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
23973	// VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway.
23974	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
23975	// VpnServerConfiguration - The VpnServerConfiguration to which the p2sVpnGateway is attached to.
23976	VpnServerConfiguration *SubResource `json:"vpnServerConfiguration,omitempty"`
23977	// VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status.
23978	VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"`
23979	// CustomDNSServers - List of all customer specified DNS servers IP addresses.
23980	CustomDNSServers *[]string `json:"customDnsServers,omitempty"`
23981}
23982
23983// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties.
23984func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) {
23985	objectMap := make(map[string]interface{})
23986	if pvgp.VirtualHub != nil {
23987		objectMap["virtualHub"] = pvgp.VirtualHub
23988	}
23989	if pvgp.P2SConnectionConfigurations != nil {
23990		objectMap["p2SConnectionConfigurations"] = pvgp.P2SConnectionConfigurations
23991	}
23992	if pvgp.VpnGatewayScaleUnit != nil {
23993		objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit
23994	}
23995	if pvgp.VpnServerConfiguration != nil {
23996		objectMap["vpnServerConfiguration"] = pvgp.VpnServerConfiguration
23997	}
23998	if pvgp.CustomDNSServers != nil {
23999		objectMap["customDnsServers"] = pvgp.CustomDNSServers
24000	}
24001	return json.Marshal(objectMap)
24002}
24003
24004// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
24005// long-running operation.
24006type P2sVpnGatewaysCreateOrUpdateFuture struct {
24007	azure.FutureAPI
24008	// Result returns the result of the asynchronous operation.
24009	// If the operation has not completed it will return an error.
24010	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
24011}
24012
24013// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
24014// operation.
24015type P2sVpnGatewaysDeleteFuture struct {
24016	azure.FutureAPI
24017	// Result returns the result of the asynchronous operation.
24018	// If the operation has not completed it will return an error.
24019	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
24020}
24021
24022// P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture an abstraction for monitoring and retrieving the results
24023// of a long-running operation.
24024type P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture struct {
24025	azure.FutureAPI
24026	// Result returns the result of the asynchronous operation.
24027	// If the operation has not completed it will return an error.
24028	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
24029}
24030
24031// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
24032// long-running operation.
24033type P2sVpnGatewaysGenerateVpnProfileFuture struct {
24034	azure.FutureAPI
24035	// Result returns the result of the asynchronous operation.
24036	// If the operation has not completed it will return an error.
24037	Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error)
24038}
24039
24040// P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture an abstraction for monitoring and retrieving the
24041// results of a long-running operation.
24042type P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture struct {
24043	azure.FutureAPI
24044	// Result returns the result of the asynchronous operation.
24045	// If the operation has not completed it will return an error.
24046	Result func(P2sVpnGatewaysClient) (P2SVpnConnectionHealth, error)
24047}
24048
24049// P2sVpnGatewaysGetP2sVpnConnectionHealthFuture an abstraction for monitoring and retrieving the results
24050// of a long-running operation.
24051type P2sVpnGatewaysGetP2sVpnConnectionHealthFuture struct {
24052	azure.FutureAPI
24053	// Result returns the result of the asynchronous operation.
24054	// If the operation has not completed it will return an error.
24055	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
24056}
24057
24058// P2SVpnProfileParameters vpn Client Parameters for package generation.
24059type P2SVpnProfileParameters struct {
24060	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
24061	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
24062}
24063
24064// PacketCapture parameters that define the create packet capture operation.
24065type PacketCapture struct {
24066	// PacketCaptureParameters - Properties of the packet capture.
24067	*PacketCaptureParameters `json:"properties,omitempty"`
24068}
24069
24070// MarshalJSON is the custom marshaler for PacketCapture.
24071func (pc PacketCapture) MarshalJSON() ([]byte, error) {
24072	objectMap := make(map[string]interface{})
24073	if pc.PacketCaptureParameters != nil {
24074		objectMap["properties"] = pc.PacketCaptureParameters
24075	}
24076	return json.Marshal(objectMap)
24077}
24078
24079// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
24080func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
24081	var m map[string]*json.RawMessage
24082	err := json.Unmarshal(body, &m)
24083	if err != nil {
24084		return err
24085	}
24086	for k, v := range m {
24087		switch k {
24088		case "properties":
24089			if v != nil {
24090				var packetCaptureParameters PacketCaptureParameters
24091				err = json.Unmarshal(*v, &packetCaptureParameters)
24092				if err != nil {
24093					return err
24094				}
24095				pc.PacketCaptureParameters = &packetCaptureParameters
24096			}
24097		}
24098	}
24099
24100	return nil
24101}
24102
24103// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
24104type PacketCaptureFilter struct {
24105	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
24106	Protocol PcProtocol `json:"protocol,omitempty"`
24107	// 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.
24108	LocalIPAddress *string `json:"localIPAddress,omitempty"`
24109	// 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.
24110	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
24111	// 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.
24112	LocalPort *string `json:"localPort,omitempty"`
24113	// 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.
24114	RemotePort *string `json:"remotePort,omitempty"`
24115}
24116
24117// PacketCaptureListResult list of packet capture sessions.
24118type PacketCaptureListResult struct {
24119	autorest.Response `json:"-"`
24120	// Value - Information about packet capture sessions.
24121	Value *[]PacketCaptureResult `json:"value,omitempty"`
24122}
24123
24124// PacketCaptureParameters parameters that define the create packet capture operation.
24125type PacketCaptureParameters struct {
24126	// Target - The ID of the targeted resource, only VM is currently supported.
24127	Target *string `json:"target,omitempty"`
24128	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
24129	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
24130	// TotalBytesPerSession - Maximum size of the capture output.
24131	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
24132	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
24133	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
24134	// StorageLocation - The storage location for a packet capture session.
24135	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
24136	// Filters - A list of packet capture filters.
24137	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
24138}
24139
24140// PacketCaptureQueryStatusResult status of packet capture session.
24141type PacketCaptureQueryStatusResult struct {
24142	autorest.Response `json:"-"`
24143	// Name - The name of the packet capture resource.
24144	Name *string `json:"name,omitempty"`
24145	// ID - The ID of the packet capture resource.
24146	ID *string `json:"id,omitempty"`
24147	// CaptureStartTime - The start time of the packet capture session.
24148	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
24149	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
24150	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
24151	// StopReason - The reason the current packet capture session was stopped.
24152	StopReason *string `json:"stopReason,omitempty"`
24153	// PacketCaptureError - List of errors of packet capture session.
24154	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
24155}
24156
24157// PacketCaptureResult information about packet capture session.
24158type PacketCaptureResult struct {
24159	autorest.Response `json:"-"`
24160	// Name - READ-ONLY; Name of the packet capture session.
24161	Name *string `json:"name,omitempty"`
24162	// ID - READ-ONLY; ID of the packet capture operation.
24163	ID *string `json:"id,omitempty"`
24164	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24165	Etag *string `json:"etag,omitempty"`
24166	// PacketCaptureResultProperties - Properties of the packet capture result.
24167	*PacketCaptureResultProperties `json:"properties,omitempty"`
24168}
24169
24170// MarshalJSON is the custom marshaler for PacketCaptureResult.
24171func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
24172	objectMap := make(map[string]interface{})
24173	if pcr.PacketCaptureResultProperties != nil {
24174		objectMap["properties"] = pcr.PacketCaptureResultProperties
24175	}
24176	return json.Marshal(objectMap)
24177}
24178
24179// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
24180func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
24181	var m map[string]*json.RawMessage
24182	err := json.Unmarshal(body, &m)
24183	if err != nil {
24184		return err
24185	}
24186	for k, v := range m {
24187		switch k {
24188		case "name":
24189			if v != nil {
24190				var name string
24191				err = json.Unmarshal(*v, &name)
24192				if err != nil {
24193					return err
24194				}
24195				pcr.Name = &name
24196			}
24197		case "id":
24198			if v != nil {
24199				var ID string
24200				err = json.Unmarshal(*v, &ID)
24201				if err != nil {
24202					return err
24203				}
24204				pcr.ID = &ID
24205			}
24206		case "etag":
24207			if v != nil {
24208				var etag string
24209				err = json.Unmarshal(*v, &etag)
24210				if err != nil {
24211					return err
24212				}
24213				pcr.Etag = &etag
24214			}
24215		case "properties":
24216			if v != nil {
24217				var packetCaptureResultProperties PacketCaptureResultProperties
24218				err = json.Unmarshal(*v, &packetCaptureResultProperties)
24219				if err != nil {
24220					return err
24221				}
24222				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
24223			}
24224		}
24225	}
24226
24227	return nil
24228}
24229
24230// PacketCaptureResultProperties the properties of a packet capture session.
24231type PacketCaptureResultProperties struct {
24232	// ProvisioningState - READ-ONLY; The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24233	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24234	// Target - The ID of the targeted resource, only VM is currently supported.
24235	Target *string `json:"target,omitempty"`
24236	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
24237	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
24238	// TotalBytesPerSession - Maximum size of the capture output.
24239	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
24240	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
24241	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
24242	// StorageLocation - The storage location for a packet capture session.
24243	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
24244	// Filters - A list of packet capture filters.
24245	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
24246}
24247
24248// MarshalJSON is the custom marshaler for PacketCaptureResultProperties.
24249func (pcrp PacketCaptureResultProperties) MarshalJSON() ([]byte, error) {
24250	objectMap := make(map[string]interface{})
24251	if pcrp.Target != nil {
24252		objectMap["target"] = pcrp.Target
24253	}
24254	if pcrp.BytesToCapturePerPacket != nil {
24255		objectMap["bytesToCapturePerPacket"] = pcrp.BytesToCapturePerPacket
24256	}
24257	if pcrp.TotalBytesPerSession != nil {
24258		objectMap["totalBytesPerSession"] = pcrp.TotalBytesPerSession
24259	}
24260	if pcrp.TimeLimitInSeconds != nil {
24261		objectMap["timeLimitInSeconds"] = pcrp.TimeLimitInSeconds
24262	}
24263	if pcrp.StorageLocation != nil {
24264		objectMap["storageLocation"] = pcrp.StorageLocation
24265	}
24266	if pcrp.Filters != nil {
24267		objectMap["filters"] = pcrp.Filters
24268	}
24269	return json.Marshal(objectMap)
24270}
24271
24272// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
24273// operation.
24274type PacketCapturesCreateFuture struct {
24275	azure.FutureAPI
24276	// Result returns the result of the asynchronous operation.
24277	// If the operation has not completed it will return an error.
24278	Result func(PacketCapturesClient) (PacketCaptureResult, error)
24279}
24280
24281// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
24282// operation.
24283type PacketCapturesDeleteFuture struct {
24284	azure.FutureAPI
24285	// Result returns the result of the asynchronous operation.
24286	// If the operation has not completed it will return an error.
24287	Result func(PacketCapturesClient) (autorest.Response, error)
24288}
24289
24290// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
24291// operation.
24292type PacketCapturesGetStatusFuture struct {
24293	azure.FutureAPI
24294	// Result returns the result of the asynchronous operation.
24295	// If the operation has not completed it will return an error.
24296	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
24297}
24298
24299// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
24300// operation.
24301type PacketCapturesStopFuture struct {
24302	azure.FutureAPI
24303	// Result returns the result of the asynchronous operation.
24304	// If the operation has not completed it will return an error.
24305	Result func(PacketCapturesClient) (autorest.Response, error)
24306}
24307
24308// PacketCaptureStorageLocation the storage location for a packet capture session.
24309type PacketCaptureStorageLocation struct {
24310	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
24311	StorageID *string `json:"storageId,omitempty"`
24312	// 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.
24313	StoragePath *string `json:"storagePath,omitempty"`
24314	// 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.
24315	FilePath *string `json:"filePath,omitempty"`
24316}
24317
24318// PatchRouteFilter route Filter Resource.
24319type PatchRouteFilter struct {
24320	// RouteFilterPropertiesFormat - Properties of the route filter.
24321	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
24322	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
24323	Name *string `json:"name,omitempty"`
24324	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24325	Etag *string `json:"etag,omitempty"`
24326	// Type - READ-ONLY; Resource type.
24327	Type *string `json:"type,omitempty"`
24328	// Tags - Resource tags.
24329	Tags map[string]*string `json:"tags"`
24330	// ID - Resource ID.
24331	ID *string `json:"id,omitempty"`
24332}
24333
24334// MarshalJSON is the custom marshaler for PatchRouteFilter.
24335func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
24336	objectMap := make(map[string]interface{})
24337	if prf.RouteFilterPropertiesFormat != nil {
24338		objectMap["properties"] = prf.RouteFilterPropertiesFormat
24339	}
24340	if prf.Tags != nil {
24341		objectMap["tags"] = prf.Tags
24342	}
24343	if prf.ID != nil {
24344		objectMap["id"] = prf.ID
24345	}
24346	return json.Marshal(objectMap)
24347}
24348
24349// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
24350func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
24351	var m map[string]*json.RawMessage
24352	err := json.Unmarshal(body, &m)
24353	if err != nil {
24354		return err
24355	}
24356	for k, v := range m {
24357		switch k {
24358		case "properties":
24359			if v != nil {
24360				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
24361				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
24362				if err != nil {
24363					return err
24364				}
24365				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
24366			}
24367		case "name":
24368			if v != nil {
24369				var name string
24370				err = json.Unmarshal(*v, &name)
24371				if err != nil {
24372					return err
24373				}
24374				prf.Name = &name
24375			}
24376		case "etag":
24377			if v != nil {
24378				var etag string
24379				err = json.Unmarshal(*v, &etag)
24380				if err != nil {
24381					return err
24382				}
24383				prf.Etag = &etag
24384			}
24385		case "type":
24386			if v != nil {
24387				var typeVar string
24388				err = json.Unmarshal(*v, &typeVar)
24389				if err != nil {
24390					return err
24391				}
24392				prf.Type = &typeVar
24393			}
24394		case "tags":
24395			if v != nil {
24396				var tags map[string]*string
24397				err = json.Unmarshal(*v, &tags)
24398				if err != nil {
24399					return err
24400				}
24401				prf.Tags = tags
24402			}
24403		case "id":
24404			if v != nil {
24405				var ID string
24406				err = json.Unmarshal(*v, &ID)
24407				if err != nil {
24408					return err
24409				}
24410				prf.ID = &ID
24411			}
24412		}
24413	}
24414
24415	return nil
24416}
24417
24418// PatchRouteFilterRule route Filter Rule Resource.
24419type PatchRouteFilterRule struct {
24420	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
24421	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
24422	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
24423	Name *string `json:"name,omitempty"`
24424	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24425	Etag *string `json:"etag,omitempty"`
24426	// ID - Resource ID.
24427	ID *string `json:"id,omitempty"`
24428}
24429
24430// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
24431func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
24432	objectMap := make(map[string]interface{})
24433	if prfr.RouteFilterRulePropertiesFormat != nil {
24434		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
24435	}
24436	if prfr.ID != nil {
24437		objectMap["id"] = prfr.ID
24438	}
24439	return json.Marshal(objectMap)
24440}
24441
24442// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
24443func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
24444	var m map[string]*json.RawMessage
24445	err := json.Unmarshal(body, &m)
24446	if err != nil {
24447		return err
24448	}
24449	for k, v := range m {
24450		switch k {
24451		case "properties":
24452			if v != nil {
24453				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
24454				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
24455				if err != nil {
24456					return err
24457				}
24458				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
24459			}
24460		case "name":
24461			if v != nil {
24462				var name string
24463				err = json.Unmarshal(*v, &name)
24464				if err != nil {
24465					return err
24466				}
24467				prfr.Name = &name
24468			}
24469		case "etag":
24470			if v != nil {
24471				var etag string
24472				err = json.Unmarshal(*v, &etag)
24473				if err != nil {
24474					return err
24475				}
24476				prfr.Etag = &etag
24477			}
24478		case "id":
24479			if v != nil {
24480				var ID string
24481				err = json.Unmarshal(*v, &ID)
24482				if err != nil {
24483					return err
24484				}
24485				prfr.ID = &ID
24486			}
24487		}
24488	}
24489
24490	return nil
24491}
24492
24493// PeerExpressRouteCircuitConnection peer Express Route Circuit Connection in an ExpressRouteCircuitPeering
24494// resource.
24495type PeerExpressRouteCircuitConnection struct {
24496	autorest.Response `json:"-"`
24497	// PeerExpressRouteCircuitConnectionPropertiesFormat - Properties of the peer express route circuit connection.
24498	*PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
24499	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
24500	Name *string `json:"name,omitempty"`
24501	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24502	Etag *string `json:"etag,omitempty"`
24503	// Type - READ-ONLY; Type of the resource.
24504	Type *string `json:"type,omitempty"`
24505	// ID - Resource ID.
24506	ID *string `json:"id,omitempty"`
24507}
24508
24509// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnection.
24510func (percc PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
24511	objectMap := make(map[string]interface{})
24512	if percc.PeerExpressRouteCircuitConnectionPropertiesFormat != nil {
24513		objectMap["properties"] = percc.PeerExpressRouteCircuitConnectionPropertiesFormat
24514	}
24515	if percc.Name != nil {
24516		objectMap["name"] = percc.Name
24517	}
24518	if percc.ID != nil {
24519		objectMap["id"] = percc.ID
24520	}
24521	return json.Marshal(objectMap)
24522}
24523
24524// UnmarshalJSON is the custom unmarshaler for PeerExpressRouteCircuitConnection struct.
24525func (percc *PeerExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
24526	var m map[string]*json.RawMessage
24527	err := json.Unmarshal(body, &m)
24528	if err != nil {
24529		return err
24530	}
24531	for k, v := range m {
24532		switch k {
24533		case "properties":
24534			if v != nil {
24535				var peerExpressRouteCircuitConnectionPropertiesFormat PeerExpressRouteCircuitConnectionPropertiesFormat
24536				err = json.Unmarshal(*v, &peerExpressRouteCircuitConnectionPropertiesFormat)
24537				if err != nil {
24538					return err
24539				}
24540				percc.PeerExpressRouteCircuitConnectionPropertiesFormat = &peerExpressRouteCircuitConnectionPropertiesFormat
24541			}
24542		case "name":
24543			if v != nil {
24544				var name string
24545				err = json.Unmarshal(*v, &name)
24546				if err != nil {
24547					return err
24548				}
24549				percc.Name = &name
24550			}
24551		case "etag":
24552			if v != nil {
24553				var etag string
24554				err = json.Unmarshal(*v, &etag)
24555				if err != nil {
24556					return err
24557				}
24558				percc.Etag = &etag
24559			}
24560		case "type":
24561			if v != nil {
24562				var typeVar string
24563				err = json.Unmarshal(*v, &typeVar)
24564				if err != nil {
24565					return err
24566				}
24567				percc.Type = &typeVar
24568			}
24569		case "id":
24570			if v != nil {
24571				var ID string
24572				err = json.Unmarshal(*v, &ID)
24573				if err != nil {
24574					return err
24575				}
24576				percc.ID = &ID
24577			}
24578		}
24579	}
24580
24581	return nil
24582}
24583
24584// PeerExpressRouteCircuitConnectionListResult response for ListPeeredConnections API service call
24585// retrieves all global reach peer circuit connections that belongs to a Private Peering for an
24586// ExpressRouteCircuit.
24587type PeerExpressRouteCircuitConnectionListResult struct {
24588	autorest.Response `json:"-"`
24589	// Value - The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit.
24590	Value *[]PeerExpressRouteCircuitConnection `json:"value,omitempty"`
24591	// NextLink - The URL to get the next set of results.
24592	NextLink *string `json:"nextLink,omitempty"`
24593}
24594
24595// PeerExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
24596// PeerExpressRouteCircuitConnection values.
24597type PeerExpressRouteCircuitConnectionListResultIterator struct {
24598	i    int
24599	page PeerExpressRouteCircuitConnectionListResultPage
24600}
24601
24602// NextWithContext advances to the next value.  If there was an error making
24603// the request the iterator does not advance and the error is returned.
24604func (iter *PeerExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
24605	if tracing.IsEnabled() {
24606		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultIterator.NextWithContext")
24607		defer func() {
24608			sc := -1
24609			if iter.Response().Response.Response != nil {
24610				sc = iter.Response().Response.Response.StatusCode
24611			}
24612			tracing.EndSpan(ctx, sc, err)
24613		}()
24614	}
24615	iter.i++
24616	if iter.i < len(iter.page.Values()) {
24617		return nil
24618	}
24619	err = iter.page.NextWithContext(ctx)
24620	if err != nil {
24621		iter.i--
24622		return err
24623	}
24624	iter.i = 0
24625	return nil
24626}
24627
24628// Next advances to the next value.  If there was an error making
24629// the request the iterator does not advance and the error is returned.
24630// Deprecated: Use NextWithContext() instead.
24631func (iter *PeerExpressRouteCircuitConnectionListResultIterator) Next() error {
24632	return iter.NextWithContext(context.Background())
24633}
24634
24635// NotDone returns true if the enumeration should be started or is not yet complete.
24636func (iter PeerExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
24637	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24638}
24639
24640// Response returns the raw server response from the last page request.
24641func (iter PeerExpressRouteCircuitConnectionListResultIterator) Response() PeerExpressRouteCircuitConnectionListResult {
24642	return iter.page.Response()
24643}
24644
24645// Value returns the current value or a zero-initialized value if the
24646// iterator has advanced beyond the end of the collection.
24647func (iter PeerExpressRouteCircuitConnectionListResultIterator) Value() PeerExpressRouteCircuitConnection {
24648	if !iter.page.NotDone() {
24649		return PeerExpressRouteCircuitConnection{}
24650	}
24651	return iter.page.Values()[iter.i]
24652}
24653
24654// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultIterator type.
24655func NewPeerExpressRouteCircuitConnectionListResultIterator(page PeerExpressRouteCircuitConnectionListResultPage) PeerExpressRouteCircuitConnectionListResultIterator {
24656	return PeerExpressRouteCircuitConnectionListResultIterator{page: page}
24657}
24658
24659// IsEmpty returns true if the ListResult contains no values.
24660func (percclr PeerExpressRouteCircuitConnectionListResult) IsEmpty() bool {
24661	return percclr.Value == nil || len(*percclr.Value) == 0
24662}
24663
24664// hasNextLink returns true if the NextLink is not empty.
24665func (percclr PeerExpressRouteCircuitConnectionListResult) hasNextLink() bool {
24666	return percclr.NextLink != nil && len(*percclr.NextLink) != 0
24667}
24668
24669// peerExpressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
24670// It returns nil if no more results exist.
24671func (percclr PeerExpressRouteCircuitConnectionListResult) peerExpressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
24672	if !percclr.hasNextLink() {
24673		return nil, nil
24674	}
24675	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24676		autorest.AsJSON(),
24677		autorest.AsGet(),
24678		autorest.WithBaseURL(to.String(percclr.NextLink)))
24679}
24680
24681// PeerExpressRouteCircuitConnectionListResultPage contains a page of PeerExpressRouteCircuitConnection
24682// values.
24683type PeerExpressRouteCircuitConnectionListResultPage struct {
24684	fn      func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)
24685	percclr PeerExpressRouteCircuitConnectionListResult
24686}
24687
24688// NextWithContext advances to the next page of values.  If there was an error making
24689// the request the page does not advance and the error is returned.
24690func (page *PeerExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
24691	if tracing.IsEnabled() {
24692		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultPage.NextWithContext")
24693		defer func() {
24694			sc := -1
24695			if page.Response().Response.Response != nil {
24696				sc = page.Response().Response.Response.StatusCode
24697			}
24698			tracing.EndSpan(ctx, sc, err)
24699		}()
24700	}
24701	for {
24702		next, err := page.fn(ctx, page.percclr)
24703		if err != nil {
24704			return err
24705		}
24706		page.percclr = next
24707		if !next.hasNextLink() || !next.IsEmpty() {
24708			break
24709		}
24710	}
24711	return nil
24712}
24713
24714// Next advances to the next page of values.  If there was an error making
24715// the request the page does not advance and the error is returned.
24716// Deprecated: Use NextWithContext() instead.
24717func (page *PeerExpressRouteCircuitConnectionListResultPage) Next() error {
24718	return page.NextWithContext(context.Background())
24719}
24720
24721// NotDone returns true if the page enumeration should be started or is not yet complete.
24722func (page PeerExpressRouteCircuitConnectionListResultPage) NotDone() bool {
24723	return !page.percclr.IsEmpty()
24724}
24725
24726// Response returns the raw server response from the last page request.
24727func (page PeerExpressRouteCircuitConnectionListResultPage) Response() PeerExpressRouteCircuitConnectionListResult {
24728	return page.percclr
24729}
24730
24731// Values returns the slice of values for the current page or nil if there are no values.
24732func (page PeerExpressRouteCircuitConnectionListResultPage) Values() []PeerExpressRouteCircuitConnection {
24733	if page.percclr.IsEmpty() {
24734		return nil
24735	}
24736	return *page.percclr.Value
24737}
24738
24739// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultPage type.
24740func NewPeerExpressRouteCircuitConnectionListResultPage(cur PeerExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)) PeerExpressRouteCircuitConnectionListResultPage {
24741	return PeerExpressRouteCircuitConnectionListResultPage{
24742		fn:      getNextPage,
24743		percclr: cur,
24744	}
24745}
24746
24747// PeerExpressRouteCircuitConnectionPropertiesFormat properties of the peer express route circuit
24748// connection.
24749type PeerExpressRouteCircuitConnectionPropertiesFormat struct {
24750	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit.
24751	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
24752	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
24753	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
24754	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
24755	AddressPrefix *string `json:"addressPrefix,omitempty"`
24756	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
24757	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
24758	// ConnectionName - The name of the express route circuit connection resource.
24759	ConnectionName *string `json:"connectionName,omitempty"`
24760	// AuthResourceGUID - The resource guid of the authorization used for the express route circuit connection.
24761	AuthResourceGUID *string `json:"authResourceGuid,omitempty"`
24762	// ProvisioningState - READ-ONLY; The provisioning state of the peer express route circuit connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24763	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24764}
24765
24766// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnectionPropertiesFormat.
24767func (perccpf PeerExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
24768	objectMap := make(map[string]interface{})
24769	if perccpf.ExpressRouteCircuitPeering != nil {
24770		objectMap["expressRouteCircuitPeering"] = perccpf.ExpressRouteCircuitPeering
24771	}
24772	if perccpf.PeerExpressRouteCircuitPeering != nil {
24773		objectMap["peerExpressRouteCircuitPeering"] = perccpf.PeerExpressRouteCircuitPeering
24774	}
24775	if perccpf.AddressPrefix != nil {
24776		objectMap["addressPrefix"] = perccpf.AddressPrefix
24777	}
24778	if perccpf.CircuitConnectionStatus != "" {
24779		objectMap["circuitConnectionStatus"] = perccpf.CircuitConnectionStatus
24780	}
24781	if perccpf.ConnectionName != nil {
24782		objectMap["connectionName"] = perccpf.ConnectionName
24783	}
24784	if perccpf.AuthResourceGUID != nil {
24785		objectMap["authResourceGuid"] = perccpf.AuthResourceGUID
24786	}
24787	return json.Marshal(objectMap)
24788}
24789
24790// PolicySettings defines contents of a web application firewall global configuration.
24791type PolicySettings struct {
24792	// State - The state of the policy. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled'
24793	State WebApplicationFirewallEnabledState `json:"state,omitempty"`
24794	// Mode - The mode of the policy. Possible values include: 'WebApplicationFirewallModePrevention', 'WebApplicationFirewallModeDetection'
24795	Mode WebApplicationFirewallMode `json:"mode,omitempty"`
24796	// RequestBodyCheck - Whether to allow WAF to check request Body.
24797	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
24798	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
24799	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
24800	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
24801	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
24802}
24803
24804// PrepareNetworkPoliciesRequest details of PrepareNetworkPolicies for Subnet.
24805type PrepareNetworkPoliciesRequest struct {
24806	// ServiceName - The name of the service for which subnet is being prepared for.
24807	ServiceName *string `json:"serviceName,omitempty"`
24808	// NetworkIntentPolicyConfigurations - A list of NetworkIntentPolicyConfiguration.
24809	NetworkIntentPolicyConfigurations *[]IntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"`
24810}
24811
24812// PrivateDNSZoneConfig privateDnsZoneConfig resource.
24813type PrivateDNSZoneConfig struct {
24814	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
24815	Name *string `json:"name,omitempty"`
24816	// PrivateDNSZonePropertiesFormat - Properties of the private dns zone configuration.
24817	*PrivateDNSZonePropertiesFormat `json:"properties,omitempty"`
24818}
24819
24820// MarshalJSON is the custom marshaler for PrivateDNSZoneConfig.
24821func (pdzc PrivateDNSZoneConfig) MarshalJSON() ([]byte, error) {
24822	objectMap := make(map[string]interface{})
24823	if pdzc.Name != nil {
24824		objectMap["name"] = pdzc.Name
24825	}
24826	if pdzc.PrivateDNSZonePropertiesFormat != nil {
24827		objectMap["properties"] = pdzc.PrivateDNSZonePropertiesFormat
24828	}
24829	return json.Marshal(objectMap)
24830}
24831
24832// UnmarshalJSON is the custom unmarshaler for PrivateDNSZoneConfig struct.
24833func (pdzc *PrivateDNSZoneConfig) UnmarshalJSON(body []byte) error {
24834	var m map[string]*json.RawMessage
24835	err := json.Unmarshal(body, &m)
24836	if err != nil {
24837		return err
24838	}
24839	for k, v := range m {
24840		switch k {
24841		case "name":
24842			if v != nil {
24843				var name string
24844				err = json.Unmarshal(*v, &name)
24845				if err != nil {
24846					return err
24847				}
24848				pdzc.Name = &name
24849			}
24850		case "properties":
24851			if v != nil {
24852				var privateDNSZonePropertiesFormat PrivateDNSZonePropertiesFormat
24853				err = json.Unmarshal(*v, &privateDNSZonePropertiesFormat)
24854				if err != nil {
24855					return err
24856				}
24857				pdzc.PrivateDNSZonePropertiesFormat = &privateDNSZonePropertiesFormat
24858			}
24859		}
24860	}
24861
24862	return nil
24863}
24864
24865// PrivateDNSZoneGroup private dns zone group resource.
24866type PrivateDNSZoneGroup struct {
24867	autorest.Response `json:"-"`
24868	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
24869	Name *string `json:"name,omitempty"`
24870	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24871	Etag *string `json:"etag,omitempty"`
24872	// PrivateDNSZoneGroupPropertiesFormat - Properties of the private dns zone group.
24873	*PrivateDNSZoneGroupPropertiesFormat `json:"properties,omitempty"`
24874	// ID - Resource ID.
24875	ID *string `json:"id,omitempty"`
24876}
24877
24878// MarshalJSON is the custom marshaler for PrivateDNSZoneGroup.
24879func (pdzg PrivateDNSZoneGroup) MarshalJSON() ([]byte, error) {
24880	objectMap := make(map[string]interface{})
24881	if pdzg.Name != nil {
24882		objectMap["name"] = pdzg.Name
24883	}
24884	if pdzg.PrivateDNSZoneGroupPropertiesFormat != nil {
24885		objectMap["properties"] = pdzg.PrivateDNSZoneGroupPropertiesFormat
24886	}
24887	if pdzg.ID != nil {
24888		objectMap["id"] = pdzg.ID
24889	}
24890	return json.Marshal(objectMap)
24891}
24892
24893// UnmarshalJSON is the custom unmarshaler for PrivateDNSZoneGroup struct.
24894func (pdzg *PrivateDNSZoneGroup) UnmarshalJSON(body []byte) error {
24895	var m map[string]*json.RawMessage
24896	err := json.Unmarshal(body, &m)
24897	if err != nil {
24898		return err
24899	}
24900	for k, v := range m {
24901		switch k {
24902		case "name":
24903			if v != nil {
24904				var name string
24905				err = json.Unmarshal(*v, &name)
24906				if err != nil {
24907					return err
24908				}
24909				pdzg.Name = &name
24910			}
24911		case "etag":
24912			if v != nil {
24913				var etag string
24914				err = json.Unmarshal(*v, &etag)
24915				if err != nil {
24916					return err
24917				}
24918				pdzg.Etag = &etag
24919			}
24920		case "properties":
24921			if v != nil {
24922				var privateDNSZoneGroupPropertiesFormat PrivateDNSZoneGroupPropertiesFormat
24923				err = json.Unmarshal(*v, &privateDNSZoneGroupPropertiesFormat)
24924				if err != nil {
24925					return err
24926				}
24927				pdzg.PrivateDNSZoneGroupPropertiesFormat = &privateDNSZoneGroupPropertiesFormat
24928			}
24929		case "id":
24930			if v != nil {
24931				var ID string
24932				err = json.Unmarshal(*v, &ID)
24933				if err != nil {
24934					return err
24935				}
24936				pdzg.ID = &ID
24937			}
24938		}
24939	}
24940
24941	return nil
24942}
24943
24944// PrivateDNSZoneGroupListResult response for the ListPrivateDnsZoneGroups API service call.
24945type PrivateDNSZoneGroupListResult struct {
24946	autorest.Response `json:"-"`
24947	// Value - A list of private dns zone group resources in a private endpoint.
24948	Value *[]PrivateDNSZoneGroup `json:"value,omitempty"`
24949	// NextLink - READ-ONLY; The URL to get the next set of results.
24950	NextLink *string `json:"nextLink,omitempty"`
24951}
24952
24953// MarshalJSON is the custom marshaler for PrivateDNSZoneGroupListResult.
24954func (pdzglr PrivateDNSZoneGroupListResult) MarshalJSON() ([]byte, error) {
24955	objectMap := make(map[string]interface{})
24956	if pdzglr.Value != nil {
24957		objectMap["value"] = pdzglr.Value
24958	}
24959	return json.Marshal(objectMap)
24960}
24961
24962// PrivateDNSZoneGroupListResultIterator provides access to a complete listing of PrivateDNSZoneGroup
24963// values.
24964type PrivateDNSZoneGroupListResultIterator struct {
24965	i    int
24966	page PrivateDNSZoneGroupListResultPage
24967}
24968
24969// NextWithContext advances to the next value.  If there was an error making
24970// the request the iterator does not advance and the error is returned.
24971func (iter *PrivateDNSZoneGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
24972	if tracing.IsEnabled() {
24973		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateDNSZoneGroupListResultIterator.NextWithContext")
24974		defer func() {
24975			sc := -1
24976			if iter.Response().Response.Response != nil {
24977				sc = iter.Response().Response.Response.StatusCode
24978			}
24979			tracing.EndSpan(ctx, sc, err)
24980		}()
24981	}
24982	iter.i++
24983	if iter.i < len(iter.page.Values()) {
24984		return nil
24985	}
24986	err = iter.page.NextWithContext(ctx)
24987	if err != nil {
24988		iter.i--
24989		return err
24990	}
24991	iter.i = 0
24992	return nil
24993}
24994
24995// Next advances to the next value.  If there was an error making
24996// the request the iterator does not advance and the error is returned.
24997// Deprecated: Use NextWithContext() instead.
24998func (iter *PrivateDNSZoneGroupListResultIterator) Next() error {
24999	return iter.NextWithContext(context.Background())
25000}
25001
25002// NotDone returns true if the enumeration should be started or is not yet complete.
25003func (iter PrivateDNSZoneGroupListResultIterator) NotDone() bool {
25004	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25005}
25006
25007// Response returns the raw server response from the last page request.
25008func (iter PrivateDNSZoneGroupListResultIterator) Response() PrivateDNSZoneGroupListResult {
25009	return iter.page.Response()
25010}
25011
25012// Value returns the current value or a zero-initialized value if the
25013// iterator has advanced beyond the end of the collection.
25014func (iter PrivateDNSZoneGroupListResultIterator) Value() PrivateDNSZoneGroup {
25015	if !iter.page.NotDone() {
25016		return PrivateDNSZoneGroup{}
25017	}
25018	return iter.page.Values()[iter.i]
25019}
25020
25021// Creates a new instance of the PrivateDNSZoneGroupListResultIterator type.
25022func NewPrivateDNSZoneGroupListResultIterator(page PrivateDNSZoneGroupListResultPage) PrivateDNSZoneGroupListResultIterator {
25023	return PrivateDNSZoneGroupListResultIterator{page: page}
25024}
25025
25026// IsEmpty returns true if the ListResult contains no values.
25027func (pdzglr PrivateDNSZoneGroupListResult) IsEmpty() bool {
25028	return pdzglr.Value == nil || len(*pdzglr.Value) == 0
25029}
25030
25031// hasNextLink returns true if the NextLink is not empty.
25032func (pdzglr PrivateDNSZoneGroupListResult) hasNextLink() bool {
25033	return pdzglr.NextLink != nil && len(*pdzglr.NextLink) != 0
25034}
25035
25036// privateDNSZoneGroupListResultPreparer prepares a request to retrieve the next set of results.
25037// It returns nil if no more results exist.
25038func (pdzglr PrivateDNSZoneGroupListResult) privateDNSZoneGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
25039	if !pdzglr.hasNextLink() {
25040		return nil, nil
25041	}
25042	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25043		autorest.AsJSON(),
25044		autorest.AsGet(),
25045		autorest.WithBaseURL(to.String(pdzglr.NextLink)))
25046}
25047
25048// PrivateDNSZoneGroupListResultPage contains a page of PrivateDNSZoneGroup values.
25049type PrivateDNSZoneGroupListResultPage struct {
25050	fn     func(context.Context, PrivateDNSZoneGroupListResult) (PrivateDNSZoneGroupListResult, error)
25051	pdzglr PrivateDNSZoneGroupListResult
25052}
25053
25054// NextWithContext advances to the next page of values.  If there was an error making
25055// the request the page does not advance and the error is returned.
25056func (page *PrivateDNSZoneGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
25057	if tracing.IsEnabled() {
25058		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateDNSZoneGroupListResultPage.NextWithContext")
25059		defer func() {
25060			sc := -1
25061			if page.Response().Response.Response != nil {
25062				sc = page.Response().Response.Response.StatusCode
25063			}
25064			tracing.EndSpan(ctx, sc, err)
25065		}()
25066	}
25067	for {
25068		next, err := page.fn(ctx, page.pdzglr)
25069		if err != nil {
25070			return err
25071		}
25072		page.pdzglr = next
25073		if !next.hasNextLink() || !next.IsEmpty() {
25074			break
25075		}
25076	}
25077	return nil
25078}
25079
25080// Next advances to the next page of values.  If there was an error making
25081// the request the page does not advance and the error is returned.
25082// Deprecated: Use NextWithContext() instead.
25083func (page *PrivateDNSZoneGroupListResultPage) Next() error {
25084	return page.NextWithContext(context.Background())
25085}
25086
25087// NotDone returns true if the page enumeration should be started or is not yet complete.
25088func (page PrivateDNSZoneGroupListResultPage) NotDone() bool {
25089	return !page.pdzglr.IsEmpty()
25090}
25091
25092// Response returns the raw server response from the last page request.
25093func (page PrivateDNSZoneGroupListResultPage) Response() PrivateDNSZoneGroupListResult {
25094	return page.pdzglr
25095}
25096
25097// Values returns the slice of values for the current page or nil if there are no values.
25098func (page PrivateDNSZoneGroupListResultPage) Values() []PrivateDNSZoneGroup {
25099	if page.pdzglr.IsEmpty() {
25100		return nil
25101	}
25102	return *page.pdzglr.Value
25103}
25104
25105// Creates a new instance of the PrivateDNSZoneGroupListResultPage type.
25106func NewPrivateDNSZoneGroupListResultPage(cur PrivateDNSZoneGroupListResult, getNextPage func(context.Context, PrivateDNSZoneGroupListResult) (PrivateDNSZoneGroupListResult, error)) PrivateDNSZoneGroupListResultPage {
25107	return PrivateDNSZoneGroupListResultPage{
25108		fn:     getNextPage,
25109		pdzglr: cur,
25110	}
25111}
25112
25113// PrivateDNSZoneGroupPropertiesFormat properties of the private dns zone group.
25114type PrivateDNSZoneGroupPropertiesFormat struct {
25115	// ProvisioningState - READ-ONLY; The provisioning state of the private dns zone group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25116	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25117	// PrivateDNSZoneConfigs - A collection of private dns zone configurations of the private dns zone group.
25118	PrivateDNSZoneConfigs *[]PrivateDNSZoneConfig `json:"privateDnsZoneConfigs,omitempty"`
25119}
25120
25121// MarshalJSON is the custom marshaler for PrivateDNSZoneGroupPropertiesFormat.
25122func (pdzgpf PrivateDNSZoneGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
25123	objectMap := make(map[string]interface{})
25124	if pdzgpf.PrivateDNSZoneConfigs != nil {
25125		objectMap["privateDnsZoneConfigs"] = pdzgpf.PrivateDNSZoneConfigs
25126	}
25127	return json.Marshal(objectMap)
25128}
25129
25130// PrivateDNSZoneGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25131// long-running operation.
25132type PrivateDNSZoneGroupsCreateOrUpdateFuture struct {
25133	azure.FutureAPI
25134	// Result returns the result of the asynchronous operation.
25135	// If the operation has not completed it will return an error.
25136	Result func(PrivateDNSZoneGroupsClient) (PrivateDNSZoneGroup, error)
25137}
25138
25139// PrivateDNSZoneGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
25140// long-running operation.
25141type PrivateDNSZoneGroupsDeleteFuture struct {
25142	azure.FutureAPI
25143	// Result returns the result of the asynchronous operation.
25144	// If the operation has not completed it will return an error.
25145	Result func(PrivateDNSZoneGroupsClient) (autorest.Response, error)
25146}
25147
25148// PrivateDNSZonePropertiesFormat properties of the private dns zone configuration resource.
25149type PrivateDNSZonePropertiesFormat struct {
25150	// PrivateDNSZoneID - The resource id of the private dns zone.
25151	PrivateDNSZoneID *string `json:"privateDnsZoneId,omitempty"`
25152	// RecordSets - READ-ONLY; A collection of information regarding a recordSet, holding information to identify private resources.
25153	RecordSets *[]RecordSet `json:"recordSets,omitempty"`
25154}
25155
25156// MarshalJSON is the custom marshaler for PrivateDNSZonePropertiesFormat.
25157func (pdzpf PrivateDNSZonePropertiesFormat) MarshalJSON() ([]byte, error) {
25158	objectMap := make(map[string]interface{})
25159	if pdzpf.PrivateDNSZoneID != nil {
25160		objectMap["privateDnsZoneId"] = pdzpf.PrivateDNSZoneID
25161	}
25162	return json.Marshal(objectMap)
25163}
25164
25165// PrivateEndpoint private endpoint resource.
25166type PrivateEndpoint struct {
25167	autorest.Response `json:"-"`
25168	// PrivateEndpointProperties - Properties of the private endpoint.
25169	*PrivateEndpointProperties `json:"properties,omitempty"`
25170	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
25171	Etag *string `json:"etag,omitempty"`
25172	// ID - Resource ID.
25173	ID *string `json:"id,omitempty"`
25174	// Name - READ-ONLY; Resource name.
25175	Name *string `json:"name,omitempty"`
25176	// Type - READ-ONLY; Resource type.
25177	Type *string `json:"type,omitempty"`
25178	// Location - Resource location.
25179	Location *string `json:"location,omitempty"`
25180	// Tags - Resource tags.
25181	Tags map[string]*string `json:"tags"`
25182}
25183
25184// MarshalJSON is the custom marshaler for PrivateEndpoint.
25185func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
25186	objectMap := make(map[string]interface{})
25187	if peVar.PrivateEndpointProperties != nil {
25188		objectMap["properties"] = peVar.PrivateEndpointProperties
25189	}
25190	if peVar.ID != nil {
25191		objectMap["id"] = peVar.ID
25192	}
25193	if peVar.Location != nil {
25194		objectMap["location"] = peVar.Location
25195	}
25196	if peVar.Tags != nil {
25197		objectMap["tags"] = peVar.Tags
25198	}
25199	return json.Marshal(objectMap)
25200}
25201
25202// UnmarshalJSON is the custom unmarshaler for PrivateEndpoint struct.
25203func (peVar *PrivateEndpoint) UnmarshalJSON(body []byte) error {
25204	var m map[string]*json.RawMessage
25205	err := json.Unmarshal(body, &m)
25206	if err != nil {
25207		return err
25208	}
25209	for k, v := range m {
25210		switch k {
25211		case "properties":
25212			if v != nil {
25213				var privateEndpointProperties PrivateEndpointProperties
25214				err = json.Unmarshal(*v, &privateEndpointProperties)
25215				if err != nil {
25216					return err
25217				}
25218				peVar.PrivateEndpointProperties = &privateEndpointProperties
25219			}
25220		case "etag":
25221			if v != nil {
25222				var etag string
25223				err = json.Unmarshal(*v, &etag)
25224				if err != nil {
25225					return err
25226				}
25227				peVar.Etag = &etag
25228			}
25229		case "id":
25230			if v != nil {
25231				var ID string
25232				err = json.Unmarshal(*v, &ID)
25233				if err != nil {
25234					return err
25235				}
25236				peVar.ID = &ID
25237			}
25238		case "name":
25239			if v != nil {
25240				var name string
25241				err = json.Unmarshal(*v, &name)
25242				if err != nil {
25243					return err
25244				}
25245				peVar.Name = &name
25246			}
25247		case "type":
25248			if v != nil {
25249				var typeVar string
25250				err = json.Unmarshal(*v, &typeVar)
25251				if err != nil {
25252					return err
25253				}
25254				peVar.Type = &typeVar
25255			}
25256		case "location":
25257			if v != nil {
25258				var location string
25259				err = json.Unmarshal(*v, &location)
25260				if err != nil {
25261					return err
25262				}
25263				peVar.Location = &location
25264			}
25265		case "tags":
25266			if v != nil {
25267				var tags map[string]*string
25268				err = json.Unmarshal(*v, &tags)
25269				if err != nil {
25270					return err
25271				}
25272				peVar.Tags = tags
25273			}
25274		}
25275	}
25276
25277	return nil
25278}
25279
25280// PrivateEndpointConnection privateEndpointConnection resource.
25281type PrivateEndpointConnection struct {
25282	autorest.Response `json:"-"`
25283	// PrivateEndpointConnectionProperties - Properties of the private end point connection.
25284	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
25285	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
25286	Name *string `json:"name,omitempty"`
25287	// Type - READ-ONLY; The resource type.
25288	Type *string `json:"type,omitempty"`
25289	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
25290	Etag *string `json:"etag,omitempty"`
25291	// ID - Resource ID.
25292	ID *string `json:"id,omitempty"`
25293}
25294
25295// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
25296func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
25297	objectMap := make(map[string]interface{})
25298	if pec.PrivateEndpointConnectionProperties != nil {
25299		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
25300	}
25301	if pec.Name != nil {
25302		objectMap["name"] = pec.Name
25303	}
25304	if pec.ID != nil {
25305		objectMap["id"] = pec.ID
25306	}
25307	return json.Marshal(objectMap)
25308}
25309
25310// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
25311func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
25312	var m map[string]*json.RawMessage
25313	err := json.Unmarshal(body, &m)
25314	if err != nil {
25315		return err
25316	}
25317	for k, v := range m {
25318		switch k {
25319		case "properties":
25320			if v != nil {
25321				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
25322				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
25323				if err != nil {
25324					return err
25325				}
25326				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
25327			}
25328		case "name":
25329			if v != nil {
25330				var name string
25331				err = json.Unmarshal(*v, &name)
25332				if err != nil {
25333					return err
25334				}
25335				pec.Name = &name
25336			}
25337		case "type":
25338			if v != nil {
25339				var typeVar string
25340				err = json.Unmarshal(*v, &typeVar)
25341				if err != nil {
25342					return err
25343				}
25344				pec.Type = &typeVar
25345			}
25346		case "etag":
25347			if v != nil {
25348				var etag string
25349				err = json.Unmarshal(*v, &etag)
25350				if err != nil {
25351					return err
25352				}
25353				pec.Etag = &etag
25354			}
25355		case "id":
25356			if v != nil {
25357				var ID string
25358				err = json.Unmarshal(*v, &ID)
25359				if err != nil {
25360					return err
25361				}
25362				pec.ID = &ID
25363			}
25364		}
25365	}
25366
25367	return nil
25368}
25369
25370// PrivateEndpointConnectionListResult response for the ListPrivateEndpointConnection API service call.
25371type PrivateEndpointConnectionListResult struct {
25372	autorest.Response `json:"-"`
25373	// Value - A list of PrivateEndpointConnection resources for a specific private link service.
25374	Value *[]PrivateEndpointConnection `json:"value,omitempty"`
25375	// NextLink - READ-ONLY; The URL to get the next set of results.
25376	NextLink *string `json:"nextLink,omitempty"`
25377}
25378
25379// MarshalJSON is the custom marshaler for PrivateEndpointConnectionListResult.
25380func (peclr PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) {
25381	objectMap := make(map[string]interface{})
25382	if peclr.Value != nil {
25383		objectMap["value"] = peclr.Value
25384	}
25385	return json.Marshal(objectMap)
25386}
25387
25388// PrivateEndpointConnectionListResultIterator provides access to a complete listing of
25389// PrivateEndpointConnection values.
25390type PrivateEndpointConnectionListResultIterator struct {
25391	i    int
25392	page PrivateEndpointConnectionListResultPage
25393}
25394
25395// NextWithContext advances to the next value.  If there was an error making
25396// the request the iterator does not advance and the error is returned.
25397func (iter *PrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
25398	if tracing.IsEnabled() {
25399		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultIterator.NextWithContext")
25400		defer func() {
25401			sc := -1
25402			if iter.Response().Response.Response != nil {
25403				sc = iter.Response().Response.Response.StatusCode
25404			}
25405			tracing.EndSpan(ctx, sc, err)
25406		}()
25407	}
25408	iter.i++
25409	if iter.i < len(iter.page.Values()) {
25410		return nil
25411	}
25412	err = iter.page.NextWithContext(ctx)
25413	if err != nil {
25414		iter.i--
25415		return err
25416	}
25417	iter.i = 0
25418	return nil
25419}
25420
25421// Next advances to the next value.  If there was an error making
25422// the request the iterator does not advance and the error is returned.
25423// Deprecated: Use NextWithContext() instead.
25424func (iter *PrivateEndpointConnectionListResultIterator) Next() error {
25425	return iter.NextWithContext(context.Background())
25426}
25427
25428// NotDone returns true if the enumeration should be started or is not yet complete.
25429func (iter PrivateEndpointConnectionListResultIterator) NotDone() bool {
25430	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25431}
25432
25433// Response returns the raw server response from the last page request.
25434func (iter PrivateEndpointConnectionListResultIterator) Response() PrivateEndpointConnectionListResult {
25435	return iter.page.Response()
25436}
25437
25438// Value returns the current value or a zero-initialized value if the
25439// iterator has advanced beyond the end of the collection.
25440func (iter PrivateEndpointConnectionListResultIterator) Value() PrivateEndpointConnection {
25441	if !iter.page.NotDone() {
25442		return PrivateEndpointConnection{}
25443	}
25444	return iter.page.Values()[iter.i]
25445}
25446
25447// Creates a new instance of the PrivateEndpointConnectionListResultIterator type.
25448func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator {
25449	return PrivateEndpointConnectionListResultIterator{page: page}
25450}
25451
25452// IsEmpty returns true if the ListResult contains no values.
25453func (peclr PrivateEndpointConnectionListResult) IsEmpty() bool {
25454	return peclr.Value == nil || len(*peclr.Value) == 0
25455}
25456
25457// hasNextLink returns true if the NextLink is not empty.
25458func (peclr PrivateEndpointConnectionListResult) hasNextLink() bool {
25459	return peclr.NextLink != nil && len(*peclr.NextLink) != 0
25460}
25461
25462// privateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results.
25463// It returns nil if no more results exist.
25464func (peclr PrivateEndpointConnectionListResult) privateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
25465	if !peclr.hasNextLink() {
25466		return nil, nil
25467	}
25468	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25469		autorest.AsJSON(),
25470		autorest.AsGet(),
25471		autorest.WithBaseURL(to.String(peclr.NextLink)))
25472}
25473
25474// PrivateEndpointConnectionListResultPage contains a page of PrivateEndpointConnection values.
25475type PrivateEndpointConnectionListResultPage struct {
25476	fn    func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)
25477	peclr PrivateEndpointConnectionListResult
25478}
25479
25480// NextWithContext advances to the next page of values.  If there was an error making
25481// the request the page does not advance and the error is returned.
25482func (page *PrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
25483	if tracing.IsEnabled() {
25484		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultPage.NextWithContext")
25485		defer func() {
25486			sc := -1
25487			if page.Response().Response.Response != nil {
25488				sc = page.Response().Response.Response.StatusCode
25489			}
25490			tracing.EndSpan(ctx, sc, err)
25491		}()
25492	}
25493	for {
25494		next, err := page.fn(ctx, page.peclr)
25495		if err != nil {
25496			return err
25497		}
25498		page.peclr = next
25499		if !next.hasNextLink() || !next.IsEmpty() {
25500			break
25501		}
25502	}
25503	return nil
25504}
25505
25506// Next advances to the next page of values.  If there was an error making
25507// the request the page does not advance and the error is returned.
25508// Deprecated: Use NextWithContext() instead.
25509func (page *PrivateEndpointConnectionListResultPage) Next() error {
25510	return page.NextWithContext(context.Background())
25511}
25512
25513// NotDone returns true if the page enumeration should be started or is not yet complete.
25514func (page PrivateEndpointConnectionListResultPage) NotDone() bool {
25515	return !page.peclr.IsEmpty()
25516}
25517
25518// Response returns the raw server response from the last page request.
25519func (page PrivateEndpointConnectionListResultPage) Response() PrivateEndpointConnectionListResult {
25520	return page.peclr
25521}
25522
25523// Values returns the slice of values for the current page or nil if there are no values.
25524func (page PrivateEndpointConnectionListResultPage) Values() []PrivateEndpointConnection {
25525	if page.peclr.IsEmpty() {
25526		return nil
25527	}
25528	return *page.peclr.Value
25529}
25530
25531// Creates a new instance of the PrivateEndpointConnectionListResultPage type.
25532func NewPrivateEndpointConnectionListResultPage(cur PrivateEndpointConnectionListResult, getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage {
25533	return PrivateEndpointConnectionListResultPage{
25534		fn:    getNextPage,
25535		peclr: cur,
25536	}
25537}
25538
25539// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
25540type PrivateEndpointConnectionProperties struct {
25541	// PrivateEndpoint - READ-ONLY; The resource of private end point.
25542	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
25543	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
25544	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
25545	// ProvisioningState - READ-ONLY; The provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25546	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25547	// LinkIdentifier - READ-ONLY; The consumer link id.
25548	LinkIdentifier *string `json:"linkIdentifier,omitempty"`
25549}
25550
25551// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties.
25552func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) {
25553	objectMap := make(map[string]interface{})
25554	if pecp.PrivateLinkServiceConnectionState != nil {
25555		objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState
25556	}
25557	return json.Marshal(objectMap)
25558}
25559
25560// PrivateEndpointListResult response for the ListPrivateEndpoints API service call.
25561type PrivateEndpointListResult struct {
25562	autorest.Response `json:"-"`
25563	// Value - A list of private endpoint resources in a resource group.
25564	Value *[]PrivateEndpoint `json:"value,omitempty"`
25565	// NextLink - READ-ONLY; The URL to get the next set of results.
25566	NextLink *string `json:"nextLink,omitempty"`
25567}
25568
25569// MarshalJSON is the custom marshaler for PrivateEndpointListResult.
25570func (pelr PrivateEndpointListResult) MarshalJSON() ([]byte, error) {
25571	objectMap := make(map[string]interface{})
25572	if pelr.Value != nil {
25573		objectMap["value"] = pelr.Value
25574	}
25575	return json.Marshal(objectMap)
25576}
25577
25578// PrivateEndpointListResultIterator provides access to a complete listing of PrivateEndpoint values.
25579type PrivateEndpointListResultIterator struct {
25580	i    int
25581	page PrivateEndpointListResultPage
25582}
25583
25584// NextWithContext advances to the next value.  If there was an error making
25585// the request the iterator does not advance and the error is returned.
25586func (iter *PrivateEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
25587	if tracing.IsEnabled() {
25588		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultIterator.NextWithContext")
25589		defer func() {
25590			sc := -1
25591			if iter.Response().Response.Response != nil {
25592				sc = iter.Response().Response.Response.StatusCode
25593			}
25594			tracing.EndSpan(ctx, sc, err)
25595		}()
25596	}
25597	iter.i++
25598	if iter.i < len(iter.page.Values()) {
25599		return nil
25600	}
25601	err = iter.page.NextWithContext(ctx)
25602	if err != nil {
25603		iter.i--
25604		return err
25605	}
25606	iter.i = 0
25607	return nil
25608}
25609
25610// Next advances to the next value.  If there was an error making
25611// the request the iterator does not advance and the error is returned.
25612// Deprecated: Use NextWithContext() instead.
25613func (iter *PrivateEndpointListResultIterator) Next() error {
25614	return iter.NextWithContext(context.Background())
25615}
25616
25617// NotDone returns true if the enumeration should be started or is not yet complete.
25618func (iter PrivateEndpointListResultIterator) NotDone() bool {
25619	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25620}
25621
25622// Response returns the raw server response from the last page request.
25623func (iter PrivateEndpointListResultIterator) Response() PrivateEndpointListResult {
25624	return iter.page.Response()
25625}
25626
25627// Value returns the current value or a zero-initialized value if the
25628// iterator has advanced beyond the end of the collection.
25629func (iter PrivateEndpointListResultIterator) Value() PrivateEndpoint {
25630	if !iter.page.NotDone() {
25631		return PrivateEndpoint{}
25632	}
25633	return iter.page.Values()[iter.i]
25634}
25635
25636// Creates a new instance of the PrivateEndpointListResultIterator type.
25637func NewPrivateEndpointListResultIterator(page PrivateEndpointListResultPage) PrivateEndpointListResultIterator {
25638	return PrivateEndpointListResultIterator{page: page}
25639}
25640
25641// IsEmpty returns true if the ListResult contains no values.
25642func (pelr PrivateEndpointListResult) IsEmpty() bool {
25643	return pelr.Value == nil || len(*pelr.Value) == 0
25644}
25645
25646// hasNextLink returns true if the NextLink is not empty.
25647func (pelr PrivateEndpointListResult) hasNextLink() bool {
25648	return pelr.NextLink != nil && len(*pelr.NextLink) != 0
25649}
25650
25651// privateEndpointListResultPreparer prepares a request to retrieve the next set of results.
25652// It returns nil if no more results exist.
25653func (pelr PrivateEndpointListResult) privateEndpointListResultPreparer(ctx context.Context) (*http.Request, error) {
25654	if !pelr.hasNextLink() {
25655		return nil, nil
25656	}
25657	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25658		autorest.AsJSON(),
25659		autorest.AsGet(),
25660		autorest.WithBaseURL(to.String(pelr.NextLink)))
25661}
25662
25663// PrivateEndpointListResultPage contains a page of PrivateEndpoint values.
25664type PrivateEndpointListResultPage struct {
25665	fn   func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)
25666	pelr PrivateEndpointListResult
25667}
25668
25669// NextWithContext advances to the next page of values.  If there was an error making
25670// the request the page does not advance and the error is returned.
25671func (page *PrivateEndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
25672	if tracing.IsEnabled() {
25673		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultPage.NextWithContext")
25674		defer func() {
25675			sc := -1
25676			if page.Response().Response.Response != nil {
25677				sc = page.Response().Response.Response.StatusCode
25678			}
25679			tracing.EndSpan(ctx, sc, err)
25680		}()
25681	}
25682	for {
25683		next, err := page.fn(ctx, page.pelr)
25684		if err != nil {
25685			return err
25686		}
25687		page.pelr = next
25688		if !next.hasNextLink() || !next.IsEmpty() {
25689			break
25690		}
25691	}
25692	return nil
25693}
25694
25695// Next advances to the next page of values.  If there was an error making
25696// the request the page does not advance and the error is returned.
25697// Deprecated: Use NextWithContext() instead.
25698func (page *PrivateEndpointListResultPage) Next() error {
25699	return page.NextWithContext(context.Background())
25700}
25701
25702// NotDone returns true if the page enumeration should be started or is not yet complete.
25703func (page PrivateEndpointListResultPage) NotDone() bool {
25704	return !page.pelr.IsEmpty()
25705}
25706
25707// Response returns the raw server response from the last page request.
25708func (page PrivateEndpointListResultPage) Response() PrivateEndpointListResult {
25709	return page.pelr
25710}
25711
25712// Values returns the slice of values for the current page or nil if there are no values.
25713func (page PrivateEndpointListResultPage) Values() []PrivateEndpoint {
25714	if page.pelr.IsEmpty() {
25715		return nil
25716	}
25717	return *page.pelr.Value
25718}
25719
25720// Creates a new instance of the PrivateEndpointListResultPage type.
25721func NewPrivateEndpointListResultPage(cur PrivateEndpointListResult, getNextPage func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)) PrivateEndpointListResultPage {
25722	return PrivateEndpointListResultPage{
25723		fn:   getNextPage,
25724		pelr: cur,
25725	}
25726}
25727
25728// PrivateEndpointProperties properties of the private endpoint.
25729type PrivateEndpointProperties struct {
25730	// Subnet - The ID of the subnet from which the private IP will be allocated.
25731	Subnet *Subnet `json:"subnet,omitempty"`
25732	// NetworkInterfaces - READ-ONLY; An array of references to the network interfaces created for this private endpoint.
25733	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
25734	// ProvisioningState - READ-ONLY; The provisioning state of the private endpoint resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25735	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25736	// PrivateLinkServiceConnections - A grouping of information about the connection to the remote resource.
25737	PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"`
25738	// 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.
25739	ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"`
25740	// CustomDNSConfigs - An array of custom dns configurations.
25741	CustomDNSConfigs *[]CustomDNSConfigPropertiesFormat `json:"customDnsConfigs,omitempty"`
25742}
25743
25744// MarshalJSON is the custom marshaler for PrivateEndpointProperties.
25745func (pep PrivateEndpointProperties) MarshalJSON() ([]byte, error) {
25746	objectMap := make(map[string]interface{})
25747	if pep.Subnet != nil {
25748		objectMap["subnet"] = pep.Subnet
25749	}
25750	if pep.PrivateLinkServiceConnections != nil {
25751		objectMap["privateLinkServiceConnections"] = pep.PrivateLinkServiceConnections
25752	}
25753	if pep.ManualPrivateLinkServiceConnections != nil {
25754		objectMap["manualPrivateLinkServiceConnections"] = pep.ManualPrivateLinkServiceConnections
25755	}
25756	if pep.CustomDNSConfigs != nil {
25757		objectMap["customDnsConfigs"] = pep.CustomDNSConfigs
25758	}
25759	return json.Marshal(objectMap)
25760}
25761
25762// PrivateEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25763// long-running operation.
25764type PrivateEndpointsCreateOrUpdateFuture struct {
25765	azure.FutureAPI
25766	// Result returns the result of the asynchronous operation.
25767	// If the operation has not completed it will return an error.
25768	Result func(PrivateEndpointsClient) (PrivateEndpoint, error)
25769}
25770
25771// PrivateEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25772// operation.
25773type PrivateEndpointsDeleteFuture struct {
25774	azure.FutureAPI
25775	// Result returns the result of the asynchronous operation.
25776	// If the operation has not completed it will return an error.
25777	Result func(PrivateEndpointsClient) (autorest.Response, error)
25778}
25779
25780// PrivateLinkService private link service resource.
25781type PrivateLinkService struct {
25782	autorest.Response `json:"-"`
25783	// PrivateLinkServiceProperties - Properties of the private link service.
25784	*PrivateLinkServiceProperties `json:"properties,omitempty"`
25785	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
25786	Etag *string `json:"etag,omitempty"`
25787	// ID - Resource ID.
25788	ID *string `json:"id,omitempty"`
25789	// Name - READ-ONLY; Resource name.
25790	Name *string `json:"name,omitempty"`
25791	// Type - READ-ONLY; Resource type.
25792	Type *string `json:"type,omitempty"`
25793	// Location - Resource location.
25794	Location *string `json:"location,omitempty"`
25795	// Tags - Resource tags.
25796	Tags map[string]*string `json:"tags"`
25797}
25798
25799// MarshalJSON is the custom marshaler for PrivateLinkService.
25800func (pls PrivateLinkService) MarshalJSON() ([]byte, error) {
25801	objectMap := make(map[string]interface{})
25802	if pls.PrivateLinkServiceProperties != nil {
25803		objectMap["properties"] = pls.PrivateLinkServiceProperties
25804	}
25805	if pls.ID != nil {
25806		objectMap["id"] = pls.ID
25807	}
25808	if pls.Location != nil {
25809		objectMap["location"] = pls.Location
25810	}
25811	if pls.Tags != nil {
25812		objectMap["tags"] = pls.Tags
25813	}
25814	return json.Marshal(objectMap)
25815}
25816
25817// UnmarshalJSON is the custom unmarshaler for PrivateLinkService struct.
25818func (pls *PrivateLinkService) UnmarshalJSON(body []byte) error {
25819	var m map[string]*json.RawMessage
25820	err := json.Unmarshal(body, &m)
25821	if err != nil {
25822		return err
25823	}
25824	for k, v := range m {
25825		switch k {
25826		case "properties":
25827			if v != nil {
25828				var privateLinkServiceProperties PrivateLinkServiceProperties
25829				err = json.Unmarshal(*v, &privateLinkServiceProperties)
25830				if err != nil {
25831					return err
25832				}
25833				pls.PrivateLinkServiceProperties = &privateLinkServiceProperties
25834			}
25835		case "etag":
25836			if v != nil {
25837				var etag string
25838				err = json.Unmarshal(*v, &etag)
25839				if err != nil {
25840					return err
25841				}
25842				pls.Etag = &etag
25843			}
25844		case "id":
25845			if v != nil {
25846				var ID string
25847				err = json.Unmarshal(*v, &ID)
25848				if err != nil {
25849					return err
25850				}
25851				pls.ID = &ID
25852			}
25853		case "name":
25854			if v != nil {
25855				var name string
25856				err = json.Unmarshal(*v, &name)
25857				if err != nil {
25858					return err
25859				}
25860				pls.Name = &name
25861			}
25862		case "type":
25863			if v != nil {
25864				var typeVar string
25865				err = json.Unmarshal(*v, &typeVar)
25866				if err != nil {
25867					return err
25868				}
25869				pls.Type = &typeVar
25870			}
25871		case "location":
25872			if v != nil {
25873				var location string
25874				err = json.Unmarshal(*v, &location)
25875				if err != nil {
25876					return err
25877				}
25878				pls.Location = &location
25879			}
25880		case "tags":
25881			if v != nil {
25882				var tags map[string]*string
25883				err = json.Unmarshal(*v, &tags)
25884				if err != nil {
25885					return err
25886				}
25887				pls.Tags = tags
25888			}
25889		}
25890	}
25891
25892	return nil
25893}
25894
25895// PrivateLinkServiceConnection privateLinkServiceConnection resource.
25896type PrivateLinkServiceConnection struct {
25897	// PrivateLinkServiceConnectionProperties - Properties of the private link service connection.
25898	*PrivateLinkServiceConnectionProperties `json:"properties,omitempty"`
25899	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
25900	Name *string `json:"name,omitempty"`
25901	// Type - READ-ONLY; The resource type.
25902	Type *string `json:"type,omitempty"`
25903	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
25904	Etag *string `json:"etag,omitempty"`
25905	// ID - Resource ID.
25906	ID *string `json:"id,omitempty"`
25907}
25908
25909// MarshalJSON is the custom marshaler for PrivateLinkServiceConnection.
25910func (plsc PrivateLinkServiceConnection) MarshalJSON() ([]byte, error) {
25911	objectMap := make(map[string]interface{})
25912	if plsc.PrivateLinkServiceConnectionProperties != nil {
25913		objectMap["properties"] = plsc.PrivateLinkServiceConnectionProperties
25914	}
25915	if plsc.Name != nil {
25916		objectMap["name"] = plsc.Name
25917	}
25918	if plsc.ID != nil {
25919		objectMap["id"] = plsc.ID
25920	}
25921	return json.Marshal(objectMap)
25922}
25923
25924// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceConnection struct.
25925func (plsc *PrivateLinkServiceConnection) UnmarshalJSON(body []byte) error {
25926	var m map[string]*json.RawMessage
25927	err := json.Unmarshal(body, &m)
25928	if err != nil {
25929		return err
25930	}
25931	for k, v := range m {
25932		switch k {
25933		case "properties":
25934			if v != nil {
25935				var privateLinkServiceConnectionProperties PrivateLinkServiceConnectionProperties
25936				err = json.Unmarshal(*v, &privateLinkServiceConnectionProperties)
25937				if err != nil {
25938					return err
25939				}
25940				plsc.PrivateLinkServiceConnectionProperties = &privateLinkServiceConnectionProperties
25941			}
25942		case "name":
25943			if v != nil {
25944				var name string
25945				err = json.Unmarshal(*v, &name)
25946				if err != nil {
25947					return err
25948				}
25949				plsc.Name = &name
25950			}
25951		case "type":
25952			if v != nil {
25953				var typeVar string
25954				err = json.Unmarshal(*v, &typeVar)
25955				if err != nil {
25956					return err
25957				}
25958				plsc.Type = &typeVar
25959			}
25960		case "etag":
25961			if v != nil {
25962				var etag string
25963				err = json.Unmarshal(*v, &etag)
25964				if err != nil {
25965					return err
25966				}
25967				plsc.Etag = &etag
25968			}
25969		case "id":
25970			if v != nil {
25971				var ID string
25972				err = json.Unmarshal(*v, &ID)
25973				if err != nil {
25974					return err
25975				}
25976				plsc.ID = &ID
25977			}
25978		}
25979	}
25980
25981	return nil
25982}
25983
25984// PrivateLinkServiceConnectionProperties properties of the PrivateLinkServiceConnection.
25985type PrivateLinkServiceConnectionProperties struct {
25986	// ProvisioningState - READ-ONLY; The provisioning state of the private link service connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25987	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25988	// PrivateLinkServiceID - The resource id of private link service.
25989	PrivateLinkServiceID *string `json:"privateLinkServiceId,omitempty"`
25990	// GroupIds - The ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to.
25991	GroupIds *[]string `json:"groupIds,omitempty"`
25992	// RequestMessage - A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars.
25993	RequestMessage *string `json:"requestMessage,omitempty"`
25994	// PrivateLinkServiceConnectionState - A collection of read-only information about the state of the connection to the remote resource.
25995	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
25996}
25997
25998// MarshalJSON is the custom marshaler for PrivateLinkServiceConnectionProperties.
25999func (plscp PrivateLinkServiceConnectionProperties) MarshalJSON() ([]byte, error) {
26000	objectMap := make(map[string]interface{})
26001	if plscp.PrivateLinkServiceID != nil {
26002		objectMap["privateLinkServiceId"] = plscp.PrivateLinkServiceID
26003	}
26004	if plscp.GroupIds != nil {
26005		objectMap["groupIds"] = plscp.GroupIds
26006	}
26007	if plscp.RequestMessage != nil {
26008		objectMap["requestMessage"] = plscp.RequestMessage
26009	}
26010	if plscp.PrivateLinkServiceConnectionState != nil {
26011		objectMap["privateLinkServiceConnectionState"] = plscp.PrivateLinkServiceConnectionState
26012	}
26013	return json.Marshal(objectMap)
26014}
26015
26016// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
26017// service consumer and provider.
26018type PrivateLinkServiceConnectionState struct {
26019	// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
26020	Status *string `json:"status,omitempty"`
26021	// Description - The reason for approval/rejection of the connection.
26022	Description *string `json:"description,omitempty"`
26023	// ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
26024	ActionsRequired *string `json:"actionsRequired,omitempty"`
26025}
26026
26027// PrivateLinkServiceIPConfiguration the private link service ip configuration.
26028type PrivateLinkServiceIPConfiguration struct {
26029	// PrivateLinkServiceIPConfigurationProperties - Properties of the private link service ip configuration.
26030	*PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"`
26031	// Name - The name of private link service ip configuration.
26032	Name *string `json:"name,omitempty"`
26033	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26034	Etag *string `json:"etag,omitempty"`
26035	// Type - READ-ONLY; The resource type.
26036	Type *string `json:"type,omitempty"`
26037	// ID - Resource ID.
26038	ID *string `json:"id,omitempty"`
26039}
26040
26041// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfiguration.
26042func (plsic PrivateLinkServiceIPConfiguration) MarshalJSON() ([]byte, error) {
26043	objectMap := make(map[string]interface{})
26044	if plsic.PrivateLinkServiceIPConfigurationProperties != nil {
26045		objectMap["properties"] = plsic.PrivateLinkServiceIPConfigurationProperties
26046	}
26047	if plsic.Name != nil {
26048		objectMap["name"] = plsic.Name
26049	}
26050	if plsic.ID != nil {
26051		objectMap["id"] = plsic.ID
26052	}
26053	return json.Marshal(objectMap)
26054}
26055
26056// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceIPConfiguration struct.
26057func (plsic *PrivateLinkServiceIPConfiguration) UnmarshalJSON(body []byte) error {
26058	var m map[string]*json.RawMessage
26059	err := json.Unmarshal(body, &m)
26060	if err != nil {
26061		return err
26062	}
26063	for k, v := range m {
26064		switch k {
26065		case "properties":
26066			if v != nil {
26067				var privateLinkServiceIPConfigurationProperties PrivateLinkServiceIPConfigurationProperties
26068				err = json.Unmarshal(*v, &privateLinkServiceIPConfigurationProperties)
26069				if err != nil {
26070					return err
26071				}
26072				plsic.PrivateLinkServiceIPConfigurationProperties = &privateLinkServiceIPConfigurationProperties
26073			}
26074		case "name":
26075			if v != nil {
26076				var name string
26077				err = json.Unmarshal(*v, &name)
26078				if err != nil {
26079					return err
26080				}
26081				plsic.Name = &name
26082			}
26083		case "etag":
26084			if v != nil {
26085				var etag string
26086				err = json.Unmarshal(*v, &etag)
26087				if err != nil {
26088					return err
26089				}
26090				plsic.Etag = &etag
26091			}
26092		case "type":
26093			if v != nil {
26094				var typeVar string
26095				err = json.Unmarshal(*v, &typeVar)
26096				if err != nil {
26097					return err
26098				}
26099				plsic.Type = &typeVar
26100			}
26101		case "id":
26102			if v != nil {
26103				var ID string
26104				err = json.Unmarshal(*v, &ID)
26105				if err != nil {
26106					return err
26107				}
26108				plsic.ID = &ID
26109			}
26110		}
26111	}
26112
26113	return nil
26114}
26115
26116// PrivateLinkServiceIPConfigurationProperties properties of private link service IP configuration.
26117type PrivateLinkServiceIPConfigurationProperties struct {
26118	// PrivateIPAddress - The private IP address of the IP configuration.
26119	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
26120	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
26121	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
26122	// Subnet - The reference to the subnet resource.
26123	Subnet *Subnet `json:"subnet,omitempty"`
26124	// Primary - Whether the ip configuration is primary or not.
26125	Primary *bool `json:"primary,omitempty"`
26126	// ProvisioningState - READ-ONLY; The provisioning state of the private link service IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26127	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26128	// PrivateIPAddressVersion - Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPv4', 'IPv6'
26129	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
26130}
26131
26132// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfigurationProperties.
26133func (plsicp PrivateLinkServiceIPConfigurationProperties) MarshalJSON() ([]byte, error) {
26134	objectMap := make(map[string]interface{})
26135	if plsicp.PrivateIPAddress != nil {
26136		objectMap["privateIPAddress"] = plsicp.PrivateIPAddress
26137	}
26138	if plsicp.PrivateIPAllocationMethod != "" {
26139		objectMap["privateIPAllocationMethod"] = plsicp.PrivateIPAllocationMethod
26140	}
26141	if plsicp.Subnet != nil {
26142		objectMap["subnet"] = plsicp.Subnet
26143	}
26144	if plsicp.Primary != nil {
26145		objectMap["primary"] = plsicp.Primary
26146	}
26147	if plsicp.PrivateIPAddressVersion != "" {
26148		objectMap["privateIPAddressVersion"] = plsicp.PrivateIPAddressVersion
26149	}
26150	return json.Marshal(objectMap)
26151}
26152
26153// PrivateLinkServiceListResult response for the ListPrivateLinkService API service call.
26154type PrivateLinkServiceListResult struct {
26155	autorest.Response `json:"-"`
26156	// Value - A list of PrivateLinkService resources in a resource group.
26157	Value *[]PrivateLinkService `json:"value,omitempty"`
26158	// NextLink - READ-ONLY; The URL to get the next set of results.
26159	NextLink *string `json:"nextLink,omitempty"`
26160}
26161
26162// MarshalJSON is the custom marshaler for PrivateLinkServiceListResult.
26163func (plslr PrivateLinkServiceListResult) MarshalJSON() ([]byte, error) {
26164	objectMap := make(map[string]interface{})
26165	if plslr.Value != nil {
26166		objectMap["value"] = plslr.Value
26167	}
26168	return json.Marshal(objectMap)
26169}
26170
26171// PrivateLinkServiceListResultIterator provides access to a complete listing of PrivateLinkService values.
26172type PrivateLinkServiceListResultIterator struct {
26173	i    int
26174	page PrivateLinkServiceListResultPage
26175}
26176
26177// NextWithContext advances to the next value.  If there was an error making
26178// the request the iterator does not advance and the error is returned.
26179func (iter *PrivateLinkServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
26180	if tracing.IsEnabled() {
26181		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultIterator.NextWithContext")
26182		defer func() {
26183			sc := -1
26184			if iter.Response().Response.Response != nil {
26185				sc = iter.Response().Response.Response.StatusCode
26186			}
26187			tracing.EndSpan(ctx, sc, err)
26188		}()
26189	}
26190	iter.i++
26191	if iter.i < len(iter.page.Values()) {
26192		return nil
26193	}
26194	err = iter.page.NextWithContext(ctx)
26195	if err != nil {
26196		iter.i--
26197		return err
26198	}
26199	iter.i = 0
26200	return nil
26201}
26202
26203// Next advances to the next value.  If there was an error making
26204// the request the iterator does not advance and the error is returned.
26205// Deprecated: Use NextWithContext() instead.
26206func (iter *PrivateLinkServiceListResultIterator) Next() error {
26207	return iter.NextWithContext(context.Background())
26208}
26209
26210// NotDone returns true if the enumeration should be started or is not yet complete.
26211func (iter PrivateLinkServiceListResultIterator) NotDone() bool {
26212	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26213}
26214
26215// Response returns the raw server response from the last page request.
26216func (iter PrivateLinkServiceListResultIterator) Response() PrivateLinkServiceListResult {
26217	return iter.page.Response()
26218}
26219
26220// Value returns the current value or a zero-initialized value if the
26221// iterator has advanced beyond the end of the collection.
26222func (iter PrivateLinkServiceListResultIterator) Value() PrivateLinkService {
26223	if !iter.page.NotDone() {
26224		return PrivateLinkService{}
26225	}
26226	return iter.page.Values()[iter.i]
26227}
26228
26229// Creates a new instance of the PrivateLinkServiceListResultIterator type.
26230func NewPrivateLinkServiceListResultIterator(page PrivateLinkServiceListResultPage) PrivateLinkServiceListResultIterator {
26231	return PrivateLinkServiceListResultIterator{page: page}
26232}
26233
26234// IsEmpty returns true if the ListResult contains no values.
26235func (plslr PrivateLinkServiceListResult) IsEmpty() bool {
26236	return plslr.Value == nil || len(*plslr.Value) == 0
26237}
26238
26239// hasNextLink returns true if the NextLink is not empty.
26240func (plslr PrivateLinkServiceListResult) hasNextLink() bool {
26241	return plslr.NextLink != nil && len(*plslr.NextLink) != 0
26242}
26243
26244// privateLinkServiceListResultPreparer prepares a request to retrieve the next set of results.
26245// It returns nil if no more results exist.
26246func (plslr PrivateLinkServiceListResult) privateLinkServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
26247	if !plslr.hasNextLink() {
26248		return nil, nil
26249	}
26250	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26251		autorest.AsJSON(),
26252		autorest.AsGet(),
26253		autorest.WithBaseURL(to.String(plslr.NextLink)))
26254}
26255
26256// PrivateLinkServiceListResultPage contains a page of PrivateLinkService values.
26257type PrivateLinkServiceListResultPage struct {
26258	fn    func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)
26259	plslr PrivateLinkServiceListResult
26260}
26261
26262// NextWithContext advances to the next page of values.  If there was an error making
26263// the request the page does not advance and the error is returned.
26264func (page *PrivateLinkServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
26265	if tracing.IsEnabled() {
26266		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultPage.NextWithContext")
26267		defer func() {
26268			sc := -1
26269			if page.Response().Response.Response != nil {
26270				sc = page.Response().Response.Response.StatusCode
26271			}
26272			tracing.EndSpan(ctx, sc, err)
26273		}()
26274	}
26275	for {
26276		next, err := page.fn(ctx, page.plslr)
26277		if err != nil {
26278			return err
26279		}
26280		page.plslr = next
26281		if !next.hasNextLink() || !next.IsEmpty() {
26282			break
26283		}
26284	}
26285	return nil
26286}
26287
26288// Next advances to the next page of values.  If there was an error making
26289// the request the page does not advance and the error is returned.
26290// Deprecated: Use NextWithContext() instead.
26291func (page *PrivateLinkServiceListResultPage) Next() error {
26292	return page.NextWithContext(context.Background())
26293}
26294
26295// NotDone returns true if the page enumeration should be started or is not yet complete.
26296func (page PrivateLinkServiceListResultPage) NotDone() bool {
26297	return !page.plslr.IsEmpty()
26298}
26299
26300// Response returns the raw server response from the last page request.
26301func (page PrivateLinkServiceListResultPage) Response() PrivateLinkServiceListResult {
26302	return page.plslr
26303}
26304
26305// Values returns the slice of values for the current page or nil if there are no values.
26306func (page PrivateLinkServiceListResultPage) Values() []PrivateLinkService {
26307	if page.plslr.IsEmpty() {
26308		return nil
26309	}
26310	return *page.plslr.Value
26311}
26312
26313// Creates a new instance of the PrivateLinkServiceListResultPage type.
26314func NewPrivateLinkServiceListResultPage(cur PrivateLinkServiceListResult, getNextPage func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)) PrivateLinkServiceListResultPage {
26315	return PrivateLinkServiceListResultPage{
26316		fn:    getNextPage,
26317		plslr: cur,
26318	}
26319}
26320
26321// PrivateLinkServiceProperties properties of the private link service.
26322type PrivateLinkServiceProperties struct {
26323	// LoadBalancerFrontendIPConfigurations - An array of references to the load balancer IP configurations.
26324	LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"`
26325	// IPConfigurations - An array of private link service IP configurations.
26326	IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"`
26327	// NetworkInterfaces - READ-ONLY; An array of references to the network interfaces created for this private link service.
26328	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
26329	// ProvisioningState - READ-ONLY; The provisioning state of the private link service resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26330	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26331	// PrivateEndpointConnections - READ-ONLY; An array of list about connections to the private endpoint.
26332	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
26333	// Visibility - The visibility list of the private link service.
26334	Visibility *PrivateLinkServicePropertiesVisibility `json:"visibility,omitempty"`
26335	// AutoApproval - The auto-approval list of the private link service.
26336	AutoApproval *PrivateLinkServicePropertiesAutoApproval `json:"autoApproval,omitempty"`
26337	// Fqdns - The list of Fqdn.
26338	Fqdns *[]string `json:"fqdns,omitempty"`
26339	// Alias - READ-ONLY; The alias of the private link service.
26340	Alias *string `json:"alias,omitempty"`
26341	// EnableProxyProtocol - Whether the private link service is enabled for proxy protocol or not.
26342	EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"`
26343}
26344
26345// MarshalJSON is the custom marshaler for PrivateLinkServiceProperties.
26346func (plsp PrivateLinkServiceProperties) MarshalJSON() ([]byte, error) {
26347	objectMap := make(map[string]interface{})
26348	if plsp.LoadBalancerFrontendIPConfigurations != nil {
26349		objectMap["loadBalancerFrontendIpConfigurations"] = plsp.LoadBalancerFrontendIPConfigurations
26350	}
26351	if plsp.IPConfigurations != nil {
26352		objectMap["ipConfigurations"] = plsp.IPConfigurations
26353	}
26354	if plsp.Visibility != nil {
26355		objectMap["visibility"] = plsp.Visibility
26356	}
26357	if plsp.AutoApproval != nil {
26358		objectMap["autoApproval"] = plsp.AutoApproval
26359	}
26360	if plsp.Fqdns != nil {
26361		objectMap["fqdns"] = plsp.Fqdns
26362	}
26363	if plsp.EnableProxyProtocol != nil {
26364		objectMap["enableProxyProtocol"] = plsp.EnableProxyProtocol
26365	}
26366	return json.Marshal(objectMap)
26367}
26368
26369// PrivateLinkServicePropertiesAutoApproval the auto-approval list of the private link service.
26370type PrivateLinkServicePropertiesAutoApproval struct {
26371	// Subscriptions - The list of subscriptions.
26372	Subscriptions *[]string `json:"subscriptions,omitempty"`
26373}
26374
26375// PrivateLinkServicePropertiesVisibility the visibility list of the private link service.
26376type PrivateLinkServicePropertiesVisibility struct {
26377	// Subscriptions - The list of subscriptions.
26378	Subscriptions *[]string `json:"subscriptions,omitempty"`
26379}
26380
26381// PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture an abstraction for monitoring
26382// and retrieving the results of a long-running operation.
26383type PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture struct {
26384	azure.FutureAPI
26385	// Result returns the result of the asynchronous operation.
26386	// If the operation has not completed it will return an error.
26387	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
26388}
26389
26390// PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture an abstraction for monitoring and retrieving
26391// the results of a long-running operation.
26392type PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture struct {
26393	azure.FutureAPI
26394	// Result returns the result of the asynchronous operation.
26395	// If the operation has not completed it will return an error.
26396	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
26397}
26398
26399// PrivateLinkServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
26400// long-running operation.
26401type PrivateLinkServicesCreateOrUpdateFuture struct {
26402	azure.FutureAPI
26403	// Result returns the result of the asynchronous operation.
26404	// If the operation has not completed it will return an error.
26405	Result func(PrivateLinkServicesClient) (PrivateLinkService, error)
26406}
26407
26408// PrivateLinkServicesDeleteFuture an abstraction for monitoring and retrieving the results of a
26409// long-running operation.
26410type PrivateLinkServicesDeleteFuture struct {
26411	azure.FutureAPI
26412	// Result returns the result of the asynchronous operation.
26413	// If the operation has not completed it will return an error.
26414	Result func(PrivateLinkServicesClient) (autorest.Response, error)
26415}
26416
26417// PrivateLinkServicesDeletePrivateEndpointConnectionFuture an abstraction for monitoring and retrieving
26418// the results of a long-running operation.
26419type PrivateLinkServicesDeletePrivateEndpointConnectionFuture struct {
26420	azure.FutureAPI
26421	// Result returns the result of the asynchronous operation.
26422	// If the operation has not completed it will return an error.
26423	Result func(PrivateLinkServicesClient) (autorest.Response, error)
26424}
26425
26426// PrivateLinkServiceVisibility response for the CheckPrivateLinkServiceVisibility API service call.
26427type PrivateLinkServiceVisibility struct {
26428	autorest.Response `json:"-"`
26429	// Visible - Private Link Service Visibility (True/False).
26430	Visible *bool `json:"visible,omitempty"`
26431}
26432
26433// Probe a load balancer probe.
26434type Probe struct {
26435	autorest.Response `json:"-"`
26436	// ProbePropertiesFormat - Properties of load balancer probe.
26437	*ProbePropertiesFormat `json:"properties,omitempty"`
26438	// 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.
26439	Name *string `json:"name,omitempty"`
26440	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26441	Etag *string `json:"etag,omitempty"`
26442	// Type - READ-ONLY; Type of the resource.
26443	Type *string `json:"type,omitempty"`
26444	// ID - Resource ID.
26445	ID *string `json:"id,omitempty"`
26446}
26447
26448// MarshalJSON is the custom marshaler for Probe.
26449func (p Probe) MarshalJSON() ([]byte, error) {
26450	objectMap := make(map[string]interface{})
26451	if p.ProbePropertiesFormat != nil {
26452		objectMap["properties"] = p.ProbePropertiesFormat
26453	}
26454	if p.Name != nil {
26455		objectMap["name"] = p.Name
26456	}
26457	if p.ID != nil {
26458		objectMap["id"] = p.ID
26459	}
26460	return json.Marshal(objectMap)
26461}
26462
26463// UnmarshalJSON is the custom unmarshaler for Probe struct.
26464func (p *Probe) UnmarshalJSON(body []byte) error {
26465	var m map[string]*json.RawMessage
26466	err := json.Unmarshal(body, &m)
26467	if err != nil {
26468		return err
26469	}
26470	for k, v := range m {
26471		switch k {
26472		case "properties":
26473			if v != nil {
26474				var probePropertiesFormat ProbePropertiesFormat
26475				err = json.Unmarshal(*v, &probePropertiesFormat)
26476				if err != nil {
26477					return err
26478				}
26479				p.ProbePropertiesFormat = &probePropertiesFormat
26480			}
26481		case "name":
26482			if v != nil {
26483				var name string
26484				err = json.Unmarshal(*v, &name)
26485				if err != nil {
26486					return err
26487				}
26488				p.Name = &name
26489			}
26490		case "etag":
26491			if v != nil {
26492				var etag string
26493				err = json.Unmarshal(*v, &etag)
26494				if err != nil {
26495					return err
26496				}
26497				p.Etag = &etag
26498			}
26499		case "type":
26500			if v != nil {
26501				var typeVar string
26502				err = json.Unmarshal(*v, &typeVar)
26503				if err != nil {
26504					return err
26505				}
26506				p.Type = &typeVar
26507			}
26508		case "id":
26509			if v != nil {
26510				var ID string
26511				err = json.Unmarshal(*v, &ID)
26512				if err != nil {
26513					return err
26514				}
26515				p.ID = &ID
26516			}
26517		}
26518	}
26519
26520	return nil
26521}
26522
26523// ProbePropertiesFormat load balancer probe resource.
26524type ProbePropertiesFormat struct {
26525	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
26526	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
26527	// 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'
26528	Protocol ProbeProtocol `json:"protocol,omitempty"`
26529	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
26530	Port *int32 `json:"port,omitempty"`
26531	// 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.
26532	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
26533	// 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.
26534	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
26535	// 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.
26536	RequestPath *string `json:"requestPath,omitempty"`
26537	// ProvisioningState - READ-ONLY; The provisioning state of the probe resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26538	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26539}
26540
26541// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
26542func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
26543	objectMap := make(map[string]interface{})
26544	if ppf.Protocol != "" {
26545		objectMap["protocol"] = ppf.Protocol
26546	}
26547	if ppf.Port != nil {
26548		objectMap["port"] = ppf.Port
26549	}
26550	if ppf.IntervalInSeconds != nil {
26551		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
26552	}
26553	if ppf.NumberOfProbes != nil {
26554		objectMap["numberOfProbes"] = ppf.NumberOfProbes
26555	}
26556	if ppf.RequestPath != nil {
26557		objectMap["requestPath"] = ppf.RequestPath
26558	}
26559	return json.Marshal(objectMap)
26560}
26561
26562// Profile network profile resource.
26563type Profile struct {
26564	autorest.Response `json:"-"`
26565	// ProfilePropertiesFormat - Network profile properties.
26566	*ProfilePropertiesFormat `json:"properties,omitempty"`
26567	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26568	Etag *string `json:"etag,omitempty"`
26569	// ID - Resource ID.
26570	ID *string `json:"id,omitempty"`
26571	// Name - READ-ONLY; Resource name.
26572	Name *string `json:"name,omitempty"`
26573	// Type - READ-ONLY; Resource type.
26574	Type *string `json:"type,omitempty"`
26575	// Location - Resource location.
26576	Location *string `json:"location,omitempty"`
26577	// Tags - Resource tags.
26578	Tags map[string]*string `json:"tags"`
26579}
26580
26581// MarshalJSON is the custom marshaler for Profile.
26582func (p Profile) MarshalJSON() ([]byte, error) {
26583	objectMap := make(map[string]interface{})
26584	if p.ProfilePropertiesFormat != nil {
26585		objectMap["properties"] = p.ProfilePropertiesFormat
26586	}
26587	if p.ID != nil {
26588		objectMap["id"] = p.ID
26589	}
26590	if p.Location != nil {
26591		objectMap["location"] = p.Location
26592	}
26593	if p.Tags != nil {
26594		objectMap["tags"] = p.Tags
26595	}
26596	return json.Marshal(objectMap)
26597}
26598
26599// UnmarshalJSON is the custom unmarshaler for Profile struct.
26600func (p *Profile) UnmarshalJSON(body []byte) error {
26601	var m map[string]*json.RawMessage
26602	err := json.Unmarshal(body, &m)
26603	if err != nil {
26604		return err
26605	}
26606	for k, v := range m {
26607		switch k {
26608		case "properties":
26609			if v != nil {
26610				var profilePropertiesFormat ProfilePropertiesFormat
26611				err = json.Unmarshal(*v, &profilePropertiesFormat)
26612				if err != nil {
26613					return err
26614				}
26615				p.ProfilePropertiesFormat = &profilePropertiesFormat
26616			}
26617		case "etag":
26618			if v != nil {
26619				var etag string
26620				err = json.Unmarshal(*v, &etag)
26621				if err != nil {
26622					return err
26623				}
26624				p.Etag = &etag
26625			}
26626		case "id":
26627			if v != nil {
26628				var ID string
26629				err = json.Unmarshal(*v, &ID)
26630				if err != nil {
26631					return err
26632				}
26633				p.ID = &ID
26634			}
26635		case "name":
26636			if v != nil {
26637				var name string
26638				err = json.Unmarshal(*v, &name)
26639				if err != nil {
26640					return err
26641				}
26642				p.Name = &name
26643			}
26644		case "type":
26645			if v != nil {
26646				var typeVar string
26647				err = json.Unmarshal(*v, &typeVar)
26648				if err != nil {
26649					return err
26650				}
26651				p.Type = &typeVar
26652			}
26653		case "location":
26654			if v != nil {
26655				var location string
26656				err = json.Unmarshal(*v, &location)
26657				if err != nil {
26658					return err
26659				}
26660				p.Location = &location
26661			}
26662		case "tags":
26663			if v != nil {
26664				var tags map[string]*string
26665				err = json.Unmarshal(*v, &tags)
26666				if err != nil {
26667					return err
26668				}
26669				p.Tags = tags
26670			}
26671		}
26672	}
26673
26674	return nil
26675}
26676
26677// ProfileListResult response for ListNetworkProfiles API service call.
26678type ProfileListResult struct {
26679	autorest.Response `json:"-"`
26680	// Value - A list of network profiles that exist in a resource group.
26681	Value *[]Profile `json:"value,omitempty"`
26682	// NextLink - The URL to get the next set of results.
26683	NextLink *string `json:"nextLink,omitempty"`
26684}
26685
26686// ProfileListResultIterator provides access to a complete listing of Profile values.
26687type ProfileListResultIterator struct {
26688	i    int
26689	page ProfileListResultPage
26690}
26691
26692// NextWithContext advances to the next value.  If there was an error making
26693// the request the iterator does not advance and the error is returned.
26694func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
26695	if tracing.IsEnabled() {
26696		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
26697		defer func() {
26698			sc := -1
26699			if iter.Response().Response.Response != nil {
26700				sc = iter.Response().Response.Response.StatusCode
26701			}
26702			tracing.EndSpan(ctx, sc, err)
26703		}()
26704	}
26705	iter.i++
26706	if iter.i < len(iter.page.Values()) {
26707		return nil
26708	}
26709	err = iter.page.NextWithContext(ctx)
26710	if err != nil {
26711		iter.i--
26712		return err
26713	}
26714	iter.i = 0
26715	return nil
26716}
26717
26718// Next advances to the next value.  If there was an error making
26719// the request the iterator does not advance and the error is returned.
26720// Deprecated: Use NextWithContext() instead.
26721func (iter *ProfileListResultIterator) Next() error {
26722	return iter.NextWithContext(context.Background())
26723}
26724
26725// NotDone returns true if the enumeration should be started or is not yet complete.
26726func (iter ProfileListResultIterator) NotDone() bool {
26727	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26728}
26729
26730// Response returns the raw server response from the last page request.
26731func (iter ProfileListResultIterator) Response() ProfileListResult {
26732	return iter.page.Response()
26733}
26734
26735// Value returns the current value or a zero-initialized value if the
26736// iterator has advanced beyond the end of the collection.
26737func (iter ProfileListResultIterator) Value() Profile {
26738	if !iter.page.NotDone() {
26739		return Profile{}
26740	}
26741	return iter.page.Values()[iter.i]
26742}
26743
26744// Creates a new instance of the ProfileListResultIterator type.
26745func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
26746	return ProfileListResultIterator{page: page}
26747}
26748
26749// IsEmpty returns true if the ListResult contains no values.
26750func (plr ProfileListResult) IsEmpty() bool {
26751	return plr.Value == nil || len(*plr.Value) == 0
26752}
26753
26754// hasNextLink returns true if the NextLink is not empty.
26755func (plr ProfileListResult) hasNextLink() bool {
26756	return plr.NextLink != nil && len(*plr.NextLink) != 0
26757}
26758
26759// profileListResultPreparer prepares a request to retrieve the next set of results.
26760// It returns nil if no more results exist.
26761func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
26762	if !plr.hasNextLink() {
26763		return nil, nil
26764	}
26765	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26766		autorest.AsJSON(),
26767		autorest.AsGet(),
26768		autorest.WithBaseURL(to.String(plr.NextLink)))
26769}
26770
26771// ProfileListResultPage contains a page of Profile values.
26772type ProfileListResultPage struct {
26773	fn  func(context.Context, ProfileListResult) (ProfileListResult, error)
26774	plr ProfileListResult
26775}
26776
26777// NextWithContext advances to the next page of values.  If there was an error making
26778// the request the page does not advance and the error is returned.
26779func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
26780	if tracing.IsEnabled() {
26781		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
26782		defer func() {
26783			sc := -1
26784			if page.Response().Response.Response != nil {
26785				sc = page.Response().Response.Response.StatusCode
26786			}
26787			tracing.EndSpan(ctx, sc, err)
26788		}()
26789	}
26790	for {
26791		next, err := page.fn(ctx, page.plr)
26792		if err != nil {
26793			return err
26794		}
26795		page.plr = next
26796		if !next.hasNextLink() || !next.IsEmpty() {
26797			break
26798		}
26799	}
26800	return nil
26801}
26802
26803// Next advances to the next page of values.  If there was an error making
26804// the request the page does not advance and the error is returned.
26805// Deprecated: Use NextWithContext() instead.
26806func (page *ProfileListResultPage) Next() error {
26807	return page.NextWithContext(context.Background())
26808}
26809
26810// NotDone returns true if the page enumeration should be started or is not yet complete.
26811func (page ProfileListResultPage) NotDone() bool {
26812	return !page.plr.IsEmpty()
26813}
26814
26815// Response returns the raw server response from the last page request.
26816func (page ProfileListResultPage) Response() ProfileListResult {
26817	return page.plr
26818}
26819
26820// Values returns the slice of values for the current page or nil if there are no values.
26821func (page ProfileListResultPage) Values() []Profile {
26822	if page.plr.IsEmpty() {
26823		return nil
26824	}
26825	return *page.plr.Value
26826}
26827
26828// Creates a new instance of the ProfileListResultPage type.
26829func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
26830	return ProfileListResultPage{
26831		fn:  getNextPage,
26832		plr: cur,
26833	}
26834}
26835
26836// ProfilePropertiesFormat network profile properties.
26837type ProfilePropertiesFormat struct {
26838	// ContainerNetworkInterfaces - READ-ONLY; List of child container network interfaces.
26839	ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"`
26840	// ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations.
26841	ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"`
26842	// ResourceGUID - READ-ONLY; The resource GUID property of the network profile resource.
26843	ResourceGUID *string `json:"resourceGuid,omitempty"`
26844	// ProvisioningState - READ-ONLY; The provisioning state of the network profile resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26845	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26846}
26847
26848// MarshalJSON is the custom marshaler for ProfilePropertiesFormat.
26849func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
26850	objectMap := make(map[string]interface{})
26851	if ppf.ContainerNetworkInterfaceConfigurations != nil {
26852		objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations
26853	}
26854	return json.Marshal(objectMap)
26855}
26856
26857// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26858// operation.
26859type ProfilesDeleteFuture struct {
26860	azure.FutureAPI
26861	// Result returns the result of the asynchronous operation.
26862	// If the operation has not completed it will return an error.
26863	Result func(ProfilesClient) (autorest.Response, error)
26864}
26865
26866// PropagatedRouteTable the list of RouteTables to advertise the routes to.
26867type PropagatedRouteTable struct {
26868	// Labels - The list of labels.
26869	Labels *[]string `json:"labels,omitempty"`
26870	// Ids - The list of resource ids of all the RouteTables.
26871	Ids *[]SubResource `json:"ids,omitempty"`
26872}
26873
26874// ProtocolConfiguration configuration of the protocol.
26875type ProtocolConfiguration struct {
26876	// HTTPConfiguration - HTTP configuration of the connectivity check.
26877	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
26878}
26879
26880// ProtocolCustomSettingsFormat dDoS custom policy properties.
26881type ProtocolCustomSettingsFormat struct {
26882	// Protocol - The protocol for which the DDoS protection policy is being customized. Possible values include: 'DdosCustomPolicyProtocolTCP', 'DdosCustomPolicyProtocolUDP', 'DdosCustomPolicyProtocolSyn'
26883	Protocol DdosCustomPolicyProtocol `json:"protocol,omitempty"`
26884	// TriggerRateOverride - The customized DDoS protection trigger rate.
26885	TriggerRateOverride *string `json:"triggerRateOverride,omitempty"`
26886	// SourceRateOverride - The customized DDoS protection source rate.
26887	SourceRateOverride *string `json:"sourceRateOverride,omitempty"`
26888	// 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'
26889	TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"`
26890}
26891
26892// PublicIPAddress public IP address resource.
26893type PublicIPAddress struct {
26894	autorest.Response `json:"-"`
26895	// Sku - The public IP address SKU.
26896	Sku *PublicIPAddressSku `json:"sku,omitempty"`
26897	// PublicIPAddressPropertiesFormat - Public IP address properties.
26898	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
26899	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26900	Etag *string `json:"etag,omitempty"`
26901	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
26902	Zones *[]string `json:"zones,omitempty"`
26903	// ID - Resource ID.
26904	ID *string `json:"id,omitempty"`
26905	// Name - READ-ONLY; Resource name.
26906	Name *string `json:"name,omitempty"`
26907	// Type - READ-ONLY; Resource type.
26908	Type *string `json:"type,omitempty"`
26909	// Location - Resource location.
26910	Location *string `json:"location,omitempty"`
26911	// Tags - Resource tags.
26912	Tags map[string]*string `json:"tags"`
26913}
26914
26915// MarshalJSON is the custom marshaler for PublicIPAddress.
26916func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
26917	objectMap := make(map[string]interface{})
26918	if pia.Sku != nil {
26919		objectMap["sku"] = pia.Sku
26920	}
26921	if pia.PublicIPAddressPropertiesFormat != nil {
26922		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
26923	}
26924	if pia.Zones != nil {
26925		objectMap["zones"] = pia.Zones
26926	}
26927	if pia.ID != nil {
26928		objectMap["id"] = pia.ID
26929	}
26930	if pia.Location != nil {
26931		objectMap["location"] = pia.Location
26932	}
26933	if pia.Tags != nil {
26934		objectMap["tags"] = pia.Tags
26935	}
26936	return json.Marshal(objectMap)
26937}
26938
26939// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
26940func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
26941	var m map[string]*json.RawMessage
26942	err := json.Unmarshal(body, &m)
26943	if err != nil {
26944		return err
26945	}
26946	for k, v := range m {
26947		switch k {
26948		case "sku":
26949			if v != nil {
26950				var sku PublicIPAddressSku
26951				err = json.Unmarshal(*v, &sku)
26952				if err != nil {
26953					return err
26954				}
26955				pia.Sku = &sku
26956			}
26957		case "properties":
26958			if v != nil {
26959				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
26960				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
26961				if err != nil {
26962					return err
26963				}
26964				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
26965			}
26966		case "etag":
26967			if v != nil {
26968				var etag string
26969				err = json.Unmarshal(*v, &etag)
26970				if err != nil {
26971					return err
26972				}
26973				pia.Etag = &etag
26974			}
26975		case "zones":
26976			if v != nil {
26977				var zones []string
26978				err = json.Unmarshal(*v, &zones)
26979				if err != nil {
26980					return err
26981				}
26982				pia.Zones = &zones
26983			}
26984		case "id":
26985			if v != nil {
26986				var ID string
26987				err = json.Unmarshal(*v, &ID)
26988				if err != nil {
26989					return err
26990				}
26991				pia.ID = &ID
26992			}
26993		case "name":
26994			if v != nil {
26995				var name string
26996				err = json.Unmarshal(*v, &name)
26997				if err != nil {
26998					return err
26999				}
27000				pia.Name = &name
27001			}
27002		case "type":
27003			if v != nil {
27004				var typeVar string
27005				err = json.Unmarshal(*v, &typeVar)
27006				if err != nil {
27007					return err
27008				}
27009				pia.Type = &typeVar
27010			}
27011		case "location":
27012			if v != nil {
27013				var location string
27014				err = json.Unmarshal(*v, &location)
27015				if err != nil {
27016					return err
27017				}
27018				pia.Location = &location
27019			}
27020		case "tags":
27021			if v != nil {
27022				var tags map[string]*string
27023				err = json.Unmarshal(*v, &tags)
27024				if err != nil {
27025					return err
27026				}
27027				pia.Tags = tags
27028			}
27029		}
27030	}
27031
27032	return nil
27033}
27034
27035// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address.
27036type PublicIPAddressDNSSettings struct {
27037	// 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.
27038	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
27039	// 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.
27040	Fqdn *string `json:"fqdn,omitempty"`
27041	// 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.
27042	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
27043}
27044
27045// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
27046// long-running operation.
27047type PublicIPAddressesCreateOrUpdateFuture struct {
27048	azure.FutureAPI
27049	// Result returns the result of the asynchronous operation.
27050	// If the operation has not completed it will return an error.
27051	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
27052}
27053
27054// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
27055// operation.
27056type PublicIPAddressesDeleteFuture struct {
27057	azure.FutureAPI
27058	// Result returns the result of the asynchronous operation.
27059	// If the operation has not completed it will return an error.
27060	Result func(PublicIPAddressesClient) (autorest.Response, error)
27061}
27062
27063// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
27064type PublicIPAddressListResult struct {
27065	autorest.Response `json:"-"`
27066	// Value - A list of public IP addresses that exists in a resource group.
27067	Value *[]PublicIPAddress `json:"value,omitempty"`
27068	// NextLink - The URL to get the next set of results.
27069	NextLink *string `json:"nextLink,omitempty"`
27070}
27071
27072// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
27073type PublicIPAddressListResultIterator struct {
27074	i    int
27075	page PublicIPAddressListResultPage
27076}
27077
27078// NextWithContext advances to the next value.  If there was an error making
27079// the request the iterator does not advance and the error is returned.
27080func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
27081	if tracing.IsEnabled() {
27082		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
27083		defer func() {
27084			sc := -1
27085			if iter.Response().Response.Response != nil {
27086				sc = iter.Response().Response.Response.StatusCode
27087			}
27088			tracing.EndSpan(ctx, sc, err)
27089		}()
27090	}
27091	iter.i++
27092	if iter.i < len(iter.page.Values()) {
27093		return nil
27094	}
27095	err = iter.page.NextWithContext(ctx)
27096	if err != nil {
27097		iter.i--
27098		return err
27099	}
27100	iter.i = 0
27101	return nil
27102}
27103
27104// Next advances to the next value.  If there was an error making
27105// the request the iterator does not advance and the error is returned.
27106// Deprecated: Use NextWithContext() instead.
27107func (iter *PublicIPAddressListResultIterator) Next() error {
27108	return iter.NextWithContext(context.Background())
27109}
27110
27111// NotDone returns true if the enumeration should be started or is not yet complete.
27112func (iter PublicIPAddressListResultIterator) NotDone() bool {
27113	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27114}
27115
27116// Response returns the raw server response from the last page request.
27117func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
27118	return iter.page.Response()
27119}
27120
27121// Value returns the current value or a zero-initialized value if the
27122// iterator has advanced beyond the end of the collection.
27123func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
27124	if !iter.page.NotDone() {
27125		return PublicIPAddress{}
27126	}
27127	return iter.page.Values()[iter.i]
27128}
27129
27130// Creates a new instance of the PublicIPAddressListResultIterator type.
27131func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
27132	return PublicIPAddressListResultIterator{page: page}
27133}
27134
27135// IsEmpty returns true if the ListResult contains no values.
27136func (pialr PublicIPAddressListResult) IsEmpty() bool {
27137	return pialr.Value == nil || len(*pialr.Value) == 0
27138}
27139
27140// hasNextLink returns true if the NextLink is not empty.
27141func (pialr PublicIPAddressListResult) hasNextLink() bool {
27142	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
27143}
27144
27145// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
27146// It returns nil if no more results exist.
27147func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
27148	if !pialr.hasNextLink() {
27149		return nil, nil
27150	}
27151	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27152		autorest.AsJSON(),
27153		autorest.AsGet(),
27154		autorest.WithBaseURL(to.String(pialr.NextLink)))
27155}
27156
27157// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
27158type PublicIPAddressListResultPage struct {
27159	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
27160	pialr PublicIPAddressListResult
27161}
27162
27163// NextWithContext advances to the next page of values.  If there was an error making
27164// the request the page does not advance and the error is returned.
27165func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
27166	if tracing.IsEnabled() {
27167		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
27168		defer func() {
27169			sc := -1
27170			if page.Response().Response.Response != nil {
27171				sc = page.Response().Response.Response.StatusCode
27172			}
27173			tracing.EndSpan(ctx, sc, err)
27174		}()
27175	}
27176	for {
27177		next, err := page.fn(ctx, page.pialr)
27178		if err != nil {
27179			return err
27180		}
27181		page.pialr = next
27182		if !next.hasNextLink() || !next.IsEmpty() {
27183			break
27184		}
27185	}
27186	return nil
27187}
27188
27189// Next advances to the next page of values.  If there was an error making
27190// the request the page does not advance and the error is returned.
27191// Deprecated: Use NextWithContext() instead.
27192func (page *PublicIPAddressListResultPage) Next() error {
27193	return page.NextWithContext(context.Background())
27194}
27195
27196// NotDone returns true if the page enumeration should be started or is not yet complete.
27197func (page PublicIPAddressListResultPage) NotDone() bool {
27198	return !page.pialr.IsEmpty()
27199}
27200
27201// Response returns the raw server response from the last page request.
27202func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
27203	return page.pialr
27204}
27205
27206// Values returns the slice of values for the current page or nil if there are no values.
27207func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
27208	if page.pialr.IsEmpty() {
27209		return nil
27210	}
27211	return *page.pialr.Value
27212}
27213
27214// Creates a new instance of the PublicIPAddressListResultPage type.
27215func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
27216	return PublicIPAddressListResultPage{
27217		fn:    getNextPage,
27218		pialr: cur,
27219	}
27220}
27221
27222// PublicIPAddressPropertiesFormat public IP address properties.
27223type PublicIPAddressPropertiesFormat struct {
27224	// PublicIPAllocationMethod - The public IP address allocation method. Possible values include: 'Static', 'Dynamic'
27225	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
27226	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
27227	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
27228	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
27229	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
27230	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
27231	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
27232	// DdosSettings - The DDoS protection custom policy associated with the public IP address.
27233	DdosSettings *DdosSettings `json:"ddosSettings,omitempty"`
27234	// IPTags - The list of tags associated with the public IP address.
27235	IPTags *[]IPTag `json:"ipTags,omitempty"`
27236	// IPAddress - The IP address associated with the public IP address resource.
27237	IPAddress *string `json:"ipAddress,omitempty"`
27238	// PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from.
27239	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
27240	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
27241	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
27242	// ResourceGUID - READ-ONLY; The resource GUID property of the public IP address resource.
27243	ResourceGUID *string `json:"resourceGuid,omitempty"`
27244	// ProvisioningState - READ-ONLY; The provisioning state of the public IP address resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
27245	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27246}
27247
27248// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
27249func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
27250	objectMap := make(map[string]interface{})
27251	if piapf.PublicIPAllocationMethod != "" {
27252		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
27253	}
27254	if piapf.PublicIPAddressVersion != "" {
27255		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
27256	}
27257	if piapf.DNSSettings != nil {
27258		objectMap["dnsSettings"] = piapf.DNSSettings
27259	}
27260	if piapf.DdosSettings != nil {
27261		objectMap["ddosSettings"] = piapf.DdosSettings
27262	}
27263	if piapf.IPTags != nil {
27264		objectMap["ipTags"] = piapf.IPTags
27265	}
27266	if piapf.IPAddress != nil {
27267		objectMap["ipAddress"] = piapf.IPAddress
27268	}
27269	if piapf.PublicIPPrefix != nil {
27270		objectMap["publicIPPrefix"] = piapf.PublicIPPrefix
27271	}
27272	if piapf.IdleTimeoutInMinutes != nil {
27273		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
27274	}
27275	return json.Marshal(objectMap)
27276}
27277
27278// PublicIPAddressSku SKU of a public IP address.
27279type PublicIPAddressSku struct {
27280	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
27281	Name PublicIPAddressSkuName `json:"name,omitempty"`
27282}
27283
27284// PublicIPPrefix public IP prefix resource.
27285type PublicIPPrefix struct {
27286	autorest.Response `json:"-"`
27287	// Sku - The public IP prefix SKU.
27288	Sku *PublicIPPrefixSku `json:"sku,omitempty"`
27289	// PublicIPPrefixPropertiesFormat - Public IP prefix properties.
27290	*PublicIPPrefixPropertiesFormat `json:"properties,omitempty"`
27291	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
27292	Etag *string `json:"etag,omitempty"`
27293	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
27294	Zones *[]string `json:"zones,omitempty"`
27295	// ID - Resource ID.
27296	ID *string `json:"id,omitempty"`
27297	// Name - READ-ONLY; Resource name.
27298	Name *string `json:"name,omitempty"`
27299	// Type - READ-ONLY; Resource type.
27300	Type *string `json:"type,omitempty"`
27301	// Location - Resource location.
27302	Location *string `json:"location,omitempty"`
27303	// Tags - Resource tags.
27304	Tags map[string]*string `json:"tags"`
27305}
27306
27307// MarshalJSON is the custom marshaler for PublicIPPrefix.
27308func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) {
27309	objectMap := make(map[string]interface{})
27310	if pip.Sku != nil {
27311		objectMap["sku"] = pip.Sku
27312	}
27313	if pip.PublicIPPrefixPropertiesFormat != nil {
27314		objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat
27315	}
27316	if pip.Zones != nil {
27317		objectMap["zones"] = pip.Zones
27318	}
27319	if pip.ID != nil {
27320		objectMap["id"] = pip.ID
27321	}
27322	if pip.Location != nil {
27323		objectMap["location"] = pip.Location
27324	}
27325	if pip.Tags != nil {
27326		objectMap["tags"] = pip.Tags
27327	}
27328	return json.Marshal(objectMap)
27329}
27330
27331// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct.
27332func (pip *PublicIPPrefix) UnmarshalJSON(body []byte) error {
27333	var m map[string]*json.RawMessage
27334	err := json.Unmarshal(body, &m)
27335	if err != nil {
27336		return err
27337	}
27338	for k, v := range m {
27339		switch k {
27340		case "sku":
27341			if v != nil {
27342				var sku PublicIPPrefixSku
27343				err = json.Unmarshal(*v, &sku)
27344				if err != nil {
27345					return err
27346				}
27347				pip.Sku = &sku
27348			}
27349		case "properties":
27350			if v != nil {
27351				var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat
27352				err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat)
27353				if err != nil {
27354					return err
27355				}
27356				pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat
27357			}
27358		case "etag":
27359			if v != nil {
27360				var etag string
27361				err = json.Unmarshal(*v, &etag)
27362				if err != nil {
27363					return err
27364				}
27365				pip.Etag = &etag
27366			}
27367		case "zones":
27368			if v != nil {
27369				var zones []string
27370				err = json.Unmarshal(*v, &zones)
27371				if err != nil {
27372					return err
27373				}
27374				pip.Zones = &zones
27375			}
27376		case "id":
27377			if v != nil {
27378				var ID string
27379				err = json.Unmarshal(*v, &ID)
27380				if err != nil {
27381					return err
27382				}
27383				pip.ID = &ID
27384			}
27385		case "name":
27386			if v != nil {
27387				var name string
27388				err = json.Unmarshal(*v, &name)
27389				if err != nil {
27390					return err
27391				}
27392				pip.Name = &name
27393			}
27394		case "type":
27395			if v != nil {
27396				var typeVar string
27397				err = json.Unmarshal(*v, &typeVar)
27398				if err != nil {
27399					return err
27400				}
27401				pip.Type = &typeVar
27402			}
27403		case "location":
27404			if v != nil {
27405				var location string
27406				err = json.Unmarshal(*v, &location)
27407				if err != nil {
27408					return err
27409				}
27410				pip.Location = &location
27411			}
27412		case "tags":
27413			if v != nil {
27414				var tags map[string]*string
27415				err = json.Unmarshal(*v, &tags)
27416				if err != nil {
27417					return err
27418				}
27419				pip.Tags = tags
27420			}
27421		}
27422	}
27423
27424	return nil
27425}
27426
27427// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
27428// long-running operation.
27429type PublicIPPrefixesCreateOrUpdateFuture struct {
27430	azure.FutureAPI
27431	// Result returns the result of the asynchronous operation.
27432	// If the operation has not completed it will return an error.
27433	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
27434}
27435
27436// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
27437// operation.
27438type PublicIPPrefixesDeleteFuture struct {
27439	azure.FutureAPI
27440	// Result returns the result of the asynchronous operation.
27441	// If the operation has not completed it will return an error.
27442	Result func(PublicIPPrefixesClient) (autorest.Response, error)
27443}
27444
27445// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
27446type PublicIPPrefixListResult struct {
27447	autorest.Response `json:"-"`
27448	// Value - A list of public IP prefixes that exists in a resource group.
27449	Value *[]PublicIPPrefix `json:"value,omitempty"`
27450	// NextLink - The URL to get the next set of results.
27451	NextLink *string `json:"nextLink,omitempty"`
27452}
27453
27454// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values.
27455type PublicIPPrefixListResultIterator struct {
27456	i    int
27457	page PublicIPPrefixListResultPage
27458}
27459
27460// NextWithContext advances to the next value.  If there was an error making
27461// the request the iterator does not advance and the error is returned.
27462func (iter *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
27463	if tracing.IsEnabled() {
27464		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.NextWithContext")
27465		defer func() {
27466			sc := -1
27467			if iter.Response().Response.Response != nil {
27468				sc = iter.Response().Response.Response.StatusCode
27469			}
27470			tracing.EndSpan(ctx, sc, err)
27471		}()
27472	}
27473	iter.i++
27474	if iter.i < len(iter.page.Values()) {
27475		return nil
27476	}
27477	err = iter.page.NextWithContext(ctx)
27478	if err != nil {
27479		iter.i--
27480		return err
27481	}
27482	iter.i = 0
27483	return nil
27484}
27485
27486// Next advances to the next value.  If there was an error making
27487// the request the iterator does not advance and the error is returned.
27488// Deprecated: Use NextWithContext() instead.
27489func (iter *PublicIPPrefixListResultIterator) Next() error {
27490	return iter.NextWithContext(context.Background())
27491}
27492
27493// NotDone returns true if the enumeration should be started or is not yet complete.
27494func (iter PublicIPPrefixListResultIterator) NotDone() bool {
27495	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27496}
27497
27498// Response returns the raw server response from the last page request.
27499func (iter PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult {
27500	return iter.page.Response()
27501}
27502
27503// Value returns the current value or a zero-initialized value if the
27504// iterator has advanced beyond the end of the collection.
27505func (iter PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
27506	if !iter.page.NotDone() {
27507		return PublicIPPrefix{}
27508	}
27509	return iter.page.Values()[iter.i]
27510}
27511
27512// Creates a new instance of the PublicIPPrefixListResultIterator type.
27513func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
27514	return PublicIPPrefixListResultIterator{page: page}
27515}
27516
27517// IsEmpty returns true if the ListResult contains no values.
27518func (piplr PublicIPPrefixListResult) IsEmpty() bool {
27519	return piplr.Value == nil || len(*piplr.Value) == 0
27520}
27521
27522// hasNextLink returns true if the NextLink is not empty.
27523func (piplr PublicIPPrefixListResult) hasNextLink() bool {
27524	return piplr.NextLink != nil && len(*piplr.NextLink) != 0
27525}
27526
27527// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
27528// It returns nil if no more results exist.
27529func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
27530	if !piplr.hasNextLink() {
27531		return nil, nil
27532	}
27533	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27534		autorest.AsJSON(),
27535		autorest.AsGet(),
27536		autorest.WithBaseURL(to.String(piplr.NextLink)))
27537}
27538
27539// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
27540type PublicIPPrefixListResultPage struct {
27541	fn    func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
27542	piplr PublicIPPrefixListResult
27543}
27544
27545// NextWithContext advances to the next page of values.  If there was an error making
27546// the request the page does not advance and the error is returned.
27547func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
27548	if tracing.IsEnabled() {
27549		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext")
27550		defer func() {
27551			sc := -1
27552			if page.Response().Response.Response != nil {
27553				sc = page.Response().Response.Response.StatusCode
27554			}
27555			tracing.EndSpan(ctx, sc, err)
27556		}()
27557	}
27558	for {
27559		next, err := page.fn(ctx, page.piplr)
27560		if err != nil {
27561			return err
27562		}
27563		page.piplr = next
27564		if !next.hasNextLink() || !next.IsEmpty() {
27565			break
27566		}
27567	}
27568	return nil
27569}
27570
27571// Next advances to the next page of values.  If there was an error making
27572// the request the page does not advance and the error is returned.
27573// Deprecated: Use NextWithContext() instead.
27574func (page *PublicIPPrefixListResultPage) Next() error {
27575	return page.NextWithContext(context.Background())
27576}
27577
27578// NotDone returns true if the page enumeration should be started or is not yet complete.
27579func (page PublicIPPrefixListResultPage) NotDone() bool {
27580	return !page.piplr.IsEmpty()
27581}
27582
27583// Response returns the raw server response from the last page request.
27584func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult {
27585	return page.piplr
27586}
27587
27588// Values returns the slice of values for the current page or nil if there are no values.
27589func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
27590	if page.piplr.IsEmpty() {
27591		return nil
27592	}
27593	return *page.piplr.Value
27594}
27595
27596// Creates a new instance of the PublicIPPrefixListResultPage type.
27597func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
27598	return PublicIPPrefixListResultPage{
27599		fn:    getNextPage,
27600		piplr: cur,
27601	}
27602}
27603
27604// PublicIPPrefixPropertiesFormat public IP prefix properties.
27605type PublicIPPrefixPropertiesFormat struct {
27606	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
27607	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
27608	// IPTags - The list of tags associated with the public IP prefix.
27609	IPTags *[]IPTag `json:"ipTags,omitempty"`
27610	// PrefixLength - The Length of the Public IP Prefix.
27611	PrefixLength *int32 `json:"prefixLength,omitempty"`
27612	// IPPrefix - READ-ONLY; The allocated Prefix.
27613	IPPrefix *string `json:"ipPrefix,omitempty"`
27614	// PublicIPAddresses - READ-ONLY; The list of all referenced PublicIPAddresses.
27615	PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"`
27616	// LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix.
27617	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"`
27618	// ResourceGUID - READ-ONLY; The resource GUID property of the public IP prefix resource.
27619	ResourceGUID *string `json:"resourceGuid,omitempty"`
27620	// ProvisioningState - READ-ONLY; The provisioning state of the public IP prefix resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
27621	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27622}
27623
27624// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat.
27625func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
27626	objectMap := make(map[string]interface{})
27627	if pippf.PublicIPAddressVersion != "" {
27628		objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion
27629	}
27630	if pippf.IPTags != nil {
27631		objectMap["ipTags"] = pippf.IPTags
27632	}
27633	if pippf.PrefixLength != nil {
27634		objectMap["prefixLength"] = pippf.PrefixLength
27635	}
27636	return json.Marshal(objectMap)
27637}
27638
27639// PublicIPPrefixSku SKU of a public IP prefix.
27640type PublicIPPrefixSku struct {
27641	// Name - Name of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuNameStandard'
27642	Name PublicIPPrefixSkuName `json:"name,omitempty"`
27643}
27644
27645// PutBastionShareableLinkAllFuture an abstraction for monitoring and retrieving the results of a
27646// long-running operation.
27647type PutBastionShareableLinkAllFuture struct {
27648	azure.FutureAPI
27649	// Result returns the result of the asynchronous operation.
27650	// If the operation has not completed it will return an error.
27651	Result func(BaseClient) (BastionShareableLinkListResultPage, error)
27652}
27653
27654// PutBastionShareableLinkFuture an abstraction for monitoring and retrieving the results of a long-running
27655// operation.
27656type PutBastionShareableLinkFuture struct {
27657	azure.FutureAPI
27658	// Result returns the result of the asynchronous operation.
27659	// If the operation has not completed it will return an error.
27660	Result func(BaseClient) (BastionShareableLinkListResultPage, error)
27661}
27662
27663// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
27664type QueryTroubleshootingParameters struct {
27665	// TargetResourceID - The target resource ID to query the troubleshooting result.
27666	TargetResourceID *string `json:"targetResourceId,omitempty"`
27667}
27668
27669// RadiusServer radius Server Settings.
27670type RadiusServer struct {
27671	// RadiusServerAddress - The address of this radius server.
27672	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
27673	// RadiusServerScore - The initial score assigned to this radius server.
27674	RadiusServerScore *int64 `json:"radiusServerScore,omitempty"`
27675	// RadiusServerSecret - The secret used for this radius server.
27676	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
27677}
27678
27679// RecordSet a collective group of information about the record set information.
27680type RecordSet struct {
27681	// RecordType - Resource record type.
27682	RecordType *string `json:"recordType,omitempty"`
27683	// RecordSetName - Recordset name.
27684	RecordSetName *string `json:"recordSetName,omitempty"`
27685	// Fqdn - Fqdn that resolves to private endpoint ip address.
27686	Fqdn *string `json:"fqdn,omitempty"`
27687	// ProvisioningState - READ-ONLY; The provisioning state of the recordset. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
27688	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27689	// TTL - Recordset time to live.
27690	TTL *int32 `json:"ttl,omitempty"`
27691	// IPAddresses - The private ip address of the private endpoint.
27692	IPAddresses *[]string `json:"ipAddresses,omitempty"`
27693}
27694
27695// MarshalJSON is the custom marshaler for RecordSet.
27696func (rs RecordSet) MarshalJSON() ([]byte, error) {
27697	objectMap := make(map[string]interface{})
27698	if rs.RecordType != nil {
27699		objectMap["recordType"] = rs.RecordType
27700	}
27701	if rs.RecordSetName != nil {
27702		objectMap["recordSetName"] = rs.RecordSetName
27703	}
27704	if rs.Fqdn != nil {
27705		objectMap["fqdn"] = rs.Fqdn
27706	}
27707	if rs.TTL != nil {
27708		objectMap["ttl"] = rs.TTL
27709	}
27710	if rs.IPAddresses != nil {
27711		objectMap["ipAddresses"] = rs.IPAddresses
27712	}
27713	return json.Marshal(objectMap)
27714}
27715
27716// ReferencedPublicIPAddress reference to a public IP address.
27717type ReferencedPublicIPAddress struct {
27718	// ID - The PublicIPAddress Reference.
27719	ID *string `json:"id,omitempty"`
27720}
27721
27722// Resource common resource representation.
27723type Resource struct {
27724	// ID - Resource ID.
27725	ID *string `json:"id,omitempty"`
27726	// Name - READ-ONLY; Resource name.
27727	Name *string `json:"name,omitempty"`
27728	// Type - READ-ONLY; Resource type.
27729	Type *string `json:"type,omitempty"`
27730	// Location - Resource location.
27731	Location *string `json:"location,omitempty"`
27732	// Tags - Resource tags.
27733	Tags map[string]*string `json:"tags"`
27734}
27735
27736// MarshalJSON is the custom marshaler for Resource.
27737func (r Resource) MarshalJSON() ([]byte, error) {
27738	objectMap := make(map[string]interface{})
27739	if r.ID != nil {
27740		objectMap["id"] = r.ID
27741	}
27742	if r.Location != nil {
27743		objectMap["location"] = r.Location
27744	}
27745	if r.Tags != nil {
27746		objectMap["tags"] = r.Tags
27747	}
27748	return json.Marshal(objectMap)
27749}
27750
27751// ResourceNavigationLink resourceNavigationLink resource.
27752type ResourceNavigationLink struct {
27753	// ResourceNavigationLinkFormat - Resource navigation link properties format.
27754	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
27755	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
27756	Name *string `json:"name,omitempty"`
27757	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
27758	Etag *string `json:"etag,omitempty"`
27759	// Type - READ-ONLY; Resource type.
27760	Type *string `json:"type,omitempty"`
27761	// ID - Resource ID.
27762	ID *string `json:"id,omitempty"`
27763}
27764
27765// MarshalJSON is the custom marshaler for ResourceNavigationLink.
27766func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
27767	objectMap := make(map[string]interface{})
27768	if rnl.ResourceNavigationLinkFormat != nil {
27769		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
27770	}
27771	if rnl.Name != nil {
27772		objectMap["name"] = rnl.Name
27773	}
27774	if rnl.ID != nil {
27775		objectMap["id"] = rnl.ID
27776	}
27777	return json.Marshal(objectMap)
27778}
27779
27780// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
27781func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
27782	var m map[string]*json.RawMessage
27783	err := json.Unmarshal(body, &m)
27784	if err != nil {
27785		return err
27786	}
27787	for k, v := range m {
27788		switch k {
27789		case "properties":
27790			if v != nil {
27791				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
27792				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
27793				if err != nil {
27794					return err
27795				}
27796				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
27797			}
27798		case "name":
27799			if v != nil {
27800				var name string
27801				err = json.Unmarshal(*v, &name)
27802				if err != nil {
27803					return err
27804				}
27805				rnl.Name = &name
27806			}
27807		case "etag":
27808			if v != nil {
27809				var etag string
27810				err = json.Unmarshal(*v, &etag)
27811				if err != nil {
27812					return err
27813				}
27814				rnl.Etag = &etag
27815			}
27816		case "type":
27817			if v != nil {
27818				var typeVar string
27819				err = json.Unmarshal(*v, &typeVar)
27820				if err != nil {
27821					return err
27822				}
27823				rnl.Type = &typeVar
27824			}
27825		case "id":
27826			if v != nil {
27827				var ID string
27828				err = json.Unmarshal(*v, &ID)
27829				if err != nil {
27830					return err
27831				}
27832				rnl.ID = &ID
27833			}
27834		}
27835	}
27836
27837	return nil
27838}
27839
27840// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
27841type ResourceNavigationLinkFormat struct {
27842	// LinkedResourceType - Resource type of the linked resource.
27843	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
27844	// Link - Link to the external resource.
27845	Link *string `json:"link,omitempty"`
27846	// ProvisioningState - READ-ONLY; The provisioning state of the resource navigation link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
27847	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27848}
27849
27850// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
27851func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
27852	objectMap := make(map[string]interface{})
27853	if rnlf.LinkedResourceType != nil {
27854		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
27855	}
27856	if rnlf.Link != nil {
27857		objectMap["link"] = rnlf.Link
27858	}
27859	return json.Marshal(objectMap)
27860}
27861
27862// ResourceNavigationLinksListResult response for ResourceNavigationLinks_List operation.
27863type ResourceNavigationLinksListResult struct {
27864	autorest.Response `json:"-"`
27865	// Value - The resource navigation links in a subnet.
27866	Value *[]ResourceNavigationLink `json:"value,omitempty"`
27867	// NextLink - READ-ONLY; The URL to get the next set of results.
27868	NextLink *string `json:"nextLink,omitempty"`
27869}
27870
27871// MarshalJSON is the custom marshaler for ResourceNavigationLinksListResult.
27872func (rnllr ResourceNavigationLinksListResult) MarshalJSON() ([]byte, error) {
27873	objectMap := make(map[string]interface{})
27874	if rnllr.Value != nil {
27875		objectMap["value"] = rnllr.Value
27876	}
27877	return json.Marshal(objectMap)
27878}
27879
27880// ResourceSet the base resource set for visibility and auto-approval.
27881type ResourceSet struct {
27882	// Subscriptions - The list of subscriptions.
27883	Subscriptions *[]string `json:"subscriptions,omitempty"`
27884}
27885
27886// RetentionPolicyParameters parameters that define the retention policy for flow log.
27887type RetentionPolicyParameters struct {
27888	// Days - Number of days to retain flow log records.
27889	Days *int32 `json:"days,omitempty"`
27890	// Enabled - Flag to enable/disable retention.
27891	Enabled *bool `json:"enabled,omitempty"`
27892}
27893
27894// Route route resource.
27895type Route struct {
27896	autorest.Response `json:"-"`
27897	// RoutePropertiesFormat - Properties of the route.
27898	*RoutePropertiesFormat `json:"properties,omitempty"`
27899	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
27900	Name *string `json:"name,omitempty"`
27901	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
27902	Etag *string `json:"etag,omitempty"`
27903	// ID - Resource ID.
27904	ID *string `json:"id,omitempty"`
27905}
27906
27907// MarshalJSON is the custom marshaler for Route.
27908func (r Route) MarshalJSON() ([]byte, error) {
27909	objectMap := make(map[string]interface{})
27910	if r.RoutePropertiesFormat != nil {
27911		objectMap["properties"] = r.RoutePropertiesFormat
27912	}
27913	if r.Name != nil {
27914		objectMap["name"] = r.Name
27915	}
27916	if r.ID != nil {
27917		objectMap["id"] = r.ID
27918	}
27919	return json.Marshal(objectMap)
27920}
27921
27922// UnmarshalJSON is the custom unmarshaler for Route struct.
27923func (r *Route) UnmarshalJSON(body []byte) error {
27924	var m map[string]*json.RawMessage
27925	err := json.Unmarshal(body, &m)
27926	if err != nil {
27927		return err
27928	}
27929	for k, v := range m {
27930		switch k {
27931		case "properties":
27932			if v != nil {
27933				var routePropertiesFormat RoutePropertiesFormat
27934				err = json.Unmarshal(*v, &routePropertiesFormat)
27935				if err != nil {
27936					return err
27937				}
27938				r.RoutePropertiesFormat = &routePropertiesFormat
27939			}
27940		case "name":
27941			if v != nil {
27942				var name string
27943				err = json.Unmarshal(*v, &name)
27944				if err != nil {
27945					return err
27946				}
27947				r.Name = &name
27948			}
27949		case "etag":
27950			if v != nil {
27951				var etag string
27952				err = json.Unmarshal(*v, &etag)
27953				if err != nil {
27954					return err
27955				}
27956				r.Etag = &etag
27957			}
27958		case "id":
27959			if v != nil {
27960				var ID string
27961				err = json.Unmarshal(*v, &ID)
27962				if err != nil {
27963					return err
27964				}
27965				r.ID = &ID
27966			}
27967		}
27968	}
27969
27970	return nil
27971}
27972
27973// RouteFilter route Filter Resource.
27974type RouteFilter struct {
27975	autorest.Response `json:"-"`
27976	// RouteFilterPropertiesFormat - Properties of the route filter.
27977	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
27978	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
27979	Etag *string `json:"etag,omitempty"`
27980	// ID - Resource ID.
27981	ID *string `json:"id,omitempty"`
27982	// Name - READ-ONLY; Resource name.
27983	Name *string `json:"name,omitempty"`
27984	// Type - READ-ONLY; Resource type.
27985	Type *string `json:"type,omitempty"`
27986	// Location - Resource location.
27987	Location *string `json:"location,omitempty"`
27988	// Tags - Resource tags.
27989	Tags map[string]*string `json:"tags"`
27990}
27991
27992// MarshalJSON is the custom marshaler for RouteFilter.
27993func (rf RouteFilter) MarshalJSON() ([]byte, error) {
27994	objectMap := make(map[string]interface{})
27995	if rf.RouteFilterPropertiesFormat != nil {
27996		objectMap["properties"] = rf.RouteFilterPropertiesFormat
27997	}
27998	if rf.ID != nil {
27999		objectMap["id"] = rf.ID
28000	}
28001	if rf.Location != nil {
28002		objectMap["location"] = rf.Location
28003	}
28004	if rf.Tags != nil {
28005		objectMap["tags"] = rf.Tags
28006	}
28007	return json.Marshal(objectMap)
28008}
28009
28010// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
28011func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
28012	var m map[string]*json.RawMessage
28013	err := json.Unmarshal(body, &m)
28014	if err != nil {
28015		return err
28016	}
28017	for k, v := range m {
28018		switch k {
28019		case "properties":
28020			if v != nil {
28021				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
28022				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
28023				if err != nil {
28024					return err
28025				}
28026				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
28027			}
28028		case "etag":
28029			if v != nil {
28030				var etag string
28031				err = json.Unmarshal(*v, &etag)
28032				if err != nil {
28033					return err
28034				}
28035				rf.Etag = &etag
28036			}
28037		case "id":
28038			if v != nil {
28039				var ID string
28040				err = json.Unmarshal(*v, &ID)
28041				if err != nil {
28042					return err
28043				}
28044				rf.ID = &ID
28045			}
28046		case "name":
28047			if v != nil {
28048				var name string
28049				err = json.Unmarshal(*v, &name)
28050				if err != nil {
28051					return err
28052				}
28053				rf.Name = &name
28054			}
28055		case "type":
28056			if v != nil {
28057				var typeVar string
28058				err = json.Unmarshal(*v, &typeVar)
28059				if err != nil {
28060					return err
28061				}
28062				rf.Type = &typeVar
28063			}
28064		case "location":
28065			if v != nil {
28066				var location string
28067				err = json.Unmarshal(*v, &location)
28068				if err != nil {
28069					return err
28070				}
28071				rf.Location = &location
28072			}
28073		case "tags":
28074			if v != nil {
28075				var tags map[string]*string
28076				err = json.Unmarshal(*v, &tags)
28077				if err != nil {
28078					return err
28079				}
28080				rf.Tags = tags
28081			}
28082		}
28083	}
28084
28085	return nil
28086}
28087
28088// RouteFilterListResult response for the ListRouteFilters API service call.
28089type RouteFilterListResult struct {
28090	autorest.Response `json:"-"`
28091	// Value - A list of route filters in a resource group.
28092	Value *[]RouteFilter `json:"value,omitempty"`
28093	// NextLink - The URL to get the next set of results.
28094	NextLink *string `json:"nextLink,omitempty"`
28095}
28096
28097// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
28098type RouteFilterListResultIterator struct {
28099	i    int
28100	page RouteFilterListResultPage
28101}
28102
28103// NextWithContext advances to the next value.  If there was an error making
28104// the request the iterator does not advance and the error is returned.
28105func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
28106	if tracing.IsEnabled() {
28107		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
28108		defer func() {
28109			sc := -1
28110			if iter.Response().Response.Response != nil {
28111				sc = iter.Response().Response.Response.StatusCode
28112			}
28113			tracing.EndSpan(ctx, sc, err)
28114		}()
28115	}
28116	iter.i++
28117	if iter.i < len(iter.page.Values()) {
28118		return nil
28119	}
28120	err = iter.page.NextWithContext(ctx)
28121	if err != nil {
28122		iter.i--
28123		return err
28124	}
28125	iter.i = 0
28126	return nil
28127}
28128
28129// Next advances to the next value.  If there was an error making
28130// the request the iterator does not advance and the error is returned.
28131// Deprecated: Use NextWithContext() instead.
28132func (iter *RouteFilterListResultIterator) Next() error {
28133	return iter.NextWithContext(context.Background())
28134}
28135
28136// NotDone returns true if the enumeration should be started or is not yet complete.
28137func (iter RouteFilterListResultIterator) NotDone() bool {
28138	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28139}
28140
28141// Response returns the raw server response from the last page request.
28142func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
28143	return iter.page.Response()
28144}
28145
28146// Value returns the current value or a zero-initialized value if the
28147// iterator has advanced beyond the end of the collection.
28148func (iter RouteFilterListResultIterator) Value() RouteFilter {
28149	if !iter.page.NotDone() {
28150		return RouteFilter{}
28151	}
28152	return iter.page.Values()[iter.i]
28153}
28154
28155// Creates a new instance of the RouteFilterListResultIterator type.
28156func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
28157	return RouteFilterListResultIterator{page: page}
28158}
28159
28160// IsEmpty returns true if the ListResult contains no values.
28161func (rflr RouteFilterListResult) IsEmpty() bool {
28162	return rflr.Value == nil || len(*rflr.Value) == 0
28163}
28164
28165// hasNextLink returns true if the NextLink is not empty.
28166func (rflr RouteFilterListResult) hasNextLink() bool {
28167	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
28168}
28169
28170// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
28171// It returns nil if no more results exist.
28172func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
28173	if !rflr.hasNextLink() {
28174		return nil, nil
28175	}
28176	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28177		autorest.AsJSON(),
28178		autorest.AsGet(),
28179		autorest.WithBaseURL(to.String(rflr.NextLink)))
28180}
28181
28182// RouteFilterListResultPage contains a page of RouteFilter values.
28183type RouteFilterListResultPage struct {
28184	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
28185	rflr RouteFilterListResult
28186}
28187
28188// NextWithContext advances to the next page of values.  If there was an error making
28189// the request the page does not advance and the error is returned.
28190func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
28191	if tracing.IsEnabled() {
28192		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
28193		defer func() {
28194			sc := -1
28195			if page.Response().Response.Response != nil {
28196				sc = page.Response().Response.Response.StatusCode
28197			}
28198			tracing.EndSpan(ctx, sc, err)
28199		}()
28200	}
28201	for {
28202		next, err := page.fn(ctx, page.rflr)
28203		if err != nil {
28204			return err
28205		}
28206		page.rflr = next
28207		if !next.hasNextLink() || !next.IsEmpty() {
28208			break
28209		}
28210	}
28211	return nil
28212}
28213
28214// Next advances to the next page of values.  If there was an error making
28215// the request the page does not advance and the error is returned.
28216// Deprecated: Use NextWithContext() instead.
28217func (page *RouteFilterListResultPage) Next() error {
28218	return page.NextWithContext(context.Background())
28219}
28220
28221// NotDone returns true if the page enumeration should be started or is not yet complete.
28222func (page RouteFilterListResultPage) NotDone() bool {
28223	return !page.rflr.IsEmpty()
28224}
28225
28226// Response returns the raw server response from the last page request.
28227func (page RouteFilterListResultPage) Response() RouteFilterListResult {
28228	return page.rflr
28229}
28230
28231// Values returns the slice of values for the current page or nil if there are no values.
28232func (page RouteFilterListResultPage) Values() []RouteFilter {
28233	if page.rflr.IsEmpty() {
28234		return nil
28235	}
28236	return *page.rflr.Value
28237}
28238
28239// Creates a new instance of the RouteFilterListResultPage type.
28240func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
28241	return RouteFilterListResultPage{
28242		fn:   getNextPage,
28243		rflr: cur,
28244	}
28245}
28246
28247// RouteFilterPropertiesFormat route Filter Resource.
28248type RouteFilterPropertiesFormat struct {
28249	// Rules - Collection of RouteFilterRules contained within a route filter.
28250	Rules *[]RouteFilterRule `json:"rules,omitempty"`
28251	// Peerings - READ-ONLY; A collection of references to express route circuit peerings.
28252	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
28253	// Ipv6Peerings - READ-ONLY; A collection of references to express route circuit ipv6 peerings.
28254	Ipv6Peerings *[]ExpressRouteCircuitPeering `json:"ipv6Peerings,omitempty"`
28255	// ProvisioningState - READ-ONLY; The provisioning state of the route filter resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
28256	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28257}
28258
28259// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
28260func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
28261	objectMap := make(map[string]interface{})
28262	if rfpf.Rules != nil {
28263		objectMap["rules"] = rfpf.Rules
28264	}
28265	return json.Marshal(objectMap)
28266}
28267
28268// RouteFilterRule route Filter Rule Resource.
28269type RouteFilterRule struct {
28270	autorest.Response `json:"-"`
28271	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
28272	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
28273	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
28274	Name *string `json:"name,omitempty"`
28275	// Location - Resource location.
28276	Location *string `json:"location,omitempty"`
28277	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
28278	Etag *string `json:"etag,omitempty"`
28279	// ID - Resource ID.
28280	ID *string `json:"id,omitempty"`
28281}
28282
28283// MarshalJSON is the custom marshaler for RouteFilterRule.
28284func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
28285	objectMap := make(map[string]interface{})
28286	if rfr.RouteFilterRulePropertiesFormat != nil {
28287		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
28288	}
28289	if rfr.Name != nil {
28290		objectMap["name"] = rfr.Name
28291	}
28292	if rfr.Location != nil {
28293		objectMap["location"] = rfr.Location
28294	}
28295	if rfr.ID != nil {
28296		objectMap["id"] = rfr.ID
28297	}
28298	return json.Marshal(objectMap)
28299}
28300
28301// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
28302func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
28303	var m map[string]*json.RawMessage
28304	err := json.Unmarshal(body, &m)
28305	if err != nil {
28306		return err
28307	}
28308	for k, v := range m {
28309		switch k {
28310		case "properties":
28311			if v != nil {
28312				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
28313				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
28314				if err != nil {
28315					return err
28316				}
28317				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
28318			}
28319		case "name":
28320			if v != nil {
28321				var name string
28322				err = json.Unmarshal(*v, &name)
28323				if err != nil {
28324					return err
28325				}
28326				rfr.Name = &name
28327			}
28328		case "location":
28329			if v != nil {
28330				var location string
28331				err = json.Unmarshal(*v, &location)
28332				if err != nil {
28333					return err
28334				}
28335				rfr.Location = &location
28336			}
28337		case "etag":
28338			if v != nil {
28339				var etag string
28340				err = json.Unmarshal(*v, &etag)
28341				if err != nil {
28342					return err
28343				}
28344				rfr.Etag = &etag
28345			}
28346		case "id":
28347			if v != nil {
28348				var ID string
28349				err = json.Unmarshal(*v, &ID)
28350				if err != nil {
28351					return err
28352				}
28353				rfr.ID = &ID
28354			}
28355		}
28356	}
28357
28358	return nil
28359}
28360
28361// RouteFilterRuleListResult response for the ListRouteFilterRules API service call.
28362type RouteFilterRuleListResult struct {
28363	autorest.Response `json:"-"`
28364	// Value - A list of RouteFilterRules in a resource group.
28365	Value *[]RouteFilterRule `json:"value,omitempty"`
28366	// NextLink - The URL to get the next set of results.
28367	NextLink *string `json:"nextLink,omitempty"`
28368}
28369
28370// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
28371type RouteFilterRuleListResultIterator struct {
28372	i    int
28373	page RouteFilterRuleListResultPage
28374}
28375
28376// NextWithContext advances to the next value.  If there was an error making
28377// the request the iterator does not advance and the error is returned.
28378func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
28379	if tracing.IsEnabled() {
28380		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
28381		defer func() {
28382			sc := -1
28383			if iter.Response().Response.Response != nil {
28384				sc = iter.Response().Response.Response.StatusCode
28385			}
28386			tracing.EndSpan(ctx, sc, err)
28387		}()
28388	}
28389	iter.i++
28390	if iter.i < len(iter.page.Values()) {
28391		return nil
28392	}
28393	err = iter.page.NextWithContext(ctx)
28394	if err != nil {
28395		iter.i--
28396		return err
28397	}
28398	iter.i = 0
28399	return nil
28400}
28401
28402// Next advances to the next value.  If there was an error making
28403// the request the iterator does not advance and the error is returned.
28404// Deprecated: Use NextWithContext() instead.
28405func (iter *RouteFilterRuleListResultIterator) Next() error {
28406	return iter.NextWithContext(context.Background())
28407}
28408
28409// NotDone returns true if the enumeration should be started or is not yet complete.
28410func (iter RouteFilterRuleListResultIterator) NotDone() bool {
28411	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28412}
28413
28414// Response returns the raw server response from the last page request.
28415func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
28416	return iter.page.Response()
28417}
28418
28419// Value returns the current value or a zero-initialized value if the
28420// iterator has advanced beyond the end of the collection.
28421func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
28422	if !iter.page.NotDone() {
28423		return RouteFilterRule{}
28424	}
28425	return iter.page.Values()[iter.i]
28426}
28427
28428// Creates a new instance of the RouteFilterRuleListResultIterator type.
28429func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
28430	return RouteFilterRuleListResultIterator{page: page}
28431}
28432
28433// IsEmpty returns true if the ListResult contains no values.
28434func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
28435	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
28436}
28437
28438// hasNextLink returns true if the NextLink is not empty.
28439func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
28440	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
28441}
28442
28443// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
28444// It returns nil if no more results exist.
28445func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
28446	if !rfrlr.hasNextLink() {
28447		return nil, nil
28448	}
28449	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28450		autorest.AsJSON(),
28451		autorest.AsGet(),
28452		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
28453}
28454
28455// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
28456type RouteFilterRuleListResultPage struct {
28457	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
28458	rfrlr RouteFilterRuleListResult
28459}
28460
28461// NextWithContext advances to the next page of values.  If there was an error making
28462// the request the page does not advance and the error is returned.
28463func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
28464	if tracing.IsEnabled() {
28465		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
28466		defer func() {
28467			sc := -1
28468			if page.Response().Response.Response != nil {
28469				sc = page.Response().Response.Response.StatusCode
28470			}
28471			tracing.EndSpan(ctx, sc, err)
28472		}()
28473	}
28474	for {
28475		next, err := page.fn(ctx, page.rfrlr)
28476		if err != nil {
28477			return err
28478		}
28479		page.rfrlr = next
28480		if !next.hasNextLink() || !next.IsEmpty() {
28481			break
28482		}
28483	}
28484	return nil
28485}
28486
28487// Next advances to the next page of values.  If there was an error making
28488// the request the page does not advance and the error is returned.
28489// Deprecated: Use NextWithContext() instead.
28490func (page *RouteFilterRuleListResultPage) Next() error {
28491	return page.NextWithContext(context.Background())
28492}
28493
28494// NotDone returns true if the page enumeration should be started or is not yet complete.
28495func (page RouteFilterRuleListResultPage) NotDone() bool {
28496	return !page.rfrlr.IsEmpty()
28497}
28498
28499// Response returns the raw server response from the last page request.
28500func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
28501	return page.rfrlr
28502}
28503
28504// Values returns the slice of values for the current page or nil if there are no values.
28505func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
28506	if page.rfrlr.IsEmpty() {
28507		return nil
28508	}
28509	return *page.rfrlr.Value
28510}
28511
28512// Creates a new instance of the RouteFilterRuleListResultPage type.
28513func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
28514	return RouteFilterRuleListResultPage{
28515		fn:    getNextPage,
28516		rfrlr: cur,
28517	}
28518}
28519
28520// RouteFilterRulePropertiesFormat route Filter Rule Resource.
28521type RouteFilterRulePropertiesFormat struct {
28522	// Access - The access type of the rule. Possible values include: 'Allow', 'Deny'
28523	Access Access `json:"access,omitempty"`
28524	// RouteFilterRuleType - The rule type of the rule.
28525	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
28526	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
28527	Communities *[]string `json:"communities,omitempty"`
28528	// ProvisioningState - READ-ONLY; The provisioning state of the route filter rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
28529	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28530}
28531
28532// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
28533func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
28534	objectMap := make(map[string]interface{})
28535	if rfrpf.Access != "" {
28536		objectMap["access"] = rfrpf.Access
28537	}
28538	if rfrpf.RouteFilterRuleType != nil {
28539		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
28540	}
28541	if rfrpf.Communities != nil {
28542		objectMap["communities"] = rfrpf.Communities
28543	}
28544	return json.Marshal(objectMap)
28545}
28546
28547// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28548// long-running operation.
28549type RouteFilterRulesCreateOrUpdateFuture struct {
28550	azure.FutureAPI
28551	// Result returns the result of the asynchronous operation.
28552	// If the operation has not completed it will return an error.
28553	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
28554}
28555
28556// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
28557// operation.
28558type RouteFilterRulesDeleteFuture struct {
28559	azure.FutureAPI
28560	// Result returns the result of the asynchronous operation.
28561	// If the operation has not completed it will return an error.
28562	Result func(RouteFilterRulesClient) (autorest.Response, error)
28563}
28564
28565// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28566// long-running operation.
28567type RouteFiltersCreateOrUpdateFuture struct {
28568	azure.FutureAPI
28569	// Result returns the result of the asynchronous operation.
28570	// If the operation has not completed it will return an error.
28571	Result func(RouteFiltersClient) (RouteFilter, error)
28572}
28573
28574// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
28575// operation.
28576type RouteFiltersDeleteFuture 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(RouteFiltersClient) (autorest.Response, error)
28581}
28582
28583// RouteListResult response for the ListRoute API service call.
28584type RouteListResult struct {
28585	autorest.Response `json:"-"`
28586	// Value - A list of routes in a resource group.
28587	Value *[]Route `json:"value,omitempty"`
28588	// NextLink - The URL to get the next set of results.
28589	NextLink *string `json:"nextLink,omitempty"`
28590}
28591
28592// RouteListResultIterator provides access to a complete listing of Route values.
28593type RouteListResultIterator struct {
28594	i    int
28595	page RouteListResultPage
28596}
28597
28598// NextWithContext advances to the next value.  If there was an error making
28599// the request the iterator does not advance and the error is returned.
28600func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
28601	if tracing.IsEnabled() {
28602		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
28603		defer func() {
28604			sc := -1
28605			if iter.Response().Response.Response != nil {
28606				sc = iter.Response().Response.Response.StatusCode
28607			}
28608			tracing.EndSpan(ctx, sc, err)
28609		}()
28610	}
28611	iter.i++
28612	if iter.i < len(iter.page.Values()) {
28613		return nil
28614	}
28615	err = iter.page.NextWithContext(ctx)
28616	if err != nil {
28617		iter.i--
28618		return err
28619	}
28620	iter.i = 0
28621	return nil
28622}
28623
28624// Next advances to the next value.  If there was an error making
28625// the request the iterator does not advance and the error is returned.
28626// Deprecated: Use NextWithContext() instead.
28627func (iter *RouteListResultIterator) Next() error {
28628	return iter.NextWithContext(context.Background())
28629}
28630
28631// NotDone returns true if the enumeration should be started or is not yet complete.
28632func (iter RouteListResultIterator) NotDone() bool {
28633	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28634}
28635
28636// Response returns the raw server response from the last page request.
28637func (iter RouteListResultIterator) Response() RouteListResult {
28638	return iter.page.Response()
28639}
28640
28641// Value returns the current value or a zero-initialized value if the
28642// iterator has advanced beyond the end of the collection.
28643func (iter RouteListResultIterator) Value() Route {
28644	if !iter.page.NotDone() {
28645		return Route{}
28646	}
28647	return iter.page.Values()[iter.i]
28648}
28649
28650// Creates a new instance of the RouteListResultIterator type.
28651func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
28652	return RouteListResultIterator{page: page}
28653}
28654
28655// IsEmpty returns true if the ListResult contains no values.
28656func (rlr RouteListResult) IsEmpty() bool {
28657	return rlr.Value == nil || len(*rlr.Value) == 0
28658}
28659
28660// hasNextLink returns true if the NextLink is not empty.
28661func (rlr RouteListResult) hasNextLink() bool {
28662	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
28663}
28664
28665// routeListResultPreparer prepares a request to retrieve the next set of results.
28666// It returns nil if no more results exist.
28667func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
28668	if !rlr.hasNextLink() {
28669		return nil, nil
28670	}
28671	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28672		autorest.AsJSON(),
28673		autorest.AsGet(),
28674		autorest.WithBaseURL(to.String(rlr.NextLink)))
28675}
28676
28677// RouteListResultPage contains a page of Route values.
28678type RouteListResultPage struct {
28679	fn  func(context.Context, RouteListResult) (RouteListResult, error)
28680	rlr RouteListResult
28681}
28682
28683// NextWithContext advances to the next page of values.  If there was an error making
28684// the request the page does not advance and the error is returned.
28685func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
28686	if tracing.IsEnabled() {
28687		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
28688		defer func() {
28689			sc := -1
28690			if page.Response().Response.Response != nil {
28691				sc = page.Response().Response.Response.StatusCode
28692			}
28693			tracing.EndSpan(ctx, sc, err)
28694		}()
28695	}
28696	for {
28697		next, err := page.fn(ctx, page.rlr)
28698		if err != nil {
28699			return err
28700		}
28701		page.rlr = next
28702		if !next.hasNextLink() || !next.IsEmpty() {
28703			break
28704		}
28705	}
28706	return nil
28707}
28708
28709// Next advances to the next page of values.  If there was an error making
28710// the request the page does not advance and the error is returned.
28711// Deprecated: Use NextWithContext() instead.
28712func (page *RouteListResultPage) Next() error {
28713	return page.NextWithContext(context.Background())
28714}
28715
28716// NotDone returns true if the page enumeration should be started or is not yet complete.
28717func (page RouteListResultPage) NotDone() bool {
28718	return !page.rlr.IsEmpty()
28719}
28720
28721// Response returns the raw server response from the last page request.
28722func (page RouteListResultPage) Response() RouteListResult {
28723	return page.rlr
28724}
28725
28726// Values returns the slice of values for the current page or nil if there are no values.
28727func (page RouteListResultPage) Values() []Route {
28728	if page.rlr.IsEmpty() {
28729		return nil
28730	}
28731	return *page.rlr.Value
28732}
28733
28734// Creates a new instance of the RouteListResultPage type.
28735func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
28736	return RouteListResultPage{
28737		fn:  getNextPage,
28738		rlr: cur,
28739	}
28740}
28741
28742// RoutePropertiesFormat route resource.
28743type RoutePropertiesFormat struct {
28744	// AddressPrefix - The destination CIDR to which the route applies.
28745	AddressPrefix *string `json:"addressPrefix,omitempty"`
28746	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
28747	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
28748	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
28749	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
28750	// ProvisioningState - READ-ONLY; The provisioning state of the route resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
28751	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28752}
28753
28754// MarshalJSON is the custom marshaler for RoutePropertiesFormat.
28755func (rpf RoutePropertiesFormat) MarshalJSON() ([]byte, error) {
28756	objectMap := make(map[string]interface{})
28757	if rpf.AddressPrefix != nil {
28758		objectMap["addressPrefix"] = rpf.AddressPrefix
28759	}
28760	if rpf.NextHopType != "" {
28761		objectMap["nextHopType"] = rpf.NextHopType
28762	}
28763	if rpf.NextHopIPAddress != nil {
28764		objectMap["nextHopIpAddress"] = rpf.NextHopIPAddress
28765	}
28766	return json.Marshal(objectMap)
28767}
28768
28769// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
28770// operation.
28771type RoutesCreateOrUpdateFuture struct {
28772	azure.FutureAPI
28773	// Result returns the result of the asynchronous operation.
28774	// If the operation has not completed it will return an error.
28775	Result func(RoutesClient) (Route, error)
28776}
28777
28778// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
28779type RoutesDeleteFuture struct {
28780	azure.FutureAPI
28781	// Result returns the result of the asynchronous operation.
28782	// If the operation has not completed it will return an error.
28783	Result func(RoutesClient) (autorest.Response, error)
28784}
28785
28786// RouteTable route table resource.
28787type RouteTable struct {
28788	autorest.Response `json:"-"`
28789	// RouteTablePropertiesFormat - Properties of the route table.
28790	*RouteTablePropertiesFormat `json:"properties,omitempty"`
28791	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
28792	Etag *string `json:"etag,omitempty"`
28793	// ID - Resource ID.
28794	ID *string `json:"id,omitempty"`
28795	// Name - READ-ONLY; Resource name.
28796	Name *string `json:"name,omitempty"`
28797	// Type - READ-ONLY; Resource type.
28798	Type *string `json:"type,omitempty"`
28799	// Location - Resource location.
28800	Location *string `json:"location,omitempty"`
28801	// Tags - Resource tags.
28802	Tags map[string]*string `json:"tags"`
28803}
28804
28805// MarshalJSON is the custom marshaler for RouteTable.
28806func (rt RouteTable) MarshalJSON() ([]byte, error) {
28807	objectMap := make(map[string]interface{})
28808	if rt.RouteTablePropertiesFormat != nil {
28809		objectMap["properties"] = rt.RouteTablePropertiesFormat
28810	}
28811	if rt.ID != nil {
28812		objectMap["id"] = rt.ID
28813	}
28814	if rt.Location != nil {
28815		objectMap["location"] = rt.Location
28816	}
28817	if rt.Tags != nil {
28818		objectMap["tags"] = rt.Tags
28819	}
28820	return json.Marshal(objectMap)
28821}
28822
28823// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
28824func (rt *RouteTable) UnmarshalJSON(body []byte) error {
28825	var m map[string]*json.RawMessage
28826	err := json.Unmarshal(body, &m)
28827	if err != nil {
28828		return err
28829	}
28830	for k, v := range m {
28831		switch k {
28832		case "properties":
28833			if v != nil {
28834				var routeTablePropertiesFormat RouteTablePropertiesFormat
28835				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
28836				if err != nil {
28837					return err
28838				}
28839				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
28840			}
28841		case "etag":
28842			if v != nil {
28843				var etag string
28844				err = json.Unmarshal(*v, &etag)
28845				if err != nil {
28846					return err
28847				}
28848				rt.Etag = &etag
28849			}
28850		case "id":
28851			if v != nil {
28852				var ID string
28853				err = json.Unmarshal(*v, &ID)
28854				if err != nil {
28855					return err
28856				}
28857				rt.ID = &ID
28858			}
28859		case "name":
28860			if v != nil {
28861				var name string
28862				err = json.Unmarshal(*v, &name)
28863				if err != nil {
28864					return err
28865				}
28866				rt.Name = &name
28867			}
28868		case "type":
28869			if v != nil {
28870				var typeVar string
28871				err = json.Unmarshal(*v, &typeVar)
28872				if err != nil {
28873					return err
28874				}
28875				rt.Type = &typeVar
28876			}
28877		case "location":
28878			if v != nil {
28879				var location string
28880				err = json.Unmarshal(*v, &location)
28881				if err != nil {
28882					return err
28883				}
28884				rt.Location = &location
28885			}
28886		case "tags":
28887			if v != nil {
28888				var tags map[string]*string
28889				err = json.Unmarshal(*v, &tags)
28890				if err != nil {
28891					return err
28892				}
28893				rt.Tags = tags
28894			}
28895		}
28896	}
28897
28898	return nil
28899}
28900
28901// RouteTableListResult response for the ListRouteTable API service call.
28902type RouteTableListResult struct {
28903	autorest.Response `json:"-"`
28904	// Value - A list of route tables in a resource group.
28905	Value *[]RouteTable `json:"value,omitempty"`
28906	// NextLink - The URL to get the next set of results.
28907	NextLink *string `json:"nextLink,omitempty"`
28908}
28909
28910// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
28911type RouteTableListResultIterator struct {
28912	i    int
28913	page RouteTableListResultPage
28914}
28915
28916// NextWithContext advances to the next value.  If there was an error making
28917// the request the iterator does not advance and the error is returned.
28918func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
28919	if tracing.IsEnabled() {
28920		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
28921		defer func() {
28922			sc := -1
28923			if iter.Response().Response.Response != nil {
28924				sc = iter.Response().Response.Response.StatusCode
28925			}
28926			tracing.EndSpan(ctx, sc, err)
28927		}()
28928	}
28929	iter.i++
28930	if iter.i < len(iter.page.Values()) {
28931		return nil
28932	}
28933	err = iter.page.NextWithContext(ctx)
28934	if err != nil {
28935		iter.i--
28936		return err
28937	}
28938	iter.i = 0
28939	return nil
28940}
28941
28942// Next advances to the next value.  If there was an error making
28943// the request the iterator does not advance and the error is returned.
28944// Deprecated: Use NextWithContext() instead.
28945func (iter *RouteTableListResultIterator) Next() error {
28946	return iter.NextWithContext(context.Background())
28947}
28948
28949// NotDone returns true if the enumeration should be started or is not yet complete.
28950func (iter RouteTableListResultIterator) NotDone() bool {
28951	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28952}
28953
28954// Response returns the raw server response from the last page request.
28955func (iter RouteTableListResultIterator) Response() RouteTableListResult {
28956	return iter.page.Response()
28957}
28958
28959// Value returns the current value or a zero-initialized value if the
28960// iterator has advanced beyond the end of the collection.
28961func (iter RouteTableListResultIterator) Value() RouteTable {
28962	if !iter.page.NotDone() {
28963		return RouteTable{}
28964	}
28965	return iter.page.Values()[iter.i]
28966}
28967
28968// Creates a new instance of the RouteTableListResultIterator type.
28969func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
28970	return RouteTableListResultIterator{page: page}
28971}
28972
28973// IsEmpty returns true if the ListResult contains no values.
28974func (rtlr RouteTableListResult) IsEmpty() bool {
28975	return rtlr.Value == nil || len(*rtlr.Value) == 0
28976}
28977
28978// hasNextLink returns true if the NextLink is not empty.
28979func (rtlr RouteTableListResult) hasNextLink() bool {
28980	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
28981}
28982
28983// routeTableListResultPreparer prepares a request to retrieve the next set of results.
28984// It returns nil if no more results exist.
28985func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
28986	if !rtlr.hasNextLink() {
28987		return nil, nil
28988	}
28989	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28990		autorest.AsJSON(),
28991		autorest.AsGet(),
28992		autorest.WithBaseURL(to.String(rtlr.NextLink)))
28993}
28994
28995// RouteTableListResultPage contains a page of RouteTable values.
28996type RouteTableListResultPage struct {
28997	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
28998	rtlr RouteTableListResult
28999}
29000
29001// NextWithContext advances to the next page of values.  If there was an error making
29002// the request the page does not advance and the error is returned.
29003func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
29004	if tracing.IsEnabled() {
29005		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
29006		defer func() {
29007			sc := -1
29008			if page.Response().Response.Response != nil {
29009				sc = page.Response().Response.Response.StatusCode
29010			}
29011			tracing.EndSpan(ctx, sc, err)
29012		}()
29013	}
29014	for {
29015		next, err := page.fn(ctx, page.rtlr)
29016		if err != nil {
29017			return err
29018		}
29019		page.rtlr = next
29020		if !next.hasNextLink() || !next.IsEmpty() {
29021			break
29022		}
29023	}
29024	return nil
29025}
29026
29027// Next advances to the next page of values.  If there was an error making
29028// the request the page does not advance and the error is returned.
29029// Deprecated: Use NextWithContext() instead.
29030func (page *RouteTableListResultPage) Next() error {
29031	return page.NextWithContext(context.Background())
29032}
29033
29034// NotDone returns true if the page enumeration should be started or is not yet complete.
29035func (page RouteTableListResultPage) NotDone() bool {
29036	return !page.rtlr.IsEmpty()
29037}
29038
29039// Response returns the raw server response from the last page request.
29040func (page RouteTableListResultPage) Response() RouteTableListResult {
29041	return page.rtlr
29042}
29043
29044// Values returns the slice of values for the current page or nil if there are no values.
29045func (page RouteTableListResultPage) Values() []RouteTable {
29046	if page.rtlr.IsEmpty() {
29047		return nil
29048	}
29049	return *page.rtlr.Value
29050}
29051
29052// Creates a new instance of the RouteTableListResultPage type.
29053func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
29054	return RouteTableListResultPage{
29055		fn:   getNextPage,
29056		rtlr: cur,
29057	}
29058}
29059
29060// RouteTablePropertiesFormat route Table resource.
29061type RouteTablePropertiesFormat struct {
29062	// Routes - Collection of routes contained within a route table.
29063	Routes *[]Route `json:"routes,omitempty"`
29064	// Subnets - READ-ONLY; A collection of references to subnets.
29065	Subnets *[]Subnet `json:"subnets,omitempty"`
29066	// DisableBgpRoutePropagation - Whether to disable the routes learned by BGP on that route table. True means disable.
29067	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
29068	// ProvisioningState - READ-ONLY; The provisioning state of the route table resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29069	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29070}
29071
29072// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
29073func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
29074	objectMap := make(map[string]interface{})
29075	if rtpf.Routes != nil {
29076		objectMap["routes"] = rtpf.Routes
29077	}
29078	if rtpf.DisableBgpRoutePropagation != nil {
29079		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
29080	}
29081	return json.Marshal(objectMap)
29082}
29083
29084// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29085// long-running operation.
29086type RouteTablesCreateOrUpdateFuture struct {
29087	azure.FutureAPI
29088	// Result returns the result of the asynchronous operation.
29089	// If the operation has not completed it will return an error.
29090	Result func(RouteTablesClient) (RouteTable, error)
29091}
29092
29093// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29094// operation.
29095type RouteTablesDeleteFuture struct {
29096	azure.FutureAPI
29097	// Result returns the result of the asynchronous operation.
29098	// If the operation has not completed it will return an error.
29099	Result func(RouteTablesClient) (autorest.Response, error)
29100}
29101
29102// RoutingConfiguration routing Configuration indicating the associated and propagated route tables for
29103// this connection.
29104type RoutingConfiguration struct {
29105	// AssociatedRouteTable - The resource id RouteTable associated with this RoutingConfiguration.
29106	AssociatedRouteTable *SubResource `json:"associatedRouteTable,omitempty"`
29107	// PropagatedRouteTables - The list of RouteTables to advertise the routes to.
29108	PropagatedRouteTables *PropagatedRouteTable `json:"propagatedRouteTables,omitempty"`
29109	// VnetRoutes - List of routes that control routing from VirtualHub into a virtual network connection.
29110	VnetRoutes *VnetRoute `json:"vnetRoutes,omitempty"`
29111}
29112
29113// Rule rule of type network.
29114type Rule struct {
29115	// IPProtocols - Array of FirewallPolicyRuleNetworkProtocols.
29116	IPProtocols *[]FirewallPolicyRuleNetworkProtocol `json:"ipProtocols,omitempty"`
29117	// SourceAddresses - List of source IP addresses for this rule.
29118	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
29119	// DestinationAddresses - List of destination IP addresses or Service Tags.
29120	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
29121	// DestinationPorts - List of destination ports.
29122	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
29123	// SourceIPGroups - List of source IpGroups for this rule.
29124	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
29125	// DestinationIPGroups - List of destination IpGroups for this rule.
29126	DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"`
29127	// DestinationFqdns - List of destination FQDNs.
29128	DestinationFqdns *[]string `json:"destinationFqdns,omitempty"`
29129	// Name - Name of the rule.
29130	Name *string `json:"name,omitempty"`
29131	// Description - Description of the rule.
29132	Description *string `json:"description,omitempty"`
29133	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule'
29134	RuleType RuleType `json:"ruleType,omitempty"`
29135}
29136
29137// MarshalJSON is the custom marshaler for Rule.
29138func (r Rule) MarshalJSON() ([]byte, error) {
29139	r.RuleType = RuleTypeNetworkRule
29140	objectMap := make(map[string]interface{})
29141	if r.IPProtocols != nil {
29142		objectMap["ipProtocols"] = r.IPProtocols
29143	}
29144	if r.SourceAddresses != nil {
29145		objectMap["sourceAddresses"] = r.SourceAddresses
29146	}
29147	if r.DestinationAddresses != nil {
29148		objectMap["destinationAddresses"] = r.DestinationAddresses
29149	}
29150	if r.DestinationPorts != nil {
29151		objectMap["destinationPorts"] = r.DestinationPorts
29152	}
29153	if r.SourceIPGroups != nil {
29154		objectMap["sourceIpGroups"] = r.SourceIPGroups
29155	}
29156	if r.DestinationIPGroups != nil {
29157		objectMap["destinationIpGroups"] = r.DestinationIPGroups
29158	}
29159	if r.DestinationFqdns != nil {
29160		objectMap["destinationFqdns"] = r.DestinationFqdns
29161	}
29162	if r.Name != nil {
29163		objectMap["name"] = r.Name
29164	}
29165	if r.Description != nil {
29166		objectMap["description"] = r.Description
29167	}
29168	if r.RuleType != "" {
29169		objectMap["ruleType"] = r.RuleType
29170	}
29171	return json.Marshal(objectMap)
29172}
29173
29174// AsApplicationRule is the BasicFirewallPolicyRule implementation for Rule.
29175func (r Rule) AsApplicationRule() (*ApplicationRule, bool) {
29176	return nil, false
29177}
29178
29179// AsNatRule is the BasicFirewallPolicyRule implementation for Rule.
29180func (r Rule) AsNatRule() (*NatRule, bool) {
29181	return nil, false
29182}
29183
29184// AsRule is the BasicFirewallPolicyRule implementation for Rule.
29185func (r Rule) AsRule() (*Rule, bool) {
29186	return &r, true
29187}
29188
29189// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for Rule.
29190func (r Rule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
29191	return nil, false
29192}
29193
29194// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for Rule.
29195func (r Rule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
29196	return &r, true
29197}
29198
29199// SecurityGroup networkSecurityGroup resource.
29200type SecurityGroup struct {
29201	autorest.Response `json:"-"`
29202	// SecurityGroupPropertiesFormat - Properties of the network security group.
29203	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
29204	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29205	Etag *string `json:"etag,omitempty"`
29206	// ID - Resource ID.
29207	ID *string `json:"id,omitempty"`
29208	// Name - READ-ONLY; Resource name.
29209	Name *string `json:"name,omitempty"`
29210	// Type - READ-ONLY; Resource type.
29211	Type *string `json:"type,omitempty"`
29212	// Location - Resource location.
29213	Location *string `json:"location,omitempty"`
29214	// Tags - Resource tags.
29215	Tags map[string]*string `json:"tags"`
29216}
29217
29218// MarshalJSON is the custom marshaler for SecurityGroup.
29219func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
29220	objectMap := make(map[string]interface{})
29221	if sg.SecurityGroupPropertiesFormat != nil {
29222		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
29223	}
29224	if sg.ID != nil {
29225		objectMap["id"] = sg.ID
29226	}
29227	if sg.Location != nil {
29228		objectMap["location"] = sg.Location
29229	}
29230	if sg.Tags != nil {
29231		objectMap["tags"] = sg.Tags
29232	}
29233	return json.Marshal(objectMap)
29234}
29235
29236// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
29237func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
29238	var m map[string]*json.RawMessage
29239	err := json.Unmarshal(body, &m)
29240	if err != nil {
29241		return err
29242	}
29243	for k, v := range m {
29244		switch k {
29245		case "properties":
29246			if v != nil {
29247				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
29248				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
29249				if err != nil {
29250					return err
29251				}
29252				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
29253			}
29254		case "etag":
29255			if v != nil {
29256				var etag string
29257				err = json.Unmarshal(*v, &etag)
29258				if err != nil {
29259					return err
29260				}
29261				sg.Etag = &etag
29262			}
29263		case "id":
29264			if v != nil {
29265				var ID string
29266				err = json.Unmarshal(*v, &ID)
29267				if err != nil {
29268					return err
29269				}
29270				sg.ID = &ID
29271			}
29272		case "name":
29273			if v != nil {
29274				var name string
29275				err = json.Unmarshal(*v, &name)
29276				if err != nil {
29277					return err
29278				}
29279				sg.Name = &name
29280			}
29281		case "type":
29282			if v != nil {
29283				var typeVar string
29284				err = json.Unmarshal(*v, &typeVar)
29285				if err != nil {
29286					return err
29287				}
29288				sg.Type = &typeVar
29289			}
29290		case "location":
29291			if v != nil {
29292				var location string
29293				err = json.Unmarshal(*v, &location)
29294				if err != nil {
29295					return err
29296				}
29297				sg.Location = &location
29298			}
29299		case "tags":
29300			if v != nil {
29301				var tags map[string]*string
29302				err = json.Unmarshal(*v, &tags)
29303				if err != nil {
29304					return err
29305				}
29306				sg.Tags = tags
29307			}
29308		}
29309	}
29310
29311	return nil
29312}
29313
29314// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
29315type SecurityGroupListResult struct {
29316	autorest.Response `json:"-"`
29317	// Value - A list of NetworkSecurityGroup resources.
29318	Value *[]SecurityGroup `json:"value,omitempty"`
29319	// NextLink - The URL to get the next set of results.
29320	NextLink *string `json:"nextLink,omitempty"`
29321}
29322
29323// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
29324type SecurityGroupListResultIterator struct {
29325	i    int
29326	page SecurityGroupListResultPage
29327}
29328
29329// NextWithContext advances to the next value.  If there was an error making
29330// the request the iterator does not advance and the error is returned.
29331func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
29332	if tracing.IsEnabled() {
29333		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
29334		defer func() {
29335			sc := -1
29336			if iter.Response().Response.Response != nil {
29337				sc = iter.Response().Response.Response.StatusCode
29338			}
29339			tracing.EndSpan(ctx, sc, err)
29340		}()
29341	}
29342	iter.i++
29343	if iter.i < len(iter.page.Values()) {
29344		return nil
29345	}
29346	err = iter.page.NextWithContext(ctx)
29347	if err != nil {
29348		iter.i--
29349		return err
29350	}
29351	iter.i = 0
29352	return nil
29353}
29354
29355// Next advances to the next value.  If there was an error making
29356// the request the iterator does not advance and the error is returned.
29357// Deprecated: Use NextWithContext() instead.
29358func (iter *SecurityGroupListResultIterator) Next() error {
29359	return iter.NextWithContext(context.Background())
29360}
29361
29362// NotDone returns true if the enumeration should be started or is not yet complete.
29363func (iter SecurityGroupListResultIterator) NotDone() bool {
29364	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29365}
29366
29367// Response returns the raw server response from the last page request.
29368func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
29369	return iter.page.Response()
29370}
29371
29372// Value returns the current value or a zero-initialized value if the
29373// iterator has advanced beyond the end of the collection.
29374func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
29375	if !iter.page.NotDone() {
29376		return SecurityGroup{}
29377	}
29378	return iter.page.Values()[iter.i]
29379}
29380
29381// Creates a new instance of the SecurityGroupListResultIterator type.
29382func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
29383	return SecurityGroupListResultIterator{page: page}
29384}
29385
29386// IsEmpty returns true if the ListResult contains no values.
29387func (sglr SecurityGroupListResult) IsEmpty() bool {
29388	return sglr.Value == nil || len(*sglr.Value) == 0
29389}
29390
29391// hasNextLink returns true if the NextLink is not empty.
29392func (sglr SecurityGroupListResult) hasNextLink() bool {
29393	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
29394}
29395
29396// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
29397// It returns nil if no more results exist.
29398func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
29399	if !sglr.hasNextLink() {
29400		return nil, nil
29401	}
29402	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29403		autorest.AsJSON(),
29404		autorest.AsGet(),
29405		autorest.WithBaseURL(to.String(sglr.NextLink)))
29406}
29407
29408// SecurityGroupListResultPage contains a page of SecurityGroup values.
29409type SecurityGroupListResultPage struct {
29410	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
29411	sglr SecurityGroupListResult
29412}
29413
29414// NextWithContext advances to the next page of values.  If there was an error making
29415// the request the page does not advance and the error is returned.
29416func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
29417	if tracing.IsEnabled() {
29418		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
29419		defer func() {
29420			sc := -1
29421			if page.Response().Response.Response != nil {
29422				sc = page.Response().Response.Response.StatusCode
29423			}
29424			tracing.EndSpan(ctx, sc, err)
29425		}()
29426	}
29427	for {
29428		next, err := page.fn(ctx, page.sglr)
29429		if err != nil {
29430			return err
29431		}
29432		page.sglr = next
29433		if !next.hasNextLink() || !next.IsEmpty() {
29434			break
29435		}
29436	}
29437	return nil
29438}
29439
29440// Next advances to the next page of values.  If there was an error making
29441// the request the page does not advance and the error is returned.
29442// Deprecated: Use NextWithContext() instead.
29443func (page *SecurityGroupListResultPage) Next() error {
29444	return page.NextWithContext(context.Background())
29445}
29446
29447// NotDone returns true if the page enumeration should be started or is not yet complete.
29448func (page SecurityGroupListResultPage) NotDone() bool {
29449	return !page.sglr.IsEmpty()
29450}
29451
29452// Response returns the raw server response from the last page request.
29453func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
29454	return page.sglr
29455}
29456
29457// Values returns the slice of values for the current page or nil if there are no values.
29458func (page SecurityGroupListResultPage) Values() []SecurityGroup {
29459	if page.sglr.IsEmpty() {
29460		return nil
29461	}
29462	return *page.sglr.Value
29463}
29464
29465// Creates a new instance of the SecurityGroupListResultPage type.
29466func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
29467	return SecurityGroupListResultPage{
29468		fn:   getNextPage,
29469		sglr: cur,
29470	}
29471}
29472
29473// SecurityGroupNetworkInterface network interface and all its associated security rules.
29474type SecurityGroupNetworkInterface struct {
29475	// ID - ID of the network interface.
29476	ID *string `json:"id,omitempty"`
29477	// SecurityRuleAssociations - All security rules associated with the network interface.
29478	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
29479}
29480
29481// SecurityGroupPropertiesFormat network Security Group resource.
29482type SecurityGroupPropertiesFormat struct {
29483	// SecurityRules - A collection of security rules of the network security group.
29484	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
29485	// DefaultSecurityRules - READ-ONLY; The default security rules of network security group.
29486	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
29487	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
29488	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
29489	// Subnets - READ-ONLY; A collection of references to subnets.
29490	Subnets *[]Subnet `json:"subnets,omitempty"`
29491	// FlowLogs - READ-ONLY; A collection of references to flow log resources.
29492	FlowLogs *[]FlowLog `json:"flowLogs,omitempty"`
29493	// ResourceGUID - READ-ONLY; The resource GUID property of the network security group resource.
29494	ResourceGUID *string `json:"resourceGuid,omitempty"`
29495	// ProvisioningState - READ-ONLY; The provisioning state of the network security group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29496	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29497}
29498
29499// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
29500func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
29501	objectMap := make(map[string]interface{})
29502	if sgpf.SecurityRules != nil {
29503		objectMap["securityRules"] = sgpf.SecurityRules
29504	}
29505	return json.Marshal(objectMap)
29506}
29507
29508// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
29509type SecurityGroupResult struct {
29510	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
29511	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
29512	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
29513	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
29514}
29515
29516// MarshalJSON is the custom marshaler for SecurityGroupResult.
29517func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
29518	objectMap := make(map[string]interface{})
29519	if sgr.SecurityRuleAccessResult != "" {
29520		objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
29521	}
29522	return json.Marshal(objectMap)
29523}
29524
29525// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29526// long-running operation.
29527type SecurityGroupsCreateOrUpdateFuture struct {
29528	azure.FutureAPI
29529	// Result returns the result of the asynchronous operation.
29530	// If the operation has not completed it will return an error.
29531	Result func(SecurityGroupsClient) (SecurityGroup, error)
29532}
29533
29534// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29535// operation.
29536type SecurityGroupsDeleteFuture struct {
29537	azure.FutureAPI
29538	// Result returns the result of the asynchronous operation.
29539	// If the operation has not completed it will return an error.
29540	Result func(SecurityGroupsClient) (autorest.Response, error)
29541}
29542
29543// SecurityGroupViewParameters parameters that define the VM to check security groups for.
29544type SecurityGroupViewParameters struct {
29545	// TargetResourceID - ID of the target VM.
29546	TargetResourceID *string `json:"targetResourceId,omitempty"`
29547}
29548
29549// SecurityGroupViewResult the information about security rules applied to the specified VM.
29550type SecurityGroupViewResult struct {
29551	autorest.Response `json:"-"`
29552	// NetworkInterfaces - List of network interfaces on the specified VM.
29553	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
29554}
29555
29556// SecurityPartnerProvider security Partner Provider resource.
29557type SecurityPartnerProvider struct {
29558	autorest.Response `json:"-"`
29559	// SecurityPartnerProviderPropertiesFormat - Properties of the Security Partner Provider.
29560	*SecurityPartnerProviderPropertiesFormat `json:"properties,omitempty"`
29561	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29562	Etag *string `json:"etag,omitempty"`
29563	// ID - Resource ID.
29564	ID *string `json:"id,omitempty"`
29565	// Name - READ-ONLY; Resource name.
29566	Name *string `json:"name,omitempty"`
29567	// Type - READ-ONLY; Resource type.
29568	Type *string `json:"type,omitempty"`
29569	// Location - Resource location.
29570	Location *string `json:"location,omitempty"`
29571	// Tags - Resource tags.
29572	Tags map[string]*string `json:"tags"`
29573}
29574
29575// MarshalJSON is the custom marshaler for SecurityPartnerProvider.
29576func (spp SecurityPartnerProvider) MarshalJSON() ([]byte, error) {
29577	objectMap := make(map[string]interface{})
29578	if spp.SecurityPartnerProviderPropertiesFormat != nil {
29579		objectMap["properties"] = spp.SecurityPartnerProviderPropertiesFormat
29580	}
29581	if spp.ID != nil {
29582		objectMap["id"] = spp.ID
29583	}
29584	if spp.Location != nil {
29585		objectMap["location"] = spp.Location
29586	}
29587	if spp.Tags != nil {
29588		objectMap["tags"] = spp.Tags
29589	}
29590	return json.Marshal(objectMap)
29591}
29592
29593// UnmarshalJSON is the custom unmarshaler for SecurityPartnerProvider struct.
29594func (spp *SecurityPartnerProvider) UnmarshalJSON(body []byte) error {
29595	var m map[string]*json.RawMessage
29596	err := json.Unmarshal(body, &m)
29597	if err != nil {
29598		return err
29599	}
29600	for k, v := range m {
29601		switch k {
29602		case "properties":
29603			if v != nil {
29604				var securityPartnerProviderPropertiesFormat SecurityPartnerProviderPropertiesFormat
29605				err = json.Unmarshal(*v, &securityPartnerProviderPropertiesFormat)
29606				if err != nil {
29607					return err
29608				}
29609				spp.SecurityPartnerProviderPropertiesFormat = &securityPartnerProviderPropertiesFormat
29610			}
29611		case "etag":
29612			if v != nil {
29613				var etag string
29614				err = json.Unmarshal(*v, &etag)
29615				if err != nil {
29616					return err
29617				}
29618				spp.Etag = &etag
29619			}
29620		case "id":
29621			if v != nil {
29622				var ID string
29623				err = json.Unmarshal(*v, &ID)
29624				if err != nil {
29625					return err
29626				}
29627				spp.ID = &ID
29628			}
29629		case "name":
29630			if v != nil {
29631				var name string
29632				err = json.Unmarshal(*v, &name)
29633				if err != nil {
29634					return err
29635				}
29636				spp.Name = &name
29637			}
29638		case "type":
29639			if v != nil {
29640				var typeVar string
29641				err = json.Unmarshal(*v, &typeVar)
29642				if err != nil {
29643					return err
29644				}
29645				spp.Type = &typeVar
29646			}
29647		case "location":
29648			if v != nil {
29649				var location string
29650				err = json.Unmarshal(*v, &location)
29651				if err != nil {
29652					return err
29653				}
29654				spp.Location = &location
29655			}
29656		case "tags":
29657			if v != nil {
29658				var tags map[string]*string
29659				err = json.Unmarshal(*v, &tags)
29660				if err != nil {
29661					return err
29662				}
29663				spp.Tags = tags
29664			}
29665		}
29666	}
29667
29668	return nil
29669}
29670
29671// SecurityPartnerProviderListResult response for ListSecurityPartnerProviders API service call.
29672type SecurityPartnerProviderListResult struct {
29673	autorest.Response `json:"-"`
29674	// Value - List of Security Partner Providers in a resource group.
29675	Value *[]SecurityPartnerProvider `json:"value,omitempty"`
29676	// NextLink - URL to get the next set of results.
29677	NextLink *string `json:"nextLink,omitempty"`
29678}
29679
29680// SecurityPartnerProviderListResultIterator provides access to a complete listing of
29681// SecurityPartnerProvider values.
29682type SecurityPartnerProviderListResultIterator struct {
29683	i    int
29684	page SecurityPartnerProviderListResultPage
29685}
29686
29687// NextWithContext advances to the next value.  If there was an error making
29688// the request the iterator does not advance and the error is returned.
29689func (iter *SecurityPartnerProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
29690	if tracing.IsEnabled() {
29691		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProviderListResultIterator.NextWithContext")
29692		defer func() {
29693			sc := -1
29694			if iter.Response().Response.Response != nil {
29695				sc = iter.Response().Response.Response.StatusCode
29696			}
29697			tracing.EndSpan(ctx, sc, err)
29698		}()
29699	}
29700	iter.i++
29701	if iter.i < len(iter.page.Values()) {
29702		return nil
29703	}
29704	err = iter.page.NextWithContext(ctx)
29705	if err != nil {
29706		iter.i--
29707		return err
29708	}
29709	iter.i = 0
29710	return nil
29711}
29712
29713// Next advances to the next value.  If there was an error making
29714// the request the iterator does not advance and the error is returned.
29715// Deprecated: Use NextWithContext() instead.
29716func (iter *SecurityPartnerProviderListResultIterator) Next() error {
29717	return iter.NextWithContext(context.Background())
29718}
29719
29720// NotDone returns true if the enumeration should be started or is not yet complete.
29721func (iter SecurityPartnerProviderListResultIterator) NotDone() bool {
29722	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29723}
29724
29725// Response returns the raw server response from the last page request.
29726func (iter SecurityPartnerProviderListResultIterator) Response() SecurityPartnerProviderListResult {
29727	return iter.page.Response()
29728}
29729
29730// Value returns the current value or a zero-initialized value if the
29731// iterator has advanced beyond the end of the collection.
29732func (iter SecurityPartnerProviderListResultIterator) Value() SecurityPartnerProvider {
29733	if !iter.page.NotDone() {
29734		return SecurityPartnerProvider{}
29735	}
29736	return iter.page.Values()[iter.i]
29737}
29738
29739// Creates a new instance of the SecurityPartnerProviderListResultIterator type.
29740func NewSecurityPartnerProviderListResultIterator(page SecurityPartnerProviderListResultPage) SecurityPartnerProviderListResultIterator {
29741	return SecurityPartnerProviderListResultIterator{page: page}
29742}
29743
29744// IsEmpty returns true if the ListResult contains no values.
29745func (spplr SecurityPartnerProviderListResult) IsEmpty() bool {
29746	return spplr.Value == nil || len(*spplr.Value) == 0
29747}
29748
29749// hasNextLink returns true if the NextLink is not empty.
29750func (spplr SecurityPartnerProviderListResult) hasNextLink() bool {
29751	return spplr.NextLink != nil && len(*spplr.NextLink) != 0
29752}
29753
29754// securityPartnerProviderListResultPreparer prepares a request to retrieve the next set of results.
29755// It returns nil if no more results exist.
29756func (spplr SecurityPartnerProviderListResult) securityPartnerProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
29757	if !spplr.hasNextLink() {
29758		return nil, nil
29759	}
29760	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29761		autorest.AsJSON(),
29762		autorest.AsGet(),
29763		autorest.WithBaseURL(to.String(spplr.NextLink)))
29764}
29765
29766// SecurityPartnerProviderListResultPage contains a page of SecurityPartnerProvider values.
29767type SecurityPartnerProviderListResultPage struct {
29768	fn    func(context.Context, SecurityPartnerProviderListResult) (SecurityPartnerProviderListResult, error)
29769	spplr SecurityPartnerProviderListResult
29770}
29771
29772// NextWithContext advances to the next page of values.  If there was an error making
29773// the request the page does not advance and the error is returned.
29774func (page *SecurityPartnerProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
29775	if tracing.IsEnabled() {
29776		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProviderListResultPage.NextWithContext")
29777		defer func() {
29778			sc := -1
29779			if page.Response().Response.Response != nil {
29780				sc = page.Response().Response.Response.StatusCode
29781			}
29782			tracing.EndSpan(ctx, sc, err)
29783		}()
29784	}
29785	for {
29786		next, err := page.fn(ctx, page.spplr)
29787		if err != nil {
29788			return err
29789		}
29790		page.spplr = next
29791		if !next.hasNextLink() || !next.IsEmpty() {
29792			break
29793		}
29794	}
29795	return nil
29796}
29797
29798// Next advances to the next page of values.  If there was an error making
29799// the request the page does not advance and the error is returned.
29800// Deprecated: Use NextWithContext() instead.
29801func (page *SecurityPartnerProviderListResultPage) Next() error {
29802	return page.NextWithContext(context.Background())
29803}
29804
29805// NotDone returns true if the page enumeration should be started or is not yet complete.
29806func (page SecurityPartnerProviderListResultPage) NotDone() bool {
29807	return !page.spplr.IsEmpty()
29808}
29809
29810// Response returns the raw server response from the last page request.
29811func (page SecurityPartnerProviderListResultPage) Response() SecurityPartnerProviderListResult {
29812	return page.spplr
29813}
29814
29815// Values returns the slice of values for the current page or nil if there are no values.
29816func (page SecurityPartnerProviderListResultPage) Values() []SecurityPartnerProvider {
29817	if page.spplr.IsEmpty() {
29818		return nil
29819	}
29820	return *page.spplr.Value
29821}
29822
29823// Creates a new instance of the SecurityPartnerProviderListResultPage type.
29824func NewSecurityPartnerProviderListResultPage(cur SecurityPartnerProviderListResult, getNextPage func(context.Context, SecurityPartnerProviderListResult) (SecurityPartnerProviderListResult, error)) SecurityPartnerProviderListResultPage {
29825	return SecurityPartnerProviderListResultPage{
29826		fn:    getNextPage,
29827		spplr: cur,
29828	}
29829}
29830
29831// SecurityPartnerProviderPropertiesFormat properties of the Security Partner Provider.
29832type SecurityPartnerProviderPropertiesFormat struct {
29833	// ProvisioningState - READ-ONLY; The provisioning state of the Security Partner Provider resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29834	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29835	// SecurityProviderName - The security provider name. Possible values include: 'ZScaler', 'IBoss', 'Checkpoint'
29836	SecurityProviderName SecurityProviderName `json:"securityProviderName,omitempty"`
29837	// ConnectionStatus - READ-ONLY; The connection status with the Security Partner Provider. Possible values include: 'SecurityPartnerProviderConnectionStatusUnknown', 'SecurityPartnerProviderConnectionStatusPartiallyConnected', 'SecurityPartnerProviderConnectionStatusConnected', 'SecurityPartnerProviderConnectionStatusNotConnected'
29838	ConnectionStatus SecurityPartnerProviderConnectionStatus `json:"connectionStatus,omitempty"`
29839	// VirtualHub - The virtualHub to which the Security Partner Provider belongs.
29840	VirtualHub *SubResource `json:"virtualHub,omitempty"`
29841}
29842
29843// MarshalJSON is the custom marshaler for SecurityPartnerProviderPropertiesFormat.
29844func (spppf SecurityPartnerProviderPropertiesFormat) MarshalJSON() ([]byte, error) {
29845	objectMap := make(map[string]interface{})
29846	if spppf.SecurityProviderName != "" {
29847		objectMap["securityProviderName"] = spppf.SecurityProviderName
29848	}
29849	if spppf.VirtualHub != nil {
29850		objectMap["virtualHub"] = spppf.VirtualHub
29851	}
29852	return json.Marshal(objectMap)
29853}
29854
29855// SecurityPartnerProvidersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
29856// a long-running operation.
29857type SecurityPartnerProvidersCreateOrUpdateFuture struct {
29858	azure.FutureAPI
29859	// Result returns the result of the asynchronous operation.
29860	// If the operation has not completed it will return an error.
29861	Result func(SecurityPartnerProvidersClient) (SecurityPartnerProvider, error)
29862}
29863
29864// SecurityPartnerProvidersDeleteFuture an abstraction for monitoring and retrieving the results of a
29865// long-running operation.
29866type SecurityPartnerProvidersDeleteFuture struct {
29867	azure.FutureAPI
29868	// Result returns the result of the asynchronous operation.
29869	// If the operation has not completed it will return an error.
29870	Result func(SecurityPartnerProvidersClient) (autorest.Response, error)
29871}
29872
29873// SecurityRule network security rule.
29874type SecurityRule struct {
29875	autorest.Response `json:"-"`
29876	// SecurityRulePropertiesFormat - Properties of the security rule.
29877	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
29878	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29879	Name *string `json:"name,omitempty"`
29880	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29881	Etag *string `json:"etag,omitempty"`
29882	// ID - Resource ID.
29883	ID *string `json:"id,omitempty"`
29884}
29885
29886// MarshalJSON is the custom marshaler for SecurityRule.
29887func (sr SecurityRule) MarshalJSON() ([]byte, error) {
29888	objectMap := make(map[string]interface{})
29889	if sr.SecurityRulePropertiesFormat != nil {
29890		objectMap["properties"] = sr.SecurityRulePropertiesFormat
29891	}
29892	if sr.Name != nil {
29893		objectMap["name"] = sr.Name
29894	}
29895	if sr.ID != nil {
29896		objectMap["id"] = sr.ID
29897	}
29898	return json.Marshal(objectMap)
29899}
29900
29901// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
29902func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
29903	var m map[string]*json.RawMessage
29904	err := json.Unmarshal(body, &m)
29905	if err != nil {
29906		return err
29907	}
29908	for k, v := range m {
29909		switch k {
29910		case "properties":
29911			if v != nil {
29912				var securityRulePropertiesFormat SecurityRulePropertiesFormat
29913				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
29914				if err != nil {
29915					return err
29916				}
29917				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
29918			}
29919		case "name":
29920			if v != nil {
29921				var name string
29922				err = json.Unmarshal(*v, &name)
29923				if err != nil {
29924					return err
29925				}
29926				sr.Name = &name
29927			}
29928		case "etag":
29929			if v != nil {
29930				var etag string
29931				err = json.Unmarshal(*v, &etag)
29932				if err != nil {
29933					return err
29934				}
29935				sr.Etag = &etag
29936			}
29937		case "id":
29938			if v != nil {
29939				var ID string
29940				err = json.Unmarshal(*v, &ID)
29941				if err != nil {
29942					return err
29943				}
29944				sr.ID = &ID
29945			}
29946		}
29947	}
29948
29949	return nil
29950}
29951
29952// SecurityRuleAssociations all security rules associated with the network interface.
29953type SecurityRuleAssociations struct {
29954	// NetworkInterfaceAssociation - Network interface and it's custom security rules.
29955	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
29956	// SubnetAssociation - Subnet and it's custom security rules.
29957	SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"`
29958	// DefaultSecurityRules - Collection of default security rules of the network security group.
29959	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
29960	// EffectiveSecurityRules - Collection of effective security rules.
29961	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
29962}
29963
29964// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
29965// belongs to a network security group.
29966type SecurityRuleListResult struct {
29967	autorest.Response `json:"-"`
29968	// Value - The security rules in a network security group.
29969	Value *[]SecurityRule `json:"value,omitempty"`
29970	// NextLink - The URL to get the next set of results.
29971	NextLink *string `json:"nextLink,omitempty"`
29972}
29973
29974// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
29975type SecurityRuleListResultIterator struct {
29976	i    int
29977	page SecurityRuleListResultPage
29978}
29979
29980// NextWithContext advances to the next value.  If there was an error making
29981// the request the iterator does not advance and the error is returned.
29982func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
29983	if tracing.IsEnabled() {
29984		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
29985		defer func() {
29986			sc := -1
29987			if iter.Response().Response.Response != nil {
29988				sc = iter.Response().Response.Response.StatusCode
29989			}
29990			tracing.EndSpan(ctx, sc, err)
29991		}()
29992	}
29993	iter.i++
29994	if iter.i < len(iter.page.Values()) {
29995		return nil
29996	}
29997	err = iter.page.NextWithContext(ctx)
29998	if err != nil {
29999		iter.i--
30000		return err
30001	}
30002	iter.i = 0
30003	return nil
30004}
30005
30006// Next advances to the next value.  If there was an error making
30007// the request the iterator does not advance and the error is returned.
30008// Deprecated: Use NextWithContext() instead.
30009func (iter *SecurityRuleListResultIterator) Next() error {
30010	return iter.NextWithContext(context.Background())
30011}
30012
30013// NotDone returns true if the enumeration should be started or is not yet complete.
30014func (iter SecurityRuleListResultIterator) NotDone() bool {
30015	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30016}
30017
30018// Response returns the raw server response from the last page request.
30019func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
30020	return iter.page.Response()
30021}
30022
30023// Value returns the current value or a zero-initialized value if the
30024// iterator has advanced beyond the end of the collection.
30025func (iter SecurityRuleListResultIterator) Value() SecurityRule {
30026	if !iter.page.NotDone() {
30027		return SecurityRule{}
30028	}
30029	return iter.page.Values()[iter.i]
30030}
30031
30032// Creates a new instance of the SecurityRuleListResultIterator type.
30033func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
30034	return SecurityRuleListResultIterator{page: page}
30035}
30036
30037// IsEmpty returns true if the ListResult contains no values.
30038func (srlr SecurityRuleListResult) IsEmpty() bool {
30039	return srlr.Value == nil || len(*srlr.Value) == 0
30040}
30041
30042// hasNextLink returns true if the NextLink is not empty.
30043func (srlr SecurityRuleListResult) hasNextLink() bool {
30044	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
30045}
30046
30047// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
30048// It returns nil if no more results exist.
30049func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
30050	if !srlr.hasNextLink() {
30051		return nil, nil
30052	}
30053	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30054		autorest.AsJSON(),
30055		autorest.AsGet(),
30056		autorest.WithBaseURL(to.String(srlr.NextLink)))
30057}
30058
30059// SecurityRuleListResultPage contains a page of SecurityRule values.
30060type SecurityRuleListResultPage struct {
30061	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
30062	srlr SecurityRuleListResult
30063}
30064
30065// NextWithContext advances to the next page of values.  If there was an error making
30066// the request the page does not advance and the error is returned.
30067func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
30068	if tracing.IsEnabled() {
30069		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
30070		defer func() {
30071			sc := -1
30072			if page.Response().Response.Response != nil {
30073				sc = page.Response().Response.Response.StatusCode
30074			}
30075			tracing.EndSpan(ctx, sc, err)
30076		}()
30077	}
30078	for {
30079		next, err := page.fn(ctx, page.srlr)
30080		if err != nil {
30081			return err
30082		}
30083		page.srlr = next
30084		if !next.hasNextLink() || !next.IsEmpty() {
30085			break
30086		}
30087	}
30088	return nil
30089}
30090
30091// Next advances to the next page of values.  If there was an error making
30092// the request the page does not advance and the error is returned.
30093// Deprecated: Use NextWithContext() instead.
30094func (page *SecurityRuleListResultPage) Next() error {
30095	return page.NextWithContext(context.Background())
30096}
30097
30098// NotDone returns true if the page enumeration should be started or is not yet complete.
30099func (page SecurityRuleListResultPage) NotDone() bool {
30100	return !page.srlr.IsEmpty()
30101}
30102
30103// Response returns the raw server response from the last page request.
30104func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
30105	return page.srlr
30106}
30107
30108// Values returns the slice of values for the current page or nil if there are no values.
30109func (page SecurityRuleListResultPage) Values() []SecurityRule {
30110	if page.srlr.IsEmpty() {
30111		return nil
30112	}
30113	return *page.srlr.Value
30114}
30115
30116// Creates a new instance of the SecurityRuleListResultPage type.
30117func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
30118	return SecurityRuleListResultPage{
30119		fn:   getNextPage,
30120		srlr: cur,
30121	}
30122}
30123
30124// SecurityRulePropertiesFormat security rule resource.
30125type SecurityRulePropertiesFormat struct {
30126	// Description - A description for this rule. Restricted to 140 chars.
30127	Description *string `json:"description,omitempty"`
30128	// Protocol - Network protocol this rule applies to. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolIcmp', 'SecurityRuleProtocolEsp', 'SecurityRuleProtocolAsterisk', 'SecurityRuleProtocolAh'
30129	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
30130	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
30131	SourcePortRange *string `json:"sourcePortRange,omitempty"`
30132	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
30133	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
30134	// 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.
30135	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
30136	// SourceAddressPrefixes - The CIDR or source IP ranges.
30137	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
30138	// SourceApplicationSecurityGroups - The application security group specified as source.
30139	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
30140	// 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.
30141	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
30142	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
30143	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
30144	// DestinationApplicationSecurityGroups - The application security group specified as destination.
30145	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
30146	// SourcePortRanges - The source port ranges.
30147	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
30148	// DestinationPortRanges - The destination port ranges.
30149	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
30150	// Access - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
30151	Access SecurityRuleAccess `json:"access,omitempty"`
30152	// 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.
30153	Priority *int32 `json:"priority,omitempty"`
30154	// Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
30155	Direction SecurityRuleDirection `json:"direction,omitempty"`
30156	// ProvisioningState - READ-ONLY; The provisioning state of the security rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30157	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30158}
30159
30160// MarshalJSON is the custom marshaler for SecurityRulePropertiesFormat.
30161func (srpf SecurityRulePropertiesFormat) MarshalJSON() ([]byte, error) {
30162	objectMap := make(map[string]interface{})
30163	if srpf.Description != nil {
30164		objectMap["description"] = srpf.Description
30165	}
30166	if srpf.Protocol != "" {
30167		objectMap["protocol"] = srpf.Protocol
30168	}
30169	if srpf.SourcePortRange != nil {
30170		objectMap["sourcePortRange"] = srpf.SourcePortRange
30171	}
30172	if srpf.DestinationPortRange != nil {
30173		objectMap["destinationPortRange"] = srpf.DestinationPortRange
30174	}
30175	if srpf.SourceAddressPrefix != nil {
30176		objectMap["sourceAddressPrefix"] = srpf.SourceAddressPrefix
30177	}
30178	if srpf.SourceAddressPrefixes != nil {
30179		objectMap["sourceAddressPrefixes"] = srpf.SourceAddressPrefixes
30180	}
30181	if srpf.SourceApplicationSecurityGroups != nil {
30182		objectMap["sourceApplicationSecurityGroups"] = srpf.SourceApplicationSecurityGroups
30183	}
30184	if srpf.DestinationAddressPrefix != nil {
30185		objectMap["destinationAddressPrefix"] = srpf.DestinationAddressPrefix
30186	}
30187	if srpf.DestinationAddressPrefixes != nil {
30188		objectMap["destinationAddressPrefixes"] = srpf.DestinationAddressPrefixes
30189	}
30190	if srpf.DestinationApplicationSecurityGroups != nil {
30191		objectMap["destinationApplicationSecurityGroups"] = srpf.DestinationApplicationSecurityGroups
30192	}
30193	if srpf.SourcePortRanges != nil {
30194		objectMap["sourcePortRanges"] = srpf.SourcePortRanges
30195	}
30196	if srpf.DestinationPortRanges != nil {
30197		objectMap["destinationPortRanges"] = srpf.DestinationPortRanges
30198	}
30199	if srpf.Access != "" {
30200		objectMap["access"] = srpf.Access
30201	}
30202	if srpf.Priority != nil {
30203		objectMap["priority"] = srpf.Priority
30204	}
30205	if srpf.Direction != "" {
30206		objectMap["direction"] = srpf.Direction
30207	}
30208	return json.Marshal(objectMap)
30209}
30210
30211// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30212// long-running operation.
30213type SecurityRulesCreateOrUpdateFuture struct {
30214	azure.FutureAPI
30215	// Result returns the result of the asynchronous operation.
30216	// If the operation has not completed it will return an error.
30217	Result func(SecurityRulesClient) (SecurityRule, error)
30218}
30219
30220// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30221// operation.
30222type SecurityRulesDeleteFuture struct {
30223	azure.FutureAPI
30224	// Result returns the result of the asynchronous operation.
30225	// If the operation has not completed it will return an error.
30226	Result func(SecurityRulesClient) (autorest.Response, error)
30227}
30228
30229// SecurityRulesEvaluationResult network security rules evaluation result.
30230type SecurityRulesEvaluationResult struct {
30231	// Name - Name of the network security rule.
30232	Name *string `json:"name,omitempty"`
30233	// ProtocolMatched - Value indicating whether protocol is matched.
30234	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
30235	// SourceMatched - Value indicating whether source is matched.
30236	SourceMatched *bool `json:"sourceMatched,omitempty"`
30237	// SourcePortMatched - Value indicating whether source port is matched.
30238	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
30239	// DestinationMatched - Value indicating whether destination is matched.
30240	DestinationMatched *bool `json:"destinationMatched,omitempty"`
30241	// DestinationPortMatched - Value indicating whether destination port is matched.
30242	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
30243}
30244
30245// ServiceAssociationLink serviceAssociationLink resource.
30246type ServiceAssociationLink struct {
30247	// ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format.
30248	*ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"`
30249	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
30250	Name *string `json:"name,omitempty"`
30251	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
30252	Etag *string `json:"etag,omitempty"`
30253	// Type - READ-ONLY; Resource type.
30254	Type *string `json:"type,omitempty"`
30255	// ID - Resource ID.
30256	ID *string `json:"id,omitempty"`
30257}
30258
30259// MarshalJSON is the custom marshaler for ServiceAssociationLink.
30260func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) {
30261	objectMap := make(map[string]interface{})
30262	if sal.ServiceAssociationLinkPropertiesFormat != nil {
30263		objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat
30264	}
30265	if sal.Name != nil {
30266		objectMap["name"] = sal.Name
30267	}
30268	if sal.ID != nil {
30269		objectMap["id"] = sal.ID
30270	}
30271	return json.Marshal(objectMap)
30272}
30273
30274// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct.
30275func (sal *ServiceAssociationLink) UnmarshalJSON(body []byte) error {
30276	var m map[string]*json.RawMessage
30277	err := json.Unmarshal(body, &m)
30278	if err != nil {
30279		return err
30280	}
30281	for k, v := range m {
30282		switch k {
30283		case "properties":
30284			if v != nil {
30285				var serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat
30286				err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat)
30287				if err != nil {
30288					return err
30289				}
30290				sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat
30291			}
30292		case "name":
30293			if v != nil {
30294				var name string
30295				err = json.Unmarshal(*v, &name)
30296				if err != nil {
30297					return err
30298				}
30299				sal.Name = &name
30300			}
30301		case "etag":
30302			if v != nil {
30303				var etag string
30304				err = json.Unmarshal(*v, &etag)
30305				if err != nil {
30306					return err
30307				}
30308				sal.Etag = &etag
30309			}
30310		case "type":
30311			if v != nil {
30312				var typeVar string
30313				err = json.Unmarshal(*v, &typeVar)
30314				if err != nil {
30315					return err
30316				}
30317				sal.Type = &typeVar
30318			}
30319		case "id":
30320			if v != nil {
30321				var ID string
30322				err = json.Unmarshal(*v, &ID)
30323				if err != nil {
30324					return err
30325				}
30326				sal.ID = &ID
30327			}
30328		}
30329	}
30330
30331	return nil
30332}
30333
30334// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink.
30335type ServiceAssociationLinkPropertiesFormat struct {
30336	// LinkedResourceType - Resource type of the linked resource.
30337	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
30338	// Link - Link to the external resource.
30339	Link *string `json:"link,omitempty"`
30340	// ProvisioningState - READ-ONLY; The provisioning state of the service association link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30341	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30342	// AllowDelete - If true, the resource can be deleted.
30343	AllowDelete *bool `json:"allowDelete,omitempty"`
30344	// Locations - A list of locations.
30345	Locations *[]string `json:"locations,omitempty"`
30346}
30347
30348// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat.
30349func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
30350	objectMap := make(map[string]interface{})
30351	if salpf.LinkedResourceType != nil {
30352		objectMap["linkedResourceType"] = salpf.LinkedResourceType
30353	}
30354	if salpf.Link != nil {
30355		objectMap["link"] = salpf.Link
30356	}
30357	if salpf.AllowDelete != nil {
30358		objectMap["allowDelete"] = salpf.AllowDelete
30359	}
30360	if salpf.Locations != nil {
30361		objectMap["locations"] = salpf.Locations
30362	}
30363	return json.Marshal(objectMap)
30364}
30365
30366// ServiceAssociationLinksListResult response for ServiceAssociationLinks_List operation.
30367type ServiceAssociationLinksListResult struct {
30368	autorest.Response `json:"-"`
30369	// Value - The service association links in a subnet.
30370	Value *[]ServiceAssociationLink `json:"value,omitempty"`
30371	// NextLink - READ-ONLY; The URL to get the next set of results.
30372	NextLink *string `json:"nextLink,omitempty"`
30373}
30374
30375// MarshalJSON is the custom marshaler for ServiceAssociationLinksListResult.
30376func (sallr ServiceAssociationLinksListResult) MarshalJSON() ([]byte, error) {
30377	objectMap := make(map[string]interface{})
30378	if sallr.Value != nil {
30379		objectMap["value"] = sallr.Value
30380	}
30381	return json.Marshal(objectMap)
30382}
30383
30384// ServiceDelegationPropertiesFormat properties of a service delegation.
30385type ServiceDelegationPropertiesFormat struct {
30386	// ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers).
30387	ServiceName *string `json:"serviceName,omitempty"`
30388	// Actions - READ-ONLY; The actions permitted to the service upon delegation.
30389	Actions *[]string `json:"actions,omitempty"`
30390	// ProvisioningState - READ-ONLY; The provisioning state of the service delegation resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30391	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30392}
30393
30394// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat.
30395func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) {
30396	objectMap := make(map[string]interface{})
30397	if sdpf.ServiceName != nil {
30398		objectMap["serviceName"] = sdpf.ServiceName
30399	}
30400	return json.Marshal(objectMap)
30401}
30402
30403// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
30404// a long-running operation.
30405type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
30406	azure.FutureAPI
30407	// Result returns the result of the asynchronous operation.
30408	// If the operation has not completed it will return an error.
30409	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
30410}
30411
30412// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
30413// long-running operation.
30414type ServiceEndpointPoliciesDeleteFuture struct {
30415	azure.FutureAPI
30416	// Result returns the result of the asynchronous operation.
30417	// If the operation has not completed it will return an error.
30418	Result func(ServiceEndpointPoliciesClient) (autorest.Response, error)
30419}
30420
30421// ServiceEndpointPolicy service End point policy resource.
30422type ServiceEndpointPolicy struct {
30423	autorest.Response `json:"-"`
30424	// ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy.
30425	*ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"`
30426	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
30427	Etag *string `json:"etag,omitempty"`
30428	// ID - Resource ID.
30429	ID *string `json:"id,omitempty"`
30430	// Name - READ-ONLY; Resource name.
30431	Name *string `json:"name,omitempty"`
30432	// Type - READ-ONLY; Resource type.
30433	Type *string `json:"type,omitempty"`
30434	// Location - Resource location.
30435	Location *string `json:"location,omitempty"`
30436	// Tags - Resource tags.
30437	Tags map[string]*string `json:"tags"`
30438}
30439
30440// MarshalJSON is the custom marshaler for ServiceEndpointPolicy.
30441func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) {
30442	objectMap := make(map[string]interface{})
30443	if sep.ServiceEndpointPolicyPropertiesFormat != nil {
30444		objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat
30445	}
30446	if sep.ID != nil {
30447		objectMap["id"] = sep.ID
30448	}
30449	if sep.Location != nil {
30450		objectMap["location"] = sep.Location
30451	}
30452	if sep.Tags != nil {
30453		objectMap["tags"] = sep.Tags
30454	}
30455	return json.Marshal(objectMap)
30456}
30457
30458// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct.
30459func (sep *ServiceEndpointPolicy) UnmarshalJSON(body []byte) error {
30460	var m map[string]*json.RawMessage
30461	err := json.Unmarshal(body, &m)
30462	if err != nil {
30463		return err
30464	}
30465	for k, v := range m {
30466		switch k {
30467		case "properties":
30468			if v != nil {
30469				var serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat
30470				err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat)
30471				if err != nil {
30472					return err
30473				}
30474				sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat
30475			}
30476		case "etag":
30477			if v != nil {
30478				var etag string
30479				err = json.Unmarshal(*v, &etag)
30480				if err != nil {
30481					return err
30482				}
30483				sep.Etag = &etag
30484			}
30485		case "id":
30486			if v != nil {
30487				var ID string
30488				err = json.Unmarshal(*v, &ID)
30489				if err != nil {
30490					return err
30491				}
30492				sep.ID = &ID
30493			}
30494		case "name":
30495			if v != nil {
30496				var name string
30497				err = json.Unmarshal(*v, &name)
30498				if err != nil {
30499					return err
30500				}
30501				sep.Name = &name
30502			}
30503		case "type":
30504			if v != nil {
30505				var typeVar string
30506				err = json.Unmarshal(*v, &typeVar)
30507				if err != nil {
30508					return err
30509				}
30510				sep.Type = &typeVar
30511			}
30512		case "location":
30513			if v != nil {
30514				var location string
30515				err = json.Unmarshal(*v, &location)
30516				if err != nil {
30517					return err
30518				}
30519				sep.Location = &location
30520			}
30521		case "tags":
30522			if v != nil {
30523				var tags map[string]*string
30524				err = json.Unmarshal(*v, &tags)
30525				if err != nil {
30526					return err
30527				}
30528				sep.Tags = tags
30529			}
30530		}
30531	}
30532
30533	return nil
30534}
30535
30536// ServiceEndpointPolicyDefinition service Endpoint policy definitions.
30537type ServiceEndpointPolicyDefinition struct {
30538	autorest.Response `json:"-"`
30539	// ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition.
30540	*ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"`
30541	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
30542	Name *string `json:"name,omitempty"`
30543	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
30544	Etag *string `json:"etag,omitempty"`
30545	// ID - Resource ID.
30546	ID *string `json:"id,omitempty"`
30547}
30548
30549// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition.
30550func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) {
30551	objectMap := make(map[string]interface{})
30552	if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil {
30553		objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat
30554	}
30555	if sepd.Name != nil {
30556		objectMap["name"] = sepd.Name
30557	}
30558	if sepd.ID != nil {
30559		objectMap["id"] = sepd.ID
30560	}
30561	return json.Marshal(objectMap)
30562}
30563
30564// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct.
30565func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error {
30566	var m map[string]*json.RawMessage
30567	err := json.Unmarshal(body, &m)
30568	if err != nil {
30569		return err
30570	}
30571	for k, v := range m {
30572		switch k {
30573		case "properties":
30574			if v != nil {
30575				var serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat
30576				err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat)
30577				if err != nil {
30578					return err
30579				}
30580				sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat
30581			}
30582		case "name":
30583			if v != nil {
30584				var name string
30585				err = json.Unmarshal(*v, &name)
30586				if err != nil {
30587					return err
30588				}
30589				sepd.Name = &name
30590			}
30591		case "etag":
30592			if v != nil {
30593				var etag string
30594				err = json.Unmarshal(*v, &etag)
30595				if err != nil {
30596					return err
30597				}
30598				sepd.Etag = &etag
30599			}
30600		case "id":
30601			if v != nil {
30602				var ID string
30603				err = json.Unmarshal(*v, &ID)
30604				if err != nil {
30605					return err
30606				}
30607				sepd.ID = &ID
30608			}
30609		}
30610	}
30611
30612	return nil
30613}
30614
30615// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service
30616// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
30617type ServiceEndpointPolicyDefinitionListResult struct {
30618	autorest.Response `json:"-"`
30619	// Value - The service endpoint policy definition in a service endpoint policy.
30620	Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"`
30621	// NextLink - The URL to get the next set of results.
30622	NextLink *string `json:"nextLink,omitempty"`
30623}
30624
30625// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of
30626// ServiceEndpointPolicyDefinition values.
30627type ServiceEndpointPolicyDefinitionListResultIterator struct {
30628	i    int
30629	page ServiceEndpointPolicyDefinitionListResultPage
30630}
30631
30632// NextWithContext advances to the next value.  If there was an error making
30633// the request the iterator does not advance and the error is returned.
30634func (iter *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
30635	if tracing.IsEnabled() {
30636		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.NextWithContext")
30637		defer func() {
30638			sc := -1
30639			if iter.Response().Response.Response != nil {
30640				sc = iter.Response().Response.Response.StatusCode
30641			}
30642			tracing.EndSpan(ctx, sc, err)
30643		}()
30644	}
30645	iter.i++
30646	if iter.i < len(iter.page.Values()) {
30647		return nil
30648	}
30649	err = iter.page.NextWithContext(ctx)
30650	if err != nil {
30651		iter.i--
30652		return err
30653	}
30654	iter.i = 0
30655	return nil
30656}
30657
30658// Next advances to the next value.  If there was an error making
30659// the request the iterator does not advance and the error is returned.
30660// Deprecated: Use NextWithContext() instead.
30661func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
30662	return iter.NextWithContext(context.Background())
30663}
30664
30665// NotDone returns true if the enumeration should be started or is not yet complete.
30666func (iter ServiceEndpointPolicyDefinitionListResultIterator) NotDone() bool {
30667	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30668}
30669
30670// Response returns the raw server response from the last page request.
30671func (iter ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult {
30672	return iter.page.Response()
30673}
30674
30675// Value returns the current value or a zero-initialized value if the
30676// iterator has advanced beyond the end of the collection.
30677func (iter ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition {
30678	if !iter.page.NotDone() {
30679		return ServiceEndpointPolicyDefinition{}
30680	}
30681	return iter.page.Values()[iter.i]
30682}
30683
30684// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
30685func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
30686	return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
30687}
30688
30689// IsEmpty returns true if the ListResult contains no values.
30690func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
30691	return sepdlr.Value == nil || len(*sepdlr.Value) == 0
30692}
30693
30694// hasNextLink returns true if the NextLink is not empty.
30695func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool {
30696	return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0
30697}
30698
30699// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
30700// It returns nil if no more results exist.
30701func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
30702	if !sepdlr.hasNextLink() {
30703		return nil, nil
30704	}
30705	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30706		autorest.AsJSON(),
30707		autorest.AsGet(),
30708		autorest.WithBaseURL(to.String(sepdlr.NextLink)))
30709}
30710
30711// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
30712type ServiceEndpointPolicyDefinitionListResultPage struct {
30713	fn     func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
30714	sepdlr ServiceEndpointPolicyDefinitionListResult
30715}
30716
30717// NextWithContext advances to the next page of values.  If there was an error making
30718// the request the page does not advance and the error is returned.
30719func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
30720	if tracing.IsEnabled() {
30721		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext")
30722		defer func() {
30723			sc := -1
30724			if page.Response().Response.Response != nil {
30725				sc = page.Response().Response.Response.StatusCode
30726			}
30727			tracing.EndSpan(ctx, sc, err)
30728		}()
30729	}
30730	for {
30731		next, err := page.fn(ctx, page.sepdlr)
30732		if err != nil {
30733			return err
30734		}
30735		page.sepdlr = next
30736		if !next.hasNextLink() || !next.IsEmpty() {
30737			break
30738		}
30739	}
30740	return nil
30741}
30742
30743// Next advances to the next page of values.  If there was an error making
30744// the request the page does not advance and the error is returned.
30745// Deprecated: Use NextWithContext() instead.
30746func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
30747	return page.NextWithContext(context.Background())
30748}
30749
30750// NotDone returns true if the page enumeration should be started or is not yet complete.
30751func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
30752	return !page.sepdlr.IsEmpty()
30753}
30754
30755// Response returns the raw server response from the last page request.
30756func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult {
30757	return page.sepdlr
30758}
30759
30760// Values returns the slice of values for the current page or nil if there are no values.
30761func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition {
30762	if page.sepdlr.IsEmpty() {
30763		return nil
30764	}
30765	return *page.sepdlr.Value
30766}
30767
30768// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
30769func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
30770	return ServiceEndpointPolicyDefinitionListResultPage{
30771		fn:     getNextPage,
30772		sepdlr: cur,
30773	}
30774}
30775
30776// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
30777type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
30778	// Description - A description for this rule. Restricted to 140 chars.
30779	Description *string `json:"description,omitempty"`
30780	// Service - Service endpoint name.
30781	Service *string `json:"service,omitempty"`
30782	// ServiceResources - A list of service resources.
30783	ServiceResources *[]string `json:"serviceResources,omitempty"`
30784	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy definition resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30785	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30786}
30787
30788// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat.
30789func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) {
30790	objectMap := make(map[string]interface{})
30791	if sepdpf.Description != nil {
30792		objectMap["description"] = sepdpf.Description
30793	}
30794	if sepdpf.Service != nil {
30795		objectMap["service"] = sepdpf.Service
30796	}
30797	if sepdpf.ServiceResources != nil {
30798		objectMap["serviceResources"] = sepdpf.ServiceResources
30799	}
30800	return json.Marshal(objectMap)
30801}
30802
30803// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
30804// results of a long-running operation.
30805type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
30806	azure.FutureAPI
30807	// Result returns the result of the asynchronous operation.
30808	// If the operation has not completed it will return an error.
30809	Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error)
30810}
30811
30812// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
30813// a long-running operation.
30814type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
30815	azure.FutureAPI
30816	// Result returns the result of the asynchronous operation.
30817	// If the operation has not completed it will return an error.
30818	Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error)
30819}
30820
30821// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
30822type ServiceEndpointPolicyListResult struct {
30823	autorest.Response `json:"-"`
30824	// Value - A list of ServiceEndpointPolicy resources.
30825	Value *[]ServiceEndpointPolicy `json:"value,omitempty"`
30826	// NextLink - READ-ONLY; The URL to get the next set of results.
30827	NextLink *string `json:"nextLink,omitempty"`
30828}
30829
30830// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult.
30831func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) {
30832	objectMap := make(map[string]interface{})
30833	if seplr.Value != nil {
30834		objectMap["value"] = seplr.Value
30835	}
30836	return json.Marshal(objectMap)
30837}
30838
30839// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
30840// values.
30841type ServiceEndpointPolicyListResultIterator struct {
30842	i    int
30843	page ServiceEndpointPolicyListResultPage
30844}
30845
30846// NextWithContext advances to the next value.  If there was an error making
30847// the request the iterator does not advance and the error is returned.
30848func (iter *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
30849	if tracing.IsEnabled() {
30850		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.NextWithContext")
30851		defer func() {
30852			sc := -1
30853			if iter.Response().Response.Response != nil {
30854				sc = iter.Response().Response.Response.StatusCode
30855			}
30856			tracing.EndSpan(ctx, sc, err)
30857		}()
30858	}
30859	iter.i++
30860	if iter.i < len(iter.page.Values()) {
30861		return nil
30862	}
30863	err = iter.page.NextWithContext(ctx)
30864	if err != nil {
30865		iter.i--
30866		return err
30867	}
30868	iter.i = 0
30869	return nil
30870}
30871
30872// Next advances to the next value.  If there was an error making
30873// the request the iterator does not advance and the error is returned.
30874// Deprecated: Use NextWithContext() instead.
30875func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
30876	return iter.NextWithContext(context.Background())
30877}
30878
30879// NotDone returns true if the enumeration should be started or is not yet complete.
30880func (iter ServiceEndpointPolicyListResultIterator) NotDone() bool {
30881	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30882}
30883
30884// Response returns the raw server response from the last page request.
30885func (iter ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult {
30886	return iter.page.Response()
30887}
30888
30889// Value returns the current value or a zero-initialized value if the
30890// iterator has advanced beyond the end of the collection.
30891func (iter ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy {
30892	if !iter.page.NotDone() {
30893		return ServiceEndpointPolicy{}
30894	}
30895	return iter.page.Values()[iter.i]
30896}
30897
30898// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
30899func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
30900	return ServiceEndpointPolicyListResultIterator{page: page}
30901}
30902
30903// IsEmpty returns true if the ListResult contains no values.
30904func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
30905	return seplr.Value == nil || len(*seplr.Value) == 0
30906}
30907
30908// hasNextLink returns true if the NextLink is not empty.
30909func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool {
30910	return seplr.NextLink != nil && len(*seplr.NextLink) != 0
30911}
30912
30913// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
30914// It returns nil if no more results exist.
30915func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
30916	if !seplr.hasNextLink() {
30917		return nil, nil
30918	}
30919	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30920		autorest.AsJSON(),
30921		autorest.AsGet(),
30922		autorest.WithBaseURL(to.String(seplr.NextLink)))
30923}
30924
30925// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
30926type ServiceEndpointPolicyListResultPage struct {
30927	fn    func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
30928	seplr ServiceEndpointPolicyListResult
30929}
30930
30931// NextWithContext advances to the next page of values.  If there was an error making
30932// the request the page does not advance and the error is returned.
30933func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
30934	if tracing.IsEnabled() {
30935		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext")
30936		defer func() {
30937			sc := -1
30938			if page.Response().Response.Response != nil {
30939				sc = page.Response().Response.Response.StatusCode
30940			}
30941			tracing.EndSpan(ctx, sc, err)
30942		}()
30943	}
30944	for {
30945		next, err := page.fn(ctx, page.seplr)
30946		if err != nil {
30947			return err
30948		}
30949		page.seplr = next
30950		if !next.hasNextLink() || !next.IsEmpty() {
30951			break
30952		}
30953	}
30954	return nil
30955}
30956
30957// Next advances to the next page of values.  If there was an error making
30958// the request the page does not advance and the error is returned.
30959// Deprecated: Use NextWithContext() instead.
30960func (page *ServiceEndpointPolicyListResultPage) Next() error {
30961	return page.NextWithContext(context.Background())
30962}
30963
30964// NotDone returns true if the page enumeration should be started or is not yet complete.
30965func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
30966	return !page.seplr.IsEmpty()
30967}
30968
30969// Response returns the raw server response from the last page request.
30970func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult {
30971	return page.seplr
30972}
30973
30974// Values returns the slice of values for the current page or nil if there are no values.
30975func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy {
30976	if page.seplr.IsEmpty() {
30977		return nil
30978	}
30979	return *page.seplr.Value
30980}
30981
30982// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
30983func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
30984	return ServiceEndpointPolicyListResultPage{
30985		fn:    getNextPage,
30986		seplr: cur,
30987	}
30988}
30989
30990// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
30991type ServiceEndpointPolicyPropertiesFormat struct {
30992	// ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
30993	ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"`
30994	// Subnets - READ-ONLY; A collection of references to subnets.
30995	Subnets *[]Subnet `json:"subnets,omitempty"`
30996	// ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource.
30997	ResourceGUID *string `json:"resourceGuid,omitempty"`
30998	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30999	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31000}
31001
31002// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat.
31003func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
31004	objectMap := make(map[string]interface{})
31005	if seppf.ServiceEndpointPolicyDefinitions != nil {
31006		objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions
31007	}
31008	return json.Marshal(objectMap)
31009}
31010
31011// ServiceEndpointPropertiesFormat the service endpoint properties.
31012type ServiceEndpointPropertiesFormat struct {
31013	// Service - The type of the endpoint service.
31014	Service *string `json:"service,omitempty"`
31015	// Locations - A list of locations.
31016	Locations *[]string `json:"locations,omitempty"`
31017	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
31018	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31019}
31020
31021// MarshalJSON is the custom marshaler for ServiceEndpointPropertiesFormat.
31022func (sepf ServiceEndpointPropertiesFormat) MarshalJSON() ([]byte, error) {
31023	objectMap := make(map[string]interface{})
31024	if sepf.Service != nil {
31025		objectMap["service"] = sepf.Service
31026	}
31027	if sepf.Locations != nil {
31028		objectMap["locations"] = sepf.Locations
31029	}
31030	return json.Marshal(objectMap)
31031}
31032
31033// ServiceTagInformation the service tag information.
31034type ServiceTagInformation struct {
31035	// Properties - READ-ONLY; Properties of the service tag information.
31036	Properties *ServiceTagInformationPropertiesFormat `json:"properties,omitempty"`
31037	// Name - READ-ONLY; The name of service tag.
31038	Name *string `json:"name,omitempty"`
31039	// ID - READ-ONLY; The ID of service tag.
31040	ID *string `json:"id,omitempty"`
31041}
31042
31043// ServiceTagInformationPropertiesFormat properties of the service tag information.
31044type ServiceTagInformationPropertiesFormat struct {
31045	// ChangeNumber - READ-ONLY; The iteration number of service tag.
31046	ChangeNumber *string `json:"changeNumber,omitempty"`
31047	// Region - READ-ONLY; The region of service tag.
31048	Region *string `json:"region,omitempty"`
31049	// SystemService - READ-ONLY; The name of system service.
31050	SystemService *string `json:"systemService,omitempty"`
31051	// AddressPrefixes - READ-ONLY; The list of IP address prefixes.
31052	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
31053}
31054
31055// ServiceTagsListResult response for the ListServiceTags API service call.
31056type ServiceTagsListResult struct {
31057	autorest.Response `json:"-"`
31058	// Name - READ-ONLY; The name of the cloud.
31059	Name *string `json:"name,omitempty"`
31060	// ID - READ-ONLY; The ID of the cloud.
31061	ID *string `json:"id,omitempty"`
31062	// Type - READ-ONLY; The azure resource type.
31063	Type *string `json:"type,omitempty"`
31064	// ChangeNumber - READ-ONLY; The iteration number.
31065	ChangeNumber *string `json:"changeNumber,omitempty"`
31066	// Cloud - READ-ONLY; The name of the cloud.
31067	Cloud *string `json:"cloud,omitempty"`
31068	// Values - READ-ONLY; The list of service tag information resources.
31069	Values *[]ServiceTagInformation `json:"values,omitempty"`
31070}
31071
31072// SessionIds list of session IDs.
31073type SessionIds struct {
31074	// SessionIds - List of session IDs.
31075	SessionIds *[]string `json:"sessionIds,omitempty"`
31076}
31077
31078// StaticRoute list of all Static Routes.
31079type StaticRoute struct {
31080	// Name - The name of the StaticRoute that is unique within a VnetRoute.
31081	Name *string `json:"name,omitempty"`
31082	// AddressPrefixes - List of all address prefixes.
31083	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
31084	// NextHopIPAddress - The ip address of the next hop.
31085	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
31086}
31087
31088// String ...
31089type String struct {
31090	autorest.Response `json:"-"`
31091	Value             *string `json:"value,omitempty"`
31092}
31093
31094// Subnet subnet in a virtual network resource.
31095type Subnet struct {
31096	autorest.Response `json:"-"`
31097	// SubnetPropertiesFormat - Properties of the subnet.
31098	*SubnetPropertiesFormat `json:"properties,omitempty"`
31099	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
31100	Name *string `json:"name,omitempty"`
31101	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
31102	Etag *string `json:"etag,omitempty"`
31103	// ID - Resource ID.
31104	ID *string `json:"id,omitempty"`
31105}
31106
31107// MarshalJSON is the custom marshaler for Subnet.
31108func (s Subnet) MarshalJSON() ([]byte, error) {
31109	objectMap := make(map[string]interface{})
31110	if s.SubnetPropertiesFormat != nil {
31111		objectMap["properties"] = s.SubnetPropertiesFormat
31112	}
31113	if s.Name != nil {
31114		objectMap["name"] = s.Name
31115	}
31116	if s.ID != nil {
31117		objectMap["id"] = s.ID
31118	}
31119	return json.Marshal(objectMap)
31120}
31121
31122// UnmarshalJSON is the custom unmarshaler for Subnet struct.
31123func (s *Subnet) UnmarshalJSON(body []byte) error {
31124	var m map[string]*json.RawMessage
31125	err := json.Unmarshal(body, &m)
31126	if err != nil {
31127		return err
31128	}
31129	for k, v := range m {
31130		switch k {
31131		case "properties":
31132			if v != nil {
31133				var subnetPropertiesFormat SubnetPropertiesFormat
31134				err = json.Unmarshal(*v, &subnetPropertiesFormat)
31135				if err != nil {
31136					return err
31137				}
31138				s.SubnetPropertiesFormat = &subnetPropertiesFormat
31139			}
31140		case "name":
31141			if v != nil {
31142				var name string
31143				err = json.Unmarshal(*v, &name)
31144				if err != nil {
31145					return err
31146				}
31147				s.Name = &name
31148			}
31149		case "etag":
31150			if v != nil {
31151				var etag string
31152				err = json.Unmarshal(*v, &etag)
31153				if err != nil {
31154					return err
31155				}
31156				s.Etag = &etag
31157			}
31158		case "id":
31159			if v != nil {
31160				var ID string
31161				err = json.Unmarshal(*v, &ID)
31162				if err != nil {
31163					return err
31164				}
31165				s.ID = &ID
31166			}
31167		}
31168	}
31169
31170	return nil
31171}
31172
31173// SubnetAssociation subnet and it's custom security rules.
31174type SubnetAssociation struct {
31175	// ID - READ-ONLY; Subnet ID.
31176	ID *string `json:"id,omitempty"`
31177	// SecurityRules - Collection of custom security rules.
31178	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
31179}
31180
31181// MarshalJSON is the custom marshaler for SubnetAssociation.
31182func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
31183	objectMap := make(map[string]interface{})
31184	if sa.SecurityRules != nil {
31185		objectMap["securityRules"] = sa.SecurityRules
31186	}
31187	return json.Marshal(objectMap)
31188}
31189
31190// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
31191// network.
31192type SubnetListResult struct {
31193	autorest.Response `json:"-"`
31194	// Value - The subnets in a virtual network.
31195	Value *[]Subnet `json:"value,omitempty"`
31196	// NextLink - The URL to get the next set of results.
31197	NextLink *string `json:"nextLink,omitempty"`
31198}
31199
31200// SubnetListResultIterator provides access to a complete listing of Subnet values.
31201type SubnetListResultIterator struct {
31202	i    int
31203	page SubnetListResultPage
31204}
31205
31206// NextWithContext advances to the next value.  If there was an error making
31207// the request the iterator does not advance and the error is returned.
31208func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
31209	if tracing.IsEnabled() {
31210		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
31211		defer func() {
31212			sc := -1
31213			if iter.Response().Response.Response != nil {
31214				sc = iter.Response().Response.Response.StatusCode
31215			}
31216			tracing.EndSpan(ctx, sc, err)
31217		}()
31218	}
31219	iter.i++
31220	if iter.i < len(iter.page.Values()) {
31221		return nil
31222	}
31223	err = iter.page.NextWithContext(ctx)
31224	if err != nil {
31225		iter.i--
31226		return err
31227	}
31228	iter.i = 0
31229	return nil
31230}
31231
31232// Next advances to the next value.  If there was an error making
31233// the request the iterator does not advance and the error is returned.
31234// Deprecated: Use NextWithContext() instead.
31235func (iter *SubnetListResultIterator) Next() error {
31236	return iter.NextWithContext(context.Background())
31237}
31238
31239// NotDone returns true if the enumeration should be started or is not yet complete.
31240func (iter SubnetListResultIterator) NotDone() bool {
31241	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31242}
31243
31244// Response returns the raw server response from the last page request.
31245func (iter SubnetListResultIterator) Response() SubnetListResult {
31246	return iter.page.Response()
31247}
31248
31249// Value returns the current value or a zero-initialized value if the
31250// iterator has advanced beyond the end of the collection.
31251func (iter SubnetListResultIterator) Value() Subnet {
31252	if !iter.page.NotDone() {
31253		return Subnet{}
31254	}
31255	return iter.page.Values()[iter.i]
31256}
31257
31258// Creates a new instance of the SubnetListResultIterator type.
31259func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
31260	return SubnetListResultIterator{page: page}
31261}
31262
31263// IsEmpty returns true if the ListResult contains no values.
31264func (slr SubnetListResult) IsEmpty() bool {
31265	return slr.Value == nil || len(*slr.Value) == 0
31266}
31267
31268// hasNextLink returns true if the NextLink is not empty.
31269func (slr SubnetListResult) hasNextLink() bool {
31270	return slr.NextLink != nil && len(*slr.NextLink) != 0
31271}
31272
31273// subnetListResultPreparer prepares a request to retrieve the next set of results.
31274// It returns nil if no more results exist.
31275func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
31276	if !slr.hasNextLink() {
31277		return nil, nil
31278	}
31279	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31280		autorest.AsJSON(),
31281		autorest.AsGet(),
31282		autorest.WithBaseURL(to.String(slr.NextLink)))
31283}
31284
31285// SubnetListResultPage contains a page of Subnet values.
31286type SubnetListResultPage struct {
31287	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
31288	slr SubnetListResult
31289}
31290
31291// NextWithContext advances to the next page of values.  If there was an error making
31292// the request the page does not advance and the error is returned.
31293func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
31294	if tracing.IsEnabled() {
31295		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
31296		defer func() {
31297			sc := -1
31298			if page.Response().Response.Response != nil {
31299				sc = page.Response().Response.Response.StatusCode
31300			}
31301			tracing.EndSpan(ctx, sc, err)
31302		}()
31303	}
31304	for {
31305		next, err := page.fn(ctx, page.slr)
31306		if err != nil {
31307			return err
31308		}
31309		page.slr = next
31310		if !next.hasNextLink() || !next.IsEmpty() {
31311			break
31312		}
31313	}
31314	return nil
31315}
31316
31317// Next advances to the next page of values.  If there was an error making
31318// the request the page does not advance and the error is returned.
31319// Deprecated: Use NextWithContext() instead.
31320func (page *SubnetListResultPage) Next() error {
31321	return page.NextWithContext(context.Background())
31322}
31323
31324// NotDone returns true if the page enumeration should be started or is not yet complete.
31325func (page SubnetListResultPage) NotDone() bool {
31326	return !page.slr.IsEmpty()
31327}
31328
31329// Response returns the raw server response from the last page request.
31330func (page SubnetListResultPage) Response() SubnetListResult {
31331	return page.slr
31332}
31333
31334// Values returns the slice of values for the current page or nil if there are no values.
31335func (page SubnetListResultPage) Values() []Subnet {
31336	if page.slr.IsEmpty() {
31337		return nil
31338	}
31339	return *page.slr.Value
31340}
31341
31342// Creates a new instance of the SubnetListResultPage type.
31343func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
31344	return SubnetListResultPage{
31345		fn:  getNextPage,
31346		slr: cur,
31347	}
31348}
31349
31350// SubnetPropertiesFormat properties of the subnet.
31351type SubnetPropertiesFormat struct {
31352	// AddressPrefix - The address prefix for the subnet.
31353	AddressPrefix *string `json:"addressPrefix,omitempty"`
31354	// AddressPrefixes - List of address prefixes for the subnet.
31355	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
31356	// NetworkSecurityGroup - The reference to the NetworkSecurityGroup resource.
31357	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
31358	// RouteTable - The reference to the RouteTable resource.
31359	RouteTable *RouteTable `json:"routeTable,omitempty"`
31360	// NatGateway - Nat gateway associated with this subnet.
31361	NatGateway *SubResource `json:"natGateway,omitempty"`
31362	// ServiceEndpoints - An array of service endpoints.
31363	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
31364	// ServiceEndpointPolicies - An array of service endpoint policies.
31365	ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"`
31366	// PrivateEndpoints - READ-ONLY; An array of references to private endpoints.
31367	PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"`
31368	// IPConfigurations - READ-ONLY; An array of references to the network interface IP configurations using subnet.
31369	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
31370	// IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet.
31371	IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"`
31372	// IPAllocations - Array of IpAllocation which reference this subnet.
31373	IPAllocations *[]SubResource `json:"ipAllocations,omitempty"`
31374	// ResourceNavigationLinks - READ-ONLY; An array of references to the external resources using subnet.
31375	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
31376	// ServiceAssociationLinks - READ-ONLY; An array of references to services injecting into this subnet.
31377	ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"`
31378	// Delegations - An array of references to the delegations on the subnet.
31379	Delegations *[]Delegation `json:"delegations,omitempty"`
31380	// Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.
31381	Purpose *string `json:"purpose,omitempty"`
31382	// ProvisioningState - READ-ONLY; The provisioning state of the subnet resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
31383	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31384	// PrivateEndpointNetworkPolicies - Enable or Disable apply network policies on private end point in the subnet.
31385	PrivateEndpointNetworkPolicies *string `json:"privateEndpointNetworkPolicies,omitempty"`
31386	// PrivateLinkServiceNetworkPolicies - Enable or Disable apply network policies on private link service in the subnet.
31387	PrivateLinkServiceNetworkPolicies *string `json:"privateLinkServiceNetworkPolicies,omitempty"`
31388}
31389
31390// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
31391func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
31392	objectMap := make(map[string]interface{})
31393	if spf.AddressPrefix != nil {
31394		objectMap["addressPrefix"] = spf.AddressPrefix
31395	}
31396	if spf.AddressPrefixes != nil {
31397		objectMap["addressPrefixes"] = spf.AddressPrefixes
31398	}
31399	if spf.NetworkSecurityGroup != nil {
31400		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
31401	}
31402	if spf.RouteTable != nil {
31403		objectMap["routeTable"] = spf.RouteTable
31404	}
31405	if spf.NatGateway != nil {
31406		objectMap["natGateway"] = spf.NatGateway
31407	}
31408	if spf.ServiceEndpoints != nil {
31409		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
31410	}
31411	if spf.ServiceEndpointPolicies != nil {
31412		objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies
31413	}
31414	if spf.IPAllocations != nil {
31415		objectMap["ipAllocations"] = spf.IPAllocations
31416	}
31417	if spf.Delegations != nil {
31418		objectMap["delegations"] = spf.Delegations
31419	}
31420	if spf.PrivateEndpointNetworkPolicies != nil {
31421		objectMap["privateEndpointNetworkPolicies"] = spf.PrivateEndpointNetworkPolicies
31422	}
31423	if spf.PrivateLinkServiceNetworkPolicies != nil {
31424		objectMap["privateLinkServiceNetworkPolicies"] = spf.PrivateLinkServiceNetworkPolicies
31425	}
31426	return json.Marshal(objectMap)
31427}
31428
31429// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
31430// operation.
31431type SubnetsCreateOrUpdateFuture struct {
31432	azure.FutureAPI
31433	// Result returns the result of the asynchronous operation.
31434	// If the operation has not completed it will return an error.
31435	Result func(SubnetsClient) (Subnet, error)
31436}
31437
31438// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
31439// operation.
31440type SubnetsDeleteFuture struct {
31441	azure.FutureAPI
31442	// Result returns the result of the asynchronous operation.
31443	// If the operation has not completed it will return an error.
31444	Result func(SubnetsClient) (autorest.Response, error)
31445}
31446
31447// SubnetsPrepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
31448// long-running operation.
31449type SubnetsPrepareNetworkPoliciesFuture struct {
31450	azure.FutureAPI
31451	// Result returns the result of the asynchronous operation.
31452	// If the operation has not completed it will return an error.
31453	Result func(SubnetsClient) (autorest.Response, error)
31454}
31455
31456// SubnetsUnprepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
31457// long-running operation.
31458type SubnetsUnprepareNetworkPoliciesFuture struct {
31459	azure.FutureAPI
31460	// Result returns the result of the asynchronous operation.
31461	// If the operation has not completed it will return an error.
31462	Result func(SubnetsClient) (autorest.Response, error)
31463}
31464
31465// SubResource reference to another subresource.
31466type SubResource struct {
31467	// ID - Resource ID.
31468	ID *string `json:"id,omitempty"`
31469}
31470
31471// TagsObject tags object for patch operations.
31472type TagsObject struct {
31473	// Tags - Resource tags.
31474	Tags map[string]*string `json:"tags"`
31475}
31476
31477// MarshalJSON is the custom marshaler for TagsObject.
31478func (toVar TagsObject) MarshalJSON() ([]byte, error) {
31479	objectMap := make(map[string]interface{})
31480	if toVar.Tags != nil {
31481		objectMap["tags"] = toVar.Tags
31482	}
31483	return json.Marshal(objectMap)
31484}
31485
31486// Topology topology of the specified resource group.
31487type Topology struct {
31488	autorest.Response `json:"-"`
31489	// ID - READ-ONLY; GUID representing the operation id.
31490	ID *string `json:"id,omitempty"`
31491	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
31492	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
31493	// LastModified - READ-ONLY; The datetime when the topology was last modified.
31494	LastModified *date.Time `json:"lastModified,omitempty"`
31495	// Resources - A list of topology resources.
31496	Resources *[]TopologyResource `json:"resources,omitempty"`
31497}
31498
31499// MarshalJSON is the custom marshaler for Topology.
31500func (t Topology) MarshalJSON() ([]byte, error) {
31501	objectMap := make(map[string]interface{})
31502	if t.Resources != nil {
31503		objectMap["resources"] = t.Resources
31504	}
31505	return json.Marshal(objectMap)
31506}
31507
31508// TopologyAssociation resources that have an association with the parent resource.
31509type TopologyAssociation struct {
31510	// Name - The name of the resource that is associated with the parent resource.
31511	Name *string `json:"name,omitempty"`
31512	// ResourceID - The ID of the resource that is associated with the parent resource.
31513	ResourceID *string `json:"resourceId,omitempty"`
31514	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
31515	AssociationType AssociationType `json:"associationType,omitempty"`
31516}
31517
31518// TopologyParameters parameters that define the representation of topology.
31519type TopologyParameters struct {
31520	// TargetResourceGroupName - The name of the target resource group to perform topology on.
31521	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
31522	// TargetVirtualNetwork - The reference to the Virtual Network resource.
31523	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
31524	// TargetSubnet - The reference to the Subnet resource.
31525	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
31526}
31527
31528// TopologyResource the network resource topology information for the given resource group.
31529type TopologyResource struct {
31530	// Name - Name of the resource.
31531	Name *string `json:"name,omitempty"`
31532	// ID - ID of the resource.
31533	ID *string `json:"id,omitempty"`
31534	// Location - Resource location.
31535	Location *string `json:"location,omitempty"`
31536	// Associations - Holds the associations the resource has with other resources in the resource group.
31537	Associations *[]TopologyAssociation `json:"associations,omitempty"`
31538}
31539
31540// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
31541type TrafficAnalyticsConfigurationProperties struct {
31542	// Enabled - Flag to enable/disable traffic analytics.
31543	Enabled *bool `json:"enabled,omitempty"`
31544	// WorkspaceID - The resource guid of the attached workspace.
31545	WorkspaceID *string `json:"workspaceId,omitempty"`
31546	// WorkspaceRegion - The location of the attached workspace.
31547	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
31548	// WorkspaceResourceID - Resource Id of the attached workspace.
31549	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
31550	// TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics.
31551	TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"`
31552}
31553
31554// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
31555type TrafficAnalyticsProperties struct {
31556	// NetworkWatcherFlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
31557	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
31558}
31559
31560// TrafficSelectorPolicy an traffic selector policy for a virtual network gateway connection.
31561type TrafficSelectorPolicy struct {
31562	// LocalAddressRanges - A collection of local address spaces in CIDR format.
31563	LocalAddressRanges *[]string `json:"localAddressRanges,omitempty"`
31564	// RemoteAddressRanges - A collection of remote address spaces in CIDR format.
31565	RemoteAddressRanges *[]string `json:"remoteAddressRanges,omitempty"`
31566}
31567
31568// TroubleshootingDetails information gained from troubleshooting of specified resource.
31569type TroubleshootingDetails struct {
31570	// ID - The id of the get troubleshoot operation.
31571	ID *string `json:"id,omitempty"`
31572	// ReasonType - Reason type of failure.
31573	ReasonType *string `json:"reasonType,omitempty"`
31574	// Summary - A summary of troubleshooting.
31575	Summary *string `json:"summary,omitempty"`
31576	// Detail - Details on troubleshooting results.
31577	Detail *string `json:"detail,omitempty"`
31578	// RecommendedActions - List of recommended actions.
31579	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
31580}
31581
31582// TroubleshootingParameters parameters that define the resource to troubleshoot.
31583type TroubleshootingParameters struct {
31584	// TargetResourceID - The target resource to troubleshoot.
31585	TargetResourceID *string `json:"targetResourceId,omitempty"`
31586	// TroubleshootingProperties - Properties of the troubleshooting resource.
31587	*TroubleshootingProperties `json:"properties,omitempty"`
31588}
31589
31590// MarshalJSON is the custom marshaler for TroubleshootingParameters.
31591func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
31592	objectMap := make(map[string]interface{})
31593	if tp.TargetResourceID != nil {
31594		objectMap["targetResourceId"] = tp.TargetResourceID
31595	}
31596	if tp.TroubleshootingProperties != nil {
31597		objectMap["properties"] = tp.TroubleshootingProperties
31598	}
31599	return json.Marshal(objectMap)
31600}
31601
31602// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
31603func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
31604	var m map[string]*json.RawMessage
31605	err := json.Unmarshal(body, &m)
31606	if err != nil {
31607		return err
31608	}
31609	for k, v := range m {
31610		switch k {
31611		case "targetResourceId":
31612			if v != nil {
31613				var targetResourceID string
31614				err = json.Unmarshal(*v, &targetResourceID)
31615				if err != nil {
31616					return err
31617				}
31618				tp.TargetResourceID = &targetResourceID
31619			}
31620		case "properties":
31621			if v != nil {
31622				var troubleshootingProperties TroubleshootingProperties
31623				err = json.Unmarshal(*v, &troubleshootingProperties)
31624				if err != nil {
31625					return err
31626				}
31627				tp.TroubleshootingProperties = &troubleshootingProperties
31628			}
31629		}
31630	}
31631
31632	return nil
31633}
31634
31635// TroubleshootingProperties storage location provided for troubleshoot.
31636type TroubleshootingProperties struct {
31637	// StorageID - The ID for the storage account to save the troubleshoot result.
31638	StorageID *string `json:"storageId,omitempty"`
31639	// StoragePath - The path to the blob to save the troubleshoot result in.
31640	StoragePath *string `json:"storagePath,omitempty"`
31641}
31642
31643// TroubleshootingRecommendedActions recommended actions based on discovered issues.
31644type TroubleshootingRecommendedActions struct {
31645	// ActionID - ID of the recommended action.
31646	ActionID *string `json:"actionId,omitempty"`
31647	// ActionText - Description of recommended actions.
31648	ActionText *string `json:"actionText,omitempty"`
31649	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
31650	ActionURI *string `json:"actionUri,omitempty"`
31651	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
31652	ActionURIText *string `json:"actionUriText,omitempty"`
31653}
31654
31655// TroubleshootingResult troubleshooting information gained from specified resource.
31656type TroubleshootingResult struct {
31657	autorest.Response `json:"-"`
31658	// StartTime - The start time of the troubleshooting.
31659	StartTime *date.Time `json:"startTime,omitempty"`
31660	// EndTime - The end time of the troubleshooting.
31661	EndTime *date.Time `json:"endTime,omitempty"`
31662	// Code - The result code of the troubleshooting.
31663	Code *string `json:"code,omitempty"`
31664	// Results - Information from troubleshooting.
31665	Results *[]TroubleshootingDetails `json:"results,omitempty"`
31666}
31667
31668// TunnelConnectionHealth virtualNetworkGatewayConnection properties.
31669type TunnelConnectionHealth struct {
31670	// Tunnel - READ-ONLY; Tunnel name.
31671	Tunnel *string `json:"tunnel,omitempty"`
31672	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
31673	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
31674	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection.
31675	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
31676	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection.
31677	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
31678	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
31679	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
31680}
31681
31682// UnprepareNetworkPoliciesRequest details of UnprepareNetworkPolicies for Subnet.
31683type UnprepareNetworkPoliciesRequest struct {
31684	// ServiceName - The name of the service for which subnet is being unprepared for.
31685	ServiceName *string `json:"serviceName,omitempty"`
31686}
31687
31688// Usage the network resource usage.
31689type Usage struct {
31690	// ID - READ-ONLY; Resource identifier.
31691	ID *string `json:"id,omitempty"`
31692	// Unit - An enum describing the unit of measurement.
31693	Unit *string `json:"unit,omitempty"`
31694	// CurrentValue - The current value of the usage.
31695	CurrentValue *int64 `json:"currentValue,omitempty"`
31696	// Limit - The limit of usage.
31697	Limit *int64 `json:"limit,omitempty"`
31698	// Name - The name of the type of usage.
31699	Name *UsageName `json:"name,omitempty"`
31700}
31701
31702// MarshalJSON is the custom marshaler for Usage.
31703func (u Usage) MarshalJSON() ([]byte, error) {
31704	objectMap := make(map[string]interface{})
31705	if u.Unit != nil {
31706		objectMap["unit"] = u.Unit
31707	}
31708	if u.CurrentValue != nil {
31709		objectMap["currentValue"] = u.CurrentValue
31710	}
31711	if u.Limit != nil {
31712		objectMap["limit"] = u.Limit
31713	}
31714	if u.Name != nil {
31715		objectMap["name"] = u.Name
31716	}
31717	return json.Marshal(objectMap)
31718}
31719
31720// UsageName the usage names.
31721type UsageName struct {
31722	// Value - A string describing the resource name.
31723	Value *string `json:"value,omitempty"`
31724	// LocalizedValue - A localized string describing the resource name.
31725	LocalizedValue *string `json:"localizedValue,omitempty"`
31726}
31727
31728// UsagesListResult the list usages operation response.
31729type UsagesListResult struct {
31730	autorest.Response `json:"-"`
31731	// Value - The list network resource usages.
31732	Value *[]Usage `json:"value,omitempty"`
31733	// NextLink - URL to get the next set of results.
31734	NextLink *string `json:"nextLink,omitempty"`
31735}
31736
31737// UsagesListResultIterator provides access to a complete listing of Usage values.
31738type UsagesListResultIterator struct {
31739	i    int
31740	page UsagesListResultPage
31741}
31742
31743// NextWithContext advances to the next value.  If there was an error making
31744// the request the iterator does not advance and the error is returned.
31745func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
31746	if tracing.IsEnabled() {
31747		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
31748		defer func() {
31749			sc := -1
31750			if iter.Response().Response.Response != nil {
31751				sc = iter.Response().Response.Response.StatusCode
31752			}
31753			tracing.EndSpan(ctx, sc, err)
31754		}()
31755	}
31756	iter.i++
31757	if iter.i < len(iter.page.Values()) {
31758		return nil
31759	}
31760	err = iter.page.NextWithContext(ctx)
31761	if err != nil {
31762		iter.i--
31763		return err
31764	}
31765	iter.i = 0
31766	return nil
31767}
31768
31769// Next advances to the next value.  If there was an error making
31770// the request the iterator does not advance and the error is returned.
31771// Deprecated: Use NextWithContext() instead.
31772func (iter *UsagesListResultIterator) Next() error {
31773	return iter.NextWithContext(context.Background())
31774}
31775
31776// NotDone returns true if the enumeration should be started or is not yet complete.
31777func (iter UsagesListResultIterator) NotDone() bool {
31778	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31779}
31780
31781// Response returns the raw server response from the last page request.
31782func (iter UsagesListResultIterator) Response() UsagesListResult {
31783	return iter.page.Response()
31784}
31785
31786// Value returns the current value or a zero-initialized value if the
31787// iterator has advanced beyond the end of the collection.
31788func (iter UsagesListResultIterator) Value() Usage {
31789	if !iter.page.NotDone() {
31790		return Usage{}
31791	}
31792	return iter.page.Values()[iter.i]
31793}
31794
31795// Creates a new instance of the UsagesListResultIterator type.
31796func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
31797	return UsagesListResultIterator{page: page}
31798}
31799
31800// IsEmpty returns true if the ListResult contains no values.
31801func (ulr UsagesListResult) IsEmpty() bool {
31802	return ulr.Value == nil || len(*ulr.Value) == 0
31803}
31804
31805// hasNextLink returns true if the NextLink is not empty.
31806func (ulr UsagesListResult) hasNextLink() bool {
31807	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
31808}
31809
31810// usagesListResultPreparer prepares a request to retrieve the next set of results.
31811// It returns nil if no more results exist.
31812func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
31813	if !ulr.hasNextLink() {
31814		return nil, nil
31815	}
31816	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31817		autorest.AsJSON(),
31818		autorest.AsGet(),
31819		autorest.WithBaseURL(to.String(ulr.NextLink)))
31820}
31821
31822// UsagesListResultPage contains a page of Usage values.
31823type UsagesListResultPage struct {
31824	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
31825	ulr UsagesListResult
31826}
31827
31828// NextWithContext advances to the next page of values.  If there was an error making
31829// the request the page does not advance and the error is returned.
31830func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
31831	if tracing.IsEnabled() {
31832		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
31833		defer func() {
31834			sc := -1
31835			if page.Response().Response.Response != nil {
31836				sc = page.Response().Response.Response.StatusCode
31837			}
31838			tracing.EndSpan(ctx, sc, err)
31839		}()
31840	}
31841	for {
31842		next, err := page.fn(ctx, page.ulr)
31843		if err != nil {
31844			return err
31845		}
31846		page.ulr = next
31847		if !next.hasNextLink() || !next.IsEmpty() {
31848			break
31849		}
31850	}
31851	return nil
31852}
31853
31854// Next advances to the next page of values.  If there was an error making
31855// the request the page does not advance and the error is returned.
31856// Deprecated: Use NextWithContext() instead.
31857func (page *UsagesListResultPage) Next() error {
31858	return page.NextWithContext(context.Background())
31859}
31860
31861// NotDone returns true if the page enumeration should be started or is not yet complete.
31862func (page UsagesListResultPage) NotDone() bool {
31863	return !page.ulr.IsEmpty()
31864}
31865
31866// Response returns the raw server response from the last page request.
31867func (page UsagesListResultPage) Response() UsagesListResult {
31868	return page.ulr
31869}
31870
31871// Values returns the slice of values for the current page or nil if there are no values.
31872func (page UsagesListResultPage) Values() []Usage {
31873	if page.ulr.IsEmpty() {
31874		return nil
31875	}
31876	return *page.ulr.Value
31877}
31878
31879// Creates a new instance of the UsagesListResultPage type.
31880func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
31881	return UsagesListResultPage{
31882		fn:  getNextPage,
31883		ulr: cur,
31884	}
31885}
31886
31887// VerificationIPFlowParameters parameters that define the IP flow to be verified.
31888type VerificationIPFlowParameters struct {
31889	// TargetResourceID - The ID of the target resource to perform next-hop on.
31890	TargetResourceID *string `json:"targetResourceId,omitempty"`
31891	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
31892	Direction Direction `json:"direction,omitempty"`
31893	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
31894	Protocol IPFlowProtocol `json:"protocol,omitempty"`
31895	// 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.
31896	LocalPort *string `json:"localPort,omitempty"`
31897	// 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.
31898	RemotePort *string `json:"remotePort,omitempty"`
31899	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
31900	LocalIPAddress *string `json:"localIPAddress,omitempty"`
31901	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
31902	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
31903	// 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).
31904	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
31905}
31906
31907// VerificationIPFlowResult results of IP flow verification on the target resource.
31908type VerificationIPFlowResult struct {
31909	autorest.Response `json:"-"`
31910	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
31911	Access Access `json:"access,omitempty"`
31912	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
31913	RuleName *string `json:"ruleName,omitempty"`
31914}
31915
31916// VirtualAppliance networkVirtualAppliance Resource.
31917type VirtualAppliance struct {
31918	autorest.Response `json:"-"`
31919	// VirtualAppliancePropertiesFormat - Properties of the Network Virtual Appliance.
31920	*VirtualAppliancePropertiesFormat `json:"properties,omitempty"`
31921	// Identity - The service principal that has read access to cloud-init and config blob.
31922	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
31923	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
31924	Etag *string `json:"etag,omitempty"`
31925	// ID - Resource ID.
31926	ID *string `json:"id,omitempty"`
31927	// Name - READ-ONLY; Resource name.
31928	Name *string `json:"name,omitempty"`
31929	// Type - READ-ONLY; Resource type.
31930	Type *string `json:"type,omitempty"`
31931	// Location - Resource location.
31932	Location *string `json:"location,omitempty"`
31933	// Tags - Resource tags.
31934	Tags map[string]*string `json:"tags"`
31935}
31936
31937// MarshalJSON is the custom marshaler for VirtualAppliance.
31938func (va VirtualAppliance) MarshalJSON() ([]byte, error) {
31939	objectMap := make(map[string]interface{})
31940	if va.VirtualAppliancePropertiesFormat != nil {
31941		objectMap["properties"] = va.VirtualAppliancePropertiesFormat
31942	}
31943	if va.Identity != nil {
31944		objectMap["identity"] = va.Identity
31945	}
31946	if va.ID != nil {
31947		objectMap["id"] = va.ID
31948	}
31949	if va.Location != nil {
31950		objectMap["location"] = va.Location
31951	}
31952	if va.Tags != nil {
31953		objectMap["tags"] = va.Tags
31954	}
31955	return json.Marshal(objectMap)
31956}
31957
31958// UnmarshalJSON is the custom unmarshaler for VirtualAppliance struct.
31959func (va *VirtualAppliance) UnmarshalJSON(body []byte) error {
31960	var m map[string]*json.RawMessage
31961	err := json.Unmarshal(body, &m)
31962	if err != nil {
31963		return err
31964	}
31965	for k, v := range m {
31966		switch k {
31967		case "properties":
31968			if v != nil {
31969				var virtualAppliancePropertiesFormat VirtualAppliancePropertiesFormat
31970				err = json.Unmarshal(*v, &virtualAppliancePropertiesFormat)
31971				if err != nil {
31972					return err
31973				}
31974				va.VirtualAppliancePropertiesFormat = &virtualAppliancePropertiesFormat
31975			}
31976		case "identity":
31977			if v != nil {
31978				var identity ManagedServiceIdentity
31979				err = json.Unmarshal(*v, &identity)
31980				if err != nil {
31981					return err
31982				}
31983				va.Identity = &identity
31984			}
31985		case "etag":
31986			if v != nil {
31987				var etag string
31988				err = json.Unmarshal(*v, &etag)
31989				if err != nil {
31990					return err
31991				}
31992				va.Etag = &etag
31993			}
31994		case "id":
31995			if v != nil {
31996				var ID string
31997				err = json.Unmarshal(*v, &ID)
31998				if err != nil {
31999					return err
32000				}
32001				va.ID = &ID
32002			}
32003		case "name":
32004			if v != nil {
32005				var name string
32006				err = json.Unmarshal(*v, &name)
32007				if err != nil {
32008					return err
32009				}
32010				va.Name = &name
32011			}
32012		case "type":
32013			if v != nil {
32014				var typeVar string
32015				err = json.Unmarshal(*v, &typeVar)
32016				if err != nil {
32017					return err
32018				}
32019				va.Type = &typeVar
32020			}
32021		case "location":
32022			if v != nil {
32023				var location string
32024				err = json.Unmarshal(*v, &location)
32025				if err != nil {
32026					return err
32027				}
32028				va.Location = &location
32029			}
32030		case "tags":
32031			if v != nil {
32032				var tags map[string]*string
32033				err = json.Unmarshal(*v, &tags)
32034				if err != nil {
32035					return err
32036				}
32037				va.Tags = tags
32038			}
32039		}
32040	}
32041
32042	return nil
32043}
32044
32045// VirtualApplianceListResult response for ListNetworkVirtualAppliances API service call.
32046type VirtualApplianceListResult struct {
32047	autorest.Response `json:"-"`
32048	// Value - List of Network Virtual Appliances.
32049	Value *[]VirtualAppliance `json:"value,omitempty"`
32050	// NextLink - URL to get the next set of results.
32051	NextLink *string `json:"nextLink,omitempty"`
32052}
32053
32054// VirtualApplianceListResultIterator provides access to a complete listing of VirtualAppliance values.
32055type VirtualApplianceListResultIterator struct {
32056	i    int
32057	page VirtualApplianceListResultPage
32058}
32059
32060// NextWithContext advances to the next value.  If there was an error making
32061// the request the iterator does not advance and the error is returned.
32062func (iter *VirtualApplianceListResultIterator) NextWithContext(ctx context.Context) (err error) {
32063	if tracing.IsEnabled() {
32064		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceListResultIterator.NextWithContext")
32065		defer func() {
32066			sc := -1
32067			if iter.Response().Response.Response != nil {
32068				sc = iter.Response().Response.Response.StatusCode
32069			}
32070			tracing.EndSpan(ctx, sc, err)
32071		}()
32072	}
32073	iter.i++
32074	if iter.i < len(iter.page.Values()) {
32075		return nil
32076	}
32077	err = iter.page.NextWithContext(ctx)
32078	if err != nil {
32079		iter.i--
32080		return err
32081	}
32082	iter.i = 0
32083	return nil
32084}
32085
32086// Next advances to the next value.  If there was an error making
32087// the request the iterator does not advance and the error is returned.
32088// Deprecated: Use NextWithContext() instead.
32089func (iter *VirtualApplianceListResultIterator) Next() error {
32090	return iter.NextWithContext(context.Background())
32091}
32092
32093// NotDone returns true if the enumeration should be started or is not yet complete.
32094func (iter VirtualApplianceListResultIterator) NotDone() bool {
32095	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32096}
32097
32098// Response returns the raw server response from the last page request.
32099func (iter VirtualApplianceListResultIterator) Response() VirtualApplianceListResult {
32100	return iter.page.Response()
32101}
32102
32103// Value returns the current value or a zero-initialized value if the
32104// iterator has advanced beyond the end of the collection.
32105func (iter VirtualApplianceListResultIterator) Value() VirtualAppliance {
32106	if !iter.page.NotDone() {
32107		return VirtualAppliance{}
32108	}
32109	return iter.page.Values()[iter.i]
32110}
32111
32112// Creates a new instance of the VirtualApplianceListResultIterator type.
32113func NewVirtualApplianceListResultIterator(page VirtualApplianceListResultPage) VirtualApplianceListResultIterator {
32114	return VirtualApplianceListResultIterator{page: page}
32115}
32116
32117// IsEmpty returns true if the ListResult contains no values.
32118func (valr VirtualApplianceListResult) IsEmpty() bool {
32119	return valr.Value == nil || len(*valr.Value) == 0
32120}
32121
32122// hasNextLink returns true if the NextLink is not empty.
32123func (valr VirtualApplianceListResult) hasNextLink() bool {
32124	return valr.NextLink != nil && len(*valr.NextLink) != 0
32125}
32126
32127// virtualApplianceListResultPreparer prepares a request to retrieve the next set of results.
32128// It returns nil if no more results exist.
32129func (valr VirtualApplianceListResult) virtualApplianceListResultPreparer(ctx context.Context) (*http.Request, error) {
32130	if !valr.hasNextLink() {
32131		return nil, nil
32132	}
32133	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32134		autorest.AsJSON(),
32135		autorest.AsGet(),
32136		autorest.WithBaseURL(to.String(valr.NextLink)))
32137}
32138
32139// VirtualApplianceListResultPage contains a page of VirtualAppliance values.
32140type VirtualApplianceListResultPage struct {
32141	fn   func(context.Context, VirtualApplianceListResult) (VirtualApplianceListResult, error)
32142	valr VirtualApplianceListResult
32143}
32144
32145// NextWithContext advances to the next page of values.  If there was an error making
32146// the request the page does not advance and the error is returned.
32147func (page *VirtualApplianceListResultPage) NextWithContext(ctx context.Context) (err error) {
32148	if tracing.IsEnabled() {
32149		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceListResultPage.NextWithContext")
32150		defer func() {
32151			sc := -1
32152			if page.Response().Response.Response != nil {
32153				sc = page.Response().Response.Response.StatusCode
32154			}
32155			tracing.EndSpan(ctx, sc, err)
32156		}()
32157	}
32158	for {
32159		next, err := page.fn(ctx, page.valr)
32160		if err != nil {
32161			return err
32162		}
32163		page.valr = next
32164		if !next.hasNextLink() || !next.IsEmpty() {
32165			break
32166		}
32167	}
32168	return nil
32169}
32170
32171// Next advances to the next page of values.  If there was an error making
32172// the request the page does not advance and the error is returned.
32173// Deprecated: Use NextWithContext() instead.
32174func (page *VirtualApplianceListResultPage) Next() error {
32175	return page.NextWithContext(context.Background())
32176}
32177
32178// NotDone returns true if the page enumeration should be started or is not yet complete.
32179func (page VirtualApplianceListResultPage) NotDone() bool {
32180	return !page.valr.IsEmpty()
32181}
32182
32183// Response returns the raw server response from the last page request.
32184func (page VirtualApplianceListResultPage) Response() VirtualApplianceListResult {
32185	return page.valr
32186}
32187
32188// Values returns the slice of values for the current page or nil if there are no values.
32189func (page VirtualApplianceListResultPage) Values() []VirtualAppliance {
32190	if page.valr.IsEmpty() {
32191		return nil
32192	}
32193	return *page.valr.Value
32194}
32195
32196// Creates a new instance of the VirtualApplianceListResultPage type.
32197func NewVirtualApplianceListResultPage(cur VirtualApplianceListResult, getNextPage func(context.Context, VirtualApplianceListResult) (VirtualApplianceListResult, error)) VirtualApplianceListResultPage {
32198	return VirtualApplianceListResultPage{
32199		fn:   getNextPage,
32200		valr: cur,
32201	}
32202}
32203
32204// VirtualApplianceNicProperties network Virtual Appliance NIC properties.
32205type VirtualApplianceNicProperties struct {
32206	// Name - READ-ONLY; NIC name.
32207	Name *string `json:"name,omitempty"`
32208	// PublicIPAddress - READ-ONLY; Public IP address.
32209	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
32210	// PrivateIPAddress - READ-ONLY; Private IP address.
32211	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
32212}
32213
32214// VirtualAppliancePropertiesFormat network Virtual Appliance definition.
32215type VirtualAppliancePropertiesFormat struct {
32216	// NvaSku - Network Virtual Appliance SKU.
32217	NvaSku *VirtualApplianceSkuProperties `json:"nvaSku,omitempty"`
32218	// BootStrapConfigurationBlobs - BootStrapConfigurationBlobs storage URLs.
32219	BootStrapConfigurationBlobs *[]string `json:"bootStrapConfigurationBlobs,omitempty"`
32220	// VirtualHub - The Virtual Hub where Network Virtual Appliance is being deployed.
32221	VirtualHub *SubResource `json:"virtualHub,omitempty"`
32222	// CloudInitConfigurationBlobs - CloudInitConfigurationBlob storage URLs.
32223	CloudInitConfigurationBlobs *[]string `json:"cloudInitConfigurationBlobs,omitempty"`
32224	// CloudInitConfiguration - CloudInitConfiguration string in plain text.
32225	CloudInitConfiguration *string `json:"cloudInitConfiguration,omitempty"`
32226	// VirtualApplianceAsn - VirtualAppliance ASN.
32227	VirtualApplianceAsn *int64 `json:"virtualApplianceAsn,omitempty"`
32228	// VirtualApplianceNics - READ-ONLY; List of Virtual Appliance Network Interfaces.
32229	VirtualApplianceNics *[]VirtualApplianceNicProperties `json:"virtualApplianceNics,omitempty"`
32230	// VirtualApplianceSites - READ-ONLY; List of references to VirtualApplianceSite.
32231	VirtualApplianceSites *[]SubResource `json:"virtualApplianceSites,omitempty"`
32232	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
32233	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32234}
32235
32236// MarshalJSON is the custom marshaler for VirtualAppliancePropertiesFormat.
32237func (vapf VirtualAppliancePropertiesFormat) MarshalJSON() ([]byte, error) {
32238	objectMap := make(map[string]interface{})
32239	if vapf.NvaSku != nil {
32240		objectMap["nvaSku"] = vapf.NvaSku
32241	}
32242	if vapf.BootStrapConfigurationBlobs != nil {
32243		objectMap["bootStrapConfigurationBlobs"] = vapf.BootStrapConfigurationBlobs
32244	}
32245	if vapf.VirtualHub != nil {
32246		objectMap["virtualHub"] = vapf.VirtualHub
32247	}
32248	if vapf.CloudInitConfigurationBlobs != nil {
32249		objectMap["cloudInitConfigurationBlobs"] = vapf.CloudInitConfigurationBlobs
32250	}
32251	if vapf.CloudInitConfiguration != nil {
32252		objectMap["cloudInitConfiguration"] = vapf.CloudInitConfiguration
32253	}
32254	if vapf.VirtualApplianceAsn != nil {
32255		objectMap["virtualApplianceAsn"] = vapf.VirtualApplianceAsn
32256	}
32257	return json.Marshal(objectMap)
32258}
32259
32260// VirtualAppliancesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
32261// long-running operation.
32262type VirtualAppliancesCreateOrUpdateFuture struct {
32263	azure.FutureAPI
32264	// Result returns the result of the asynchronous operation.
32265	// If the operation has not completed it will return an error.
32266	Result func(VirtualAppliancesClient) (VirtualAppliance, error)
32267}
32268
32269// VirtualAppliancesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
32270// operation.
32271type VirtualAppliancesDeleteFuture struct {
32272	azure.FutureAPI
32273	// Result returns the result of the asynchronous operation.
32274	// If the operation has not completed it will return an error.
32275	Result func(VirtualAppliancesClient) (autorest.Response, error)
32276}
32277
32278// VirtualApplianceSite virtual Appliance Site resource.
32279type VirtualApplianceSite struct {
32280	autorest.Response `json:"-"`
32281	// VirtualApplianceSiteProperties - The properties of the Virtual Appliance Sites.
32282	*VirtualApplianceSiteProperties `json:"properties,omitempty"`
32283	// Name - Name of the virtual appliance site.
32284	Name *string `json:"name,omitempty"`
32285	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
32286	Etag *string `json:"etag,omitempty"`
32287	// Type - READ-ONLY; Site type.
32288	Type *string `json:"type,omitempty"`
32289	// ID - Resource ID.
32290	ID *string `json:"id,omitempty"`
32291}
32292
32293// MarshalJSON is the custom marshaler for VirtualApplianceSite.
32294func (vas VirtualApplianceSite) MarshalJSON() ([]byte, error) {
32295	objectMap := make(map[string]interface{})
32296	if vas.VirtualApplianceSiteProperties != nil {
32297		objectMap["properties"] = vas.VirtualApplianceSiteProperties
32298	}
32299	if vas.Name != nil {
32300		objectMap["name"] = vas.Name
32301	}
32302	if vas.ID != nil {
32303		objectMap["id"] = vas.ID
32304	}
32305	return json.Marshal(objectMap)
32306}
32307
32308// UnmarshalJSON is the custom unmarshaler for VirtualApplianceSite struct.
32309func (vas *VirtualApplianceSite) UnmarshalJSON(body []byte) error {
32310	var m map[string]*json.RawMessage
32311	err := json.Unmarshal(body, &m)
32312	if err != nil {
32313		return err
32314	}
32315	for k, v := range m {
32316		switch k {
32317		case "properties":
32318			if v != nil {
32319				var virtualApplianceSiteProperties VirtualApplianceSiteProperties
32320				err = json.Unmarshal(*v, &virtualApplianceSiteProperties)
32321				if err != nil {
32322					return err
32323				}
32324				vas.VirtualApplianceSiteProperties = &virtualApplianceSiteProperties
32325			}
32326		case "name":
32327			if v != nil {
32328				var name string
32329				err = json.Unmarshal(*v, &name)
32330				if err != nil {
32331					return err
32332				}
32333				vas.Name = &name
32334			}
32335		case "etag":
32336			if v != nil {
32337				var etag string
32338				err = json.Unmarshal(*v, &etag)
32339				if err != nil {
32340					return err
32341				}
32342				vas.Etag = &etag
32343			}
32344		case "type":
32345			if v != nil {
32346				var typeVar string
32347				err = json.Unmarshal(*v, &typeVar)
32348				if err != nil {
32349					return err
32350				}
32351				vas.Type = &typeVar
32352			}
32353		case "id":
32354			if v != nil {
32355				var ID string
32356				err = json.Unmarshal(*v, &ID)
32357				if err != nil {
32358					return err
32359				}
32360				vas.ID = &ID
32361			}
32362		}
32363	}
32364
32365	return nil
32366}
32367
32368// VirtualApplianceSiteListResult response for ListNetworkVirtualApplianceSites API service call.
32369type VirtualApplianceSiteListResult struct {
32370	autorest.Response `json:"-"`
32371	// Value - List of Network Virtual Appliance sites.
32372	Value *[]VirtualApplianceSite `json:"value,omitempty"`
32373	// NextLink - URL to get the next set of results.
32374	NextLink *string `json:"nextLink,omitempty"`
32375}
32376
32377// VirtualApplianceSiteListResultIterator provides access to a complete listing of VirtualApplianceSite
32378// values.
32379type VirtualApplianceSiteListResultIterator struct {
32380	i    int
32381	page VirtualApplianceSiteListResultPage
32382}
32383
32384// NextWithContext advances to the next value.  If there was an error making
32385// the request the iterator does not advance and the error is returned.
32386func (iter *VirtualApplianceSiteListResultIterator) NextWithContext(ctx context.Context) (err error) {
32387	if tracing.IsEnabled() {
32388		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSiteListResultIterator.NextWithContext")
32389		defer func() {
32390			sc := -1
32391			if iter.Response().Response.Response != nil {
32392				sc = iter.Response().Response.Response.StatusCode
32393			}
32394			tracing.EndSpan(ctx, sc, err)
32395		}()
32396	}
32397	iter.i++
32398	if iter.i < len(iter.page.Values()) {
32399		return nil
32400	}
32401	err = iter.page.NextWithContext(ctx)
32402	if err != nil {
32403		iter.i--
32404		return err
32405	}
32406	iter.i = 0
32407	return nil
32408}
32409
32410// Next advances to the next value.  If there was an error making
32411// the request the iterator does not advance and the error is returned.
32412// Deprecated: Use NextWithContext() instead.
32413func (iter *VirtualApplianceSiteListResultIterator) Next() error {
32414	return iter.NextWithContext(context.Background())
32415}
32416
32417// NotDone returns true if the enumeration should be started or is not yet complete.
32418func (iter VirtualApplianceSiteListResultIterator) NotDone() bool {
32419	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32420}
32421
32422// Response returns the raw server response from the last page request.
32423func (iter VirtualApplianceSiteListResultIterator) Response() VirtualApplianceSiteListResult {
32424	return iter.page.Response()
32425}
32426
32427// Value returns the current value or a zero-initialized value if the
32428// iterator has advanced beyond the end of the collection.
32429func (iter VirtualApplianceSiteListResultIterator) Value() VirtualApplianceSite {
32430	if !iter.page.NotDone() {
32431		return VirtualApplianceSite{}
32432	}
32433	return iter.page.Values()[iter.i]
32434}
32435
32436// Creates a new instance of the VirtualApplianceSiteListResultIterator type.
32437func NewVirtualApplianceSiteListResultIterator(page VirtualApplianceSiteListResultPage) VirtualApplianceSiteListResultIterator {
32438	return VirtualApplianceSiteListResultIterator{page: page}
32439}
32440
32441// IsEmpty returns true if the ListResult contains no values.
32442func (vaslr VirtualApplianceSiteListResult) IsEmpty() bool {
32443	return vaslr.Value == nil || len(*vaslr.Value) == 0
32444}
32445
32446// hasNextLink returns true if the NextLink is not empty.
32447func (vaslr VirtualApplianceSiteListResult) hasNextLink() bool {
32448	return vaslr.NextLink != nil && len(*vaslr.NextLink) != 0
32449}
32450
32451// virtualApplianceSiteListResultPreparer prepares a request to retrieve the next set of results.
32452// It returns nil if no more results exist.
32453func (vaslr VirtualApplianceSiteListResult) virtualApplianceSiteListResultPreparer(ctx context.Context) (*http.Request, error) {
32454	if !vaslr.hasNextLink() {
32455		return nil, nil
32456	}
32457	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32458		autorest.AsJSON(),
32459		autorest.AsGet(),
32460		autorest.WithBaseURL(to.String(vaslr.NextLink)))
32461}
32462
32463// VirtualApplianceSiteListResultPage contains a page of VirtualApplianceSite values.
32464type VirtualApplianceSiteListResultPage struct {
32465	fn    func(context.Context, VirtualApplianceSiteListResult) (VirtualApplianceSiteListResult, error)
32466	vaslr VirtualApplianceSiteListResult
32467}
32468
32469// NextWithContext advances to the next page of values.  If there was an error making
32470// the request the page does not advance and the error is returned.
32471func (page *VirtualApplianceSiteListResultPage) NextWithContext(ctx context.Context) (err error) {
32472	if tracing.IsEnabled() {
32473		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSiteListResultPage.NextWithContext")
32474		defer func() {
32475			sc := -1
32476			if page.Response().Response.Response != nil {
32477				sc = page.Response().Response.Response.StatusCode
32478			}
32479			tracing.EndSpan(ctx, sc, err)
32480		}()
32481	}
32482	for {
32483		next, err := page.fn(ctx, page.vaslr)
32484		if err != nil {
32485			return err
32486		}
32487		page.vaslr = next
32488		if !next.hasNextLink() || !next.IsEmpty() {
32489			break
32490		}
32491	}
32492	return nil
32493}
32494
32495// Next advances to the next page of values.  If there was an error making
32496// the request the page does not advance and the error is returned.
32497// Deprecated: Use NextWithContext() instead.
32498func (page *VirtualApplianceSiteListResultPage) Next() error {
32499	return page.NextWithContext(context.Background())
32500}
32501
32502// NotDone returns true if the page enumeration should be started or is not yet complete.
32503func (page VirtualApplianceSiteListResultPage) NotDone() bool {
32504	return !page.vaslr.IsEmpty()
32505}
32506
32507// Response returns the raw server response from the last page request.
32508func (page VirtualApplianceSiteListResultPage) Response() VirtualApplianceSiteListResult {
32509	return page.vaslr
32510}
32511
32512// Values returns the slice of values for the current page or nil if there are no values.
32513func (page VirtualApplianceSiteListResultPage) Values() []VirtualApplianceSite {
32514	if page.vaslr.IsEmpty() {
32515		return nil
32516	}
32517	return *page.vaslr.Value
32518}
32519
32520// Creates a new instance of the VirtualApplianceSiteListResultPage type.
32521func NewVirtualApplianceSiteListResultPage(cur VirtualApplianceSiteListResult, getNextPage func(context.Context, VirtualApplianceSiteListResult) (VirtualApplianceSiteListResult, error)) VirtualApplianceSiteListResultPage {
32522	return VirtualApplianceSiteListResultPage{
32523		fn:    getNextPage,
32524		vaslr: cur,
32525	}
32526}
32527
32528// VirtualApplianceSiteProperties properties of the rule group.
32529type VirtualApplianceSiteProperties struct {
32530	// AddressPrefix - Address Prefix.
32531	AddressPrefix *string `json:"addressPrefix,omitempty"`
32532	// O365Policy - Office 365 Policy.
32533	O365Policy *Office365PolicyProperties `json:"o365Policy,omitempty"`
32534	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
32535	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32536}
32537
32538// MarshalJSON is the custom marshaler for VirtualApplianceSiteProperties.
32539func (vasp VirtualApplianceSiteProperties) MarshalJSON() ([]byte, error) {
32540	objectMap := make(map[string]interface{})
32541	if vasp.AddressPrefix != nil {
32542		objectMap["addressPrefix"] = vasp.AddressPrefix
32543	}
32544	if vasp.O365Policy != nil {
32545		objectMap["o365Policy"] = vasp.O365Policy
32546	}
32547	return json.Marshal(objectMap)
32548}
32549
32550// VirtualApplianceSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
32551// long-running operation.
32552type VirtualApplianceSitesCreateOrUpdateFuture struct {
32553	azure.FutureAPI
32554	// Result returns the result of the asynchronous operation.
32555	// If the operation has not completed it will return an error.
32556	Result func(VirtualApplianceSitesClient) (VirtualApplianceSite, error)
32557}
32558
32559// VirtualApplianceSitesDeleteFuture an abstraction for monitoring and retrieving the results of a
32560// long-running operation.
32561type VirtualApplianceSitesDeleteFuture struct {
32562	azure.FutureAPI
32563	// Result returns the result of the asynchronous operation.
32564	// If the operation has not completed it will return an error.
32565	Result func(VirtualApplianceSitesClient) (autorest.Response, error)
32566}
32567
32568// VirtualApplianceSku definition of the NetworkVirtualApplianceSkus resource.
32569type VirtualApplianceSku struct {
32570	autorest.Response `json:"-"`
32571	// VirtualApplianceSkuPropertiesFormat - NetworkVirtualApplianceSku properties.
32572	*VirtualApplianceSkuPropertiesFormat `json:"properties,omitempty"`
32573	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
32574	Etag *string `json:"etag,omitempty"`
32575	// ID - Resource ID.
32576	ID *string `json:"id,omitempty"`
32577	// Name - READ-ONLY; Resource name.
32578	Name *string `json:"name,omitempty"`
32579	// Type - READ-ONLY; Resource type.
32580	Type *string `json:"type,omitempty"`
32581	// Location - Resource location.
32582	Location *string `json:"location,omitempty"`
32583	// Tags - Resource tags.
32584	Tags map[string]*string `json:"tags"`
32585}
32586
32587// MarshalJSON is the custom marshaler for VirtualApplianceSku.
32588func (vas VirtualApplianceSku) MarshalJSON() ([]byte, error) {
32589	objectMap := make(map[string]interface{})
32590	if vas.VirtualApplianceSkuPropertiesFormat != nil {
32591		objectMap["properties"] = vas.VirtualApplianceSkuPropertiesFormat
32592	}
32593	if vas.ID != nil {
32594		objectMap["id"] = vas.ID
32595	}
32596	if vas.Location != nil {
32597		objectMap["location"] = vas.Location
32598	}
32599	if vas.Tags != nil {
32600		objectMap["tags"] = vas.Tags
32601	}
32602	return json.Marshal(objectMap)
32603}
32604
32605// UnmarshalJSON is the custom unmarshaler for VirtualApplianceSku struct.
32606func (vas *VirtualApplianceSku) UnmarshalJSON(body []byte) error {
32607	var m map[string]*json.RawMessage
32608	err := json.Unmarshal(body, &m)
32609	if err != nil {
32610		return err
32611	}
32612	for k, v := range m {
32613		switch k {
32614		case "properties":
32615			if v != nil {
32616				var virtualApplianceSkuPropertiesFormat VirtualApplianceSkuPropertiesFormat
32617				err = json.Unmarshal(*v, &virtualApplianceSkuPropertiesFormat)
32618				if err != nil {
32619					return err
32620				}
32621				vas.VirtualApplianceSkuPropertiesFormat = &virtualApplianceSkuPropertiesFormat
32622			}
32623		case "etag":
32624			if v != nil {
32625				var etag string
32626				err = json.Unmarshal(*v, &etag)
32627				if err != nil {
32628					return err
32629				}
32630				vas.Etag = &etag
32631			}
32632		case "id":
32633			if v != nil {
32634				var ID string
32635				err = json.Unmarshal(*v, &ID)
32636				if err != nil {
32637					return err
32638				}
32639				vas.ID = &ID
32640			}
32641		case "name":
32642			if v != nil {
32643				var name string
32644				err = json.Unmarshal(*v, &name)
32645				if err != nil {
32646					return err
32647				}
32648				vas.Name = &name
32649			}
32650		case "type":
32651			if v != nil {
32652				var typeVar string
32653				err = json.Unmarshal(*v, &typeVar)
32654				if err != nil {
32655					return err
32656				}
32657				vas.Type = &typeVar
32658			}
32659		case "location":
32660			if v != nil {
32661				var location string
32662				err = json.Unmarshal(*v, &location)
32663				if err != nil {
32664					return err
32665				}
32666				vas.Location = &location
32667			}
32668		case "tags":
32669			if v != nil {
32670				var tags map[string]*string
32671				err = json.Unmarshal(*v, &tags)
32672				if err != nil {
32673					return err
32674				}
32675				vas.Tags = tags
32676			}
32677		}
32678	}
32679
32680	return nil
32681}
32682
32683// VirtualApplianceSkuInstances list of available Sku and instances.
32684type VirtualApplianceSkuInstances struct {
32685	// ScaleUnit - READ-ONLY; Scale Unit.
32686	ScaleUnit *string `json:"scaleUnit,omitempty"`
32687	// InstanceCount - READ-ONLY; Instance Count.
32688	InstanceCount *int32 `json:"instanceCount,omitempty"`
32689}
32690
32691// VirtualApplianceSkuListResult response for ListNetworkVirtualApplianceSkus API service call.
32692type VirtualApplianceSkuListResult struct {
32693	autorest.Response `json:"-"`
32694	// Value - List of Network Virtual Appliance Skus that are available.
32695	Value *[]VirtualApplianceSku `json:"value,omitempty"`
32696	// NextLink - URL to get the next set of results.
32697	NextLink *string `json:"nextLink,omitempty"`
32698}
32699
32700// VirtualApplianceSkuListResultIterator provides access to a complete listing of VirtualApplianceSku
32701// values.
32702type VirtualApplianceSkuListResultIterator struct {
32703	i    int
32704	page VirtualApplianceSkuListResultPage
32705}
32706
32707// NextWithContext advances to the next value.  If there was an error making
32708// the request the iterator does not advance and the error is returned.
32709func (iter *VirtualApplianceSkuListResultIterator) NextWithContext(ctx context.Context) (err error) {
32710	if tracing.IsEnabled() {
32711		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSkuListResultIterator.NextWithContext")
32712		defer func() {
32713			sc := -1
32714			if iter.Response().Response.Response != nil {
32715				sc = iter.Response().Response.Response.StatusCode
32716			}
32717			tracing.EndSpan(ctx, sc, err)
32718		}()
32719	}
32720	iter.i++
32721	if iter.i < len(iter.page.Values()) {
32722		return nil
32723	}
32724	err = iter.page.NextWithContext(ctx)
32725	if err != nil {
32726		iter.i--
32727		return err
32728	}
32729	iter.i = 0
32730	return nil
32731}
32732
32733// Next advances to the next value.  If there was an error making
32734// the request the iterator does not advance and the error is returned.
32735// Deprecated: Use NextWithContext() instead.
32736func (iter *VirtualApplianceSkuListResultIterator) Next() error {
32737	return iter.NextWithContext(context.Background())
32738}
32739
32740// NotDone returns true if the enumeration should be started or is not yet complete.
32741func (iter VirtualApplianceSkuListResultIterator) NotDone() bool {
32742	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32743}
32744
32745// Response returns the raw server response from the last page request.
32746func (iter VirtualApplianceSkuListResultIterator) Response() VirtualApplianceSkuListResult {
32747	return iter.page.Response()
32748}
32749
32750// Value returns the current value or a zero-initialized value if the
32751// iterator has advanced beyond the end of the collection.
32752func (iter VirtualApplianceSkuListResultIterator) Value() VirtualApplianceSku {
32753	if !iter.page.NotDone() {
32754		return VirtualApplianceSku{}
32755	}
32756	return iter.page.Values()[iter.i]
32757}
32758
32759// Creates a new instance of the VirtualApplianceSkuListResultIterator type.
32760func NewVirtualApplianceSkuListResultIterator(page VirtualApplianceSkuListResultPage) VirtualApplianceSkuListResultIterator {
32761	return VirtualApplianceSkuListResultIterator{page: page}
32762}
32763
32764// IsEmpty returns true if the ListResult contains no values.
32765func (vaslr VirtualApplianceSkuListResult) IsEmpty() bool {
32766	return vaslr.Value == nil || len(*vaslr.Value) == 0
32767}
32768
32769// hasNextLink returns true if the NextLink is not empty.
32770func (vaslr VirtualApplianceSkuListResult) hasNextLink() bool {
32771	return vaslr.NextLink != nil && len(*vaslr.NextLink) != 0
32772}
32773
32774// virtualApplianceSkuListResultPreparer prepares a request to retrieve the next set of results.
32775// It returns nil if no more results exist.
32776func (vaslr VirtualApplianceSkuListResult) virtualApplianceSkuListResultPreparer(ctx context.Context) (*http.Request, error) {
32777	if !vaslr.hasNextLink() {
32778		return nil, nil
32779	}
32780	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32781		autorest.AsJSON(),
32782		autorest.AsGet(),
32783		autorest.WithBaseURL(to.String(vaslr.NextLink)))
32784}
32785
32786// VirtualApplianceSkuListResultPage contains a page of VirtualApplianceSku values.
32787type VirtualApplianceSkuListResultPage struct {
32788	fn    func(context.Context, VirtualApplianceSkuListResult) (VirtualApplianceSkuListResult, error)
32789	vaslr VirtualApplianceSkuListResult
32790}
32791
32792// NextWithContext advances to the next page of values.  If there was an error making
32793// the request the page does not advance and the error is returned.
32794func (page *VirtualApplianceSkuListResultPage) NextWithContext(ctx context.Context) (err error) {
32795	if tracing.IsEnabled() {
32796		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSkuListResultPage.NextWithContext")
32797		defer func() {
32798			sc := -1
32799			if page.Response().Response.Response != nil {
32800				sc = page.Response().Response.Response.StatusCode
32801			}
32802			tracing.EndSpan(ctx, sc, err)
32803		}()
32804	}
32805	for {
32806		next, err := page.fn(ctx, page.vaslr)
32807		if err != nil {
32808			return err
32809		}
32810		page.vaslr = next
32811		if !next.hasNextLink() || !next.IsEmpty() {
32812			break
32813		}
32814	}
32815	return nil
32816}
32817
32818// Next advances to the next page of values.  If there was an error making
32819// the request the page does not advance and the error is returned.
32820// Deprecated: Use NextWithContext() instead.
32821func (page *VirtualApplianceSkuListResultPage) Next() error {
32822	return page.NextWithContext(context.Background())
32823}
32824
32825// NotDone returns true if the page enumeration should be started or is not yet complete.
32826func (page VirtualApplianceSkuListResultPage) NotDone() bool {
32827	return !page.vaslr.IsEmpty()
32828}
32829
32830// Response returns the raw server response from the last page request.
32831func (page VirtualApplianceSkuListResultPage) Response() VirtualApplianceSkuListResult {
32832	return page.vaslr
32833}
32834
32835// Values returns the slice of values for the current page or nil if there are no values.
32836func (page VirtualApplianceSkuListResultPage) Values() []VirtualApplianceSku {
32837	if page.vaslr.IsEmpty() {
32838		return nil
32839	}
32840	return *page.vaslr.Value
32841}
32842
32843// Creates a new instance of the VirtualApplianceSkuListResultPage type.
32844func NewVirtualApplianceSkuListResultPage(cur VirtualApplianceSkuListResult, getNextPage func(context.Context, VirtualApplianceSkuListResult) (VirtualApplianceSkuListResult, error)) VirtualApplianceSkuListResultPage {
32845	return VirtualApplianceSkuListResultPage{
32846		fn:    getNextPage,
32847		vaslr: cur,
32848	}
32849}
32850
32851// VirtualApplianceSkuProperties network Virtual Appliance Sku Properties.
32852type VirtualApplianceSkuProperties struct {
32853	// Vendor - Virtual Appliance Vendor.
32854	Vendor *string `json:"vendor,omitempty"`
32855	// BundledScaleUnit - Virtual Appliance Scale Unit.
32856	BundledScaleUnit *string `json:"bundledScaleUnit,omitempty"`
32857	// MarketPlaceVersion - Virtual Appliance Version.
32858	MarketPlaceVersion *string `json:"marketPlaceVersion,omitempty"`
32859}
32860
32861// VirtualApplianceSkuPropertiesFormat properties specific to NetworkVirtualApplianceSkus.
32862type VirtualApplianceSkuPropertiesFormat struct {
32863	// Vendor - READ-ONLY; Network Virtual Appliance Sku vendor.
32864	Vendor *string `json:"vendor,omitempty"`
32865	// AvailableVersions - READ-ONLY; Available Network Virtual Appliance versions.
32866	AvailableVersions *[]string `json:"availableVersions,omitempty"`
32867	// AvailableScaleUnits - The list of scale units available.
32868	AvailableScaleUnits *[]VirtualApplianceSkuInstances `json:"availableScaleUnits,omitempty"`
32869}
32870
32871// MarshalJSON is the custom marshaler for VirtualApplianceSkuPropertiesFormat.
32872func (vaspf VirtualApplianceSkuPropertiesFormat) MarshalJSON() ([]byte, error) {
32873	objectMap := make(map[string]interface{})
32874	if vaspf.AvailableScaleUnits != nil {
32875		objectMap["availableScaleUnits"] = vaspf.AvailableScaleUnits
32876	}
32877	return json.Marshal(objectMap)
32878}
32879
32880// VirtualHub virtualHub Resource.
32881type VirtualHub struct {
32882	autorest.Response `json:"-"`
32883	// VirtualHubProperties - Properties of the virtual hub.
32884	*VirtualHubProperties `json:"properties,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	// Name - READ-ONLY; Resource name.
32890	Name *string `json:"name,omitempty"`
32891	// Type - READ-ONLY; Resource type.
32892	Type *string `json:"type,omitempty"`
32893	// Location - Resource location.
32894	Location *string `json:"location,omitempty"`
32895	// Tags - Resource tags.
32896	Tags map[string]*string `json:"tags"`
32897}
32898
32899// MarshalJSON is the custom marshaler for VirtualHub.
32900func (vh VirtualHub) MarshalJSON() ([]byte, error) {
32901	objectMap := make(map[string]interface{})
32902	if vh.VirtualHubProperties != nil {
32903		objectMap["properties"] = vh.VirtualHubProperties
32904	}
32905	if vh.ID != nil {
32906		objectMap["id"] = vh.ID
32907	}
32908	if vh.Location != nil {
32909		objectMap["location"] = vh.Location
32910	}
32911	if vh.Tags != nil {
32912		objectMap["tags"] = vh.Tags
32913	}
32914	return json.Marshal(objectMap)
32915}
32916
32917// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
32918func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
32919	var m map[string]*json.RawMessage
32920	err := json.Unmarshal(body, &m)
32921	if err != nil {
32922		return err
32923	}
32924	for k, v := range m {
32925		switch k {
32926		case "properties":
32927			if v != nil {
32928				var virtualHubProperties VirtualHubProperties
32929				err = json.Unmarshal(*v, &virtualHubProperties)
32930				if err != nil {
32931					return err
32932				}
32933				vh.VirtualHubProperties = &virtualHubProperties
32934			}
32935		case "etag":
32936			if v != nil {
32937				var etag string
32938				err = json.Unmarshal(*v, &etag)
32939				if err != nil {
32940					return err
32941				}
32942				vh.Etag = &etag
32943			}
32944		case "id":
32945			if v != nil {
32946				var ID string
32947				err = json.Unmarshal(*v, &ID)
32948				if err != nil {
32949					return err
32950				}
32951				vh.ID = &ID
32952			}
32953		case "name":
32954			if v != nil {
32955				var name string
32956				err = json.Unmarshal(*v, &name)
32957				if err != nil {
32958					return err
32959				}
32960				vh.Name = &name
32961			}
32962		case "type":
32963			if v != nil {
32964				var typeVar string
32965				err = json.Unmarshal(*v, &typeVar)
32966				if err != nil {
32967					return err
32968				}
32969				vh.Type = &typeVar
32970			}
32971		case "location":
32972			if v != nil {
32973				var location string
32974				err = json.Unmarshal(*v, &location)
32975				if err != nil {
32976					return err
32977				}
32978				vh.Location = &location
32979			}
32980		case "tags":
32981			if v != nil {
32982				var tags map[string]*string
32983				err = json.Unmarshal(*v, &tags)
32984				if err != nil {
32985					return err
32986				}
32987				vh.Tags = tags
32988			}
32989		}
32990	}
32991
32992	return nil
32993}
32994
32995// VirtualHubBgpConnectionCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
32996// a long-running operation.
32997type VirtualHubBgpConnectionCreateOrUpdateFuture struct {
32998	azure.FutureAPI
32999	// Result returns the result of the asynchronous operation.
33000	// If the operation has not completed it will return an error.
33001	Result func(VirtualHubBgpConnectionClient) (BgpConnection, error)
33002}
33003
33004// VirtualHubBgpConnectionDeleteFuture an abstraction for monitoring and retrieving the results of a
33005// long-running operation.
33006type VirtualHubBgpConnectionDeleteFuture struct {
33007	azure.FutureAPI
33008	// Result returns the result of the asynchronous operation.
33009	// If the operation has not completed it will return an error.
33010	Result func(VirtualHubBgpConnectionClient) (autorest.Response, error)
33011}
33012
33013// VirtualHubEffectiveRoute the effective route configured on the virtual hub or specified resource.
33014type VirtualHubEffectiveRoute struct {
33015	// AddressPrefixes - The list of address prefixes.
33016	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
33017	// NextHops - The list of next hops.
33018	NextHops *[]string `json:"nextHops,omitempty"`
33019	// NextHopType - The type of the next hop.
33020	NextHopType *string `json:"nextHopType,omitempty"`
33021	// AsPath - The ASPath of this route.
33022	AsPath *string `json:"asPath,omitempty"`
33023	// RouteOrigin - The origin of this route.
33024	RouteOrigin *string `json:"routeOrigin,omitempty"`
33025}
33026
33027// VirtualHubEffectiveRouteList effectiveRoutes List.
33028type VirtualHubEffectiveRouteList struct {
33029	// Value - The list of effective routes configured on the virtual hub or the specified resource.
33030	Value *[]VirtualHubEffectiveRoute `json:"value,omitempty"`
33031}
33032
33033// VirtualHubID virtual Hub identifier.
33034type VirtualHubID struct {
33035	// 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.
33036	ID *string `json:"id,omitempty"`
33037}
33038
33039// VirtualHubIPConfigurationCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
33040// of a long-running operation.
33041type VirtualHubIPConfigurationCreateOrUpdateFuture struct {
33042	azure.FutureAPI
33043	// Result returns the result of the asynchronous operation.
33044	// If the operation has not completed it will return an error.
33045	Result func(VirtualHubIPConfigurationClient) (HubIPConfiguration, error)
33046}
33047
33048// VirtualHubIPConfigurationDeleteFuture an abstraction for monitoring and retrieving the results of a
33049// long-running operation.
33050type VirtualHubIPConfigurationDeleteFuture struct {
33051	azure.FutureAPI
33052	// Result returns the result of the asynchronous operation.
33053	// If the operation has not completed it will return an error.
33054	Result func(VirtualHubIPConfigurationClient) (autorest.Response, error)
33055}
33056
33057// VirtualHubProperties parameters for VirtualHub.
33058type VirtualHubProperties struct {
33059	// VirtualWan - The VirtualWAN to which the VirtualHub belongs.
33060	VirtualWan *SubResource `json:"virtualWan,omitempty"`
33061	// VpnGateway - The VpnGateway associated with this VirtualHub.
33062	VpnGateway *SubResource `json:"vpnGateway,omitempty"`
33063	// P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub.
33064	P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"`
33065	// ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub.
33066	ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"`
33067	// AzureFirewall - The azureFirewall associated with this VirtualHub.
33068	AzureFirewall *SubResource `json:"azureFirewall,omitempty"`
33069	// SecurityPartnerProvider - The securityPartnerProvider associated with this VirtualHub.
33070	SecurityPartnerProvider *SubResource `json:"securityPartnerProvider,omitempty"`
33071	// AddressPrefix - Address-prefix for this VirtualHub.
33072	AddressPrefix *string `json:"addressPrefix,omitempty"`
33073	// RouteTable - The routeTable associated with this virtual hub.
33074	RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"`
33075	// ProvisioningState - READ-ONLY; The provisioning state of the virtual hub resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
33076	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
33077	// SecurityProviderName - The Security Provider name.
33078	SecurityProviderName *string `json:"securityProviderName,omitempty"`
33079	// VirtualHubRouteTableV2s - List of all virtual hub route table v2s associated with this VirtualHub.
33080	VirtualHubRouteTableV2s *[]VirtualHubRouteTableV2 `json:"virtualHubRouteTableV2s,omitempty"`
33081	// Sku - The sku of this VirtualHub.
33082	Sku *string `json:"sku,omitempty"`
33083	// RoutingState - The routing state. Possible values include: 'RoutingStateNone', 'RoutingStateProvisioned', 'RoutingStateProvisioning', 'RoutingStateFailed'
33084	RoutingState RoutingState `json:"routingState,omitempty"`
33085	// BgpConnections - READ-ONLY; List of references to Bgp Connections.
33086	BgpConnections *[]SubResource `json:"bgpConnections,omitempty"`
33087	// IPConfigurations - READ-ONLY; List of references to IpConfigurations.
33088	IPConfigurations *[]SubResource `json:"ipConfigurations,omitempty"`
33089	// VirtualRouterAsn - VirtualRouter ASN.
33090	VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"`
33091	// VirtualRouterIps - VirtualRouter IPs.
33092	VirtualRouterIps *[]string `json:"virtualRouterIps,omitempty"`
33093}
33094
33095// MarshalJSON is the custom marshaler for VirtualHubProperties.
33096func (vhp VirtualHubProperties) MarshalJSON() ([]byte, error) {
33097	objectMap := make(map[string]interface{})
33098	if vhp.VirtualWan != nil {
33099		objectMap["virtualWan"] = vhp.VirtualWan
33100	}
33101	if vhp.VpnGateway != nil {
33102		objectMap["vpnGateway"] = vhp.VpnGateway
33103	}
33104	if vhp.P2SVpnGateway != nil {
33105		objectMap["p2SVpnGateway"] = vhp.P2SVpnGateway
33106	}
33107	if vhp.ExpressRouteGateway != nil {
33108		objectMap["expressRouteGateway"] = vhp.ExpressRouteGateway
33109	}
33110	if vhp.AzureFirewall != nil {
33111		objectMap["azureFirewall"] = vhp.AzureFirewall
33112	}
33113	if vhp.SecurityPartnerProvider != nil {
33114		objectMap["securityPartnerProvider"] = vhp.SecurityPartnerProvider
33115	}
33116	if vhp.AddressPrefix != nil {
33117		objectMap["addressPrefix"] = vhp.AddressPrefix
33118	}
33119	if vhp.RouteTable != nil {
33120		objectMap["routeTable"] = vhp.RouteTable
33121	}
33122	if vhp.SecurityProviderName != nil {
33123		objectMap["securityProviderName"] = vhp.SecurityProviderName
33124	}
33125	if vhp.VirtualHubRouteTableV2s != nil {
33126		objectMap["virtualHubRouteTableV2s"] = vhp.VirtualHubRouteTableV2s
33127	}
33128	if vhp.Sku != nil {
33129		objectMap["sku"] = vhp.Sku
33130	}
33131	if vhp.RoutingState != "" {
33132		objectMap["routingState"] = vhp.RoutingState
33133	}
33134	if vhp.VirtualRouterAsn != nil {
33135		objectMap["virtualRouterAsn"] = vhp.VirtualRouterAsn
33136	}
33137	if vhp.VirtualRouterIps != nil {
33138		objectMap["virtualRouterIps"] = vhp.VirtualRouterIps
33139	}
33140	return json.Marshal(objectMap)
33141}
33142
33143// VirtualHubRoute virtualHub route.
33144type VirtualHubRoute struct {
33145	// AddressPrefixes - List of all addressPrefixes.
33146	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
33147	// NextHopIPAddress - NextHop ip address.
33148	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
33149}
33150
33151// VirtualHubRouteTable virtualHub route table.
33152type VirtualHubRouteTable struct {
33153	// Routes - List of all routes.
33154	Routes *[]VirtualHubRoute `json:"routes,omitempty"`
33155}
33156
33157// VirtualHubRouteTableV2 virtualHubRouteTableV2 Resource.
33158type VirtualHubRouteTableV2 struct {
33159	autorest.Response `json:"-"`
33160	// VirtualHubRouteTableV2Properties - Properties of the virtual hub route table v2.
33161	*VirtualHubRouteTableV2Properties `json:"properties,omitempty"`
33162	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
33163	Name *string `json:"name,omitempty"`
33164	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
33165	Etag *string `json:"etag,omitempty"`
33166	// ID - Resource ID.
33167	ID *string `json:"id,omitempty"`
33168}
33169
33170// MarshalJSON is the custom marshaler for VirtualHubRouteTableV2.
33171func (vhrtv VirtualHubRouteTableV2) MarshalJSON() ([]byte, error) {
33172	objectMap := make(map[string]interface{})
33173	if vhrtv.VirtualHubRouteTableV2Properties != nil {
33174		objectMap["properties"] = vhrtv.VirtualHubRouteTableV2Properties
33175	}
33176	if vhrtv.Name != nil {
33177		objectMap["name"] = vhrtv.Name
33178	}
33179	if vhrtv.ID != nil {
33180		objectMap["id"] = vhrtv.ID
33181	}
33182	return json.Marshal(objectMap)
33183}
33184
33185// UnmarshalJSON is the custom unmarshaler for VirtualHubRouteTableV2 struct.
33186func (vhrtv *VirtualHubRouteTableV2) UnmarshalJSON(body []byte) error {
33187	var m map[string]*json.RawMessage
33188	err := json.Unmarshal(body, &m)
33189	if err != nil {
33190		return err
33191	}
33192	for k, v := range m {
33193		switch k {
33194		case "properties":
33195			if v != nil {
33196				var virtualHubRouteTableV2Properties VirtualHubRouteTableV2Properties
33197				err = json.Unmarshal(*v, &virtualHubRouteTableV2Properties)
33198				if err != nil {
33199					return err
33200				}
33201				vhrtv.VirtualHubRouteTableV2Properties = &virtualHubRouteTableV2Properties
33202			}
33203		case "name":
33204			if v != nil {
33205				var name string
33206				err = json.Unmarshal(*v, &name)
33207				if err != nil {
33208					return err
33209				}
33210				vhrtv.Name = &name
33211			}
33212		case "etag":
33213			if v != nil {
33214				var etag string
33215				err = json.Unmarshal(*v, &etag)
33216				if err != nil {
33217					return err
33218				}
33219				vhrtv.Etag = &etag
33220			}
33221		case "id":
33222			if v != nil {
33223				var ID string
33224				err = json.Unmarshal(*v, &ID)
33225				if err != nil {
33226					return err
33227				}
33228				vhrtv.ID = &ID
33229			}
33230		}
33231	}
33232
33233	return nil
33234}
33235
33236// VirtualHubRouteTableV2Properties parameters for VirtualHubRouteTableV2.
33237type VirtualHubRouteTableV2Properties struct {
33238	// Routes - List of all routes.
33239	Routes *[]VirtualHubRouteV2 `json:"routes,omitempty"`
33240	// AttachedConnections - List of all connections attached to this route table v2.
33241	AttachedConnections *[]string `json:"attachedConnections,omitempty"`
33242	// ProvisioningState - READ-ONLY; The provisioning state of the virtual hub route table v2 resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
33243	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
33244}
33245
33246// MarshalJSON is the custom marshaler for VirtualHubRouteTableV2Properties.
33247func (vhrtvp VirtualHubRouteTableV2Properties) MarshalJSON() ([]byte, error) {
33248	objectMap := make(map[string]interface{})
33249	if vhrtvp.Routes != nil {
33250		objectMap["routes"] = vhrtvp.Routes
33251	}
33252	if vhrtvp.AttachedConnections != nil {
33253		objectMap["attachedConnections"] = vhrtvp.AttachedConnections
33254	}
33255	return json.Marshal(objectMap)
33256}
33257
33258// VirtualHubRouteTableV2sCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
33259// a long-running operation.
33260type VirtualHubRouteTableV2sCreateOrUpdateFuture struct {
33261	azure.FutureAPI
33262	// Result returns the result of the asynchronous operation.
33263	// If the operation has not completed it will return an error.
33264	Result func(VirtualHubRouteTableV2sClient) (VirtualHubRouteTableV2, error)
33265}
33266
33267// VirtualHubRouteTableV2sDeleteFuture an abstraction for monitoring and retrieving the results of a
33268// long-running operation.
33269type VirtualHubRouteTableV2sDeleteFuture struct {
33270	azure.FutureAPI
33271	// Result returns the result of the asynchronous operation.
33272	// If the operation has not completed it will return an error.
33273	Result func(VirtualHubRouteTableV2sClient) (autorest.Response, error)
33274}
33275
33276// VirtualHubRouteV2 virtualHubRouteTableV2 route.
33277type VirtualHubRouteV2 struct {
33278	// DestinationType - The type of destinations.
33279	DestinationType *string `json:"destinationType,omitempty"`
33280	// Destinations - List of all destinations.
33281	Destinations *[]string `json:"destinations,omitempty"`
33282	// NextHopType - The type of next hops.
33283	NextHopType *string `json:"nextHopType,omitempty"`
33284	// NextHops - NextHops ip address.
33285	NextHops *[]string `json:"nextHops,omitempty"`
33286}
33287
33288// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
33289// long-running operation.
33290type VirtualHubsCreateOrUpdateFuture struct {
33291	azure.FutureAPI
33292	// Result returns the result of the asynchronous operation.
33293	// If the operation has not completed it will return an error.
33294	Result func(VirtualHubsClient) (VirtualHub, error)
33295}
33296
33297// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
33298// operation.
33299type VirtualHubsDeleteFuture struct {
33300	azure.FutureAPI
33301	// Result returns the result of the asynchronous operation.
33302	// If the operation has not completed it will return an error.
33303	Result func(VirtualHubsClient) (autorest.Response, error)
33304}
33305
33306// VirtualHubsGetEffectiveVirtualHubRoutesFuture an abstraction for monitoring and retrieving the results
33307// of a long-running operation.
33308type VirtualHubsGetEffectiveVirtualHubRoutesFuture struct {
33309	azure.FutureAPI
33310	// Result returns the result of the asynchronous operation.
33311	// If the operation has not completed it will return an error.
33312	Result func(VirtualHubsClient) (autorest.Response, error)
33313}
33314
33315// VirtualNetwork virtual Network resource.
33316type VirtualNetwork struct {
33317	autorest.Response `json:"-"`
33318	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
33319	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
33320	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
33321	Etag *string `json:"etag,omitempty"`
33322	// ID - Resource ID.
33323	ID *string `json:"id,omitempty"`
33324	// Name - READ-ONLY; Resource name.
33325	Name *string `json:"name,omitempty"`
33326	// Type - READ-ONLY; Resource type.
33327	Type *string `json:"type,omitempty"`
33328	// Location - Resource location.
33329	Location *string `json:"location,omitempty"`
33330	// Tags - Resource tags.
33331	Tags map[string]*string `json:"tags"`
33332}
33333
33334// MarshalJSON is the custom marshaler for VirtualNetwork.
33335func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
33336	objectMap := make(map[string]interface{})
33337	if vn.VirtualNetworkPropertiesFormat != nil {
33338		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
33339	}
33340	if vn.ID != nil {
33341		objectMap["id"] = vn.ID
33342	}
33343	if vn.Location != nil {
33344		objectMap["location"] = vn.Location
33345	}
33346	if vn.Tags != nil {
33347		objectMap["tags"] = vn.Tags
33348	}
33349	return json.Marshal(objectMap)
33350}
33351
33352// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
33353func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
33354	var m map[string]*json.RawMessage
33355	err := json.Unmarshal(body, &m)
33356	if err != nil {
33357		return err
33358	}
33359	for k, v := range m {
33360		switch k {
33361		case "properties":
33362			if v != nil {
33363				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
33364				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
33365				if err != nil {
33366					return err
33367				}
33368				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
33369			}
33370		case "etag":
33371			if v != nil {
33372				var etag string
33373				err = json.Unmarshal(*v, &etag)
33374				if err != nil {
33375					return err
33376				}
33377				vn.Etag = &etag
33378			}
33379		case "id":
33380			if v != nil {
33381				var ID string
33382				err = json.Unmarshal(*v, &ID)
33383				if err != nil {
33384					return err
33385				}
33386				vn.ID = &ID
33387			}
33388		case "name":
33389			if v != nil {
33390				var name string
33391				err = json.Unmarshal(*v, &name)
33392				if err != nil {
33393					return err
33394				}
33395				vn.Name = &name
33396			}
33397		case "type":
33398			if v != nil {
33399				var typeVar string
33400				err = json.Unmarshal(*v, &typeVar)
33401				if err != nil {
33402					return err
33403				}
33404				vn.Type = &typeVar
33405			}
33406		case "location":
33407			if v != nil {
33408				var location string
33409				err = json.Unmarshal(*v, &location)
33410				if err != nil {
33411					return err
33412				}
33413				vn.Location = &location
33414			}
33415		case "tags":
33416			if v != nil {
33417				var tags map[string]*string
33418				err = json.Unmarshal(*v, &tags)
33419				if err != nil {
33420					return err
33421				}
33422				vn.Tags = tags
33423			}
33424		}
33425	}
33426
33427	return nil
33428}
33429
33430// VirtualNetworkBgpCommunities bgp Communities sent over ExpressRoute with each route corresponding to a
33431// prefix in this VNET.
33432type VirtualNetworkBgpCommunities struct {
33433	// VirtualNetworkCommunity - The BGP community associated with the virtual network.
33434	VirtualNetworkCommunity *string `json:"virtualNetworkCommunity,omitempty"`
33435	// RegionalCommunity - READ-ONLY; The BGP community associated with the region of the virtual network.
33436	RegionalCommunity *string `json:"regionalCommunity,omitempty"`
33437}
33438
33439// MarshalJSON is the custom marshaler for VirtualNetworkBgpCommunities.
33440func (vnbc VirtualNetworkBgpCommunities) MarshalJSON() ([]byte, error) {
33441	objectMap := make(map[string]interface{})
33442	if vnbc.VirtualNetworkCommunity != nil {
33443		objectMap["virtualNetworkCommunity"] = vnbc.VirtualNetworkCommunity
33444	}
33445	return json.Marshal(objectMap)
33446}
33447
33448// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
33449// resource.
33450type VirtualNetworkConnectionGatewayReference struct {
33451	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
33452	ID *string `json:"id,omitempty"`
33453}
33454
33455// VirtualNetworkGateway a common class for general resource information.
33456type VirtualNetworkGateway struct {
33457	autorest.Response `json:"-"`
33458	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
33459	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
33460	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
33461	Etag *string `json:"etag,omitempty"`
33462	// ID - Resource ID.
33463	ID *string `json:"id,omitempty"`
33464	// Name - READ-ONLY; Resource name.
33465	Name *string `json:"name,omitempty"`
33466	// Type - READ-ONLY; Resource type.
33467	Type *string `json:"type,omitempty"`
33468	// Location - Resource location.
33469	Location *string `json:"location,omitempty"`
33470	// Tags - Resource tags.
33471	Tags map[string]*string `json:"tags"`
33472}
33473
33474// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
33475func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
33476	objectMap := make(map[string]interface{})
33477	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
33478		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
33479	}
33480	if vng.ID != nil {
33481		objectMap["id"] = vng.ID
33482	}
33483	if vng.Location != nil {
33484		objectMap["location"] = vng.Location
33485	}
33486	if vng.Tags != nil {
33487		objectMap["tags"] = vng.Tags
33488	}
33489	return json.Marshal(objectMap)
33490}
33491
33492// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
33493func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
33494	var m map[string]*json.RawMessage
33495	err := json.Unmarshal(body, &m)
33496	if err != nil {
33497		return err
33498	}
33499	for k, v := range m {
33500		switch k {
33501		case "properties":
33502			if v != nil {
33503				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
33504				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
33505				if err != nil {
33506					return err
33507				}
33508				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
33509			}
33510		case "etag":
33511			if v != nil {
33512				var etag string
33513				err = json.Unmarshal(*v, &etag)
33514				if err != nil {
33515					return err
33516				}
33517				vng.Etag = &etag
33518			}
33519		case "id":
33520			if v != nil {
33521				var ID string
33522				err = json.Unmarshal(*v, &ID)
33523				if err != nil {
33524					return err
33525				}
33526				vng.ID = &ID
33527			}
33528		case "name":
33529			if v != nil {
33530				var name string
33531				err = json.Unmarshal(*v, &name)
33532				if err != nil {
33533					return err
33534				}
33535				vng.Name = &name
33536			}
33537		case "type":
33538			if v != nil {
33539				var typeVar string
33540				err = json.Unmarshal(*v, &typeVar)
33541				if err != nil {
33542					return err
33543				}
33544				vng.Type = &typeVar
33545			}
33546		case "location":
33547			if v != nil {
33548				var location string
33549				err = json.Unmarshal(*v, &location)
33550				if err != nil {
33551					return err
33552				}
33553				vng.Location = &location
33554			}
33555		case "tags":
33556			if v != nil {
33557				var tags map[string]*string
33558				err = json.Unmarshal(*v, &tags)
33559				if err != nil {
33560					return err
33561				}
33562				vng.Tags = tags
33563			}
33564		}
33565	}
33566
33567	return nil
33568}
33569
33570// VirtualNetworkGatewayConnection a common class for general resource information.
33571type VirtualNetworkGatewayConnection struct {
33572	autorest.Response `json:"-"`
33573	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
33574	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
33575	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
33576	Etag *string `json:"etag,omitempty"`
33577	// ID - Resource ID.
33578	ID *string `json:"id,omitempty"`
33579	// Name - READ-ONLY; Resource name.
33580	Name *string `json:"name,omitempty"`
33581	// Type - READ-ONLY; Resource type.
33582	Type *string `json:"type,omitempty"`
33583	// Location - Resource location.
33584	Location *string `json:"location,omitempty"`
33585	// Tags - Resource tags.
33586	Tags map[string]*string `json:"tags"`
33587}
33588
33589// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
33590func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
33591	objectMap := make(map[string]interface{})
33592	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
33593		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
33594	}
33595	if vngc.ID != nil {
33596		objectMap["id"] = vngc.ID
33597	}
33598	if vngc.Location != nil {
33599		objectMap["location"] = vngc.Location
33600	}
33601	if vngc.Tags != nil {
33602		objectMap["tags"] = vngc.Tags
33603	}
33604	return json.Marshal(objectMap)
33605}
33606
33607// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
33608func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
33609	var m map[string]*json.RawMessage
33610	err := json.Unmarshal(body, &m)
33611	if err != nil {
33612		return err
33613	}
33614	for k, v := range m {
33615		switch k {
33616		case "properties":
33617			if v != nil {
33618				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
33619				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
33620				if err != nil {
33621					return err
33622				}
33623				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
33624			}
33625		case "etag":
33626			if v != nil {
33627				var etag string
33628				err = json.Unmarshal(*v, &etag)
33629				if err != nil {
33630					return err
33631				}
33632				vngc.Etag = &etag
33633			}
33634		case "id":
33635			if v != nil {
33636				var ID string
33637				err = json.Unmarshal(*v, &ID)
33638				if err != nil {
33639					return err
33640				}
33641				vngc.ID = &ID
33642			}
33643		case "name":
33644			if v != nil {
33645				var name string
33646				err = json.Unmarshal(*v, &name)
33647				if err != nil {
33648					return err
33649				}
33650				vngc.Name = &name
33651			}
33652		case "type":
33653			if v != nil {
33654				var typeVar string
33655				err = json.Unmarshal(*v, &typeVar)
33656				if err != nil {
33657					return err
33658				}
33659				vngc.Type = &typeVar
33660			}
33661		case "location":
33662			if v != nil {
33663				var location string
33664				err = json.Unmarshal(*v, &location)
33665				if err != nil {
33666					return err
33667				}
33668				vngc.Location = &location
33669			}
33670		case "tags":
33671			if v != nil {
33672				var tags map[string]*string
33673				err = json.Unmarshal(*v, &tags)
33674				if err != nil {
33675					return err
33676				}
33677				vngc.Tags = tags
33678			}
33679		}
33680	}
33681
33682	return nil
33683}
33684
33685// VirtualNetworkGatewayConnectionListEntity a common class for general resource information.
33686type VirtualNetworkGatewayConnectionListEntity struct {
33687	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
33688	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
33689	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
33690	Etag *string `json:"etag,omitempty"`
33691	// ID - Resource ID.
33692	ID *string `json:"id,omitempty"`
33693	// Name - READ-ONLY; Resource name.
33694	Name *string `json:"name,omitempty"`
33695	// Type - READ-ONLY; Resource type.
33696	Type *string `json:"type,omitempty"`
33697	// Location - Resource location.
33698	Location *string `json:"location,omitempty"`
33699	// Tags - Resource tags.
33700	Tags map[string]*string `json:"tags"`
33701}
33702
33703// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
33704func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
33705	objectMap := make(map[string]interface{})
33706	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
33707		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
33708	}
33709	if vngcle.ID != nil {
33710		objectMap["id"] = vngcle.ID
33711	}
33712	if vngcle.Location != nil {
33713		objectMap["location"] = vngcle.Location
33714	}
33715	if vngcle.Tags != nil {
33716		objectMap["tags"] = vngcle.Tags
33717	}
33718	return json.Marshal(objectMap)
33719}
33720
33721// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
33722func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
33723	var m map[string]*json.RawMessage
33724	err := json.Unmarshal(body, &m)
33725	if err != nil {
33726		return err
33727	}
33728	for k, v := range m {
33729		switch k {
33730		case "properties":
33731			if v != nil {
33732				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
33733				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
33734				if err != nil {
33735					return err
33736				}
33737				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
33738			}
33739		case "etag":
33740			if v != nil {
33741				var etag string
33742				err = json.Unmarshal(*v, &etag)
33743				if err != nil {
33744					return err
33745				}
33746				vngcle.Etag = &etag
33747			}
33748		case "id":
33749			if v != nil {
33750				var ID string
33751				err = json.Unmarshal(*v, &ID)
33752				if err != nil {
33753					return err
33754				}
33755				vngcle.ID = &ID
33756			}
33757		case "name":
33758			if v != nil {
33759				var name string
33760				err = json.Unmarshal(*v, &name)
33761				if err != nil {
33762					return err
33763				}
33764				vngcle.Name = &name
33765			}
33766		case "type":
33767			if v != nil {
33768				var typeVar string
33769				err = json.Unmarshal(*v, &typeVar)
33770				if err != nil {
33771					return err
33772				}
33773				vngcle.Type = &typeVar
33774			}
33775		case "location":
33776			if v != nil {
33777				var location string
33778				err = json.Unmarshal(*v, &location)
33779				if err != nil {
33780					return err
33781				}
33782				vngcle.Location = &location
33783			}
33784		case "tags":
33785			if v != nil {
33786				var tags map[string]*string
33787				err = json.Unmarshal(*v, &tags)
33788				if err != nil {
33789					return err
33790				}
33791				vngcle.Tags = tags
33792			}
33793		}
33794	}
33795
33796	return nil
33797}
33798
33799// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties.
33800type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
33801	// AuthorizationKey - The authorizationKey.
33802	AuthorizationKey *string `json:"authorizationKey,omitempty"`
33803	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
33804	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
33805	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
33806	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
33807	// LocalNetworkGateway2 - The reference to local network gateway resource.
33808	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
33809	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
33810	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
33811	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
33812	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
33813	// RoutingWeight - The routing weight.
33814	RoutingWeight *int32 `json:"routingWeight,omitempty"`
33815	// SharedKey - The IPSec shared key.
33816	SharedKey *string `json:"sharedKey,omitempty"`
33817	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
33818	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
33819	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
33820	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
33821	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
33822	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
33823	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
33824	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
33825	// Peer - The reference to peerings resource.
33826	Peer *SubResource `json:"peer,omitempty"`
33827	// EnableBgp - EnableBgp flag.
33828	EnableBgp *bool `json:"enableBgp,omitempty"`
33829	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
33830	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
33831	// IpsecPolicies - The IPSec Policies to be considered by this connection.
33832	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
33833	// TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection.
33834	TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"`
33835	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway connection resource.
33836	ResourceGUID *string `json:"resourceGuid,omitempty"`
33837	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
33838	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
33839	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
33840	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
33841}
33842
33843// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
33844func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
33845	objectMap := make(map[string]interface{})
33846	if vngclepf.AuthorizationKey != nil {
33847		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
33848	}
33849	if vngclepf.VirtualNetworkGateway1 != nil {
33850		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
33851	}
33852	if vngclepf.VirtualNetworkGateway2 != nil {
33853		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
33854	}
33855	if vngclepf.LocalNetworkGateway2 != nil {
33856		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
33857	}
33858	if vngclepf.ConnectionType != "" {
33859		objectMap["connectionType"] = vngclepf.ConnectionType
33860	}
33861	if vngclepf.ConnectionProtocol != "" {
33862		objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol
33863	}
33864	if vngclepf.RoutingWeight != nil {
33865		objectMap["routingWeight"] = vngclepf.RoutingWeight
33866	}
33867	if vngclepf.SharedKey != nil {
33868		objectMap["sharedKey"] = vngclepf.SharedKey
33869	}
33870	if vngclepf.Peer != nil {
33871		objectMap["peer"] = vngclepf.Peer
33872	}
33873	if vngclepf.EnableBgp != nil {
33874		objectMap["enableBgp"] = vngclepf.EnableBgp
33875	}
33876	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
33877		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
33878	}
33879	if vngclepf.IpsecPolicies != nil {
33880		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
33881	}
33882	if vngclepf.TrafficSelectorPolicies != nil {
33883		objectMap["trafficSelectorPolicies"] = vngclepf.TrafficSelectorPolicies
33884	}
33885	if vngclepf.ExpressRouteGatewayBypass != nil {
33886		objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass
33887	}
33888	return json.Marshal(objectMap)
33889}
33890
33891// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
33892// service call.
33893type VirtualNetworkGatewayConnectionListResult struct {
33894	autorest.Response `json:"-"`
33895	// Value - A list of VirtualNetworkGatewayConnection resources that exists in a resource group.
33896	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
33897	// NextLink - READ-ONLY; The URL to get the next set of results.
33898	NextLink *string `json:"nextLink,omitempty"`
33899}
33900
33901// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
33902func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
33903	objectMap := make(map[string]interface{})
33904	if vngclr.Value != nil {
33905		objectMap["value"] = vngclr.Value
33906	}
33907	return json.Marshal(objectMap)
33908}
33909
33910// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
33911// VirtualNetworkGatewayConnection values.
33912type VirtualNetworkGatewayConnectionListResultIterator struct {
33913	i    int
33914	page VirtualNetworkGatewayConnectionListResultPage
33915}
33916
33917// NextWithContext advances to the next value.  If there was an error making
33918// the request the iterator does not advance and the error is returned.
33919func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
33920	if tracing.IsEnabled() {
33921		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
33922		defer func() {
33923			sc := -1
33924			if iter.Response().Response.Response != nil {
33925				sc = iter.Response().Response.Response.StatusCode
33926			}
33927			tracing.EndSpan(ctx, sc, err)
33928		}()
33929	}
33930	iter.i++
33931	if iter.i < len(iter.page.Values()) {
33932		return nil
33933	}
33934	err = iter.page.NextWithContext(ctx)
33935	if err != nil {
33936		iter.i--
33937		return err
33938	}
33939	iter.i = 0
33940	return nil
33941}
33942
33943// Next advances to the next value.  If there was an error making
33944// the request the iterator does not advance and the error is returned.
33945// Deprecated: Use NextWithContext() instead.
33946func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
33947	return iter.NextWithContext(context.Background())
33948}
33949
33950// NotDone returns true if the enumeration should be started or is not yet complete.
33951func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
33952	return iter.page.NotDone() && iter.i < len(iter.page.Values())
33953}
33954
33955// Response returns the raw server response from the last page request.
33956func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
33957	return iter.page.Response()
33958}
33959
33960// Value returns the current value or a zero-initialized value if the
33961// iterator has advanced beyond the end of the collection.
33962func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
33963	if !iter.page.NotDone() {
33964		return VirtualNetworkGatewayConnection{}
33965	}
33966	return iter.page.Values()[iter.i]
33967}
33968
33969// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
33970func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
33971	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
33972}
33973
33974// IsEmpty returns true if the ListResult contains no values.
33975func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
33976	return vngclr.Value == nil || len(*vngclr.Value) == 0
33977}
33978
33979// hasNextLink returns true if the NextLink is not empty.
33980func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
33981	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
33982}
33983
33984// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
33985// It returns nil if no more results exist.
33986func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
33987	if !vngclr.hasNextLink() {
33988		return nil, nil
33989	}
33990	return autorest.Prepare((&http.Request{}).WithContext(ctx),
33991		autorest.AsJSON(),
33992		autorest.AsGet(),
33993		autorest.WithBaseURL(to.String(vngclr.NextLink)))
33994}
33995
33996// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
33997type VirtualNetworkGatewayConnectionListResultPage struct {
33998	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
33999	vngclr VirtualNetworkGatewayConnectionListResult
34000}
34001
34002// NextWithContext advances to the next page of values.  If there was an error making
34003// the request the page does not advance and the error is returned.
34004func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
34005	if tracing.IsEnabled() {
34006		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
34007		defer func() {
34008			sc := -1
34009			if page.Response().Response.Response != nil {
34010				sc = page.Response().Response.Response.StatusCode
34011			}
34012			tracing.EndSpan(ctx, sc, err)
34013		}()
34014	}
34015	for {
34016		next, err := page.fn(ctx, page.vngclr)
34017		if err != nil {
34018			return err
34019		}
34020		page.vngclr = next
34021		if !next.hasNextLink() || !next.IsEmpty() {
34022			break
34023		}
34024	}
34025	return nil
34026}
34027
34028// Next advances to the next page of values.  If there was an error making
34029// the request the page does not advance and the error is returned.
34030// Deprecated: Use NextWithContext() instead.
34031func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
34032	return page.NextWithContext(context.Background())
34033}
34034
34035// NotDone returns true if the page enumeration should be started or is not yet complete.
34036func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
34037	return !page.vngclr.IsEmpty()
34038}
34039
34040// Response returns the raw server response from the last page request.
34041func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
34042	return page.vngclr
34043}
34044
34045// Values returns the slice of values for the current page or nil if there are no values.
34046func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
34047	if page.vngclr.IsEmpty() {
34048		return nil
34049	}
34050	return *page.vngclr.Value
34051}
34052
34053// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
34054func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
34055	return VirtualNetworkGatewayConnectionListResultPage{
34056		fn:     getNextPage,
34057		vngclr: cur,
34058	}
34059}
34060
34061// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties.
34062type VirtualNetworkGatewayConnectionPropertiesFormat struct {
34063	// AuthorizationKey - The authorizationKey.
34064	AuthorizationKey *string `json:"authorizationKey,omitempty"`
34065	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
34066	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
34067	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
34068	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
34069	// LocalNetworkGateway2 - The reference to local network gateway resource.
34070	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
34071	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
34072	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
34073	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
34074	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
34075	// RoutingWeight - The routing weight.
34076	RoutingWeight *int32 `json:"routingWeight,omitempty"`
34077	// DpdTimeoutSeconds - The dead peer detection timeout of this connection in seconds.
34078	DpdTimeoutSeconds *int32 `json:"dpdTimeoutSeconds,omitempty"`
34079	// SharedKey - The IPSec shared key.
34080	SharedKey *string `json:"sharedKey,omitempty"`
34081	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
34082	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
34083	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
34084	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
34085	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
34086	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
34087	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
34088	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
34089	// Peer - The reference to peerings resource.
34090	Peer *SubResource `json:"peer,omitempty"`
34091	// EnableBgp - EnableBgp flag.
34092	EnableBgp *bool `json:"enableBgp,omitempty"`
34093	// UseLocalAzureIPAddress - Use private local Azure IP for the connection.
34094	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
34095	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
34096	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
34097	// IpsecPolicies - The IPSec Policies to be considered by this connection.
34098	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
34099	// TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection.
34100	TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"`
34101	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway connection resource.
34102	ResourceGUID *string `json:"resourceGuid,omitempty"`
34103	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
34104	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34105	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
34106	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
34107}
34108
34109// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
34110func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
34111	objectMap := make(map[string]interface{})
34112	if vngcpf.AuthorizationKey != nil {
34113		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
34114	}
34115	if vngcpf.VirtualNetworkGateway1 != nil {
34116		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
34117	}
34118	if vngcpf.VirtualNetworkGateway2 != nil {
34119		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
34120	}
34121	if vngcpf.LocalNetworkGateway2 != nil {
34122		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
34123	}
34124	if vngcpf.ConnectionType != "" {
34125		objectMap["connectionType"] = vngcpf.ConnectionType
34126	}
34127	if vngcpf.ConnectionProtocol != "" {
34128		objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol
34129	}
34130	if vngcpf.RoutingWeight != nil {
34131		objectMap["routingWeight"] = vngcpf.RoutingWeight
34132	}
34133	if vngcpf.DpdTimeoutSeconds != nil {
34134		objectMap["dpdTimeoutSeconds"] = vngcpf.DpdTimeoutSeconds
34135	}
34136	if vngcpf.SharedKey != nil {
34137		objectMap["sharedKey"] = vngcpf.SharedKey
34138	}
34139	if vngcpf.Peer != nil {
34140		objectMap["peer"] = vngcpf.Peer
34141	}
34142	if vngcpf.EnableBgp != nil {
34143		objectMap["enableBgp"] = vngcpf.EnableBgp
34144	}
34145	if vngcpf.UseLocalAzureIPAddress != nil {
34146		objectMap["useLocalAzureIpAddress"] = vngcpf.UseLocalAzureIPAddress
34147	}
34148	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
34149		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
34150	}
34151	if vngcpf.IpsecPolicies != nil {
34152		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
34153	}
34154	if vngcpf.TrafficSelectorPolicies != nil {
34155		objectMap["trafficSelectorPolicies"] = vngcpf.TrafficSelectorPolicies
34156	}
34157	if vngcpf.ExpressRouteGatewayBypass != nil {
34158		objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass
34159	}
34160	return json.Marshal(objectMap)
34161}
34162
34163// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
34164// results of a long-running operation.
34165type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
34166	azure.FutureAPI
34167	// Result returns the result of the asynchronous operation.
34168	// If the operation has not completed it will return an error.
34169	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
34170}
34171
34172// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
34173// a long-running operation.
34174type VirtualNetworkGatewayConnectionsDeleteFuture struct {
34175	azure.FutureAPI
34176	// Result returns the result of the asynchronous operation.
34177	// If the operation has not completed it will return an error.
34178	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
34179}
34180
34181// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
34182// results of a long-running operation.
34183type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
34184	azure.FutureAPI
34185	// Result returns the result of the asynchronous operation.
34186	// If the operation has not completed it will return an error.
34187	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
34188}
34189
34190// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
34191// results of a long-running operation.
34192type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
34193	azure.FutureAPI
34194	// Result returns the result of the asynchronous operation.
34195	// If the operation has not completed it will return an error.
34196	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
34197}
34198
34199// VirtualNetworkGatewayConnectionsStartPacketCaptureFuture an abstraction for monitoring and retrieving
34200// the results of a long-running operation.
34201type VirtualNetworkGatewayConnectionsStartPacketCaptureFuture struct {
34202	azure.FutureAPI
34203	// Result returns the result of the asynchronous operation.
34204	// If the operation has not completed it will return an error.
34205	Result func(VirtualNetworkGatewayConnectionsClient) (String, error)
34206}
34207
34208// VirtualNetworkGatewayConnectionsStopPacketCaptureFuture an abstraction for monitoring and retrieving the
34209// results of a long-running operation.
34210type VirtualNetworkGatewayConnectionsStopPacketCaptureFuture struct {
34211	azure.FutureAPI
34212	// Result returns the result of the asynchronous operation.
34213	// If the operation has not completed it will return an error.
34214	Result func(VirtualNetworkGatewayConnectionsClient) (String, error)
34215}
34216
34217// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
34218// results of a long-running operation.
34219type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
34220	azure.FutureAPI
34221	// Result returns the result of the asynchronous operation.
34222	// If the operation has not completed it will return an error.
34223	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
34224}
34225
34226// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway.
34227type VirtualNetworkGatewayIPConfiguration struct {
34228	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
34229	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
34230	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
34231	Name *string `json:"name,omitempty"`
34232	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
34233	Etag *string `json:"etag,omitempty"`
34234	// ID - Resource ID.
34235	ID *string `json:"id,omitempty"`
34236}
34237
34238// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
34239func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
34240	objectMap := make(map[string]interface{})
34241	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
34242		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
34243	}
34244	if vngic.Name != nil {
34245		objectMap["name"] = vngic.Name
34246	}
34247	if vngic.ID != nil {
34248		objectMap["id"] = vngic.ID
34249	}
34250	return json.Marshal(objectMap)
34251}
34252
34253// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
34254func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
34255	var m map[string]*json.RawMessage
34256	err := json.Unmarshal(body, &m)
34257	if err != nil {
34258		return err
34259	}
34260	for k, v := range m {
34261		switch k {
34262		case "properties":
34263			if v != nil {
34264				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
34265				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
34266				if err != nil {
34267					return err
34268				}
34269				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
34270			}
34271		case "name":
34272			if v != nil {
34273				var name string
34274				err = json.Unmarshal(*v, &name)
34275				if err != nil {
34276					return err
34277				}
34278				vngic.Name = &name
34279			}
34280		case "etag":
34281			if v != nil {
34282				var etag string
34283				err = json.Unmarshal(*v, &etag)
34284				if err != nil {
34285					return err
34286				}
34287				vngic.Etag = &etag
34288			}
34289		case "id":
34290			if v != nil {
34291				var ID string
34292				err = json.Unmarshal(*v, &ID)
34293				if err != nil {
34294					return err
34295				}
34296				vngic.ID = &ID
34297			}
34298		}
34299	}
34300
34301	return nil
34302}
34303
34304// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration.
34305type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
34306	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
34307	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
34308	// Subnet - The reference to the subnet resource.
34309	Subnet *SubResource `json:"subnet,omitempty"`
34310	// PublicIPAddress - The reference to the public IP resource.
34311	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
34312	// PrivateIPAddress - READ-ONLY; Private IP Address for this gateway.
34313	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
34314	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
34315	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34316}
34317
34318// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
34319func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
34320	objectMap := make(map[string]interface{})
34321	if vngicpf.PrivateIPAllocationMethod != "" {
34322		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
34323	}
34324	if vngicpf.Subnet != nil {
34325		objectMap["subnet"] = vngicpf.Subnet
34326	}
34327	if vngicpf.PublicIPAddress != nil {
34328		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
34329	}
34330	return json.Marshal(objectMap)
34331}
34332
34333// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
34334// service call.
34335type VirtualNetworkGatewayListConnectionsResult struct {
34336	autorest.Response `json:"-"`
34337	// Value - A list of VirtualNetworkGatewayConnection resources that exists in a resource group.
34338	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
34339	// NextLink - READ-ONLY; The URL to get the next set of results.
34340	NextLink *string `json:"nextLink,omitempty"`
34341}
34342
34343// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
34344func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
34345	objectMap := make(map[string]interface{})
34346	if vnglcr.Value != nil {
34347		objectMap["value"] = vnglcr.Value
34348	}
34349	return json.Marshal(objectMap)
34350}
34351
34352// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
34353// VirtualNetworkGatewayConnectionListEntity values.
34354type VirtualNetworkGatewayListConnectionsResultIterator struct {
34355	i    int
34356	page VirtualNetworkGatewayListConnectionsResultPage
34357}
34358
34359// NextWithContext advances to the next value.  If there was an error making
34360// the request the iterator does not advance and the error is returned.
34361func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
34362	if tracing.IsEnabled() {
34363		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
34364		defer func() {
34365			sc := -1
34366			if iter.Response().Response.Response != nil {
34367				sc = iter.Response().Response.Response.StatusCode
34368			}
34369			tracing.EndSpan(ctx, sc, err)
34370		}()
34371	}
34372	iter.i++
34373	if iter.i < len(iter.page.Values()) {
34374		return nil
34375	}
34376	err = iter.page.NextWithContext(ctx)
34377	if err != nil {
34378		iter.i--
34379		return err
34380	}
34381	iter.i = 0
34382	return nil
34383}
34384
34385// Next advances to the next value.  If there was an error making
34386// the request the iterator does not advance and the error is returned.
34387// Deprecated: Use NextWithContext() instead.
34388func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
34389	return iter.NextWithContext(context.Background())
34390}
34391
34392// NotDone returns true if the enumeration should be started or is not yet complete.
34393func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
34394	return iter.page.NotDone() && iter.i < len(iter.page.Values())
34395}
34396
34397// Response returns the raw server response from the last page request.
34398func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
34399	return iter.page.Response()
34400}
34401
34402// Value returns the current value or a zero-initialized value if the
34403// iterator has advanced beyond the end of the collection.
34404func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
34405	if !iter.page.NotDone() {
34406		return VirtualNetworkGatewayConnectionListEntity{}
34407	}
34408	return iter.page.Values()[iter.i]
34409}
34410
34411// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
34412func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
34413	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
34414}
34415
34416// IsEmpty returns true if the ListResult contains no values.
34417func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
34418	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
34419}
34420
34421// hasNextLink returns true if the NextLink is not empty.
34422func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
34423	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
34424}
34425
34426// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
34427// It returns nil if no more results exist.
34428func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
34429	if !vnglcr.hasNextLink() {
34430		return nil, nil
34431	}
34432	return autorest.Prepare((&http.Request{}).WithContext(ctx),
34433		autorest.AsJSON(),
34434		autorest.AsGet(),
34435		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
34436}
34437
34438// VirtualNetworkGatewayListConnectionsResultPage contains a page of
34439// VirtualNetworkGatewayConnectionListEntity values.
34440type VirtualNetworkGatewayListConnectionsResultPage struct {
34441	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
34442	vnglcr VirtualNetworkGatewayListConnectionsResult
34443}
34444
34445// NextWithContext advances to the next page of values.  If there was an error making
34446// the request the page does not advance and the error is returned.
34447func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
34448	if tracing.IsEnabled() {
34449		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
34450		defer func() {
34451			sc := -1
34452			if page.Response().Response.Response != nil {
34453				sc = page.Response().Response.Response.StatusCode
34454			}
34455			tracing.EndSpan(ctx, sc, err)
34456		}()
34457	}
34458	for {
34459		next, err := page.fn(ctx, page.vnglcr)
34460		if err != nil {
34461			return err
34462		}
34463		page.vnglcr = next
34464		if !next.hasNextLink() || !next.IsEmpty() {
34465			break
34466		}
34467	}
34468	return nil
34469}
34470
34471// Next advances to the next page of values.  If there was an error making
34472// the request the page does not advance and the error is returned.
34473// Deprecated: Use NextWithContext() instead.
34474func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
34475	return page.NextWithContext(context.Background())
34476}
34477
34478// NotDone returns true if the page enumeration should be started or is not yet complete.
34479func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
34480	return !page.vnglcr.IsEmpty()
34481}
34482
34483// Response returns the raw server response from the last page request.
34484func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
34485	return page.vnglcr
34486}
34487
34488// Values returns the slice of values for the current page or nil if there are no values.
34489func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
34490	if page.vnglcr.IsEmpty() {
34491		return nil
34492	}
34493	return *page.vnglcr.Value
34494}
34495
34496// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
34497func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
34498	return VirtualNetworkGatewayListConnectionsResultPage{
34499		fn:     getNextPage,
34500		vnglcr: cur,
34501	}
34502}
34503
34504// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
34505type VirtualNetworkGatewayListResult struct {
34506	autorest.Response `json:"-"`
34507	// Value - A list of VirtualNetworkGateway resources that exists in a resource group.
34508	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
34509	// NextLink - READ-ONLY; The URL to get the next set of results.
34510	NextLink *string `json:"nextLink,omitempty"`
34511}
34512
34513// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
34514func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
34515	objectMap := make(map[string]interface{})
34516	if vnglr.Value != nil {
34517		objectMap["value"] = vnglr.Value
34518	}
34519	return json.Marshal(objectMap)
34520}
34521
34522// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
34523// values.
34524type VirtualNetworkGatewayListResultIterator struct {
34525	i    int
34526	page VirtualNetworkGatewayListResultPage
34527}
34528
34529// NextWithContext advances to the next value.  If there was an error making
34530// the request the iterator does not advance and the error is returned.
34531func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
34532	if tracing.IsEnabled() {
34533		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
34534		defer func() {
34535			sc := -1
34536			if iter.Response().Response.Response != nil {
34537				sc = iter.Response().Response.Response.StatusCode
34538			}
34539			tracing.EndSpan(ctx, sc, err)
34540		}()
34541	}
34542	iter.i++
34543	if iter.i < len(iter.page.Values()) {
34544		return nil
34545	}
34546	err = iter.page.NextWithContext(ctx)
34547	if err != nil {
34548		iter.i--
34549		return err
34550	}
34551	iter.i = 0
34552	return nil
34553}
34554
34555// Next advances to the next value.  If there was an error making
34556// the request the iterator does not advance and the error is returned.
34557// Deprecated: Use NextWithContext() instead.
34558func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
34559	return iter.NextWithContext(context.Background())
34560}
34561
34562// NotDone returns true if the enumeration should be started or is not yet complete.
34563func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
34564	return iter.page.NotDone() && iter.i < len(iter.page.Values())
34565}
34566
34567// Response returns the raw server response from the last page request.
34568func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
34569	return iter.page.Response()
34570}
34571
34572// Value returns the current value or a zero-initialized value if the
34573// iterator has advanced beyond the end of the collection.
34574func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
34575	if !iter.page.NotDone() {
34576		return VirtualNetworkGateway{}
34577	}
34578	return iter.page.Values()[iter.i]
34579}
34580
34581// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
34582func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
34583	return VirtualNetworkGatewayListResultIterator{page: page}
34584}
34585
34586// IsEmpty returns true if the ListResult contains no values.
34587func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
34588	return vnglr.Value == nil || len(*vnglr.Value) == 0
34589}
34590
34591// hasNextLink returns true if the NextLink is not empty.
34592func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
34593	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
34594}
34595
34596// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
34597// It returns nil if no more results exist.
34598func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
34599	if !vnglr.hasNextLink() {
34600		return nil, nil
34601	}
34602	return autorest.Prepare((&http.Request{}).WithContext(ctx),
34603		autorest.AsJSON(),
34604		autorest.AsGet(),
34605		autorest.WithBaseURL(to.String(vnglr.NextLink)))
34606}
34607
34608// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
34609type VirtualNetworkGatewayListResultPage struct {
34610	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
34611	vnglr VirtualNetworkGatewayListResult
34612}
34613
34614// NextWithContext advances to the next page of values.  If there was an error making
34615// the request the page does not advance and the error is returned.
34616func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
34617	if tracing.IsEnabled() {
34618		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
34619		defer func() {
34620			sc := -1
34621			if page.Response().Response.Response != nil {
34622				sc = page.Response().Response.Response.StatusCode
34623			}
34624			tracing.EndSpan(ctx, sc, err)
34625		}()
34626	}
34627	for {
34628		next, err := page.fn(ctx, page.vnglr)
34629		if err != nil {
34630			return err
34631		}
34632		page.vnglr = next
34633		if !next.hasNextLink() || !next.IsEmpty() {
34634			break
34635		}
34636	}
34637	return nil
34638}
34639
34640// Next advances to the next page of values.  If there was an error making
34641// the request the page does not advance and the error is returned.
34642// Deprecated: Use NextWithContext() instead.
34643func (page *VirtualNetworkGatewayListResultPage) Next() error {
34644	return page.NextWithContext(context.Background())
34645}
34646
34647// NotDone returns true if the page enumeration should be started or is not yet complete.
34648func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
34649	return !page.vnglr.IsEmpty()
34650}
34651
34652// Response returns the raw server response from the last page request.
34653func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
34654	return page.vnglr
34655}
34656
34657// Values returns the slice of values for the current page or nil if there are no values.
34658func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
34659	if page.vnglr.IsEmpty() {
34660		return nil
34661	}
34662	return *page.vnglr.Value
34663}
34664
34665// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
34666func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
34667	return VirtualNetworkGatewayListResultPage{
34668		fn:    getNextPage,
34669		vnglr: cur,
34670	}
34671}
34672
34673// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties.
34674type VirtualNetworkGatewayPropertiesFormat struct {
34675	// IPConfigurations - IP configurations for virtual network gateway.
34676	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
34677	// GatewayType - The type of this virtual network gateway. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
34678	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
34679	// VpnType - The type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased'
34680	VpnType VpnType `json:"vpnType,omitempty"`
34681	// VpnGatewayGeneration - The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. Possible values include: 'VpnGatewayGenerationNone', 'VpnGatewayGenerationGeneration1', 'VpnGatewayGenerationGeneration2'
34682	VpnGatewayGeneration VpnGatewayGeneration `json:"vpnGatewayGeneration,omitempty"`
34683	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
34684	EnableBgp *bool `json:"enableBgp,omitempty"`
34685	// EnablePrivateIPAddress - Whether private IP needs to be enabled on this gateway for connections or not.
34686	EnablePrivateIPAddress *bool `json:"enablePrivateIpAddress,omitempty"`
34687	// ActiveActive - ActiveActive flag.
34688	ActiveActive *bool `json:"activeActive,omitempty"`
34689	// 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.
34690	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
34691	// Sku - The reference to the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
34692	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
34693	// VpnClientConfiguration - The reference to the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
34694	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
34695	// BgpSettings - Virtual network gateway's BGP speaker settings.
34696	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
34697	// 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.
34698	CustomRoutes *AddressSpace `json:"customRoutes,omitempty"`
34699	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway resource.
34700	ResourceGUID *string `json:"resourceGuid,omitempty"`
34701	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
34702	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34703	// EnableDNSForwarding - Whether dns forwarding is enabled or not.
34704	EnableDNSForwarding *bool `json:"enableDnsForwarding,omitempty"`
34705	// InboundDNSForwardingEndpoint - READ-ONLY; The IP address allocated by the gateway to which dns requests can be sent.
34706	InboundDNSForwardingEndpoint *string `json:"inboundDnsForwardingEndpoint,omitempty"`
34707}
34708
34709// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
34710func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
34711	objectMap := make(map[string]interface{})
34712	if vngpf.IPConfigurations != nil {
34713		objectMap["ipConfigurations"] = vngpf.IPConfigurations
34714	}
34715	if vngpf.GatewayType != "" {
34716		objectMap["gatewayType"] = vngpf.GatewayType
34717	}
34718	if vngpf.VpnType != "" {
34719		objectMap["vpnType"] = vngpf.VpnType
34720	}
34721	if vngpf.VpnGatewayGeneration != "" {
34722		objectMap["vpnGatewayGeneration"] = vngpf.VpnGatewayGeneration
34723	}
34724	if vngpf.EnableBgp != nil {
34725		objectMap["enableBgp"] = vngpf.EnableBgp
34726	}
34727	if vngpf.EnablePrivateIPAddress != nil {
34728		objectMap["enablePrivateIpAddress"] = vngpf.EnablePrivateIPAddress
34729	}
34730	if vngpf.ActiveActive != nil {
34731		objectMap["activeActive"] = vngpf.ActiveActive
34732	}
34733	if vngpf.GatewayDefaultSite != nil {
34734		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
34735	}
34736	if vngpf.Sku != nil {
34737		objectMap["sku"] = vngpf.Sku
34738	}
34739	if vngpf.VpnClientConfiguration != nil {
34740		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
34741	}
34742	if vngpf.BgpSettings != nil {
34743		objectMap["bgpSettings"] = vngpf.BgpSettings
34744	}
34745	if vngpf.CustomRoutes != nil {
34746		objectMap["customRoutes"] = vngpf.CustomRoutes
34747	}
34748	if vngpf.EnableDNSForwarding != nil {
34749		objectMap["enableDnsForwarding"] = vngpf.EnableDNSForwarding
34750	}
34751	return json.Marshal(objectMap)
34752}
34753
34754// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
34755// long-running operation.
34756type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
34757	azure.FutureAPI
34758	// Result returns the result of the asynchronous operation.
34759	// If the operation has not completed it will return an error.
34760	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
34761}
34762
34763// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
34764// long-running operation.
34765type VirtualNetworkGatewaysDeleteFuture struct {
34766	azure.FutureAPI
34767	// Result returns the result of the asynchronous operation.
34768	// If the operation has not completed it will return an error.
34769	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
34770}
34771
34772// VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture an abstraction for monitoring
34773// and retrieving the results of a long-running operation.
34774type VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture struct {
34775	azure.FutureAPI
34776	// Result returns the result of the asynchronous operation.
34777	// If the operation has not completed it will return an error.
34778	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
34779}
34780
34781// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
34782// results of a long-running operation.
34783type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
34784	azure.FutureAPI
34785	// Result returns the result of the asynchronous operation.
34786	// If the operation has not completed it will return an error.
34787	Result func(VirtualNetworkGatewaysClient) (String, error)
34788}
34789
34790// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
34791// of a long-running operation.
34792type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
34793	azure.FutureAPI
34794	// Result returns the result of the asynchronous operation.
34795	// If the operation has not completed it will return an error.
34796	Result func(VirtualNetworkGatewaysClient) (String, error)
34797}
34798
34799// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
34800// of a long-running operation.
34801type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
34802	azure.FutureAPI
34803	// Result returns the result of the asynchronous operation.
34804	// If the operation has not completed it will return an error.
34805	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
34806}
34807
34808// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
34809// a long-running operation.
34810type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
34811	azure.FutureAPI
34812	// Result returns the result of the asynchronous operation.
34813	// If the operation has not completed it will return an error.
34814	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
34815}
34816
34817// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
34818// a long-running operation.
34819type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
34820	azure.FutureAPI
34821	// Result returns the result of the asynchronous operation.
34822	// If the operation has not completed it will return an error.
34823	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
34824}
34825
34826// VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture an abstraction for monitoring and retrieving
34827// the results of a long-running operation.
34828type VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture struct {
34829	azure.FutureAPI
34830	// Result returns the result of the asynchronous operation.
34831	// If the operation has not completed it will return an error.
34832	Result func(VirtualNetworkGatewaysClient) (VpnClientConnectionHealthDetailListResult, error)
34833}
34834
34835// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
34836// results of a long-running operation.
34837type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
34838	azure.FutureAPI
34839	// Result returns the result of the asynchronous operation.
34840	// If the operation has not completed it will return an error.
34841	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
34842}
34843
34844// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
34845// results of a long-running operation.
34846type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
34847	azure.FutureAPI
34848	// Result returns the result of the asynchronous operation.
34849	// If the operation has not completed it will return an error.
34850	Result func(VirtualNetworkGatewaysClient) (String, error)
34851}
34852
34853// VirtualNetworkGatewaySku virtualNetworkGatewaySku details.
34854type VirtualNetworkGatewaySku struct {
34855	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw4', 'VirtualNetworkGatewaySkuNameVpnGw5', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameVpnGw4AZ', 'VirtualNetworkGatewaySkuNameVpnGw5AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
34856	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
34857	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw4', 'VirtualNetworkGatewaySkuTierVpnGw5', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierVpnGw4AZ', 'VirtualNetworkGatewaySkuTierVpnGw5AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
34858	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
34859	// Capacity - READ-ONLY; The capacity.
34860	Capacity *int32 `json:"capacity,omitempty"`
34861}
34862
34863// MarshalJSON is the custom marshaler for VirtualNetworkGatewaySku.
34864func (vngs VirtualNetworkGatewaySku) MarshalJSON() ([]byte, error) {
34865	objectMap := make(map[string]interface{})
34866	if vngs.Name != "" {
34867		objectMap["name"] = vngs.Name
34868	}
34869	if vngs.Tier != "" {
34870		objectMap["tier"] = vngs.Tier
34871	}
34872	return json.Marshal(objectMap)
34873}
34874
34875// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
34876// long-running operation.
34877type VirtualNetworkGatewaysResetFuture struct {
34878	azure.FutureAPI
34879	// Result returns the result of the asynchronous operation.
34880	// If the operation has not completed it will return an error.
34881	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
34882}
34883
34884// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
34885// results of a long-running operation.
34886type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
34887	azure.FutureAPI
34888	// Result returns the result of the asynchronous operation.
34889	// If the operation has not completed it will return an error.
34890	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
34891}
34892
34893// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
34894// results of a long-running operation.
34895type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
34896	azure.FutureAPI
34897	// Result returns the result of the asynchronous operation.
34898	// If the operation has not completed it will return an error.
34899	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
34900}
34901
34902// VirtualNetworkGatewaysStartPacketCaptureFuture an abstraction for monitoring and retrieving the results
34903// of a long-running operation.
34904type VirtualNetworkGatewaysStartPacketCaptureFuture struct {
34905	azure.FutureAPI
34906	// Result returns the result of the asynchronous operation.
34907	// If the operation has not completed it will return an error.
34908	Result func(VirtualNetworkGatewaysClient) (String, error)
34909}
34910
34911// VirtualNetworkGatewaysStopPacketCaptureFuture an abstraction for monitoring and retrieving the results
34912// of a long-running operation.
34913type VirtualNetworkGatewaysStopPacketCaptureFuture struct {
34914	azure.FutureAPI
34915	// Result returns the result of the asynchronous operation.
34916	// If the operation has not completed it will return an error.
34917	Result func(VirtualNetworkGatewaysClient) (String, error)
34918}
34919
34920// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
34921// long-running operation.
34922type VirtualNetworkGatewaysUpdateTagsFuture struct {
34923	azure.FutureAPI
34924	// Result returns the result of the asynchronous operation.
34925	// If the operation has not completed it will return an error.
34926	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
34927}
34928
34929// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
34930type VirtualNetworkListResult struct {
34931	autorest.Response `json:"-"`
34932	// Value - A list of VirtualNetwork resources in a resource group.
34933	Value *[]VirtualNetwork `json:"value,omitempty"`
34934	// NextLink - The URL to get the next set of results.
34935	NextLink *string `json:"nextLink,omitempty"`
34936}
34937
34938// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
34939type VirtualNetworkListResultIterator struct {
34940	i    int
34941	page VirtualNetworkListResultPage
34942}
34943
34944// NextWithContext advances to the next value.  If there was an error making
34945// the request the iterator does not advance and the error is returned.
34946func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
34947	if tracing.IsEnabled() {
34948		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
34949		defer func() {
34950			sc := -1
34951			if iter.Response().Response.Response != nil {
34952				sc = iter.Response().Response.Response.StatusCode
34953			}
34954			tracing.EndSpan(ctx, sc, err)
34955		}()
34956	}
34957	iter.i++
34958	if iter.i < len(iter.page.Values()) {
34959		return nil
34960	}
34961	err = iter.page.NextWithContext(ctx)
34962	if err != nil {
34963		iter.i--
34964		return err
34965	}
34966	iter.i = 0
34967	return nil
34968}
34969
34970// Next advances to the next value.  If there was an error making
34971// the request the iterator does not advance and the error is returned.
34972// Deprecated: Use NextWithContext() instead.
34973func (iter *VirtualNetworkListResultIterator) Next() error {
34974	return iter.NextWithContext(context.Background())
34975}
34976
34977// NotDone returns true if the enumeration should be started or is not yet complete.
34978func (iter VirtualNetworkListResultIterator) NotDone() bool {
34979	return iter.page.NotDone() && iter.i < len(iter.page.Values())
34980}
34981
34982// Response returns the raw server response from the last page request.
34983func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
34984	return iter.page.Response()
34985}
34986
34987// Value returns the current value or a zero-initialized value if the
34988// iterator has advanced beyond the end of the collection.
34989func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
34990	if !iter.page.NotDone() {
34991		return VirtualNetwork{}
34992	}
34993	return iter.page.Values()[iter.i]
34994}
34995
34996// Creates a new instance of the VirtualNetworkListResultIterator type.
34997func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
34998	return VirtualNetworkListResultIterator{page: page}
34999}
35000
35001// IsEmpty returns true if the ListResult contains no values.
35002func (vnlr VirtualNetworkListResult) IsEmpty() bool {
35003	return vnlr.Value == nil || len(*vnlr.Value) == 0
35004}
35005
35006// hasNextLink returns true if the NextLink is not empty.
35007func (vnlr VirtualNetworkListResult) hasNextLink() bool {
35008	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
35009}
35010
35011// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
35012// It returns nil if no more results exist.
35013func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
35014	if !vnlr.hasNextLink() {
35015		return nil, nil
35016	}
35017	return autorest.Prepare((&http.Request{}).WithContext(ctx),
35018		autorest.AsJSON(),
35019		autorest.AsGet(),
35020		autorest.WithBaseURL(to.String(vnlr.NextLink)))
35021}
35022
35023// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
35024type VirtualNetworkListResultPage struct {
35025	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
35026	vnlr VirtualNetworkListResult
35027}
35028
35029// NextWithContext advances to the next page of values.  If there was an error making
35030// the request the page does not advance and the error is returned.
35031func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
35032	if tracing.IsEnabled() {
35033		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
35034		defer func() {
35035			sc := -1
35036			if page.Response().Response.Response != nil {
35037				sc = page.Response().Response.Response.StatusCode
35038			}
35039			tracing.EndSpan(ctx, sc, err)
35040		}()
35041	}
35042	for {
35043		next, err := page.fn(ctx, page.vnlr)
35044		if err != nil {
35045			return err
35046		}
35047		page.vnlr = next
35048		if !next.hasNextLink() || !next.IsEmpty() {
35049			break
35050		}
35051	}
35052	return nil
35053}
35054
35055// Next advances to the next page of values.  If there was an error making
35056// the request the page does not advance and the error is returned.
35057// Deprecated: Use NextWithContext() instead.
35058func (page *VirtualNetworkListResultPage) Next() error {
35059	return page.NextWithContext(context.Background())
35060}
35061
35062// NotDone returns true if the page enumeration should be started or is not yet complete.
35063func (page VirtualNetworkListResultPage) NotDone() bool {
35064	return !page.vnlr.IsEmpty()
35065}
35066
35067// Response returns the raw server response from the last page request.
35068func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
35069	return page.vnlr
35070}
35071
35072// Values returns the slice of values for the current page or nil if there are no values.
35073func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
35074	if page.vnlr.IsEmpty() {
35075		return nil
35076	}
35077	return *page.vnlr.Value
35078}
35079
35080// Creates a new instance of the VirtualNetworkListResultPage type.
35081func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
35082	return VirtualNetworkListResultPage{
35083		fn:   getNextPage,
35084		vnlr: cur,
35085	}
35086}
35087
35088// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
35089type VirtualNetworkListUsageResult struct {
35090	autorest.Response `json:"-"`
35091	// Value - READ-ONLY; VirtualNetwork usage stats.
35092	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
35093	// NextLink - The URL to get the next set of results.
35094	NextLink *string `json:"nextLink,omitempty"`
35095}
35096
35097// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
35098func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
35099	objectMap := make(map[string]interface{})
35100	if vnlur.NextLink != nil {
35101		objectMap["nextLink"] = vnlur.NextLink
35102	}
35103	return json.Marshal(objectMap)
35104}
35105
35106// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
35107// values.
35108type VirtualNetworkListUsageResultIterator struct {
35109	i    int
35110	page VirtualNetworkListUsageResultPage
35111}
35112
35113// NextWithContext advances to the next value.  If there was an error making
35114// the request the iterator does not advance and the error is returned.
35115func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
35116	if tracing.IsEnabled() {
35117		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
35118		defer func() {
35119			sc := -1
35120			if iter.Response().Response.Response != nil {
35121				sc = iter.Response().Response.Response.StatusCode
35122			}
35123			tracing.EndSpan(ctx, sc, err)
35124		}()
35125	}
35126	iter.i++
35127	if iter.i < len(iter.page.Values()) {
35128		return nil
35129	}
35130	err = iter.page.NextWithContext(ctx)
35131	if err != nil {
35132		iter.i--
35133		return err
35134	}
35135	iter.i = 0
35136	return nil
35137}
35138
35139// Next advances to the next value.  If there was an error making
35140// the request the iterator does not advance and the error is returned.
35141// Deprecated: Use NextWithContext() instead.
35142func (iter *VirtualNetworkListUsageResultIterator) Next() error {
35143	return iter.NextWithContext(context.Background())
35144}
35145
35146// NotDone returns true if the enumeration should be started or is not yet complete.
35147func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
35148	return iter.page.NotDone() && iter.i < len(iter.page.Values())
35149}
35150
35151// Response returns the raw server response from the last page request.
35152func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
35153	return iter.page.Response()
35154}
35155
35156// Value returns the current value or a zero-initialized value if the
35157// iterator has advanced beyond the end of the collection.
35158func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
35159	if !iter.page.NotDone() {
35160		return VirtualNetworkUsage{}
35161	}
35162	return iter.page.Values()[iter.i]
35163}
35164
35165// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
35166func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
35167	return VirtualNetworkListUsageResultIterator{page: page}
35168}
35169
35170// IsEmpty returns true if the ListResult contains no values.
35171func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
35172	return vnlur.Value == nil || len(*vnlur.Value) == 0
35173}
35174
35175// hasNextLink returns true if the NextLink is not empty.
35176func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
35177	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
35178}
35179
35180// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
35181// It returns nil if no more results exist.
35182func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
35183	if !vnlur.hasNextLink() {
35184		return nil, nil
35185	}
35186	return autorest.Prepare((&http.Request{}).WithContext(ctx),
35187		autorest.AsJSON(),
35188		autorest.AsGet(),
35189		autorest.WithBaseURL(to.String(vnlur.NextLink)))
35190}
35191
35192// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
35193type VirtualNetworkListUsageResultPage struct {
35194	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
35195	vnlur VirtualNetworkListUsageResult
35196}
35197
35198// NextWithContext advances to the next page of values.  If there was an error making
35199// the request the page does not advance and the error is returned.
35200func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
35201	if tracing.IsEnabled() {
35202		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
35203		defer func() {
35204			sc := -1
35205			if page.Response().Response.Response != nil {
35206				sc = page.Response().Response.Response.StatusCode
35207			}
35208			tracing.EndSpan(ctx, sc, err)
35209		}()
35210	}
35211	for {
35212		next, err := page.fn(ctx, page.vnlur)
35213		if err != nil {
35214			return err
35215		}
35216		page.vnlur = next
35217		if !next.hasNextLink() || !next.IsEmpty() {
35218			break
35219		}
35220	}
35221	return nil
35222}
35223
35224// Next advances to the next page of values.  If there was an error making
35225// the request the page does not advance and the error is returned.
35226// Deprecated: Use NextWithContext() instead.
35227func (page *VirtualNetworkListUsageResultPage) Next() error {
35228	return page.NextWithContext(context.Background())
35229}
35230
35231// NotDone returns true if the page enumeration should be started or is not yet complete.
35232func (page VirtualNetworkListUsageResultPage) NotDone() bool {
35233	return !page.vnlur.IsEmpty()
35234}
35235
35236// Response returns the raw server response from the last page request.
35237func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
35238	return page.vnlur
35239}
35240
35241// Values returns the slice of values for the current page or nil if there are no values.
35242func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
35243	if page.vnlur.IsEmpty() {
35244		return nil
35245	}
35246	return *page.vnlur.Value
35247}
35248
35249// Creates a new instance of the VirtualNetworkListUsageResultPage type.
35250func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
35251	return VirtualNetworkListUsageResultPage{
35252		fn:    getNextPage,
35253		vnlur: cur,
35254	}
35255}
35256
35257// VirtualNetworkPeering peerings in a virtual network resource.
35258type VirtualNetworkPeering struct {
35259	autorest.Response `json:"-"`
35260	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
35261	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
35262	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
35263	Name *string `json:"name,omitempty"`
35264	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35265	Etag *string `json:"etag,omitempty"`
35266	// ID - Resource ID.
35267	ID *string `json:"id,omitempty"`
35268}
35269
35270// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
35271func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
35272	objectMap := make(map[string]interface{})
35273	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
35274		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
35275	}
35276	if vnp.Name != nil {
35277		objectMap["name"] = vnp.Name
35278	}
35279	if vnp.ID != nil {
35280		objectMap["id"] = vnp.ID
35281	}
35282	return json.Marshal(objectMap)
35283}
35284
35285// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
35286func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
35287	var m map[string]*json.RawMessage
35288	err := json.Unmarshal(body, &m)
35289	if err != nil {
35290		return err
35291	}
35292	for k, v := range m {
35293		switch k {
35294		case "properties":
35295			if v != nil {
35296				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
35297				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
35298				if err != nil {
35299					return err
35300				}
35301				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
35302			}
35303		case "name":
35304			if v != nil {
35305				var name string
35306				err = json.Unmarshal(*v, &name)
35307				if err != nil {
35308					return err
35309				}
35310				vnp.Name = &name
35311			}
35312		case "etag":
35313			if v != nil {
35314				var etag string
35315				err = json.Unmarshal(*v, &etag)
35316				if err != nil {
35317					return err
35318				}
35319				vnp.Etag = &etag
35320			}
35321		case "id":
35322			if v != nil {
35323				var ID string
35324				err = json.Unmarshal(*v, &ID)
35325				if err != nil {
35326					return err
35327				}
35328				vnp.ID = &ID
35329			}
35330		}
35331	}
35332
35333	return nil
35334}
35335
35336// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
35337// belong to a virtual network.
35338type VirtualNetworkPeeringListResult struct {
35339	autorest.Response `json:"-"`
35340	// Value - The peerings in a virtual network.
35341	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
35342	// NextLink - The URL to get the next set of results.
35343	NextLink *string `json:"nextLink,omitempty"`
35344}
35345
35346// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
35347// values.
35348type VirtualNetworkPeeringListResultIterator struct {
35349	i    int
35350	page VirtualNetworkPeeringListResultPage
35351}
35352
35353// NextWithContext advances to the next value.  If there was an error making
35354// the request the iterator does not advance and the error is returned.
35355func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
35356	if tracing.IsEnabled() {
35357		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
35358		defer func() {
35359			sc := -1
35360			if iter.Response().Response.Response != nil {
35361				sc = iter.Response().Response.Response.StatusCode
35362			}
35363			tracing.EndSpan(ctx, sc, err)
35364		}()
35365	}
35366	iter.i++
35367	if iter.i < len(iter.page.Values()) {
35368		return nil
35369	}
35370	err = iter.page.NextWithContext(ctx)
35371	if err != nil {
35372		iter.i--
35373		return err
35374	}
35375	iter.i = 0
35376	return nil
35377}
35378
35379// Next advances to the next value.  If there was an error making
35380// the request the iterator does not advance and the error is returned.
35381// Deprecated: Use NextWithContext() instead.
35382func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
35383	return iter.NextWithContext(context.Background())
35384}
35385
35386// NotDone returns true if the enumeration should be started or is not yet complete.
35387func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
35388	return iter.page.NotDone() && iter.i < len(iter.page.Values())
35389}
35390
35391// Response returns the raw server response from the last page request.
35392func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
35393	return iter.page.Response()
35394}
35395
35396// Value returns the current value or a zero-initialized value if the
35397// iterator has advanced beyond the end of the collection.
35398func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
35399	if !iter.page.NotDone() {
35400		return VirtualNetworkPeering{}
35401	}
35402	return iter.page.Values()[iter.i]
35403}
35404
35405// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
35406func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
35407	return VirtualNetworkPeeringListResultIterator{page: page}
35408}
35409
35410// IsEmpty returns true if the ListResult contains no values.
35411func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
35412	return vnplr.Value == nil || len(*vnplr.Value) == 0
35413}
35414
35415// hasNextLink returns true if the NextLink is not empty.
35416func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
35417	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
35418}
35419
35420// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
35421// It returns nil if no more results exist.
35422func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
35423	if !vnplr.hasNextLink() {
35424		return nil, nil
35425	}
35426	return autorest.Prepare((&http.Request{}).WithContext(ctx),
35427		autorest.AsJSON(),
35428		autorest.AsGet(),
35429		autorest.WithBaseURL(to.String(vnplr.NextLink)))
35430}
35431
35432// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
35433type VirtualNetworkPeeringListResultPage struct {
35434	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
35435	vnplr VirtualNetworkPeeringListResult
35436}
35437
35438// NextWithContext advances to the next page of values.  If there was an error making
35439// the request the page does not advance and the error is returned.
35440func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
35441	if tracing.IsEnabled() {
35442		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
35443		defer func() {
35444			sc := -1
35445			if page.Response().Response.Response != nil {
35446				sc = page.Response().Response.Response.StatusCode
35447			}
35448			tracing.EndSpan(ctx, sc, err)
35449		}()
35450	}
35451	for {
35452		next, err := page.fn(ctx, page.vnplr)
35453		if err != nil {
35454			return err
35455		}
35456		page.vnplr = next
35457		if !next.hasNextLink() || !next.IsEmpty() {
35458			break
35459		}
35460	}
35461	return nil
35462}
35463
35464// Next advances to the next page of values.  If there was an error making
35465// the request the page does not advance and the error is returned.
35466// Deprecated: Use NextWithContext() instead.
35467func (page *VirtualNetworkPeeringListResultPage) Next() error {
35468	return page.NextWithContext(context.Background())
35469}
35470
35471// NotDone returns true if the page enumeration should be started or is not yet complete.
35472func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
35473	return !page.vnplr.IsEmpty()
35474}
35475
35476// Response returns the raw server response from the last page request.
35477func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
35478	return page.vnplr
35479}
35480
35481// Values returns the slice of values for the current page or nil if there are no values.
35482func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
35483	if page.vnplr.IsEmpty() {
35484		return nil
35485	}
35486	return *page.vnplr.Value
35487}
35488
35489// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
35490func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
35491	return VirtualNetworkPeeringListResultPage{
35492		fn:    getNextPage,
35493		vnplr: cur,
35494	}
35495}
35496
35497// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
35498type VirtualNetworkPeeringPropertiesFormat struct {
35499	// AllowVirtualNetworkAccess - Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
35500	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
35501	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
35502	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
35503	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
35504	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
35505	// 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.
35506	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
35507	// 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).
35508	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
35509	// RemoteAddressSpace - The reference to the remote virtual network address space.
35510	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
35511	// PeeringState - The status of the virtual network peering. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
35512	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
35513	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35514	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35515}
35516
35517// MarshalJSON is the custom marshaler for VirtualNetworkPeeringPropertiesFormat.
35518func (vnppf VirtualNetworkPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
35519	objectMap := make(map[string]interface{})
35520	if vnppf.AllowVirtualNetworkAccess != nil {
35521		objectMap["allowVirtualNetworkAccess"] = vnppf.AllowVirtualNetworkAccess
35522	}
35523	if vnppf.AllowForwardedTraffic != nil {
35524		objectMap["allowForwardedTraffic"] = vnppf.AllowForwardedTraffic
35525	}
35526	if vnppf.AllowGatewayTransit != nil {
35527		objectMap["allowGatewayTransit"] = vnppf.AllowGatewayTransit
35528	}
35529	if vnppf.UseRemoteGateways != nil {
35530		objectMap["useRemoteGateways"] = vnppf.UseRemoteGateways
35531	}
35532	if vnppf.RemoteVirtualNetwork != nil {
35533		objectMap["remoteVirtualNetwork"] = vnppf.RemoteVirtualNetwork
35534	}
35535	if vnppf.RemoteAddressSpace != nil {
35536		objectMap["remoteAddressSpace"] = vnppf.RemoteAddressSpace
35537	}
35538	if vnppf.PeeringState != "" {
35539		objectMap["peeringState"] = vnppf.PeeringState
35540	}
35541	return json.Marshal(objectMap)
35542}
35543
35544// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
35545// long-running operation.
35546type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
35547	azure.FutureAPI
35548	// Result returns the result of the asynchronous operation.
35549	// If the operation has not completed it will return an error.
35550	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
35551}
35552
35553// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
35554// long-running operation.
35555type VirtualNetworkPeeringsDeleteFuture struct {
35556	azure.FutureAPI
35557	// Result returns the result of the asynchronous operation.
35558	// If the operation has not completed it will return an error.
35559	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
35560}
35561
35562// VirtualNetworkPropertiesFormat properties of the virtual network.
35563type VirtualNetworkPropertiesFormat struct {
35564	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
35565	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
35566	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
35567	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
35568	// Subnets - A list of subnets in a Virtual Network.
35569	Subnets *[]Subnet `json:"subnets,omitempty"`
35570	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
35571	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
35572	// ResourceGUID - READ-ONLY; The resourceGuid property of the Virtual Network resource.
35573	ResourceGUID *string `json:"resourceGuid,omitempty"`
35574	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35575	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35576	// 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.
35577	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
35578	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
35579	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
35580	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
35581	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
35582	// BgpCommunities - Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET.
35583	BgpCommunities *VirtualNetworkBgpCommunities `json:"bgpCommunities,omitempty"`
35584	// IPAllocations - Array of IpAllocation which reference this VNET.
35585	IPAllocations *[]SubResource `json:"ipAllocations,omitempty"`
35586}
35587
35588// MarshalJSON is the custom marshaler for VirtualNetworkPropertiesFormat.
35589func (vnpf VirtualNetworkPropertiesFormat) MarshalJSON() ([]byte, error) {
35590	objectMap := make(map[string]interface{})
35591	if vnpf.AddressSpace != nil {
35592		objectMap["addressSpace"] = vnpf.AddressSpace
35593	}
35594	if vnpf.DhcpOptions != nil {
35595		objectMap["dhcpOptions"] = vnpf.DhcpOptions
35596	}
35597	if vnpf.Subnets != nil {
35598		objectMap["subnets"] = vnpf.Subnets
35599	}
35600	if vnpf.VirtualNetworkPeerings != nil {
35601		objectMap["virtualNetworkPeerings"] = vnpf.VirtualNetworkPeerings
35602	}
35603	if vnpf.EnableDdosProtection != nil {
35604		objectMap["enableDdosProtection"] = vnpf.EnableDdosProtection
35605	}
35606	if vnpf.EnableVMProtection != nil {
35607		objectMap["enableVmProtection"] = vnpf.EnableVMProtection
35608	}
35609	if vnpf.DdosProtectionPlan != nil {
35610		objectMap["ddosProtectionPlan"] = vnpf.DdosProtectionPlan
35611	}
35612	if vnpf.BgpCommunities != nil {
35613		objectMap["bgpCommunities"] = vnpf.BgpCommunities
35614	}
35615	if vnpf.IPAllocations != nil {
35616		objectMap["ipAllocations"] = vnpf.IPAllocations
35617	}
35618	return json.Marshal(objectMap)
35619}
35620
35621// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
35622// long-running operation.
35623type VirtualNetworksCreateOrUpdateFuture struct {
35624	azure.FutureAPI
35625	// Result returns the result of the asynchronous operation.
35626	// If the operation has not completed it will return an error.
35627	Result func(VirtualNetworksClient) (VirtualNetwork, error)
35628}
35629
35630// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
35631// operation.
35632type VirtualNetworksDeleteFuture struct {
35633	azure.FutureAPI
35634	// Result returns the result of the asynchronous operation.
35635	// If the operation has not completed it will return an error.
35636	Result func(VirtualNetworksClient) (autorest.Response, error)
35637}
35638
35639// VirtualNetworkTap virtual Network Tap resource.
35640type VirtualNetworkTap struct {
35641	autorest.Response `json:"-"`
35642	// VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties.
35643	*VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"`
35644	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35645	Etag *string `json:"etag,omitempty"`
35646	// ID - Resource ID.
35647	ID *string `json:"id,omitempty"`
35648	// Name - READ-ONLY; Resource name.
35649	Name *string `json:"name,omitempty"`
35650	// Type - READ-ONLY; Resource type.
35651	Type *string `json:"type,omitempty"`
35652	// Location - Resource location.
35653	Location *string `json:"location,omitempty"`
35654	// Tags - Resource tags.
35655	Tags map[string]*string `json:"tags"`
35656}
35657
35658// MarshalJSON is the custom marshaler for VirtualNetworkTap.
35659func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) {
35660	objectMap := make(map[string]interface{})
35661	if vnt.VirtualNetworkTapPropertiesFormat != nil {
35662		objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat
35663	}
35664	if vnt.ID != nil {
35665		objectMap["id"] = vnt.ID
35666	}
35667	if vnt.Location != nil {
35668		objectMap["location"] = vnt.Location
35669	}
35670	if vnt.Tags != nil {
35671		objectMap["tags"] = vnt.Tags
35672	}
35673	return json.Marshal(objectMap)
35674}
35675
35676// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct.
35677func (vnt *VirtualNetworkTap) UnmarshalJSON(body []byte) error {
35678	var m map[string]*json.RawMessage
35679	err := json.Unmarshal(body, &m)
35680	if err != nil {
35681		return err
35682	}
35683	for k, v := range m {
35684		switch k {
35685		case "properties":
35686			if v != nil {
35687				var virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat
35688				err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat)
35689				if err != nil {
35690					return err
35691				}
35692				vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat
35693			}
35694		case "etag":
35695			if v != nil {
35696				var etag string
35697				err = json.Unmarshal(*v, &etag)
35698				if err != nil {
35699					return err
35700				}
35701				vnt.Etag = &etag
35702			}
35703		case "id":
35704			if v != nil {
35705				var ID string
35706				err = json.Unmarshal(*v, &ID)
35707				if err != nil {
35708					return err
35709				}
35710				vnt.ID = &ID
35711			}
35712		case "name":
35713			if v != nil {
35714				var name string
35715				err = json.Unmarshal(*v, &name)
35716				if err != nil {
35717					return err
35718				}
35719				vnt.Name = &name
35720			}
35721		case "type":
35722			if v != nil {
35723				var typeVar string
35724				err = json.Unmarshal(*v, &typeVar)
35725				if err != nil {
35726					return err
35727				}
35728				vnt.Type = &typeVar
35729			}
35730		case "location":
35731			if v != nil {
35732				var location string
35733				err = json.Unmarshal(*v, &location)
35734				if err != nil {
35735					return err
35736				}
35737				vnt.Location = &location
35738			}
35739		case "tags":
35740			if v != nil {
35741				var tags map[string]*string
35742				err = json.Unmarshal(*v, &tags)
35743				if err != nil {
35744					return err
35745				}
35746				vnt.Tags = tags
35747			}
35748		}
35749	}
35750
35751	return nil
35752}
35753
35754// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call.
35755type VirtualNetworkTapListResult struct {
35756	autorest.Response `json:"-"`
35757	// Value - A list of VirtualNetworkTaps in a resource group.
35758	Value *[]VirtualNetworkTap `json:"value,omitempty"`
35759	// NextLink - The URL to get the next set of results.
35760	NextLink *string `json:"nextLink,omitempty"`
35761}
35762
35763// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values.
35764type VirtualNetworkTapListResultIterator struct {
35765	i    int
35766	page VirtualNetworkTapListResultPage
35767}
35768
35769// NextWithContext advances to the next value.  If there was an error making
35770// the request the iterator does not advance and the error is returned.
35771func (iter *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) {
35772	if tracing.IsEnabled() {
35773		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.NextWithContext")
35774		defer func() {
35775			sc := -1
35776			if iter.Response().Response.Response != nil {
35777				sc = iter.Response().Response.Response.StatusCode
35778			}
35779			tracing.EndSpan(ctx, sc, err)
35780		}()
35781	}
35782	iter.i++
35783	if iter.i < len(iter.page.Values()) {
35784		return nil
35785	}
35786	err = iter.page.NextWithContext(ctx)
35787	if err != nil {
35788		iter.i--
35789		return err
35790	}
35791	iter.i = 0
35792	return nil
35793}
35794
35795// Next advances to the next value.  If there was an error making
35796// the request the iterator does not advance and the error is returned.
35797// Deprecated: Use NextWithContext() instead.
35798func (iter *VirtualNetworkTapListResultIterator) Next() error {
35799	return iter.NextWithContext(context.Background())
35800}
35801
35802// NotDone returns true if the enumeration should be started or is not yet complete.
35803func (iter VirtualNetworkTapListResultIterator) NotDone() bool {
35804	return iter.page.NotDone() && iter.i < len(iter.page.Values())
35805}
35806
35807// Response returns the raw server response from the last page request.
35808func (iter VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult {
35809	return iter.page.Response()
35810}
35811
35812// Value returns the current value or a zero-initialized value if the
35813// iterator has advanced beyond the end of the collection.
35814func (iter VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap {
35815	if !iter.page.NotDone() {
35816		return VirtualNetworkTap{}
35817	}
35818	return iter.page.Values()[iter.i]
35819}
35820
35821// Creates a new instance of the VirtualNetworkTapListResultIterator type.
35822func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator {
35823	return VirtualNetworkTapListResultIterator{page: page}
35824}
35825
35826// IsEmpty returns true if the ListResult contains no values.
35827func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
35828	return vntlr.Value == nil || len(*vntlr.Value) == 0
35829}
35830
35831// hasNextLink returns true if the NextLink is not empty.
35832func (vntlr VirtualNetworkTapListResult) hasNextLink() bool {
35833	return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0
35834}
35835
35836// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results.
35837// It returns nil if no more results exist.
35838func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) {
35839	if !vntlr.hasNextLink() {
35840		return nil, nil
35841	}
35842	return autorest.Prepare((&http.Request{}).WithContext(ctx),
35843		autorest.AsJSON(),
35844		autorest.AsGet(),
35845		autorest.WithBaseURL(to.String(vntlr.NextLink)))
35846}
35847
35848// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values.
35849type VirtualNetworkTapListResultPage struct {
35850	fn    func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
35851	vntlr VirtualNetworkTapListResult
35852}
35853
35854// NextWithContext advances to the next page of values.  If there was an error making
35855// the request the page does not advance and the error is returned.
35856func (page *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) {
35857	if tracing.IsEnabled() {
35858		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.NextWithContext")
35859		defer func() {
35860			sc := -1
35861			if page.Response().Response.Response != nil {
35862				sc = page.Response().Response.Response.StatusCode
35863			}
35864			tracing.EndSpan(ctx, sc, err)
35865		}()
35866	}
35867	for {
35868		next, err := page.fn(ctx, page.vntlr)
35869		if err != nil {
35870			return err
35871		}
35872		page.vntlr = next
35873		if !next.hasNextLink() || !next.IsEmpty() {
35874			break
35875		}
35876	}
35877	return nil
35878}
35879
35880// Next advances to the next page of values.  If there was an error making
35881// the request the page does not advance and the error is returned.
35882// Deprecated: Use NextWithContext() instead.
35883func (page *VirtualNetworkTapListResultPage) Next() error {
35884	return page.NextWithContext(context.Background())
35885}
35886
35887// NotDone returns true if the page enumeration should be started or is not yet complete.
35888func (page VirtualNetworkTapListResultPage) NotDone() bool {
35889	return !page.vntlr.IsEmpty()
35890}
35891
35892// Response returns the raw server response from the last page request.
35893func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult {
35894	return page.vntlr
35895}
35896
35897// Values returns the slice of values for the current page or nil if there are no values.
35898func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap {
35899	if page.vntlr.IsEmpty() {
35900		return nil
35901	}
35902	return *page.vntlr.Value
35903}
35904
35905// Creates a new instance of the VirtualNetworkTapListResultPage type.
35906func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage {
35907	return VirtualNetworkTapListResultPage{
35908		fn:    getNextPage,
35909		vntlr: cur,
35910	}
35911}
35912
35913// VirtualNetworkTapPropertiesFormat virtual Network Tap properties.
35914type VirtualNetworkTapPropertiesFormat struct {
35915	// NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
35916	NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"`
35917	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network tap resource.
35918	ResourceGUID *string `json:"resourceGuid,omitempty"`
35919	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35920	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35921	// DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap.
35922	DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"`
35923	// DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap.
35924	DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"`
35925	// DestinationPort - The VXLAN destination port that will receive the tapped traffic.
35926	DestinationPort *int32 `json:"destinationPort,omitempty"`
35927}
35928
35929// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat.
35930func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) {
35931	objectMap := make(map[string]interface{})
35932	if vntpf.DestinationNetworkInterfaceIPConfiguration != nil {
35933		objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration
35934	}
35935	if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil {
35936		objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration
35937	}
35938	if vntpf.DestinationPort != nil {
35939		objectMap["destinationPort"] = vntpf.DestinationPort
35940	}
35941	return json.Marshal(objectMap)
35942}
35943
35944// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
35945// long-running operation.
35946type VirtualNetworkTapsCreateOrUpdateFuture struct {
35947	azure.FutureAPI
35948	// Result returns the result of the asynchronous operation.
35949	// If the operation has not completed it will return an error.
35950	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
35951}
35952
35953// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a
35954// long-running operation.
35955type VirtualNetworkTapsDeleteFuture struct {
35956	azure.FutureAPI
35957	// Result returns the result of the asynchronous operation.
35958	// If the operation has not completed it will return an error.
35959	Result func(VirtualNetworkTapsClient) (autorest.Response, error)
35960}
35961
35962// VirtualNetworkUsage usage details for subnet.
35963type VirtualNetworkUsage struct {
35964	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
35965	CurrentValue *float64 `json:"currentValue,omitempty"`
35966	// ID - READ-ONLY; Subnet identifier.
35967	ID *string `json:"id,omitempty"`
35968	// Limit - READ-ONLY; Indicates the size of the subnet.
35969	Limit *float64 `json:"limit,omitempty"`
35970	// Name - READ-ONLY; The name containing common and localized value for usage.
35971	Name *VirtualNetworkUsageName `json:"name,omitempty"`
35972	// Unit - READ-ONLY; Usage units. Returns 'Count'.
35973	Unit *string `json:"unit,omitempty"`
35974}
35975
35976// VirtualNetworkUsageName usage strings container.
35977type VirtualNetworkUsageName struct {
35978	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
35979	LocalizedValue *string `json:"localizedValue,omitempty"`
35980	// Value - READ-ONLY; Subnet size and usage string.
35981	Value *string `json:"value,omitempty"`
35982}
35983
35984// VirtualRouter virtualRouter Resource.
35985type VirtualRouter struct {
35986	autorest.Response `json:"-"`
35987	// VirtualRouterPropertiesFormat - Properties of the Virtual Router.
35988	*VirtualRouterPropertiesFormat `json:"properties,omitempty"`
35989	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35990	Etag *string `json:"etag,omitempty"`
35991	// ID - Resource ID.
35992	ID *string `json:"id,omitempty"`
35993	// Name - READ-ONLY; Resource name.
35994	Name *string `json:"name,omitempty"`
35995	// Type - READ-ONLY; Resource type.
35996	Type *string `json:"type,omitempty"`
35997	// Location - Resource location.
35998	Location *string `json:"location,omitempty"`
35999	// Tags - Resource tags.
36000	Tags map[string]*string `json:"tags"`
36001}
36002
36003// MarshalJSON is the custom marshaler for VirtualRouter.
36004func (vr VirtualRouter) MarshalJSON() ([]byte, error) {
36005	objectMap := make(map[string]interface{})
36006	if vr.VirtualRouterPropertiesFormat != nil {
36007		objectMap["properties"] = vr.VirtualRouterPropertiesFormat
36008	}
36009	if vr.ID != nil {
36010		objectMap["id"] = vr.ID
36011	}
36012	if vr.Location != nil {
36013		objectMap["location"] = vr.Location
36014	}
36015	if vr.Tags != nil {
36016		objectMap["tags"] = vr.Tags
36017	}
36018	return json.Marshal(objectMap)
36019}
36020
36021// UnmarshalJSON is the custom unmarshaler for VirtualRouter struct.
36022func (vr *VirtualRouter) UnmarshalJSON(body []byte) error {
36023	var m map[string]*json.RawMessage
36024	err := json.Unmarshal(body, &m)
36025	if err != nil {
36026		return err
36027	}
36028	for k, v := range m {
36029		switch k {
36030		case "properties":
36031			if v != nil {
36032				var virtualRouterPropertiesFormat VirtualRouterPropertiesFormat
36033				err = json.Unmarshal(*v, &virtualRouterPropertiesFormat)
36034				if err != nil {
36035					return err
36036				}
36037				vr.VirtualRouterPropertiesFormat = &virtualRouterPropertiesFormat
36038			}
36039		case "etag":
36040			if v != nil {
36041				var etag string
36042				err = json.Unmarshal(*v, &etag)
36043				if err != nil {
36044					return err
36045				}
36046				vr.Etag = &etag
36047			}
36048		case "id":
36049			if v != nil {
36050				var ID string
36051				err = json.Unmarshal(*v, &ID)
36052				if err != nil {
36053					return err
36054				}
36055				vr.ID = &ID
36056			}
36057		case "name":
36058			if v != nil {
36059				var name string
36060				err = json.Unmarshal(*v, &name)
36061				if err != nil {
36062					return err
36063				}
36064				vr.Name = &name
36065			}
36066		case "type":
36067			if v != nil {
36068				var typeVar string
36069				err = json.Unmarshal(*v, &typeVar)
36070				if err != nil {
36071					return err
36072				}
36073				vr.Type = &typeVar
36074			}
36075		case "location":
36076			if v != nil {
36077				var location string
36078				err = json.Unmarshal(*v, &location)
36079				if err != nil {
36080					return err
36081				}
36082				vr.Location = &location
36083			}
36084		case "tags":
36085			if v != nil {
36086				var tags map[string]*string
36087				err = json.Unmarshal(*v, &tags)
36088				if err != nil {
36089					return err
36090				}
36091				vr.Tags = tags
36092			}
36093		}
36094	}
36095
36096	return nil
36097}
36098
36099// VirtualRouterListResult response for ListVirtualRouters API service call.
36100type VirtualRouterListResult struct {
36101	autorest.Response `json:"-"`
36102	// Value - List of Virtual Routers.
36103	Value *[]VirtualRouter `json:"value,omitempty"`
36104	// NextLink - URL to get the next set of results.
36105	NextLink *string `json:"nextLink,omitempty"`
36106}
36107
36108// VirtualRouterListResultIterator provides access to a complete listing of VirtualRouter values.
36109type VirtualRouterListResultIterator struct {
36110	i    int
36111	page VirtualRouterListResultPage
36112}
36113
36114// NextWithContext advances to the next value.  If there was an error making
36115// the request the iterator does not advance and the error is returned.
36116func (iter *VirtualRouterListResultIterator) NextWithContext(ctx context.Context) (err error) {
36117	if tracing.IsEnabled() {
36118		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterListResultIterator.NextWithContext")
36119		defer func() {
36120			sc := -1
36121			if iter.Response().Response.Response != nil {
36122				sc = iter.Response().Response.Response.StatusCode
36123			}
36124			tracing.EndSpan(ctx, sc, err)
36125		}()
36126	}
36127	iter.i++
36128	if iter.i < len(iter.page.Values()) {
36129		return nil
36130	}
36131	err = iter.page.NextWithContext(ctx)
36132	if err != nil {
36133		iter.i--
36134		return err
36135	}
36136	iter.i = 0
36137	return nil
36138}
36139
36140// Next advances to the next value.  If there was an error making
36141// the request the iterator does not advance and the error is returned.
36142// Deprecated: Use NextWithContext() instead.
36143func (iter *VirtualRouterListResultIterator) Next() error {
36144	return iter.NextWithContext(context.Background())
36145}
36146
36147// NotDone returns true if the enumeration should be started or is not yet complete.
36148func (iter VirtualRouterListResultIterator) NotDone() bool {
36149	return iter.page.NotDone() && iter.i < len(iter.page.Values())
36150}
36151
36152// Response returns the raw server response from the last page request.
36153func (iter VirtualRouterListResultIterator) Response() VirtualRouterListResult {
36154	return iter.page.Response()
36155}
36156
36157// Value returns the current value or a zero-initialized value if the
36158// iterator has advanced beyond the end of the collection.
36159func (iter VirtualRouterListResultIterator) Value() VirtualRouter {
36160	if !iter.page.NotDone() {
36161		return VirtualRouter{}
36162	}
36163	return iter.page.Values()[iter.i]
36164}
36165
36166// Creates a new instance of the VirtualRouterListResultIterator type.
36167func NewVirtualRouterListResultIterator(page VirtualRouterListResultPage) VirtualRouterListResultIterator {
36168	return VirtualRouterListResultIterator{page: page}
36169}
36170
36171// IsEmpty returns true if the ListResult contains no values.
36172func (vrlr VirtualRouterListResult) IsEmpty() bool {
36173	return vrlr.Value == nil || len(*vrlr.Value) == 0
36174}
36175
36176// hasNextLink returns true if the NextLink is not empty.
36177func (vrlr VirtualRouterListResult) hasNextLink() bool {
36178	return vrlr.NextLink != nil && len(*vrlr.NextLink) != 0
36179}
36180
36181// virtualRouterListResultPreparer prepares a request to retrieve the next set of results.
36182// It returns nil if no more results exist.
36183func (vrlr VirtualRouterListResult) virtualRouterListResultPreparer(ctx context.Context) (*http.Request, error) {
36184	if !vrlr.hasNextLink() {
36185		return nil, nil
36186	}
36187	return autorest.Prepare((&http.Request{}).WithContext(ctx),
36188		autorest.AsJSON(),
36189		autorest.AsGet(),
36190		autorest.WithBaseURL(to.String(vrlr.NextLink)))
36191}
36192
36193// VirtualRouterListResultPage contains a page of VirtualRouter values.
36194type VirtualRouterListResultPage struct {
36195	fn   func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error)
36196	vrlr VirtualRouterListResult
36197}
36198
36199// NextWithContext advances to the next page of values.  If there was an error making
36200// the request the page does not advance and the error is returned.
36201func (page *VirtualRouterListResultPage) NextWithContext(ctx context.Context) (err error) {
36202	if tracing.IsEnabled() {
36203		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterListResultPage.NextWithContext")
36204		defer func() {
36205			sc := -1
36206			if page.Response().Response.Response != nil {
36207				sc = page.Response().Response.Response.StatusCode
36208			}
36209			tracing.EndSpan(ctx, sc, err)
36210		}()
36211	}
36212	for {
36213		next, err := page.fn(ctx, page.vrlr)
36214		if err != nil {
36215			return err
36216		}
36217		page.vrlr = next
36218		if !next.hasNextLink() || !next.IsEmpty() {
36219			break
36220		}
36221	}
36222	return nil
36223}
36224
36225// Next advances to the next page of values.  If there was an error making
36226// the request the page does not advance and the error is returned.
36227// Deprecated: Use NextWithContext() instead.
36228func (page *VirtualRouterListResultPage) Next() error {
36229	return page.NextWithContext(context.Background())
36230}
36231
36232// NotDone returns true if the page enumeration should be started or is not yet complete.
36233func (page VirtualRouterListResultPage) NotDone() bool {
36234	return !page.vrlr.IsEmpty()
36235}
36236
36237// Response returns the raw server response from the last page request.
36238func (page VirtualRouterListResultPage) Response() VirtualRouterListResult {
36239	return page.vrlr
36240}
36241
36242// Values returns the slice of values for the current page or nil if there are no values.
36243func (page VirtualRouterListResultPage) Values() []VirtualRouter {
36244	if page.vrlr.IsEmpty() {
36245		return nil
36246	}
36247	return *page.vrlr.Value
36248}
36249
36250// Creates a new instance of the VirtualRouterListResultPage type.
36251func NewVirtualRouterListResultPage(cur VirtualRouterListResult, getNextPage func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error)) VirtualRouterListResultPage {
36252	return VirtualRouterListResultPage{
36253		fn:   getNextPage,
36254		vrlr: cur,
36255	}
36256}
36257
36258// VirtualRouterPeering virtual Router Peering resource.
36259type VirtualRouterPeering struct {
36260	autorest.Response `json:"-"`
36261	// VirtualRouterPeeringProperties - The properties of the Virtual Router Peering.
36262	*VirtualRouterPeeringProperties `json:"properties,omitempty"`
36263	// Name - Name of the virtual router peering that is unique within a virtual router.
36264	Name *string `json:"name,omitempty"`
36265	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
36266	Etag *string `json:"etag,omitempty"`
36267	// Type - READ-ONLY; Peering type.
36268	Type *string `json:"type,omitempty"`
36269	// ID - Resource ID.
36270	ID *string `json:"id,omitempty"`
36271}
36272
36273// MarshalJSON is the custom marshaler for VirtualRouterPeering.
36274func (vrp VirtualRouterPeering) MarshalJSON() ([]byte, error) {
36275	objectMap := make(map[string]interface{})
36276	if vrp.VirtualRouterPeeringProperties != nil {
36277		objectMap["properties"] = vrp.VirtualRouterPeeringProperties
36278	}
36279	if vrp.Name != nil {
36280		objectMap["name"] = vrp.Name
36281	}
36282	if vrp.ID != nil {
36283		objectMap["id"] = vrp.ID
36284	}
36285	return json.Marshal(objectMap)
36286}
36287
36288// UnmarshalJSON is the custom unmarshaler for VirtualRouterPeering struct.
36289func (vrp *VirtualRouterPeering) UnmarshalJSON(body []byte) error {
36290	var m map[string]*json.RawMessage
36291	err := json.Unmarshal(body, &m)
36292	if err != nil {
36293		return err
36294	}
36295	for k, v := range m {
36296		switch k {
36297		case "properties":
36298			if v != nil {
36299				var virtualRouterPeeringProperties VirtualRouterPeeringProperties
36300				err = json.Unmarshal(*v, &virtualRouterPeeringProperties)
36301				if err != nil {
36302					return err
36303				}
36304				vrp.VirtualRouterPeeringProperties = &virtualRouterPeeringProperties
36305			}
36306		case "name":
36307			if v != nil {
36308				var name string
36309				err = json.Unmarshal(*v, &name)
36310				if err != nil {
36311					return err
36312				}
36313				vrp.Name = &name
36314			}
36315		case "etag":
36316			if v != nil {
36317				var etag string
36318				err = json.Unmarshal(*v, &etag)
36319				if err != nil {
36320					return err
36321				}
36322				vrp.Etag = &etag
36323			}
36324		case "type":
36325			if v != nil {
36326				var typeVar string
36327				err = json.Unmarshal(*v, &typeVar)
36328				if err != nil {
36329					return err
36330				}
36331				vrp.Type = &typeVar
36332			}
36333		case "id":
36334			if v != nil {
36335				var ID string
36336				err = json.Unmarshal(*v, &ID)
36337				if err != nil {
36338					return err
36339				}
36340				vrp.ID = &ID
36341			}
36342		}
36343	}
36344
36345	return nil
36346}
36347
36348// VirtualRouterPeeringListResult response for ListVirtualRouterPeerings API service call.
36349type VirtualRouterPeeringListResult struct {
36350	autorest.Response `json:"-"`
36351	// Value - List of VirtualRouterPeerings in a VirtualRouter.
36352	Value *[]VirtualRouterPeering `json:"value,omitempty"`
36353	// NextLink - URL to get the next set of results.
36354	NextLink *string `json:"nextLink,omitempty"`
36355}
36356
36357// VirtualRouterPeeringListResultIterator provides access to a complete listing of VirtualRouterPeering
36358// values.
36359type VirtualRouterPeeringListResultIterator struct {
36360	i    int
36361	page VirtualRouterPeeringListResultPage
36362}
36363
36364// NextWithContext advances to the next value.  If there was an error making
36365// the request the iterator does not advance and the error is returned.
36366func (iter *VirtualRouterPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
36367	if tracing.IsEnabled() {
36368		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringListResultIterator.NextWithContext")
36369		defer func() {
36370			sc := -1
36371			if iter.Response().Response.Response != nil {
36372				sc = iter.Response().Response.Response.StatusCode
36373			}
36374			tracing.EndSpan(ctx, sc, err)
36375		}()
36376	}
36377	iter.i++
36378	if iter.i < len(iter.page.Values()) {
36379		return nil
36380	}
36381	err = iter.page.NextWithContext(ctx)
36382	if err != nil {
36383		iter.i--
36384		return err
36385	}
36386	iter.i = 0
36387	return nil
36388}
36389
36390// Next advances to the next value.  If there was an error making
36391// the request the iterator does not advance and the error is returned.
36392// Deprecated: Use NextWithContext() instead.
36393func (iter *VirtualRouterPeeringListResultIterator) Next() error {
36394	return iter.NextWithContext(context.Background())
36395}
36396
36397// NotDone returns true if the enumeration should be started or is not yet complete.
36398func (iter VirtualRouterPeeringListResultIterator) NotDone() bool {
36399	return iter.page.NotDone() && iter.i < len(iter.page.Values())
36400}
36401
36402// Response returns the raw server response from the last page request.
36403func (iter VirtualRouterPeeringListResultIterator) Response() VirtualRouterPeeringListResult {
36404	return iter.page.Response()
36405}
36406
36407// Value returns the current value or a zero-initialized value if the
36408// iterator has advanced beyond the end of the collection.
36409func (iter VirtualRouterPeeringListResultIterator) Value() VirtualRouterPeering {
36410	if !iter.page.NotDone() {
36411		return VirtualRouterPeering{}
36412	}
36413	return iter.page.Values()[iter.i]
36414}
36415
36416// Creates a new instance of the VirtualRouterPeeringListResultIterator type.
36417func NewVirtualRouterPeeringListResultIterator(page VirtualRouterPeeringListResultPage) VirtualRouterPeeringListResultIterator {
36418	return VirtualRouterPeeringListResultIterator{page: page}
36419}
36420
36421// IsEmpty returns true if the ListResult contains no values.
36422func (vrplr VirtualRouterPeeringListResult) IsEmpty() bool {
36423	return vrplr.Value == nil || len(*vrplr.Value) == 0
36424}
36425
36426// hasNextLink returns true if the NextLink is not empty.
36427func (vrplr VirtualRouterPeeringListResult) hasNextLink() bool {
36428	return vrplr.NextLink != nil && len(*vrplr.NextLink) != 0
36429}
36430
36431// virtualRouterPeeringListResultPreparer prepares a request to retrieve the next set of results.
36432// It returns nil if no more results exist.
36433func (vrplr VirtualRouterPeeringListResult) virtualRouterPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
36434	if !vrplr.hasNextLink() {
36435		return nil, nil
36436	}
36437	return autorest.Prepare((&http.Request{}).WithContext(ctx),
36438		autorest.AsJSON(),
36439		autorest.AsGet(),
36440		autorest.WithBaseURL(to.String(vrplr.NextLink)))
36441}
36442
36443// VirtualRouterPeeringListResultPage contains a page of VirtualRouterPeering values.
36444type VirtualRouterPeeringListResultPage struct {
36445	fn    func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error)
36446	vrplr VirtualRouterPeeringListResult
36447}
36448
36449// NextWithContext advances to the next page of values.  If there was an error making
36450// the request the page does not advance and the error is returned.
36451func (page *VirtualRouterPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
36452	if tracing.IsEnabled() {
36453		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringListResultPage.NextWithContext")
36454		defer func() {
36455			sc := -1
36456			if page.Response().Response.Response != nil {
36457				sc = page.Response().Response.Response.StatusCode
36458			}
36459			tracing.EndSpan(ctx, sc, err)
36460		}()
36461	}
36462	for {
36463		next, err := page.fn(ctx, page.vrplr)
36464		if err != nil {
36465			return err
36466		}
36467		page.vrplr = next
36468		if !next.hasNextLink() || !next.IsEmpty() {
36469			break
36470		}
36471	}
36472	return nil
36473}
36474
36475// Next advances to the next page of values.  If there was an error making
36476// the request the page does not advance and the error is returned.
36477// Deprecated: Use NextWithContext() instead.
36478func (page *VirtualRouterPeeringListResultPage) Next() error {
36479	return page.NextWithContext(context.Background())
36480}
36481
36482// NotDone returns true if the page enumeration should be started or is not yet complete.
36483func (page VirtualRouterPeeringListResultPage) NotDone() bool {
36484	return !page.vrplr.IsEmpty()
36485}
36486
36487// Response returns the raw server response from the last page request.
36488func (page VirtualRouterPeeringListResultPage) Response() VirtualRouterPeeringListResult {
36489	return page.vrplr
36490}
36491
36492// Values returns the slice of values for the current page or nil if there are no values.
36493func (page VirtualRouterPeeringListResultPage) Values() []VirtualRouterPeering {
36494	if page.vrplr.IsEmpty() {
36495		return nil
36496	}
36497	return *page.vrplr.Value
36498}
36499
36500// Creates a new instance of the VirtualRouterPeeringListResultPage type.
36501func NewVirtualRouterPeeringListResultPage(cur VirtualRouterPeeringListResult, getNextPage func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error)) VirtualRouterPeeringListResultPage {
36502	return VirtualRouterPeeringListResultPage{
36503		fn:    getNextPage,
36504		vrplr: cur,
36505	}
36506}
36507
36508// VirtualRouterPeeringProperties properties of the rule group.
36509type VirtualRouterPeeringProperties struct {
36510	// PeerAsn - Peer ASN.
36511	PeerAsn *int64 `json:"peerAsn,omitempty"`
36512	// PeerIP - Peer IP.
36513	PeerIP *string `json:"peerIp,omitempty"`
36514	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
36515	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36516}
36517
36518// MarshalJSON is the custom marshaler for VirtualRouterPeeringProperties.
36519func (vrpp VirtualRouterPeeringProperties) MarshalJSON() ([]byte, error) {
36520	objectMap := make(map[string]interface{})
36521	if vrpp.PeerAsn != nil {
36522		objectMap["peerAsn"] = vrpp.PeerAsn
36523	}
36524	if vrpp.PeerIP != nil {
36525		objectMap["peerIp"] = vrpp.PeerIP
36526	}
36527	return json.Marshal(objectMap)
36528}
36529
36530// VirtualRouterPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
36531// long-running operation.
36532type VirtualRouterPeeringsCreateOrUpdateFuture struct {
36533	azure.FutureAPI
36534	// Result returns the result of the asynchronous operation.
36535	// If the operation has not completed it will return an error.
36536	Result func(VirtualRouterPeeringsClient) (VirtualRouterPeering, error)
36537}
36538
36539// VirtualRouterPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
36540// long-running operation.
36541type VirtualRouterPeeringsDeleteFuture struct {
36542	azure.FutureAPI
36543	// Result returns the result of the asynchronous operation.
36544	// If the operation has not completed it will return an error.
36545	Result func(VirtualRouterPeeringsClient) (autorest.Response, error)
36546}
36547
36548// VirtualRouterPropertiesFormat virtual Router definition.
36549type VirtualRouterPropertiesFormat struct {
36550	// VirtualRouterAsn - VirtualRouter ASN.
36551	VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"`
36552	// VirtualRouterIps - VirtualRouter IPs.
36553	VirtualRouterIps *[]string `json:"virtualRouterIps,omitempty"`
36554	// HostedSubnet - The Subnet on which VirtualRouter is hosted.
36555	HostedSubnet *SubResource `json:"hostedSubnet,omitempty"`
36556	// HostedGateway - The Gateway on which VirtualRouter is hosted.
36557	HostedGateway *SubResource `json:"hostedGateway,omitempty"`
36558	// Peerings - READ-ONLY; List of references to VirtualRouterPeerings.
36559	Peerings *[]SubResource `json:"peerings,omitempty"`
36560	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
36561	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36562}
36563
36564// MarshalJSON is the custom marshaler for VirtualRouterPropertiesFormat.
36565func (vrpf VirtualRouterPropertiesFormat) MarshalJSON() ([]byte, error) {
36566	objectMap := make(map[string]interface{})
36567	if vrpf.VirtualRouterAsn != nil {
36568		objectMap["virtualRouterAsn"] = vrpf.VirtualRouterAsn
36569	}
36570	if vrpf.VirtualRouterIps != nil {
36571		objectMap["virtualRouterIps"] = vrpf.VirtualRouterIps
36572	}
36573	if vrpf.HostedSubnet != nil {
36574		objectMap["hostedSubnet"] = vrpf.HostedSubnet
36575	}
36576	if vrpf.HostedGateway != nil {
36577		objectMap["hostedGateway"] = vrpf.HostedGateway
36578	}
36579	return json.Marshal(objectMap)
36580}
36581
36582// VirtualRoutersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
36583// long-running operation.
36584type VirtualRoutersCreateOrUpdateFuture struct {
36585	azure.FutureAPI
36586	// Result returns the result of the asynchronous operation.
36587	// If the operation has not completed it will return an error.
36588	Result func(VirtualRoutersClient) (VirtualRouter, error)
36589}
36590
36591// VirtualRoutersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
36592// operation.
36593type VirtualRoutersDeleteFuture struct {
36594	azure.FutureAPI
36595	// Result returns the result of the asynchronous operation.
36596	// If the operation has not completed it will return an error.
36597	Result func(VirtualRoutersClient) (autorest.Response, error)
36598}
36599
36600// VirtualWAN virtualWAN Resource.
36601type VirtualWAN struct {
36602	autorest.Response `json:"-"`
36603	// VirtualWanProperties - Properties of the virtual WAN.
36604	*VirtualWanProperties `json:"properties,omitempty"`
36605	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
36606	Etag *string `json:"etag,omitempty"`
36607	// ID - Resource ID.
36608	ID *string `json:"id,omitempty"`
36609	// Name - READ-ONLY; Resource name.
36610	Name *string `json:"name,omitempty"`
36611	// Type - READ-ONLY; Resource type.
36612	Type *string `json:"type,omitempty"`
36613	// Location - Resource location.
36614	Location *string `json:"location,omitempty"`
36615	// Tags - Resource tags.
36616	Tags map[string]*string `json:"tags"`
36617}
36618
36619// MarshalJSON is the custom marshaler for VirtualWAN.
36620func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
36621	objectMap := make(map[string]interface{})
36622	if vw.VirtualWanProperties != nil {
36623		objectMap["properties"] = vw.VirtualWanProperties
36624	}
36625	if vw.ID != nil {
36626		objectMap["id"] = vw.ID
36627	}
36628	if vw.Location != nil {
36629		objectMap["location"] = vw.Location
36630	}
36631	if vw.Tags != nil {
36632		objectMap["tags"] = vw.Tags
36633	}
36634	return json.Marshal(objectMap)
36635}
36636
36637// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
36638func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
36639	var m map[string]*json.RawMessage
36640	err := json.Unmarshal(body, &m)
36641	if err != nil {
36642		return err
36643	}
36644	for k, v := range m {
36645		switch k {
36646		case "properties":
36647			if v != nil {
36648				var virtualWanProperties VirtualWanProperties
36649				err = json.Unmarshal(*v, &virtualWanProperties)
36650				if err != nil {
36651					return err
36652				}
36653				vw.VirtualWanProperties = &virtualWanProperties
36654			}
36655		case "etag":
36656			if v != nil {
36657				var etag string
36658				err = json.Unmarshal(*v, &etag)
36659				if err != nil {
36660					return err
36661				}
36662				vw.Etag = &etag
36663			}
36664		case "id":
36665			if v != nil {
36666				var ID string
36667				err = json.Unmarshal(*v, &ID)
36668				if err != nil {
36669					return err
36670				}
36671				vw.ID = &ID
36672			}
36673		case "name":
36674			if v != nil {
36675				var name string
36676				err = json.Unmarshal(*v, &name)
36677				if err != nil {
36678					return err
36679				}
36680				vw.Name = &name
36681			}
36682		case "type":
36683			if v != nil {
36684				var typeVar string
36685				err = json.Unmarshal(*v, &typeVar)
36686				if err != nil {
36687					return err
36688				}
36689				vw.Type = &typeVar
36690			}
36691		case "location":
36692			if v != nil {
36693				var location string
36694				err = json.Unmarshal(*v, &location)
36695				if err != nil {
36696					return err
36697				}
36698				vw.Location = &location
36699			}
36700		case "tags":
36701			if v != nil {
36702				var tags map[string]*string
36703				err = json.Unmarshal(*v, &tags)
36704				if err != nil {
36705					return err
36706				}
36707				vw.Tags = tags
36708			}
36709		}
36710	}
36711
36712	return nil
36713}
36714
36715// VirtualWanProperties parameters for VirtualWAN.
36716type VirtualWanProperties struct {
36717	// DisableVpnEncryption - Vpn encryption to be disabled or not.
36718	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
36719	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
36720	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
36721	// VpnSites - READ-ONLY; List of VpnSites in the VirtualWAN.
36722	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
36723	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
36724	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
36725	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
36726	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
36727	// Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone'
36728	Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"`
36729	// ProvisioningState - READ-ONLY; The provisioning state of the virtual WAN resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
36730	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36731	// Type - The type of the VirtualWAN.
36732	Type *string `json:"type,omitempty"`
36733}
36734
36735// MarshalJSON is the custom marshaler for VirtualWanProperties.
36736func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
36737	objectMap := make(map[string]interface{})
36738	if vwp.DisableVpnEncryption != nil {
36739		objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
36740	}
36741	if vwp.AllowBranchToBranchTraffic != nil {
36742		objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic
36743	}
36744	if vwp.AllowVnetToVnetTraffic != nil {
36745		objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic
36746	}
36747	if vwp.Office365LocalBreakoutCategory != "" {
36748		objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory
36749	}
36750	if vwp.Type != nil {
36751		objectMap["type"] = vwp.Type
36752	}
36753	return json.Marshal(objectMap)
36754}
36755
36756// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
36757// long-running operation.
36758type VirtualWansCreateOrUpdateFuture struct {
36759	azure.FutureAPI
36760	// Result returns the result of the asynchronous operation.
36761	// If the operation has not completed it will return an error.
36762	Result func(VirtualWansClient) (VirtualWAN, error)
36763}
36764
36765// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
36766// operation.
36767type VirtualWansDeleteFuture struct {
36768	azure.FutureAPI
36769	// Result returns the result of the asynchronous operation.
36770	// If the operation has not completed it will return an error.
36771	Result func(VirtualWansClient) (autorest.Response, error)
36772}
36773
36774// VirtualWanSecurityProvider collection of SecurityProviders.
36775type VirtualWanSecurityProvider struct {
36776	// Name - Name of the security provider.
36777	Name *string `json:"name,omitempty"`
36778	// URL - Url of the security provider.
36779	URL *string `json:"url,omitempty"`
36780	// Type - Name of the security provider. Possible values include: 'External', 'Native'
36781	Type VirtualWanSecurityProviderType `json:"type,omitempty"`
36782}
36783
36784// VirtualWanSecurityProviders collection of SecurityProviders.
36785type VirtualWanSecurityProviders struct {
36786	autorest.Response `json:"-"`
36787	// SupportedProviders - List of VirtualWAN security providers.
36788	SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"`
36789}
36790
36791// VirtualWanVpnProfileParameters virtual Wan Vpn profile parameters Vpn profile generation.
36792type VirtualWanVpnProfileParameters struct {
36793	// VpnServerConfigurationResourceID - VpnServerConfiguration partial resource uri with which VirtualWan is associated to.
36794	VpnServerConfigurationResourceID *string `json:"vpnServerConfigurationResourceId,omitempty"`
36795	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
36796	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
36797}
36798
36799// VM describes a Virtual Machine.
36800type VM struct {
36801	// ID - Resource ID.
36802	ID *string `json:"id,omitempty"`
36803	// Name - READ-ONLY; Resource name.
36804	Name *string `json:"name,omitempty"`
36805	// Type - READ-ONLY; Resource type.
36806	Type *string `json:"type,omitempty"`
36807	// Location - Resource location.
36808	Location *string `json:"location,omitempty"`
36809	// Tags - Resource tags.
36810	Tags map[string]*string `json:"tags"`
36811}
36812
36813// MarshalJSON is the custom marshaler for VM.
36814func (vVar VM) MarshalJSON() ([]byte, error) {
36815	objectMap := make(map[string]interface{})
36816	if vVar.ID != nil {
36817		objectMap["id"] = vVar.ID
36818	}
36819	if vVar.Location != nil {
36820		objectMap["location"] = vVar.Location
36821	}
36822	if vVar.Tags != nil {
36823		objectMap["tags"] = vVar.Tags
36824	}
36825	return json.Marshal(objectMap)
36826}
36827
36828// VnetRoute list of routes that control routing from VirtualHub into a virtual network connection.
36829type VnetRoute struct {
36830	// StaticRoutes - List of all Static Routes.
36831	StaticRoutes *[]StaticRoute `json:"staticRoutes,omitempty"`
36832}
36833
36834// VpnClientConfiguration vpnClientConfiguration for P2S client.
36835type VpnClientConfiguration struct {
36836	// VpnClientAddressPool - The reference to the address space resource which represents Address space for P2S VpnClient.
36837	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
36838	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
36839	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
36840	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
36841	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
36842	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
36843	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
36844	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
36845	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
36846	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
36847	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
36848	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
36849	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
36850	// RadiusServers - The radiusServers property for multiple radius server configuration.
36851	RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"`
36852	// AadTenant - The AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
36853	AadTenant *string `json:"aadTenant,omitempty"`
36854	// AadAudience - The AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
36855	AadAudience *string `json:"aadAudience,omitempty"`
36856	// AadIssuer - The AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
36857	AadIssuer *string `json:"aadIssuer,omitempty"`
36858}
36859
36860// VpnClientConnectionHealth vpnClientConnectionHealth properties.
36861type VpnClientConnectionHealth struct {
36862	// TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection.
36863	TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"`
36864	// TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection.
36865	TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"`
36866	// VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway.
36867	VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"`
36868	// AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients.
36869	AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"`
36870}
36871
36872// MarshalJSON is the custom marshaler for VpnClientConnectionHealth.
36873func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) {
36874	objectMap := make(map[string]interface{})
36875	if vcch.VpnClientConnectionsCount != nil {
36876		objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount
36877	}
36878	if vcch.AllocatedIPAddresses != nil {
36879		objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses
36880	}
36881	return json.Marshal(objectMap)
36882}
36883
36884// VpnClientConnectionHealthDetail VPN client connection health detail.
36885type VpnClientConnectionHealthDetail struct {
36886	// VpnConnectionID - READ-ONLY; The vpn client Id.
36887	VpnConnectionID *string `json:"vpnConnectionId,omitempty"`
36888	// VpnConnectionDuration - READ-ONLY; The duration time of a connected vpn client.
36889	VpnConnectionDuration *int64 `json:"vpnConnectionDuration,omitempty"`
36890	// VpnConnectionTime - READ-ONLY; The start time of a connected vpn client.
36891	VpnConnectionTime *string `json:"vpnConnectionTime,omitempty"`
36892	// PublicIPAddress - READ-ONLY; The public Ip of a connected vpn client.
36893	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
36894	// PrivateIPAddress - READ-ONLY; The assigned private Ip of a connected vpn client.
36895	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
36896	// VpnUserName - READ-ONLY; The user name of a connected vpn client.
36897	VpnUserName *string `json:"vpnUserName,omitempty"`
36898	// MaxBandwidth - READ-ONLY; The max band width.
36899	MaxBandwidth *int64 `json:"maxBandwidth,omitempty"`
36900	// EgressPacketsTransferred - READ-ONLY; The egress packets per second.
36901	EgressPacketsTransferred *int64 `json:"egressPacketsTransferred,omitempty"`
36902	// EgressBytesTransferred - READ-ONLY; The egress bytes per second.
36903	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
36904	// IngressPacketsTransferred - READ-ONLY; The ingress packets per second.
36905	IngressPacketsTransferred *int64 `json:"ingressPacketsTransferred,omitempty"`
36906	// IngressBytesTransferred - READ-ONLY; The ingress bytes per second.
36907	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
36908	// MaxPacketsPerSecond - READ-ONLY; The max packets transferred per second.
36909	MaxPacketsPerSecond *int64 `json:"maxPacketsPerSecond,omitempty"`
36910}
36911
36912// VpnClientConnectionHealthDetailListResult list of virtual network gateway vpn client connection health.
36913type VpnClientConnectionHealthDetailListResult struct {
36914	autorest.Response `json:"-"`
36915	// Value - List of vpn client connection health.
36916	Value *[]VpnClientConnectionHealthDetail `json:"value,omitempty"`
36917}
36918
36919// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
36920type VpnClientIPsecParameters struct {
36921	autorest.Response `json:"-"`
36922	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
36923	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
36924	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
36925	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
36926	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
36927	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
36928	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
36929	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
36930	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
36931	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
36932	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
36933	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
36934	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
36935	DhGroup DhGroup `json:"dhGroup,omitempty"`
36936	// 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'
36937	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
36938}
36939
36940// VpnClientParameters vpn Client Parameters for package generation.
36941type VpnClientParameters struct {
36942	// ProcessorArchitecture - VPN client Processor Architecture. Possible values include: 'Amd64', 'X86'
36943	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
36944	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
36945	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
36946	// 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.
36947	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
36948	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
36949	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
36950}
36951
36952// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
36953type VpnClientRevokedCertificate struct {
36954	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
36955	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
36956	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
36957	Name *string `json:"name,omitempty"`
36958	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
36959	Etag *string `json:"etag,omitempty"`
36960	// ID - Resource ID.
36961	ID *string `json:"id,omitempty"`
36962}
36963
36964// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
36965func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
36966	objectMap := make(map[string]interface{})
36967	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
36968		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
36969	}
36970	if vcrc.Name != nil {
36971		objectMap["name"] = vcrc.Name
36972	}
36973	if vcrc.ID != nil {
36974		objectMap["id"] = vcrc.ID
36975	}
36976	return json.Marshal(objectMap)
36977}
36978
36979// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
36980func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
36981	var m map[string]*json.RawMessage
36982	err := json.Unmarshal(body, &m)
36983	if err != nil {
36984		return err
36985	}
36986	for k, v := range m {
36987		switch k {
36988		case "properties":
36989			if v != nil {
36990				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
36991				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
36992				if err != nil {
36993					return err
36994				}
36995				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
36996			}
36997		case "name":
36998			if v != nil {
36999				var name string
37000				err = json.Unmarshal(*v, &name)
37001				if err != nil {
37002					return err
37003				}
37004				vcrc.Name = &name
37005			}
37006		case "etag":
37007			if v != nil {
37008				var etag string
37009				err = json.Unmarshal(*v, &etag)
37010				if err != nil {
37011					return err
37012				}
37013				vcrc.Etag = &etag
37014			}
37015		case "id":
37016			if v != nil {
37017				var ID string
37018				err = json.Unmarshal(*v, &ID)
37019				if err != nil {
37020					return err
37021				}
37022				vcrc.ID = &ID
37023			}
37024		}
37025	}
37026
37027	return nil
37028}
37029
37030// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
37031// network gateway.
37032type VpnClientRevokedCertificatePropertiesFormat struct {
37033	// Thumbprint - The revoked VPN client certificate thumbprint.
37034	Thumbprint *string `json:"thumbprint,omitempty"`
37035	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
37036	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
37037}
37038
37039// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
37040func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
37041	objectMap := make(map[string]interface{})
37042	if vcrcpf.Thumbprint != nil {
37043		objectMap["thumbprint"] = vcrcpf.Thumbprint
37044	}
37045	return json.Marshal(objectMap)
37046}
37047
37048// VpnClientRootCertificate VPN client root certificate of virtual network gateway.
37049type VpnClientRootCertificate struct {
37050	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
37051	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
37052	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
37053	Name *string `json:"name,omitempty"`
37054	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
37055	Etag *string `json:"etag,omitempty"`
37056	// ID - Resource ID.
37057	ID *string `json:"id,omitempty"`
37058}
37059
37060// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
37061func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
37062	objectMap := make(map[string]interface{})
37063	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
37064		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
37065	}
37066	if vcrc.Name != nil {
37067		objectMap["name"] = vcrc.Name
37068	}
37069	if vcrc.ID != nil {
37070		objectMap["id"] = vcrc.ID
37071	}
37072	return json.Marshal(objectMap)
37073}
37074
37075// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
37076func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
37077	var m map[string]*json.RawMessage
37078	err := json.Unmarshal(body, &m)
37079	if err != nil {
37080		return err
37081	}
37082	for k, v := range m {
37083		switch k {
37084		case "properties":
37085			if v != nil {
37086				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
37087				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
37088				if err != nil {
37089					return err
37090				}
37091				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
37092			}
37093		case "name":
37094			if v != nil {
37095				var name string
37096				err = json.Unmarshal(*v, &name)
37097				if err != nil {
37098					return err
37099				}
37100				vcrc.Name = &name
37101			}
37102		case "etag":
37103			if v != nil {
37104				var etag string
37105				err = json.Unmarshal(*v, &etag)
37106				if err != nil {
37107					return err
37108				}
37109				vcrc.Etag = &etag
37110			}
37111		case "id":
37112			if v != nil {
37113				var ID string
37114				err = json.Unmarshal(*v, &ID)
37115				if err != nil {
37116					return err
37117				}
37118				vcrc.ID = &ID
37119			}
37120		}
37121	}
37122
37123	return nil
37124}
37125
37126// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway.
37127type VpnClientRootCertificatePropertiesFormat struct {
37128	// PublicCertData - The certificate public data.
37129	PublicCertData *string `json:"publicCertData,omitempty"`
37130	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
37131	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
37132}
37133
37134// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
37135func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
37136	objectMap := make(map[string]interface{})
37137	if vcrcpf.PublicCertData != nil {
37138		objectMap["publicCertData"] = vcrcpf.PublicCertData
37139	}
37140	return json.Marshal(objectMap)
37141}
37142
37143// VpnConnection vpnConnection Resource.
37144type VpnConnection struct {
37145	autorest.Response `json:"-"`
37146	// VpnConnectionProperties - Properties of the VPN connection.
37147	*VpnConnectionProperties `json:"properties,omitempty"`
37148	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
37149	Name *string `json:"name,omitempty"`
37150	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
37151	Etag *string `json:"etag,omitempty"`
37152	// ID - Resource ID.
37153	ID *string `json:"id,omitempty"`
37154}
37155
37156// MarshalJSON is the custom marshaler for VpnConnection.
37157func (vc VpnConnection) MarshalJSON() ([]byte, error) {
37158	objectMap := make(map[string]interface{})
37159	if vc.VpnConnectionProperties != nil {
37160		objectMap["properties"] = vc.VpnConnectionProperties
37161	}
37162	if vc.Name != nil {
37163		objectMap["name"] = vc.Name
37164	}
37165	if vc.ID != nil {
37166		objectMap["id"] = vc.ID
37167	}
37168	return json.Marshal(objectMap)
37169}
37170
37171// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
37172func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
37173	var m map[string]*json.RawMessage
37174	err := json.Unmarshal(body, &m)
37175	if err != nil {
37176		return err
37177	}
37178	for k, v := range m {
37179		switch k {
37180		case "properties":
37181			if v != nil {
37182				var vpnConnectionProperties VpnConnectionProperties
37183				err = json.Unmarshal(*v, &vpnConnectionProperties)
37184				if err != nil {
37185					return err
37186				}
37187				vc.VpnConnectionProperties = &vpnConnectionProperties
37188			}
37189		case "name":
37190			if v != nil {
37191				var name string
37192				err = json.Unmarshal(*v, &name)
37193				if err != nil {
37194					return err
37195				}
37196				vc.Name = &name
37197			}
37198		case "etag":
37199			if v != nil {
37200				var etag string
37201				err = json.Unmarshal(*v, &etag)
37202				if err != nil {
37203					return err
37204				}
37205				vc.Etag = &etag
37206			}
37207		case "id":
37208			if v != nil {
37209				var ID string
37210				err = json.Unmarshal(*v, &ID)
37211				if err != nil {
37212					return err
37213				}
37214				vc.ID = &ID
37215			}
37216		}
37217	}
37218
37219	return nil
37220}
37221
37222// VpnConnectionProperties parameters for VpnConnection.
37223type VpnConnectionProperties struct {
37224	// RemoteVpnSite - Id of the connected vpn site.
37225	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
37226	// RoutingWeight - Routing weight for vpn connection.
37227	RoutingWeight *int32 `json:"routingWeight,omitempty"`
37228	// DpdTimeoutSeconds - The dead peer detection timeout for a vpn connection in seconds.
37229	DpdTimeoutSeconds *int32 `json:"dpdTimeoutSeconds,omitempty"`
37230	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
37231	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
37232	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
37233	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
37234	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
37235	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
37236	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
37237	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
37238	// ConnectionBandwidth - Expected bandwidth in MBPS.
37239	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
37240	// SharedKey - SharedKey for the vpn connection.
37241	SharedKey *string `json:"sharedKey,omitempty"`
37242	// EnableBgp - EnableBgp flag.
37243	EnableBgp *bool `json:"enableBgp,omitempty"`
37244	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
37245	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
37246	// IpsecPolicies - The IPSec Policies to be considered by this connection.
37247	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
37248	// EnableRateLimiting - EnableBgp flag.
37249	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
37250	// EnableInternetSecurity - Enable internet security.
37251	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
37252	// UseLocalAzureIPAddress - Use local azure ip to initiate connection.
37253	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
37254	// ProvisioningState - READ-ONLY; The provisioning state of the VPN connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
37255	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
37256	// VpnLinkConnections - List of all vpn site link connections to the gateway.
37257	VpnLinkConnections *[]VpnSiteLinkConnection `json:"vpnLinkConnections,omitempty"`
37258	// RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection.
37259	RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"`
37260}
37261
37262// MarshalJSON is the custom marshaler for VpnConnectionProperties.
37263func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
37264	objectMap := make(map[string]interface{})
37265	if vcp.RemoteVpnSite != nil {
37266		objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
37267	}
37268	if vcp.RoutingWeight != nil {
37269		objectMap["routingWeight"] = vcp.RoutingWeight
37270	}
37271	if vcp.DpdTimeoutSeconds != nil {
37272		objectMap["dpdTimeoutSeconds"] = vcp.DpdTimeoutSeconds
37273	}
37274	if vcp.ConnectionStatus != "" {
37275		objectMap["connectionStatus"] = vcp.ConnectionStatus
37276	}
37277	if vcp.VpnConnectionProtocolType != "" {
37278		objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType
37279	}
37280	if vcp.ConnectionBandwidth != nil {
37281		objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth
37282	}
37283	if vcp.SharedKey != nil {
37284		objectMap["sharedKey"] = vcp.SharedKey
37285	}
37286	if vcp.EnableBgp != nil {
37287		objectMap["enableBgp"] = vcp.EnableBgp
37288	}
37289	if vcp.UsePolicyBasedTrafficSelectors != nil {
37290		objectMap["usePolicyBasedTrafficSelectors"] = vcp.UsePolicyBasedTrafficSelectors
37291	}
37292	if vcp.IpsecPolicies != nil {
37293		objectMap["ipsecPolicies"] = vcp.IpsecPolicies
37294	}
37295	if vcp.EnableRateLimiting != nil {
37296		objectMap["enableRateLimiting"] = vcp.EnableRateLimiting
37297	}
37298	if vcp.EnableInternetSecurity != nil {
37299		objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity
37300	}
37301	if vcp.UseLocalAzureIPAddress != nil {
37302		objectMap["useLocalAzureIpAddress"] = vcp.UseLocalAzureIPAddress
37303	}
37304	if vcp.VpnLinkConnections != nil {
37305		objectMap["vpnLinkConnections"] = vcp.VpnLinkConnections
37306	}
37307	if vcp.RoutingConfiguration != nil {
37308		objectMap["routingConfiguration"] = vcp.RoutingConfiguration
37309	}
37310	return json.Marshal(objectMap)
37311}
37312
37313// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
37314// long-running operation.
37315type VpnConnectionsCreateOrUpdateFuture struct {
37316	azure.FutureAPI
37317	// Result returns the result of the asynchronous operation.
37318	// If the operation has not completed it will return an error.
37319	Result func(VpnConnectionsClient) (VpnConnection, error)
37320}
37321
37322// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
37323// operation.
37324type VpnConnectionsDeleteFuture struct {
37325	azure.FutureAPI
37326	// Result returns the result of the asynchronous operation.
37327	// If the operation has not completed it will return an error.
37328	Result func(VpnConnectionsClient) (autorest.Response, error)
37329}
37330
37331// VpnDeviceScriptParameters vpn device configuration script generation parameters.
37332type VpnDeviceScriptParameters struct {
37333	// Vendor - The vendor for the vpn device.
37334	Vendor *string `json:"vendor,omitempty"`
37335	// DeviceFamily - The device family for the vpn device.
37336	DeviceFamily *string `json:"deviceFamily,omitempty"`
37337	// FirmwareVersion - The firmware version for the vpn device.
37338	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
37339}
37340
37341// VpnGateway vpnGateway Resource.
37342type VpnGateway struct {
37343	autorest.Response `json:"-"`
37344	// VpnGatewayProperties - Properties of the VPN gateway.
37345	*VpnGatewayProperties `json:"properties,omitempty"`
37346	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
37347	Etag *string `json:"etag,omitempty"`
37348	// ID - Resource ID.
37349	ID *string `json:"id,omitempty"`
37350	// Name - READ-ONLY; Resource name.
37351	Name *string `json:"name,omitempty"`
37352	// Type - READ-ONLY; Resource type.
37353	Type *string `json:"type,omitempty"`
37354	// Location - Resource location.
37355	Location *string `json:"location,omitempty"`
37356	// Tags - Resource tags.
37357	Tags map[string]*string `json:"tags"`
37358}
37359
37360// MarshalJSON is the custom marshaler for VpnGateway.
37361func (vg VpnGateway) MarshalJSON() ([]byte, error) {
37362	objectMap := make(map[string]interface{})
37363	if vg.VpnGatewayProperties != nil {
37364		objectMap["properties"] = vg.VpnGatewayProperties
37365	}
37366	if vg.ID != nil {
37367		objectMap["id"] = vg.ID
37368	}
37369	if vg.Location != nil {
37370		objectMap["location"] = vg.Location
37371	}
37372	if vg.Tags != nil {
37373		objectMap["tags"] = vg.Tags
37374	}
37375	return json.Marshal(objectMap)
37376}
37377
37378// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
37379func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
37380	var m map[string]*json.RawMessage
37381	err := json.Unmarshal(body, &m)
37382	if err != nil {
37383		return err
37384	}
37385	for k, v := range m {
37386		switch k {
37387		case "properties":
37388			if v != nil {
37389				var vpnGatewayProperties VpnGatewayProperties
37390				err = json.Unmarshal(*v, &vpnGatewayProperties)
37391				if err != nil {
37392					return err
37393				}
37394				vg.VpnGatewayProperties = &vpnGatewayProperties
37395			}
37396		case "etag":
37397			if v != nil {
37398				var etag string
37399				err = json.Unmarshal(*v, &etag)
37400				if err != nil {
37401					return err
37402				}
37403				vg.Etag = &etag
37404			}
37405		case "id":
37406			if v != nil {
37407				var ID string
37408				err = json.Unmarshal(*v, &ID)
37409				if err != nil {
37410					return err
37411				}
37412				vg.ID = &ID
37413			}
37414		case "name":
37415			if v != nil {
37416				var name string
37417				err = json.Unmarshal(*v, &name)
37418				if err != nil {
37419					return err
37420				}
37421				vg.Name = &name
37422			}
37423		case "type":
37424			if v != nil {
37425				var typeVar string
37426				err = json.Unmarshal(*v, &typeVar)
37427				if err != nil {
37428					return err
37429				}
37430				vg.Type = &typeVar
37431			}
37432		case "location":
37433			if v != nil {
37434				var location string
37435				err = json.Unmarshal(*v, &location)
37436				if err != nil {
37437					return err
37438				}
37439				vg.Location = &location
37440			}
37441		case "tags":
37442			if v != nil {
37443				var tags map[string]*string
37444				err = json.Unmarshal(*v, &tags)
37445				if err != nil {
37446					return err
37447				}
37448				vg.Tags = tags
37449			}
37450		}
37451	}
37452
37453	return nil
37454}
37455
37456// VpnGatewayProperties parameters for VpnGateway.
37457type VpnGatewayProperties struct {
37458	// VirtualHub - The VirtualHub to which the gateway belongs.
37459	VirtualHub *SubResource `json:"virtualHub,omitempty"`
37460	// Connections - List of all vpn connections to the gateway.
37461	Connections *[]VpnConnection `json:"connections,omitempty"`
37462	// BgpSettings - Local network gateway's BGP speaker settings.
37463	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
37464	// ProvisioningState - READ-ONLY; The provisioning state of the VPN gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
37465	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
37466	// VpnGatewayScaleUnit - The scale unit for this vpn gateway.
37467	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
37468}
37469
37470// MarshalJSON is the custom marshaler for VpnGatewayProperties.
37471func (vgp VpnGatewayProperties) MarshalJSON() ([]byte, error) {
37472	objectMap := make(map[string]interface{})
37473	if vgp.VirtualHub != nil {
37474		objectMap["virtualHub"] = vgp.VirtualHub
37475	}
37476	if vgp.Connections != nil {
37477		objectMap["connections"] = vgp.Connections
37478	}
37479	if vgp.BgpSettings != nil {
37480		objectMap["bgpSettings"] = vgp.BgpSettings
37481	}
37482	if vgp.VpnGatewayScaleUnit != nil {
37483		objectMap["vpnGatewayScaleUnit"] = vgp.VpnGatewayScaleUnit
37484	}
37485	return json.Marshal(objectMap)
37486}
37487
37488// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
37489// long-running operation.
37490type VpnGatewaysCreateOrUpdateFuture struct {
37491	azure.FutureAPI
37492	// Result returns the result of the asynchronous operation.
37493	// If the operation has not completed it will return an error.
37494	Result func(VpnGatewaysClient) (VpnGateway, error)
37495}
37496
37497// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
37498// operation.
37499type VpnGatewaysDeleteFuture struct {
37500	azure.FutureAPI
37501	// Result returns the result of the asynchronous operation.
37502	// If the operation has not completed it will return an error.
37503	Result func(VpnGatewaysClient) (autorest.Response, error)
37504}
37505
37506// VpnGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running
37507// operation.
37508type VpnGatewaysResetFuture struct {
37509	azure.FutureAPI
37510	// Result returns the result of the asynchronous operation.
37511	// If the operation has not completed it will return an error.
37512	Result func(VpnGatewaysClient) (VpnGateway, error)
37513}
37514
37515// VpnLinkBgpSettings BGP settings details for a link.
37516type VpnLinkBgpSettings struct {
37517	// Asn - The BGP speaker's ASN.
37518	Asn *int64 `json:"asn,omitempty"`
37519	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
37520	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
37521}
37522
37523// VpnLinkProviderProperties list of properties of a link provider.
37524type VpnLinkProviderProperties struct {
37525	// LinkProviderName - Name of the link provider.
37526	LinkProviderName *string `json:"linkProviderName,omitempty"`
37527	// LinkSpeedInMbps - Link speed.
37528	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
37529}
37530
37531// VpnPacketCaptureStartParameters start packet capture parameters on virtual network gateway.
37532type VpnPacketCaptureStartParameters struct {
37533	// FilterData - Start Packet capture parameters.
37534	FilterData *string `json:"filterData,omitempty"`
37535}
37536
37537// VpnPacketCaptureStopParameters stop packet capture parameters.
37538type VpnPacketCaptureStopParameters struct {
37539	// SasURL - SAS url for packet capture on virtual network gateway.
37540	SasURL *string `json:"sasUrl,omitempty"`
37541}
37542
37543// VpnProfileResponse vpn Profile Response for package generation.
37544type VpnProfileResponse struct {
37545	autorest.Response `json:"-"`
37546	// ProfileURL - URL to the VPN profile.
37547	ProfileURL *string `json:"profileUrl,omitempty"`
37548}
37549
37550// VpnServerConfigRadiusClientRootCertificate properties of the Radius client root certificate of
37551// VpnServerConfiguration.
37552type VpnServerConfigRadiusClientRootCertificate struct {
37553	// Name - The certificate name.
37554	Name *string `json:"name,omitempty"`
37555	// Thumbprint - The Radius client root certificate thumbprint.
37556	Thumbprint *string `json:"thumbprint,omitempty"`
37557}
37558
37559// VpnServerConfigRadiusServerRootCertificate properties of Radius Server root certificate of
37560// VpnServerConfiguration.
37561type VpnServerConfigRadiusServerRootCertificate struct {
37562	// Name - The certificate name.
37563	Name *string `json:"name,omitempty"`
37564	// PublicCertData - The certificate public data.
37565	PublicCertData *string `json:"publicCertData,omitempty"`
37566}
37567
37568// VpnServerConfiguration vpnServerConfiguration Resource.
37569type VpnServerConfiguration struct {
37570	autorest.Response `json:"-"`
37571	// VpnServerConfigurationProperties - Properties of the P2SVpnServer configuration.
37572	*VpnServerConfigurationProperties `json:"properties,omitempty"`
37573	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
37574	Etag *string `json:"etag,omitempty"`
37575	// ID - Resource ID.
37576	ID *string `json:"id,omitempty"`
37577	// Name - READ-ONLY; Resource name.
37578	Name *string `json:"name,omitempty"`
37579	// Type - READ-ONLY; Resource type.
37580	Type *string `json:"type,omitempty"`
37581	// Location - Resource location.
37582	Location *string `json:"location,omitempty"`
37583	// Tags - Resource tags.
37584	Tags map[string]*string `json:"tags"`
37585}
37586
37587// MarshalJSON is the custom marshaler for VpnServerConfiguration.
37588func (vsc VpnServerConfiguration) MarshalJSON() ([]byte, error) {
37589	objectMap := make(map[string]interface{})
37590	if vsc.VpnServerConfigurationProperties != nil {
37591		objectMap["properties"] = vsc.VpnServerConfigurationProperties
37592	}
37593	if vsc.ID != nil {
37594		objectMap["id"] = vsc.ID
37595	}
37596	if vsc.Location != nil {
37597		objectMap["location"] = vsc.Location
37598	}
37599	if vsc.Tags != nil {
37600		objectMap["tags"] = vsc.Tags
37601	}
37602	return json.Marshal(objectMap)
37603}
37604
37605// UnmarshalJSON is the custom unmarshaler for VpnServerConfiguration struct.
37606func (vsc *VpnServerConfiguration) UnmarshalJSON(body []byte) error {
37607	var m map[string]*json.RawMessage
37608	err := json.Unmarshal(body, &m)
37609	if err != nil {
37610		return err
37611	}
37612	for k, v := range m {
37613		switch k {
37614		case "properties":
37615			if v != nil {
37616				var vpnServerConfigurationProperties VpnServerConfigurationProperties
37617				err = json.Unmarshal(*v, &vpnServerConfigurationProperties)
37618				if err != nil {
37619					return err
37620				}
37621				vsc.VpnServerConfigurationProperties = &vpnServerConfigurationProperties
37622			}
37623		case "etag":
37624			if v != nil {
37625				var etag string
37626				err = json.Unmarshal(*v, &etag)
37627				if err != nil {
37628					return err
37629				}
37630				vsc.Etag = &etag
37631			}
37632		case "id":
37633			if v != nil {
37634				var ID string
37635				err = json.Unmarshal(*v, &ID)
37636				if err != nil {
37637					return err
37638				}
37639				vsc.ID = &ID
37640			}
37641		case "name":
37642			if v != nil {
37643				var name string
37644				err = json.Unmarshal(*v, &name)
37645				if err != nil {
37646					return err
37647				}
37648				vsc.Name = &name
37649			}
37650		case "type":
37651			if v != nil {
37652				var typeVar string
37653				err = json.Unmarshal(*v, &typeVar)
37654				if err != nil {
37655					return err
37656				}
37657				vsc.Type = &typeVar
37658			}
37659		case "location":
37660			if v != nil {
37661				var location string
37662				err = json.Unmarshal(*v, &location)
37663				if err != nil {
37664					return err
37665				}
37666				vsc.Location = &location
37667			}
37668		case "tags":
37669			if v != nil {
37670				var tags map[string]*string
37671				err = json.Unmarshal(*v, &tags)
37672				if err != nil {
37673					return err
37674				}
37675				vsc.Tags = tags
37676			}
37677		}
37678	}
37679
37680	return nil
37681}
37682
37683// VpnServerConfigurationProperties parameters for VpnServerConfiguration.
37684type VpnServerConfigurationProperties struct {
37685	// Name - The name of the VpnServerConfiguration that is unique within a resource group.
37686	Name *string `json:"name,omitempty"`
37687	// VpnProtocols - VPN protocols for the VpnServerConfiguration.
37688	VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"`
37689	// VpnAuthenticationTypes - VPN authentication types for the VpnServerConfiguration.
37690	VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"`
37691	// VpnClientRootCertificates - VPN client root certificate of VpnServerConfiguration.
37692	VpnClientRootCertificates *[]VpnServerConfigVpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
37693	// VpnClientRevokedCertificates - VPN client revoked certificate of VpnServerConfiguration.
37694	VpnClientRevokedCertificates *[]VpnServerConfigVpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
37695	// RadiusServerRootCertificates - Radius Server root certificate of VpnServerConfiguration.
37696	RadiusServerRootCertificates *[]VpnServerConfigRadiusServerRootCertificate `json:"radiusServerRootCertificates,omitempty"`
37697	// RadiusClientRootCertificates - Radius client root certificate of VpnServerConfiguration.
37698	RadiusClientRootCertificates *[]VpnServerConfigRadiusClientRootCertificate `json:"radiusClientRootCertificates,omitempty"`
37699	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for VpnServerConfiguration.
37700	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
37701	// RadiusServerAddress - The radius server address property of the VpnServerConfiguration resource for point to site client connection.
37702	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
37703	// RadiusServerSecret - The radius secret property of the VpnServerConfiguration resource for point to site client connection.
37704	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
37705	// RadiusServers - Multiple Radius Server configuration for VpnServerConfiguration.
37706	RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"`
37707	// AadAuthenticationParameters - The set of aad vpn authentication parameters.
37708	AadAuthenticationParameters *AadAuthenticationParameters `json:"aadAuthenticationParameters,omitempty"`
37709	// ProvisioningState - READ-ONLY; The provisioning state of the VpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
37710	ProvisioningState *string `json:"provisioningState,omitempty"`
37711	// P2SVpnGateways - READ-ONLY; List of references to P2SVpnGateways.
37712	P2SVpnGateways *[]P2SVpnGateway `json:"p2SVpnGateways,omitempty"`
37713	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
37714	Etag *string `json:"etag,omitempty"`
37715}
37716
37717// MarshalJSON is the custom marshaler for VpnServerConfigurationProperties.
37718func (vscp VpnServerConfigurationProperties) MarshalJSON() ([]byte, error) {
37719	objectMap := make(map[string]interface{})
37720	if vscp.Name != nil {
37721		objectMap["name"] = vscp.Name
37722	}
37723	if vscp.VpnProtocols != nil {
37724		objectMap["vpnProtocols"] = vscp.VpnProtocols
37725	}
37726	if vscp.VpnAuthenticationTypes != nil {
37727		objectMap["vpnAuthenticationTypes"] = vscp.VpnAuthenticationTypes
37728	}
37729	if vscp.VpnClientRootCertificates != nil {
37730		objectMap["vpnClientRootCertificates"] = vscp.VpnClientRootCertificates
37731	}
37732	if vscp.VpnClientRevokedCertificates != nil {
37733		objectMap["vpnClientRevokedCertificates"] = vscp.VpnClientRevokedCertificates
37734	}
37735	if vscp.RadiusServerRootCertificates != nil {
37736		objectMap["radiusServerRootCertificates"] = vscp.RadiusServerRootCertificates
37737	}
37738	if vscp.RadiusClientRootCertificates != nil {
37739		objectMap["radiusClientRootCertificates"] = vscp.RadiusClientRootCertificates
37740	}
37741	if vscp.VpnClientIpsecPolicies != nil {
37742		objectMap["vpnClientIpsecPolicies"] = vscp.VpnClientIpsecPolicies
37743	}
37744	if vscp.RadiusServerAddress != nil {
37745		objectMap["radiusServerAddress"] = vscp.RadiusServerAddress
37746	}
37747	if vscp.RadiusServerSecret != nil {
37748		objectMap["radiusServerSecret"] = vscp.RadiusServerSecret
37749	}
37750	if vscp.RadiusServers != nil {
37751		objectMap["radiusServers"] = vscp.RadiusServers
37752	}
37753	if vscp.AadAuthenticationParameters != nil {
37754		objectMap["aadAuthenticationParameters"] = vscp.AadAuthenticationParameters
37755	}
37756	return json.Marshal(objectMap)
37757}
37758
37759// VpnServerConfigurationsAssociatedWithVirtualWanListFuture an abstraction for monitoring and retrieving
37760// the results of a long-running operation.
37761type VpnServerConfigurationsAssociatedWithVirtualWanListFuture struct {
37762	azure.FutureAPI
37763	// Result returns the result of the asynchronous operation.
37764	// If the operation has not completed it will return an error.
37765	Result func(VpnServerConfigurationsAssociatedWithVirtualWanClient) (VpnServerConfigurationsResponse, error)
37766}
37767
37768// VpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
37769// a long-running operation.
37770type VpnServerConfigurationsCreateOrUpdateFuture struct {
37771	azure.FutureAPI
37772	// Result returns the result of the asynchronous operation.
37773	// If the operation has not completed it will return an error.
37774	Result func(VpnServerConfigurationsClient) (VpnServerConfiguration, error)
37775}
37776
37777// VpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
37778// long-running operation.
37779type VpnServerConfigurationsDeleteFuture struct {
37780	azure.FutureAPI
37781	// Result returns the result of the asynchronous operation.
37782	// If the operation has not completed it will return an error.
37783	Result func(VpnServerConfigurationsClient) (autorest.Response, error)
37784}
37785
37786// VpnServerConfigurationsResponse vpnServerConfigurations list associated with VirtualWan Response.
37787type VpnServerConfigurationsResponse struct {
37788	autorest.Response `json:"-"`
37789	// VpnServerConfigurationResourceIds - List of VpnServerConfigurations associated with VirtualWan.
37790	VpnServerConfigurationResourceIds *[]string `json:"vpnServerConfigurationResourceIds,omitempty"`
37791}
37792
37793// VpnServerConfigVpnClientRevokedCertificate properties of the revoked VPN client certificate of
37794// VpnServerConfiguration.
37795type VpnServerConfigVpnClientRevokedCertificate struct {
37796	// Name - The certificate name.
37797	Name *string `json:"name,omitempty"`
37798	// Thumbprint - The revoked VPN client certificate thumbprint.
37799	Thumbprint *string `json:"thumbprint,omitempty"`
37800}
37801
37802// VpnServerConfigVpnClientRootCertificate properties of VPN client root certificate of
37803// VpnServerConfiguration.
37804type VpnServerConfigVpnClientRootCertificate struct {
37805	// Name - The certificate name.
37806	Name *string `json:"name,omitempty"`
37807	// PublicCertData - The certificate public data.
37808	PublicCertData *string `json:"publicCertData,omitempty"`
37809}
37810
37811// VpnSite vpnSite Resource.
37812type VpnSite struct {
37813	autorest.Response `json:"-"`
37814	// VpnSiteProperties - Properties of the VPN site.
37815	*VpnSiteProperties `json:"properties,omitempty"`
37816	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
37817	Etag *string `json:"etag,omitempty"`
37818	// ID - Resource ID.
37819	ID *string `json:"id,omitempty"`
37820	// Name - READ-ONLY; Resource name.
37821	Name *string `json:"name,omitempty"`
37822	// Type - READ-ONLY; Resource type.
37823	Type *string `json:"type,omitempty"`
37824	// Location - Resource location.
37825	Location *string `json:"location,omitempty"`
37826	// Tags - Resource tags.
37827	Tags map[string]*string `json:"tags"`
37828}
37829
37830// MarshalJSON is the custom marshaler for VpnSite.
37831func (vs VpnSite) MarshalJSON() ([]byte, error) {
37832	objectMap := make(map[string]interface{})
37833	if vs.VpnSiteProperties != nil {
37834		objectMap["properties"] = vs.VpnSiteProperties
37835	}
37836	if vs.ID != nil {
37837		objectMap["id"] = vs.ID
37838	}
37839	if vs.Location != nil {
37840		objectMap["location"] = vs.Location
37841	}
37842	if vs.Tags != nil {
37843		objectMap["tags"] = vs.Tags
37844	}
37845	return json.Marshal(objectMap)
37846}
37847
37848// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
37849func (vs *VpnSite) UnmarshalJSON(body []byte) error {
37850	var m map[string]*json.RawMessage
37851	err := json.Unmarshal(body, &m)
37852	if err != nil {
37853		return err
37854	}
37855	for k, v := range m {
37856		switch k {
37857		case "properties":
37858			if v != nil {
37859				var vpnSiteProperties VpnSiteProperties
37860				err = json.Unmarshal(*v, &vpnSiteProperties)
37861				if err != nil {
37862					return err
37863				}
37864				vs.VpnSiteProperties = &vpnSiteProperties
37865			}
37866		case "etag":
37867			if v != nil {
37868				var etag string
37869				err = json.Unmarshal(*v, &etag)
37870				if err != nil {
37871					return err
37872				}
37873				vs.Etag = &etag
37874			}
37875		case "id":
37876			if v != nil {
37877				var ID string
37878				err = json.Unmarshal(*v, &ID)
37879				if err != nil {
37880					return err
37881				}
37882				vs.ID = &ID
37883			}
37884		case "name":
37885			if v != nil {
37886				var name string
37887				err = json.Unmarshal(*v, &name)
37888				if err != nil {
37889					return err
37890				}
37891				vs.Name = &name
37892			}
37893		case "type":
37894			if v != nil {
37895				var typeVar string
37896				err = json.Unmarshal(*v, &typeVar)
37897				if err != nil {
37898					return err
37899				}
37900				vs.Type = &typeVar
37901			}
37902		case "location":
37903			if v != nil {
37904				var location string
37905				err = json.Unmarshal(*v, &location)
37906				if err != nil {
37907					return err
37908				}
37909				vs.Location = &location
37910			}
37911		case "tags":
37912			if v != nil {
37913				var tags map[string]*string
37914				err = json.Unmarshal(*v, &tags)
37915				if err != nil {
37916					return err
37917				}
37918				vs.Tags = tags
37919			}
37920		}
37921	}
37922
37923	return nil
37924}
37925
37926// VpnSiteID vpnSite Resource.
37927type VpnSiteID struct {
37928	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
37929	VpnSite *string `json:"vpnSite,omitempty"`
37930}
37931
37932// VpnSiteLink vpnSiteLink Resource.
37933type VpnSiteLink struct {
37934	autorest.Response `json:"-"`
37935	// VpnSiteLinkProperties - Properties of the VPN site link.
37936	*VpnSiteLinkProperties `json:"properties,omitempty"`
37937	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
37938	Etag *string `json:"etag,omitempty"`
37939	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
37940	Name *string `json:"name,omitempty"`
37941	// Type - READ-ONLY; Resource type.
37942	Type *string `json:"type,omitempty"`
37943	// ID - Resource ID.
37944	ID *string `json:"id,omitempty"`
37945}
37946
37947// MarshalJSON is the custom marshaler for VpnSiteLink.
37948func (vsl VpnSiteLink) MarshalJSON() ([]byte, error) {
37949	objectMap := make(map[string]interface{})
37950	if vsl.VpnSiteLinkProperties != nil {
37951		objectMap["properties"] = vsl.VpnSiteLinkProperties
37952	}
37953	if vsl.Name != nil {
37954		objectMap["name"] = vsl.Name
37955	}
37956	if vsl.ID != nil {
37957		objectMap["id"] = vsl.ID
37958	}
37959	return json.Marshal(objectMap)
37960}
37961
37962// UnmarshalJSON is the custom unmarshaler for VpnSiteLink struct.
37963func (vsl *VpnSiteLink) UnmarshalJSON(body []byte) error {
37964	var m map[string]*json.RawMessage
37965	err := json.Unmarshal(body, &m)
37966	if err != nil {
37967		return err
37968	}
37969	for k, v := range m {
37970		switch k {
37971		case "properties":
37972			if v != nil {
37973				var vpnSiteLinkProperties VpnSiteLinkProperties
37974				err = json.Unmarshal(*v, &vpnSiteLinkProperties)
37975				if err != nil {
37976					return err
37977				}
37978				vsl.VpnSiteLinkProperties = &vpnSiteLinkProperties
37979			}
37980		case "etag":
37981			if v != nil {
37982				var etag string
37983				err = json.Unmarshal(*v, &etag)
37984				if err != nil {
37985					return err
37986				}
37987				vsl.Etag = &etag
37988			}
37989		case "name":
37990			if v != nil {
37991				var name string
37992				err = json.Unmarshal(*v, &name)
37993				if err != nil {
37994					return err
37995				}
37996				vsl.Name = &name
37997			}
37998		case "type":
37999			if v != nil {
38000				var typeVar string
38001				err = json.Unmarshal(*v, &typeVar)
38002				if err != nil {
38003					return err
38004				}
38005				vsl.Type = &typeVar
38006			}
38007		case "id":
38008			if v != nil {
38009				var ID string
38010				err = json.Unmarshal(*v, &ID)
38011				if err != nil {
38012					return err
38013				}
38014				vsl.ID = &ID
38015			}
38016		}
38017	}
38018
38019	return nil
38020}
38021
38022// VpnSiteLinkConnection vpnSiteLinkConnection Resource.
38023type VpnSiteLinkConnection struct {
38024	autorest.Response `json:"-"`
38025	// VpnSiteLinkConnectionProperties - Properties of the VPN site link connection.
38026	*VpnSiteLinkConnectionProperties `json:"properties,omitempty"`
38027	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
38028	Name *string `json:"name,omitempty"`
38029	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
38030	Etag *string `json:"etag,omitempty"`
38031	// Type - READ-ONLY; Resource type.
38032	Type *string `json:"type,omitempty"`
38033	// ID - Resource ID.
38034	ID *string `json:"id,omitempty"`
38035}
38036
38037// MarshalJSON is the custom marshaler for VpnSiteLinkConnection.
38038func (vslc VpnSiteLinkConnection) MarshalJSON() ([]byte, error) {
38039	objectMap := make(map[string]interface{})
38040	if vslc.VpnSiteLinkConnectionProperties != nil {
38041		objectMap["properties"] = vslc.VpnSiteLinkConnectionProperties
38042	}
38043	if vslc.Name != nil {
38044		objectMap["name"] = vslc.Name
38045	}
38046	if vslc.ID != nil {
38047		objectMap["id"] = vslc.ID
38048	}
38049	return json.Marshal(objectMap)
38050}
38051
38052// UnmarshalJSON is the custom unmarshaler for VpnSiteLinkConnection struct.
38053func (vslc *VpnSiteLinkConnection) UnmarshalJSON(body []byte) error {
38054	var m map[string]*json.RawMessage
38055	err := json.Unmarshal(body, &m)
38056	if err != nil {
38057		return err
38058	}
38059	for k, v := range m {
38060		switch k {
38061		case "properties":
38062			if v != nil {
38063				var vpnSiteLinkConnectionProperties VpnSiteLinkConnectionProperties
38064				err = json.Unmarshal(*v, &vpnSiteLinkConnectionProperties)
38065				if err != nil {
38066					return err
38067				}
38068				vslc.VpnSiteLinkConnectionProperties = &vpnSiteLinkConnectionProperties
38069			}
38070		case "name":
38071			if v != nil {
38072				var name string
38073				err = json.Unmarshal(*v, &name)
38074				if err != nil {
38075					return err
38076				}
38077				vslc.Name = &name
38078			}
38079		case "etag":
38080			if v != nil {
38081				var etag string
38082				err = json.Unmarshal(*v, &etag)
38083				if err != nil {
38084					return err
38085				}
38086				vslc.Etag = &etag
38087			}
38088		case "type":
38089			if v != nil {
38090				var typeVar string
38091				err = json.Unmarshal(*v, &typeVar)
38092				if err != nil {
38093					return err
38094				}
38095				vslc.Type = &typeVar
38096			}
38097		case "id":
38098			if v != nil {
38099				var ID string
38100				err = json.Unmarshal(*v, &ID)
38101				if err != nil {
38102					return err
38103				}
38104				vslc.ID = &ID
38105			}
38106		}
38107	}
38108
38109	return nil
38110}
38111
38112// VpnSiteLinkConnectionProperties parameters for VpnConnection.
38113type VpnSiteLinkConnectionProperties struct {
38114	// VpnSiteLink - Id of the connected vpn site link.
38115	VpnSiteLink *SubResource `json:"vpnSiteLink,omitempty"`
38116	// RoutingWeight - Routing weight for vpn connection.
38117	RoutingWeight *int32 `json:"routingWeight,omitempty"`
38118	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
38119	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
38120	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
38121	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
38122	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
38123	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
38124	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
38125	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
38126	// ConnectionBandwidth - Expected bandwidth in MBPS.
38127	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
38128	// SharedKey - SharedKey for the vpn connection.
38129	SharedKey *string `json:"sharedKey,omitempty"`
38130	// EnableBgp - EnableBgp flag.
38131	EnableBgp *bool `json:"enableBgp,omitempty"`
38132	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
38133	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
38134	// IpsecPolicies - The IPSec Policies to be considered by this connection.
38135	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
38136	// EnableRateLimiting - EnableBgp flag.
38137	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
38138	// UseLocalAzureIPAddress - Use local azure ip to initiate connection.
38139	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
38140	// ProvisioningState - READ-ONLY; The provisioning state of the VPN site link connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
38141	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
38142}
38143
38144// MarshalJSON is the custom marshaler for VpnSiteLinkConnectionProperties.
38145func (vslcp VpnSiteLinkConnectionProperties) MarshalJSON() ([]byte, error) {
38146	objectMap := make(map[string]interface{})
38147	if vslcp.VpnSiteLink != nil {
38148		objectMap["vpnSiteLink"] = vslcp.VpnSiteLink
38149	}
38150	if vslcp.RoutingWeight != nil {
38151		objectMap["routingWeight"] = vslcp.RoutingWeight
38152	}
38153	if vslcp.ConnectionStatus != "" {
38154		objectMap["connectionStatus"] = vslcp.ConnectionStatus
38155	}
38156	if vslcp.VpnConnectionProtocolType != "" {
38157		objectMap["vpnConnectionProtocolType"] = vslcp.VpnConnectionProtocolType
38158	}
38159	if vslcp.ConnectionBandwidth != nil {
38160		objectMap["connectionBandwidth"] = vslcp.ConnectionBandwidth
38161	}
38162	if vslcp.SharedKey != nil {
38163		objectMap["sharedKey"] = vslcp.SharedKey
38164	}
38165	if vslcp.EnableBgp != nil {
38166		objectMap["enableBgp"] = vslcp.EnableBgp
38167	}
38168	if vslcp.UsePolicyBasedTrafficSelectors != nil {
38169		objectMap["usePolicyBasedTrafficSelectors"] = vslcp.UsePolicyBasedTrafficSelectors
38170	}
38171	if vslcp.IpsecPolicies != nil {
38172		objectMap["ipsecPolicies"] = vslcp.IpsecPolicies
38173	}
38174	if vslcp.EnableRateLimiting != nil {
38175		objectMap["enableRateLimiting"] = vslcp.EnableRateLimiting
38176	}
38177	if vslcp.UseLocalAzureIPAddress != nil {
38178		objectMap["useLocalAzureIpAddress"] = vslcp.UseLocalAzureIPAddress
38179	}
38180	return json.Marshal(objectMap)
38181}
38182
38183// VpnSiteLinkProperties parameters for VpnSite.
38184type VpnSiteLinkProperties struct {
38185	// LinkProperties - The link provider properties.
38186	LinkProperties *VpnLinkProviderProperties `json:"linkProperties,omitempty"`
38187	// IPAddress - The ip-address for the vpn-site-link.
38188	IPAddress *string `json:"ipAddress,omitempty"`
38189	// Fqdn - FQDN of vpn-site-link.
38190	Fqdn *string `json:"fqdn,omitempty"`
38191	// BgpProperties - The set of bgp properties.
38192	BgpProperties *VpnLinkBgpSettings `json:"bgpProperties,omitempty"`
38193	// ProvisioningState - READ-ONLY; The provisioning state of the VPN site link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
38194	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
38195}
38196
38197// MarshalJSON is the custom marshaler for VpnSiteLinkProperties.
38198func (vslp VpnSiteLinkProperties) MarshalJSON() ([]byte, error) {
38199	objectMap := make(map[string]interface{})
38200	if vslp.LinkProperties != nil {
38201		objectMap["linkProperties"] = vslp.LinkProperties
38202	}
38203	if vslp.IPAddress != nil {
38204		objectMap["ipAddress"] = vslp.IPAddress
38205	}
38206	if vslp.Fqdn != nil {
38207		objectMap["fqdn"] = vslp.Fqdn
38208	}
38209	if vslp.BgpProperties != nil {
38210		objectMap["bgpProperties"] = vslp.BgpProperties
38211	}
38212	return json.Marshal(objectMap)
38213}
38214
38215// VpnSiteProperties parameters for VpnSite.
38216type VpnSiteProperties struct {
38217	// VirtualWan - The VirtualWAN to which the vpnSite belongs.
38218	VirtualWan *SubResource `json:"virtualWan,omitempty"`
38219	// DeviceProperties - The device properties.
38220	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
38221	// IPAddress - The ip-address for the vpn-site.
38222	IPAddress *string `json:"ipAddress,omitempty"`
38223	// SiteKey - The key for vpn-site that can be used for connections.
38224	SiteKey *string `json:"siteKey,omitempty"`
38225	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
38226	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
38227	// BgpProperties - The set of bgp properties.
38228	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
38229	// ProvisioningState - READ-ONLY; The provisioning state of the VPN site resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
38230	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
38231	// IsSecuritySite - IsSecuritySite flag.
38232	IsSecuritySite *bool `json:"isSecuritySite,omitempty"`
38233	// VpnSiteLinks - List of all vpn site links.
38234	VpnSiteLinks *[]VpnSiteLink `json:"vpnSiteLinks,omitempty"`
38235}
38236
38237// MarshalJSON is the custom marshaler for VpnSiteProperties.
38238func (vsp VpnSiteProperties) MarshalJSON() ([]byte, error) {
38239	objectMap := make(map[string]interface{})
38240	if vsp.VirtualWan != nil {
38241		objectMap["virtualWan"] = vsp.VirtualWan
38242	}
38243	if vsp.DeviceProperties != nil {
38244		objectMap["deviceProperties"] = vsp.DeviceProperties
38245	}
38246	if vsp.IPAddress != nil {
38247		objectMap["ipAddress"] = vsp.IPAddress
38248	}
38249	if vsp.SiteKey != nil {
38250		objectMap["siteKey"] = vsp.SiteKey
38251	}
38252	if vsp.AddressSpace != nil {
38253		objectMap["addressSpace"] = vsp.AddressSpace
38254	}
38255	if vsp.BgpProperties != nil {
38256		objectMap["bgpProperties"] = vsp.BgpProperties
38257	}
38258	if vsp.IsSecuritySite != nil {
38259		objectMap["isSecuritySite"] = vsp.IsSecuritySite
38260	}
38261	if vsp.VpnSiteLinks != nil {
38262		objectMap["vpnSiteLinks"] = vsp.VpnSiteLinks
38263	}
38264	return json.Marshal(objectMap)
38265}
38266
38267// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
38268// long-running operation.
38269type VpnSitesConfigurationDownloadFuture struct {
38270	azure.FutureAPI
38271	// Result returns the result of the asynchronous operation.
38272	// If the operation has not completed it will return an error.
38273	Result func(VpnSitesConfigurationClient) (autorest.Response, error)
38274}
38275
38276// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
38277// operation.
38278type VpnSitesCreateOrUpdateFuture struct {
38279	azure.FutureAPI
38280	// Result returns the result of the asynchronous operation.
38281	// If the operation has not completed it will return an error.
38282	Result func(VpnSitesClient) (VpnSite, error)
38283}
38284
38285// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
38286// operation.
38287type VpnSitesDeleteFuture struct {
38288	azure.FutureAPI
38289	// Result returns the result of the asynchronous operation.
38290	// If the operation has not completed it will return an error.
38291	Result func(VpnSitesClient) (autorest.Response, error)
38292}
38293
38294// Watcher network watcher in a resource group.
38295type Watcher struct {
38296	autorest.Response `json:"-"`
38297	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
38298	Etag *string `json:"etag,omitempty"`
38299	// WatcherPropertiesFormat - Properties of the network watcher.
38300	*WatcherPropertiesFormat `json:"properties,omitempty"`
38301	// ID - Resource ID.
38302	ID *string `json:"id,omitempty"`
38303	// Name - READ-ONLY; Resource name.
38304	Name *string `json:"name,omitempty"`
38305	// Type - READ-ONLY; Resource type.
38306	Type *string `json:"type,omitempty"`
38307	// Location - Resource location.
38308	Location *string `json:"location,omitempty"`
38309	// Tags - Resource tags.
38310	Tags map[string]*string `json:"tags"`
38311}
38312
38313// MarshalJSON is the custom marshaler for Watcher.
38314func (w Watcher) MarshalJSON() ([]byte, error) {
38315	objectMap := make(map[string]interface{})
38316	if w.WatcherPropertiesFormat != nil {
38317		objectMap["properties"] = w.WatcherPropertiesFormat
38318	}
38319	if w.ID != nil {
38320		objectMap["id"] = w.ID
38321	}
38322	if w.Location != nil {
38323		objectMap["location"] = w.Location
38324	}
38325	if w.Tags != nil {
38326		objectMap["tags"] = w.Tags
38327	}
38328	return json.Marshal(objectMap)
38329}
38330
38331// UnmarshalJSON is the custom unmarshaler for Watcher struct.
38332func (w *Watcher) UnmarshalJSON(body []byte) error {
38333	var m map[string]*json.RawMessage
38334	err := json.Unmarshal(body, &m)
38335	if err != nil {
38336		return err
38337	}
38338	for k, v := range m {
38339		switch k {
38340		case "etag":
38341			if v != nil {
38342				var etag string
38343				err = json.Unmarshal(*v, &etag)
38344				if err != nil {
38345					return err
38346				}
38347				w.Etag = &etag
38348			}
38349		case "properties":
38350			if v != nil {
38351				var watcherPropertiesFormat WatcherPropertiesFormat
38352				err = json.Unmarshal(*v, &watcherPropertiesFormat)
38353				if err != nil {
38354					return err
38355				}
38356				w.WatcherPropertiesFormat = &watcherPropertiesFormat
38357			}
38358		case "id":
38359			if v != nil {
38360				var ID string
38361				err = json.Unmarshal(*v, &ID)
38362				if err != nil {
38363					return err
38364				}
38365				w.ID = &ID
38366			}
38367		case "name":
38368			if v != nil {
38369				var name string
38370				err = json.Unmarshal(*v, &name)
38371				if err != nil {
38372					return err
38373				}
38374				w.Name = &name
38375			}
38376		case "type":
38377			if v != nil {
38378				var typeVar string
38379				err = json.Unmarshal(*v, &typeVar)
38380				if err != nil {
38381					return err
38382				}
38383				w.Type = &typeVar
38384			}
38385		case "location":
38386			if v != nil {
38387				var location string
38388				err = json.Unmarshal(*v, &location)
38389				if err != nil {
38390					return err
38391				}
38392				w.Location = &location
38393			}
38394		case "tags":
38395			if v != nil {
38396				var tags map[string]*string
38397				err = json.Unmarshal(*v, &tags)
38398				if err != nil {
38399					return err
38400				}
38401				w.Tags = tags
38402			}
38403		}
38404	}
38405
38406	return nil
38407}
38408
38409// WatcherListResult response for ListNetworkWatchers API service call.
38410type WatcherListResult struct {
38411	autorest.Response `json:"-"`
38412	// Value - List of network watcher resources.
38413	Value *[]Watcher `json:"value,omitempty"`
38414}
38415
38416// WatcherPropertiesFormat the network watcher properties.
38417type WatcherPropertiesFormat struct {
38418	// ProvisioningState - READ-ONLY; The provisioning state of the network watcher resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
38419	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
38420}
38421
38422// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
38423// long-running operation.
38424type WatchersCheckConnectivityFuture struct {
38425	azure.FutureAPI
38426	// Result returns the result of the asynchronous operation.
38427	// If the operation has not completed it will return an error.
38428	Result func(WatchersClient) (ConnectivityInformation, error)
38429}
38430
38431// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
38432// operation.
38433type WatchersDeleteFuture struct {
38434	azure.FutureAPI
38435	// Result returns the result of the asynchronous operation.
38436	// If the operation has not completed it will return an error.
38437	Result func(WatchersClient) (autorest.Response, error)
38438}
38439
38440// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
38441// long-running operation.
38442type WatchersGetAzureReachabilityReportFuture struct {
38443	azure.FutureAPI
38444	// Result returns the result of the asynchronous operation.
38445	// If the operation has not completed it will return an error.
38446	Result func(WatchersClient) (AzureReachabilityReport, error)
38447}
38448
38449// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
38450// long-running operation.
38451type WatchersGetFlowLogStatusFuture struct {
38452	azure.FutureAPI
38453	// Result returns the result of the asynchronous operation.
38454	// If the operation has not completed it will return an error.
38455	Result func(WatchersClient) (FlowLogInformation, error)
38456}
38457
38458// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
38459// of a long-running operation.
38460type WatchersGetNetworkConfigurationDiagnosticFuture struct {
38461	azure.FutureAPI
38462	// Result returns the result of the asynchronous operation.
38463	// If the operation has not completed it will return an error.
38464	Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
38465}
38466
38467// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
38468// operation.
38469type WatchersGetNextHopFuture struct {
38470	azure.FutureAPI
38471	// Result returns the result of the asynchronous operation.
38472	// If the operation has not completed it will return an error.
38473	Result func(WatchersClient) (NextHopResult, error)
38474}
38475
38476// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
38477// long-running operation.
38478type WatchersGetTroubleshootingFuture struct {
38479	azure.FutureAPI
38480	// Result returns the result of the asynchronous operation.
38481	// If the operation has not completed it will return an error.
38482	Result func(WatchersClient) (TroubleshootingResult, error)
38483}
38484
38485// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
38486// long-running operation.
38487type WatchersGetTroubleshootingResultFuture struct {
38488	azure.FutureAPI
38489	// Result returns the result of the asynchronous operation.
38490	// If the operation has not completed it will return an error.
38491	Result func(WatchersClient) (TroubleshootingResult, error)
38492}
38493
38494// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
38495// long-running operation.
38496type WatchersGetVMSecurityRulesFuture struct {
38497	azure.FutureAPI
38498	// Result returns the result of the asynchronous operation.
38499	// If the operation has not completed it will return an error.
38500	Result func(WatchersClient) (SecurityGroupViewResult, error)
38501}
38502
38503// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
38504// long-running operation.
38505type WatchersListAvailableProvidersFuture struct {
38506	azure.FutureAPI
38507	// Result returns the result of the asynchronous operation.
38508	// If the operation has not completed it will return an error.
38509	Result func(WatchersClient) (AvailableProvidersList, error)
38510}
38511
38512// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
38513// long-running operation.
38514type WatchersSetFlowLogConfigurationFuture struct {
38515	azure.FutureAPI
38516	// Result returns the result of the asynchronous operation.
38517	// If the operation has not completed it will return an error.
38518	Result func(WatchersClient) (FlowLogInformation, error)
38519}
38520
38521// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
38522// operation.
38523type WatchersVerifyIPFlowFuture struct {
38524	azure.FutureAPI
38525	// Result returns the result of the asynchronous operation.
38526	// If the operation has not completed it will return an error.
38527	Result func(WatchersClient) (VerificationIPFlowResult, error)
38528}
38529
38530// WebApplicationFirewallCustomRule defines contents of a web application rule.
38531type WebApplicationFirewallCustomRule struct {
38532	// Name - The name of the resource that is unique within a policy. This name can be used to access the resource.
38533	Name *string `json:"name,omitempty"`
38534	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
38535	Etag *string `json:"etag,omitempty"`
38536	// Priority - Priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
38537	Priority *int32 `json:"priority,omitempty"`
38538	// RuleType - The rule type. Possible values include: 'WebApplicationFirewallRuleTypeMatchRule', 'WebApplicationFirewallRuleTypeInvalid'
38539	RuleType WebApplicationFirewallRuleType `json:"ruleType,omitempty"`
38540	// MatchConditions - List of match conditions.
38541	MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"`
38542	// Action - Type of Actions. Possible values include: 'WebApplicationFirewallActionAllow', 'WebApplicationFirewallActionBlock', 'WebApplicationFirewallActionLog'
38543	Action WebApplicationFirewallAction `json:"action,omitempty"`
38544}
38545
38546// MarshalJSON is the custom marshaler for WebApplicationFirewallCustomRule.
38547func (wafcr WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) {
38548	objectMap := make(map[string]interface{})
38549	if wafcr.Name != nil {
38550		objectMap["name"] = wafcr.Name
38551	}
38552	if wafcr.Priority != nil {
38553		objectMap["priority"] = wafcr.Priority
38554	}
38555	if wafcr.RuleType != "" {
38556		objectMap["ruleType"] = wafcr.RuleType
38557	}
38558	if wafcr.MatchConditions != nil {
38559		objectMap["matchConditions"] = wafcr.MatchConditions
38560	}
38561	if wafcr.Action != "" {
38562		objectMap["action"] = wafcr.Action
38563	}
38564	return json.Marshal(objectMap)
38565}
38566
38567// WebApplicationFirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
38568// long-running operation.
38569type WebApplicationFirewallPoliciesDeleteFuture struct {
38570	azure.FutureAPI
38571	// Result returns the result of the asynchronous operation.
38572	// If the operation has not completed it will return an error.
38573	Result func(WebApplicationFirewallPoliciesClient) (autorest.Response, error)
38574}
38575
38576// WebApplicationFirewallPolicy defines web application firewall policy.
38577type WebApplicationFirewallPolicy struct {
38578	autorest.Response `json:"-"`
38579	// WebApplicationFirewallPolicyPropertiesFormat - Properties of the web application firewall policy.
38580	*WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"`
38581	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
38582	Etag *string `json:"etag,omitempty"`
38583	// ID - Resource ID.
38584	ID *string `json:"id,omitempty"`
38585	// Name - READ-ONLY; Resource name.
38586	Name *string `json:"name,omitempty"`
38587	// Type - READ-ONLY; Resource type.
38588	Type *string `json:"type,omitempty"`
38589	// Location - Resource location.
38590	Location *string `json:"location,omitempty"`
38591	// Tags - Resource tags.
38592	Tags map[string]*string `json:"tags"`
38593}
38594
38595// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicy.
38596func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) {
38597	objectMap := make(map[string]interface{})
38598	if wafp.WebApplicationFirewallPolicyPropertiesFormat != nil {
38599		objectMap["properties"] = wafp.WebApplicationFirewallPolicyPropertiesFormat
38600	}
38601	if wafp.ID != nil {
38602		objectMap["id"] = wafp.ID
38603	}
38604	if wafp.Location != nil {
38605		objectMap["location"] = wafp.Location
38606	}
38607	if wafp.Tags != nil {
38608		objectMap["tags"] = wafp.Tags
38609	}
38610	return json.Marshal(objectMap)
38611}
38612
38613// UnmarshalJSON is the custom unmarshaler for WebApplicationFirewallPolicy struct.
38614func (wafp *WebApplicationFirewallPolicy) UnmarshalJSON(body []byte) error {
38615	var m map[string]*json.RawMessage
38616	err := json.Unmarshal(body, &m)
38617	if err != nil {
38618		return err
38619	}
38620	for k, v := range m {
38621		switch k {
38622		case "properties":
38623			if v != nil {
38624				var webApplicationFirewallPolicyPropertiesFormat WebApplicationFirewallPolicyPropertiesFormat
38625				err = json.Unmarshal(*v, &webApplicationFirewallPolicyPropertiesFormat)
38626				if err != nil {
38627					return err
38628				}
38629				wafp.WebApplicationFirewallPolicyPropertiesFormat = &webApplicationFirewallPolicyPropertiesFormat
38630			}
38631		case "etag":
38632			if v != nil {
38633				var etag string
38634				err = json.Unmarshal(*v, &etag)
38635				if err != nil {
38636					return err
38637				}
38638				wafp.Etag = &etag
38639			}
38640		case "id":
38641			if v != nil {
38642				var ID string
38643				err = json.Unmarshal(*v, &ID)
38644				if err != nil {
38645					return err
38646				}
38647				wafp.ID = &ID
38648			}
38649		case "name":
38650			if v != nil {
38651				var name string
38652				err = json.Unmarshal(*v, &name)
38653				if err != nil {
38654					return err
38655				}
38656				wafp.Name = &name
38657			}
38658		case "type":
38659			if v != nil {
38660				var typeVar string
38661				err = json.Unmarshal(*v, &typeVar)
38662				if err != nil {
38663					return err
38664				}
38665				wafp.Type = &typeVar
38666			}
38667		case "location":
38668			if v != nil {
38669				var location string
38670				err = json.Unmarshal(*v, &location)
38671				if err != nil {
38672					return err
38673				}
38674				wafp.Location = &location
38675			}
38676		case "tags":
38677			if v != nil {
38678				var tags map[string]*string
38679				err = json.Unmarshal(*v, &tags)
38680				if err != nil {
38681					return err
38682				}
38683				wafp.Tags = tags
38684			}
38685		}
38686	}
38687
38688	return nil
38689}
38690
38691// WebApplicationFirewallPolicyListResult result of the request to list WebApplicationFirewallPolicies. It
38692// contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results.
38693type WebApplicationFirewallPolicyListResult struct {
38694	autorest.Response `json:"-"`
38695	// Value - READ-ONLY; List of WebApplicationFirewallPolicies within a resource group.
38696	Value *[]WebApplicationFirewallPolicy `json:"value,omitempty"`
38697	// NextLink - READ-ONLY; URL to get the next set of WebApplicationFirewallPolicy objects if there are any.
38698	NextLink *string `json:"nextLink,omitempty"`
38699}
38700
38701// WebApplicationFirewallPolicyListResultIterator provides access to a complete listing of
38702// WebApplicationFirewallPolicy values.
38703type WebApplicationFirewallPolicyListResultIterator struct {
38704	i    int
38705	page WebApplicationFirewallPolicyListResultPage
38706}
38707
38708// NextWithContext advances to the next value.  If there was an error making
38709// the request the iterator does not advance and the error is returned.
38710func (iter *WebApplicationFirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
38711	if tracing.IsEnabled() {
38712		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultIterator.NextWithContext")
38713		defer func() {
38714			sc := -1
38715			if iter.Response().Response.Response != nil {
38716				sc = iter.Response().Response.Response.StatusCode
38717			}
38718			tracing.EndSpan(ctx, sc, err)
38719		}()
38720	}
38721	iter.i++
38722	if iter.i < len(iter.page.Values()) {
38723		return nil
38724	}
38725	err = iter.page.NextWithContext(ctx)
38726	if err != nil {
38727		iter.i--
38728		return err
38729	}
38730	iter.i = 0
38731	return nil
38732}
38733
38734// Next advances to the next value.  If there was an error making
38735// the request the iterator does not advance and the error is returned.
38736// Deprecated: Use NextWithContext() instead.
38737func (iter *WebApplicationFirewallPolicyListResultIterator) Next() error {
38738	return iter.NextWithContext(context.Background())
38739}
38740
38741// NotDone returns true if the enumeration should be started or is not yet complete.
38742func (iter WebApplicationFirewallPolicyListResultIterator) NotDone() bool {
38743	return iter.page.NotDone() && iter.i < len(iter.page.Values())
38744}
38745
38746// Response returns the raw server response from the last page request.
38747func (iter WebApplicationFirewallPolicyListResultIterator) Response() WebApplicationFirewallPolicyListResult {
38748	return iter.page.Response()
38749}
38750
38751// Value returns the current value or a zero-initialized value if the
38752// iterator has advanced beyond the end of the collection.
38753func (iter WebApplicationFirewallPolicyListResultIterator) Value() WebApplicationFirewallPolicy {
38754	if !iter.page.NotDone() {
38755		return WebApplicationFirewallPolicy{}
38756	}
38757	return iter.page.Values()[iter.i]
38758}
38759
38760// Creates a new instance of the WebApplicationFirewallPolicyListResultIterator type.
38761func NewWebApplicationFirewallPolicyListResultIterator(page WebApplicationFirewallPolicyListResultPage) WebApplicationFirewallPolicyListResultIterator {
38762	return WebApplicationFirewallPolicyListResultIterator{page: page}
38763}
38764
38765// IsEmpty returns true if the ListResult contains no values.
38766func (wafplr WebApplicationFirewallPolicyListResult) IsEmpty() bool {
38767	return wafplr.Value == nil || len(*wafplr.Value) == 0
38768}
38769
38770// hasNextLink returns true if the NextLink is not empty.
38771func (wafplr WebApplicationFirewallPolicyListResult) hasNextLink() bool {
38772	return wafplr.NextLink != nil && len(*wafplr.NextLink) != 0
38773}
38774
38775// webApplicationFirewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
38776// It returns nil if no more results exist.
38777func (wafplr WebApplicationFirewallPolicyListResult) webApplicationFirewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
38778	if !wafplr.hasNextLink() {
38779		return nil, nil
38780	}
38781	return autorest.Prepare((&http.Request{}).WithContext(ctx),
38782		autorest.AsJSON(),
38783		autorest.AsGet(),
38784		autorest.WithBaseURL(to.String(wafplr.NextLink)))
38785}
38786
38787// WebApplicationFirewallPolicyListResultPage contains a page of WebApplicationFirewallPolicy values.
38788type WebApplicationFirewallPolicyListResultPage struct {
38789	fn     func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)
38790	wafplr WebApplicationFirewallPolicyListResult
38791}
38792
38793// NextWithContext advances to the next page of values.  If there was an error making
38794// the request the page does not advance and the error is returned.
38795func (page *WebApplicationFirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
38796	if tracing.IsEnabled() {
38797		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultPage.NextWithContext")
38798		defer func() {
38799			sc := -1
38800			if page.Response().Response.Response != nil {
38801				sc = page.Response().Response.Response.StatusCode
38802			}
38803			tracing.EndSpan(ctx, sc, err)
38804		}()
38805	}
38806	for {
38807		next, err := page.fn(ctx, page.wafplr)
38808		if err != nil {
38809			return err
38810		}
38811		page.wafplr = next
38812		if !next.hasNextLink() || !next.IsEmpty() {
38813			break
38814		}
38815	}
38816	return nil
38817}
38818
38819// Next advances to the next page of values.  If there was an error making
38820// the request the page does not advance and the error is returned.
38821// Deprecated: Use NextWithContext() instead.
38822func (page *WebApplicationFirewallPolicyListResultPage) Next() error {
38823	return page.NextWithContext(context.Background())
38824}
38825
38826// NotDone returns true if the page enumeration should be started or is not yet complete.
38827func (page WebApplicationFirewallPolicyListResultPage) NotDone() bool {
38828	return !page.wafplr.IsEmpty()
38829}
38830
38831// Response returns the raw server response from the last page request.
38832func (page WebApplicationFirewallPolicyListResultPage) Response() WebApplicationFirewallPolicyListResult {
38833	return page.wafplr
38834}
38835
38836// Values returns the slice of values for the current page or nil if there are no values.
38837func (page WebApplicationFirewallPolicyListResultPage) Values() []WebApplicationFirewallPolicy {
38838	if page.wafplr.IsEmpty() {
38839		return nil
38840	}
38841	return *page.wafplr.Value
38842}
38843
38844// Creates a new instance of the WebApplicationFirewallPolicyListResultPage type.
38845func NewWebApplicationFirewallPolicyListResultPage(cur WebApplicationFirewallPolicyListResult, getNextPage func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)) WebApplicationFirewallPolicyListResultPage {
38846	return WebApplicationFirewallPolicyListResultPage{
38847		fn:     getNextPage,
38848		wafplr: cur,
38849	}
38850}
38851
38852// WebApplicationFirewallPolicyPropertiesFormat defines web application firewall policy properties.
38853type WebApplicationFirewallPolicyPropertiesFormat struct {
38854	// PolicySettings - The PolicySettings for policy.
38855	PolicySettings *PolicySettings `json:"policySettings,omitempty"`
38856	// CustomRules - The custom rules inside the policy.
38857	CustomRules *[]WebApplicationFirewallCustomRule `json:"customRules,omitempty"`
38858	// ApplicationGateways - READ-ONLY; A collection of references to application gateways.
38859	ApplicationGateways *[]ApplicationGateway `json:"applicationGateways,omitempty"`
38860	// ProvisioningState - READ-ONLY; The provisioning state of the web application firewall policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
38861	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
38862	// ResourceState - READ-ONLY; Resource status of the policy. Possible values include: 'WebApplicationFirewallPolicyResourceStateCreating', 'WebApplicationFirewallPolicyResourceStateEnabling', 'WebApplicationFirewallPolicyResourceStateEnabled', 'WebApplicationFirewallPolicyResourceStateDisabling', 'WebApplicationFirewallPolicyResourceStateDisabled', 'WebApplicationFirewallPolicyResourceStateDeleting'
38863	ResourceState WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"`
38864	// ManagedRules - Describes the managedRules structure.
38865	ManagedRules *ManagedRulesDefinition `json:"managedRules,omitempty"`
38866	// HTTPListeners - READ-ONLY; A collection of references to application gateway http listeners.
38867	HTTPListeners *[]SubResource `json:"httpListeners,omitempty"`
38868	// PathBasedRules - READ-ONLY; A collection of references to application gateway path rules.
38869	PathBasedRules *[]SubResource `json:"pathBasedRules,omitempty"`
38870}
38871
38872// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyPropertiesFormat.
38873func (wafppf WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
38874	objectMap := make(map[string]interface{})
38875	if wafppf.PolicySettings != nil {
38876		objectMap["policySettings"] = wafppf.PolicySettings
38877	}
38878	if wafppf.CustomRules != nil {
38879		objectMap["customRules"] = wafppf.CustomRules
38880	}
38881	if wafppf.ManagedRules != nil {
38882		objectMap["managedRules"] = wafppf.ManagedRules
38883	}
38884	return json.Marshal(objectMap)
38885}
38886