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-03-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	// ProvisioningState - READ-ONLY; The provisioning state of the frontend IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1211	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1212}
1213
1214// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfigurationPropertiesFormat.
1215func (agficpf ApplicationGatewayFrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
1216	objectMap := make(map[string]interface{})
1217	if agficpf.PrivateIPAddress != nil {
1218		objectMap["privateIPAddress"] = agficpf.PrivateIPAddress
1219	}
1220	if agficpf.PrivateIPAllocationMethod != "" {
1221		objectMap["privateIPAllocationMethod"] = agficpf.PrivateIPAllocationMethod
1222	}
1223	if agficpf.Subnet != nil {
1224		objectMap["subnet"] = agficpf.Subnet
1225	}
1226	if agficpf.PublicIPAddress != nil {
1227		objectMap["publicIPAddress"] = agficpf.PublicIPAddress
1228	}
1229	return json.Marshal(objectMap)
1230}
1231
1232// ApplicationGatewayFrontendPort frontend port of an application gateway.
1233type ApplicationGatewayFrontendPort struct {
1234	// ApplicationGatewayFrontendPortPropertiesFormat - Properties of the application gateway frontend port.
1235	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
1236	// Name - Name of the frontend port that is unique within an Application Gateway.
1237	Name *string `json:"name,omitempty"`
1238	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1239	Etag *string `json:"etag,omitempty"`
1240	// Type - READ-ONLY; Type of the resource.
1241	Type *string `json:"type,omitempty"`
1242	// ID - Resource ID.
1243	ID *string `json:"id,omitempty"`
1244}
1245
1246// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
1247func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
1248	objectMap := make(map[string]interface{})
1249	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
1250		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
1251	}
1252	if agfp.Name != nil {
1253		objectMap["name"] = agfp.Name
1254	}
1255	if agfp.ID != nil {
1256		objectMap["id"] = agfp.ID
1257	}
1258	return json.Marshal(objectMap)
1259}
1260
1261// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
1262func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
1263	var m map[string]*json.RawMessage
1264	err := json.Unmarshal(body, &m)
1265	if err != nil {
1266		return err
1267	}
1268	for k, v := range m {
1269		switch k {
1270		case "properties":
1271			if v != nil {
1272				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
1273				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
1274				if err != nil {
1275					return err
1276				}
1277				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
1278			}
1279		case "name":
1280			if v != nil {
1281				var name string
1282				err = json.Unmarshal(*v, &name)
1283				if err != nil {
1284					return err
1285				}
1286				agfp.Name = &name
1287			}
1288		case "etag":
1289			if v != nil {
1290				var etag string
1291				err = json.Unmarshal(*v, &etag)
1292				if err != nil {
1293					return err
1294				}
1295				agfp.Etag = &etag
1296			}
1297		case "type":
1298			if v != nil {
1299				var typeVar string
1300				err = json.Unmarshal(*v, &typeVar)
1301				if err != nil {
1302					return err
1303				}
1304				agfp.Type = &typeVar
1305			}
1306		case "id":
1307			if v != nil {
1308				var ID string
1309				err = json.Unmarshal(*v, &ID)
1310				if err != nil {
1311					return err
1312				}
1313				agfp.ID = &ID
1314			}
1315		}
1316	}
1317
1318	return nil
1319}
1320
1321// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1322type ApplicationGatewayFrontendPortPropertiesFormat struct {
1323	// Port - Frontend port.
1324	Port *int32 `json:"port,omitempty"`
1325	// ProvisioningState - READ-ONLY; The provisioning state of the frontend port resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1326	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1327}
1328
1329// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPortPropertiesFormat.
1330func (agfppf ApplicationGatewayFrontendPortPropertiesFormat) MarshalJSON() ([]byte, error) {
1331	objectMap := make(map[string]interface{})
1332	if agfppf.Port != nil {
1333		objectMap["port"] = agfppf.Port
1334	}
1335	return json.Marshal(objectMap)
1336}
1337
1338// ApplicationGatewayHeaderConfiguration header configuration of the Actions set in Application Gateway.
1339type ApplicationGatewayHeaderConfiguration struct {
1340	// HeaderName - Header name of the header configuration.
1341	HeaderName *string `json:"headerName,omitempty"`
1342	// HeaderValue - Header value of the header configuration.
1343	HeaderValue *string `json:"headerValue,omitempty"`
1344}
1345
1346// ApplicationGatewayHTTPListener http listener of an application gateway.
1347type ApplicationGatewayHTTPListener struct {
1348	// ApplicationGatewayHTTPListenerPropertiesFormat - Properties of the application gateway HTTP listener.
1349	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1350	// Name - Name of the HTTP listener that is unique within an Application Gateway.
1351	Name *string `json:"name,omitempty"`
1352	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1353	Etag *string `json:"etag,omitempty"`
1354	// Type - READ-ONLY; Type of the resource.
1355	Type *string `json:"type,omitempty"`
1356	// ID - Resource ID.
1357	ID *string `json:"id,omitempty"`
1358}
1359
1360// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
1361func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1362	objectMap := make(map[string]interface{})
1363	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1364		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1365	}
1366	if aghl.Name != nil {
1367		objectMap["name"] = aghl.Name
1368	}
1369	if aghl.ID != nil {
1370		objectMap["id"] = aghl.ID
1371	}
1372	return json.Marshal(objectMap)
1373}
1374
1375// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1376func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1377	var m map[string]*json.RawMessage
1378	err := json.Unmarshal(body, &m)
1379	if err != nil {
1380		return err
1381	}
1382	for k, v := range m {
1383		switch k {
1384		case "properties":
1385			if v != nil {
1386				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1387				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1388				if err != nil {
1389					return err
1390				}
1391				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1392			}
1393		case "name":
1394			if v != nil {
1395				var name string
1396				err = json.Unmarshal(*v, &name)
1397				if err != nil {
1398					return err
1399				}
1400				aghl.Name = &name
1401			}
1402		case "etag":
1403			if v != nil {
1404				var etag string
1405				err = json.Unmarshal(*v, &etag)
1406				if err != nil {
1407					return err
1408				}
1409				aghl.Etag = &etag
1410			}
1411		case "type":
1412			if v != nil {
1413				var typeVar string
1414				err = json.Unmarshal(*v, &typeVar)
1415				if err != nil {
1416					return err
1417				}
1418				aghl.Type = &typeVar
1419			}
1420		case "id":
1421			if v != nil {
1422				var ID string
1423				err = json.Unmarshal(*v, &ID)
1424				if err != nil {
1425					return err
1426				}
1427				aghl.ID = &ID
1428			}
1429		}
1430	}
1431
1432	return nil
1433}
1434
1435// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1436type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1437	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1438	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1439	// FrontendPort - Frontend port resource of an application gateway.
1440	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1441	// Protocol - Protocol of the HTTP listener. Possible values include: 'HTTP', 'HTTPS'
1442	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1443	// HostName - Host name of HTTP listener.
1444	HostName *string `json:"hostName,omitempty"`
1445	// SslCertificate - SSL certificate resource of an application gateway.
1446	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1447	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1448	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1449	// ProvisioningState - READ-ONLY; The provisioning state of the HTTP listener resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1450	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1451	// CustomErrorConfigurations - Custom error configurations of the HTTP listener.
1452	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1453	// FirewallPolicy - Reference to the FirewallPolicy resource.
1454	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
1455	// HostNames - List of Host names for HTTP Listener that allows special wildcard characters as well.
1456	HostNames *[]string `json:"hostNames,omitempty"`
1457}
1458
1459// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListenerPropertiesFormat.
1460func (aghlpf ApplicationGatewayHTTPListenerPropertiesFormat) MarshalJSON() ([]byte, error) {
1461	objectMap := make(map[string]interface{})
1462	if aghlpf.FrontendIPConfiguration != nil {
1463		objectMap["frontendIPConfiguration"] = aghlpf.FrontendIPConfiguration
1464	}
1465	if aghlpf.FrontendPort != nil {
1466		objectMap["frontendPort"] = aghlpf.FrontendPort
1467	}
1468	if aghlpf.Protocol != "" {
1469		objectMap["protocol"] = aghlpf.Protocol
1470	}
1471	if aghlpf.HostName != nil {
1472		objectMap["hostName"] = aghlpf.HostName
1473	}
1474	if aghlpf.SslCertificate != nil {
1475		objectMap["sslCertificate"] = aghlpf.SslCertificate
1476	}
1477	if aghlpf.RequireServerNameIndication != nil {
1478		objectMap["requireServerNameIndication"] = aghlpf.RequireServerNameIndication
1479	}
1480	if aghlpf.CustomErrorConfigurations != nil {
1481		objectMap["customErrorConfigurations"] = aghlpf.CustomErrorConfigurations
1482	}
1483	if aghlpf.FirewallPolicy != nil {
1484		objectMap["firewallPolicy"] = aghlpf.FirewallPolicy
1485	}
1486	if aghlpf.HostNames != nil {
1487		objectMap["hostNames"] = aghlpf.HostNames
1488	}
1489	return json.Marshal(objectMap)
1490}
1491
1492// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
1493// private IP configuration is allowed.
1494type ApplicationGatewayIPConfiguration struct {
1495	// ApplicationGatewayIPConfigurationPropertiesFormat - Properties of the application gateway IP configuration.
1496	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1497	// Name - Name of the IP configuration that is unique within an Application Gateway.
1498	Name *string `json:"name,omitempty"`
1499	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1500	Etag *string `json:"etag,omitempty"`
1501	// Type - READ-ONLY; Type of the resource.
1502	Type *string `json:"type,omitempty"`
1503	// ID - Resource ID.
1504	ID *string `json:"id,omitempty"`
1505}
1506
1507// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1508func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1509	objectMap := make(map[string]interface{})
1510	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1511		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1512	}
1513	if agic.Name != nil {
1514		objectMap["name"] = agic.Name
1515	}
1516	if agic.ID != nil {
1517		objectMap["id"] = agic.ID
1518	}
1519	return json.Marshal(objectMap)
1520}
1521
1522// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1523func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1524	var m map[string]*json.RawMessage
1525	err := json.Unmarshal(body, &m)
1526	if err != nil {
1527		return err
1528	}
1529	for k, v := range m {
1530		switch k {
1531		case "properties":
1532			if v != nil {
1533				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1534				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1535				if err != nil {
1536					return err
1537				}
1538				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1539			}
1540		case "name":
1541			if v != nil {
1542				var name string
1543				err = json.Unmarshal(*v, &name)
1544				if err != nil {
1545					return err
1546				}
1547				agic.Name = &name
1548			}
1549		case "etag":
1550			if v != nil {
1551				var etag string
1552				err = json.Unmarshal(*v, &etag)
1553				if err != nil {
1554					return err
1555				}
1556				agic.Etag = &etag
1557			}
1558		case "type":
1559			if v != nil {
1560				var typeVar string
1561				err = json.Unmarshal(*v, &typeVar)
1562				if err != nil {
1563					return err
1564				}
1565				agic.Type = &typeVar
1566			}
1567		case "id":
1568			if v != nil {
1569				var ID string
1570				err = json.Unmarshal(*v, &ID)
1571				if err != nil {
1572					return err
1573				}
1574				agic.ID = &ID
1575			}
1576		}
1577	}
1578
1579	return nil
1580}
1581
1582// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
1583// gateway.
1584type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1585	// Subnet - Reference to the subnet resource. A subnet from where application gateway gets its private address.
1586	Subnet *SubResource `json:"subnet,omitempty"`
1587	// ProvisioningState - READ-ONLY; The provisioning state of the application gateway IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1588	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1589}
1590
1591// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfigurationPropertiesFormat.
1592func (agicpf ApplicationGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
1593	objectMap := make(map[string]interface{})
1594	if agicpf.Subnet != nil {
1595		objectMap["subnet"] = agicpf.Subnet
1596	}
1597	return json.Marshal(objectMap)
1598}
1599
1600// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1601type ApplicationGatewayListResult struct {
1602	autorest.Response `json:"-"`
1603	// Value - List of an application gateways in a resource group.
1604	Value *[]ApplicationGateway `json:"value,omitempty"`
1605	// NextLink - URL to get the next set of results.
1606	NextLink *string `json:"nextLink,omitempty"`
1607}
1608
1609// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1610type ApplicationGatewayListResultIterator struct {
1611	i    int
1612	page ApplicationGatewayListResultPage
1613}
1614
1615// NextWithContext advances to the next value.  If there was an error making
1616// the request the iterator does not advance and the error is returned.
1617func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
1618	if tracing.IsEnabled() {
1619		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
1620		defer func() {
1621			sc := -1
1622			if iter.Response().Response.Response != nil {
1623				sc = iter.Response().Response.Response.StatusCode
1624			}
1625			tracing.EndSpan(ctx, sc, err)
1626		}()
1627	}
1628	iter.i++
1629	if iter.i < len(iter.page.Values()) {
1630		return nil
1631	}
1632	err = iter.page.NextWithContext(ctx)
1633	if err != nil {
1634		iter.i--
1635		return err
1636	}
1637	iter.i = 0
1638	return nil
1639}
1640
1641// Next advances to the next value.  If there was an error making
1642// the request the iterator does not advance and the error is returned.
1643// Deprecated: Use NextWithContext() instead.
1644func (iter *ApplicationGatewayListResultIterator) Next() error {
1645	return iter.NextWithContext(context.Background())
1646}
1647
1648// NotDone returns true if the enumeration should be started or is not yet complete.
1649func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1650	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1651}
1652
1653// Response returns the raw server response from the last page request.
1654func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1655	return iter.page.Response()
1656}
1657
1658// Value returns the current value or a zero-initialized value if the
1659// iterator has advanced beyond the end of the collection.
1660func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1661	if !iter.page.NotDone() {
1662		return ApplicationGateway{}
1663	}
1664	return iter.page.Values()[iter.i]
1665}
1666
1667// Creates a new instance of the ApplicationGatewayListResultIterator type.
1668func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
1669	return ApplicationGatewayListResultIterator{page: page}
1670}
1671
1672// IsEmpty returns true if the ListResult contains no values.
1673func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1674	return aglr.Value == nil || len(*aglr.Value) == 0
1675}
1676
1677// hasNextLink returns true if the NextLink is not empty.
1678func (aglr ApplicationGatewayListResult) hasNextLink() bool {
1679	return aglr.NextLink != nil && len(*aglr.NextLink) != 0
1680}
1681
1682// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1683// It returns nil if no more results exist.
1684func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
1685	if !aglr.hasNextLink() {
1686		return nil, nil
1687	}
1688	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1689		autorest.AsJSON(),
1690		autorest.AsGet(),
1691		autorest.WithBaseURL(to.String(aglr.NextLink)))
1692}
1693
1694// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1695type ApplicationGatewayListResultPage struct {
1696	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1697	aglr ApplicationGatewayListResult
1698}
1699
1700// NextWithContext advances to the next page of values.  If there was an error making
1701// the request the page does not advance and the error is returned.
1702func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
1703	if tracing.IsEnabled() {
1704		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
1705		defer func() {
1706			sc := -1
1707			if page.Response().Response.Response != nil {
1708				sc = page.Response().Response.Response.StatusCode
1709			}
1710			tracing.EndSpan(ctx, sc, err)
1711		}()
1712	}
1713	for {
1714		next, err := page.fn(ctx, page.aglr)
1715		if err != nil {
1716			return err
1717		}
1718		page.aglr = next
1719		if !next.hasNextLink() || !next.IsEmpty() {
1720			break
1721		}
1722	}
1723	return nil
1724}
1725
1726// Next advances to the next page of values.  If there was an error making
1727// the request the page does not advance and the error is returned.
1728// Deprecated: Use NextWithContext() instead.
1729func (page *ApplicationGatewayListResultPage) Next() error {
1730	return page.NextWithContext(context.Background())
1731}
1732
1733// NotDone returns true if the page enumeration should be started or is not yet complete.
1734func (page ApplicationGatewayListResultPage) NotDone() bool {
1735	return !page.aglr.IsEmpty()
1736}
1737
1738// Response returns the raw server response from the last page request.
1739func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1740	return page.aglr
1741}
1742
1743// Values returns the slice of values for the current page or nil if there are no values.
1744func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1745	if page.aglr.IsEmpty() {
1746		return nil
1747	}
1748	return *page.aglr.Value
1749}
1750
1751// Creates a new instance of the ApplicationGatewayListResultPage type.
1752func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
1753	return ApplicationGatewayListResultPage{
1754		fn:   getNextPage,
1755		aglr: cur,
1756	}
1757}
1758
1759// ApplicationGatewayOnDemandProbe details of on demand test probe request.
1760type ApplicationGatewayOnDemandProbe struct {
1761	// Protocol - The protocol used for the probe. Possible values include: 'HTTP', 'HTTPS'
1762	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1763	// Host - Host name to send the probe to.
1764	Host *string `json:"host,omitempty"`
1765	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>.
1766	Path *string `json:"path,omitempty"`
1767	// 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.
1768	Timeout *int32 `json:"timeout,omitempty"`
1769	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1770	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1771	// Match - Criterion for classifying a healthy probe response.
1772	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1773	// BackendAddressPool - Reference to backend pool of application gateway to which probe request will be sent.
1774	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1775	// BackendHTTPSettings - Reference to backend http setting of application gateway to be used for test probe.
1776	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1777}
1778
1779// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1780type ApplicationGatewayPathRule struct {
1781	// ApplicationGatewayPathRulePropertiesFormat - Properties of the application gateway path rule.
1782	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1783	// Name - Name of the path rule that is unique within an Application Gateway.
1784	Name *string `json:"name,omitempty"`
1785	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1786	Etag *string `json:"etag,omitempty"`
1787	// Type - READ-ONLY; Type of the resource.
1788	Type *string `json:"type,omitempty"`
1789	// ID - Resource ID.
1790	ID *string `json:"id,omitempty"`
1791}
1792
1793// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1794func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1795	objectMap := make(map[string]interface{})
1796	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1797		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1798	}
1799	if agpr.Name != nil {
1800		objectMap["name"] = agpr.Name
1801	}
1802	if agpr.ID != nil {
1803		objectMap["id"] = agpr.ID
1804	}
1805	return json.Marshal(objectMap)
1806}
1807
1808// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1809func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1810	var m map[string]*json.RawMessage
1811	err := json.Unmarshal(body, &m)
1812	if err != nil {
1813		return err
1814	}
1815	for k, v := range m {
1816		switch k {
1817		case "properties":
1818			if v != nil {
1819				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1820				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1821				if err != nil {
1822					return err
1823				}
1824				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1825			}
1826		case "name":
1827			if v != nil {
1828				var name string
1829				err = json.Unmarshal(*v, &name)
1830				if err != nil {
1831					return err
1832				}
1833				agpr.Name = &name
1834			}
1835		case "etag":
1836			if v != nil {
1837				var etag string
1838				err = json.Unmarshal(*v, &etag)
1839				if err != nil {
1840					return err
1841				}
1842				agpr.Etag = &etag
1843			}
1844		case "type":
1845			if v != nil {
1846				var typeVar string
1847				err = json.Unmarshal(*v, &typeVar)
1848				if err != nil {
1849					return err
1850				}
1851				agpr.Type = &typeVar
1852			}
1853		case "id":
1854			if v != nil {
1855				var ID string
1856				err = json.Unmarshal(*v, &ID)
1857				if err != nil {
1858					return err
1859				}
1860				agpr.ID = &ID
1861			}
1862		}
1863	}
1864
1865	return nil
1866}
1867
1868// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
1869type ApplicationGatewayPathRulePropertiesFormat struct {
1870	// Paths - Path rules of URL path map.
1871	Paths *[]string `json:"paths,omitempty"`
1872	// BackendAddressPool - Backend address pool resource of URL path map path rule.
1873	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1874	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
1875	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1876	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
1877	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
1878	// RewriteRuleSet - Rewrite rule set resource of URL path map path rule.
1879	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
1880	// ProvisioningState - READ-ONLY; The provisioning state of the path rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1881	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1882	// FirewallPolicy - Reference to the FirewallPolicy resource.
1883	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
1884}
1885
1886// MarshalJSON is the custom marshaler for ApplicationGatewayPathRulePropertiesFormat.
1887func (agprpf ApplicationGatewayPathRulePropertiesFormat) MarshalJSON() ([]byte, error) {
1888	objectMap := make(map[string]interface{})
1889	if agprpf.Paths != nil {
1890		objectMap["paths"] = agprpf.Paths
1891	}
1892	if agprpf.BackendAddressPool != nil {
1893		objectMap["backendAddressPool"] = agprpf.BackendAddressPool
1894	}
1895	if agprpf.BackendHTTPSettings != nil {
1896		objectMap["backendHttpSettings"] = agprpf.BackendHTTPSettings
1897	}
1898	if agprpf.RedirectConfiguration != nil {
1899		objectMap["redirectConfiguration"] = agprpf.RedirectConfiguration
1900	}
1901	if agprpf.RewriteRuleSet != nil {
1902		objectMap["rewriteRuleSet"] = agprpf.RewriteRuleSet
1903	}
1904	if agprpf.FirewallPolicy != nil {
1905		objectMap["firewallPolicy"] = agprpf.FirewallPolicy
1906	}
1907	return json.Marshal(objectMap)
1908}
1909
1910// ApplicationGatewayProbe probe of the application gateway.
1911type ApplicationGatewayProbe struct {
1912	// ApplicationGatewayProbePropertiesFormat - Properties of the application gateway probe.
1913	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
1914	// Name - Name of the probe that is unique within an Application Gateway.
1915	Name *string `json:"name,omitempty"`
1916	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1917	Etag *string `json:"etag,omitempty"`
1918	// Type - READ-ONLY; Type of the resource.
1919	Type *string `json:"type,omitempty"`
1920	// ID - Resource ID.
1921	ID *string `json:"id,omitempty"`
1922}
1923
1924// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
1925func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
1926	objectMap := make(map[string]interface{})
1927	if agp.ApplicationGatewayProbePropertiesFormat != nil {
1928		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
1929	}
1930	if agp.Name != nil {
1931		objectMap["name"] = agp.Name
1932	}
1933	if agp.ID != nil {
1934		objectMap["id"] = agp.ID
1935	}
1936	return json.Marshal(objectMap)
1937}
1938
1939// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
1940func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
1941	var m map[string]*json.RawMessage
1942	err := json.Unmarshal(body, &m)
1943	if err != nil {
1944		return err
1945	}
1946	for k, v := range m {
1947		switch k {
1948		case "properties":
1949			if v != nil {
1950				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
1951				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
1952				if err != nil {
1953					return err
1954				}
1955				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
1956			}
1957		case "name":
1958			if v != nil {
1959				var name string
1960				err = json.Unmarshal(*v, &name)
1961				if err != nil {
1962					return err
1963				}
1964				agp.Name = &name
1965			}
1966		case "etag":
1967			if v != nil {
1968				var etag string
1969				err = json.Unmarshal(*v, &etag)
1970				if err != nil {
1971					return err
1972				}
1973				agp.Etag = &etag
1974			}
1975		case "type":
1976			if v != nil {
1977				var typeVar string
1978				err = json.Unmarshal(*v, &typeVar)
1979				if err != nil {
1980					return err
1981				}
1982				agp.Type = &typeVar
1983			}
1984		case "id":
1985			if v != nil {
1986				var ID string
1987				err = json.Unmarshal(*v, &ID)
1988				if err != nil {
1989					return err
1990				}
1991				agp.ID = &ID
1992			}
1993		}
1994	}
1995
1996	return nil
1997}
1998
1999// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match.
2000type ApplicationGatewayProbeHealthResponseMatch struct {
2001	// Body - Body that must be contained in the health response. Default value is empty.
2002	Body *string `json:"body,omitempty"`
2003	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
2004	StatusCodes *[]string `json:"statusCodes,omitempty"`
2005}
2006
2007// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
2008type ApplicationGatewayProbePropertiesFormat struct {
2009	// Protocol - The protocol used for the probe. Possible values include: 'HTTP', 'HTTPS'
2010	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
2011	// Host - Host name to send the probe to.
2012	Host *string `json:"host,omitempty"`
2013	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>.
2014	Path *string `json:"path,omitempty"`
2015	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
2016	Interval *int32 `json:"interval,omitempty"`
2017	// 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.
2018	Timeout *int32 `json:"timeout,omitempty"`
2019	// 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.
2020	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
2021	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
2022	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
2023	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
2024	MinServers *int32 `json:"minServers,omitempty"`
2025	// Match - Criterion for classifying a healthy probe response.
2026	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
2027	// ProvisioningState - READ-ONLY; The provisioning state of the probe resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2028	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2029	// 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.
2030	Port *int32 `json:"port,omitempty"`
2031}
2032
2033// MarshalJSON is the custom marshaler for ApplicationGatewayProbePropertiesFormat.
2034func (agppf ApplicationGatewayProbePropertiesFormat) MarshalJSON() ([]byte, error) {
2035	objectMap := make(map[string]interface{})
2036	if agppf.Protocol != "" {
2037		objectMap["protocol"] = agppf.Protocol
2038	}
2039	if agppf.Host != nil {
2040		objectMap["host"] = agppf.Host
2041	}
2042	if agppf.Path != nil {
2043		objectMap["path"] = agppf.Path
2044	}
2045	if agppf.Interval != nil {
2046		objectMap["interval"] = agppf.Interval
2047	}
2048	if agppf.Timeout != nil {
2049		objectMap["timeout"] = agppf.Timeout
2050	}
2051	if agppf.UnhealthyThreshold != nil {
2052		objectMap["unhealthyThreshold"] = agppf.UnhealthyThreshold
2053	}
2054	if agppf.PickHostNameFromBackendHTTPSettings != nil {
2055		objectMap["pickHostNameFromBackendHttpSettings"] = agppf.PickHostNameFromBackendHTTPSettings
2056	}
2057	if agppf.MinServers != nil {
2058		objectMap["minServers"] = agppf.MinServers
2059	}
2060	if agppf.Match != nil {
2061		objectMap["match"] = agppf.Match
2062	}
2063	if agppf.Port != nil {
2064		objectMap["port"] = agppf.Port
2065	}
2066	return json.Marshal(objectMap)
2067}
2068
2069// ApplicationGatewayPropertiesFormat properties of the application gateway.
2070type ApplicationGatewayPropertiesFormat struct {
2071	// Sku - SKU of the application gateway resource.
2072	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
2073	// SslPolicy - SSL policy of the application gateway resource.
2074	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
2075	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
2076	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
2077	// 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).
2078	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
2079	// 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).
2080	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
2081	// 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).
2082	TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"`
2083	// 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).
2084	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
2085	// 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).
2086	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
2087	// 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).
2088	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
2089	// Probes - Probes of the application gateway resource.
2090	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
2091	// 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).
2092	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
2093	// 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).
2094	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
2095	// 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).
2096	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
2097	// 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).
2098	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
2099	// RequestRoutingRules - Request routing rules of the application gateway resource.
2100	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
2101	// RewriteRuleSets - Rewrite rules for the application gateway resource.
2102	RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"`
2103	// 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).
2104	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
2105	// WebApplicationFirewallConfiguration - Web application firewall configuration.
2106	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
2107	// FirewallPolicy - Reference to the FirewallPolicy resource.
2108	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
2109	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
2110	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
2111	// EnableFips - Whether FIPS is enabled on the application gateway resource.
2112	EnableFips *bool `json:"enableFips,omitempty"`
2113	// AutoscaleConfiguration - Autoscale Configuration.
2114	AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"`
2115	// ResourceGUID - READ-ONLY; The resource GUID property of the application gateway resource.
2116	ResourceGUID *string `json:"resourceGuid,omitempty"`
2117	// ProvisioningState - READ-ONLY; The provisioning state of the application gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2118	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2119	// CustomErrorConfigurations - Custom error configurations of the application gateway resource.
2120	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
2121	// ForceFirewallPolicyAssociation - If true, associates a firewall policy with an application gateway regardless whether the policy differs from the WAF Config.
2122	ForceFirewallPolicyAssociation *bool `json:"forceFirewallPolicyAssociation,omitempty"`
2123}
2124
2125// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
2126func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
2127	objectMap := make(map[string]interface{})
2128	if agpf.Sku != nil {
2129		objectMap["sku"] = agpf.Sku
2130	}
2131	if agpf.SslPolicy != nil {
2132		objectMap["sslPolicy"] = agpf.SslPolicy
2133	}
2134	if agpf.GatewayIPConfigurations != nil {
2135		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
2136	}
2137	if agpf.AuthenticationCertificates != nil {
2138		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
2139	}
2140	if agpf.TrustedRootCertificates != nil {
2141		objectMap["trustedRootCertificates"] = agpf.TrustedRootCertificates
2142	}
2143	if agpf.SslCertificates != nil {
2144		objectMap["sslCertificates"] = agpf.SslCertificates
2145	}
2146	if agpf.FrontendIPConfigurations != nil {
2147		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
2148	}
2149	if agpf.FrontendPorts != nil {
2150		objectMap["frontendPorts"] = agpf.FrontendPorts
2151	}
2152	if agpf.Probes != nil {
2153		objectMap["probes"] = agpf.Probes
2154	}
2155	if agpf.BackendAddressPools != nil {
2156		objectMap["backendAddressPools"] = agpf.BackendAddressPools
2157	}
2158	if agpf.BackendHTTPSettingsCollection != nil {
2159		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
2160	}
2161	if agpf.HTTPListeners != nil {
2162		objectMap["httpListeners"] = agpf.HTTPListeners
2163	}
2164	if agpf.URLPathMaps != nil {
2165		objectMap["urlPathMaps"] = agpf.URLPathMaps
2166	}
2167	if agpf.RequestRoutingRules != nil {
2168		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
2169	}
2170	if agpf.RewriteRuleSets != nil {
2171		objectMap["rewriteRuleSets"] = agpf.RewriteRuleSets
2172	}
2173	if agpf.RedirectConfigurations != nil {
2174		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
2175	}
2176	if agpf.WebApplicationFirewallConfiguration != nil {
2177		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
2178	}
2179	if agpf.FirewallPolicy != nil {
2180		objectMap["firewallPolicy"] = agpf.FirewallPolicy
2181	}
2182	if agpf.EnableHTTP2 != nil {
2183		objectMap["enableHttp2"] = agpf.EnableHTTP2
2184	}
2185	if agpf.EnableFips != nil {
2186		objectMap["enableFips"] = agpf.EnableFips
2187	}
2188	if agpf.AutoscaleConfiguration != nil {
2189		objectMap["autoscaleConfiguration"] = agpf.AutoscaleConfiguration
2190	}
2191	if agpf.CustomErrorConfigurations != nil {
2192		objectMap["customErrorConfigurations"] = agpf.CustomErrorConfigurations
2193	}
2194	if agpf.ForceFirewallPolicyAssociation != nil {
2195		objectMap["forceFirewallPolicyAssociation"] = agpf.ForceFirewallPolicyAssociation
2196	}
2197	return json.Marshal(objectMap)
2198}
2199
2200// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
2201type ApplicationGatewayRedirectConfiguration struct {
2202	// ApplicationGatewayRedirectConfigurationPropertiesFormat - Properties of the application gateway redirect configuration.
2203	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
2204	// Name - Name of the redirect configuration that is unique within an Application Gateway.
2205	Name *string `json:"name,omitempty"`
2206	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2207	Etag *string `json:"etag,omitempty"`
2208	// Type - READ-ONLY; Type of the resource.
2209	Type *string `json:"type,omitempty"`
2210	// ID - Resource ID.
2211	ID *string `json:"id,omitempty"`
2212}
2213
2214// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
2215func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
2216	objectMap := make(map[string]interface{})
2217	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
2218		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
2219	}
2220	if agrc.Name != nil {
2221		objectMap["name"] = agrc.Name
2222	}
2223	if agrc.ID != nil {
2224		objectMap["id"] = agrc.ID
2225	}
2226	return json.Marshal(objectMap)
2227}
2228
2229// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
2230func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
2231	var m map[string]*json.RawMessage
2232	err := json.Unmarshal(body, &m)
2233	if err != nil {
2234		return err
2235	}
2236	for k, v := range m {
2237		switch k {
2238		case "properties":
2239			if v != nil {
2240				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
2241				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
2242				if err != nil {
2243					return err
2244				}
2245				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
2246			}
2247		case "name":
2248			if v != nil {
2249				var name string
2250				err = json.Unmarshal(*v, &name)
2251				if err != nil {
2252					return err
2253				}
2254				agrc.Name = &name
2255			}
2256		case "etag":
2257			if v != nil {
2258				var etag string
2259				err = json.Unmarshal(*v, &etag)
2260				if err != nil {
2261					return err
2262				}
2263				agrc.Etag = &etag
2264			}
2265		case "type":
2266			if v != nil {
2267				var typeVar string
2268				err = json.Unmarshal(*v, &typeVar)
2269				if err != nil {
2270					return err
2271				}
2272				agrc.Type = &typeVar
2273			}
2274		case "id":
2275			if v != nil {
2276				var ID string
2277				err = json.Unmarshal(*v, &ID)
2278				if err != nil {
2279					return err
2280				}
2281				agrc.ID = &ID
2282			}
2283		}
2284	}
2285
2286	return nil
2287}
2288
2289// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
2290// application gateway.
2291type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
2292	// RedirectType - HTTP redirection type. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
2293	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
2294	// TargetListener - Reference to a listener to redirect the request to.
2295	TargetListener *SubResource `json:"targetListener,omitempty"`
2296	// TargetURL - Url to redirect the request to.
2297	TargetURL *string `json:"targetUrl,omitempty"`
2298	// IncludePath - Include path in the redirected url.
2299	IncludePath *bool `json:"includePath,omitempty"`
2300	// IncludeQueryString - Include query string in the redirected url.
2301	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
2302	// RequestRoutingRules - Request routing specifying redirect configuration.
2303	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
2304	// URLPathMaps - Url path maps specifying default redirect configuration.
2305	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
2306	// PathRules - Path rules specifying redirect configuration.
2307	PathRules *[]SubResource `json:"pathRules,omitempty"`
2308}
2309
2310// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
2311type ApplicationGatewayRequestRoutingRule struct {
2312	// ApplicationGatewayRequestRoutingRulePropertiesFormat - Properties of the application gateway request routing rule.
2313	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
2314	// Name - Name of the request routing rule that is unique within an Application Gateway.
2315	Name *string `json:"name,omitempty"`
2316	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2317	Etag *string `json:"etag,omitempty"`
2318	// Type - READ-ONLY; Type of the resource.
2319	Type *string `json:"type,omitempty"`
2320	// ID - Resource ID.
2321	ID *string `json:"id,omitempty"`
2322}
2323
2324// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
2325func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
2326	objectMap := make(map[string]interface{})
2327	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
2328		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
2329	}
2330	if agrrr.Name != nil {
2331		objectMap["name"] = agrrr.Name
2332	}
2333	if agrrr.ID != nil {
2334		objectMap["id"] = agrrr.ID
2335	}
2336	return json.Marshal(objectMap)
2337}
2338
2339// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
2340func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
2341	var m map[string]*json.RawMessage
2342	err := json.Unmarshal(body, &m)
2343	if err != nil {
2344		return err
2345	}
2346	for k, v := range m {
2347		switch k {
2348		case "properties":
2349			if v != nil {
2350				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
2351				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
2352				if err != nil {
2353					return err
2354				}
2355				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
2356			}
2357		case "name":
2358			if v != nil {
2359				var name string
2360				err = json.Unmarshal(*v, &name)
2361				if err != nil {
2362					return err
2363				}
2364				agrrr.Name = &name
2365			}
2366		case "etag":
2367			if v != nil {
2368				var etag string
2369				err = json.Unmarshal(*v, &etag)
2370				if err != nil {
2371					return err
2372				}
2373				agrrr.Etag = &etag
2374			}
2375		case "type":
2376			if v != nil {
2377				var typeVar string
2378				err = json.Unmarshal(*v, &typeVar)
2379				if err != nil {
2380					return err
2381				}
2382				agrrr.Type = &typeVar
2383			}
2384		case "id":
2385			if v != nil {
2386				var ID string
2387				err = json.Unmarshal(*v, &ID)
2388				if err != nil {
2389					return err
2390				}
2391				agrrr.ID = &ID
2392			}
2393		}
2394	}
2395
2396	return nil
2397}
2398
2399// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
2400// application gateway.
2401type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
2402	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
2403	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
2404	// Priority - Priority of the request routing rule.
2405	Priority *int32 `json:"priority,omitempty"`
2406	// BackendAddressPool - Backend address pool resource of the application gateway.
2407	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2408	// BackendHTTPSettings - Backend http settings resource of the application gateway.
2409	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2410	// HTTPListener - Http listener resource of the application gateway.
2411	HTTPListener *SubResource `json:"httpListener,omitempty"`
2412	// URLPathMap - URL path map resource of the application gateway.
2413	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2414	// RewriteRuleSet - Rewrite Rule Set resource in Basic rule of the application gateway.
2415	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
2416	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2417	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2418	// ProvisioningState - READ-ONLY; The provisioning state of the request routing rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2419	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2420}
2421
2422// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRulePropertiesFormat.
2423func (agrrrpf ApplicationGatewayRequestRoutingRulePropertiesFormat) MarshalJSON() ([]byte, error) {
2424	objectMap := make(map[string]interface{})
2425	if agrrrpf.RuleType != "" {
2426		objectMap["ruleType"] = agrrrpf.RuleType
2427	}
2428	if agrrrpf.Priority != nil {
2429		objectMap["priority"] = agrrrpf.Priority
2430	}
2431	if agrrrpf.BackendAddressPool != nil {
2432		objectMap["backendAddressPool"] = agrrrpf.BackendAddressPool
2433	}
2434	if agrrrpf.BackendHTTPSettings != nil {
2435		objectMap["backendHttpSettings"] = agrrrpf.BackendHTTPSettings
2436	}
2437	if agrrrpf.HTTPListener != nil {
2438		objectMap["httpListener"] = agrrrpf.HTTPListener
2439	}
2440	if agrrrpf.URLPathMap != nil {
2441		objectMap["urlPathMap"] = agrrrpf.URLPathMap
2442	}
2443	if agrrrpf.RewriteRuleSet != nil {
2444		objectMap["rewriteRuleSet"] = agrrrpf.RewriteRuleSet
2445	}
2446	if agrrrpf.RedirectConfiguration != nil {
2447		objectMap["redirectConfiguration"] = agrrrpf.RedirectConfiguration
2448	}
2449	return json.Marshal(objectMap)
2450}
2451
2452// ApplicationGatewayRewriteRule rewrite rule of an application gateway.
2453type ApplicationGatewayRewriteRule struct {
2454	// Name - Name of the rewrite rule that is unique within an Application Gateway.
2455	Name *string `json:"name,omitempty"`
2456	// RuleSequence - Rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet.
2457	RuleSequence *int32 `json:"ruleSequence,omitempty"`
2458	// Conditions - Conditions based on which the action set execution will be evaluated.
2459	Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"`
2460	// ActionSet - Set of actions to be done as part of the rewrite Rule.
2461	ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"`
2462}
2463
2464// ApplicationGatewayRewriteRuleActionSet set of actions in the Rewrite Rule in Application Gateway.
2465type ApplicationGatewayRewriteRuleActionSet struct {
2466	// RequestHeaderConfigurations - Request Header Actions in the Action Set.
2467	RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"`
2468	// ResponseHeaderConfigurations - Response Header Actions in the Action Set.
2469	ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"`
2470	// URLConfiguration - Url Configuration Action in the Action Set.
2471	URLConfiguration *ApplicationGatewayURLConfiguration `json:"urlConfiguration,omitempty"`
2472}
2473
2474// ApplicationGatewayRewriteRuleCondition set of conditions in the Rewrite Rule in Application Gateway.
2475type ApplicationGatewayRewriteRuleCondition struct {
2476	// Variable - The condition parameter of the RewriteRuleCondition.
2477	Variable *string `json:"variable,omitempty"`
2478	// Pattern - The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition.
2479	Pattern *string `json:"pattern,omitempty"`
2480	// IgnoreCase - Setting this paramter to truth value with force the pattern to do a case in-sensitive comparison.
2481	IgnoreCase *bool `json:"ignoreCase,omitempty"`
2482	// Negate - Setting this value as truth will force to check the negation of the condition given by the user.
2483	Negate *bool `json:"negate,omitempty"`
2484}
2485
2486// ApplicationGatewayRewriteRuleSet rewrite rule set of an application gateway.
2487type ApplicationGatewayRewriteRuleSet struct {
2488	// ApplicationGatewayRewriteRuleSetPropertiesFormat - Properties of the application gateway rewrite rule set.
2489	*ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"`
2490	// Name - Name of the rewrite rule set that is unique within an Application Gateway.
2491	Name *string `json:"name,omitempty"`
2492	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2493	Etag *string `json:"etag,omitempty"`
2494	// ID - Resource ID.
2495	ID *string `json:"id,omitempty"`
2496}
2497
2498// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSet.
2499func (agrrs ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) {
2500	objectMap := make(map[string]interface{})
2501	if agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat != nil {
2502		objectMap["properties"] = agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat
2503	}
2504	if agrrs.Name != nil {
2505		objectMap["name"] = agrrs.Name
2506	}
2507	if agrrs.ID != nil {
2508		objectMap["id"] = agrrs.ID
2509	}
2510	return json.Marshal(objectMap)
2511}
2512
2513// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRewriteRuleSet struct.
2514func (agrrs *ApplicationGatewayRewriteRuleSet) UnmarshalJSON(body []byte) error {
2515	var m map[string]*json.RawMessage
2516	err := json.Unmarshal(body, &m)
2517	if err != nil {
2518		return err
2519	}
2520	for k, v := range m {
2521		switch k {
2522		case "properties":
2523			if v != nil {
2524				var applicationGatewayRewriteRuleSetPropertiesFormat ApplicationGatewayRewriteRuleSetPropertiesFormat
2525				err = json.Unmarshal(*v, &applicationGatewayRewriteRuleSetPropertiesFormat)
2526				if err != nil {
2527					return err
2528				}
2529				agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat = &applicationGatewayRewriteRuleSetPropertiesFormat
2530			}
2531		case "name":
2532			if v != nil {
2533				var name string
2534				err = json.Unmarshal(*v, &name)
2535				if err != nil {
2536					return err
2537				}
2538				agrrs.Name = &name
2539			}
2540		case "etag":
2541			if v != nil {
2542				var etag string
2543				err = json.Unmarshal(*v, &etag)
2544				if err != nil {
2545					return err
2546				}
2547				agrrs.Etag = &etag
2548			}
2549		case "id":
2550			if v != nil {
2551				var ID string
2552				err = json.Unmarshal(*v, &ID)
2553				if err != nil {
2554					return err
2555				}
2556				agrrs.ID = &ID
2557			}
2558		}
2559	}
2560
2561	return nil
2562}
2563
2564// ApplicationGatewayRewriteRuleSetPropertiesFormat properties of rewrite rule set of the application
2565// gateway.
2566type ApplicationGatewayRewriteRuleSetPropertiesFormat struct {
2567	// RewriteRules - Rewrite rules in the rewrite rule set.
2568	RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"`
2569	// ProvisioningState - READ-ONLY; The provisioning state of the rewrite rule set resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2570	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2571}
2572
2573// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSetPropertiesFormat.
2574func (agrrspf ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) {
2575	objectMap := make(map[string]interface{})
2576	if agrrspf.RewriteRules != nil {
2577		objectMap["rewriteRules"] = agrrspf.RewriteRules
2578	}
2579	return json.Marshal(objectMap)
2580}
2581
2582// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2583// long-running operation.
2584type ApplicationGatewaysBackendHealthFuture struct {
2585	azure.FutureAPI
2586	// Result returns the result of the asynchronous operation.
2587	// If the operation has not completed it will return an error.
2588	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2589}
2590
2591// ApplicationGatewaysBackendHealthOnDemandFuture an abstraction for monitoring and retrieving the results
2592// of a long-running operation.
2593type ApplicationGatewaysBackendHealthOnDemandFuture struct {
2594	azure.FutureAPI
2595	// Result returns the result of the asynchronous operation.
2596	// If the operation has not completed it will return an error.
2597	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealthOnDemand, error)
2598}
2599
2600// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2601// long-running operation.
2602type ApplicationGatewaysCreateOrUpdateFuture struct {
2603	azure.FutureAPI
2604	// Result returns the result of the asynchronous operation.
2605	// If the operation has not completed it will return an error.
2606	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2607}
2608
2609// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2610// long-running operation.
2611type ApplicationGatewaysDeleteFuture struct {
2612	azure.FutureAPI
2613	// Result returns the result of the asynchronous operation.
2614	// If the operation has not completed it will return an error.
2615	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2616}
2617
2618// ApplicationGatewaySku SKU of an application gateway.
2619type ApplicationGatewaySku struct {
2620	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
2621	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2622	// Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
2623	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2624	// Capacity - Capacity (instance count) of an application gateway.
2625	Capacity *int32 `json:"capacity,omitempty"`
2626}
2627
2628// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2629type ApplicationGatewaySslCertificate struct {
2630	// ApplicationGatewaySslCertificatePropertiesFormat - Properties of the application gateway SSL certificate.
2631	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2632	// Name - Name of the SSL certificate that is unique within an Application Gateway.
2633	Name *string `json:"name,omitempty"`
2634	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2635	Etag *string `json:"etag,omitempty"`
2636	// Type - READ-ONLY; Type of the resource.
2637	Type *string `json:"type,omitempty"`
2638	// ID - Resource ID.
2639	ID *string `json:"id,omitempty"`
2640}
2641
2642// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2643func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2644	objectMap := make(map[string]interface{})
2645	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2646		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2647	}
2648	if agsc.Name != nil {
2649		objectMap["name"] = agsc.Name
2650	}
2651	if agsc.ID != nil {
2652		objectMap["id"] = agsc.ID
2653	}
2654	return json.Marshal(objectMap)
2655}
2656
2657// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2658func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2659	var m map[string]*json.RawMessage
2660	err := json.Unmarshal(body, &m)
2661	if err != nil {
2662		return err
2663	}
2664	for k, v := range m {
2665		switch k {
2666		case "properties":
2667			if v != nil {
2668				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2669				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2670				if err != nil {
2671					return err
2672				}
2673				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2674			}
2675		case "name":
2676			if v != nil {
2677				var name string
2678				err = json.Unmarshal(*v, &name)
2679				if err != nil {
2680					return err
2681				}
2682				agsc.Name = &name
2683			}
2684		case "etag":
2685			if v != nil {
2686				var etag string
2687				err = json.Unmarshal(*v, &etag)
2688				if err != nil {
2689					return err
2690				}
2691				agsc.Etag = &etag
2692			}
2693		case "type":
2694			if v != nil {
2695				var typeVar string
2696				err = json.Unmarshal(*v, &typeVar)
2697				if err != nil {
2698					return err
2699				}
2700				agsc.Type = &typeVar
2701			}
2702		case "id":
2703			if v != nil {
2704				var ID string
2705				err = json.Unmarshal(*v, &ID)
2706				if err != nil {
2707					return err
2708				}
2709				agsc.ID = &ID
2710			}
2711		}
2712	}
2713
2714	return nil
2715}
2716
2717// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2718// gateway.
2719type ApplicationGatewaySslCertificatePropertiesFormat struct {
2720	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2721	Data *string `json:"data,omitempty"`
2722	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2723	Password *string `json:"password,omitempty"`
2724	// PublicCertData - READ-ONLY; Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2725	PublicCertData *string `json:"publicCertData,omitempty"`
2726	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2727	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2728	// ProvisioningState - READ-ONLY; The provisioning state of the SSL certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2729	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2730}
2731
2732// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificatePropertiesFormat.
2733func (agscpf ApplicationGatewaySslCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
2734	objectMap := make(map[string]interface{})
2735	if agscpf.Data != nil {
2736		objectMap["data"] = agscpf.Data
2737	}
2738	if agscpf.Password != nil {
2739		objectMap["password"] = agscpf.Password
2740	}
2741	if agscpf.KeyVaultSecretID != nil {
2742		objectMap["keyVaultSecretId"] = agscpf.KeyVaultSecretID
2743	}
2744	return json.Marshal(objectMap)
2745}
2746
2747// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2748type ApplicationGatewaySslPolicy struct {
2749	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2750	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2751	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2752	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2753	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2754	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2755	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2756	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2757	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2758	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2759}
2760
2761// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy.
2762type ApplicationGatewaySslPredefinedPolicy struct {
2763	autorest.Response `json:"-"`
2764	// Name - Name of the Ssl predefined policy.
2765	Name *string `json:"name,omitempty"`
2766	// ApplicationGatewaySslPredefinedPolicyPropertiesFormat - Properties of the application gateway SSL predefined policy.
2767	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2768	// ID - Resource ID.
2769	ID *string `json:"id,omitempty"`
2770}
2771
2772// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2773func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2774	objectMap := make(map[string]interface{})
2775	if agspp.Name != nil {
2776		objectMap["name"] = agspp.Name
2777	}
2778	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2779		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2780	}
2781	if agspp.ID != nil {
2782		objectMap["id"] = agspp.ID
2783	}
2784	return json.Marshal(objectMap)
2785}
2786
2787// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2788func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2789	var m map[string]*json.RawMessage
2790	err := json.Unmarshal(body, &m)
2791	if err != nil {
2792		return err
2793	}
2794	for k, v := range m {
2795		switch k {
2796		case "name":
2797			if v != nil {
2798				var name string
2799				err = json.Unmarshal(*v, &name)
2800				if err != nil {
2801					return err
2802				}
2803				agspp.Name = &name
2804			}
2805		case "properties":
2806			if v != nil {
2807				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2808				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2809				if err != nil {
2810					return err
2811				}
2812				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2813			}
2814		case "id":
2815			if v != nil {
2816				var ID string
2817				err = json.Unmarshal(*v, &ID)
2818				if err != nil {
2819					return err
2820				}
2821				agspp.ID = &ID
2822			}
2823		}
2824	}
2825
2826	return nil
2827}
2828
2829// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2830// ApplicationGatewaySslPredefinedPolicy.
2831type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2832	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2833	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2834	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2835	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2836}
2837
2838// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2839// long-running operation.
2840type ApplicationGatewaysStartFuture struct {
2841	azure.FutureAPI
2842	// Result returns the result of the asynchronous operation.
2843	// If the operation has not completed it will return an error.
2844	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2845}
2846
2847// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2848// operation.
2849type ApplicationGatewaysStopFuture struct {
2850	azure.FutureAPI
2851	// Result returns the result of the asynchronous operation.
2852	// If the operation has not completed it will return an error.
2853	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2854}
2855
2856// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway.
2857type ApplicationGatewayTrustedRootCertificate struct {
2858	// ApplicationGatewayTrustedRootCertificatePropertiesFormat - Properties of the application gateway trusted root certificate.
2859	*ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"`
2860	// Name - Name of the trusted root certificate that is unique within an Application Gateway.
2861	Name *string `json:"name,omitempty"`
2862	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2863	Etag *string `json:"etag,omitempty"`
2864	// Type - READ-ONLY; Type of the resource.
2865	Type *string `json:"type,omitempty"`
2866	// ID - Resource ID.
2867	ID *string `json:"id,omitempty"`
2868}
2869
2870// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificate.
2871func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) {
2872	objectMap := make(map[string]interface{})
2873	if agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat != nil {
2874		objectMap["properties"] = agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat
2875	}
2876	if agtrc.Name != nil {
2877		objectMap["name"] = agtrc.Name
2878	}
2879	if agtrc.ID != nil {
2880		objectMap["id"] = agtrc.ID
2881	}
2882	return json.Marshal(objectMap)
2883}
2884
2885// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedRootCertificate struct.
2886func (agtrc *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(body []byte) error {
2887	var m map[string]*json.RawMessage
2888	err := json.Unmarshal(body, &m)
2889	if err != nil {
2890		return err
2891	}
2892	for k, v := range m {
2893		switch k {
2894		case "properties":
2895			if v != nil {
2896				var applicationGatewayTrustedRootCertificatePropertiesFormat ApplicationGatewayTrustedRootCertificatePropertiesFormat
2897				err = json.Unmarshal(*v, &applicationGatewayTrustedRootCertificatePropertiesFormat)
2898				if err != nil {
2899					return err
2900				}
2901				agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat = &applicationGatewayTrustedRootCertificatePropertiesFormat
2902			}
2903		case "name":
2904			if v != nil {
2905				var name string
2906				err = json.Unmarshal(*v, &name)
2907				if err != nil {
2908					return err
2909				}
2910				agtrc.Name = &name
2911			}
2912		case "etag":
2913			if v != nil {
2914				var etag string
2915				err = json.Unmarshal(*v, &etag)
2916				if err != nil {
2917					return err
2918				}
2919				agtrc.Etag = &etag
2920			}
2921		case "type":
2922			if v != nil {
2923				var typeVar string
2924				err = json.Unmarshal(*v, &typeVar)
2925				if err != nil {
2926					return err
2927				}
2928				agtrc.Type = &typeVar
2929			}
2930		case "id":
2931			if v != nil {
2932				var ID string
2933				err = json.Unmarshal(*v, &ID)
2934				if err != nil {
2935					return err
2936				}
2937				agtrc.ID = &ID
2938			}
2939		}
2940	}
2941
2942	return nil
2943}
2944
2945// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an
2946// application gateway.
2947type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct {
2948	// Data - Certificate public data.
2949	Data *string `json:"data,omitempty"`
2950	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2951	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2952	// ProvisioningState - READ-ONLY; The provisioning state of the trusted root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2953	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2954}
2955
2956// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificatePropertiesFormat.
2957func (agtrcpf ApplicationGatewayTrustedRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
2958	objectMap := make(map[string]interface{})
2959	if agtrcpf.Data != nil {
2960		objectMap["data"] = agtrcpf.Data
2961	}
2962	if agtrcpf.KeyVaultSecretID != nil {
2963		objectMap["keyVaultSecretId"] = agtrcpf.KeyVaultSecretID
2964	}
2965	return json.Marshal(objectMap)
2966}
2967
2968// ApplicationGatewayURLConfiguration url configuration of the Actions set in Application Gateway.
2969type ApplicationGatewayURLConfiguration struct {
2970	// ModifiedPath - Url path which user has provided for url rewrite. Null means no path will be updated. Default value is null.
2971	ModifiedPath *string `json:"modifiedPath,omitempty"`
2972	// ModifiedQueryString - Query string which user has provided for url rewrite. Null means no query string will be updated. Default value is null.
2973	ModifiedQueryString *string `json:"modifiedQueryString,omitempty"`
2974	// 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.
2975	Reroute *bool `json:"reroute,omitempty"`
2976}
2977
2978// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
2979// PathBasedRouting.
2980type ApplicationGatewayURLPathMap struct {
2981	// ApplicationGatewayURLPathMapPropertiesFormat - Properties of the application gateway URL path map.
2982	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
2983	// Name - Name of the URL path map that is unique within an Application Gateway.
2984	Name *string `json:"name,omitempty"`
2985	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2986	Etag *string `json:"etag,omitempty"`
2987	// Type - READ-ONLY; Type of the resource.
2988	Type *string `json:"type,omitempty"`
2989	// ID - Resource ID.
2990	ID *string `json:"id,omitempty"`
2991}
2992
2993// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
2994func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
2995	objectMap := make(map[string]interface{})
2996	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
2997		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
2998	}
2999	if agupm.Name != nil {
3000		objectMap["name"] = agupm.Name
3001	}
3002	if agupm.ID != nil {
3003		objectMap["id"] = agupm.ID
3004	}
3005	return json.Marshal(objectMap)
3006}
3007
3008// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
3009func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
3010	var m map[string]*json.RawMessage
3011	err := json.Unmarshal(body, &m)
3012	if err != nil {
3013		return err
3014	}
3015	for k, v := range m {
3016		switch k {
3017		case "properties":
3018			if v != nil {
3019				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
3020				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
3021				if err != nil {
3022					return err
3023				}
3024				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
3025			}
3026		case "name":
3027			if v != nil {
3028				var name string
3029				err = json.Unmarshal(*v, &name)
3030				if err != nil {
3031					return err
3032				}
3033				agupm.Name = &name
3034			}
3035		case "etag":
3036			if v != nil {
3037				var etag string
3038				err = json.Unmarshal(*v, &etag)
3039				if err != nil {
3040					return err
3041				}
3042				agupm.Etag = &etag
3043			}
3044		case "type":
3045			if v != nil {
3046				var typeVar string
3047				err = json.Unmarshal(*v, &typeVar)
3048				if err != nil {
3049					return err
3050				}
3051				agupm.Type = &typeVar
3052			}
3053		case "id":
3054			if v != nil {
3055				var ID string
3056				err = json.Unmarshal(*v, &ID)
3057				if err != nil {
3058					return err
3059				}
3060				agupm.ID = &ID
3061			}
3062		}
3063	}
3064
3065	return nil
3066}
3067
3068// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
3069type ApplicationGatewayURLPathMapPropertiesFormat struct {
3070	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
3071	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
3072	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
3073	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
3074	// DefaultRewriteRuleSet - Default Rewrite rule set resource of URL path map.
3075	DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"`
3076	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
3077	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
3078	// PathRules - Path rule of URL path map resource.
3079	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
3080	// ProvisioningState - READ-ONLY; The provisioning state of the URL path map resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3081	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3082}
3083
3084// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMapPropertiesFormat.
3085func (agupmpf ApplicationGatewayURLPathMapPropertiesFormat) MarshalJSON() ([]byte, error) {
3086	objectMap := make(map[string]interface{})
3087	if agupmpf.DefaultBackendAddressPool != nil {
3088		objectMap["defaultBackendAddressPool"] = agupmpf.DefaultBackendAddressPool
3089	}
3090	if agupmpf.DefaultBackendHTTPSettings != nil {
3091		objectMap["defaultBackendHttpSettings"] = agupmpf.DefaultBackendHTTPSettings
3092	}
3093	if agupmpf.DefaultRewriteRuleSet != nil {
3094		objectMap["defaultRewriteRuleSet"] = agupmpf.DefaultRewriteRuleSet
3095	}
3096	if agupmpf.DefaultRedirectConfiguration != nil {
3097		objectMap["defaultRedirectConfiguration"] = agupmpf.DefaultRedirectConfiguration
3098	}
3099	if agupmpf.PathRules != nil {
3100		objectMap["pathRules"] = agupmpf.PathRules
3101	}
3102	return json.Marshal(objectMap)
3103}
3104
3105// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
3106// configuration.
3107type ApplicationGatewayWebApplicationFirewallConfiguration struct {
3108	// Enabled - Whether the web application firewall is enabled or not.
3109	Enabled *bool `json:"enabled,omitempty"`
3110	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
3111	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
3112	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
3113	RuleSetType *string `json:"ruleSetType,omitempty"`
3114	// RuleSetVersion - The version of the rule set type.
3115	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
3116	// DisabledRuleGroups - The disabled rule groups.
3117	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
3118	// RequestBodyCheck - Whether allow WAF to check request Body.
3119	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
3120	// MaxRequestBodySize - Maximum request body size for WAF.
3121	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
3122	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
3123	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
3124	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
3125	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
3126	// Exclusions - The exclusion list.
3127	Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"`
3128}
3129
3130// ApplicationRuleCondition rule condition of type application.
3131type ApplicationRuleCondition struct {
3132	// SourceAddresses - List of source IP addresses for this rule.
3133	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
3134	// DestinationAddresses - List of destination IP addresses or Service Tags.
3135	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
3136	// Protocols - Array of Application Protocols.
3137	Protocols *[]FirewallPolicyRuleConditionApplicationProtocol `json:"protocols,omitempty"`
3138	// TargetFqdns - List of FQDNs for this rule condition.
3139	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
3140	// FqdnTags - List of FQDN Tags for this rule condition.
3141	FqdnTags *[]string `json:"fqdnTags,omitempty"`
3142	// SourceIPGroups - List of source IpGroups for this rule.
3143	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
3144	// Name - Name of the rule condition.
3145	Name *string `json:"name,omitempty"`
3146	// Description - Description of the rule condition.
3147	Description *string `json:"description,omitempty"`
3148	// RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNatRuleCondition', 'RuleConditionTypeNetworkRuleCondition'
3149	RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"`
3150}
3151
3152// MarshalJSON is the custom marshaler for ApplicationRuleCondition.
3153func (arc ApplicationRuleCondition) MarshalJSON() ([]byte, error) {
3154	arc.RuleConditionType = RuleConditionTypeApplicationRuleCondition
3155	objectMap := make(map[string]interface{})
3156	if arc.SourceAddresses != nil {
3157		objectMap["sourceAddresses"] = arc.SourceAddresses
3158	}
3159	if arc.DestinationAddresses != nil {
3160		objectMap["destinationAddresses"] = arc.DestinationAddresses
3161	}
3162	if arc.Protocols != nil {
3163		objectMap["protocols"] = arc.Protocols
3164	}
3165	if arc.TargetFqdns != nil {
3166		objectMap["targetFqdns"] = arc.TargetFqdns
3167	}
3168	if arc.FqdnTags != nil {
3169		objectMap["fqdnTags"] = arc.FqdnTags
3170	}
3171	if arc.SourceIPGroups != nil {
3172		objectMap["sourceIpGroups"] = arc.SourceIPGroups
3173	}
3174	if arc.Name != nil {
3175		objectMap["name"] = arc.Name
3176	}
3177	if arc.Description != nil {
3178		objectMap["description"] = arc.Description
3179	}
3180	if arc.RuleConditionType != "" {
3181		objectMap["ruleConditionType"] = arc.RuleConditionType
3182	}
3183	return json.Marshal(objectMap)
3184}
3185
3186// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
3187func (arc ApplicationRuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) {
3188	return &arc, true
3189}
3190
3191// AsNatRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
3192func (arc ApplicationRuleCondition) AsNatRuleCondition() (*NatRuleCondition, bool) {
3193	return nil, false
3194}
3195
3196// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
3197func (arc ApplicationRuleCondition) AsRuleCondition() (*RuleCondition, bool) {
3198	return nil, false
3199}
3200
3201// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
3202func (arc ApplicationRuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) {
3203	return nil, false
3204}
3205
3206// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
3207func (arc ApplicationRuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) {
3208	return &arc, true
3209}
3210
3211// ApplicationSecurityGroup an application security group in a resource group.
3212type ApplicationSecurityGroup struct {
3213	autorest.Response `json:"-"`
3214	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
3215	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
3216	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3217	Etag *string `json:"etag,omitempty"`
3218	// ID - Resource ID.
3219	ID *string `json:"id,omitempty"`
3220	// Name - READ-ONLY; Resource name.
3221	Name *string `json:"name,omitempty"`
3222	// Type - READ-ONLY; Resource type.
3223	Type *string `json:"type,omitempty"`
3224	// Location - Resource location.
3225	Location *string `json:"location,omitempty"`
3226	// Tags - Resource tags.
3227	Tags map[string]*string `json:"tags"`
3228}
3229
3230// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
3231func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
3232	objectMap := make(map[string]interface{})
3233	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
3234		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
3235	}
3236	if asg.ID != nil {
3237		objectMap["id"] = asg.ID
3238	}
3239	if asg.Location != nil {
3240		objectMap["location"] = asg.Location
3241	}
3242	if asg.Tags != nil {
3243		objectMap["tags"] = asg.Tags
3244	}
3245	return json.Marshal(objectMap)
3246}
3247
3248// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
3249func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
3250	var m map[string]*json.RawMessage
3251	err := json.Unmarshal(body, &m)
3252	if err != nil {
3253		return err
3254	}
3255	for k, v := range m {
3256		switch k {
3257		case "properties":
3258			if v != nil {
3259				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
3260				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
3261				if err != nil {
3262					return err
3263				}
3264				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
3265			}
3266		case "etag":
3267			if v != nil {
3268				var etag string
3269				err = json.Unmarshal(*v, &etag)
3270				if err != nil {
3271					return err
3272				}
3273				asg.Etag = &etag
3274			}
3275		case "id":
3276			if v != nil {
3277				var ID string
3278				err = json.Unmarshal(*v, &ID)
3279				if err != nil {
3280					return err
3281				}
3282				asg.ID = &ID
3283			}
3284		case "name":
3285			if v != nil {
3286				var name string
3287				err = json.Unmarshal(*v, &name)
3288				if err != nil {
3289					return err
3290				}
3291				asg.Name = &name
3292			}
3293		case "type":
3294			if v != nil {
3295				var typeVar string
3296				err = json.Unmarshal(*v, &typeVar)
3297				if err != nil {
3298					return err
3299				}
3300				asg.Type = &typeVar
3301			}
3302		case "location":
3303			if v != nil {
3304				var location string
3305				err = json.Unmarshal(*v, &location)
3306				if err != nil {
3307					return err
3308				}
3309				asg.Location = &location
3310			}
3311		case "tags":
3312			if v != nil {
3313				var tags map[string]*string
3314				err = json.Unmarshal(*v, &tags)
3315				if err != nil {
3316					return err
3317				}
3318				asg.Tags = tags
3319			}
3320		}
3321	}
3322
3323	return nil
3324}
3325
3326// ApplicationSecurityGroupListResult a list of application security groups.
3327type ApplicationSecurityGroupListResult struct {
3328	autorest.Response `json:"-"`
3329	// Value - A list of application security groups.
3330	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
3331	// NextLink - READ-ONLY; The URL to get the next set of results.
3332	NextLink *string `json:"nextLink,omitempty"`
3333}
3334
3335// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
3336func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
3337	objectMap := make(map[string]interface{})
3338	if asglr.Value != nil {
3339		objectMap["value"] = asglr.Value
3340	}
3341	return json.Marshal(objectMap)
3342}
3343
3344// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
3345// ApplicationSecurityGroup values.
3346type ApplicationSecurityGroupListResultIterator struct {
3347	i    int
3348	page ApplicationSecurityGroupListResultPage
3349}
3350
3351// NextWithContext advances to the next value.  If there was an error making
3352// the request the iterator does not advance and the error is returned.
3353func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
3354	if tracing.IsEnabled() {
3355		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
3356		defer func() {
3357			sc := -1
3358			if iter.Response().Response.Response != nil {
3359				sc = iter.Response().Response.Response.StatusCode
3360			}
3361			tracing.EndSpan(ctx, sc, err)
3362		}()
3363	}
3364	iter.i++
3365	if iter.i < len(iter.page.Values()) {
3366		return nil
3367	}
3368	err = iter.page.NextWithContext(ctx)
3369	if err != nil {
3370		iter.i--
3371		return err
3372	}
3373	iter.i = 0
3374	return nil
3375}
3376
3377// Next advances to the next value.  If there was an error making
3378// the request the iterator does not advance and the error is returned.
3379// Deprecated: Use NextWithContext() instead.
3380func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
3381	return iter.NextWithContext(context.Background())
3382}
3383
3384// NotDone returns true if the enumeration should be started or is not yet complete.
3385func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
3386	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3387}
3388
3389// Response returns the raw server response from the last page request.
3390func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
3391	return iter.page.Response()
3392}
3393
3394// Value returns the current value or a zero-initialized value if the
3395// iterator has advanced beyond the end of the collection.
3396func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
3397	if !iter.page.NotDone() {
3398		return ApplicationSecurityGroup{}
3399	}
3400	return iter.page.Values()[iter.i]
3401}
3402
3403// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
3404func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
3405	return ApplicationSecurityGroupListResultIterator{page: page}
3406}
3407
3408// IsEmpty returns true if the ListResult contains no values.
3409func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
3410	return asglr.Value == nil || len(*asglr.Value) == 0
3411}
3412
3413// hasNextLink returns true if the NextLink is not empty.
3414func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
3415	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
3416}
3417
3418// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
3419// It returns nil if no more results exist.
3420func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
3421	if !asglr.hasNextLink() {
3422		return nil, nil
3423	}
3424	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3425		autorest.AsJSON(),
3426		autorest.AsGet(),
3427		autorest.WithBaseURL(to.String(asglr.NextLink)))
3428}
3429
3430// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
3431type ApplicationSecurityGroupListResultPage struct {
3432	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
3433	asglr ApplicationSecurityGroupListResult
3434}
3435
3436// NextWithContext advances to the next page of values.  If there was an error making
3437// the request the page does not advance and the error is returned.
3438func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
3439	if tracing.IsEnabled() {
3440		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
3441		defer func() {
3442			sc := -1
3443			if page.Response().Response.Response != nil {
3444				sc = page.Response().Response.Response.StatusCode
3445			}
3446			tracing.EndSpan(ctx, sc, err)
3447		}()
3448	}
3449	for {
3450		next, err := page.fn(ctx, page.asglr)
3451		if err != nil {
3452			return err
3453		}
3454		page.asglr = next
3455		if !next.hasNextLink() || !next.IsEmpty() {
3456			break
3457		}
3458	}
3459	return nil
3460}
3461
3462// Next advances to the next page of values.  If there was an error making
3463// the request the page does not advance and the error is returned.
3464// Deprecated: Use NextWithContext() instead.
3465func (page *ApplicationSecurityGroupListResultPage) Next() error {
3466	return page.NextWithContext(context.Background())
3467}
3468
3469// NotDone returns true if the page enumeration should be started or is not yet complete.
3470func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
3471	return !page.asglr.IsEmpty()
3472}
3473
3474// Response returns the raw server response from the last page request.
3475func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
3476	return page.asglr
3477}
3478
3479// Values returns the slice of values for the current page or nil if there are no values.
3480func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
3481	if page.asglr.IsEmpty() {
3482		return nil
3483	}
3484	return *page.asglr.Value
3485}
3486
3487// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
3488func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
3489	return ApplicationSecurityGroupListResultPage{
3490		fn:    getNextPage,
3491		asglr: cur,
3492	}
3493}
3494
3495// ApplicationSecurityGroupPropertiesFormat application security group properties.
3496type ApplicationSecurityGroupPropertiesFormat struct {
3497	// 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.
3498	ResourceGUID *string `json:"resourceGuid,omitempty"`
3499	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3500	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3501}
3502
3503// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
3504// of a long-running operation.
3505type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
3506	azure.FutureAPI
3507	// Result returns the result of the asynchronous operation.
3508	// If the operation has not completed it will return an error.
3509	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3510}
3511
3512// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
3513// long-running operation.
3514type ApplicationSecurityGroupsDeleteFuture struct {
3515	azure.FutureAPI
3516	// Result returns the result of the asynchronous operation.
3517	// If the operation has not completed it will return an error.
3518	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
3519}
3520
3521// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
3522// that belongs to an ExpressRouteCircuit.
3523type AuthorizationListResult struct {
3524	autorest.Response `json:"-"`
3525	// Value - The authorizations in an ExpressRoute Circuit.
3526	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
3527	// NextLink - The URL to get the next set of results.
3528	NextLink *string `json:"nextLink,omitempty"`
3529}
3530
3531// AuthorizationListResultIterator provides access to a complete listing of
3532// ExpressRouteCircuitAuthorization values.
3533type AuthorizationListResultIterator struct {
3534	i    int
3535	page AuthorizationListResultPage
3536}
3537
3538// NextWithContext advances to the next value.  If there was an error making
3539// the request the iterator does not advance and the error is returned.
3540func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3541	if tracing.IsEnabled() {
3542		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
3543		defer func() {
3544			sc := -1
3545			if iter.Response().Response.Response != nil {
3546				sc = iter.Response().Response.Response.StatusCode
3547			}
3548			tracing.EndSpan(ctx, sc, err)
3549		}()
3550	}
3551	iter.i++
3552	if iter.i < len(iter.page.Values()) {
3553		return nil
3554	}
3555	err = iter.page.NextWithContext(ctx)
3556	if err != nil {
3557		iter.i--
3558		return err
3559	}
3560	iter.i = 0
3561	return nil
3562}
3563
3564// Next advances to the next value.  If there was an error making
3565// the request the iterator does not advance and the error is returned.
3566// Deprecated: Use NextWithContext() instead.
3567func (iter *AuthorizationListResultIterator) Next() error {
3568	return iter.NextWithContext(context.Background())
3569}
3570
3571// NotDone returns true if the enumeration should be started or is not yet complete.
3572func (iter AuthorizationListResultIterator) NotDone() bool {
3573	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3574}
3575
3576// Response returns the raw server response from the last page request.
3577func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
3578	return iter.page.Response()
3579}
3580
3581// Value returns the current value or a zero-initialized value if the
3582// iterator has advanced beyond the end of the collection.
3583func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
3584	if !iter.page.NotDone() {
3585		return ExpressRouteCircuitAuthorization{}
3586	}
3587	return iter.page.Values()[iter.i]
3588}
3589
3590// Creates a new instance of the AuthorizationListResultIterator type.
3591func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
3592	return AuthorizationListResultIterator{page: page}
3593}
3594
3595// IsEmpty returns true if the ListResult contains no values.
3596func (alr AuthorizationListResult) IsEmpty() bool {
3597	return alr.Value == nil || len(*alr.Value) == 0
3598}
3599
3600// hasNextLink returns true if the NextLink is not empty.
3601func (alr AuthorizationListResult) hasNextLink() bool {
3602	return alr.NextLink != nil && len(*alr.NextLink) != 0
3603}
3604
3605// authorizationListResultPreparer prepares a request to retrieve the next set of results.
3606// It returns nil if no more results exist.
3607func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
3608	if !alr.hasNextLink() {
3609		return nil, nil
3610	}
3611	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3612		autorest.AsJSON(),
3613		autorest.AsGet(),
3614		autorest.WithBaseURL(to.String(alr.NextLink)))
3615}
3616
3617// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
3618type AuthorizationListResultPage struct {
3619	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
3620	alr AuthorizationListResult
3621}
3622
3623// NextWithContext advances to the next page of values.  If there was an error making
3624// the request the page does not advance and the error is returned.
3625func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
3626	if tracing.IsEnabled() {
3627		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
3628		defer func() {
3629			sc := -1
3630			if page.Response().Response.Response != nil {
3631				sc = page.Response().Response.Response.StatusCode
3632			}
3633			tracing.EndSpan(ctx, sc, err)
3634		}()
3635	}
3636	for {
3637		next, err := page.fn(ctx, page.alr)
3638		if err != nil {
3639			return err
3640		}
3641		page.alr = next
3642		if !next.hasNextLink() || !next.IsEmpty() {
3643			break
3644		}
3645	}
3646	return nil
3647}
3648
3649// Next advances to the next page of values.  If there was an error making
3650// the request the page does not advance and the error is returned.
3651// Deprecated: Use NextWithContext() instead.
3652func (page *AuthorizationListResultPage) Next() error {
3653	return page.NextWithContext(context.Background())
3654}
3655
3656// NotDone returns true if the page enumeration should be started or is not yet complete.
3657func (page AuthorizationListResultPage) NotDone() bool {
3658	return !page.alr.IsEmpty()
3659}
3660
3661// Response returns the raw server response from the last page request.
3662func (page AuthorizationListResultPage) Response() AuthorizationListResult {
3663	return page.alr
3664}
3665
3666// Values returns the slice of values for the current page or nil if there are no values.
3667func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
3668	if page.alr.IsEmpty() {
3669		return nil
3670	}
3671	return *page.alr.Value
3672}
3673
3674// Creates a new instance of the AuthorizationListResultPage type.
3675func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
3676	return AuthorizationListResultPage{
3677		fn:  getNextPage,
3678		alr: cur,
3679	}
3680}
3681
3682// AuthorizationPropertiesFormat properties of ExpressRouteCircuitAuthorization.
3683type AuthorizationPropertiesFormat struct {
3684	// AuthorizationKey - The authorization key.
3685	AuthorizationKey *string `json:"authorizationKey,omitempty"`
3686	// AuthorizationUseStatus - The authorization use status. Possible values include: 'Available', 'InUse'
3687	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
3688	// ProvisioningState - READ-ONLY; The provisioning state of the authorization resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3689	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3690}
3691
3692// MarshalJSON is the custom marshaler for AuthorizationPropertiesFormat.
3693func (apf AuthorizationPropertiesFormat) MarshalJSON() ([]byte, error) {
3694	objectMap := make(map[string]interface{})
3695	if apf.AuthorizationKey != nil {
3696		objectMap["authorizationKey"] = apf.AuthorizationKey
3697	}
3698	if apf.AuthorizationUseStatus != "" {
3699		objectMap["authorizationUseStatus"] = apf.AuthorizationUseStatus
3700	}
3701	return json.Marshal(objectMap)
3702}
3703
3704// AutoApprovedPrivateLinkService the information of an AutoApprovedPrivateLinkService.
3705type AutoApprovedPrivateLinkService struct {
3706	// PrivateLinkService - The id of the private link service resource.
3707	PrivateLinkService *string `json:"privateLinkService,omitempty"`
3708}
3709
3710// AutoApprovedPrivateLinkServicesResult an array of private link service id that can be linked to a
3711// private end point with auto approved.
3712type AutoApprovedPrivateLinkServicesResult struct {
3713	autorest.Response `json:"-"`
3714	// Value - An array of auto approved private link service.
3715	Value *[]AutoApprovedPrivateLinkService `json:"value,omitempty"`
3716	// NextLink - READ-ONLY; The URL to get the next set of results.
3717	NextLink *string `json:"nextLink,omitempty"`
3718}
3719
3720// MarshalJSON is the custom marshaler for AutoApprovedPrivateLinkServicesResult.
3721func (aaplsr AutoApprovedPrivateLinkServicesResult) MarshalJSON() ([]byte, error) {
3722	objectMap := make(map[string]interface{})
3723	if aaplsr.Value != nil {
3724		objectMap["value"] = aaplsr.Value
3725	}
3726	return json.Marshal(objectMap)
3727}
3728
3729// AutoApprovedPrivateLinkServicesResultIterator provides access to a complete listing of
3730// AutoApprovedPrivateLinkService values.
3731type AutoApprovedPrivateLinkServicesResultIterator struct {
3732	i    int
3733	page AutoApprovedPrivateLinkServicesResultPage
3734}
3735
3736// NextWithContext advances to the next value.  If there was an error making
3737// the request the iterator does not advance and the error is returned.
3738func (iter *AutoApprovedPrivateLinkServicesResultIterator) NextWithContext(ctx context.Context) (err error) {
3739	if tracing.IsEnabled() {
3740		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultIterator.NextWithContext")
3741		defer func() {
3742			sc := -1
3743			if iter.Response().Response.Response != nil {
3744				sc = iter.Response().Response.Response.StatusCode
3745			}
3746			tracing.EndSpan(ctx, sc, err)
3747		}()
3748	}
3749	iter.i++
3750	if iter.i < len(iter.page.Values()) {
3751		return nil
3752	}
3753	err = iter.page.NextWithContext(ctx)
3754	if err != nil {
3755		iter.i--
3756		return err
3757	}
3758	iter.i = 0
3759	return nil
3760}
3761
3762// Next advances to the next value.  If there was an error making
3763// the request the iterator does not advance and the error is returned.
3764// Deprecated: Use NextWithContext() instead.
3765func (iter *AutoApprovedPrivateLinkServicesResultIterator) Next() error {
3766	return iter.NextWithContext(context.Background())
3767}
3768
3769// NotDone returns true if the enumeration should be started or is not yet complete.
3770func (iter AutoApprovedPrivateLinkServicesResultIterator) NotDone() bool {
3771	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3772}
3773
3774// Response returns the raw server response from the last page request.
3775func (iter AutoApprovedPrivateLinkServicesResultIterator) Response() AutoApprovedPrivateLinkServicesResult {
3776	return iter.page.Response()
3777}
3778
3779// Value returns the current value or a zero-initialized value if the
3780// iterator has advanced beyond the end of the collection.
3781func (iter AutoApprovedPrivateLinkServicesResultIterator) Value() AutoApprovedPrivateLinkService {
3782	if !iter.page.NotDone() {
3783		return AutoApprovedPrivateLinkService{}
3784	}
3785	return iter.page.Values()[iter.i]
3786}
3787
3788// Creates a new instance of the AutoApprovedPrivateLinkServicesResultIterator type.
3789func NewAutoApprovedPrivateLinkServicesResultIterator(page AutoApprovedPrivateLinkServicesResultPage) AutoApprovedPrivateLinkServicesResultIterator {
3790	return AutoApprovedPrivateLinkServicesResultIterator{page: page}
3791}
3792
3793// IsEmpty returns true if the ListResult contains no values.
3794func (aaplsr AutoApprovedPrivateLinkServicesResult) IsEmpty() bool {
3795	return aaplsr.Value == nil || len(*aaplsr.Value) == 0
3796}
3797
3798// hasNextLink returns true if the NextLink is not empty.
3799func (aaplsr AutoApprovedPrivateLinkServicesResult) hasNextLink() bool {
3800	return aaplsr.NextLink != nil && len(*aaplsr.NextLink) != 0
3801}
3802
3803// autoApprovedPrivateLinkServicesResultPreparer prepares a request to retrieve the next set of results.
3804// It returns nil if no more results exist.
3805func (aaplsr AutoApprovedPrivateLinkServicesResult) autoApprovedPrivateLinkServicesResultPreparer(ctx context.Context) (*http.Request, error) {
3806	if !aaplsr.hasNextLink() {
3807		return nil, nil
3808	}
3809	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3810		autorest.AsJSON(),
3811		autorest.AsGet(),
3812		autorest.WithBaseURL(to.String(aaplsr.NextLink)))
3813}
3814
3815// AutoApprovedPrivateLinkServicesResultPage contains a page of AutoApprovedPrivateLinkService values.
3816type AutoApprovedPrivateLinkServicesResultPage struct {
3817	fn     func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)
3818	aaplsr AutoApprovedPrivateLinkServicesResult
3819}
3820
3821// NextWithContext advances to the next page of values.  If there was an error making
3822// the request the page does not advance and the error is returned.
3823func (page *AutoApprovedPrivateLinkServicesResultPage) NextWithContext(ctx context.Context) (err error) {
3824	if tracing.IsEnabled() {
3825		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultPage.NextWithContext")
3826		defer func() {
3827			sc := -1
3828			if page.Response().Response.Response != nil {
3829				sc = page.Response().Response.Response.StatusCode
3830			}
3831			tracing.EndSpan(ctx, sc, err)
3832		}()
3833	}
3834	for {
3835		next, err := page.fn(ctx, page.aaplsr)
3836		if err != nil {
3837			return err
3838		}
3839		page.aaplsr = next
3840		if !next.hasNextLink() || !next.IsEmpty() {
3841			break
3842		}
3843	}
3844	return nil
3845}
3846
3847// Next advances to the next page of values.  If there was an error making
3848// the request the page does not advance and the error is returned.
3849// Deprecated: Use NextWithContext() instead.
3850func (page *AutoApprovedPrivateLinkServicesResultPage) Next() error {
3851	return page.NextWithContext(context.Background())
3852}
3853
3854// NotDone returns true if the page enumeration should be started or is not yet complete.
3855func (page AutoApprovedPrivateLinkServicesResultPage) NotDone() bool {
3856	return !page.aaplsr.IsEmpty()
3857}
3858
3859// Response returns the raw server response from the last page request.
3860func (page AutoApprovedPrivateLinkServicesResultPage) Response() AutoApprovedPrivateLinkServicesResult {
3861	return page.aaplsr
3862}
3863
3864// Values returns the slice of values for the current page or nil if there are no values.
3865func (page AutoApprovedPrivateLinkServicesResultPage) Values() []AutoApprovedPrivateLinkService {
3866	if page.aaplsr.IsEmpty() {
3867		return nil
3868	}
3869	return *page.aaplsr.Value
3870}
3871
3872// Creates a new instance of the AutoApprovedPrivateLinkServicesResultPage type.
3873func NewAutoApprovedPrivateLinkServicesResultPage(cur AutoApprovedPrivateLinkServicesResult, getNextPage func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)) AutoApprovedPrivateLinkServicesResultPage {
3874	return AutoApprovedPrivateLinkServicesResultPage{
3875		fn:     getNextPage,
3876		aaplsr: cur,
3877	}
3878}
3879
3880// Availability availability of the metric.
3881type Availability struct {
3882	// TimeGrain - The time grain of the availability.
3883	TimeGrain *string `json:"timeGrain,omitempty"`
3884	// Retention - The retention of the availability.
3885	Retention *string `json:"retention,omitempty"`
3886	// BlobDuration - Duration of the availability blob.
3887	BlobDuration *string `json:"blobDuration,omitempty"`
3888}
3889
3890// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a
3891// subnet.
3892type AvailableDelegation struct {
3893	// Name - The name of the AvailableDelegation resource.
3894	Name *string `json:"name,omitempty"`
3895	// ID - A unique identifier of the AvailableDelegation resource.
3896	ID *string `json:"id,omitempty"`
3897	// Type - Resource type.
3898	Type *string `json:"type,omitempty"`
3899	// ServiceName - The name of the service and resource.
3900	ServiceName *string `json:"serviceName,omitempty"`
3901	// Actions - The actions permitted to the service upon delegation.
3902	Actions *[]string `json:"actions,omitempty"`
3903}
3904
3905// AvailableDelegationsResult an array of available delegations.
3906type AvailableDelegationsResult struct {
3907	autorest.Response `json:"-"`
3908	// Value - An array of available delegations.
3909	Value *[]AvailableDelegation `json:"value,omitempty"`
3910	// NextLink - READ-ONLY; The URL to get the next set of results.
3911	NextLink *string `json:"nextLink,omitempty"`
3912}
3913
3914// MarshalJSON is the custom marshaler for AvailableDelegationsResult.
3915func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) {
3916	objectMap := make(map[string]interface{})
3917	if adr.Value != nil {
3918		objectMap["value"] = adr.Value
3919	}
3920	return json.Marshal(objectMap)
3921}
3922
3923// AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values.
3924type AvailableDelegationsResultIterator struct {
3925	i    int
3926	page AvailableDelegationsResultPage
3927}
3928
3929// NextWithContext advances to the next value.  If there was an error making
3930// the request the iterator does not advance and the error is returned.
3931func (iter *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) {
3932	if tracing.IsEnabled() {
3933		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.NextWithContext")
3934		defer func() {
3935			sc := -1
3936			if iter.Response().Response.Response != nil {
3937				sc = iter.Response().Response.Response.StatusCode
3938			}
3939			tracing.EndSpan(ctx, sc, err)
3940		}()
3941	}
3942	iter.i++
3943	if iter.i < len(iter.page.Values()) {
3944		return nil
3945	}
3946	err = iter.page.NextWithContext(ctx)
3947	if err != nil {
3948		iter.i--
3949		return err
3950	}
3951	iter.i = 0
3952	return nil
3953}
3954
3955// Next advances to the next value.  If there was an error making
3956// the request the iterator does not advance and the error is returned.
3957// Deprecated: Use NextWithContext() instead.
3958func (iter *AvailableDelegationsResultIterator) Next() error {
3959	return iter.NextWithContext(context.Background())
3960}
3961
3962// NotDone returns true if the enumeration should be started or is not yet complete.
3963func (iter AvailableDelegationsResultIterator) NotDone() bool {
3964	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3965}
3966
3967// Response returns the raw server response from the last page request.
3968func (iter AvailableDelegationsResultIterator) Response() AvailableDelegationsResult {
3969	return iter.page.Response()
3970}
3971
3972// Value returns the current value or a zero-initialized value if the
3973// iterator has advanced beyond the end of the collection.
3974func (iter AvailableDelegationsResultIterator) Value() AvailableDelegation {
3975	if !iter.page.NotDone() {
3976		return AvailableDelegation{}
3977	}
3978	return iter.page.Values()[iter.i]
3979}
3980
3981// Creates a new instance of the AvailableDelegationsResultIterator type.
3982func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator {
3983	return AvailableDelegationsResultIterator{page: page}
3984}
3985
3986// IsEmpty returns true if the ListResult contains no values.
3987func (adr AvailableDelegationsResult) IsEmpty() bool {
3988	return adr.Value == nil || len(*adr.Value) == 0
3989}
3990
3991// hasNextLink returns true if the NextLink is not empty.
3992func (adr AvailableDelegationsResult) hasNextLink() bool {
3993	return adr.NextLink != nil && len(*adr.NextLink) != 0
3994}
3995
3996// availableDelegationsResultPreparer prepares a request to retrieve the next set of results.
3997// It returns nil if no more results exist.
3998func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) {
3999	if !adr.hasNextLink() {
4000		return nil, nil
4001	}
4002	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4003		autorest.AsJSON(),
4004		autorest.AsGet(),
4005		autorest.WithBaseURL(to.String(adr.NextLink)))
4006}
4007
4008// AvailableDelegationsResultPage contains a page of AvailableDelegation values.
4009type AvailableDelegationsResultPage struct {
4010	fn  func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)
4011	adr AvailableDelegationsResult
4012}
4013
4014// NextWithContext advances to the next page of values.  If there was an error making
4015// the request the page does not advance and the error is returned.
4016func (page *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) {
4017	if tracing.IsEnabled() {
4018		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.NextWithContext")
4019		defer func() {
4020			sc := -1
4021			if page.Response().Response.Response != nil {
4022				sc = page.Response().Response.Response.StatusCode
4023			}
4024			tracing.EndSpan(ctx, sc, err)
4025		}()
4026	}
4027	for {
4028		next, err := page.fn(ctx, page.adr)
4029		if err != nil {
4030			return err
4031		}
4032		page.adr = next
4033		if !next.hasNextLink() || !next.IsEmpty() {
4034			break
4035		}
4036	}
4037	return nil
4038}
4039
4040// Next advances to the next page of values.  If there was an error making
4041// the request the page does not advance and the error is returned.
4042// Deprecated: Use NextWithContext() instead.
4043func (page *AvailableDelegationsResultPage) Next() error {
4044	return page.NextWithContext(context.Background())
4045}
4046
4047// NotDone returns true if the page enumeration should be started or is not yet complete.
4048func (page AvailableDelegationsResultPage) NotDone() bool {
4049	return !page.adr.IsEmpty()
4050}
4051
4052// Response returns the raw server response from the last page request.
4053func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult {
4054	return page.adr
4055}
4056
4057// Values returns the slice of values for the current page or nil if there are no values.
4058func (page AvailableDelegationsResultPage) Values() []AvailableDelegation {
4059	if page.adr.IsEmpty() {
4060		return nil
4061	}
4062	return *page.adr.Value
4063}
4064
4065// Creates a new instance of the AvailableDelegationsResultPage type.
4066func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage {
4067	return AvailableDelegationsResultPage{
4068		fn:  getNextPage,
4069		adr: cur,
4070	}
4071}
4072
4073// AvailablePrivateEndpointType the information of an AvailablePrivateEndpointType.
4074type AvailablePrivateEndpointType struct {
4075	// Name - The name of the service and resource.
4076	Name *string `json:"name,omitempty"`
4077	// ID - A unique identifier of the AvailablePrivateEndpoint Type resource.
4078	ID *string `json:"id,omitempty"`
4079	// Type - Resource type.
4080	Type *string `json:"type,omitempty"`
4081	// ResourceName - The name of the service and resource.
4082	ResourceName *string `json:"resourceName,omitempty"`
4083}
4084
4085// AvailablePrivateEndpointTypesResult an array of available PrivateEndpoint types.
4086type AvailablePrivateEndpointTypesResult struct {
4087	autorest.Response `json:"-"`
4088	// Value - An array of available privateEndpoint type.
4089	Value *[]AvailablePrivateEndpointType `json:"value,omitempty"`
4090	// NextLink - READ-ONLY; The URL to get the next set of results.
4091	NextLink *string `json:"nextLink,omitempty"`
4092}
4093
4094// MarshalJSON is the custom marshaler for AvailablePrivateEndpointTypesResult.
4095func (apetr AvailablePrivateEndpointTypesResult) MarshalJSON() ([]byte, error) {
4096	objectMap := make(map[string]interface{})
4097	if apetr.Value != nil {
4098		objectMap["value"] = apetr.Value
4099	}
4100	return json.Marshal(objectMap)
4101}
4102
4103// AvailablePrivateEndpointTypesResultIterator provides access to a complete listing of
4104// AvailablePrivateEndpointType values.
4105type AvailablePrivateEndpointTypesResultIterator struct {
4106	i    int
4107	page AvailablePrivateEndpointTypesResultPage
4108}
4109
4110// NextWithContext advances to the next value.  If there was an error making
4111// the request the iterator does not advance and the error is returned.
4112func (iter *AvailablePrivateEndpointTypesResultIterator) NextWithContext(ctx context.Context) (err error) {
4113	if tracing.IsEnabled() {
4114		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultIterator.NextWithContext")
4115		defer func() {
4116			sc := -1
4117			if iter.Response().Response.Response != nil {
4118				sc = iter.Response().Response.Response.StatusCode
4119			}
4120			tracing.EndSpan(ctx, sc, err)
4121		}()
4122	}
4123	iter.i++
4124	if iter.i < len(iter.page.Values()) {
4125		return nil
4126	}
4127	err = iter.page.NextWithContext(ctx)
4128	if err != nil {
4129		iter.i--
4130		return err
4131	}
4132	iter.i = 0
4133	return nil
4134}
4135
4136// Next advances to the next value.  If there was an error making
4137// the request the iterator does not advance and the error is returned.
4138// Deprecated: Use NextWithContext() instead.
4139func (iter *AvailablePrivateEndpointTypesResultIterator) Next() error {
4140	return iter.NextWithContext(context.Background())
4141}
4142
4143// NotDone returns true if the enumeration should be started or is not yet complete.
4144func (iter AvailablePrivateEndpointTypesResultIterator) NotDone() bool {
4145	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4146}
4147
4148// Response returns the raw server response from the last page request.
4149func (iter AvailablePrivateEndpointTypesResultIterator) Response() AvailablePrivateEndpointTypesResult {
4150	return iter.page.Response()
4151}
4152
4153// Value returns the current value or a zero-initialized value if the
4154// iterator has advanced beyond the end of the collection.
4155func (iter AvailablePrivateEndpointTypesResultIterator) Value() AvailablePrivateEndpointType {
4156	if !iter.page.NotDone() {
4157		return AvailablePrivateEndpointType{}
4158	}
4159	return iter.page.Values()[iter.i]
4160}
4161
4162// Creates a new instance of the AvailablePrivateEndpointTypesResultIterator type.
4163func NewAvailablePrivateEndpointTypesResultIterator(page AvailablePrivateEndpointTypesResultPage) AvailablePrivateEndpointTypesResultIterator {
4164	return AvailablePrivateEndpointTypesResultIterator{page: page}
4165}
4166
4167// IsEmpty returns true if the ListResult contains no values.
4168func (apetr AvailablePrivateEndpointTypesResult) IsEmpty() bool {
4169	return apetr.Value == nil || len(*apetr.Value) == 0
4170}
4171
4172// hasNextLink returns true if the NextLink is not empty.
4173func (apetr AvailablePrivateEndpointTypesResult) hasNextLink() bool {
4174	return apetr.NextLink != nil && len(*apetr.NextLink) != 0
4175}
4176
4177// availablePrivateEndpointTypesResultPreparer prepares a request to retrieve the next set of results.
4178// It returns nil if no more results exist.
4179func (apetr AvailablePrivateEndpointTypesResult) availablePrivateEndpointTypesResultPreparer(ctx context.Context) (*http.Request, error) {
4180	if !apetr.hasNextLink() {
4181		return nil, nil
4182	}
4183	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4184		autorest.AsJSON(),
4185		autorest.AsGet(),
4186		autorest.WithBaseURL(to.String(apetr.NextLink)))
4187}
4188
4189// AvailablePrivateEndpointTypesResultPage contains a page of AvailablePrivateEndpointType values.
4190type AvailablePrivateEndpointTypesResultPage struct {
4191	fn    func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)
4192	apetr AvailablePrivateEndpointTypesResult
4193}
4194
4195// NextWithContext advances to the next page of values.  If there was an error making
4196// the request the page does not advance and the error is returned.
4197func (page *AvailablePrivateEndpointTypesResultPage) NextWithContext(ctx context.Context) (err error) {
4198	if tracing.IsEnabled() {
4199		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultPage.NextWithContext")
4200		defer func() {
4201			sc := -1
4202			if page.Response().Response.Response != nil {
4203				sc = page.Response().Response.Response.StatusCode
4204			}
4205			tracing.EndSpan(ctx, sc, err)
4206		}()
4207	}
4208	for {
4209		next, err := page.fn(ctx, page.apetr)
4210		if err != nil {
4211			return err
4212		}
4213		page.apetr = next
4214		if !next.hasNextLink() || !next.IsEmpty() {
4215			break
4216		}
4217	}
4218	return nil
4219}
4220
4221// Next advances to the next page of values.  If there was an error making
4222// the request the page does not advance and the error is returned.
4223// Deprecated: Use NextWithContext() instead.
4224func (page *AvailablePrivateEndpointTypesResultPage) Next() error {
4225	return page.NextWithContext(context.Background())
4226}
4227
4228// NotDone returns true if the page enumeration should be started or is not yet complete.
4229func (page AvailablePrivateEndpointTypesResultPage) NotDone() bool {
4230	return !page.apetr.IsEmpty()
4231}
4232
4233// Response returns the raw server response from the last page request.
4234func (page AvailablePrivateEndpointTypesResultPage) Response() AvailablePrivateEndpointTypesResult {
4235	return page.apetr
4236}
4237
4238// Values returns the slice of values for the current page or nil if there are no values.
4239func (page AvailablePrivateEndpointTypesResultPage) Values() []AvailablePrivateEndpointType {
4240	if page.apetr.IsEmpty() {
4241		return nil
4242	}
4243	return *page.apetr.Value
4244}
4245
4246// Creates a new instance of the AvailablePrivateEndpointTypesResultPage type.
4247func NewAvailablePrivateEndpointTypesResultPage(cur AvailablePrivateEndpointTypesResult, getNextPage func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)) AvailablePrivateEndpointTypesResultPage {
4248	return AvailablePrivateEndpointTypesResultPage{
4249		fn:    getNextPage,
4250		apetr: cur,
4251	}
4252}
4253
4254// AvailableProvidersList list of available countries with details.
4255type AvailableProvidersList struct {
4256	autorest.Response `json:"-"`
4257	// Countries - List of available countries.
4258	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
4259}
4260
4261// AvailableProvidersListCity city or town details.
4262type AvailableProvidersListCity struct {
4263	// CityName - The city or town name.
4264	CityName *string `json:"cityName,omitempty"`
4265	// Providers - A list of Internet service providers.
4266	Providers *[]string `json:"providers,omitempty"`
4267}
4268
4269// AvailableProvidersListCountry country details.
4270type AvailableProvidersListCountry struct {
4271	// CountryName - The country name.
4272	CountryName *string `json:"countryName,omitempty"`
4273	// Providers - A list of Internet service providers.
4274	Providers *[]string `json:"providers,omitempty"`
4275	// States - List of available states in the country.
4276	States *[]AvailableProvidersListState `json:"states,omitempty"`
4277}
4278
4279// AvailableProvidersListParameters constraints that determine the list of available Internet service
4280// providers.
4281type AvailableProvidersListParameters struct {
4282	// AzureLocations - A list of Azure regions.
4283	AzureLocations *[]string `json:"azureLocations,omitempty"`
4284	// Country - The country for available providers list.
4285	Country *string `json:"country,omitempty"`
4286	// State - The state for available providers list.
4287	State *string `json:"state,omitempty"`
4288	// City - The city or town for available providers list.
4289	City *string `json:"city,omitempty"`
4290}
4291
4292// AvailableProvidersListState state details.
4293type AvailableProvidersListState struct {
4294	// StateName - The state name.
4295	StateName *string `json:"stateName,omitempty"`
4296	// Providers - A list of Internet service providers.
4297	Providers *[]string `json:"providers,omitempty"`
4298	// Cities - List of available cities or towns in the state.
4299	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
4300}
4301
4302// AvailableServiceAlias the available service alias.
4303type AvailableServiceAlias struct {
4304	// Name - The name of the service alias.
4305	Name *string `json:"name,omitempty"`
4306	// ID - The ID of the service alias.
4307	ID *string `json:"id,omitempty"`
4308	// Type - The type of the resource.
4309	Type *string `json:"type,omitempty"`
4310	// ResourceName - The resource name of the service alias.
4311	ResourceName *string `json:"resourceName,omitempty"`
4312}
4313
4314// AvailableServiceAliasesResult an array of available service aliases.
4315type AvailableServiceAliasesResult struct {
4316	autorest.Response `json:"-"`
4317	// Value - An array of available service aliases.
4318	Value *[]AvailableServiceAlias `json:"value,omitempty"`
4319	// NextLink - READ-ONLY; The URL to get the next set of results.
4320	NextLink *string `json:"nextLink,omitempty"`
4321}
4322
4323// MarshalJSON is the custom marshaler for AvailableServiceAliasesResult.
4324func (asar AvailableServiceAliasesResult) MarshalJSON() ([]byte, error) {
4325	objectMap := make(map[string]interface{})
4326	if asar.Value != nil {
4327		objectMap["value"] = asar.Value
4328	}
4329	return json.Marshal(objectMap)
4330}
4331
4332// AvailableServiceAliasesResultIterator provides access to a complete listing of AvailableServiceAlias
4333// values.
4334type AvailableServiceAliasesResultIterator struct {
4335	i    int
4336	page AvailableServiceAliasesResultPage
4337}
4338
4339// NextWithContext advances to the next value.  If there was an error making
4340// the request the iterator does not advance and the error is returned.
4341func (iter *AvailableServiceAliasesResultIterator) NextWithContext(ctx context.Context) (err error) {
4342	if tracing.IsEnabled() {
4343		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesResultIterator.NextWithContext")
4344		defer func() {
4345			sc := -1
4346			if iter.Response().Response.Response != nil {
4347				sc = iter.Response().Response.Response.StatusCode
4348			}
4349			tracing.EndSpan(ctx, sc, err)
4350		}()
4351	}
4352	iter.i++
4353	if iter.i < len(iter.page.Values()) {
4354		return nil
4355	}
4356	err = iter.page.NextWithContext(ctx)
4357	if err != nil {
4358		iter.i--
4359		return err
4360	}
4361	iter.i = 0
4362	return nil
4363}
4364
4365// Next advances to the next value.  If there was an error making
4366// the request the iterator does not advance and the error is returned.
4367// Deprecated: Use NextWithContext() instead.
4368func (iter *AvailableServiceAliasesResultIterator) Next() error {
4369	return iter.NextWithContext(context.Background())
4370}
4371
4372// NotDone returns true if the enumeration should be started or is not yet complete.
4373func (iter AvailableServiceAliasesResultIterator) NotDone() bool {
4374	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4375}
4376
4377// Response returns the raw server response from the last page request.
4378func (iter AvailableServiceAliasesResultIterator) Response() AvailableServiceAliasesResult {
4379	return iter.page.Response()
4380}
4381
4382// Value returns the current value or a zero-initialized value if the
4383// iterator has advanced beyond the end of the collection.
4384func (iter AvailableServiceAliasesResultIterator) Value() AvailableServiceAlias {
4385	if !iter.page.NotDone() {
4386		return AvailableServiceAlias{}
4387	}
4388	return iter.page.Values()[iter.i]
4389}
4390
4391// Creates a new instance of the AvailableServiceAliasesResultIterator type.
4392func NewAvailableServiceAliasesResultIterator(page AvailableServiceAliasesResultPage) AvailableServiceAliasesResultIterator {
4393	return AvailableServiceAliasesResultIterator{page: page}
4394}
4395
4396// IsEmpty returns true if the ListResult contains no values.
4397func (asar AvailableServiceAliasesResult) IsEmpty() bool {
4398	return asar.Value == nil || len(*asar.Value) == 0
4399}
4400
4401// hasNextLink returns true if the NextLink is not empty.
4402func (asar AvailableServiceAliasesResult) hasNextLink() bool {
4403	return asar.NextLink != nil && len(*asar.NextLink) != 0
4404}
4405
4406// availableServiceAliasesResultPreparer prepares a request to retrieve the next set of results.
4407// It returns nil if no more results exist.
4408func (asar AvailableServiceAliasesResult) availableServiceAliasesResultPreparer(ctx context.Context) (*http.Request, error) {
4409	if !asar.hasNextLink() {
4410		return nil, nil
4411	}
4412	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4413		autorest.AsJSON(),
4414		autorest.AsGet(),
4415		autorest.WithBaseURL(to.String(asar.NextLink)))
4416}
4417
4418// AvailableServiceAliasesResultPage contains a page of AvailableServiceAlias values.
4419type AvailableServiceAliasesResultPage struct {
4420	fn   func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error)
4421	asar AvailableServiceAliasesResult
4422}
4423
4424// NextWithContext advances to the next page of values.  If there was an error making
4425// the request the page does not advance and the error is returned.
4426func (page *AvailableServiceAliasesResultPage) NextWithContext(ctx context.Context) (err error) {
4427	if tracing.IsEnabled() {
4428		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesResultPage.NextWithContext")
4429		defer func() {
4430			sc := -1
4431			if page.Response().Response.Response != nil {
4432				sc = page.Response().Response.Response.StatusCode
4433			}
4434			tracing.EndSpan(ctx, sc, err)
4435		}()
4436	}
4437	for {
4438		next, err := page.fn(ctx, page.asar)
4439		if err != nil {
4440			return err
4441		}
4442		page.asar = next
4443		if !next.hasNextLink() || !next.IsEmpty() {
4444			break
4445		}
4446	}
4447	return nil
4448}
4449
4450// Next advances to the next page of values.  If there was an error making
4451// the request the page does not advance and the error is returned.
4452// Deprecated: Use NextWithContext() instead.
4453func (page *AvailableServiceAliasesResultPage) Next() error {
4454	return page.NextWithContext(context.Background())
4455}
4456
4457// NotDone returns true if the page enumeration should be started or is not yet complete.
4458func (page AvailableServiceAliasesResultPage) NotDone() bool {
4459	return !page.asar.IsEmpty()
4460}
4461
4462// Response returns the raw server response from the last page request.
4463func (page AvailableServiceAliasesResultPage) Response() AvailableServiceAliasesResult {
4464	return page.asar
4465}
4466
4467// Values returns the slice of values for the current page or nil if there are no values.
4468func (page AvailableServiceAliasesResultPage) Values() []AvailableServiceAlias {
4469	if page.asar.IsEmpty() {
4470		return nil
4471	}
4472	return *page.asar.Value
4473}
4474
4475// Creates a new instance of the AvailableServiceAliasesResultPage type.
4476func NewAvailableServiceAliasesResultPage(cur AvailableServiceAliasesResult, getNextPage func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error)) AvailableServiceAliasesResultPage {
4477	return AvailableServiceAliasesResultPage{
4478		fn:   getNextPage,
4479		asar: cur,
4480	}
4481}
4482
4483// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
4484// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
4485// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
4486// operation succeeded, the response body includes the HTTP status code for the successful request. If the
4487// asynchronous operation failed, the response body includes the HTTP status code for the failed request
4488// and error information regarding the failure.
4489type AzureAsyncOperationResult struct {
4490	// Status - Status of the Azure async operation. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
4491	Status OperationStatus `json:"status,omitempty"`
4492	// Error - Details of the error occurred during specified asynchronous operation.
4493	Error *Error `json:"error,omitempty"`
4494}
4495
4496// AzureFirewall azure Firewall resource.
4497type AzureFirewall struct {
4498	autorest.Response `json:"-"`
4499	// AzureFirewallPropertiesFormat - Properties of the azure firewall.
4500	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
4501	// Zones - A list of availability zones denoting where the resource needs to come from.
4502	Zones *[]string `json:"zones,omitempty"`
4503	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4504	Etag *string `json:"etag,omitempty"`
4505	// ID - Resource ID.
4506	ID *string `json:"id,omitempty"`
4507	// Name - READ-ONLY; Resource name.
4508	Name *string `json:"name,omitempty"`
4509	// Type - READ-ONLY; Resource type.
4510	Type *string `json:"type,omitempty"`
4511	// Location - Resource location.
4512	Location *string `json:"location,omitempty"`
4513	// Tags - Resource tags.
4514	Tags map[string]*string `json:"tags"`
4515}
4516
4517// MarshalJSON is the custom marshaler for AzureFirewall.
4518func (af AzureFirewall) MarshalJSON() ([]byte, error) {
4519	objectMap := make(map[string]interface{})
4520	if af.AzureFirewallPropertiesFormat != nil {
4521		objectMap["properties"] = af.AzureFirewallPropertiesFormat
4522	}
4523	if af.Zones != nil {
4524		objectMap["zones"] = af.Zones
4525	}
4526	if af.ID != nil {
4527		objectMap["id"] = af.ID
4528	}
4529	if af.Location != nil {
4530		objectMap["location"] = af.Location
4531	}
4532	if af.Tags != nil {
4533		objectMap["tags"] = af.Tags
4534	}
4535	return json.Marshal(objectMap)
4536}
4537
4538// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
4539func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
4540	var m map[string]*json.RawMessage
4541	err := json.Unmarshal(body, &m)
4542	if err != nil {
4543		return err
4544	}
4545	for k, v := range m {
4546		switch k {
4547		case "properties":
4548			if v != nil {
4549				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
4550				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
4551				if err != nil {
4552					return err
4553				}
4554				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
4555			}
4556		case "zones":
4557			if v != nil {
4558				var zones []string
4559				err = json.Unmarshal(*v, &zones)
4560				if err != nil {
4561					return err
4562				}
4563				af.Zones = &zones
4564			}
4565		case "etag":
4566			if v != nil {
4567				var etag string
4568				err = json.Unmarshal(*v, &etag)
4569				if err != nil {
4570					return err
4571				}
4572				af.Etag = &etag
4573			}
4574		case "id":
4575			if v != nil {
4576				var ID string
4577				err = json.Unmarshal(*v, &ID)
4578				if err != nil {
4579					return err
4580				}
4581				af.ID = &ID
4582			}
4583		case "name":
4584			if v != nil {
4585				var name string
4586				err = json.Unmarshal(*v, &name)
4587				if err != nil {
4588					return err
4589				}
4590				af.Name = &name
4591			}
4592		case "type":
4593			if v != nil {
4594				var typeVar string
4595				err = json.Unmarshal(*v, &typeVar)
4596				if err != nil {
4597					return err
4598				}
4599				af.Type = &typeVar
4600			}
4601		case "location":
4602			if v != nil {
4603				var location string
4604				err = json.Unmarshal(*v, &location)
4605				if err != nil {
4606					return err
4607				}
4608				af.Location = &location
4609			}
4610		case "tags":
4611			if v != nil {
4612				var tags map[string]*string
4613				err = json.Unmarshal(*v, &tags)
4614				if err != nil {
4615					return err
4616				}
4617				af.Tags = tags
4618			}
4619		}
4620	}
4621
4622	return nil
4623}
4624
4625// AzureFirewallApplicationRule properties of an application rule.
4626type AzureFirewallApplicationRule struct {
4627	// Name - Name of the application rule.
4628	Name *string `json:"name,omitempty"`
4629	// Description - Description of the rule.
4630	Description *string `json:"description,omitempty"`
4631	// SourceAddresses - List of source IP addresses for this rule.
4632	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4633	// Protocols - Array of ApplicationRuleProtocols.
4634	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
4635	// TargetFqdns - List of FQDNs for this rule.
4636	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
4637	// FqdnTags - List of FQDN Tags for this rule.
4638	FqdnTags *[]string `json:"fqdnTags,omitempty"`
4639	// SourceIPGroups - List of source IpGroups for this rule.
4640	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
4641}
4642
4643// AzureFirewallApplicationRuleCollection application rule collection resource.
4644type AzureFirewallApplicationRuleCollection struct {
4645	// AzureFirewallApplicationRuleCollectionPropertiesFormat - Properties of the azure firewall application rule collection.
4646	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
4647	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
4648	Name *string `json:"name,omitempty"`
4649	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4650	Etag *string `json:"etag,omitempty"`
4651	// ID - Resource ID.
4652	ID *string `json:"id,omitempty"`
4653}
4654
4655// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
4656func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
4657	objectMap := make(map[string]interface{})
4658	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
4659		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
4660	}
4661	if afarc.Name != nil {
4662		objectMap["name"] = afarc.Name
4663	}
4664	if afarc.ID != nil {
4665		objectMap["id"] = afarc.ID
4666	}
4667	return json.Marshal(objectMap)
4668}
4669
4670// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
4671func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
4672	var m map[string]*json.RawMessage
4673	err := json.Unmarshal(body, &m)
4674	if err != nil {
4675		return err
4676	}
4677	for k, v := range m {
4678		switch k {
4679		case "properties":
4680			if v != nil {
4681				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
4682				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
4683				if err != nil {
4684					return err
4685				}
4686				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
4687			}
4688		case "name":
4689			if v != nil {
4690				var name string
4691				err = json.Unmarshal(*v, &name)
4692				if err != nil {
4693					return err
4694				}
4695				afarc.Name = &name
4696			}
4697		case "etag":
4698			if v != nil {
4699				var etag string
4700				err = json.Unmarshal(*v, &etag)
4701				if err != nil {
4702					return err
4703				}
4704				afarc.Etag = &etag
4705			}
4706		case "id":
4707			if v != nil {
4708				var ID string
4709				err = json.Unmarshal(*v, &ID)
4710				if err != nil {
4711					return err
4712				}
4713				afarc.ID = &ID
4714			}
4715		}
4716	}
4717
4718	return nil
4719}
4720
4721// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
4722type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
4723	// Priority - Priority of the application rule collection resource.
4724	Priority *int32 `json:"priority,omitempty"`
4725	// Action - The action type of a rule collection.
4726	Action *AzureFirewallRCAction `json:"action,omitempty"`
4727	// Rules - Collection of rules used by a application rule collection.
4728	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
4729	// ProvisioningState - READ-ONLY; The provisioning state of the application rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4730	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4731}
4732
4733// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollectionPropertiesFormat.
4734func (afarcpf AzureFirewallApplicationRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) {
4735	objectMap := make(map[string]interface{})
4736	if afarcpf.Priority != nil {
4737		objectMap["priority"] = afarcpf.Priority
4738	}
4739	if afarcpf.Action != nil {
4740		objectMap["action"] = afarcpf.Action
4741	}
4742	if afarcpf.Rules != nil {
4743		objectMap["rules"] = afarcpf.Rules
4744	}
4745	return json.Marshal(objectMap)
4746}
4747
4748// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
4749type AzureFirewallApplicationRuleProtocol struct {
4750	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS', 'AzureFirewallApplicationRuleProtocolTypeMssql'
4751	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
4752	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
4753	Port *int32 `json:"port,omitempty"`
4754}
4755
4756// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource.
4757type AzureFirewallFqdnTag struct {
4758	// AzureFirewallFqdnTagPropertiesFormat - Properties of the azure firewall FQDN tag.
4759	*AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"`
4760	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4761	Etag *string `json:"etag,omitempty"`
4762	// ID - Resource ID.
4763	ID *string `json:"id,omitempty"`
4764	// Name - READ-ONLY; Resource name.
4765	Name *string `json:"name,omitempty"`
4766	// Type - READ-ONLY; Resource type.
4767	Type *string `json:"type,omitempty"`
4768	// Location - Resource location.
4769	Location *string `json:"location,omitempty"`
4770	// Tags - Resource tags.
4771	Tags map[string]*string `json:"tags"`
4772}
4773
4774// MarshalJSON is the custom marshaler for AzureFirewallFqdnTag.
4775func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) {
4776	objectMap := make(map[string]interface{})
4777	if afft.AzureFirewallFqdnTagPropertiesFormat != nil {
4778		objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat
4779	}
4780	if afft.ID != nil {
4781		objectMap["id"] = afft.ID
4782	}
4783	if afft.Location != nil {
4784		objectMap["location"] = afft.Location
4785	}
4786	if afft.Tags != nil {
4787		objectMap["tags"] = afft.Tags
4788	}
4789	return json.Marshal(objectMap)
4790}
4791
4792// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct.
4793func (afft *AzureFirewallFqdnTag) UnmarshalJSON(body []byte) error {
4794	var m map[string]*json.RawMessage
4795	err := json.Unmarshal(body, &m)
4796	if err != nil {
4797		return err
4798	}
4799	for k, v := range m {
4800		switch k {
4801		case "properties":
4802			if v != nil {
4803				var azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat
4804				err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat)
4805				if err != nil {
4806					return err
4807				}
4808				afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat
4809			}
4810		case "etag":
4811			if v != nil {
4812				var etag string
4813				err = json.Unmarshal(*v, &etag)
4814				if err != nil {
4815					return err
4816				}
4817				afft.Etag = &etag
4818			}
4819		case "id":
4820			if v != nil {
4821				var ID string
4822				err = json.Unmarshal(*v, &ID)
4823				if err != nil {
4824					return err
4825				}
4826				afft.ID = &ID
4827			}
4828		case "name":
4829			if v != nil {
4830				var name string
4831				err = json.Unmarshal(*v, &name)
4832				if err != nil {
4833					return err
4834				}
4835				afft.Name = &name
4836			}
4837		case "type":
4838			if v != nil {
4839				var typeVar string
4840				err = json.Unmarshal(*v, &typeVar)
4841				if err != nil {
4842					return err
4843				}
4844				afft.Type = &typeVar
4845			}
4846		case "location":
4847			if v != nil {
4848				var location string
4849				err = json.Unmarshal(*v, &location)
4850				if err != nil {
4851					return err
4852				}
4853				afft.Location = &location
4854			}
4855		case "tags":
4856			if v != nil {
4857				var tags map[string]*string
4858				err = json.Unmarshal(*v, &tags)
4859				if err != nil {
4860					return err
4861				}
4862				afft.Tags = tags
4863			}
4864		}
4865	}
4866
4867	return nil
4868}
4869
4870// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call.
4871type AzureFirewallFqdnTagListResult struct {
4872	autorest.Response `json:"-"`
4873	// Value - List of Azure Firewall FQDN Tags in a resource group.
4874	Value *[]AzureFirewallFqdnTag `json:"value,omitempty"`
4875	// NextLink - URL to get the next set of results.
4876	NextLink *string `json:"nextLink,omitempty"`
4877}
4878
4879// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag
4880// values.
4881type AzureFirewallFqdnTagListResultIterator struct {
4882	i    int
4883	page AzureFirewallFqdnTagListResultPage
4884}
4885
4886// NextWithContext advances to the next value.  If there was an error making
4887// the request the iterator does not advance and the error is returned.
4888func (iter *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) {
4889	if tracing.IsEnabled() {
4890		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.NextWithContext")
4891		defer func() {
4892			sc := -1
4893			if iter.Response().Response.Response != nil {
4894				sc = iter.Response().Response.Response.StatusCode
4895			}
4896			tracing.EndSpan(ctx, sc, err)
4897		}()
4898	}
4899	iter.i++
4900	if iter.i < len(iter.page.Values()) {
4901		return nil
4902	}
4903	err = iter.page.NextWithContext(ctx)
4904	if err != nil {
4905		iter.i--
4906		return err
4907	}
4908	iter.i = 0
4909	return nil
4910}
4911
4912// Next advances to the next value.  If there was an error making
4913// the request the iterator does not advance and the error is returned.
4914// Deprecated: Use NextWithContext() instead.
4915func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
4916	return iter.NextWithContext(context.Background())
4917}
4918
4919// NotDone returns true if the enumeration should be started or is not yet complete.
4920func (iter AzureFirewallFqdnTagListResultIterator) NotDone() bool {
4921	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4922}
4923
4924// Response returns the raw server response from the last page request.
4925func (iter AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult {
4926	return iter.page.Response()
4927}
4928
4929// Value returns the current value or a zero-initialized value if the
4930// iterator has advanced beyond the end of the collection.
4931func (iter AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag {
4932	if !iter.page.NotDone() {
4933		return AzureFirewallFqdnTag{}
4934	}
4935	return iter.page.Values()[iter.i]
4936}
4937
4938// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type.
4939func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator {
4940	return AzureFirewallFqdnTagListResultIterator{page: page}
4941}
4942
4943// IsEmpty returns true if the ListResult contains no values.
4944func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
4945	return afftlr.Value == nil || len(*afftlr.Value) == 0
4946}
4947
4948// hasNextLink returns true if the NextLink is not empty.
4949func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool {
4950	return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0
4951}
4952
4953// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results.
4954// It returns nil if no more results exist.
4955func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) {
4956	if !afftlr.hasNextLink() {
4957		return nil, nil
4958	}
4959	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4960		autorest.AsJSON(),
4961		autorest.AsGet(),
4962		autorest.WithBaseURL(to.String(afftlr.NextLink)))
4963}
4964
4965// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values.
4966type AzureFirewallFqdnTagListResultPage struct {
4967	fn     func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
4968	afftlr AzureFirewallFqdnTagListResult
4969}
4970
4971// NextWithContext advances to the next page of values.  If there was an error making
4972// the request the page does not advance and the error is returned.
4973func (page *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) {
4974	if tracing.IsEnabled() {
4975		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.NextWithContext")
4976		defer func() {
4977			sc := -1
4978			if page.Response().Response.Response != nil {
4979				sc = page.Response().Response.Response.StatusCode
4980			}
4981			tracing.EndSpan(ctx, sc, err)
4982		}()
4983	}
4984	for {
4985		next, err := page.fn(ctx, page.afftlr)
4986		if err != nil {
4987			return err
4988		}
4989		page.afftlr = next
4990		if !next.hasNextLink() || !next.IsEmpty() {
4991			break
4992		}
4993	}
4994	return nil
4995}
4996
4997// Next advances to the next page of values.  If there was an error making
4998// the request the page does not advance and the error is returned.
4999// Deprecated: Use NextWithContext() instead.
5000func (page *AzureFirewallFqdnTagListResultPage) Next() error {
5001	return page.NextWithContext(context.Background())
5002}
5003
5004// NotDone returns true if the page enumeration should be started or is not yet complete.
5005func (page AzureFirewallFqdnTagListResultPage) NotDone() bool {
5006	return !page.afftlr.IsEmpty()
5007}
5008
5009// Response returns the raw server response from the last page request.
5010func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult {
5011	return page.afftlr
5012}
5013
5014// Values returns the slice of values for the current page or nil if there are no values.
5015func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag {
5016	if page.afftlr.IsEmpty() {
5017		return nil
5018	}
5019	return *page.afftlr.Value
5020}
5021
5022// Creates a new instance of the AzureFirewallFqdnTagListResultPage type.
5023func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage {
5024	return AzureFirewallFqdnTagListResultPage{
5025		fn:     getNextPage,
5026		afftlr: cur,
5027	}
5028}
5029
5030// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties.
5031type AzureFirewallFqdnTagPropertiesFormat struct {
5032	// ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall FQDN tag resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5033	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5034	// FqdnTagName - READ-ONLY; The name of this FQDN Tag.
5035	FqdnTagName *string `json:"fqdnTagName,omitempty"`
5036}
5037
5038// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
5039type AzureFirewallIPConfiguration struct {
5040	// AzureFirewallIPConfigurationPropertiesFormat - Properties of the azure firewall IP configuration.
5041	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
5042	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
5043	Name *string `json:"name,omitempty"`
5044	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5045	Etag *string `json:"etag,omitempty"`
5046	// Type - READ-ONLY; Type of the resource.
5047	Type *string `json:"type,omitempty"`
5048	// ID - Resource ID.
5049	ID *string `json:"id,omitempty"`
5050}
5051
5052// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
5053func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
5054	objectMap := make(map[string]interface{})
5055	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
5056		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
5057	}
5058	if afic.Name != nil {
5059		objectMap["name"] = afic.Name
5060	}
5061	if afic.ID != nil {
5062		objectMap["id"] = afic.ID
5063	}
5064	return json.Marshal(objectMap)
5065}
5066
5067// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
5068func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
5069	var m map[string]*json.RawMessage
5070	err := json.Unmarshal(body, &m)
5071	if err != nil {
5072		return err
5073	}
5074	for k, v := range m {
5075		switch k {
5076		case "properties":
5077			if v != nil {
5078				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
5079				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
5080				if err != nil {
5081					return err
5082				}
5083				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
5084			}
5085		case "name":
5086			if v != nil {
5087				var name string
5088				err = json.Unmarshal(*v, &name)
5089				if err != nil {
5090					return err
5091				}
5092				afic.Name = &name
5093			}
5094		case "etag":
5095			if v != nil {
5096				var etag string
5097				err = json.Unmarshal(*v, &etag)
5098				if err != nil {
5099					return err
5100				}
5101				afic.Etag = &etag
5102			}
5103		case "type":
5104			if v != nil {
5105				var typeVar string
5106				err = json.Unmarshal(*v, &typeVar)
5107				if err != nil {
5108					return err
5109				}
5110				afic.Type = &typeVar
5111			}
5112		case "id":
5113			if v != nil {
5114				var ID string
5115				err = json.Unmarshal(*v, &ID)
5116				if err != nil {
5117					return err
5118				}
5119				afic.ID = &ID
5120			}
5121		}
5122	}
5123
5124	return nil
5125}
5126
5127// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
5128type AzureFirewallIPConfigurationPropertiesFormat struct {
5129	// PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
5130	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
5131	// Subnet - Reference to the subnet resource. This resource must be named 'AzureFirewallSubnet' or 'AzureFirewallManagementSubnet'.
5132	Subnet *SubResource `json:"subnet,omitempty"`
5133	// PublicIPAddress - Reference to the PublicIP resource. This field is a mandatory input if subnet is not null.
5134	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
5135	// ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5136	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5137}
5138
5139// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat.
5140func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
5141	objectMap := make(map[string]interface{})
5142	if aficpf.Subnet != nil {
5143		objectMap["subnet"] = aficpf.Subnet
5144	}
5145	if aficpf.PublicIPAddress != nil {
5146		objectMap["publicIPAddress"] = aficpf.PublicIPAddress
5147	}
5148	return json.Marshal(objectMap)
5149}
5150
5151// AzureFirewallIPGroups ipGroups associated with azure firewall.
5152type AzureFirewallIPGroups struct {
5153	// ID - READ-ONLY; Resource ID.
5154	ID *string `json:"id,omitempty"`
5155	// ChangeNumber - READ-ONLY; The iteration number.
5156	ChangeNumber *string `json:"changeNumber,omitempty"`
5157}
5158
5159// AzureFirewallListResult response for ListAzureFirewalls API service call.
5160type AzureFirewallListResult struct {
5161	autorest.Response `json:"-"`
5162	// Value - List of Azure Firewalls in a resource group.
5163	Value *[]AzureFirewall `json:"value,omitempty"`
5164	// NextLink - URL to get the next set of results.
5165	NextLink *string `json:"nextLink,omitempty"`
5166}
5167
5168// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
5169type AzureFirewallListResultIterator struct {
5170	i    int
5171	page AzureFirewallListResultPage
5172}
5173
5174// NextWithContext advances to the next value.  If there was an error making
5175// the request the iterator does not advance and the error is returned.
5176func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
5177	if tracing.IsEnabled() {
5178		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
5179		defer func() {
5180			sc := -1
5181			if iter.Response().Response.Response != nil {
5182				sc = iter.Response().Response.Response.StatusCode
5183			}
5184			tracing.EndSpan(ctx, sc, err)
5185		}()
5186	}
5187	iter.i++
5188	if iter.i < len(iter.page.Values()) {
5189		return nil
5190	}
5191	err = iter.page.NextWithContext(ctx)
5192	if err != nil {
5193		iter.i--
5194		return err
5195	}
5196	iter.i = 0
5197	return nil
5198}
5199
5200// Next advances to the next value.  If there was an error making
5201// the request the iterator does not advance and the error is returned.
5202// Deprecated: Use NextWithContext() instead.
5203func (iter *AzureFirewallListResultIterator) Next() error {
5204	return iter.NextWithContext(context.Background())
5205}
5206
5207// NotDone returns true if the enumeration should be started or is not yet complete.
5208func (iter AzureFirewallListResultIterator) NotDone() bool {
5209	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5210}
5211
5212// Response returns the raw server response from the last page request.
5213func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
5214	return iter.page.Response()
5215}
5216
5217// Value returns the current value or a zero-initialized value if the
5218// iterator has advanced beyond the end of the collection.
5219func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
5220	if !iter.page.NotDone() {
5221		return AzureFirewall{}
5222	}
5223	return iter.page.Values()[iter.i]
5224}
5225
5226// Creates a new instance of the AzureFirewallListResultIterator type.
5227func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
5228	return AzureFirewallListResultIterator{page: page}
5229}
5230
5231// IsEmpty returns true if the ListResult contains no values.
5232func (aflr AzureFirewallListResult) IsEmpty() bool {
5233	return aflr.Value == nil || len(*aflr.Value) == 0
5234}
5235
5236// hasNextLink returns true if the NextLink is not empty.
5237func (aflr AzureFirewallListResult) hasNextLink() bool {
5238	return aflr.NextLink != nil && len(*aflr.NextLink) != 0
5239}
5240
5241// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
5242// It returns nil if no more results exist.
5243func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
5244	if !aflr.hasNextLink() {
5245		return nil, nil
5246	}
5247	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5248		autorest.AsJSON(),
5249		autorest.AsGet(),
5250		autorest.WithBaseURL(to.String(aflr.NextLink)))
5251}
5252
5253// AzureFirewallListResultPage contains a page of AzureFirewall values.
5254type AzureFirewallListResultPage struct {
5255	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
5256	aflr AzureFirewallListResult
5257}
5258
5259// NextWithContext advances to the next page of values.  If there was an error making
5260// the request the page does not advance and the error is returned.
5261func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
5262	if tracing.IsEnabled() {
5263		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
5264		defer func() {
5265			sc := -1
5266			if page.Response().Response.Response != nil {
5267				sc = page.Response().Response.Response.StatusCode
5268			}
5269			tracing.EndSpan(ctx, sc, err)
5270		}()
5271	}
5272	for {
5273		next, err := page.fn(ctx, page.aflr)
5274		if err != nil {
5275			return err
5276		}
5277		page.aflr = next
5278		if !next.hasNextLink() || !next.IsEmpty() {
5279			break
5280		}
5281	}
5282	return nil
5283}
5284
5285// Next advances to the next page of values.  If there was an error making
5286// the request the page does not advance and the error is returned.
5287// Deprecated: Use NextWithContext() instead.
5288func (page *AzureFirewallListResultPage) Next() error {
5289	return page.NextWithContext(context.Background())
5290}
5291
5292// NotDone returns true if the page enumeration should be started or is not yet complete.
5293func (page AzureFirewallListResultPage) NotDone() bool {
5294	return !page.aflr.IsEmpty()
5295}
5296
5297// Response returns the raw server response from the last page request.
5298func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
5299	return page.aflr
5300}
5301
5302// Values returns the slice of values for the current page or nil if there are no values.
5303func (page AzureFirewallListResultPage) Values() []AzureFirewall {
5304	if page.aflr.IsEmpty() {
5305		return nil
5306	}
5307	return *page.aflr.Value
5308}
5309
5310// Creates a new instance of the AzureFirewallListResultPage type.
5311func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
5312	return AzureFirewallListResultPage{
5313		fn:   getNextPage,
5314		aflr: cur,
5315	}
5316}
5317
5318// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action.
5319type AzureFirewallNatRCAction struct {
5320	// Type - The type of action. Possible values include: 'Snat', 'Dnat'
5321	Type AzureFirewallNatRCActionType `json:"type,omitempty"`
5322}
5323
5324// AzureFirewallNatRule properties of a NAT rule.
5325type AzureFirewallNatRule struct {
5326	// Name - Name of the NAT rule.
5327	Name *string `json:"name,omitempty"`
5328	// Description - Description of the rule.
5329	Description *string `json:"description,omitempty"`
5330	// SourceAddresses - List of source IP addresses for this rule.
5331	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
5332	// DestinationAddresses - List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags.
5333	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
5334	// DestinationPorts - List of destination ports.
5335	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
5336	// Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule.
5337	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
5338	// TranslatedAddress - The translated address for this NAT rule.
5339	TranslatedAddress *string `json:"translatedAddress,omitempty"`
5340	// TranslatedPort - The translated port for this NAT rule.
5341	TranslatedPort *string `json:"translatedPort,omitempty"`
5342	// TranslatedFqdn - The translated FQDN for this NAT rule.
5343	TranslatedFqdn *string `json:"translatedFqdn,omitempty"`
5344	// SourceIPGroups - List of source IpGroups for this rule.
5345	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
5346}
5347
5348// AzureFirewallNatRuleCollection NAT rule collection resource.
5349type AzureFirewallNatRuleCollection struct {
5350	// AzureFirewallNatRuleCollectionProperties - Properties of the azure firewall NAT rule collection.
5351	*AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"`
5352	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
5353	Name *string `json:"name,omitempty"`
5354	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5355	Etag *string `json:"etag,omitempty"`
5356	// ID - Resource ID.
5357	ID *string `json:"id,omitempty"`
5358}
5359
5360// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection.
5361func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) {
5362	objectMap := make(map[string]interface{})
5363	if afnrc.AzureFirewallNatRuleCollectionProperties != nil {
5364		objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties
5365	}
5366	if afnrc.Name != nil {
5367		objectMap["name"] = afnrc.Name
5368	}
5369	if afnrc.ID != nil {
5370		objectMap["id"] = afnrc.ID
5371	}
5372	return json.Marshal(objectMap)
5373}
5374
5375// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct.
5376func (afnrc *AzureFirewallNatRuleCollection) UnmarshalJSON(body []byte) error {
5377	var m map[string]*json.RawMessage
5378	err := json.Unmarshal(body, &m)
5379	if err != nil {
5380		return err
5381	}
5382	for k, v := range m {
5383		switch k {
5384		case "properties":
5385			if v != nil {
5386				var azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties
5387				err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties)
5388				if err != nil {
5389					return err
5390				}
5391				afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties
5392			}
5393		case "name":
5394			if v != nil {
5395				var name string
5396				err = json.Unmarshal(*v, &name)
5397				if err != nil {
5398					return err
5399				}
5400				afnrc.Name = &name
5401			}
5402		case "etag":
5403			if v != nil {
5404				var etag string
5405				err = json.Unmarshal(*v, &etag)
5406				if err != nil {
5407					return err
5408				}
5409				afnrc.Etag = &etag
5410			}
5411		case "id":
5412			if v != nil {
5413				var ID string
5414				err = json.Unmarshal(*v, &ID)
5415				if err != nil {
5416					return err
5417				}
5418				afnrc.ID = &ID
5419			}
5420		}
5421	}
5422
5423	return nil
5424}
5425
5426// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection.
5427type AzureFirewallNatRuleCollectionProperties struct {
5428	// Priority - Priority of the NAT rule collection resource.
5429	Priority *int32 `json:"priority,omitempty"`
5430	// Action - The action type of a NAT rule collection.
5431	Action *AzureFirewallNatRCAction `json:"action,omitempty"`
5432	// Rules - Collection of rules used by a NAT rule collection.
5433	Rules *[]AzureFirewallNatRule `json:"rules,omitempty"`
5434	// ProvisioningState - READ-ONLY; The provisioning state of the NAT rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5435	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5436}
5437
5438// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollectionProperties.
5439func (afnrcp AzureFirewallNatRuleCollectionProperties) MarshalJSON() ([]byte, error) {
5440	objectMap := make(map[string]interface{})
5441	if afnrcp.Priority != nil {
5442		objectMap["priority"] = afnrcp.Priority
5443	}
5444	if afnrcp.Action != nil {
5445		objectMap["action"] = afnrcp.Action
5446	}
5447	if afnrcp.Rules != nil {
5448		objectMap["rules"] = afnrcp.Rules
5449	}
5450	return json.Marshal(objectMap)
5451}
5452
5453// AzureFirewallNetworkRule properties of the network rule.
5454type AzureFirewallNetworkRule struct {
5455	// Name - Name of the network rule.
5456	Name *string `json:"name,omitempty"`
5457	// Description - Description of the rule.
5458	Description *string `json:"description,omitempty"`
5459	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
5460	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
5461	// SourceAddresses - List of source IP addresses for this rule.
5462	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
5463	// DestinationAddresses - List of destination IP addresses.
5464	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
5465	// DestinationPorts - List of destination ports.
5466	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
5467	// DestinationFqdns - List of destination FQDNs.
5468	DestinationFqdns *[]string `json:"destinationFqdns,omitempty"`
5469	// SourceIPGroups - List of source IpGroups for this rule.
5470	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
5471	// DestinationIPGroups - List of destination IpGroups for this rule.
5472	DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"`
5473}
5474
5475// AzureFirewallNetworkRuleCollection network rule collection resource.
5476type AzureFirewallNetworkRuleCollection struct {
5477	// AzureFirewallNetworkRuleCollectionPropertiesFormat - Properties of the azure firewall network rule collection.
5478	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
5479	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
5480	Name *string `json:"name,omitempty"`
5481	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5482	Etag *string `json:"etag,omitempty"`
5483	// ID - Resource ID.
5484	ID *string `json:"id,omitempty"`
5485}
5486
5487// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
5488func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
5489	objectMap := make(map[string]interface{})
5490	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
5491		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
5492	}
5493	if afnrc.Name != nil {
5494		objectMap["name"] = afnrc.Name
5495	}
5496	if afnrc.ID != nil {
5497		objectMap["id"] = afnrc.ID
5498	}
5499	return json.Marshal(objectMap)
5500}
5501
5502// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
5503func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
5504	var m map[string]*json.RawMessage
5505	err := json.Unmarshal(body, &m)
5506	if err != nil {
5507		return err
5508	}
5509	for k, v := range m {
5510		switch k {
5511		case "properties":
5512			if v != nil {
5513				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
5514				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
5515				if err != nil {
5516					return err
5517				}
5518				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
5519			}
5520		case "name":
5521			if v != nil {
5522				var name string
5523				err = json.Unmarshal(*v, &name)
5524				if err != nil {
5525					return err
5526				}
5527				afnrc.Name = &name
5528			}
5529		case "etag":
5530			if v != nil {
5531				var etag string
5532				err = json.Unmarshal(*v, &etag)
5533				if err != nil {
5534					return err
5535				}
5536				afnrc.Etag = &etag
5537			}
5538		case "id":
5539			if v != nil {
5540				var ID string
5541				err = json.Unmarshal(*v, &ID)
5542				if err != nil {
5543					return err
5544				}
5545				afnrc.ID = &ID
5546			}
5547		}
5548	}
5549
5550	return nil
5551}
5552
5553// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
5554type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
5555	// Priority - Priority of the network rule collection resource.
5556	Priority *int32 `json:"priority,omitempty"`
5557	// Action - The action type of a rule collection.
5558	Action *AzureFirewallRCAction `json:"action,omitempty"`
5559	// Rules - Collection of rules used by a network rule collection.
5560	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
5561	// ProvisioningState - READ-ONLY; The provisioning state of the network rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5562	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5563}
5564
5565// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollectionPropertiesFormat.
5566func (afnrcpf AzureFirewallNetworkRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) {
5567	objectMap := make(map[string]interface{})
5568	if afnrcpf.Priority != nil {
5569		objectMap["priority"] = afnrcpf.Priority
5570	}
5571	if afnrcpf.Action != nil {
5572		objectMap["action"] = afnrcpf.Action
5573	}
5574	if afnrcpf.Rules != nil {
5575		objectMap["rules"] = afnrcpf.Rules
5576	}
5577	return json.Marshal(objectMap)
5578}
5579
5580// AzureFirewallPropertiesFormat properties of the Azure Firewall.
5581type AzureFirewallPropertiesFormat struct {
5582	// ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall.
5583	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
5584	// NatRuleCollections - Collection of NAT rule collections used by Azure Firewall.
5585	NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"`
5586	// NetworkRuleCollections - Collection of network rule collections used by Azure Firewall.
5587	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
5588	// IPConfigurations - IP configuration of the Azure Firewall resource.
5589	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
5590	// ManagementIPConfiguration - IP configuration of the Azure Firewall used for management traffic.
5591	ManagementIPConfiguration *AzureFirewallIPConfiguration `json:"managementIpConfiguration,omitempty"`
5592	// ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5593	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5594	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
5595	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
5596	// VirtualHub - The virtualHub to which the firewall belongs.
5597	VirtualHub *SubResource `json:"virtualHub,omitempty"`
5598	// FirewallPolicy - The firewallPolicy associated with this azure firewall.
5599	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
5600	// HubIPAddresses - READ-ONLY; IP addresses associated with AzureFirewall.
5601	HubIPAddresses *HubIPAddresses `json:"hubIpAddresses,omitempty"`
5602	// IPGroups - READ-ONLY; IpGroups associated with AzureFirewall.
5603	IPGroups *[]AzureFirewallIPGroups `json:"ipGroups,omitempty"`
5604	// Sku - The Azure Firewall Resource SKU.
5605	Sku *AzureFirewallSku `json:"sku,omitempty"`
5606	// AdditionalProperties - The additional properties used to further config this azure firewall.
5607	AdditionalProperties map[string]*string `json:"additionalProperties"`
5608}
5609
5610// MarshalJSON is the custom marshaler for AzureFirewallPropertiesFormat.
5611func (afpf AzureFirewallPropertiesFormat) MarshalJSON() ([]byte, error) {
5612	objectMap := make(map[string]interface{})
5613	if afpf.ApplicationRuleCollections != nil {
5614		objectMap["applicationRuleCollections"] = afpf.ApplicationRuleCollections
5615	}
5616	if afpf.NatRuleCollections != nil {
5617		objectMap["natRuleCollections"] = afpf.NatRuleCollections
5618	}
5619	if afpf.NetworkRuleCollections != nil {
5620		objectMap["networkRuleCollections"] = afpf.NetworkRuleCollections
5621	}
5622	if afpf.IPConfigurations != nil {
5623		objectMap["ipConfigurations"] = afpf.IPConfigurations
5624	}
5625	if afpf.ManagementIPConfiguration != nil {
5626		objectMap["managementIpConfiguration"] = afpf.ManagementIPConfiguration
5627	}
5628	if afpf.ThreatIntelMode != "" {
5629		objectMap["threatIntelMode"] = afpf.ThreatIntelMode
5630	}
5631	if afpf.VirtualHub != nil {
5632		objectMap["virtualHub"] = afpf.VirtualHub
5633	}
5634	if afpf.FirewallPolicy != nil {
5635		objectMap["firewallPolicy"] = afpf.FirewallPolicy
5636	}
5637	if afpf.Sku != nil {
5638		objectMap["sku"] = afpf.Sku
5639	}
5640	if afpf.AdditionalProperties != nil {
5641		objectMap["additionalProperties"] = afpf.AdditionalProperties
5642	}
5643	return json.Marshal(objectMap)
5644}
5645
5646// AzureFirewallPublicIPAddress public IP Address associated with azure firewall.
5647type AzureFirewallPublicIPAddress struct {
5648	// Address - Public IP Address value.
5649	Address *string `json:"address,omitempty"`
5650}
5651
5652// AzureFirewallRCAction properties of the AzureFirewallRCAction.
5653type AzureFirewallRCAction struct {
5654	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
5655	Type AzureFirewallRCActionType `json:"type,omitempty"`
5656}
5657
5658// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5659// long-running operation.
5660type AzureFirewallsCreateOrUpdateFuture struct {
5661	azure.FutureAPI
5662	// Result returns the result of the asynchronous operation.
5663	// If the operation has not completed it will return an error.
5664	Result func(AzureFirewallsClient) (AzureFirewall, error)
5665}
5666
5667// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5668// operation.
5669type AzureFirewallsDeleteFuture struct {
5670	azure.FutureAPI
5671	// Result returns the result of the asynchronous operation.
5672	// If the operation has not completed it will return an error.
5673	Result func(AzureFirewallsClient) (autorest.Response, error)
5674}
5675
5676// AzureFirewallSku SKU of an Azure Firewall.
5677type AzureFirewallSku struct {
5678	// Name - Name of an Azure Firewall SKU. Possible values include: 'AZFWVNet', 'AZFWHub'
5679	Name AzureFirewallSkuName `json:"name,omitempty"`
5680	// Tier - Tier of an Azure Firewall. Possible values include: 'Standard'
5681	Tier AzureFirewallSkuTier `json:"tier,omitempty"`
5682}
5683
5684// AzureFirewallsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
5685// long-running operation.
5686type AzureFirewallsUpdateTagsFuture struct {
5687	azure.FutureAPI
5688	// Result returns the result of the asynchronous operation.
5689	// If the operation has not completed it will return an error.
5690	Result func(AzureFirewallsClient) (AzureFirewall, error)
5691}
5692
5693// AzureReachabilityReport azure reachability report details.
5694type AzureReachabilityReport struct {
5695	autorest.Response `json:"-"`
5696	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
5697	AggregationLevel *string `json:"aggregationLevel,omitempty"`
5698	// ProviderLocation - Parameters that define a geographic location.
5699	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
5700	// ReachabilityReport - List of Azure reachability report items.
5701	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
5702}
5703
5704// AzureReachabilityReportItem azure reachability report details for a given provider location.
5705type AzureReachabilityReportItem struct {
5706	// Provider - The Internet service provider.
5707	Provider *string `json:"provider,omitempty"`
5708	// AzureLocation - The Azure region.
5709	AzureLocation *string `json:"azureLocation,omitempty"`
5710	// Latencies - List of latency details for each of the time series.
5711	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
5712}
5713
5714// AzureReachabilityReportLatencyInfo details on latency for a time series.
5715type AzureReachabilityReportLatencyInfo struct {
5716	// TimeStamp - The time stamp.
5717	TimeStamp *date.Time `json:"timeStamp,omitempty"`
5718	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
5719	Score *int32 `json:"score,omitempty"`
5720}
5721
5722// AzureReachabilityReportLocation parameters that define a geographic location.
5723type AzureReachabilityReportLocation struct {
5724	// Country - The name of the country.
5725	Country *string `json:"country,omitempty"`
5726	// State - The name of the state.
5727	State *string `json:"state,omitempty"`
5728	// City - The name of the city or town.
5729	City *string `json:"city,omitempty"`
5730}
5731
5732// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
5733type AzureReachabilityReportParameters struct {
5734	// ProviderLocation - Parameters that define a geographic location.
5735	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
5736	// Providers - List of Internet service providers.
5737	Providers *[]string `json:"providers,omitempty"`
5738	// AzureLocations - Optional Azure regions to scope the query to.
5739	AzureLocations *[]string `json:"azureLocations,omitempty"`
5740	// StartTime - The start time for the Azure reachability report.
5741	StartTime *date.Time `json:"startTime,omitempty"`
5742	// EndTime - The end time for the Azure reachability report.
5743	EndTime *date.Time `json:"endTime,omitempty"`
5744}
5745
5746// BackendAddressPool pool of backend IP addresses.
5747type BackendAddressPool struct {
5748	autorest.Response `json:"-"`
5749	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
5750	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
5751	// 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.
5752	Name *string `json:"name,omitempty"`
5753	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5754	Etag *string `json:"etag,omitempty"`
5755	// Type - READ-ONLY; Type of the resource.
5756	Type *string `json:"type,omitempty"`
5757	// ID - Resource ID.
5758	ID *string `json:"id,omitempty"`
5759}
5760
5761// MarshalJSON is the custom marshaler for BackendAddressPool.
5762func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
5763	objectMap := make(map[string]interface{})
5764	if bap.BackendAddressPoolPropertiesFormat != nil {
5765		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
5766	}
5767	if bap.Name != nil {
5768		objectMap["name"] = bap.Name
5769	}
5770	if bap.ID != nil {
5771		objectMap["id"] = bap.ID
5772	}
5773	return json.Marshal(objectMap)
5774}
5775
5776// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
5777func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
5778	var m map[string]*json.RawMessage
5779	err := json.Unmarshal(body, &m)
5780	if err != nil {
5781		return err
5782	}
5783	for k, v := range m {
5784		switch k {
5785		case "properties":
5786			if v != nil {
5787				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
5788				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
5789				if err != nil {
5790					return err
5791				}
5792				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
5793			}
5794		case "name":
5795			if v != nil {
5796				var name string
5797				err = json.Unmarshal(*v, &name)
5798				if err != nil {
5799					return err
5800				}
5801				bap.Name = &name
5802			}
5803		case "etag":
5804			if v != nil {
5805				var etag string
5806				err = json.Unmarshal(*v, &etag)
5807				if err != nil {
5808					return err
5809				}
5810				bap.Etag = &etag
5811			}
5812		case "type":
5813			if v != nil {
5814				var typeVar string
5815				err = json.Unmarshal(*v, &typeVar)
5816				if err != nil {
5817					return err
5818				}
5819				bap.Type = &typeVar
5820			}
5821		case "id":
5822			if v != nil {
5823				var ID string
5824				err = json.Unmarshal(*v, &ID)
5825				if err != nil {
5826					return err
5827				}
5828				bap.ID = &ID
5829			}
5830		}
5831	}
5832
5833	return nil
5834}
5835
5836// BackendAddressPoolPropertiesFormat properties of the backend address pool.
5837type BackendAddressPoolPropertiesFormat struct {
5838	// BackendIPConfigurations - READ-ONLY; An array of references to IP addresses defined in network interfaces.
5839	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
5840	// LoadBalancingRules - READ-ONLY; An array of references to load balancing rules that use this backend address pool.
5841	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
5842	// OutboundRule - READ-ONLY; A reference to an outbound rule that uses this backend address pool.
5843	OutboundRule *SubResource `json:"outboundRule,omitempty"`
5844	// OutboundRules - READ-ONLY; An array of references to outbound rules that use this backend address pool.
5845	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
5846	// ProvisioningState - READ-ONLY; The provisioning state of the backend address pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5847	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5848}
5849
5850// BastionActiveSession the session detail for a target.
5851type BastionActiveSession struct {
5852	// SessionID - READ-ONLY; A unique id for the session.
5853	SessionID *string `json:"sessionId,omitempty"`
5854	// StartTime - READ-ONLY; The time when the session started.
5855	StartTime interface{} `json:"startTime,omitempty"`
5856	// TargetSubscriptionID - READ-ONLY; The subscription id for the target virtual machine.
5857	TargetSubscriptionID *string `json:"targetSubscriptionId,omitempty"`
5858	// ResourceType - READ-ONLY; The type of the resource.
5859	ResourceType *string `json:"resourceType,omitempty"`
5860	// TargetHostName - READ-ONLY; The host name of the target.
5861	TargetHostName *string `json:"targetHostName,omitempty"`
5862	// TargetResourceGroup - READ-ONLY; The resource group of the target.
5863	TargetResourceGroup *string `json:"targetResourceGroup,omitempty"`
5864	// UserName - READ-ONLY; The user name who is active on this session.
5865	UserName *string `json:"userName,omitempty"`
5866	// TargetIPAddress - READ-ONLY; The IP Address of the target.
5867	TargetIPAddress *string `json:"targetIpAddress,omitempty"`
5868	// Protocol - READ-ONLY; The protocol used to connect to the target. Possible values include: 'SSH', 'RDP'
5869	Protocol BastionConnectProtocol `json:"protocol,omitempty"`
5870	// TargetResourceID - READ-ONLY; The resource id of the target.
5871	TargetResourceID *string `json:"targetResourceId,omitempty"`
5872	// SessionDurationInMins - READ-ONLY; Duration in mins the session has been active.
5873	SessionDurationInMins *float64 `json:"sessionDurationInMins,omitempty"`
5874}
5875
5876// BastionActiveSessionListResult response for GetActiveSessions.
5877type BastionActiveSessionListResult struct {
5878	autorest.Response `json:"-"`
5879	// Value - List of active sessions on the bastion.
5880	Value *[]BastionActiveSession `json:"value,omitempty"`
5881	// NextLink - The URL to get the next set of results.
5882	NextLink *string `json:"nextLink,omitempty"`
5883}
5884
5885// BastionActiveSessionListResultIterator provides access to a complete listing of BastionActiveSession
5886// values.
5887type BastionActiveSessionListResultIterator struct {
5888	i    int
5889	page BastionActiveSessionListResultPage
5890}
5891
5892// NextWithContext advances to the next value.  If there was an error making
5893// the request the iterator does not advance and the error is returned.
5894func (iter *BastionActiveSessionListResultIterator) NextWithContext(ctx context.Context) (err error) {
5895	if tracing.IsEnabled() {
5896		ctx = tracing.StartSpan(ctx, fqdn+"/BastionActiveSessionListResultIterator.NextWithContext")
5897		defer func() {
5898			sc := -1
5899			if iter.Response().Response.Response != nil {
5900				sc = iter.Response().Response.Response.StatusCode
5901			}
5902			tracing.EndSpan(ctx, sc, err)
5903		}()
5904	}
5905	iter.i++
5906	if iter.i < len(iter.page.Values()) {
5907		return nil
5908	}
5909	err = iter.page.NextWithContext(ctx)
5910	if err != nil {
5911		iter.i--
5912		return err
5913	}
5914	iter.i = 0
5915	return nil
5916}
5917
5918// Next advances to the next value.  If there was an error making
5919// the request the iterator does not advance and the error is returned.
5920// Deprecated: Use NextWithContext() instead.
5921func (iter *BastionActiveSessionListResultIterator) Next() error {
5922	return iter.NextWithContext(context.Background())
5923}
5924
5925// NotDone returns true if the enumeration should be started or is not yet complete.
5926func (iter BastionActiveSessionListResultIterator) NotDone() bool {
5927	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5928}
5929
5930// Response returns the raw server response from the last page request.
5931func (iter BastionActiveSessionListResultIterator) Response() BastionActiveSessionListResult {
5932	return iter.page.Response()
5933}
5934
5935// Value returns the current value or a zero-initialized value if the
5936// iterator has advanced beyond the end of the collection.
5937func (iter BastionActiveSessionListResultIterator) Value() BastionActiveSession {
5938	if !iter.page.NotDone() {
5939		return BastionActiveSession{}
5940	}
5941	return iter.page.Values()[iter.i]
5942}
5943
5944// Creates a new instance of the BastionActiveSessionListResultIterator type.
5945func NewBastionActiveSessionListResultIterator(page BastionActiveSessionListResultPage) BastionActiveSessionListResultIterator {
5946	return BastionActiveSessionListResultIterator{page: page}
5947}
5948
5949// IsEmpty returns true if the ListResult contains no values.
5950func (baslr BastionActiveSessionListResult) IsEmpty() bool {
5951	return baslr.Value == nil || len(*baslr.Value) == 0
5952}
5953
5954// hasNextLink returns true if the NextLink is not empty.
5955func (baslr BastionActiveSessionListResult) hasNextLink() bool {
5956	return baslr.NextLink != nil && len(*baslr.NextLink) != 0
5957}
5958
5959// bastionActiveSessionListResultPreparer prepares a request to retrieve the next set of results.
5960// It returns nil if no more results exist.
5961func (baslr BastionActiveSessionListResult) bastionActiveSessionListResultPreparer(ctx context.Context) (*http.Request, error) {
5962	if !baslr.hasNextLink() {
5963		return nil, nil
5964	}
5965	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5966		autorest.AsJSON(),
5967		autorest.AsGet(),
5968		autorest.WithBaseURL(to.String(baslr.NextLink)))
5969}
5970
5971// BastionActiveSessionListResultPage contains a page of BastionActiveSession values.
5972type BastionActiveSessionListResultPage struct {
5973	fn    func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error)
5974	baslr BastionActiveSessionListResult
5975}
5976
5977// NextWithContext advances to the next page of values.  If there was an error making
5978// the request the page does not advance and the error is returned.
5979func (page *BastionActiveSessionListResultPage) NextWithContext(ctx context.Context) (err error) {
5980	if tracing.IsEnabled() {
5981		ctx = tracing.StartSpan(ctx, fqdn+"/BastionActiveSessionListResultPage.NextWithContext")
5982		defer func() {
5983			sc := -1
5984			if page.Response().Response.Response != nil {
5985				sc = page.Response().Response.Response.StatusCode
5986			}
5987			tracing.EndSpan(ctx, sc, err)
5988		}()
5989	}
5990	for {
5991		next, err := page.fn(ctx, page.baslr)
5992		if err != nil {
5993			return err
5994		}
5995		page.baslr = next
5996		if !next.hasNextLink() || !next.IsEmpty() {
5997			break
5998		}
5999	}
6000	return nil
6001}
6002
6003// Next advances to the next page of values.  If there was an error making
6004// the request the page does not advance and the error is returned.
6005// Deprecated: Use NextWithContext() instead.
6006func (page *BastionActiveSessionListResultPage) Next() error {
6007	return page.NextWithContext(context.Background())
6008}
6009
6010// NotDone returns true if the page enumeration should be started or is not yet complete.
6011func (page BastionActiveSessionListResultPage) NotDone() bool {
6012	return !page.baslr.IsEmpty()
6013}
6014
6015// Response returns the raw server response from the last page request.
6016func (page BastionActiveSessionListResultPage) Response() BastionActiveSessionListResult {
6017	return page.baslr
6018}
6019
6020// Values returns the slice of values for the current page or nil if there are no values.
6021func (page BastionActiveSessionListResultPage) Values() []BastionActiveSession {
6022	if page.baslr.IsEmpty() {
6023		return nil
6024	}
6025	return *page.baslr.Value
6026}
6027
6028// Creates a new instance of the BastionActiveSessionListResultPage type.
6029func NewBastionActiveSessionListResultPage(cur BastionActiveSessionListResult, getNextPage func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error)) BastionActiveSessionListResultPage {
6030	return BastionActiveSessionListResultPage{
6031		fn:    getNextPage,
6032		baslr: cur,
6033	}
6034}
6035
6036// BastionHost bastion Host resource.
6037type BastionHost struct {
6038	autorest.Response `json:"-"`
6039	// BastionHostPropertiesFormat - Represents the bastion host resource.
6040	*BastionHostPropertiesFormat `json:"properties,omitempty"`
6041	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6042	Etag *string `json:"etag,omitempty"`
6043	// ID - Resource ID.
6044	ID *string `json:"id,omitempty"`
6045	// Name - READ-ONLY; Resource name.
6046	Name *string `json:"name,omitempty"`
6047	// Type - READ-ONLY; Resource type.
6048	Type *string `json:"type,omitempty"`
6049	// Location - Resource location.
6050	Location *string `json:"location,omitempty"`
6051	// Tags - Resource tags.
6052	Tags map[string]*string `json:"tags"`
6053}
6054
6055// MarshalJSON is the custom marshaler for BastionHost.
6056func (bh BastionHost) MarshalJSON() ([]byte, error) {
6057	objectMap := make(map[string]interface{})
6058	if bh.BastionHostPropertiesFormat != nil {
6059		objectMap["properties"] = bh.BastionHostPropertiesFormat
6060	}
6061	if bh.ID != nil {
6062		objectMap["id"] = bh.ID
6063	}
6064	if bh.Location != nil {
6065		objectMap["location"] = bh.Location
6066	}
6067	if bh.Tags != nil {
6068		objectMap["tags"] = bh.Tags
6069	}
6070	return json.Marshal(objectMap)
6071}
6072
6073// UnmarshalJSON is the custom unmarshaler for BastionHost struct.
6074func (bh *BastionHost) UnmarshalJSON(body []byte) error {
6075	var m map[string]*json.RawMessage
6076	err := json.Unmarshal(body, &m)
6077	if err != nil {
6078		return err
6079	}
6080	for k, v := range m {
6081		switch k {
6082		case "properties":
6083			if v != nil {
6084				var bastionHostPropertiesFormat BastionHostPropertiesFormat
6085				err = json.Unmarshal(*v, &bastionHostPropertiesFormat)
6086				if err != nil {
6087					return err
6088				}
6089				bh.BastionHostPropertiesFormat = &bastionHostPropertiesFormat
6090			}
6091		case "etag":
6092			if v != nil {
6093				var etag string
6094				err = json.Unmarshal(*v, &etag)
6095				if err != nil {
6096					return err
6097				}
6098				bh.Etag = &etag
6099			}
6100		case "id":
6101			if v != nil {
6102				var ID string
6103				err = json.Unmarshal(*v, &ID)
6104				if err != nil {
6105					return err
6106				}
6107				bh.ID = &ID
6108			}
6109		case "name":
6110			if v != nil {
6111				var name string
6112				err = json.Unmarshal(*v, &name)
6113				if err != nil {
6114					return err
6115				}
6116				bh.Name = &name
6117			}
6118		case "type":
6119			if v != nil {
6120				var typeVar string
6121				err = json.Unmarshal(*v, &typeVar)
6122				if err != nil {
6123					return err
6124				}
6125				bh.Type = &typeVar
6126			}
6127		case "location":
6128			if v != nil {
6129				var location string
6130				err = json.Unmarshal(*v, &location)
6131				if err != nil {
6132					return err
6133				}
6134				bh.Location = &location
6135			}
6136		case "tags":
6137			if v != nil {
6138				var tags map[string]*string
6139				err = json.Unmarshal(*v, &tags)
6140				if err != nil {
6141					return err
6142				}
6143				bh.Tags = tags
6144			}
6145		}
6146	}
6147
6148	return nil
6149}
6150
6151// BastionHostIPConfiguration IP configuration of an Bastion Host.
6152type BastionHostIPConfiguration struct {
6153	// BastionHostIPConfigurationPropertiesFormat - Represents the ip configuration associated with the resource.
6154	*BastionHostIPConfigurationPropertiesFormat `json:"properties,omitempty"`
6155	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
6156	Name *string `json:"name,omitempty"`
6157	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6158	Etag *string `json:"etag,omitempty"`
6159	// Type - READ-ONLY; Ip configuration type.
6160	Type *string `json:"type,omitempty"`
6161	// ID - Resource ID.
6162	ID *string `json:"id,omitempty"`
6163}
6164
6165// MarshalJSON is the custom marshaler for BastionHostIPConfiguration.
6166func (bhic BastionHostIPConfiguration) MarshalJSON() ([]byte, error) {
6167	objectMap := make(map[string]interface{})
6168	if bhic.BastionHostIPConfigurationPropertiesFormat != nil {
6169		objectMap["properties"] = bhic.BastionHostIPConfigurationPropertiesFormat
6170	}
6171	if bhic.Name != nil {
6172		objectMap["name"] = bhic.Name
6173	}
6174	if bhic.ID != nil {
6175		objectMap["id"] = bhic.ID
6176	}
6177	return json.Marshal(objectMap)
6178}
6179
6180// UnmarshalJSON is the custom unmarshaler for BastionHostIPConfiguration struct.
6181func (bhic *BastionHostIPConfiguration) UnmarshalJSON(body []byte) error {
6182	var m map[string]*json.RawMessage
6183	err := json.Unmarshal(body, &m)
6184	if err != nil {
6185		return err
6186	}
6187	for k, v := range m {
6188		switch k {
6189		case "properties":
6190			if v != nil {
6191				var bastionHostIPConfigurationPropertiesFormat BastionHostIPConfigurationPropertiesFormat
6192				err = json.Unmarshal(*v, &bastionHostIPConfigurationPropertiesFormat)
6193				if err != nil {
6194					return err
6195				}
6196				bhic.BastionHostIPConfigurationPropertiesFormat = &bastionHostIPConfigurationPropertiesFormat
6197			}
6198		case "name":
6199			if v != nil {
6200				var name string
6201				err = json.Unmarshal(*v, &name)
6202				if err != nil {
6203					return err
6204				}
6205				bhic.Name = &name
6206			}
6207		case "etag":
6208			if v != nil {
6209				var etag string
6210				err = json.Unmarshal(*v, &etag)
6211				if err != nil {
6212					return err
6213				}
6214				bhic.Etag = &etag
6215			}
6216		case "type":
6217			if v != nil {
6218				var typeVar string
6219				err = json.Unmarshal(*v, &typeVar)
6220				if err != nil {
6221					return err
6222				}
6223				bhic.Type = &typeVar
6224			}
6225		case "id":
6226			if v != nil {
6227				var ID string
6228				err = json.Unmarshal(*v, &ID)
6229				if err != nil {
6230					return err
6231				}
6232				bhic.ID = &ID
6233			}
6234		}
6235	}
6236
6237	return nil
6238}
6239
6240// BastionHostIPConfigurationPropertiesFormat properties of IP configuration of an Bastion Host.
6241type BastionHostIPConfigurationPropertiesFormat struct {
6242	// Subnet - Reference of the subnet resource.
6243	Subnet *SubResource `json:"subnet,omitempty"`
6244	// PublicIPAddress - Reference of the PublicIP resource.
6245	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
6246	// ProvisioningState - READ-ONLY; The provisioning state of the bastion host IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6247	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6248	// PrivateIPAllocationMethod - Private IP allocation method. Possible values include: 'Static', 'Dynamic'
6249	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
6250}
6251
6252// MarshalJSON is the custom marshaler for BastionHostIPConfigurationPropertiesFormat.
6253func (bhicpf BastionHostIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
6254	objectMap := make(map[string]interface{})
6255	if bhicpf.Subnet != nil {
6256		objectMap["subnet"] = bhicpf.Subnet
6257	}
6258	if bhicpf.PublicIPAddress != nil {
6259		objectMap["publicIPAddress"] = bhicpf.PublicIPAddress
6260	}
6261	if bhicpf.PrivateIPAllocationMethod != "" {
6262		objectMap["privateIPAllocationMethod"] = bhicpf.PrivateIPAllocationMethod
6263	}
6264	return json.Marshal(objectMap)
6265}
6266
6267// BastionHostListResult response for ListBastionHosts API service call.
6268type BastionHostListResult struct {
6269	autorest.Response `json:"-"`
6270	// Value - List of Bastion Hosts in a resource group.
6271	Value *[]BastionHost `json:"value,omitempty"`
6272	// NextLink - URL to get the next set of results.
6273	NextLink *string `json:"nextLink,omitempty"`
6274}
6275
6276// BastionHostListResultIterator provides access to a complete listing of BastionHost values.
6277type BastionHostListResultIterator struct {
6278	i    int
6279	page BastionHostListResultPage
6280}
6281
6282// NextWithContext advances to the next value.  If there was an error making
6283// the request the iterator does not advance and the error is returned.
6284func (iter *BastionHostListResultIterator) NextWithContext(ctx context.Context) (err error) {
6285	if tracing.IsEnabled() {
6286		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultIterator.NextWithContext")
6287		defer func() {
6288			sc := -1
6289			if iter.Response().Response.Response != nil {
6290				sc = iter.Response().Response.Response.StatusCode
6291			}
6292			tracing.EndSpan(ctx, sc, err)
6293		}()
6294	}
6295	iter.i++
6296	if iter.i < len(iter.page.Values()) {
6297		return nil
6298	}
6299	err = iter.page.NextWithContext(ctx)
6300	if err != nil {
6301		iter.i--
6302		return err
6303	}
6304	iter.i = 0
6305	return nil
6306}
6307
6308// Next advances to the next value.  If there was an error making
6309// the request the iterator does not advance and the error is returned.
6310// Deprecated: Use NextWithContext() instead.
6311func (iter *BastionHostListResultIterator) Next() error {
6312	return iter.NextWithContext(context.Background())
6313}
6314
6315// NotDone returns true if the enumeration should be started or is not yet complete.
6316func (iter BastionHostListResultIterator) NotDone() bool {
6317	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6318}
6319
6320// Response returns the raw server response from the last page request.
6321func (iter BastionHostListResultIterator) Response() BastionHostListResult {
6322	return iter.page.Response()
6323}
6324
6325// Value returns the current value or a zero-initialized value if the
6326// iterator has advanced beyond the end of the collection.
6327func (iter BastionHostListResultIterator) Value() BastionHost {
6328	if !iter.page.NotDone() {
6329		return BastionHost{}
6330	}
6331	return iter.page.Values()[iter.i]
6332}
6333
6334// Creates a new instance of the BastionHostListResultIterator type.
6335func NewBastionHostListResultIterator(page BastionHostListResultPage) BastionHostListResultIterator {
6336	return BastionHostListResultIterator{page: page}
6337}
6338
6339// IsEmpty returns true if the ListResult contains no values.
6340func (bhlr BastionHostListResult) IsEmpty() bool {
6341	return bhlr.Value == nil || len(*bhlr.Value) == 0
6342}
6343
6344// hasNextLink returns true if the NextLink is not empty.
6345func (bhlr BastionHostListResult) hasNextLink() bool {
6346	return bhlr.NextLink != nil && len(*bhlr.NextLink) != 0
6347}
6348
6349// bastionHostListResultPreparer prepares a request to retrieve the next set of results.
6350// It returns nil if no more results exist.
6351func (bhlr BastionHostListResult) bastionHostListResultPreparer(ctx context.Context) (*http.Request, error) {
6352	if !bhlr.hasNextLink() {
6353		return nil, nil
6354	}
6355	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6356		autorest.AsJSON(),
6357		autorest.AsGet(),
6358		autorest.WithBaseURL(to.String(bhlr.NextLink)))
6359}
6360
6361// BastionHostListResultPage contains a page of BastionHost values.
6362type BastionHostListResultPage struct {
6363	fn   func(context.Context, BastionHostListResult) (BastionHostListResult, error)
6364	bhlr BastionHostListResult
6365}
6366
6367// NextWithContext advances to the next page of values.  If there was an error making
6368// the request the page does not advance and the error is returned.
6369func (page *BastionHostListResultPage) NextWithContext(ctx context.Context) (err error) {
6370	if tracing.IsEnabled() {
6371		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultPage.NextWithContext")
6372		defer func() {
6373			sc := -1
6374			if page.Response().Response.Response != nil {
6375				sc = page.Response().Response.Response.StatusCode
6376			}
6377			tracing.EndSpan(ctx, sc, err)
6378		}()
6379	}
6380	for {
6381		next, err := page.fn(ctx, page.bhlr)
6382		if err != nil {
6383			return err
6384		}
6385		page.bhlr = next
6386		if !next.hasNextLink() || !next.IsEmpty() {
6387			break
6388		}
6389	}
6390	return nil
6391}
6392
6393// Next advances to the next page of values.  If there was an error making
6394// the request the page does not advance and the error is returned.
6395// Deprecated: Use NextWithContext() instead.
6396func (page *BastionHostListResultPage) Next() error {
6397	return page.NextWithContext(context.Background())
6398}
6399
6400// NotDone returns true if the page enumeration should be started or is not yet complete.
6401func (page BastionHostListResultPage) NotDone() bool {
6402	return !page.bhlr.IsEmpty()
6403}
6404
6405// Response returns the raw server response from the last page request.
6406func (page BastionHostListResultPage) Response() BastionHostListResult {
6407	return page.bhlr
6408}
6409
6410// Values returns the slice of values for the current page or nil if there are no values.
6411func (page BastionHostListResultPage) Values() []BastionHost {
6412	if page.bhlr.IsEmpty() {
6413		return nil
6414	}
6415	return *page.bhlr.Value
6416}
6417
6418// Creates a new instance of the BastionHostListResultPage type.
6419func NewBastionHostListResultPage(cur BastionHostListResult, getNextPage func(context.Context, BastionHostListResult) (BastionHostListResult, error)) BastionHostListResultPage {
6420	return BastionHostListResultPage{
6421		fn:   getNextPage,
6422		bhlr: cur,
6423	}
6424}
6425
6426// BastionHostPropertiesFormat properties of the Bastion Host.
6427type BastionHostPropertiesFormat struct {
6428	// IPConfigurations - IP configuration of the Bastion Host resource.
6429	IPConfigurations *[]BastionHostIPConfiguration `json:"ipConfigurations,omitempty"`
6430	// DNSName - FQDN for the endpoint on which bastion host is accessible.
6431	DNSName *string `json:"dnsName,omitempty"`
6432	// ProvisioningState - READ-ONLY; The provisioning state of the bastion host resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6433	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6434}
6435
6436// MarshalJSON is the custom marshaler for BastionHostPropertiesFormat.
6437func (bhpf BastionHostPropertiesFormat) MarshalJSON() ([]byte, error) {
6438	objectMap := make(map[string]interface{})
6439	if bhpf.IPConfigurations != nil {
6440		objectMap["ipConfigurations"] = bhpf.IPConfigurations
6441	}
6442	if bhpf.DNSName != nil {
6443		objectMap["dnsName"] = bhpf.DNSName
6444	}
6445	return json.Marshal(objectMap)
6446}
6447
6448// BastionHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6449// long-running operation.
6450type BastionHostsCreateOrUpdateFuture struct {
6451	azure.FutureAPI
6452	// Result returns the result of the asynchronous operation.
6453	// If the operation has not completed it will return an error.
6454	Result func(BastionHostsClient) (BastionHost, error)
6455}
6456
6457// BastionHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
6458// operation.
6459type BastionHostsDeleteFuture struct {
6460	azure.FutureAPI
6461	// Result returns the result of the asynchronous operation.
6462	// If the operation has not completed it will return an error.
6463	Result func(BastionHostsClient) (autorest.Response, error)
6464}
6465
6466// BastionSessionDeleteResult response for DisconnectActiveSessions.
6467type BastionSessionDeleteResult struct {
6468	autorest.Response `json:"-"`
6469	// Value - List of sessions with their corresponding state.
6470	Value *[]BastionSessionState `json:"value,omitempty"`
6471	// NextLink - The URL to get the next set of results.
6472	NextLink *string `json:"nextLink,omitempty"`
6473}
6474
6475// BastionSessionDeleteResultIterator provides access to a complete listing of BastionSessionState values.
6476type BastionSessionDeleteResultIterator struct {
6477	i    int
6478	page BastionSessionDeleteResultPage
6479}
6480
6481// NextWithContext advances to the next value.  If there was an error making
6482// the request the iterator does not advance and the error is returned.
6483func (iter *BastionSessionDeleteResultIterator) NextWithContext(ctx context.Context) (err error) {
6484	if tracing.IsEnabled() {
6485		ctx = tracing.StartSpan(ctx, fqdn+"/BastionSessionDeleteResultIterator.NextWithContext")
6486		defer func() {
6487			sc := -1
6488			if iter.Response().Response.Response != nil {
6489				sc = iter.Response().Response.Response.StatusCode
6490			}
6491			tracing.EndSpan(ctx, sc, err)
6492		}()
6493	}
6494	iter.i++
6495	if iter.i < len(iter.page.Values()) {
6496		return nil
6497	}
6498	err = iter.page.NextWithContext(ctx)
6499	if err != nil {
6500		iter.i--
6501		return err
6502	}
6503	iter.i = 0
6504	return nil
6505}
6506
6507// Next advances to the next value.  If there was an error making
6508// the request the iterator does not advance and the error is returned.
6509// Deprecated: Use NextWithContext() instead.
6510func (iter *BastionSessionDeleteResultIterator) Next() error {
6511	return iter.NextWithContext(context.Background())
6512}
6513
6514// NotDone returns true if the enumeration should be started or is not yet complete.
6515func (iter BastionSessionDeleteResultIterator) NotDone() bool {
6516	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6517}
6518
6519// Response returns the raw server response from the last page request.
6520func (iter BastionSessionDeleteResultIterator) Response() BastionSessionDeleteResult {
6521	return iter.page.Response()
6522}
6523
6524// Value returns the current value or a zero-initialized value if the
6525// iterator has advanced beyond the end of the collection.
6526func (iter BastionSessionDeleteResultIterator) Value() BastionSessionState {
6527	if !iter.page.NotDone() {
6528		return BastionSessionState{}
6529	}
6530	return iter.page.Values()[iter.i]
6531}
6532
6533// Creates a new instance of the BastionSessionDeleteResultIterator type.
6534func NewBastionSessionDeleteResultIterator(page BastionSessionDeleteResultPage) BastionSessionDeleteResultIterator {
6535	return BastionSessionDeleteResultIterator{page: page}
6536}
6537
6538// IsEmpty returns true if the ListResult contains no values.
6539func (bsdr BastionSessionDeleteResult) IsEmpty() bool {
6540	return bsdr.Value == nil || len(*bsdr.Value) == 0
6541}
6542
6543// hasNextLink returns true if the NextLink is not empty.
6544func (bsdr BastionSessionDeleteResult) hasNextLink() bool {
6545	return bsdr.NextLink != nil && len(*bsdr.NextLink) != 0
6546}
6547
6548// bastionSessionDeleteResultPreparer prepares a request to retrieve the next set of results.
6549// It returns nil if no more results exist.
6550func (bsdr BastionSessionDeleteResult) bastionSessionDeleteResultPreparer(ctx context.Context) (*http.Request, error) {
6551	if !bsdr.hasNextLink() {
6552		return nil, nil
6553	}
6554	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6555		autorest.AsJSON(),
6556		autorest.AsGet(),
6557		autorest.WithBaseURL(to.String(bsdr.NextLink)))
6558}
6559
6560// BastionSessionDeleteResultPage contains a page of BastionSessionState values.
6561type BastionSessionDeleteResultPage struct {
6562	fn   func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error)
6563	bsdr BastionSessionDeleteResult
6564}
6565
6566// NextWithContext advances to the next page of values.  If there was an error making
6567// the request the page does not advance and the error is returned.
6568func (page *BastionSessionDeleteResultPage) NextWithContext(ctx context.Context) (err error) {
6569	if tracing.IsEnabled() {
6570		ctx = tracing.StartSpan(ctx, fqdn+"/BastionSessionDeleteResultPage.NextWithContext")
6571		defer func() {
6572			sc := -1
6573			if page.Response().Response.Response != nil {
6574				sc = page.Response().Response.Response.StatusCode
6575			}
6576			tracing.EndSpan(ctx, sc, err)
6577		}()
6578	}
6579	for {
6580		next, err := page.fn(ctx, page.bsdr)
6581		if err != nil {
6582			return err
6583		}
6584		page.bsdr = next
6585		if !next.hasNextLink() || !next.IsEmpty() {
6586			break
6587		}
6588	}
6589	return nil
6590}
6591
6592// Next advances to the next page of values.  If there was an error making
6593// the request the page does not advance and the error is returned.
6594// Deprecated: Use NextWithContext() instead.
6595func (page *BastionSessionDeleteResultPage) Next() error {
6596	return page.NextWithContext(context.Background())
6597}
6598
6599// NotDone returns true if the page enumeration should be started or is not yet complete.
6600func (page BastionSessionDeleteResultPage) NotDone() bool {
6601	return !page.bsdr.IsEmpty()
6602}
6603
6604// Response returns the raw server response from the last page request.
6605func (page BastionSessionDeleteResultPage) Response() BastionSessionDeleteResult {
6606	return page.bsdr
6607}
6608
6609// Values returns the slice of values for the current page or nil if there are no values.
6610func (page BastionSessionDeleteResultPage) Values() []BastionSessionState {
6611	if page.bsdr.IsEmpty() {
6612		return nil
6613	}
6614	return *page.bsdr.Value
6615}
6616
6617// Creates a new instance of the BastionSessionDeleteResultPage type.
6618func NewBastionSessionDeleteResultPage(cur BastionSessionDeleteResult, getNextPage func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error)) BastionSessionDeleteResultPage {
6619	return BastionSessionDeleteResultPage{
6620		fn:   getNextPage,
6621		bsdr: cur,
6622	}
6623}
6624
6625// BastionSessionState the session state detail for a target.
6626type BastionSessionState struct {
6627	// SessionID - READ-ONLY; A unique id for the session.
6628	SessionID *string `json:"sessionId,omitempty"`
6629	// Message - READ-ONLY; Used for extra information.
6630	Message *string `json:"message,omitempty"`
6631	// State - READ-ONLY; The state of the session. Disconnected/Failed/NotFound.
6632	State *string `json:"state,omitempty"`
6633}
6634
6635// BastionShareableLink bastion Shareable Link.
6636type BastionShareableLink struct {
6637	// VM - Reference of the virtual machine resource.
6638	VM *VM `json:"vm,omitempty"`
6639	// Bsl - READ-ONLY; The unique Bastion Shareable Link to the virtual machine.
6640	Bsl *string `json:"bsl,omitempty"`
6641	// CreatedAt - READ-ONLY; The time when the link was created.
6642	CreatedAt *string `json:"createdAt,omitempty"`
6643	// Message - READ-ONLY; Optional field indicating the warning or error message related to the vm in case of partial failure.
6644	Message *string `json:"message,omitempty"`
6645}
6646
6647// MarshalJSON is the custom marshaler for BastionShareableLink.
6648func (bsl BastionShareableLink) MarshalJSON() ([]byte, error) {
6649	objectMap := make(map[string]interface{})
6650	if bsl.VM != nil {
6651		objectMap["vm"] = bsl.VM
6652	}
6653	return json.Marshal(objectMap)
6654}
6655
6656// BastionShareableLinkListRequest post request for all the Bastion Shareable Link endpoints.
6657type BastionShareableLinkListRequest struct {
6658	// Vms - List of VM references.
6659	Vms *[]BastionShareableLink `json:"vms,omitempty"`
6660}
6661
6662// BastionShareableLinkListResult response for all the Bastion Shareable Link endpoints.
6663type BastionShareableLinkListResult struct {
6664	autorest.Response `json:"-"`
6665	// Value - List of Bastion Shareable Links for the request.
6666	Value *[]BastionShareableLink `json:"value,omitempty"`
6667	// NextLink - The URL to get the next set of results.
6668	NextLink *string `json:"nextLink,omitempty"`
6669}
6670
6671// BastionShareableLinkListResultIterator provides access to a complete listing of BastionShareableLink
6672// values.
6673type BastionShareableLinkListResultIterator struct {
6674	i    int
6675	page BastionShareableLinkListResultPage
6676}
6677
6678// NextWithContext advances to the next value.  If there was an error making
6679// the request the iterator does not advance and the error is returned.
6680func (iter *BastionShareableLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
6681	if tracing.IsEnabled() {
6682		ctx = tracing.StartSpan(ctx, fqdn+"/BastionShareableLinkListResultIterator.NextWithContext")
6683		defer func() {
6684			sc := -1
6685			if iter.Response().Response.Response != nil {
6686				sc = iter.Response().Response.Response.StatusCode
6687			}
6688			tracing.EndSpan(ctx, sc, err)
6689		}()
6690	}
6691	iter.i++
6692	if iter.i < len(iter.page.Values()) {
6693		return nil
6694	}
6695	err = iter.page.NextWithContext(ctx)
6696	if err != nil {
6697		iter.i--
6698		return err
6699	}
6700	iter.i = 0
6701	return nil
6702}
6703
6704// Next advances to the next value.  If there was an error making
6705// the request the iterator does not advance and the error is returned.
6706// Deprecated: Use NextWithContext() instead.
6707func (iter *BastionShareableLinkListResultIterator) Next() error {
6708	return iter.NextWithContext(context.Background())
6709}
6710
6711// NotDone returns true if the enumeration should be started or is not yet complete.
6712func (iter BastionShareableLinkListResultIterator) NotDone() bool {
6713	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6714}
6715
6716// Response returns the raw server response from the last page request.
6717func (iter BastionShareableLinkListResultIterator) Response() BastionShareableLinkListResult {
6718	return iter.page.Response()
6719}
6720
6721// Value returns the current value or a zero-initialized value if the
6722// iterator has advanced beyond the end of the collection.
6723func (iter BastionShareableLinkListResultIterator) Value() BastionShareableLink {
6724	if !iter.page.NotDone() {
6725		return BastionShareableLink{}
6726	}
6727	return iter.page.Values()[iter.i]
6728}
6729
6730// Creates a new instance of the BastionShareableLinkListResultIterator type.
6731func NewBastionShareableLinkListResultIterator(page BastionShareableLinkListResultPage) BastionShareableLinkListResultIterator {
6732	return BastionShareableLinkListResultIterator{page: page}
6733}
6734
6735// IsEmpty returns true if the ListResult contains no values.
6736func (bsllr BastionShareableLinkListResult) IsEmpty() bool {
6737	return bsllr.Value == nil || len(*bsllr.Value) == 0
6738}
6739
6740// hasNextLink returns true if the NextLink is not empty.
6741func (bsllr BastionShareableLinkListResult) hasNextLink() bool {
6742	return bsllr.NextLink != nil && len(*bsllr.NextLink) != 0
6743}
6744
6745// bastionShareableLinkListResultPreparer prepares a request to retrieve the next set of results.
6746// It returns nil if no more results exist.
6747func (bsllr BastionShareableLinkListResult) bastionShareableLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
6748	if !bsllr.hasNextLink() {
6749		return nil, nil
6750	}
6751	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6752		autorest.AsJSON(),
6753		autorest.AsGet(),
6754		autorest.WithBaseURL(to.String(bsllr.NextLink)))
6755}
6756
6757// BastionShareableLinkListResultPage contains a page of BastionShareableLink values.
6758type BastionShareableLinkListResultPage struct {
6759	fn    func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error)
6760	bsllr BastionShareableLinkListResult
6761}
6762
6763// NextWithContext advances to the next page of values.  If there was an error making
6764// the request the page does not advance and the error is returned.
6765func (page *BastionShareableLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
6766	if tracing.IsEnabled() {
6767		ctx = tracing.StartSpan(ctx, fqdn+"/BastionShareableLinkListResultPage.NextWithContext")
6768		defer func() {
6769			sc := -1
6770			if page.Response().Response.Response != nil {
6771				sc = page.Response().Response.Response.StatusCode
6772			}
6773			tracing.EndSpan(ctx, sc, err)
6774		}()
6775	}
6776	for {
6777		next, err := page.fn(ctx, page.bsllr)
6778		if err != nil {
6779			return err
6780		}
6781		page.bsllr = next
6782		if !next.hasNextLink() || !next.IsEmpty() {
6783			break
6784		}
6785	}
6786	return nil
6787}
6788
6789// Next advances to the next page of values.  If there was an error making
6790// the request the page does not advance and the error is returned.
6791// Deprecated: Use NextWithContext() instead.
6792func (page *BastionShareableLinkListResultPage) Next() error {
6793	return page.NextWithContext(context.Background())
6794}
6795
6796// NotDone returns true if the page enumeration should be started or is not yet complete.
6797func (page BastionShareableLinkListResultPage) NotDone() bool {
6798	return !page.bsllr.IsEmpty()
6799}
6800
6801// Response returns the raw server response from the last page request.
6802func (page BastionShareableLinkListResultPage) Response() BastionShareableLinkListResult {
6803	return page.bsllr
6804}
6805
6806// Values returns the slice of values for the current page or nil if there are no values.
6807func (page BastionShareableLinkListResultPage) Values() []BastionShareableLink {
6808	if page.bsllr.IsEmpty() {
6809		return nil
6810	}
6811	return *page.bsllr.Value
6812}
6813
6814// Creates a new instance of the BastionShareableLinkListResultPage type.
6815func NewBastionShareableLinkListResultPage(cur BastionShareableLinkListResult, getNextPage func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error)) BastionShareableLinkListResultPage {
6816	return BastionShareableLinkListResultPage{
6817		fn:    getNextPage,
6818		bsllr: cur,
6819	}
6820}
6821
6822// BGPCommunity contains bgp community information offered in Service Community resources.
6823type BGPCommunity struct {
6824	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
6825	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
6826	// CommunityName - The name of the bgp community. e.g. Skype.
6827	CommunityName *string `json:"communityName,omitempty"`
6828	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
6829	CommunityValue *string `json:"communityValue,omitempty"`
6830	// CommunityPrefixes - The prefixes that the bgp community contains.
6831	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
6832	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
6833	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
6834	// ServiceGroup - The service group of the bgp community contains.
6835	ServiceGroup *string `json:"serviceGroup,omitempty"`
6836}
6837
6838// BgpPeerStatus BGP peer status details.
6839type BgpPeerStatus struct {
6840	// LocalAddress - READ-ONLY; The virtual network gateway's local address.
6841	LocalAddress *string `json:"localAddress,omitempty"`
6842	// Neighbor - READ-ONLY; The remote BGP peer.
6843	Neighbor *string `json:"neighbor,omitempty"`
6844	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer.
6845	Asn *int32 `json:"asn,omitempty"`
6846	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
6847	State BgpPeerState `json:"state,omitempty"`
6848	// ConnectedDuration - READ-ONLY; For how long the peering has been up.
6849	ConnectedDuration *string `json:"connectedDuration,omitempty"`
6850	// RoutesReceived - READ-ONLY; The number of routes learned from this peer.
6851	RoutesReceived *int64 `json:"routesReceived,omitempty"`
6852	// MessagesSent - READ-ONLY; The number of BGP messages sent.
6853	MessagesSent *int64 `json:"messagesSent,omitempty"`
6854	// MessagesReceived - READ-ONLY; The number of BGP messages received.
6855	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
6856}
6857
6858// BgpPeerStatusListResult response for list BGP peer status API service call.
6859type BgpPeerStatusListResult struct {
6860	autorest.Response `json:"-"`
6861	// Value - List of BGP peers.
6862	Value *[]BgpPeerStatus `json:"value,omitempty"`
6863}
6864
6865// BgpServiceCommunity service Community Properties.
6866type BgpServiceCommunity struct {
6867	// BgpServiceCommunityPropertiesFormat - Properties of the BGP service community.
6868	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
6869	// ID - Resource ID.
6870	ID *string `json:"id,omitempty"`
6871	// Name - READ-ONLY; Resource name.
6872	Name *string `json:"name,omitempty"`
6873	// Type - READ-ONLY; Resource type.
6874	Type *string `json:"type,omitempty"`
6875	// Location - Resource location.
6876	Location *string `json:"location,omitempty"`
6877	// Tags - Resource tags.
6878	Tags map[string]*string `json:"tags"`
6879}
6880
6881// MarshalJSON is the custom marshaler for BgpServiceCommunity.
6882func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
6883	objectMap := make(map[string]interface{})
6884	if bsc.BgpServiceCommunityPropertiesFormat != nil {
6885		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
6886	}
6887	if bsc.ID != nil {
6888		objectMap["id"] = bsc.ID
6889	}
6890	if bsc.Location != nil {
6891		objectMap["location"] = bsc.Location
6892	}
6893	if bsc.Tags != nil {
6894		objectMap["tags"] = bsc.Tags
6895	}
6896	return json.Marshal(objectMap)
6897}
6898
6899// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
6900func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
6901	var m map[string]*json.RawMessage
6902	err := json.Unmarshal(body, &m)
6903	if err != nil {
6904		return err
6905	}
6906	for k, v := range m {
6907		switch k {
6908		case "properties":
6909			if v != nil {
6910				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
6911				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
6912				if err != nil {
6913					return err
6914				}
6915				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
6916			}
6917		case "id":
6918			if v != nil {
6919				var ID string
6920				err = json.Unmarshal(*v, &ID)
6921				if err != nil {
6922					return err
6923				}
6924				bsc.ID = &ID
6925			}
6926		case "name":
6927			if v != nil {
6928				var name string
6929				err = json.Unmarshal(*v, &name)
6930				if err != nil {
6931					return err
6932				}
6933				bsc.Name = &name
6934			}
6935		case "type":
6936			if v != nil {
6937				var typeVar string
6938				err = json.Unmarshal(*v, &typeVar)
6939				if err != nil {
6940					return err
6941				}
6942				bsc.Type = &typeVar
6943			}
6944		case "location":
6945			if v != nil {
6946				var location string
6947				err = json.Unmarshal(*v, &location)
6948				if err != nil {
6949					return err
6950				}
6951				bsc.Location = &location
6952			}
6953		case "tags":
6954			if v != nil {
6955				var tags map[string]*string
6956				err = json.Unmarshal(*v, &tags)
6957				if err != nil {
6958					return err
6959				}
6960				bsc.Tags = tags
6961			}
6962		}
6963	}
6964
6965	return nil
6966}
6967
6968// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
6969type BgpServiceCommunityListResult struct {
6970	autorest.Response `json:"-"`
6971	// Value - A list of service community resources.
6972	Value *[]BgpServiceCommunity `json:"value,omitempty"`
6973	// NextLink - The URL to get the next set of results.
6974	NextLink *string `json:"nextLink,omitempty"`
6975}
6976
6977// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
6978// values.
6979type BgpServiceCommunityListResultIterator struct {
6980	i    int
6981	page BgpServiceCommunityListResultPage
6982}
6983
6984// NextWithContext advances to the next value.  If there was an error making
6985// the request the iterator does not advance and the error is returned.
6986func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
6987	if tracing.IsEnabled() {
6988		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
6989		defer func() {
6990			sc := -1
6991			if iter.Response().Response.Response != nil {
6992				sc = iter.Response().Response.Response.StatusCode
6993			}
6994			tracing.EndSpan(ctx, sc, err)
6995		}()
6996	}
6997	iter.i++
6998	if iter.i < len(iter.page.Values()) {
6999		return nil
7000	}
7001	err = iter.page.NextWithContext(ctx)
7002	if err != nil {
7003		iter.i--
7004		return err
7005	}
7006	iter.i = 0
7007	return nil
7008}
7009
7010// Next advances to the next value.  If there was an error making
7011// the request the iterator does not advance and the error is returned.
7012// Deprecated: Use NextWithContext() instead.
7013func (iter *BgpServiceCommunityListResultIterator) Next() error {
7014	return iter.NextWithContext(context.Background())
7015}
7016
7017// NotDone returns true if the enumeration should be started or is not yet complete.
7018func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
7019	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7020}
7021
7022// Response returns the raw server response from the last page request.
7023func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
7024	return iter.page.Response()
7025}
7026
7027// Value returns the current value or a zero-initialized value if the
7028// iterator has advanced beyond the end of the collection.
7029func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
7030	if !iter.page.NotDone() {
7031		return BgpServiceCommunity{}
7032	}
7033	return iter.page.Values()[iter.i]
7034}
7035
7036// Creates a new instance of the BgpServiceCommunityListResultIterator type.
7037func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
7038	return BgpServiceCommunityListResultIterator{page: page}
7039}
7040
7041// IsEmpty returns true if the ListResult contains no values.
7042func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
7043	return bsclr.Value == nil || len(*bsclr.Value) == 0
7044}
7045
7046// hasNextLink returns true if the NextLink is not empty.
7047func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
7048	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
7049}
7050
7051// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
7052// It returns nil if no more results exist.
7053func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
7054	if !bsclr.hasNextLink() {
7055		return nil, nil
7056	}
7057	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7058		autorest.AsJSON(),
7059		autorest.AsGet(),
7060		autorest.WithBaseURL(to.String(bsclr.NextLink)))
7061}
7062
7063// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
7064type BgpServiceCommunityListResultPage struct {
7065	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
7066	bsclr BgpServiceCommunityListResult
7067}
7068
7069// NextWithContext advances to the next page of values.  If there was an error making
7070// the request the page does not advance and the error is returned.
7071func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
7072	if tracing.IsEnabled() {
7073		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
7074		defer func() {
7075			sc := -1
7076			if page.Response().Response.Response != nil {
7077				sc = page.Response().Response.Response.StatusCode
7078			}
7079			tracing.EndSpan(ctx, sc, err)
7080		}()
7081	}
7082	for {
7083		next, err := page.fn(ctx, page.bsclr)
7084		if err != nil {
7085			return err
7086		}
7087		page.bsclr = next
7088		if !next.hasNextLink() || !next.IsEmpty() {
7089			break
7090		}
7091	}
7092	return nil
7093}
7094
7095// Next advances to the next page of values.  If there was an error making
7096// the request the page does not advance and the error is returned.
7097// Deprecated: Use NextWithContext() instead.
7098func (page *BgpServiceCommunityListResultPage) Next() error {
7099	return page.NextWithContext(context.Background())
7100}
7101
7102// NotDone returns true if the page enumeration should be started or is not yet complete.
7103func (page BgpServiceCommunityListResultPage) NotDone() bool {
7104	return !page.bsclr.IsEmpty()
7105}
7106
7107// Response returns the raw server response from the last page request.
7108func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
7109	return page.bsclr
7110}
7111
7112// Values returns the slice of values for the current page or nil if there are no values.
7113func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
7114	if page.bsclr.IsEmpty() {
7115		return nil
7116	}
7117	return *page.bsclr.Value
7118}
7119
7120// Creates a new instance of the BgpServiceCommunityListResultPage type.
7121func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
7122	return BgpServiceCommunityListResultPage{
7123		fn:    getNextPage,
7124		bsclr: cur,
7125	}
7126}
7127
7128// BgpServiceCommunityPropertiesFormat properties of Service Community.
7129type BgpServiceCommunityPropertiesFormat struct {
7130	// ServiceName - The name of the bgp community. e.g. Skype.
7131	ServiceName *string `json:"serviceName,omitempty"`
7132	// BgpCommunities - A list of bgp communities.
7133	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
7134}
7135
7136// BgpSettings BGP settings details.
7137type BgpSettings struct {
7138	// Asn - The BGP speaker's ASN.
7139	Asn *int64 `json:"asn,omitempty"`
7140	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
7141	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
7142	// PeerWeight - The weight added to routes learned from this BGP speaker.
7143	PeerWeight *int32 `json:"peerWeight,omitempty"`
7144	// BgpPeeringAddresses - BGP peering address with IP configuration ID for virtual network gateway.
7145	BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"`
7146}
7147
7148// CheckPrivateLinkServiceVisibilityRequest request body of the CheckPrivateLinkServiceVisibility API
7149// service call.
7150type CheckPrivateLinkServiceVisibilityRequest struct {
7151	// PrivateLinkServiceAlias - The alias of the private link service.
7152	PrivateLinkServiceAlias *string `json:"privateLinkServiceAlias,omitempty"`
7153}
7154
7155// CloudError an error response from the service.
7156type CloudError struct {
7157	// Error - Cloud error body.
7158	Error *CloudErrorBody `json:"error,omitempty"`
7159}
7160
7161// CloudErrorBody an error response from the service.
7162type CloudErrorBody struct {
7163	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
7164	Code *string `json:"code,omitempty"`
7165	// Message - A message describing the error, intended to be suitable for display in a user interface.
7166	Message *string `json:"message,omitempty"`
7167	// Target - The target of the particular error. For example, the name of the property in error.
7168	Target *string `json:"target,omitempty"`
7169	// Details - A list of additional details about the error.
7170	Details *[]CloudErrorBody `json:"details,omitempty"`
7171}
7172
7173// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
7174type ConfigurationDiagnosticParameters struct {
7175	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
7176	TargetResourceID *string `json:"targetResourceId,omitempty"`
7177	// VerbosityLevel - Verbosity level. Possible values include: 'Normal', 'Minimum', 'Full'
7178	VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"`
7179	// Profiles - List of network configuration diagnostic profiles.
7180	Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"`
7181}
7182
7183// ConfigurationDiagnosticProfile parameters to compare with network configuration.
7184type ConfigurationDiagnosticProfile struct {
7185	// Direction - The direction of the traffic. Possible values include: 'Inbound', 'Outbound'
7186	Direction Direction `json:"direction,omitempty"`
7187	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
7188	Protocol *string `json:"protocol,omitempty"`
7189	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
7190	Source *string `json:"source,omitempty"`
7191	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
7192	Destination *string `json:"destination,omitempty"`
7193	// DestinationPort - Traffic destination port. Accepted values are '*' and a single port in the range (0 - 65535).
7194	DestinationPort *string `json:"destinationPort,omitempty"`
7195}
7196
7197// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
7198type ConfigurationDiagnosticResponse struct {
7199	autorest.Response `json:"-"`
7200	// Results - READ-ONLY; List of network configuration diagnostic results.
7201	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
7202}
7203
7204// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
7205// query.
7206type ConfigurationDiagnosticResult struct {
7207	// Profile - Network configuration diagnostic profile.
7208	Profile *ConfigurationDiagnosticProfile `json:"profile,omitempty"`
7209	// NetworkSecurityGroupResult - Network security group result.
7210	NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"`
7211}
7212
7213// ConnectionMonitor parameters that define the operation to create a connection monitor.
7214type ConnectionMonitor struct {
7215	// Location - Connection monitor location.
7216	Location *string `json:"location,omitempty"`
7217	// Tags - Connection monitor tags.
7218	Tags map[string]*string `json:"tags"`
7219	// ConnectionMonitorParameters - Properties of the connection monitor.
7220	*ConnectionMonitorParameters `json:"properties,omitempty"`
7221}
7222
7223// MarshalJSON is the custom marshaler for ConnectionMonitor.
7224func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
7225	objectMap := make(map[string]interface{})
7226	if cm.Location != nil {
7227		objectMap["location"] = cm.Location
7228	}
7229	if cm.Tags != nil {
7230		objectMap["tags"] = cm.Tags
7231	}
7232	if cm.ConnectionMonitorParameters != nil {
7233		objectMap["properties"] = cm.ConnectionMonitorParameters
7234	}
7235	return json.Marshal(objectMap)
7236}
7237
7238// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
7239func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
7240	var m map[string]*json.RawMessage
7241	err := json.Unmarshal(body, &m)
7242	if err != nil {
7243		return err
7244	}
7245	for k, v := range m {
7246		switch k {
7247		case "location":
7248			if v != nil {
7249				var location string
7250				err = json.Unmarshal(*v, &location)
7251				if err != nil {
7252					return err
7253				}
7254				cm.Location = &location
7255			}
7256		case "tags":
7257			if v != nil {
7258				var tags map[string]*string
7259				err = json.Unmarshal(*v, &tags)
7260				if err != nil {
7261					return err
7262				}
7263				cm.Tags = tags
7264			}
7265		case "properties":
7266			if v != nil {
7267				var connectionMonitorParameters ConnectionMonitorParameters
7268				err = json.Unmarshal(*v, &connectionMonitorParameters)
7269				if err != nil {
7270					return err
7271				}
7272				cm.ConnectionMonitorParameters = &connectionMonitorParameters
7273			}
7274		}
7275	}
7276
7277	return nil
7278}
7279
7280// ConnectionMonitorDestination describes the destination of connection monitor.
7281type ConnectionMonitorDestination struct {
7282	// ResourceID - The ID of the resource used as the destination by connection monitor.
7283	ResourceID *string `json:"resourceId,omitempty"`
7284	// Address - Address of the connection monitor destination (IP or domain name).
7285	Address *string `json:"address,omitempty"`
7286	// Port - The destination port used by connection monitor.
7287	Port *int32 `json:"port,omitempty"`
7288}
7289
7290// ConnectionMonitorEndpoint describes the connection monitor endpoint.
7291type ConnectionMonitorEndpoint struct {
7292	// Name - The name of the connection monitor endpoint.
7293	Name *string `json:"name,omitempty"`
7294	// ResourceID - Resource ID of the connection monitor endpoint.
7295	ResourceID *string `json:"resourceId,omitempty"`
7296	// Address - Address of the connection monitor endpoint (IP or domain name).
7297	Address *string `json:"address,omitempty"`
7298	// Filter - Filter for sub-items within the endpoint.
7299	Filter *ConnectionMonitorEndpointFilter `json:"filter,omitempty"`
7300}
7301
7302// ConnectionMonitorEndpointFilter describes the connection monitor endpoint filter.
7303type ConnectionMonitorEndpointFilter struct {
7304	// Type - The behavior of the endpoint filter. Currently only 'Include' is supported. Possible values include: 'Include'
7305	Type ConnectionMonitorEndpointFilterType `json:"type,omitempty"`
7306	// Items - List of items in the filter.
7307	Items *[]ConnectionMonitorEndpointFilterItem `json:"items,omitempty"`
7308}
7309
7310// ConnectionMonitorEndpointFilterItem describes the connection monitor endpoint filter item.
7311type ConnectionMonitorEndpointFilterItem struct {
7312	// Type - The type of item included in the filter. Currently only 'AgentAddress' is supported. Possible values include: 'AgentAddress'
7313	Type ConnectionMonitorEndpointFilterItemType `json:"type,omitempty"`
7314	// Address - The address of the filter item.
7315	Address *string `json:"address,omitempty"`
7316}
7317
7318// ConnectionMonitorHTTPConfiguration describes the HTTP configuration.
7319type ConnectionMonitorHTTPConfiguration struct {
7320	// Port - The port to connect to.
7321	Port *int32 `json:"port,omitempty"`
7322	// Method - The HTTP method to use. Possible values include: 'Get', 'Post'
7323	Method HTTPConfigurationMethod `json:"method,omitempty"`
7324	// Path - The path component of the URI. For instance, "/dir1/dir2".
7325	Path *string `json:"path,omitempty"`
7326	// RequestHeaders - The HTTP headers to transmit with the request.
7327	RequestHeaders *[]HTTPHeader `json:"requestHeaders,omitempty"`
7328	// ValidStatusCodeRanges - HTTP status codes to consider successful. For instance, "2xx,301-304,418".
7329	ValidStatusCodeRanges *[]string `json:"validStatusCodeRanges,omitempty"`
7330	// PreferHTTPS - Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit.
7331	PreferHTTPS *bool `json:"preferHTTPS,omitempty"`
7332}
7333
7334// ConnectionMonitorIcmpConfiguration describes the ICMP configuration.
7335type ConnectionMonitorIcmpConfiguration struct {
7336	// DisableTraceRoute - Value indicating whether path evaluation with trace route should be disabled.
7337	DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"`
7338}
7339
7340// ConnectionMonitorListResult list of connection monitors.
7341type ConnectionMonitorListResult struct {
7342	autorest.Response `json:"-"`
7343	// Value - Information about connection monitors.
7344	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
7345}
7346
7347// ConnectionMonitorOutput describes a connection monitor output destination.
7348type ConnectionMonitorOutput struct {
7349	// Type - Connection monitor output destination type. Currently, only "Workspace" is supported. Possible values include: 'Workspace'
7350	Type OutputType `json:"type,omitempty"`
7351	// WorkspaceSettings - Describes the settings for producing output into a log analytics workspace.
7352	WorkspaceSettings *ConnectionMonitorWorkspaceSettings `json:"workspaceSettings,omitempty"`
7353}
7354
7355// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
7356type ConnectionMonitorParameters struct {
7357	// Source - Describes the source of connection monitor.
7358	Source *ConnectionMonitorSource `json:"source,omitempty"`
7359	// Destination - Describes the destination of connection monitor.
7360	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
7361	// AutoStart - Determines if the connection monitor will start automatically once created.
7362	AutoStart *bool `json:"autoStart,omitempty"`
7363	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
7364	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
7365	// Endpoints - List of connection monitor endpoints.
7366	Endpoints *[]ConnectionMonitorEndpoint `json:"endpoints,omitempty"`
7367	// TestConfigurations - List of connection monitor test configurations.
7368	TestConfigurations *[]ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"`
7369	// TestGroups - List of connection monitor test groups.
7370	TestGroups *[]ConnectionMonitorTestGroup `json:"testGroups,omitempty"`
7371	// Outputs - List of connection monitor outputs.
7372	Outputs *[]ConnectionMonitorOutput `json:"outputs,omitempty"`
7373	// Notes - Optional notes to be associated with the connection monitor.
7374	Notes *string `json:"notes,omitempty"`
7375}
7376
7377// ConnectionMonitorQueryResult list of connection states snapshots.
7378type ConnectionMonitorQueryResult struct {
7379	autorest.Response `json:"-"`
7380	// SourceStatus - Status of connection monitor source. Possible values include: 'ConnectionMonitorSourceStatusUnknown', 'ConnectionMonitorSourceStatusActive', 'ConnectionMonitorSourceStatusInactive'
7381	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
7382	// States - Information about connection states.
7383	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
7384}
7385
7386// ConnectionMonitorResult information about the connection monitor.
7387type ConnectionMonitorResult struct {
7388	autorest.Response `json:"-"`
7389	// Name - READ-ONLY; Name of the connection monitor.
7390	Name *string `json:"name,omitempty"`
7391	// ID - READ-ONLY; ID of the connection monitor.
7392	ID *string `json:"id,omitempty"`
7393	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7394	Etag *string `json:"etag,omitempty"`
7395	// Type - READ-ONLY; Connection monitor type.
7396	Type *string `json:"type,omitempty"`
7397	// Location - Connection monitor location.
7398	Location *string `json:"location,omitempty"`
7399	// Tags - Connection monitor tags.
7400	Tags map[string]*string `json:"tags"`
7401	// ConnectionMonitorResultProperties - Properties of the connection monitor result.
7402	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
7403}
7404
7405// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
7406func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
7407	objectMap := make(map[string]interface{})
7408	if cmr.Location != nil {
7409		objectMap["location"] = cmr.Location
7410	}
7411	if cmr.Tags != nil {
7412		objectMap["tags"] = cmr.Tags
7413	}
7414	if cmr.ConnectionMonitorResultProperties != nil {
7415		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
7416	}
7417	return json.Marshal(objectMap)
7418}
7419
7420// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
7421func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
7422	var m map[string]*json.RawMessage
7423	err := json.Unmarshal(body, &m)
7424	if err != nil {
7425		return err
7426	}
7427	for k, v := range m {
7428		switch k {
7429		case "name":
7430			if v != nil {
7431				var name string
7432				err = json.Unmarshal(*v, &name)
7433				if err != nil {
7434					return err
7435				}
7436				cmr.Name = &name
7437			}
7438		case "id":
7439			if v != nil {
7440				var ID string
7441				err = json.Unmarshal(*v, &ID)
7442				if err != nil {
7443					return err
7444				}
7445				cmr.ID = &ID
7446			}
7447		case "etag":
7448			if v != nil {
7449				var etag string
7450				err = json.Unmarshal(*v, &etag)
7451				if err != nil {
7452					return err
7453				}
7454				cmr.Etag = &etag
7455			}
7456		case "type":
7457			if v != nil {
7458				var typeVar string
7459				err = json.Unmarshal(*v, &typeVar)
7460				if err != nil {
7461					return err
7462				}
7463				cmr.Type = &typeVar
7464			}
7465		case "location":
7466			if v != nil {
7467				var location string
7468				err = json.Unmarshal(*v, &location)
7469				if err != nil {
7470					return err
7471				}
7472				cmr.Location = &location
7473			}
7474		case "tags":
7475			if v != nil {
7476				var tags map[string]*string
7477				err = json.Unmarshal(*v, &tags)
7478				if err != nil {
7479					return err
7480				}
7481				cmr.Tags = tags
7482			}
7483		case "properties":
7484			if v != nil {
7485				var connectionMonitorResultProperties ConnectionMonitorResultProperties
7486				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
7487				if err != nil {
7488					return err
7489				}
7490				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
7491			}
7492		}
7493	}
7494
7495	return nil
7496}
7497
7498// ConnectionMonitorResultProperties describes the properties of a connection monitor.
7499type ConnectionMonitorResultProperties struct {
7500	// ProvisioningState - READ-ONLY; The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
7501	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
7502	// StartTime - READ-ONLY; The date and time when the connection monitor was started.
7503	StartTime *date.Time `json:"startTime,omitempty"`
7504	// MonitoringStatus - READ-ONLY; The monitoring status of the connection monitor.
7505	MonitoringStatus *string `json:"monitoringStatus,omitempty"`
7506	// ConnectionMonitorType - READ-ONLY; Type of connection monitor. Possible values include: 'MultiEndpoint', 'SingleSourceDestination'
7507	ConnectionMonitorType ConnectionMonitorType `json:"connectionMonitorType,omitempty"`
7508	// Source - Describes the source of connection monitor.
7509	Source *ConnectionMonitorSource `json:"source,omitempty"`
7510	// Destination - Describes the destination of connection monitor.
7511	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
7512	// AutoStart - Determines if the connection monitor will start automatically once created.
7513	AutoStart *bool `json:"autoStart,omitempty"`
7514	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
7515	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
7516	// Endpoints - List of connection monitor endpoints.
7517	Endpoints *[]ConnectionMonitorEndpoint `json:"endpoints,omitempty"`
7518	// TestConfigurations - List of connection monitor test configurations.
7519	TestConfigurations *[]ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"`
7520	// TestGroups - List of connection monitor test groups.
7521	TestGroups *[]ConnectionMonitorTestGroup `json:"testGroups,omitempty"`
7522	// Outputs - List of connection monitor outputs.
7523	Outputs *[]ConnectionMonitorOutput `json:"outputs,omitempty"`
7524	// Notes - Optional notes to be associated with the connection monitor.
7525	Notes *string `json:"notes,omitempty"`
7526}
7527
7528// MarshalJSON is the custom marshaler for ConnectionMonitorResultProperties.
7529func (cmrp ConnectionMonitorResultProperties) MarshalJSON() ([]byte, error) {
7530	objectMap := make(map[string]interface{})
7531	if cmrp.Source != nil {
7532		objectMap["source"] = cmrp.Source
7533	}
7534	if cmrp.Destination != nil {
7535		objectMap["destination"] = cmrp.Destination
7536	}
7537	if cmrp.AutoStart != nil {
7538		objectMap["autoStart"] = cmrp.AutoStart
7539	}
7540	if cmrp.MonitoringIntervalInSeconds != nil {
7541		objectMap["monitoringIntervalInSeconds"] = cmrp.MonitoringIntervalInSeconds
7542	}
7543	if cmrp.Endpoints != nil {
7544		objectMap["endpoints"] = cmrp.Endpoints
7545	}
7546	if cmrp.TestConfigurations != nil {
7547		objectMap["testConfigurations"] = cmrp.TestConfigurations
7548	}
7549	if cmrp.TestGroups != nil {
7550		objectMap["testGroups"] = cmrp.TestGroups
7551	}
7552	if cmrp.Outputs != nil {
7553		objectMap["outputs"] = cmrp.Outputs
7554	}
7555	if cmrp.Notes != nil {
7556		objectMap["notes"] = cmrp.Notes
7557	}
7558	return json.Marshal(objectMap)
7559}
7560
7561// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7562// long-running operation.
7563type ConnectionMonitorsCreateOrUpdateFuture struct {
7564	azure.FutureAPI
7565	// Result returns the result of the asynchronous operation.
7566	// If the operation has not completed it will return an error.
7567	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
7568}
7569
7570// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
7571// long-running operation.
7572type ConnectionMonitorsDeleteFuture struct {
7573	azure.FutureAPI
7574	// Result returns the result of the asynchronous operation.
7575	// If the operation has not completed it will return an error.
7576	Result func(ConnectionMonitorsClient) (autorest.Response, error)
7577}
7578
7579// ConnectionMonitorSource describes the source of connection monitor.
7580type ConnectionMonitorSource struct {
7581	// ResourceID - The ID of the resource used as the source by connection monitor.
7582	ResourceID *string `json:"resourceId,omitempty"`
7583	// Port - The source port used by connection monitor.
7584	Port *int32 `json:"port,omitempty"`
7585}
7586
7587// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
7588// operation.
7589type ConnectionMonitorsQueryFuture struct {
7590	azure.FutureAPI
7591	// Result returns the result of the asynchronous operation.
7592	// If the operation has not completed it will return an error.
7593	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
7594}
7595
7596// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
7597// operation.
7598type ConnectionMonitorsStartFuture struct {
7599	azure.FutureAPI
7600	// Result returns the result of the asynchronous operation.
7601	// If the operation has not completed it will return an error.
7602	Result func(ConnectionMonitorsClient) (autorest.Response, error)
7603}
7604
7605// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
7606// operation.
7607type ConnectionMonitorsStopFuture struct {
7608	azure.FutureAPI
7609	// Result returns the result of the asynchronous operation.
7610	// If the operation has not completed it will return an error.
7611	Result func(ConnectionMonitorsClient) (autorest.Response, error)
7612}
7613
7614// ConnectionMonitorSuccessThreshold describes the threshold for declaring a test successful.
7615type ConnectionMonitorSuccessThreshold struct {
7616	// ChecksFailedPercent - The maximum percentage of failed checks permitted for a test to evaluate as successful.
7617	ChecksFailedPercent *int32 `json:"checksFailedPercent,omitempty"`
7618	// RoundTripTimeMs - The maximum round-trip time in milliseconds permitted for a test to evaluate as successful.
7619	RoundTripTimeMs *int32 `json:"roundTripTimeMs,omitempty"`
7620}
7621
7622// ConnectionMonitorTCPConfiguration describes the TCP configuration.
7623type ConnectionMonitorTCPConfiguration struct {
7624	// Port - The port to connect to.
7625	Port *int32 `json:"port,omitempty"`
7626	// DisableTraceRoute - Value indicating whether path evaluation with trace route should be disabled.
7627	DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"`
7628}
7629
7630// ConnectionMonitorTestConfiguration describes a connection monitor test configuration.
7631type ConnectionMonitorTestConfiguration struct {
7632	// Name - The name of the connection monitor test configuration.
7633	Name *string `json:"name,omitempty"`
7634	// TestFrequencySec - The frequency of test evaluation, in seconds.
7635	TestFrequencySec *int32 `json:"testFrequencySec,omitempty"`
7636	// Protocol - The protocol to use in test evaluation. Possible values include: 'ConnectionMonitorTestConfigurationProtocolTCP', 'ConnectionMonitorTestConfigurationProtocolHTTP', 'ConnectionMonitorTestConfigurationProtocolIcmp'
7637	Protocol ConnectionMonitorTestConfigurationProtocol `json:"protocol,omitempty"`
7638	// 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'
7639	PreferredIPVersion PreferredIPVersion `json:"preferredIPVersion,omitempty"`
7640	// HTTPConfiguration - The parameters used to perform test evaluation over HTTP.
7641	HTTPConfiguration *ConnectionMonitorHTTPConfiguration `json:"httpConfiguration,omitempty"`
7642	// TCPConfiguration - The parameters used to perform test evaluation over TCP.
7643	TCPConfiguration *ConnectionMonitorTCPConfiguration `json:"tcpConfiguration,omitempty"`
7644	// IcmpConfiguration - The parameters used to perform test evaluation over ICMP.
7645	IcmpConfiguration *ConnectionMonitorIcmpConfiguration `json:"icmpConfiguration,omitempty"`
7646	// SuccessThreshold - The threshold for declaring a test successful.
7647	SuccessThreshold *ConnectionMonitorSuccessThreshold `json:"successThreshold,omitempty"`
7648}
7649
7650// ConnectionMonitorTestGroup describes the connection monitor test group.
7651type ConnectionMonitorTestGroup struct {
7652	// Name - The name of the connection monitor test group.
7653	Name *string `json:"name,omitempty"`
7654	// Disable - Value indicating whether test group is disabled.
7655	Disable *bool `json:"disable,omitempty"`
7656	// TestConfigurations - List of test configuration names.
7657	TestConfigurations *[]string `json:"testConfigurations,omitempty"`
7658	// Sources - List of source endpoint names.
7659	Sources *[]string `json:"sources,omitempty"`
7660	// Destinations - List of destination endpoint names.
7661	Destinations *[]string `json:"destinations,omitempty"`
7662}
7663
7664// ConnectionMonitorWorkspaceSettings describes the settings for producing output into a log analytics
7665// workspace.
7666type ConnectionMonitorWorkspaceSettings struct {
7667	// WorkspaceResourceID - Log analytics workspace resource ID.
7668	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
7669}
7670
7671// ConnectionResetSharedKey the virtual network connection reset shared key.
7672type ConnectionResetSharedKey struct {
7673	autorest.Response `json:"-"`
7674	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
7675	KeyLength *int32 `json:"keyLength,omitempty"`
7676}
7677
7678// ConnectionSharedKey response for GetConnectionSharedKey API service call.
7679type ConnectionSharedKey struct {
7680	autorest.Response `json:"-"`
7681	// Value - The virtual network connection shared key value.
7682	Value *string `json:"value,omitempty"`
7683	// ID - Resource ID.
7684	ID *string `json:"id,omitempty"`
7685}
7686
7687// ConnectionStateSnapshot connection state snapshot.
7688type ConnectionStateSnapshot struct {
7689	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
7690	ConnectionState ConnectionState `json:"connectionState,omitempty"`
7691	// StartTime - The start time of the connection snapshot.
7692	StartTime *date.Time `json:"startTime,omitempty"`
7693	// EndTime - The end time of the connection snapshot.
7694	EndTime *date.Time `json:"endTime,omitempty"`
7695	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
7696	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
7697	// AvgLatencyInMs - Average latency in ms.
7698	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
7699	// MinLatencyInMs - Minimum latency in ms.
7700	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
7701	// MaxLatencyInMs - Maximum latency in ms.
7702	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
7703	// ProbesSent - The number of sent probes.
7704	ProbesSent *int32 `json:"probesSent,omitempty"`
7705	// ProbesFailed - The number of failed probes.
7706	ProbesFailed *int32 `json:"probesFailed,omitempty"`
7707	// Hops - READ-ONLY; List of hops between the source and the destination.
7708	Hops *[]ConnectivityHop `json:"hops,omitempty"`
7709}
7710
7711// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
7712func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
7713	objectMap := make(map[string]interface{})
7714	if CSS.ConnectionState != "" {
7715		objectMap["connectionState"] = CSS.ConnectionState
7716	}
7717	if CSS.StartTime != nil {
7718		objectMap["startTime"] = CSS.StartTime
7719	}
7720	if CSS.EndTime != nil {
7721		objectMap["endTime"] = CSS.EndTime
7722	}
7723	if CSS.EvaluationState != "" {
7724		objectMap["evaluationState"] = CSS.EvaluationState
7725	}
7726	if CSS.AvgLatencyInMs != nil {
7727		objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
7728	}
7729	if CSS.MinLatencyInMs != nil {
7730		objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
7731	}
7732	if CSS.MaxLatencyInMs != nil {
7733		objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
7734	}
7735	if CSS.ProbesSent != nil {
7736		objectMap["probesSent"] = CSS.ProbesSent
7737	}
7738	if CSS.ProbesFailed != nil {
7739		objectMap["probesFailed"] = CSS.ProbesFailed
7740	}
7741	return json.Marshal(objectMap)
7742}
7743
7744// ConnectivityDestination parameters that define destination of connection.
7745type ConnectivityDestination struct {
7746	// ResourceID - The ID of the resource to which a connection attempt will be made.
7747	ResourceID *string `json:"resourceId,omitempty"`
7748	// Address - The IP address or URI the resource to which a connection attempt will be made.
7749	Address *string `json:"address,omitempty"`
7750	// Port - Port on which check connectivity will be performed.
7751	Port *int32 `json:"port,omitempty"`
7752}
7753
7754// ConnectivityHop information about a hop between the source and the destination.
7755type ConnectivityHop struct {
7756	// Type - READ-ONLY; The type of the hop.
7757	Type *string `json:"type,omitempty"`
7758	// ID - READ-ONLY; The ID of the hop.
7759	ID *string `json:"id,omitempty"`
7760	// Address - READ-ONLY; The IP address of the hop.
7761	Address *string `json:"address,omitempty"`
7762	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
7763	ResourceID *string `json:"resourceId,omitempty"`
7764	// NextHopIds - READ-ONLY; List of next hop identifiers.
7765	NextHopIds *[]string `json:"nextHopIds,omitempty"`
7766	// Issues - READ-ONLY; List of issues.
7767	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
7768}
7769
7770// ConnectivityInformation information on the connectivity status.
7771type ConnectivityInformation struct {
7772	autorest.Response `json:"-"`
7773	// Hops - READ-ONLY; List of hops between the source and the destination.
7774	Hops *[]ConnectivityHop `json:"hops,omitempty"`
7775	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
7776	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
7777	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
7778	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
7779	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
7780	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
7781	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
7782	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
7783	// ProbesSent - READ-ONLY; Total number of probes sent.
7784	ProbesSent *int32 `json:"probesSent,omitempty"`
7785	// ProbesFailed - READ-ONLY; Number of failed probes.
7786	ProbesFailed *int32 `json:"probesFailed,omitempty"`
7787}
7788
7789// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
7790type ConnectivityIssue struct {
7791	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
7792	Origin Origin `json:"origin,omitempty"`
7793	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
7794	Severity Severity `json:"severity,omitempty"`
7795	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
7796	Type IssueType `json:"type,omitempty"`
7797	// Context - READ-ONLY; Provides additional context on the issue.
7798	Context *[]map[string]*string `json:"context,omitempty"`
7799}
7800
7801// ConnectivityParameters parameters that determine how the connectivity check will be performed.
7802type ConnectivityParameters struct {
7803	// Source - The source of the connection.
7804	Source *ConnectivitySource `json:"source,omitempty"`
7805	// Destination - The destination of connection.
7806	Destination *ConnectivityDestination `json:"destination,omitempty"`
7807	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
7808	Protocol Protocol `json:"protocol,omitempty"`
7809	// ProtocolConfiguration - Configuration of the protocol.
7810	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
7811	// PreferredIPVersion - Preferred IP version of the connection. Possible values include: 'IPv4', 'IPv6'
7812	PreferredIPVersion IPVersion `json:"preferredIPVersion,omitempty"`
7813}
7814
7815// ConnectivitySource parameters that define the source of the connection.
7816type ConnectivitySource struct {
7817	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
7818	ResourceID *string `json:"resourceId,omitempty"`
7819	// Port - The source port from which a connectivity check will be performed.
7820	Port *int32 `json:"port,omitempty"`
7821}
7822
7823// Container reference to container resource in remote resource provider.
7824type Container struct {
7825	// ID - Resource ID.
7826	ID *string `json:"id,omitempty"`
7827}
7828
7829// ContainerNetworkInterface container network interface child resource.
7830type ContainerNetworkInterface struct {
7831	// ContainerNetworkInterfacePropertiesFormat - Container network interface properties.
7832	*ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"`
7833	// Name - The name of the resource. This name can be used to access the resource.
7834	Name *string `json:"name,omitempty"`
7835	// Type - READ-ONLY; Sub Resource type.
7836	Type *string `json:"type,omitempty"`
7837	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7838	Etag *string `json:"etag,omitempty"`
7839	// ID - Resource ID.
7840	ID *string `json:"id,omitempty"`
7841}
7842
7843// MarshalJSON is the custom marshaler for ContainerNetworkInterface.
7844func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) {
7845	objectMap := make(map[string]interface{})
7846	if cni.ContainerNetworkInterfacePropertiesFormat != nil {
7847		objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat
7848	}
7849	if cni.Name != nil {
7850		objectMap["name"] = cni.Name
7851	}
7852	if cni.ID != nil {
7853		objectMap["id"] = cni.ID
7854	}
7855	return json.Marshal(objectMap)
7856}
7857
7858// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct.
7859func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error {
7860	var m map[string]*json.RawMessage
7861	err := json.Unmarshal(body, &m)
7862	if err != nil {
7863		return err
7864	}
7865	for k, v := range m {
7866		switch k {
7867		case "properties":
7868			if v != nil {
7869				var containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat
7870				err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat)
7871				if err != nil {
7872					return err
7873				}
7874				cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat
7875			}
7876		case "name":
7877			if v != nil {
7878				var name string
7879				err = json.Unmarshal(*v, &name)
7880				if err != nil {
7881					return err
7882				}
7883				cni.Name = &name
7884			}
7885		case "type":
7886			if v != nil {
7887				var typeVar string
7888				err = json.Unmarshal(*v, &typeVar)
7889				if err != nil {
7890					return err
7891				}
7892				cni.Type = &typeVar
7893			}
7894		case "etag":
7895			if v != nil {
7896				var etag string
7897				err = json.Unmarshal(*v, &etag)
7898				if err != nil {
7899					return err
7900				}
7901				cni.Etag = &etag
7902			}
7903		case "id":
7904			if v != nil {
7905				var ID string
7906				err = json.Unmarshal(*v, &ID)
7907				if err != nil {
7908					return err
7909				}
7910				cni.ID = &ID
7911			}
7912		}
7913	}
7914
7915	return nil
7916}
7917
7918// ContainerNetworkInterfaceConfiguration container network interface configuration child resource.
7919type ContainerNetworkInterfaceConfiguration struct {
7920	// ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties.
7921	*ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"`
7922	// Name - The name of the resource. This name can be used to access the resource.
7923	Name *string `json:"name,omitempty"`
7924	// Type - READ-ONLY; Sub Resource type.
7925	Type *string `json:"type,omitempty"`
7926	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7927	Etag *string `json:"etag,omitempty"`
7928	// ID - Resource ID.
7929	ID *string `json:"id,omitempty"`
7930}
7931
7932// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration.
7933func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
7934	objectMap := make(map[string]interface{})
7935	if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil {
7936		objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat
7937	}
7938	if cnic.Name != nil {
7939		objectMap["name"] = cnic.Name
7940	}
7941	if cnic.ID != nil {
7942		objectMap["id"] = cnic.ID
7943	}
7944	return json.Marshal(objectMap)
7945}
7946
7947// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct.
7948func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error {
7949	var m map[string]*json.RawMessage
7950	err := json.Unmarshal(body, &m)
7951	if err != nil {
7952		return err
7953	}
7954	for k, v := range m {
7955		switch k {
7956		case "properties":
7957			if v != nil {
7958				var containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat
7959				err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat)
7960				if err != nil {
7961					return err
7962				}
7963				cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat
7964			}
7965		case "name":
7966			if v != nil {
7967				var name string
7968				err = json.Unmarshal(*v, &name)
7969				if err != nil {
7970					return err
7971				}
7972				cnic.Name = &name
7973			}
7974		case "type":
7975			if v != nil {
7976				var typeVar string
7977				err = json.Unmarshal(*v, &typeVar)
7978				if err != nil {
7979					return err
7980				}
7981				cnic.Type = &typeVar
7982			}
7983		case "etag":
7984			if v != nil {
7985				var etag string
7986				err = json.Unmarshal(*v, &etag)
7987				if err != nil {
7988					return err
7989				}
7990				cnic.Etag = &etag
7991			}
7992		case "id":
7993			if v != nil {
7994				var ID string
7995				err = json.Unmarshal(*v, &ID)
7996				if err != nil {
7997					return err
7998				}
7999				cnic.ID = &ID
8000			}
8001		}
8002	}
8003
8004	return nil
8005}
8006
8007// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration
8008// properties.
8009type ContainerNetworkInterfaceConfigurationPropertiesFormat struct {
8010	// IPConfigurations - A list of ip configurations of the container network interface configuration.
8011	IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"`
8012	// ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration.
8013	ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"`
8014	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
8015	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8016}
8017
8018// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat.
8019func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
8020	objectMap := make(map[string]interface{})
8021	if cnicpf.IPConfigurations != nil {
8022		objectMap["ipConfigurations"] = cnicpf.IPConfigurations
8023	}
8024	if cnicpf.ContainerNetworkInterfaces != nil {
8025		objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces
8026	}
8027	return json.Marshal(objectMap)
8028}
8029
8030// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface.
8031type ContainerNetworkInterfaceIPConfiguration struct {
8032	// ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration.
8033	*ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
8034	// Name - The name of the resource. This name can be used to access the resource.
8035	Name *string `json:"name,omitempty"`
8036	// Type - READ-ONLY; Sub Resource type.
8037	Type *string `json:"type,omitempty"`
8038	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8039	Etag *string `json:"etag,omitempty"`
8040}
8041
8042// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration.
8043func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
8044	objectMap := make(map[string]interface{})
8045	if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil {
8046		objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat
8047	}
8048	if cniic.Name != nil {
8049		objectMap["name"] = cniic.Name
8050	}
8051	return json.Marshal(objectMap)
8052}
8053
8054// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct.
8055func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
8056	var m map[string]*json.RawMessage
8057	err := json.Unmarshal(body, &m)
8058	if err != nil {
8059		return err
8060	}
8061	for k, v := range m {
8062		switch k {
8063		case "properties":
8064			if v != nil {
8065				var containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat
8066				err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat)
8067				if err != nil {
8068					return err
8069				}
8070				cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat
8071			}
8072		case "name":
8073			if v != nil {
8074				var name string
8075				err = json.Unmarshal(*v, &name)
8076				if err != nil {
8077					return err
8078				}
8079				cniic.Name = &name
8080			}
8081		case "type":
8082			if v != nil {
8083				var typeVar string
8084				err = json.Unmarshal(*v, &typeVar)
8085				if err != nil {
8086					return err
8087				}
8088				cniic.Type = &typeVar
8089			}
8090		case "etag":
8091			if v != nil {
8092				var etag string
8093				err = json.Unmarshal(*v, &etag)
8094				if err != nil {
8095					return err
8096				}
8097				cniic.Etag = &etag
8098			}
8099		}
8100	}
8101
8102	return nil
8103}
8104
8105// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface
8106// IP configuration.
8107type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
8108	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
8109	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8110}
8111
8112// ContainerNetworkInterfacePropertiesFormat properties of container network interface.
8113type ContainerNetworkInterfacePropertiesFormat struct {
8114	// ContainerNetworkInterfaceConfiguration - READ-ONLY; Container network interface configuration from which this container network interface is created.
8115	ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"`
8116	// Container - Reference to the container to which this container network interface is attached.
8117	Container *Container `json:"container,omitempty"`
8118	// IPConfigurations - READ-ONLY; Reference to the ip configuration on this container nic.
8119	IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
8120	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
8121	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8122}
8123
8124// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat.
8125func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
8126	objectMap := make(map[string]interface{})
8127	if cnipf.Container != nil {
8128		objectMap["container"] = cnipf.Container
8129	}
8130	return json.Marshal(objectMap)
8131}
8132
8133// CustomDNSConfigPropertiesFormat contains custom Dns resolution configuration from customer.
8134type CustomDNSConfigPropertiesFormat struct {
8135	// Fqdn - Fqdn that resolves to private endpoint ip address.
8136	Fqdn *string `json:"fqdn,omitempty"`
8137	// IPAddresses - A list of private ip addresses of the private endpoint.
8138	IPAddresses *[]string `json:"ipAddresses,omitempty"`
8139}
8140
8141// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8142// long-running operation.
8143type DdosCustomPoliciesCreateOrUpdateFuture struct {
8144	azure.FutureAPI
8145	// Result returns the result of the asynchronous operation.
8146	// If the operation has not completed it will return an error.
8147	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
8148}
8149
8150// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
8151// long-running operation.
8152type DdosCustomPoliciesDeleteFuture struct {
8153	azure.FutureAPI
8154	// Result returns the result of the asynchronous operation.
8155	// If the operation has not completed it will return an error.
8156	Result func(DdosCustomPoliciesClient) (autorest.Response, error)
8157}
8158
8159// DdosCustomPolicy a DDoS custom policy in a resource group.
8160type DdosCustomPolicy struct {
8161	autorest.Response `json:"-"`
8162	// DdosCustomPolicyPropertiesFormat - Properties of the DDoS custom policy.
8163	*DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"`
8164	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8165	Etag *string `json:"etag,omitempty"`
8166	// ID - Resource ID.
8167	ID *string `json:"id,omitempty"`
8168	// Name - READ-ONLY; Resource name.
8169	Name *string `json:"name,omitempty"`
8170	// Type - READ-ONLY; Resource type.
8171	Type *string `json:"type,omitempty"`
8172	// Location - Resource location.
8173	Location *string `json:"location,omitempty"`
8174	// Tags - Resource tags.
8175	Tags map[string]*string `json:"tags"`
8176}
8177
8178// MarshalJSON is the custom marshaler for DdosCustomPolicy.
8179func (dcp DdosCustomPolicy) MarshalJSON() ([]byte, error) {
8180	objectMap := make(map[string]interface{})
8181	if dcp.DdosCustomPolicyPropertiesFormat != nil {
8182		objectMap["properties"] = dcp.DdosCustomPolicyPropertiesFormat
8183	}
8184	if dcp.ID != nil {
8185		objectMap["id"] = dcp.ID
8186	}
8187	if dcp.Location != nil {
8188		objectMap["location"] = dcp.Location
8189	}
8190	if dcp.Tags != nil {
8191		objectMap["tags"] = dcp.Tags
8192	}
8193	return json.Marshal(objectMap)
8194}
8195
8196// UnmarshalJSON is the custom unmarshaler for DdosCustomPolicy struct.
8197func (dcp *DdosCustomPolicy) UnmarshalJSON(body []byte) error {
8198	var m map[string]*json.RawMessage
8199	err := json.Unmarshal(body, &m)
8200	if err != nil {
8201		return err
8202	}
8203	for k, v := range m {
8204		switch k {
8205		case "properties":
8206			if v != nil {
8207				var ddosCustomPolicyPropertiesFormat DdosCustomPolicyPropertiesFormat
8208				err = json.Unmarshal(*v, &ddosCustomPolicyPropertiesFormat)
8209				if err != nil {
8210					return err
8211				}
8212				dcp.DdosCustomPolicyPropertiesFormat = &ddosCustomPolicyPropertiesFormat
8213			}
8214		case "etag":
8215			if v != nil {
8216				var etag string
8217				err = json.Unmarshal(*v, &etag)
8218				if err != nil {
8219					return err
8220				}
8221				dcp.Etag = &etag
8222			}
8223		case "id":
8224			if v != nil {
8225				var ID string
8226				err = json.Unmarshal(*v, &ID)
8227				if err != nil {
8228					return err
8229				}
8230				dcp.ID = &ID
8231			}
8232		case "name":
8233			if v != nil {
8234				var name string
8235				err = json.Unmarshal(*v, &name)
8236				if err != nil {
8237					return err
8238				}
8239				dcp.Name = &name
8240			}
8241		case "type":
8242			if v != nil {
8243				var typeVar string
8244				err = json.Unmarshal(*v, &typeVar)
8245				if err != nil {
8246					return err
8247				}
8248				dcp.Type = &typeVar
8249			}
8250		case "location":
8251			if v != nil {
8252				var location string
8253				err = json.Unmarshal(*v, &location)
8254				if err != nil {
8255					return err
8256				}
8257				dcp.Location = &location
8258			}
8259		case "tags":
8260			if v != nil {
8261				var tags map[string]*string
8262				err = json.Unmarshal(*v, &tags)
8263				if err != nil {
8264					return err
8265				}
8266				dcp.Tags = tags
8267			}
8268		}
8269	}
8270
8271	return nil
8272}
8273
8274// DdosCustomPolicyPropertiesFormat dDoS custom policy properties.
8275type DdosCustomPolicyPropertiesFormat struct {
8276	// 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.
8277	ResourceGUID *string `json:"resourceGuid,omitempty"`
8278	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS custom policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
8279	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8280	// PublicIPAddresses - READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only.
8281	PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"`
8282	// ProtocolCustomSettings - The protocol-specific DDoS policy customization parameters.
8283	ProtocolCustomSettings *[]ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"`
8284}
8285
8286// MarshalJSON is the custom marshaler for DdosCustomPolicyPropertiesFormat.
8287func (dcppf DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
8288	objectMap := make(map[string]interface{})
8289	if dcppf.ProtocolCustomSettings != nil {
8290		objectMap["protocolCustomSettings"] = dcppf.ProtocolCustomSettings
8291	}
8292	return json.Marshal(objectMap)
8293}
8294
8295// DdosProtectionPlan a DDoS protection plan in a resource group.
8296type DdosProtectionPlan struct {
8297	autorest.Response `json:"-"`
8298	// ID - READ-ONLY; Resource ID.
8299	ID *string `json:"id,omitempty"`
8300	// Name - READ-ONLY; Resource name.
8301	Name *string `json:"name,omitempty"`
8302	// Type - READ-ONLY; Resource type.
8303	Type *string `json:"type,omitempty"`
8304	// Location - Resource location.
8305	Location *string `json:"location,omitempty"`
8306	// Tags - Resource tags.
8307	Tags map[string]*string `json:"tags"`
8308	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
8309	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
8310	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8311	Etag *string `json:"etag,omitempty"`
8312}
8313
8314// MarshalJSON is the custom marshaler for DdosProtectionPlan.
8315func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
8316	objectMap := make(map[string]interface{})
8317	if dpp.Location != nil {
8318		objectMap["location"] = dpp.Location
8319	}
8320	if dpp.Tags != nil {
8321		objectMap["tags"] = dpp.Tags
8322	}
8323	if dpp.DdosProtectionPlanPropertiesFormat != nil {
8324		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
8325	}
8326	return json.Marshal(objectMap)
8327}
8328
8329// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
8330func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
8331	var m map[string]*json.RawMessage
8332	err := json.Unmarshal(body, &m)
8333	if err != nil {
8334		return err
8335	}
8336	for k, v := range m {
8337		switch k {
8338		case "id":
8339			if v != nil {
8340				var ID string
8341				err = json.Unmarshal(*v, &ID)
8342				if err != nil {
8343					return err
8344				}
8345				dpp.ID = &ID
8346			}
8347		case "name":
8348			if v != nil {
8349				var name string
8350				err = json.Unmarshal(*v, &name)
8351				if err != nil {
8352					return err
8353				}
8354				dpp.Name = &name
8355			}
8356		case "type":
8357			if v != nil {
8358				var typeVar string
8359				err = json.Unmarshal(*v, &typeVar)
8360				if err != nil {
8361					return err
8362				}
8363				dpp.Type = &typeVar
8364			}
8365		case "location":
8366			if v != nil {
8367				var location string
8368				err = json.Unmarshal(*v, &location)
8369				if err != nil {
8370					return err
8371				}
8372				dpp.Location = &location
8373			}
8374		case "tags":
8375			if v != nil {
8376				var tags map[string]*string
8377				err = json.Unmarshal(*v, &tags)
8378				if err != nil {
8379					return err
8380				}
8381				dpp.Tags = tags
8382			}
8383		case "properties":
8384			if v != nil {
8385				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
8386				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
8387				if err != nil {
8388					return err
8389				}
8390				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
8391			}
8392		case "etag":
8393			if v != nil {
8394				var etag string
8395				err = json.Unmarshal(*v, &etag)
8396				if err != nil {
8397					return err
8398				}
8399				dpp.Etag = &etag
8400			}
8401		}
8402	}
8403
8404	return nil
8405}
8406
8407// DdosProtectionPlanListResult a list of DDoS protection plans.
8408type DdosProtectionPlanListResult struct {
8409	autorest.Response `json:"-"`
8410	// Value - A list of DDoS protection plans.
8411	Value *[]DdosProtectionPlan `json:"value,omitempty"`
8412	// NextLink - READ-ONLY; The URL to get the next set of results.
8413	NextLink *string `json:"nextLink,omitempty"`
8414}
8415
8416// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
8417func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
8418	objectMap := make(map[string]interface{})
8419	if dpplr.Value != nil {
8420		objectMap["value"] = dpplr.Value
8421	}
8422	return json.Marshal(objectMap)
8423}
8424
8425// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
8426type DdosProtectionPlanListResultIterator struct {
8427	i    int
8428	page DdosProtectionPlanListResultPage
8429}
8430
8431// NextWithContext advances to the next value.  If there was an error making
8432// the request the iterator does not advance and the error is returned.
8433func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
8434	if tracing.IsEnabled() {
8435		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
8436		defer func() {
8437			sc := -1
8438			if iter.Response().Response.Response != nil {
8439				sc = iter.Response().Response.Response.StatusCode
8440			}
8441			tracing.EndSpan(ctx, sc, err)
8442		}()
8443	}
8444	iter.i++
8445	if iter.i < len(iter.page.Values()) {
8446		return nil
8447	}
8448	err = iter.page.NextWithContext(ctx)
8449	if err != nil {
8450		iter.i--
8451		return err
8452	}
8453	iter.i = 0
8454	return nil
8455}
8456
8457// Next advances to the next value.  If there was an error making
8458// the request the iterator does not advance and the error is returned.
8459// Deprecated: Use NextWithContext() instead.
8460func (iter *DdosProtectionPlanListResultIterator) Next() error {
8461	return iter.NextWithContext(context.Background())
8462}
8463
8464// NotDone returns true if the enumeration should be started or is not yet complete.
8465func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
8466	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8467}
8468
8469// Response returns the raw server response from the last page request.
8470func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
8471	return iter.page.Response()
8472}
8473
8474// Value returns the current value or a zero-initialized value if the
8475// iterator has advanced beyond the end of the collection.
8476func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
8477	if !iter.page.NotDone() {
8478		return DdosProtectionPlan{}
8479	}
8480	return iter.page.Values()[iter.i]
8481}
8482
8483// Creates a new instance of the DdosProtectionPlanListResultIterator type.
8484func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
8485	return DdosProtectionPlanListResultIterator{page: page}
8486}
8487
8488// IsEmpty returns true if the ListResult contains no values.
8489func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
8490	return dpplr.Value == nil || len(*dpplr.Value) == 0
8491}
8492
8493// hasNextLink returns true if the NextLink is not empty.
8494func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
8495	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
8496}
8497
8498// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
8499// It returns nil if no more results exist.
8500func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
8501	if !dpplr.hasNextLink() {
8502		return nil, nil
8503	}
8504	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8505		autorest.AsJSON(),
8506		autorest.AsGet(),
8507		autorest.WithBaseURL(to.String(dpplr.NextLink)))
8508}
8509
8510// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
8511type DdosProtectionPlanListResultPage struct {
8512	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
8513	dpplr DdosProtectionPlanListResult
8514}
8515
8516// NextWithContext advances to the next page of values.  If there was an error making
8517// the request the page does not advance and the error is returned.
8518func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
8519	if tracing.IsEnabled() {
8520		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
8521		defer func() {
8522			sc := -1
8523			if page.Response().Response.Response != nil {
8524				sc = page.Response().Response.Response.StatusCode
8525			}
8526			tracing.EndSpan(ctx, sc, err)
8527		}()
8528	}
8529	for {
8530		next, err := page.fn(ctx, page.dpplr)
8531		if err != nil {
8532			return err
8533		}
8534		page.dpplr = next
8535		if !next.hasNextLink() || !next.IsEmpty() {
8536			break
8537		}
8538	}
8539	return nil
8540}
8541
8542// Next advances to the next page of values.  If there was an error making
8543// the request the page does not advance and the error is returned.
8544// Deprecated: Use NextWithContext() instead.
8545func (page *DdosProtectionPlanListResultPage) Next() error {
8546	return page.NextWithContext(context.Background())
8547}
8548
8549// NotDone returns true if the page enumeration should be started or is not yet complete.
8550func (page DdosProtectionPlanListResultPage) NotDone() bool {
8551	return !page.dpplr.IsEmpty()
8552}
8553
8554// Response returns the raw server response from the last page request.
8555func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
8556	return page.dpplr
8557}
8558
8559// Values returns the slice of values for the current page or nil if there are no values.
8560func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
8561	if page.dpplr.IsEmpty() {
8562		return nil
8563	}
8564	return *page.dpplr.Value
8565}
8566
8567// Creates a new instance of the DdosProtectionPlanListResultPage type.
8568func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
8569	return DdosProtectionPlanListResultPage{
8570		fn:    getNextPage,
8571		dpplr: cur,
8572	}
8573}
8574
8575// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
8576type DdosProtectionPlanPropertiesFormat struct {
8577	// 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.
8578	ResourceGUID *string `json:"resourceGuid,omitempty"`
8579	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
8580	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8581	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
8582	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
8583}
8584
8585// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8586// long-running operation.
8587type DdosProtectionPlansCreateOrUpdateFuture struct {
8588	azure.FutureAPI
8589	// Result returns the result of the asynchronous operation.
8590	// If the operation has not completed it will return an error.
8591	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
8592}
8593
8594// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
8595// long-running operation.
8596type DdosProtectionPlansDeleteFuture struct {
8597	azure.FutureAPI
8598	// Result returns the result of the asynchronous operation.
8599	// If the operation has not completed it will return an error.
8600	Result func(DdosProtectionPlansClient) (autorest.Response, error)
8601}
8602
8603// DdosSettings contains the DDoS protection settings of the public IP.
8604type DdosSettings struct {
8605	// DdosCustomPolicy - The DDoS custom policy associated with the public IP.
8606	DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"`
8607	// 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'
8608	ProtectionCoverage DdosSettingsProtectionCoverage `json:"protectionCoverage,omitempty"`
8609	// ProtectedIP - Enables DDoS protection on the public IP.
8610	ProtectedIP *bool `json:"protectedIP,omitempty"`
8611}
8612
8613// Delegation details the service to which the subnet is delegated.
8614type Delegation struct {
8615	// ServiceDelegationPropertiesFormat - Properties of the subnet.
8616	*ServiceDelegationPropertiesFormat `json:"properties,omitempty"`
8617	// Name - The name of the resource that is unique within a subnet. This name can be used to access the resource.
8618	Name *string `json:"name,omitempty"`
8619	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8620	Etag *string `json:"etag,omitempty"`
8621	// ID - Resource ID.
8622	ID *string `json:"id,omitempty"`
8623}
8624
8625// MarshalJSON is the custom marshaler for Delegation.
8626func (d Delegation) MarshalJSON() ([]byte, error) {
8627	objectMap := make(map[string]interface{})
8628	if d.ServiceDelegationPropertiesFormat != nil {
8629		objectMap["properties"] = d.ServiceDelegationPropertiesFormat
8630	}
8631	if d.Name != nil {
8632		objectMap["name"] = d.Name
8633	}
8634	if d.ID != nil {
8635		objectMap["id"] = d.ID
8636	}
8637	return json.Marshal(objectMap)
8638}
8639
8640// UnmarshalJSON is the custom unmarshaler for Delegation struct.
8641func (d *Delegation) UnmarshalJSON(body []byte) error {
8642	var m map[string]*json.RawMessage
8643	err := json.Unmarshal(body, &m)
8644	if err != nil {
8645		return err
8646	}
8647	for k, v := range m {
8648		switch k {
8649		case "properties":
8650			if v != nil {
8651				var serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat
8652				err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat)
8653				if err != nil {
8654					return err
8655				}
8656				d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat
8657			}
8658		case "name":
8659			if v != nil {
8660				var name string
8661				err = json.Unmarshal(*v, &name)
8662				if err != nil {
8663					return err
8664				}
8665				d.Name = &name
8666			}
8667		case "etag":
8668			if v != nil {
8669				var etag string
8670				err = json.Unmarshal(*v, &etag)
8671				if err != nil {
8672					return err
8673				}
8674				d.Etag = &etag
8675			}
8676		case "id":
8677			if v != nil {
8678				var ID string
8679				err = json.Unmarshal(*v, &ID)
8680				if err != nil {
8681					return err
8682				}
8683				d.ID = &ID
8684			}
8685		}
8686	}
8687
8688	return nil
8689}
8690
8691// DeleteBastionShareableLinkFuture an abstraction for monitoring and retrieving the results of a
8692// long-running operation.
8693type DeleteBastionShareableLinkFuture struct {
8694	azure.FutureAPI
8695	// Result returns the result of the asynchronous operation.
8696	// If the operation has not completed it will return an error.
8697	Result func(BaseClient) (autorest.Response, error)
8698}
8699
8700// DeviceProperties list of properties of the device.
8701type DeviceProperties struct {
8702	// DeviceVendor - Name of the device Vendor.
8703	DeviceVendor *string `json:"deviceVendor,omitempty"`
8704	// DeviceModel - Model of the device.
8705	DeviceModel *string `json:"deviceModel,omitempty"`
8706	// LinkSpeedInMbps - Link speed.
8707	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
8708}
8709
8710// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
8711// network. Standard DHCP option for a subnet overrides VNET DHCP options.
8712type DhcpOptions struct {
8713	// DNSServers - The list of DNS servers IP addresses.
8714	DNSServers *[]string `json:"dnsServers,omitempty"`
8715}
8716
8717// Dimension dimension of the metric.
8718type Dimension struct {
8719	// Name - The name of the dimension.
8720	Name *string `json:"name,omitempty"`
8721	// DisplayName - The display name of the dimension.
8722	DisplayName *string `json:"displayName,omitempty"`
8723	// InternalName - The internal name of the dimension.
8724	InternalName *string `json:"internalName,omitempty"`
8725}
8726
8727// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
8728type DNSNameAvailabilityResult struct {
8729	autorest.Response `json:"-"`
8730	// Available - Domain availability (True/False).
8731	Available *bool `json:"available,omitempty"`
8732}
8733
8734// EffectiveNetworkSecurityGroup effective network security group.
8735type EffectiveNetworkSecurityGroup struct {
8736	// NetworkSecurityGroup - The ID of network security group that is applied.
8737	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
8738	// Association - Associated resources.
8739	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
8740	// EffectiveSecurityRules - A collection of effective security rules.
8741	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
8742	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
8743	TagMap map[string][]string `json:"tagMap"`
8744}
8745
8746// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
8747func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
8748	objectMap := make(map[string]interface{})
8749	if ensg.NetworkSecurityGroup != nil {
8750		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
8751	}
8752	if ensg.Association != nil {
8753		objectMap["association"] = ensg.Association
8754	}
8755	if ensg.EffectiveSecurityRules != nil {
8756		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
8757	}
8758	if ensg.TagMap != nil {
8759		objectMap["tagMap"] = ensg.TagMap
8760	}
8761	return json.Marshal(objectMap)
8762}
8763
8764// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
8765type EffectiveNetworkSecurityGroupAssociation struct {
8766	// Subnet - The ID of the subnet if assigned.
8767	Subnet *SubResource `json:"subnet,omitempty"`
8768	// NetworkInterface - The ID of the network interface if assigned.
8769	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
8770}
8771
8772// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
8773// call.
8774type EffectiveNetworkSecurityGroupListResult struct {
8775	autorest.Response `json:"-"`
8776	// Value - A list of effective network security groups.
8777	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
8778	// NextLink - READ-ONLY; The URL to get the next set of results.
8779	NextLink *string `json:"nextLink,omitempty"`
8780}
8781
8782// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
8783func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
8784	objectMap := make(map[string]interface{})
8785	if ensglr.Value != nil {
8786		objectMap["value"] = ensglr.Value
8787	}
8788	return json.Marshal(objectMap)
8789}
8790
8791// EffectiveNetworkSecurityRule effective network security rules.
8792type EffectiveNetworkSecurityRule struct {
8793	// Name - The name of the security rule specified by the user (if created by the user).
8794	Name *string `json:"name,omitempty"`
8795	// Protocol - The network protocol this rule applies to. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
8796	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
8797	// SourcePortRange - The source port or range.
8798	SourcePortRange *string `json:"sourcePortRange,omitempty"`
8799	// DestinationPortRange - The destination port or range.
8800	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
8801	// 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 (*).
8802	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
8803	// 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 (*).
8804	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
8805	// SourceAddressPrefix - The source address prefix.
8806	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
8807	// DestinationAddressPrefix - The destination address prefix.
8808	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
8809	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
8810	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
8811	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
8812	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
8813	// ExpandedSourceAddressPrefix - The expanded source address prefix.
8814	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
8815	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
8816	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
8817	// Access - Whether network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
8818	Access SecurityRuleAccess `json:"access,omitempty"`
8819	// Priority - The priority of the rule.
8820	Priority *int32 `json:"priority,omitempty"`
8821	// Direction - The direction of the rule. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
8822	Direction SecurityRuleDirection `json:"direction,omitempty"`
8823}
8824
8825// EffectiveRoute effective Route.
8826type EffectiveRoute struct {
8827	// Name - The name of the user defined route. This is optional.
8828	Name *string `json:"name,omitempty"`
8829	// DisableBgpRoutePropagation - If true, on-premises routes are not propagated to the network interfaces in the subnet.
8830	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
8831	// Source - Who created the route. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
8832	Source EffectiveRouteSource `json:"source,omitempty"`
8833	// State - The value of effective route. Possible values include: 'Active', 'Invalid'
8834	State EffectiveRouteState `json:"state,omitempty"`
8835	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
8836	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
8837	// NextHopIPAddress - The IP address of the next hop of the effective route.
8838	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
8839	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
8840	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
8841}
8842
8843// EffectiveRouteListResult response for list effective route API service call.
8844type EffectiveRouteListResult struct {
8845	autorest.Response `json:"-"`
8846	// Value - A list of effective routes.
8847	Value *[]EffectiveRoute `json:"value,omitempty"`
8848	// NextLink - READ-ONLY; The URL to get the next set of results.
8849	NextLink *string `json:"nextLink,omitempty"`
8850}
8851
8852// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
8853func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
8854	objectMap := make(map[string]interface{})
8855	if erlr.Value != nil {
8856		objectMap["value"] = erlr.Value
8857	}
8858	return json.Marshal(objectMap)
8859}
8860
8861// EndpointServiceResult endpoint service.
8862type EndpointServiceResult struct {
8863	// Name - READ-ONLY; Name of the endpoint service.
8864	Name *string `json:"name,omitempty"`
8865	// Type - READ-ONLY; Type of the endpoint service.
8866	Type *string `json:"type,omitempty"`
8867	// ID - Resource ID.
8868	ID *string `json:"id,omitempty"`
8869}
8870
8871// MarshalJSON is the custom marshaler for EndpointServiceResult.
8872func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
8873	objectMap := make(map[string]interface{})
8874	if esr.ID != nil {
8875		objectMap["id"] = esr.ID
8876	}
8877	return json.Marshal(objectMap)
8878}
8879
8880// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
8881type EndpointServicesListResult struct {
8882	autorest.Response `json:"-"`
8883	// Value - List of available endpoint services in a region.
8884	Value *[]EndpointServiceResult `json:"value,omitempty"`
8885	// NextLink - The URL to get the next set of results.
8886	NextLink *string `json:"nextLink,omitempty"`
8887}
8888
8889// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
8890// values.
8891type EndpointServicesListResultIterator struct {
8892	i    int
8893	page EndpointServicesListResultPage
8894}
8895
8896// NextWithContext advances to the next value.  If there was an error making
8897// the request the iterator does not advance and the error is returned.
8898func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
8899	if tracing.IsEnabled() {
8900		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
8901		defer func() {
8902			sc := -1
8903			if iter.Response().Response.Response != nil {
8904				sc = iter.Response().Response.Response.StatusCode
8905			}
8906			tracing.EndSpan(ctx, sc, err)
8907		}()
8908	}
8909	iter.i++
8910	if iter.i < len(iter.page.Values()) {
8911		return nil
8912	}
8913	err = iter.page.NextWithContext(ctx)
8914	if err != nil {
8915		iter.i--
8916		return err
8917	}
8918	iter.i = 0
8919	return nil
8920}
8921
8922// Next advances to the next value.  If there was an error making
8923// the request the iterator does not advance and the error is returned.
8924// Deprecated: Use NextWithContext() instead.
8925func (iter *EndpointServicesListResultIterator) Next() error {
8926	return iter.NextWithContext(context.Background())
8927}
8928
8929// NotDone returns true if the enumeration should be started or is not yet complete.
8930func (iter EndpointServicesListResultIterator) NotDone() bool {
8931	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8932}
8933
8934// Response returns the raw server response from the last page request.
8935func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
8936	return iter.page.Response()
8937}
8938
8939// Value returns the current value or a zero-initialized value if the
8940// iterator has advanced beyond the end of the collection.
8941func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
8942	if !iter.page.NotDone() {
8943		return EndpointServiceResult{}
8944	}
8945	return iter.page.Values()[iter.i]
8946}
8947
8948// Creates a new instance of the EndpointServicesListResultIterator type.
8949func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
8950	return EndpointServicesListResultIterator{page: page}
8951}
8952
8953// IsEmpty returns true if the ListResult contains no values.
8954func (eslr EndpointServicesListResult) IsEmpty() bool {
8955	return eslr.Value == nil || len(*eslr.Value) == 0
8956}
8957
8958// hasNextLink returns true if the NextLink is not empty.
8959func (eslr EndpointServicesListResult) hasNextLink() bool {
8960	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
8961}
8962
8963// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
8964// It returns nil if no more results exist.
8965func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
8966	if !eslr.hasNextLink() {
8967		return nil, nil
8968	}
8969	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8970		autorest.AsJSON(),
8971		autorest.AsGet(),
8972		autorest.WithBaseURL(to.String(eslr.NextLink)))
8973}
8974
8975// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
8976type EndpointServicesListResultPage struct {
8977	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
8978	eslr EndpointServicesListResult
8979}
8980
8981// NextWithContext advances to the next page of values.  If there was an error making
8982// the request the page does not advance and the error is returned.
8983func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
8984	if tracing.IsEnabled() {
8985		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
8986		defer func() {
8987			sc := -1
8988			if page.Response().Response.Response != nil {
8989				sc = page.Response().Response.Response.StatusCode
8990			}
8991			tracing.EndSpan(ctx, sc, err)
8992		}()
8993	}
8994	for {
8995		next, err := page.fn(ctx, page.eslr)
8996		if err != nil {
8997			return err
8998		}
8999		page.eslr = next
9000		if !next.hasNextLink() || !next.IsEmpty() {
9001			break
9002		}
9003	}
9004	return nil
9005}
9006
9007// Next advances to the next page of values.  If there was an error making
9008// the request the page does not advance and the error is returned.
9009// Deprecated: Use NextWithContext() instead.
9010func (page *EndpointServicesListResultPage) Next() error {
9011	return page.NextWithContext(context.Background())
9012}
9013
9014// NotDone returns true if the page enumeration should be started or is not yet complete.
9015func (page EndpointServicesListResultPage) NotDone() bool {
9016	return !page.eslr.IsEmpty()
9017}
9018
9019// Response returns the raw server response from the last page request.
9020func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
9021	return page.eslr
9022}
9023
9024// Values returns the slice of values for the current page or nil if there are no values.
9025func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
9026	if page.eslr.IsEmpty() {
9027		return nil
9028	}
9029	return *page.eslr.Value
9030}
9031
9032// Creates a new instance of the EndpointServicesListResultPage type.
9033func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
9034	return EndpointServicesListResultPage{
9035		fn:   getNextPage,
9036		eslr: cur,
9037	}
9038}
9039
9040// Error common error representation.
9041type Error struct {
9042	// Code - Error code.
9043	Code *string `json:"code,omitempty"`
9044	// Message - Error message.
9045	Message *string `json:"message,omitempty"`
9046	// Target - Error target.
9047	Target *string `json:"target,omitempty"`
9048	// Details - Error details.
9049	Details *[]ErrorDetails `json:"details,omitempty"`
9050	// InnerError - Inner error message.
9051	InnerError *string `json:"innerError,omitempty"`
9052}
9053
9054// ErrorDetails common error details representation.
9055type ErrorDetails struct {
9056	// Code - Error code.
9057	Code *string `json:"code,omitempty"`
9058	// Target - Error target.
9059	Target *string `json:"target,omitempty"`
9060	// Message - Error message.
9061	Message *string `json:"message,omitempty"`
9062}
9063
9064// ErrorResponse the error object.
9065type ErrorResponse struct {
9066	// Error - The error details object.
9067	Error *ErrorDetails `json:"error,omitempty"`
9068}
9069
9070// EvaluatedNetworkSecurityGroup results of network security group evaluation.
9071type EvaluatedNetworkSecurityGroup struct {
9072	// NetworkSecurityGroupID - Network security group ID.
9073	NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
9074	// AppliedTo - Resource ID of nic or subnet to which network security group is applied.
9075	AppliedTo *string `json:"appliedTo,omitempty"`
9076	// MatchedRule - Matched network security rule.
9077	MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
9078	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
9079	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
9080}
9081
9082// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
9083func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
9084	objectMap := make(map[string]interface{})
9085	if ensg.NetworkSecurityGroupID != nil {
9086		objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
9087	}
9088	if ensg.AppliedTo != nil {
9089		objectMap["appliedTo"] = ensg.AppliedTo
9090	}
9091	if ensg.MatchedRule != nil {
9092		objectMap["matchedRule"] = ensg.MatchedRule
9093	}
9094	return json.Marshal(objectMap)
9095}
9096
9097// ExpressRouteCircuit expressRouteCircuit resource.
9098type ExpressRouteCircuit struct {
9099	autorest.Response `json:"-"`
9100	// Sku - The SKU.
9101	Sku *ExpressRouteCircuitSku `json:"sku,omitempty"`
9102	// ExpressRouteCircuitPropertiesFormat - Properties of the express route circuit.
9103	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
9104	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9105	Etag *string `json:"etag,omitempty"`
9106	// ID - Resource ID.
9107	ID *string `json:"id,omitempty"`
9108	// Name - READ-ONLY; Resource name.
9109	Name *string `json:"name,omitempty"`
9110	// Type - READ-ONLY; Resource type.
9111	Type *string `json:"type,omitempty"`
9112	// Location - Resource location.
9113	Location *string `json:"location,omitempty"`
9114	// Tags - Resource tags.
9115	Tags map[string]*string `json:"tags"`
9116}
9117
9118// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
9119func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
9120	objectMap := make(map[string]interface{})
9121	if erc.Sku != nil {
9122		objectMap["sku"] = erc.Sku
9123	}
9124	if erc.ExpressRouteCircuitPropertiesFormat != nil {
9125		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
9126	}
9127	if erc.ID != nil {
9128		objectMap["id"] = erc.ID
9129	}
9130	if erc.Location != nil {
9131		objectMap["location"] = erc.Location
9132	}
9133	if erc.Tags != nil {
9134		objectMap["tags"] = erc.Tags
9135	}
9136	return json.Marshal(objectMap)
9137}
9138
9139// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
9140func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
9141	var m map[string]*json.RawMessage
9142	err := json.Unmarshal(body, &m)
9143	if err != nil {
9144		return err
9145	}
9146	for k, v := range m {
9147		switch k {
9148		case "sku":
9149			if v != nil {
9150				var sku ExpressRouteCircuitSku
9151				err = json.Unmarshal(*v, &sku)
9152				if err != nil {
9153					return err
9154				}
9155				erc.Sku = &sku
9156			}
9157		case "properties":
9158			if v != nil {
9159				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
9160				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
9161				if err != nil {
9162					return err
9163				}
9164				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
9165			}
9166		case "etag":
9167			if v != nil {
9168				var etag string
9169				err = json.Unmarshal(*v, &etag)
9170				if err != nil {
9171					return err
9172				}
9173				erc.Etag = &etag
9174			}
9175		case "id":
9176			if v != nil {
9177				var ID string
9178				err = json.Unmarshal(*v, &ID)
9179				if err != nil {
9180					return err
9181				}
9182				erc.ID = &ID
9183			}
9184		case "name":
9185			if v != nil {
9186				var name string
9187				err = json.Unmarshal(*v, &name)
9188				if err != nil {
9189					return err
9190				}
9191				erc.Name = &name
9192			}
9193		case "type":
9194			if v != nil {
9195				var typeVar string
9196				err = json.Unmarshal(*v, &typeVar)
9197				if err != nil {
9198					return err
9199				}
9200				erc.Type = &typeVar
9201			}
9202		case "location":
9203			if v != nil {
9204				var location string
9205				err = json.Unmarshal(*v, &location)
9206				if err != nil {
9207					return err
9208				}
9209				erc.Location = &location
9210			}
9211		case "tags":
9212			if v != nil {
9213				var tags map[string]*string
9214				err = json.Unmarshal(*v, &tags)
9215				if err != nil {
9216					return err
9217				}
9218				erc.Tags = tags
9219			}
9220		}
9221	}
9222
9223	return nil
9224}
9225
9226// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
9227type ExpressRouteCircuitArpTable struct {
9228	// Age - Entry age in minutes.
9229	Age *int32 `json:"age,omitempty"`
9230	// Interface - Interface address.
9231	Interface *string `json:"interface,omitempty"`
9232	// IPAddress - The IP address.
9233	IPAddress *string `json:"ipAddress,omitempty"`
9234	// MacAddress - The MAC address.
9235	MacAddress *string `json:"macAddress,omitempty"`
9236}
9237
9238// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
9239type ExpressRouteCircuitAuthorization struct {
9240	autorest.Response `json:"-"`
9241	// AuthorizationPropertiesFormat - Properties of the express route circuit authorization.
9242	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
9243	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
9244	Name *string `json:"name,omitempty"`
9245	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9246	Etag *string `json:"etag,omitempty"`
9247	// Type - READ-ONLY; Type of the resource.
9248	Type *string `json:"type,omitempty"`
9249	// ID - Resource ID.
9250	ID *string `json:"id,omitempty"`
9251}
9252
9253// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
9254func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
9255	objectMap := make(map[string]interface{})
9256	if erca.AuthorizationPropertiesFormat != nil {
9257		objectMap["properties"] = erca.AuthorizationPropertiesFormat
9258	}
9259	if erca.Name != nil {
9260		objectMap["name"] = erca.Name
9261	}
9262	if erca.ID != nil {
9263		objectMap["id"] = erca.ID
9264	}
9265	return json.Marshal(objectMap)
9266}
9267
9268// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
9269func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
9270	var m map[string]*json.RawMessage
9271	err := json.Unmarshal(body, &m)
9272	if err != nil {
9273		return err
9274	}
9275	for k, v := range m {
9276		switch k {
9277		case "properties":
9278			if v != nil {
9279				var authorizationPropertiesFormat AuthorizationPropertiesFormat
9280				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
9281				if err != nil {
9282					return err
9283				}
9284				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
9285			}
9286		case "name":
9287			if v != nil {
9288				var name string
9289				err = json.Unmarshal(*v, &name)
9290				if err != nil {
9291					return err
9292				}
9293				erca.Name = &name
9294			}
9295		case "etag":
9296			if v != nil {
9297				var etag string
9298				err = json.Unmarshal(*v, &etag)
9299				if err != nil {
9300					return err
9301				}
9302				erca.Etag = &etag
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				erca.Type = &typeVar
9312			}
9313		case "id":
9314			if v != nil {
9315				var ID string
9316				err = json.Unmarshal(*v, &ID)
9317				if err != nil {
9318					return err
9319				}
9320				erca.ID = &ID
9321			}
9322		}
9323	}
9324
9325	return nil
9326}
9327
9328// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
9329// results of a long-running operation.
9330type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
9331	azure.FutureAPI
9332	// Result returns the result of the asynchronous operation.
9333	// If the operation has not completed it will return an error.
9334	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
9335}
9336
9337// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
9338// of a long-running operation.
9339type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
9340	azure.FutureAPI
9341	// Result returns the result of the asynchronous operation.
9342	// If the operation has not completed it will return an error.
9343	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
9344}
9345
9346// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
9347// resource.
9348type ExpressRouteCircuitConnection struct {
9349	autorest.Response `json:"-"`
9350	// ExpressRouteCircuitConnectionPropertiesFormat - Properties of the express route circuit connection.
9351	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
9352	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
9353	Name *string `json:"name,omitempty"`
9354	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9355	Etag *string `json:"etag,omitempty"`
9356	// Type - READ-ONLY; Type of the resource.
9357	Type *string `json:"type,omitempty"`
9358	// ID - Resource ID.
9359	ID *string `json:"id,omitempty"`
9360}
9361
9362// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
9363func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
9364	objectMap := make(map[string]interface{})
9365	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
9366		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
9367	}
9368	if ercc.Name != nil {
9369		objectMap["name"] = ercc.Name
9370	}
9371	if ercc.ID != nil {
9372		objectMap["id"] = ercc.ID
9373	}
9374	return json.Marshal(objectMap)
9375}
9376
9377// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
9378func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
9379	var m map[string]*json.RawMessage
9380	err := json.Unmarshal(body, &m)
9381	if err != nil {
9382		return err
9383	}
9384	for k, v := range m {
9385		switch k {
9386		case "properties":
9387			if v != nil {
9388				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
9389				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
9390				if err != nil {
9391					return err
9392				}
9393				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
9394			}
9395		case "name":
9396			if v != nil {
9397				var name string
9398				err = json.Unmarshal(*v, &name)
9399				if err != nil {
9400					return err
9401				}
9402				ercc.Name = &name
9403			}
9404		case "etag":
9405			if v != nil {
9406				var etag string
9407				err = json.Unmarshal(*v, &etag)
9408				if err != nil {
9409					return err
9410				}
9411				ercc.Etag = &etag
9412			}
9413		case "type":
9414			if v != nil {
9415				var typeVar string
9416				err = json.Unmarshal(*v, &typeVar)
9417				if err != nil {
9418					return err
9419				}
9420				ercc.Type = &typeVar
9421			}
9422		case "id":
9423			if v != nil {
9424				var ID string
9425				err = json.Unmarshal(*v, &ID)
9426				if err != nil {
9427					return err
9428				}
9429				ercc.ID = &ID
9430			}
9431		}
9432	}
9433
9434	return nil
9435}
9436
9437// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all
9438// global reach connections that belongs to a Private Peering for an ExpressRouteCircuit.
9439type ExpressRouteCircuitConnectionListResult struct {
9440	autorest.Response `json:"-"`
9441	// Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit.
9442	Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"`
9443	// NextLink - The URL to get the next set of results.
9444	NextLink *string `json:"nextLink,omitempty"`
9445}
9446
9447// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
9448// ExpressRouteCircuitConnection values.
9449type ExpressRouteCircuitConnectionListResultIterator struct {
9450	i    int
9451	page ExpressRouteCircuitConnectionListResultPage
9452}
9453
9454// NextWithContext advances to the next value.  If there was an error making
9455// the request the iterator does not advance and the error is returned.
9456func (iter *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
9457	if tracing.IsEnabled() {
9458		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.NextWithContext")
9459		defer func() {
9460			sc := -1
9461			if iter.Response().Response.Response != nil {
9462				sc = iter.Response().Response.Response.StatusCode
9463			}
9464			tracing.EndSpan(ctx, sc, err)
9465		}()
9466	}
9467	iter.i++
9468	if iter.i < len(iter.page.Values()) {
9469		return nil
9470	}
9471	err = iter.page.NextWithContext(ctx)
9472	if err != nil {
9473		iter.i--
9474		return err
9475	}
9476	iter.i = 0
9477	return nil
9478}
9479
9480// Next advances to the next value.  If there was an error making
9481// the request the iterator does not advance and the error is returned.
9482// Deprecated: Use NextWithContext() instead.
9483func (iter *ExpressRouteCircuitConnectionListResultIterator) Next() error {
9484	return iter.NextWithContext(context.Background())
9485}
9486
9487// NotDone returns true if the enumeration should be started or is not yet complete.
9488func (iter ExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
9489	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9490}
9491
9492// Response returns the raw server response from the last page request.
9493func (iter ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult {
9494	return iter.page.Response()
9495}
9496
9497// Value returns the current value or a zero-initialized value if the
9498// iterator has advanced beyond the end of the collection.
9499func (iter ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection {
9500	if !iter.page.NotDone() {
9501		return ExpressRouteCircuitConnection{}
9502	}
9503	return iter.page.Values()[iter.i]
9504}
9505
9506// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type.
9507func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator {
9508	return ExpressRouteCircuitConnectionListResultIterator{page: page}
9509}
9510
9511// IsEmpty returns true if the ListResult contains no values.
9512func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool {
9513	return ercclr.Value == nil || len(*ercclr.Value) == 0
9514}
9515
9516// hasNextLink returns true if the NextLink is not empty.
9517func (ercclr ExpressRouteCircuitConnectionListResult) hasNextLink() bool {
9518	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
9519}
9520
9521// expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
9522// It returns nil if no more results exist.
9523func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
9524	if !ercclr.hasNextLink() {
9525		return nil, nil
9526	}
9527	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9528		autorest.AsJSON(),
9529		autorest.AsGet(),
9530		autorest.WithBaseURL(to.String(ercclr.NextLink)))
9531}
9532
9533// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values.
9534type ExpressRouteCircuitConnectionListResultPage struct {
9535	fn     func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)
9536	ercclr ExpressRouteCircuitConnectionListResult
9537}
9538
9539// NextWithContext advances to the next page of values.  If there was an error making
9540// the request the page does not advance and the error is returned.
9541func (page *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
9542	if tracing.IsEnabled() {
9543		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.NextWithContext")
9544		defer func() {
9545			sc := -1
9546			if page.Response().Response.Response != nil {
9547				sc = page.Response().Response.Response.StatusCode
9548			}
9549			tracing.EndSpan(ctx, sc, err)
9550		}()
9551	}
9552	for {
9553		next, err := page.fn(ctx, page.ercclr)
9554		if err != nil {
9555			return err
9556		}
9557		page.ercclr = next
9558		if !next.hasNextLink() || !next.IsEmpty() {
9559			break
9560		}
9561	}
9562	return nil
9563}
9564
9565// Next advances to the next page of values.  If there was an error making
9566// the request the page does not advance and the error is returned.
9567// Deprecated: Use NextWithContext() instead.
9568func (page *ExpressRouteCircuitConnectionListResultPage) Next() error {
9569	return page.NextWithContext(context.Background())
9570}
9571
9572// NotDone returns true if the page enumeration should be started or is not yet complete.
9573func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool {
9574	return !page.ercclr.IsEmpty()
9575}
9576
9577// Response returns the raw server response from the last page request.
9578func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult {
9579	return page.ercclr
9580}
9581
9582// Values returns the slice of values for the current page or nil if there are no values.
9583func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection {
9584	if page.ercclr.IsEmpty() {
9585		return nil
9586	}
9587	return *page.ercclr.Value
9588}
9589
9590// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type.
9591func NewExpressRouteCircuitConnectionListResultPage(cur ExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage {
9592	return ExpressRouteCircuitConnectionListResultPage{
9593		fn:     getNextPage,
9594		ercclr: cur,
9595	}
9596}
9597
9598// ExpressRouteCircuitConnectionPropertiesFormat properties of the express route circuit connection.
9599type ExpressRouteCircuitConnectionPropertiesFormat struct {
9600	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
9601	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
9602	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
9603	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
9604	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
9605	AddressPrefix *string `json:"addressPrefix,omitempty"`
9606	// AuthorizationKey - The authorization key.
9607	AuthorizationKey *string `json:"authorizationKey,omitempty"`
9608	// Ipv6CircuitConnectionConfig - IPv6 Address PrefixProperties of the express route circuit connection.
9609	Ipv6CircuitConnectionConfig *Ipv6CircuitConnectionConfig `json:"ipv6CircuitConnectionConfig,omitempty"`
9610	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
9611	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
9612	// ProvisioningState - READ-ONLY; The provisioning state of the express route circuit connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9613	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9614}
9615
9616// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
9617func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
9618	objectMap := make(map[string]interface{})
9619	if erccpf.ExpressRouteCircuitPeering != nil {
9620		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
9621	}
9622	if erccpf.PeerExpressRouteCircuitPeering != nil {
9623		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
9624	}
9625	if erccpf.AddressPrefix != nil {
9626		objectMap["addressPrefix"] = erccpf.AddressPrefix
9627	}
9628	if erccpf.AuthorizationKey != nil {
9629		objectMap["authorizationKey"] = erccpf.AuthorizationKey
9630	}
9631	if erccpf.Ipv6CircuitConnectionConfig != nil {
9632		objectMap["ipv6CircuitConnectionConfig"] = erccpf.Ipv6CircuitConnectionConfig
9633	}
9634	if erccpf.CircuitConnectionStatus != "" {
9635		objectMap["circuitConnectionStatus"] = erccpf.CircuitConnectionStatus
9636	}
9637	return json.Marshal(objectMap)
9638}
9639
9640// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
9641// results of a long-running operation.
9642type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
9643	azure.FutureAPI
9644	// Result returns the result of the asynchronous operation.
9645	// If the operation has not completed it will return an error.
9646	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
9647}
9648
9649// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
9650// long-running operation.
9651type ExpressRouteCircuitConnectionsDeleteFuture struct {
9652	azure.FutureAPI
9653	// Result returns the result of the asynchronous operation.
9654	// If the operation has not completed it will return an error.
9655	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
9656}
9657
9658// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
9659type ExpressRouteCircuitListResult struct {
9660	autorest.Response `json:"-"`
9661	// Value - A list of ExpressRouteCircuits in a resource group.
9662	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
9663	// NextLink - The URL to get the next set of results.
9664	NextLink *string `json:"nextLink,omitempty"`
9665}
9666
9667// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
9668// values.
9669type ExpressRouteCircuitListResultIterator struct {
9670	i    int
9671	page ExpressRouteCircuitListResultPage
9672}
9673
9674// NextWithContext advances to the next value.  If there was an error making
9675// the request the iterator does not advance and the error is returned.
9676func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
9677	if tracing.IsEnabled() {
9678		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
9679		defer func() {
9680			sc := -1
9681			if iter.Response().Response.Response != nil {
9682				sc = iter.Response().Response.Response.StatusCode
9683			}
9684			tracing.EndSpan(ctx, sc, err)
9685		}()
9686	}
9687	iter.i++
9688	if iter.i < len(iter.page.Values()) {
9689		return nil
9690	}
9691	err = iter.page.NextWithContext(ctx)
9692	if err != nil {
9693		iter.i--
9694		return err
9695	}
9696	iter.i = 0
9697	return nil
9698}
9699
9700// Next advances to the next value.  If there was an error making
9701// the request the iterator does not advance and the error is returned.
9702// Deprecated: Use NextWithContext() instead.
9703func (iter *ExpressRouteCircuitListResultIterator) Next() error {
9704	return iter.NextWithContext(context.Background())
9705}
9706
9707// NotDone returns true if the enumeration should be started or is not yet complete.
9708func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
9709	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9710}
9711
9712// Response returns the raw server response from the last page request.
9713func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
9714	return iter.page.Response()
9715}
9716
9717// Value returns the current value or a zero-initialized value if the
9718// iterator has advanced beyond the end of the collection.
9719func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
9720	if !iter.page.NotDone() {
9721		return ExpressRouteCircuit{}
9722	}
9723	return iter.page.Values()[iter.i]
9724}
9725
9726// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
9727func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
9728	return ExpressRouteCircuitListResultIterator{page: page}
9729}
9730
9731// IsEmpty returns true if the ListResult contains no values.
9732func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
9733	return erclr.Value == nil || len(*erclr.Value) == 0
9734}
9735
9736// hasNextLink returns true if the NextLink is not empty.
9737func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
9738	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
9739}
9740
9741// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
9742// It returns nil if no more results exist.
9743func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
9744	if !erclr.hasNextLink() {
9745		return nil, nil
9746	}
9747	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9748		autorest.AsJSON(),
9749		autorest.AsGet(),
9750		autorest.WithBaseURL(to.String(erclr.NextLink)))
9751}
9752
9753// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
9754type ExpressRouteCircuitListResultPage struct {
9755	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
9756	erclr ExpressRouteCircuitListResult
9757}
9758
9759// NextWithContext advances to the next page of values.  If there was an error making
9760// the request the page does not advance and the error is returned.
9761func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
9762	if tracing.IsEnabled() {
9763		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
9764		defer func() {
9765			sc := -1
9766			if page.Response().Response.Response != nil {
9767				sc = page.Response().Response.Response.StatusCode
9768			}
9769			tracing.EndSpan(ctx, sc, err)
9770		}()
9771	}
9772	for {
9773		next, err := page.fn(ctx, page.erclr)
9774		if err != nil {
9775			return err
9776		}
9777		page.erclr = next
9778		if !next.hasNextLink() || !next.IsEmpty() {
9779			break
9780		}
9781	}
9782	return nil
9783}
9784
9785// Next advances to the next page of values.  If there was an error making
9786// the request the page does not advance and the error is returned.
9787// Deprecated: Use NextWithContext() instead.
9788func (page *ExpressRouteCircuitListResultPage) Next() error {
9789	return page.NextWithContext(context.Background())
9790}
9791
9792// NotDone returns true if the page enumeration should be started or is not yet complete.
9793func (page ExpressRouteCircuitListResultPage) NotDone() bool {
9794	return !page.erclr.IsEmpty()
9795}
9796
9797// Response returns the raw server response from the last page request.
9798func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
9799	return page.erclr
9800}
9801
9802// Values returns the slice of values for the current page or nil if there are no values.
9803func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
9804	if page.erclr.IsEmpty() {
9805		return nil
9806	}
9807	return *page.erclr.Value
9808}
9809
9810// Creates a new instance of the ExpressRouteCircuitListResultPage type.
9811func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
9812	return ExpressRouteCircuitListResultPage{
9813		fn:    getNextPage,
9814		erclr: cur,
9815	}
9816}
9817
9818// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
9819type ExpressRouteCircuitPeering struct {
9820	autorest.Response `json:"-"`
9821	// ExpressRouteCircuitPeeringPropertiesFormat - Properties of the express route circuit peering.
9822	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
9823	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
9824	Name *string `json:"name,omitempty"`
9825	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9826	Etag *string `json:"etag,omitempty"`
9827	// Type - READ-ONLY; Type of the resource.
9828	Type *string `json:"type,omitempty"`
9829	// ID - Resource ID.
9830	ID *string `json:"id,omitempty"`
9831}
9832
9833// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
9834func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
9835	objectMap := make(map[string]interface{})
9836	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
9837		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
9838	}
9839	if ercp.Name != nil {
9840		objectMap["name"] = ercp.Name
9841	}
9842	if ercp.ID != nil {
9843		objectMap["id"] = ercp.ID
9844	}
9845	return json.Marshal(objectMap)
9846}
9847
9848// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
9849func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
9850	var m map[string]*json.RawMessage
9851	err := json.Unmarshal(body, &m)
9852	if err != nil {
9853		return err
9854	}
9855	for k, v := range m {
9856		switch k {
9857		case "properties":
9858			if v != nil {
9859				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
9860				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
9861				if err != nil {
9862					return err
9863				}
9864				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
9865			}
9866		case "name":
9867			if v != nil {
9868				var name string
9869				err = json.Unmarshal(*v, &name)
9870				if err != nil {
9871					return err
9872				}
9873				ercp.Name = &name
9874			}
9875		case "etag":
9876			if v != nil {
9877				var etag string
9878				err = json.Unmarshal(*v, &etag)
9879				if err != nil {
9880					return err
9881				}
9882				ercp.Etag = &etag
9883			}
9884		case "type":
9885			if v != nil {
9886				var typeVar string
9887				err = json.Unmarshal(*v, &typeVar)
9888				if err != nil {
9889					return err
9890				}
9891				ercp.Type = &typeVar
9892			}
9893		case "id":
9894			if v != nil {
9895				var ID string
9896				err = json.Unmarshal(*v, &ID)
9897				if err != nil {
9898					return err
9899				}
9900				ercp.ID = &ID
9901			}
9902		}
9903	}
9904
9905	return nil
9906}
9907
9908// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
9909type ExpressRouteCircuitPeeringConfig struct {
9910	// AdvertisedPublicPrefixes - The reference to AdvertisedPublicPrefixes.
9911	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
9912	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering.
9913	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
9914	// AdvertisedPublicPrefixesState - READ-ONLY; The advertised public prefix state of the Peering resource. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
9915	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
9916	// LegacyMode - The legacy mode of the peering.
9917	LegacyMode *int32 `json:"legacyMode,omitempty"`
9918	// CustomerASN - The CustomerASN of the peering.
9919	CustomerASN *int32 `json:"customerASN,omitempty"`
9920	// RoutingRegistryName - The RoutingRegistryName of the configuration.
9921	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
9922}
9923
9924// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringConfig.
9925func (ercpc ExpressRouteCircuitPeeringConfig) MarshalJSON() ([]byte, error) {
9926	objectMap := make(map[string]interface{})
9927	if ercpc.AdvertisedPublicPrefixes != nil {
9928		objectMap["advertisedPublicPrefixes"] = ercpc.AdvertisedPublicPrefixes
9929	}
9930	if ercpc.AdvertisedCommunities != nil {
9931		objectMap["advertisedCommunities"] = ercpc.AdvertisedCommunities
9932	}
9933	if ercpc.LegacyMode != nil {
9934		objectMap["legacyMode"] = ercpc.LegacyMode
9935	}
9936	if ercpc.CustomerASN != nil {
9937		objectMap["customerASN"] = ercpc.CustomerASN
9938	}
9939	if ercpc.RoutingRegistryName != nil {
9940		objectMap["routingRegistryName"] = ercpc.RoutingRegistryName
9941	}
9942	return json.Marshal(objectMap)
9943}
9944
9945// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier.
9946type ExpressRouteCircuitPeeringID struct {
9947	// ID - The ID of the ExpressRoute circuit peering.
9948	ID *string `json:"id,omitempty"`
9949}
9950
9951// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
9952// that belong to an ExpressRouteCircuit.
9953type ExpressRouteCircuitPeeringListResult struct {
9954	autorest.Response `json:"-"`
9955	// Value - The peerings in an express route circuit.
9956	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
9957	// NextLink - The URL to get the next set of results.
9958	NextLink *string `json:"nextLink,omitempty"`
9959}
9960
9961// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
9962// ExpressRouteCircuitPeering values.
9963type ExpressRouteCircuitPeeringListResultIterator struct {
9964	i    int
9965	page ExpressRouteCircuitPeeringListResultPage
9966}
9967
9968// NextWithContext advances to the next value.  If there was an error making
9969// the request the iterator does not advance and the error is returned.
9970func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
9971	if tracing.IsEnabled() {
9972		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
9973		defer func() {
9974			sc := -1
9975			if iter.Response().Response.Response != nil {
9976				sc = iter.Response().Response.Response.StatusCode
9977			}
9978			tracing.EndSpan(ctx, sc, err)
9979		}()
9980	}
9981	iter.i++
9982	if iter.i < len(iter.page.Values()) {
9983		return nil
9984	}
9985	err = iter.page.NextWithContext(ctx)
9986	if err != nil {
9987		iter.i--
9988		return err
9989	}
9990	iter.i = 0
9991	return nil
9992}
9993
9994// Next advances to the next value.  If there was an error making
9995// the request the iterator does not advance and the error is returned.
9996// Deprecated: Use NextWithContext() instead.
9997func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
9998	return iter.NextWithContext(context.Background())
9999}
10000
10001// NotDone returns true if the enumeration should be started or is not yet complete.
10002func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
10003	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10004}
10005
10006// Response returns the raw server response from the last page request.
10007func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
10008	return iter.page.Response()
10009}
10010
10011// Value returns the current value or a zero-initialized value if the
10012// iterator has advanced beyond the end of the collection.
10013func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
10014	if !iter.page.NotDone() {
10015		return ExpressRouteCircuitPeering{}
10016	}
10017	return iter.page.Values()[iter.i]
10018}
10019
10020// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
10021func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
10022	return ExpressRouteCircuitPeeringListResultIterator{page: page}
10023}
10024
10025// IsEmpty returns true if the ListResult contains no values.
10026func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
10027	return ercplr.Value == nil || len(*ercplr.Value) == 0
10028}
10029
10030// hasNextLink returns true if the NextLink is not empty.
10031func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
10032	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
10033}
10034
10035// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
10036// It returns nil if no more results exist.
10037func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
10038	if !ercplr.hasNextLink() {
10039		return nil, nil
10040	}
10041	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10042		autorest.AsJSON(),
10043		autorest.AsGet(),
10044		autorest.WithBaseURL(to.String(ercplr.NextLink)))
10045}
10046
10047// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
10048type ExpressRouteCircuitPeeringListResultPage struct {
10049	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
10050	ercplr ExpressRouteCircuitPeeringListResult
10051}
10052
10053// NextWithContext advances to the next page of values.  If there was an error making
10054// the request the page does not advance and the error is returned.
10055func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
10056	if tracing.IsEnabled() {
10057		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
10058		defer func() {
10059			sc := -1
10060			if page.Response().Response.Response != nil {
10061				sc = page.Response().Response.Response.StatusCode
10062			}
10063			tracing.EndSpan(ctx, sc, err)
10064		}()
10065	}
10066	for {
10067		next, err := page.fn(ctx, page.ercplr)
10068		if err != nil {
10069			return err
10070		}
10071		page.ercplr = next
10072		if !next.hasNextLink() || !next.IsEmpty() {
10073			break
10074		}
10075	}
10076	return nil
10077}
10078
10079// Next advances to the next page of values.  If there was an error making
10080// the request the page does not advance and the error is returned.
10081// Deprecated: Use NextWithContext() instead.
10082func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
10083	return page.NextWithContext(context.Background())
10084}
10085
10086// NotDone returns true if the page enumeration should be started or is not yet complete.
10087func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
10088	return !page.ercplr.IsEmpty()
10089}
10090
10091// Response returns the raw server response from the last page request.
10092func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
10093	return page.ercplr
10094}
10095
10096// Values returns the slice of values for the current page or nil if there are no values.
10097func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
10098	if page.ercplr.IsEmpty() {
10099		return nil
10100	}
10101	return *page.ercplr.Value
10102}
10103
10104// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
10105func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
10106	return ExpressRouteCircuitPeeringListResultPage{
10107		fn:     getNextPage,
10108		ercplr: cur,
10109	}
10110}
10111
10112// ExpressRouteCircuitPeeringPropertiesFormat properties of the express route circuit peering.
10113type ExpressRouteCircuitPeeringPropertiesFormat struct {
10114	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
10115	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
10116	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
10117	State ExpressRoutePeeringState `json:"state,omitempty"`
10118	// AzureASN - The Azure ASN.
10119	AzureASN *int32 `json:"azureASN,omitempty"`
10120	// PeerASN - The peer ASN.
10121	PeerASN *int64 `json:"peerASN,omitempty"`
10122	// PrimaryPeerAddressPrefix - The primary address prefix.
10123	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
10124	// SecondaryPeerAddressPrefix - The secondary address prefix.
10125	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
10126	// PrimaryAzurePort - The primary port.
10127	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
10128	// SecondaryAzurePort - The secondary port.
10129	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
10130	// SharedKey - The shared key.
10131	SharedKey *string `json:"sharedKey,omitempty"`
10132	// VlanID - The VLAN ID.
10133	VlanID *int32 `json:"vlanId,omitempty"`
10134	// MicrosoftPeeringConfig - The Microsoft peering configuration.
10135	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
10136	// Stats - The peering stats of express route circuit.
10137	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
10138	// ProvisioningState - READ-ONLY; The provisioning state of the express route circuit peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10139	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10140	// GatewayManagerEtag - The GatewayManager Etag.
10141	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
10142	// LastModifiedBy - READ-ONLY; Who was the last to modify the peering.
10143	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
10144	// RouteFilter - The reference to the RouteFilter resource.
10145	RouteFilter *SubResource `json:"routeFilter,omitempty"`
10146	// Ipv6PeeringConfig - The IPv6 peering configuration.
10147	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
10148	// ExpressRouteConnection - The ExpressRoute connection.
10149	ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"`
10150	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
10151	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
10152	// PeeredConnections - READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit.
10153	PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"`
10154}
10155
10156// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringPropertiesFormat.
10157func (ercppf ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
10158	objectMap := make(map[string]interface{})
10159	if ercppf.PeeringType != "" {
10160		objectMap["peeringType"] = ercppf.PeeringType
10161	}
10162	if ercppf.State != "" {
10163		objectMap["state"] = ercppf.State
10164	}
10165	if ercppf.AzureASN != nil {
10166		objectMap["azureASN"] = ercppf.AzureASN
10167	}
10168	if ercppf.PeerASN != nil {
10169		objectMap["peerASN"] = ercppf.PeerASN
10170	}
10171	if ercppf.PrimaryPeerAddressPrefix != nil {
10172		objectMap["primaryPeerAddressPrefix"] = ercppf.PrimaryPeerAddressPrefix
10173	}
10174	if ercppf.SecondaryPeerAddressPrefix != nil {
10175		objectMap["secondaryPeerAddressPrefix"] = ercppf.SecondaryPeerAddressPrefix
10176	}
10177	if ercppf.PrimaryAzurePort != nil {
10178		objectMap["primaryAzurePort"] = ercppf.PrimaryAzurePort
10179	}
10180	if ercppf.SecondaryAzurePort != nil {
10181		objectMap["secondaryAzurePort"] = ercppf.SecondaryAzurePort
10182	}
10183	if ercppf.SharedKey != nil {
10184		objectMap["sharedKey"] = ercppf.SharedKey
10185	}
10186	if ercppf.VlanID != nil {
10187		objectMap["vlanId"] = ercppf.VlanID
10188	}
10189	if ercppf.MicrosoftPeeringConfig != nil {
10190		objectMap["microsoftPeeringConfig"] = ercppf.MicrosoftPeeringConfig
10191	}
10192	if ercppf.Stats != nil {
10193		objectMap["stats"] = ercppf.Stats
10194	}
10195	if ercppf.GatewayManagerEtag != nil {
10196		objectMap["gatewayManagerEtag"] = ercppf.GatewayManagerEtag
10197	}
10198	if ercppf.RouteFilter != nil {
10199		objectMap["routeFilter"] = ercppf.RouteFilter
10200	}
10201	if ercppf.Ipv6PeeringConfig != nil {
10202		objectMap["ipv6PeeringConfig"] = ercppf.Ipv6PeeringConfig
10203	}
10204	if ercppf.ExpressRouteConnection != nil {
10205		objectMap["expressRouteConnection"] = ercppf.ExpressRouteConnection
10206	}
10207	if ercppf.Connections != nil {
10208		objectMap["connections"] = ercppf.Connections
10209	}
10210	return json.Marshal(objectMap)
10211}
10212
10213// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
10214// of a long-running operation.
10215type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
10216	azure.FutureAPI
10217	// Result returns the result of the asynchronous operation.
10218	// If the operation has not completed it will return an error.
10219	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
10220}
10221
10222// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
10223// long-running operation.
10224type ExpressRouteCircuitPeeringsDeleteFuture struct {
10225	azure.FutureAPI
10226	// Result returns the result of the asynchronous operation.
10227	// If the operation has not completed it will return an error.
10228	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
10229}
10230
10231// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
10232type ExpressRouteCircuitPropertiesFormat struct {
10233	// AllowClassicOperations - Allow classic operations.
10234	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
10235	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
10236	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
10237	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
10238	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
10239	// Authorizations - The list of authorizations.
10240	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
10241	// Peerings - The list of peerings.
10242	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
10243	// ServiceKey - The ServiceKey.
10244	ServiceKey *string `json:"serviceKey,omitempty"`
10245	// ServiceProviderNotes - The ServiceProviderNotes.
10246	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
10247	// ServiceProviderProperties - The ServiceProviderProperties.
10248	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
10249	// ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.
10250	ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"`
10251	// BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.
10252	BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"`
10253	// Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation.
10254	Stag *int32 `json:"stag,omitempty"`
10255	// ProvisioningState - READ-ONLY; The provisioning state of the express route circuit resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10256	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10257	// GatewayManagerEtag - The GatewayManager Etag.
10258	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
10259	// GlobalReachEnabled - Flag denoting global reach status.
10260	GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"`
10261}
10262
10263// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat.
10264func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) {
10265	objectMap := make(map[string]interface{})
10266	if ercpf.AllowClassicOperations != nil {
10267		objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations
10268	}
10269	if ercpf.CircuitProvisioningState != nil {
10270		objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState
10271	}
10272	if ercpf.ServiceProviderProvisioningState != "" {
10273		objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState
10274	}
10275	if ercpf.Authorizations != nil {
10276		objectMap["authorizations"] = ercpf.Authorizations
10277	}
10278	if ercpf.Peerings != nil {
10279		objectMap["peerings"] = ercpf.Peerings
10280	}
10281	if ercpf.ServiceKey != nil {
10282		objectMap["serviceKey"] = ercpf.ServiceKey
10283	}
10284	if ercpf.ServiceProviderNotes != nil {
10285		objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes
10286	}
10287	if ercpf.ServiceProviderProperties != nil {
10288		objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties
10289	}
10290	if ercpf.ExpressRoutePort != nil {
10291		objectMap["expressRoutePort"] = ercpf.ExpressRoutePort
10292	}
10293	if ercpf.BandwidthInGbps != nil {
10294		objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps
10295	}
10296	if ercpf.GatewayManagerEtag != nil {
10297		objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag
10298	}
10299	if ercpf.GlobalReachEnabled != nil {
10300		objectMap["globalReachEnabled"] = ercpf.GlobalReachEnabled
10301	}
10302	return json.Marshal(objectMap)
10303}
10304
10305// ExpressRouteCircuitReference reference to an express route circuit.
10306type ExpressRouteCircuitReference struct {
10307	// ID - Corresponding Express Route Circuit Id.
10308	ID *string `json:"id,omitempty"`
10309}
10310
10311// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit.
10312type ExpressRouteCircuitRoutesTable struct {
10313	// NetworkProperty - IP address of a network entity.
10314	NetworkProperty *string `json:"network,omitempty"`
10315	// NextHop - NextHop address.
10316	NextHop *string `json:"nextHop,omitempty"`
10317	// LocPrf - Local preference value as set with the set local-preference route-map configuration command.
10318	LocPrf *string `json:"locPrf,omitempty"`
10319	// Weight - Route Weight.
10320	Weight *int32 `json:"weight,omitempty"`
10321	// Path - Autonomous system paths to the destination network.
10322	Path *string `json:"path,omitempty"`
10323}
10324
10325// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
10326type ExpressRouteCircuitRoutesTableSummary struct {
10327	// Neighbor - IP address of the neighbor.
10328	Neighbor *string `json:"neighbor,omitempty"`
10329	// V - BGP version number spoken to the neighbor.
10330	V *int32 `json:"v,omitempty"`
10331	// As - Autonomous system number.
10332	As *int32 `json:"as,omitempty"`
10333	// 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.
10334	UpDown *string `json:"upDown,omitempty"`
10335	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
10336	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
10337}
10338
10339// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
10340// Circuits API.
10341type ExpressRouteCircuitsArpTableListResult struct {
10342	autorest.Response `json:"-"`
10343	// Value - A list of the ARP tables.
10344	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
10345	// NextLink - The URL to get the next set of results.
10346	NextLink *string `json:"nextLink,omitempty"`
10347}
10348
10349// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10350// long-running operation.
10351type ExpressRouteCircuitsCreateOrUpdateFuture struct {
10352	azure.FutureAPI
10353	// Result returns the result of the asynchronous operation.
10354	// If the operation has not completed it will return an error.
10355	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
10356}
10357
10358// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
10359// long-running operation.
10360type ExpressRouteCircuitsDeleteFuture struct {
10361	azure.FutureAPI
10362	// Result returns the result of the asynchronous operation.
10363	// If the operation has not completed it will return an error.
10364	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
10365}
10366
10367// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
10368// ExpressRouteCircuit.
10369type ExpressRouteCircuitServiceProviderProperties struct {
10370	// ServiceProviderName - The serviceProviderName.
10371	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
10372	// PeeringLocation - The peering location.
10373	PeeringLocation *string `json:"peeringLocation,omitempty"`
10374	// BandwidthInMbps - The BandwidthInMbps.
10375	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
10376}
10377
10378// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
10379type ExpressRouteCircuitSku struct {
10380	// Name - The name of the SKU.
10381	Name *string `json:"name,omitempty"`
10382	// Tier - The tier of the SKU. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic', 'ExpressRouteCircuitSkuTierLocal'
10383	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
10384	// Family - The family of the SKU. Possible values include: 'UnlimitedData', 'MeteredData'
10385	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
10386}
10387
10388// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
10389// long-running operation.
10390type ExpressRouteCircuitsListArpTableFuture struct {
10391	azure.FutureAPI
10392	// Result returns the result of the asynchronous operation.
10393	// If the operation has not completed it will return an error.
10394	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
10395}
10396
10397// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
10398// long-running operation.
10399type ExpressRouteCircuitsListRoutesTableFuture struct {
10400	azure.FutureAPI
10401	// Result returns the result of the asynchronous operation.
10402	// If the operation has not completed it will return an error.
10403	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
10404}
10405
10406// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
10407// results of a long-running operation.
10408type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
10409	azure.FutureAPI
10410	// Result returns the result of the asynchronous operation.
10411	// If the operation has not completed it will return an error.
10412	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
10413}
10414
10415// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
10416// Circuits API.
10417type ExpressRouteCircuitsRoutesTableListResult struct {
10418	autorest.Response `json:"-"`
10419	// Value - The list of routes table.
10420	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
10421	// NextLink - The URL to get the next set of results.
10422	NextLink *string `json:"nextLink,omitempty"`
10423}
10424
10425// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
10426// Express Route Circuits API.
10427type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
10428	autorest.Response `json:"-"`
10429	// Value - A list of the routes table.
10430	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
10431	// NextLink - The URL to get the next set of results.
10432	NextLink *string `json:"nextLink,omitempty"`
10433}
10434
10435// ExpressRouteCircuitStats contains stats associated with the peering.
10436type ExpressRouteCircuitStats struct {
10437	autorest.Response `json:"-"`
10438	// PrimarybytesIn - The Primary BytesIn of the peering.
10439	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
10440	// PrimarybytesOut - The primary BytesOut of the peering.
10441	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
10442	// SecondarybytesIn - The secondary BytesIn of the peering.
10443	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
10444	// SecondarybytesOut - The secondary BytesOut of the peering.
10445	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
10446}
10447
10448// ExpressRouteConnection expressRouteConnection resource.
10449type ExpressRouteConnection struct {
10450	autorest.Response `json:"-"`
10451	// ExpressRouteConnectionProperties - Properties of the express route connection.
10452	*ExpressRouteConnectionProperties `json:"properties,omitempty"`
10453	// Name - The name of the resource.
10454	Name *string `json:"name,omitempty"`
10455	// ID - Resource ID.
10456	ID *string `json:"id,omitempty"`
10457}
10458
10459// MarshalJSON is the custom marshaler for ExpressRouteConnection.
10460func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) {
10461	objectMap := make(map[string]interface{})
10462	if erc.ExpressRouteConnectionProperties != nil {
10463		objectMap["properties"] = erc.ExpressRouteConnectionProperties
10464	}
10465	if erc.Name != nil {
10466		objectMap["name"] = erc.Name
10467	}
10468	if erc.ID != nil {
10469		objectMap["id"] = erc.ID
10470	}
10471	return json.Marshal(objectMap)
10472}
10473
10474// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct.
10475func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error {
10476	var m map[string]*json.RawMessage
10477	err := json.Unmarshal(body, &m)
10478	if err != nil {
10479		return err
10480	}
10481	for k, v := range m {
10482		switch k {
10483		case "properties":
10484			if v != nil {
10485				var expressRouteConnectionProperties ExpressRouteConnectionProperties
10486				err = json.Unmarshal(*v, &expressRouteConnectionProperties)
10487				if err != nil {
10488					return err
10489				}
10490				erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties
10491			}
10492		case "name":
10493			if v != nil {
10494				var name string
10495				err = json.Unmarshal(*v, &name)
10496				if err != nil {
10497					return err
10498				}
10499				erc.Name = &name
10500			}
10501		case "id":
10502			if v != nil {
10503				var ID string
10504				err = json.Unmarshal(*v, &ID)
10505				if err != nil {
10506					return err
10507				}
10508				erc.ID = &ID
10509			}
10510		}
10511	}
10512
10513	return nil
10514}
10515
10516// ExpressRouteConnectionID the ID of the ExpressRouteConnection.
10517type ExpressRouteConnectionID struct {
10518	// ID - READ-ONLY; The ID of the ExpressRouteConnection.
10519	ID *string `json:"id,omitempty"`
10520}
10521
10522// ExpressRouteConnectionList expressRouteConnection list.
10523type ExpressRouteConnectionList struct {
10524	autorest.Response `json:"-"`
10525	// Value - The list of ExpressRoute connections.
10526	Value *[]ExpressRouteConnection `json:"value,omitempty"`
10527}
10528
10529// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource.
10530type ExpressRouteConnectionProperties struct {
10531	// ProvisioningState - READ-ONLY; The provisioning state of the express route connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10532	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10533	// ExpressRouteCircuitPeering - The ExpressRoute circuit peering.
10534	ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"`
10535	// AuthorizationKey - Authorization key to establish the connection.
10536	AuthorizationKey *string `json:"authorizationKey,omitempty"`
10537	// RoutingWeight - The routing weight associated to the connection.
10538	RoutingWeight *int32 `json:"routingWeight,omitempty"`
10539	// EnableInternetSecurity - Enable internet security.
10540	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
10541}
10542
10543// MarshalJSON is the custom marshaler for ExpressRouteConnectionProperties.
10544func (ercp ExpressRouteConnectionProperties) MarshalJSON() ([]byte, error) {
10545	objectMap := make(map[string]interface{})
10546	if ercp.ExpressRouteCircuitPeering != nil {
10547		objectMap["expressRouteCircuitPeering"] = ercp.ExpressRouteCircuitPeering
10548	}
10549	if ercp.AuthorizationKey != nil {
10550		objectMap["authorizationKey"] = ercp.AuthorizationKey
10551	}
10552	if ercp.RoutingWeight != nil {
10553		objectMap["routingWeight"] = ercp.RoutingWeight
10554	}
10555	if ercp.EnableInternetSecurity != nil {
10556		objectMap["enableInternetSecurity"] = ercp.EnableInternetSecurity
10557	}
10558	return json.Marshal(objectMap)
10559}
10560
10561// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
10562// a long-running operation.
10563type ExpressRouteConnectionsCreateOrUpdateFuture struct {
10564	azure.FutureAPI
10565	// Result returns the result of the asynchronous operation.
10566	// If the operation has not completed it will return an error.
10567	Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error)
10568}
10569
10570// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
10571// long-running operation.
10572type ExpressRouteConnectionsDeleteFuture struct {
10573	azure.FutureAPI
10574	// Result returns the result of the asynchronous operation.
10575	// If the operation has not completed it will return an error.
10576	Result func(ExpressRouteConnectionsClient) (autorest.Response, error)
10577}
10578
10579// ExpressRouteCrossConnection expressRouteCrossConnection resource.
10580type ExpressRouteCrossConnection struct {
10581	autorest.Response `json:"-"`
10582	// ExpressRouteCrossConnectionProperties - Properties of the express route cross connection.
10583	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
10584	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10585	Etag *string `json:"etag,omitempty"`
10586	// ID - Resource ID.
10587	ID *string `json:"id,omitempty"`
10588	// Name - READ-ONLY; Resource name.
10589	Name *string `json:"name,omitempty"`
10590	// Type - READ-ONLY; Resource type.
10591	Type *string `json:"type,omitempty"`
10592	// Location - Resource location.
10593	Location *string `json:"location,omitempty"`
10594	// Tags - Resource tags.
10595	Tags map[string]*string `json:"tags"`
10596}
10597
10598// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
10599func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
10600	objectMap := make(map[string]interface{})
10601	if ercc.ExpressRouteCrossConnectionProperties != nil {
10602		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
10603	}
10604	if ercc.ID != nil {
10605		objectMap["id"] = ercc.ID
10606	}
10607	if ercc.Location != nil {
10608		objectMap["location"] = ercc.Location
10609	}
10610	if ercc.Tags != nil {
10611		objectMap["tags"] = ercc.Tags
10612	}
10613	return json.Marshal(objectMap)
10614}
10615
10616// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
10617func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
10618	var m map[string]*json.RawMessage
10619	err := json.Unmarshal(body, &m)
10620	if err != nil {
10621		return err
10622	}
10623	for k, v := range m {
10624		switch k {
10625		case "properties":
10626			if v != nil {
10627				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
10628				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
10629				if err != nil {
10630					return err
10631				}
10632				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
10633			}
10634		case "etag":
10635			if v != nil {
10636				var etag string
10637				err = json.Unmarshal(*v, &etag)
10638				if err != nil {
10639					return err
10640				}
10641				ercc.Etag = &etag
10642			}
10643		case "id":
10644			if v != nil {
10645				var ID string
10646				err = json.Unmarshal(*v, &ID)
10647				if err != nil {
10648					return err
10649				}
10650				ercc.ID = &ID
10651			}
10652		case "name":
10653			if v != nil {
10654				var name string
10655				err = json.Unmarshal(*v, &name)
10656				if err != nil {
10657					return err
10658				}
10659				ercc.Name = &name
10660			}
10661		case "type":
10662			if v != nil {
10663				var typeVar string
10664				err = json.Unmarshal(*v, &typeVar)
10665				if err != nil {
10666					return err
10667				}
10668				ercc.Type = &typeVar
10669			}
10670		case "location":
10671			if v != nil {
10672				var location string
10673				err = json.Unmarshal(*v, &location)
10674				if err != nil {
10675					return err
10676				}
10677				ercc.Location = &location
10678			}
10679		case "tags":
10680			if v != nil {
10681				var tags map[string]*string
10682				err = json.Unmarshal(*v, &tags)
10683				if err != nil {
10684					return err
10685				}
10686				ercc.Tags = tags
10687			}
10688		}
10689	}
10690
10691	return nil
10692}
10693
10694// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
10695type ExpressRouteCrossConnectionListResult struct {
10696	autorest.Response `json:"-"`
10697	// Value - A list of ExpressRouteCrossConnection resources.
10698	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
10699	// NextLink - READ-ONLY; The URL to get the next set of results.
10700	NextLink *string `json:"nextLink,omitempty"`
10701}
10702
10703// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
10704func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
10705	objectMap := make(map[string]interface{})
10706	if ercclr.Value != nil {
10707		objectMap["value"] = ercclr.Value
10708	}
10709	return json.Marshal(objectMap)
10710}
10711
10712// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
10713// ExpressRouteCrossConnection values.
10714type ExpressRouteCrossConnectionListResultIterator struct {
10715	i    int
10716	page ExpressRouteCrossConnectionListResultPage
10717}
10718
10719// NextWithContext advances to the next value.  If there was an error making
10720// the request the iterator does not advance and the error is returned.
10721func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
10722	if tracing.IsEnabled() {
10723		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
10724		defer func() {
10725			sc := -1
10726			if iter.Response().Response.Response != nil {
10727				sc = iter.Response().Response.Response.StatusCode
10728			}
10729			tracing.EndSpan(ctx, sc, err)
10730		}()
10731	}
10732	iter.i++
10733	if iter.i < len(iter.page.Values()) {
10734		return nil
10735	}
10736	err = iter.page.NextWithContext(ctx)
10737	if err != nil {
10738		iter.i--
10739		return err
10740	}
10741	iter.i = 0
10742	return nil
10743}
10744
10745// Next advances to the next value.  If there was an error making
10746// the request the iterator does not advance and the error is returned.
10747// Deprecated: Use NextWithContext() instead.
10748func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
10749	return iter.NextWithContext(context.Background())
10750}
10751
10752// NotDone returns true if the enumeration should be started or is not yet complete.
10753func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
10754	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10755}
10756
10757// Response returns the raw server response from the last page request.
10758func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
10759	return iter.page.Response()
10760}
10761
10762// Value returns the current value or a zero-initialized value if the
10763// iterator has advanced beyond the end of the collection.
10764func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
10765	if !iter.page.NotDone() {
10766		return ExpressRouteCrossConnection{}
10767	}
10768	return iter.page.Values()[iter.i]
10769}
10770
10771// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
10772func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
10773	return ExpressRouteCrossConnectionListResultIterator{page: page}
10774}
10775
10776// IsEmpty returns true if the ListResult contains no values.
10777func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
10778	return ercclr.Value == nil || len(*ercclr.Value) == 0
10779}
10780
10781// hasNextLink returns true if the NextLink is not empty.
10782func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
10783	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
10784}
10785
10786// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
10787// It returns nil if no more results exist.
10788func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
10789	if !ercclr.hasNextLink() {
10790		return nil, nil
10791	}
10792	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10793		autorest.AsJSON(),
10794		autorest.AsGet(),
10795		autorest.WithBaseURL(to.String(ercclr.NextLink)))
10796}
10797
10798// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
10799type ExpressRouteCrossConnectionListResultPage struct {
10800	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
10801	ercclr ExpressRouteCrossConnectionListResult
10802}
10803
10804// NextWithContext advances to the next page of values.  If there was an error making
10805// the request the page does not advance and the error is returned.
10806func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
10807	if tracing.IsEnabled() {
10808		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
10809		defer func() {
10810			sc := -1
10811			if page.Response().Response.Response != nil {
10812				sc = page.Response().Response.Response.StatusCode
10813			}
10814			tracing.EndSpan(ctx, sc, err)
10815		}()
10816	}
10817	for {
10818		next, err := page.fn(ctx, page.ercclr)
10819		if err != nil {
10820			return err
10821		}
10822		page.ercclr = next
10823		if !next.hasNextLink() || !next.IsEmpty() {
10824			break
10825		}
10826	}
10827	return nil
10828}
10829
10830// Next advances to the next page of values.  If there was an error making
10831// the request the page does not advance and the error is returned.
10832// Deprecated: Use NextWithContext() instead.
10833func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
10834	return page.NextWithContext(context.Background())
10835}
10836
10837// NotDone returns true if the page enumeration should be started or is not yet complete.
10838func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
10839	return !page.ercclr.IsEmpty()
10840}
10841
10842// Response returns the raw server response from the last page request.
10843func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
10844	return page.ercclr
10845}
10846
10847// Values returns the slice of values for the current page or nil if there are no values.
10848func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
10849	if page.ercclr.IsEmpty() {
10850		return nil
10851	}
10852	return *page.ercclr.Value
10853}
10854
10855// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
10856func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
10857	return ExpressRouteCrossConnectionListResultPage{
10858		fn:     getNextPage,
10859		ercclr: cur,
10860	}
10861}
10862
10863// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
10864type ExpressRouteCrossConnectionPeering struct {
10865	autorest.Response `json:"-"`
10866	// ExpressRouteCrossConnectionPeeringProperties - Properties of the express route cross connection peering.
10867	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
10868	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10869	Name *string `json:"name,omitempty"`
10870	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10871	Etag *string `json:"etag,omitempty"`
10872	// ID - Resource ID.
10873	ID *string `json:"id,omitempty"`
10874}
10875
10876// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
10877func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
10878	objectMap := make(map[string]interface{})
10879	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
10880		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
10881	}
10882	if erccp.Name != nil {
10883		objectMap["name"] = erccp.Name
10884	}
10885	if erccp.ID != nil {
10886		objectMap["id"] = erccp.ID
10887	}
10888	return json.Marshal(objectMap)
10889}
10890
10891// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
10892func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
10893	var m map[string]*json.RawMessage
10894	err := json.Unmarshal(body, &m)
10895	if err != nil {
10896		return err
10897	}
10898	for k, v := range m {
10899		switch k {
10900		case "properties":
10901			if v != nil {
10902				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
10903				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
10904				if err != nil {
10905					return err
10906				}
10907				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
10908			}
10909		case "name":
10910			if v != nil {
10911				var name string
10912				err = json.Unmarshal(*v, &name)
10913				if err != nil {
10914					return err
10915				}
10916				erccp.Name = &name
10917			}
10918		case "etag":
10919			if v != nil {
10920				var etag string
10921				err = json.Unmarshal(*v, &etag)
10922				if err != nil {
10923					return err
10924				}
10925				erccp.Etag = &etag
10926			}
10927		case "id":
10928			if v != nil {
10929				var ID string
10930				err = json.Unmarshal(*v, &ID)
10931				if err != nil {
10932					return err
10933				}
10934				erccp.ID = &ID
10935			}
10936		}
10937	}
10938
10939	return nil
10940}
10941
10942// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
10943// that belong to an ExpressRouteCrossConnection.
10944type ExpressRouteCrossConnectionPeeringList struct {
10945	autorest.Response `json:"-"`
10946	// Value - The peerings in an express route cross connection.
10947	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
10948	// NextLink - READ-ONLY; The URL to get the next set of results.
10949	NextLink *string `json:"nextLink,omitempty"`
10950}
10951
10952// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
10953func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
10954	objectMap := make(map[string]interface{})
10955	if erccpl.Value != nil {
10956		objectMap["value"] = erccpl.Value
10957	}
10958	return json.Marshal(objectMap)
10959}
10960
10961// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
10962// ExpressRouteCrossConnectionPeering values.
10963type ExpressRouteCrossConnectionPeeringListIterator struct {
10964	i    int
10965	page ExpressRouteCrossConnectionPeeringListPage
10966}
10967
10968// NextWithContext advances to the next value.  If there was an error making
10969// the request the iterator does not advance and the error is returned.
10970func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
10971	if tracing.IsEnabled() {
10972		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
10973		defer func() {
10974			sc := -1
10975			if iter.Response().Response.Response != nil {
10976				sc = iter.Response().Response.Response.StatusCode
10977			}
10978			tracing.EndSpan(ctx, sc, err)
10979		}()
10980	}
10981	iter.i++
10982	if iter.i < len(iter.page.Values()) {
10983		return nil
10984	}
10985	err = iter.page.NextWithContext(ctx)
10986	if err != nil {
10987		iter.i--
10988		return err
10989	}
10990	iter.i = 0
10991	return nil
10992}
10993
10994// Next advances to the next value.  If there was an error making
10995// the request the iterator does not advance and the error is returned.
10996// Deprecated: Use NextWithContext() instead.
10997func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
10998	return iter.NextWithContext(context.Background())
10999}
11000
11001// NotDone returns true if the enumeration should be started or is not yet complete.
11002func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
11003	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11004}
11005
11006// Response returns the raw server response from the last page request.
11007func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
11008	return iter.page.Response()
11009}
11010
11011// Value returns the current value or a zero-initialized value if the
11012// iterator has advanced beyond the end of the collection.
11013func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
11014	if !iter.page.NotDone() {
11015		return ExpressRouteCrossConnectionPeering{}
11016	}
11017	return iter.page.Values()[iter.i]
11018}
11019
11020// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
11021func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
11022	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
11023}
11024
11025// IsEmpty returns true if the ListResult contains no values.
11026func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
11027	return erccpl.Value == nil || len(*erccpl.Value) == 0
11028}
11029
11030// hasNextLink returns true if the NextLink is not empty.
11031func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
11032	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
11033}
11034
11035// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
11036// It returns nil if no more results exist.
11037func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
11038	if !erccpl.hasNextLink() {
11039		return nil, nil
11040	}
11041	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11042		autorest.AsJSON(),
11043		autorest.AsGet(),
11044		autorest.WithBaseURL(to.String(erccpl.NextLink)))
11045}
11046
11047// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
11048type ExpressRouteCrossConnectionPeeringListPage struct {
11049	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
11050	erccpl ExpressRouteCrossConnectionPeeringList
11051}
11052
11053// NextWithContext advances to the next page of values.  If there was an error making
11054// the request the page does not advance and the error is returned.
11055func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
11056	if tracing.IsEnabled() {
11057		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
11058		defer func() {
11059			sc := -1
11060			if page.Response().Response.Response != nil {
11061				sc = page.Response().Response.Response.StatusCode
11062			}
11063			tracing.EndSpan(ctx, sc, err)
11064		}()
11065	}
11066	for {
11067		next, err := page.fn(ctx, page.erccpl)
11068		if err != nil {
11069			return err
11070		}
11071		page.erccpl = next
11072		if !next.hasNextLink() || !next.IsEmpty() {
11073			break
11074		}
11075	}
11076	return nil
11077}
11078
11079// Next advances to the next page of values.  If there was an error making
11080// the request the page does not advance and the error is returned.
11081// Deprecated: Use NextWithContext() instead.
11082func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
11083	return page.NextWithContext(context.Background())
11084}
11085
11086// NotDone returns true if the page enumeration should be started or is not yet complete.
11087func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
11088	return !page.erccpl.IsEmpty()
11089}
11090
11091// Response returns the raw server response from the last page request.
11092func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
11093	return page.erccpl
11094}
11095
11096// Values returns the slice of values for the current page or nil if there are no values.
11097func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
11098	if page.erccpl.IsEmpty() {
11099		return nil
11100	}
11101	return *page.erccpl.Value
11102}
11103
11104// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
11105func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
11106	return ExpressRouteCrossConnectionPeeringListPage{
11107		fn:     getNextPage,
11108		erccpl: cur,
11109	}
11110}
11111
11112// ExpressRouteCrossConnectionPeeringProperties properties of express route cross connection peering.
11113type ExpressRouteCrossConnectionPeeringProperties struct {
11114	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
11115	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
11116	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
11117	State ExpressRoutePeeringState `json:"state,omitempty"`
11118	// AzureASN - READ-ONLY; The Azure ASN.
11119	AzureASN *int32 `json:"azureASN,omitempty"`
11120	// PeerASN - The peer ASN.
11121	PeerASN *int64 `json:"peerASN,omitempty"`
11122	// PrimaryPeerAddressPrefix - The primary address prefix.
11123	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
11124	// SecondaryPeerAddressPrefix - The secondary address prefix.
11125	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
11126	// PrimaryAzurePort - READ-ONLY; The primary port.
11127	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
11128	// SecondaryAzurePort - READ-ONLY; The secondary port.
11129	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
11130	// SharedKey - The shared key.
11131	SharedKey *string `json:"sharedKey,omitempty"`
11132	// VlanID - The VLAN ID.
11133	VlanID *int32 `json:"vlanId,omitempty"`
11134	// MicrosoftPeeringConfig - The Microsoft peering configuration.
11135	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
11136	// ProvisioningState - READ-ONLY; The provisioning state of the express route cross connection peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
11137	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11138	// GatewayManagerEtag - The GatewayManager Etag.
11139	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
11140	// LastModifiedBy - READ-ONLY; Who was the last to modify the peering.
11141	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
11142	// Ipv6PeeringConfig - The IPv6 peering configuration.
11143	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
11144}
11145
11146// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
11147func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
11148	objectMap := make(map[string]interface{})
11149	if erccpp.PeeringType != "" {
11150		objectMap["peeringType"] = erccpp.PeeringType
11151	}
11152	if erccpp.State != "" {
11153		objectMap["state"] = erccpp.State
11154	}
11155	if erccpp.PeerASN != nil {
11156		objectMap["peerASN"] = erccpp.PeerASN
11157	}
11158	if erccpp.PrimaryPeerAddressPrefix != nil {
11159		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
11160	}
11161	if erccpp.SecondaryPeerAddressPrefix != nil {
11162		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
11163	}
11164	if erccpp.SharedKey != nil {
11165		objectMap["sharedKey"] = erccpp.SharedKey
11166	}
11167	if erccpp.VlanID != nil {
11168		objectMap["vlanId"] = erccpp.VlanID
11169	}
11170	if erccpp.MicrosoftPeeringConfig != nil {
11171		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
11172	}
11173	if erccpp.GatewayManagerEtag != nil {
11174		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
11175	}
11176	if erccpp.Ipv6PeeringConfig != nil {
11177		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
11178	}
11179	return json.Marshal(objectMap)
11180}
11181
11182// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
11183// results of a long-running operation.
11184type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
11185	azure.FutureAPI
11186	// Result returns the result of the asynchronous operation.
11187	// If the operation has not completed it will return an error.
11188	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
11189}
11190
11191// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
11192// of a long-running operation.
11193type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
11194	azure.FutureAPI
11195	// Result returns the result of the asynchronous operation.
11196	// If the operation has not completed it will return an error.
11197	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
11198}
11199
11200// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
11201type ExpressRouteCrossConnectionProperties struct {
11202	// PrimaryAzurePort - READ-ONLY; The name of the primary port.
11203	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
11204	// SecondaryAzurePort - READ-ONLY; The name of the secondary port.
11205	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
11206	// STag - READ-ONLY; The identifier of the circuit traffic.
11207	STag *int32 `json:"sTag,omitempty"`
11208	// PeeringLocation - The peering location of the ExpressRoute circuit.
11209	PeeringLocation *string `json:"peeringLocation,omitempty"`
11210	// BandwidthInMbps - The circuit bandwidth In Mbps.
11211	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
11212	// ExpressRouteCircuit - The ExpressRouteCircuit.
11213	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
11214	// ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
11215	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
11216	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
11217	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
11218	// ProvisioningState - READ-ONLY; The provisioning state of the express route cross connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
11219	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11220	// Peerings - The list of peerings.
11221	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
11222}
11223
11224// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
11225func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
11226	objectMap := make(map[string]interface{})
11227	if erccp.PeeringLocation != nil {
11228		objectMap["peeringLocation"] = erccp.PeeringLocation
11229	}
11230	if erccp.BandwidthInMbps != nil {
11231		objectMap["bandwidthInMbps"] = erccp.BandwidthInMbps
11232	}
11233	if erccp.ExpressRouteCircuit != nil {
11234		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
11235	}
11236	if erccp.ServiceProviderProvisioningState != "" {
11237		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
11238	}
11239	if erccp.ServiceProviderNotes != nil {
11240		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
11241	}
11242	if erccp.Peerings != nil {
11243		objectMap["peerings"] = erccp.Peerings
11244	}
11245	return json.Marshal(objectMap)
11246}
11247
11248// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
11249type ExpressRouteCrossConnectionRoutesTableSummary struct {
11250	// Neighbor - IP address of Neighbor router.
11251	Neighbor *string `json:"neighbor,omitempty"`
11252	// Asn - Autonomous system number.
11253	Asn *int32 `json:"asn,omitempty"`
11254	// 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.
11255	UpDown *string `json:"upDown,omitempty"`
11256	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
11257	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
11258}
11259
11260// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
11261// results of a long-running operation.
11262type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
11263	azure.FutureAPI
11264	// Result returns the result of the asynchronous operation.
11265	// If the operation has not completed it will return an error.
11266	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
11267}
11268
11269// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
11270// of a long-running operation.
11271type ExpressRouteCrossConnectionsListArpTableFuture struct {
11272	azure.FutureAPI
11273	// Result returns the result of the asynchronous operation.
11274	// If the operation has not completed it will return an error.
11275	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
11276}
11277
11278// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
11279// results of a long-running operation.
11280type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
11281	azure.FutureAPI
11282	// Result returns the result of the asynchronous operation.
11283	// If the operation has not completed it will return an error.
11284	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
11285}
11286
11287// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
11288// the results of a long-running operation.
11289type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
11290	azure.FutureAPI
11291	// Result returns the result of the asynchronous operation.
11292	// If the operation has not completed it will return an error.
11293	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
11294}
11295
11296// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
11297// the Express Route Cross Connections.
11298type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
11299	autorest.Response `json:"-"`
11300	// Value - A list of the routes table.
11301	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
11302	// NextLink - READ-ONLY; The URL to get the next set of results.
11303	NextLink *string `json:"nextLink,omitempty"`
11304}
11305
11306// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
11307func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
11308	objectMap := make(map[string]interface{})
11309	if erccrtslr.Value != nil {
11310		objectMap["value"] = erccrtslr.Value
11311	}
11312	return json.Marshal(objectMap)
11313}
11314
11315// ExpressRouteGateway expressRoute gateway resource.
11316type ExpressRouteGateway struct {
11317	autorest.Response `json:"-"`
11318	// ExpressRouteGatewayProperties - Properties of the express route gateway.
11319	*ExpressRouteGatewayProperties `json:"properties,omitempty"`
11320	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11321	Etag *string `json:"etag,omitempty"`
11322	// ID - Resource ID.
11323	ID *string `json:"id,omitempty"`
11324	// Name - READ-ONLY; Resource name.
11325	Name *string `json:"name,omitempty"`
11326	// Type - READ-ONLY; Resource type.
11327	Type *string `json:"type,omitempty"`
11328	// Location - Resource location.
11329	Location *string `json:"location,omitempty"`
11330	// Tags - Resource tags.
11331	Tags map[string]*string `json:"tags"`
11332}
11333
11334// MarshalJSON is the custom marshaler for ExpressRouteGateway.
11335func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) {
11336	objectMap := make(map[string]interface{})
11337	if erg.ExpressRouteGatewayProperties != nil {
11338		objectMap["properties"] = erg.ExpressRouteGatewayProperties
11339	}
11340	if erg.ID != nil {
11341		objectMap["id"] = erg.ID
11342	}
11343	if erg.Location != nil {
11344		objectMap["location"] = erg.Location
11345	}
11346	if erg.Tags != nil {
11347		objectMap["tags"] = erg.Tags
11348	}
11349	return json.Marshal(objectMap)
11350}
11351
11352// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct.
11353func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error {
11354	var m map[string]*json.RawMessage
11355	err := json.Unmarshal(body, &m)
11356	if err != nil {
11357		return err
11358	}
11359	for k, v := range m {
11360		switch k {
11361		case "properties":
11362			if v != nil {
11363				var expressRouteGatewayProperties ExpressRouteGatewayProperties
11364				err = json.Unmarshal(*v, &expressRouteGatewayProperties)
11365				if err != nil {
11366					return err
11367				}
11368				erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties
11369			}
11370		case "etag":
11371			if v != nil {
11372				var etag string
11373				err = json.Unmarshal(*v, &etag)
11374				if err != nil {
11375					return err
11376				}
11377				erg.Etag = &etag
11378			}
11379		case "id":
11380			if v != nil {
11381				var ID string
11382				err = json.Unmarshal(*v, &ID)
11383				if err != nil {
11384					return err
11385				}
11386				erg.ID = &ID
11387			}
11388		case "name":
11389			if v != nil {
11390				var name string
11391				err = json.Unmarshal(*v, &name)
11392				if err != nil {
11393					return err
11394				}
11395				erg.Name = &name
11396			}
11397		case "type":
11398			if v != nil {
11399				var typeVar string
11400				err = json.Unmarshal(*v, &typeVar)
11401				if err != nil {
11402					return err
11403				}
11404				erg.Type = &typeVar
11405			}
11406		case "location":
11407			if v != nil {
11408				var location string
11409				err = json.Unmarshal(*v, &location)
11410				if err != nil {
11411					return err
11412				}
11413				erg.Location = &location
11414			}
11415		case "tags":
11416			if v != nil {
11417				var tags map[string]*string
11418				err = json.Unmarshal(*v, &tags)
11419				if err != nil {
11420					return err
11421				}
11422				erg.Tags = tags
11423			}
11424		}
11425	}
11426
11427	return nil
11428}
11429
11430// ExpressRouteGatewayList list of ExpressRoute gateways.
11431type ExpressRouteGatewayList struct {
11432	autorest.Response `json:"-"`
11433	// Value - List of ExpressRoute gateways.
11434	Value *[]ExpressRouteGateway `json:"value,omitempty"`
11435}
11436
11437// ExpressRouteGatewayProperties expressRoute gateway resource properties.
11438type ExpressRouteGatewayProperties struct {
11439	// AutoScaleConfiguration - Configuration for auto scaling.
11440	AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"`
11441	// ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway.
11442	ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"`
11443	// ProvisioningState - READ-ONLY; The provisioning state of the express route gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
11444	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11445	// VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed.
11446	VirtualHub *VirtualHubID `json:"virtualHub,omitempty"`
11447}
11448
11449// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties.
11450func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) {
11451	objectMap := make(map[string]interface{})
11452	if ergp.AutoScaleConfiguration != nil {
11453		objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration
11454	}
11455	if ergp.VirtualHub != nil {
11456		objectMap["virtualHub"] = ergp.VirtualHub
11457	}
11458	return json.Marshal(objectMap)
11459}
11460
11461// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling.
11462type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct {
11463	// Bounds - Minimum and maximum number of scale units to deploy.
11464	Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"`
11465}
11466
11467// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to
11468// deploy.
11469type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct {
11470	// Min - Minimum number of scale units deployed for ExpressRoute gateway.
11471	Min *int32 `json:"min,omitempty"`
11472	// Max - Maximum number of scale units deployed for ExpressRoute gateway.
11473	Max *int32 `json:"max,omitempty"`
11474}
11475
11476// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11477// long-running operation.
11478type ExpressRouteGatewaysCreateOrUpdateFuture struct {
11479	azure.FutureAPI
11480	// Result returns the result of the asynchronous operation.
11481	// If the operation has not completed it will return an error.
11482	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
11483}
11484
11485// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
11486// long-running operation.
11487type ExpressRouteGatewaysDeleteFuture struct {
11488	azure.FutureAPI
11489	// Result returns the result of the asynchronous operation.
11490	// If the operation has not completed it will return an error.
11491	Result func(ExpressRouteGatewaysClient) (autorest.Response, error)
11492}
11493
11494// ExpressRouteLink expressRouteLink child resource definition.
11495type ExpressRouteLink struct {
11496	autorest.Response `json:"-"`
11497	// ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties.
11498	*ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"`
11499	// Name - Name of child port resource that is unique among child port resources of the parent.
11500	Name *string `json:"name,omitempty"`
11501	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11502	Etag *string `json:"etag,omitempty"`
11503	// ID - Resource ID.
11504	ID *string `json:"id,omitempty"`
11505}
11506
11507// MarshalJSON is the custom marshaler for ExpressRouteLink.
11508func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) {
11509	objectMap := make(map[string]interface{})
11510	if erl.ExpressRouteLinkPropertiesFormat != nil {
11511		objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat
11512	}
11513	if erl.Name != nil {
11514		objectMap["name"] = erl.Name
11515	}
11516	if erl.ID != nil {
11517		objectMap["id"] = erl.ID
11518	}
11519	return json.Marshal(objectMap)
11520}
11521
11522// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct.
11523func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error {
11524	var m map[string]*json.RawMessage
11525	err := json.Unmarshal(body, &m)
11526	if err != nil {
11527		return err
11528	}
11529	for k, v := range m {
11530		switch k {
11531		case "properties":
11532			if v != nil {
11533				var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat
11534				err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat)
11535				if err != nil {
11536					return err
11537				}
11538				erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat
11539			}
11540		case "name":
11541			if v != nil {
11542				var name string
11543				err = json.Unmarshal(*v, &name)
11544				if err != nil {
11545					return err
11546				}
11547				erl.Name = &name
11548			}
11549		case "etag":
11550			if v != nil {
11551				var etag string
11552				err = json.Unmarshal(*v, &etag)
11553				if err != nil {
11554					return err
11555				}
11556				erl.Etag = &etag
11557			}
11558		case "id":
11559			if v != nil {
11560				var ID string
11561				err = json.Unmarshal(*v, &ID)
11562				if err != nil {
11563					return err
11564				}
11565				erl.ID = &ID
11566			}
11567		}
11568	}
11569
11570	return nil
11571}
11572
11573// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call.
11574type ExpressRouteLinkListResult struct {
11575	autorest.Response `json:"-"`
11576	// Value - The list of ExpressRouteLink sub-resources.
11577	Value *[]ExpressRouteLink `json:"value,omitempty"`
11578	// NextLink - The URL to get the next set of results.
11579	NextLink *string `json:"nextLink,omitempty"`
11580}
11581
11582// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values.
11583type ExpressRouteLinkListResultIterator struct {
11584	i    int
11585	page ExpressRouteLinkListResultPage
11586}
11587
11588// NextWithContext advances to the next value.  If there was an error making
11589// the request the iterator does not advance and the error is returned.
11590func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
11591	if tracing.IsEnabled() {
11592		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext")
11593		defer func() {
11594			sc := -1
11595			if iter.Response().Response.Response != nil {
11596				sc = iter.Response().Response.Response.StatusCode
11597			}
11598			tracing.EndSpan(ctx, sc, err)
11599		}()
11600	}
11601	iter.i++
11602	if iter.i < len(iter.page.Values()) {
11603		return nil
11604	}
11605	err = iter.page.NextWithContext(ctx)
11606	if err != nil {
11607		iter.i--
11608		return err
11609	}
11610	iter.i = 0
11611	return nil
11612}
11613
11614// Next advances to the next value.  If there was an error making
11615// the request the iterator does not advance and the error is returned.
11616// Deprecated: Use NextWithContext() instead.
11617func (iter *ExpressRouteLinkListResultIterator) Next() error {
11618	return iter.NextWithContext(context.Background())
11619}
11620
11621// NotDone returns true if the enumeration should be started or is not yet complete.
11622func (iter ExpressRouteLinkListResultIterator) NotDone() bool {
11623	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11624}
11625
11626// Response returns the raw server response from the last page request.
11627func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult {
11628	return iter.page.Response()
11629}
11630
11631// Value returns the current value or a zero-initialized value if the
11632// iterator has advanced beyond the end of the collection.
11633func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink {
11634	if !iter.page.NotDone() {
11635		return ExpressRouteLink{}
11636	}
11637	return iter.page.Values()[iter.i]
11638}
11639
11640// Creates a new instance of the ExpressRouteLinkListResultIterator type.
11641func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator {
11642	return ExpressRouteLinkListResultIterator{page: page}
11643}
11644
11645// IsEmpty returns true if the ListResult contains no values.
11646func (erllr ExpressRouteLinkListResult) IsEmpty() bool {
11647	return erllr.Value == nil || len(*erllr.Value) == 0
11648}
11649
11650// hasNextLink returns true if the NextLink is not empty.
11651func (erllr ExpressRouteLinkListResult) hasNextLink() bool {
11652	return erllr.NextLink != nil && len(*erllr.NextLink) != 0
11653}
11654
11655// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results.
11656// It returns nil if no more results exist.
11657func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
11658	if !erllr.hasNextLink() {
11659		return nil, nil
11660	}
11661	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11662		autorest.AsJSON(),
11663		autorest.AsGet(),
11664		autorest.WithBaseURL(to.String(erllr.NextLink)))
11665}
11666
11667// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values.
11668type ExpressRouteLinkListResultPage struct {
11669	fn    func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)
11670	erllr ExpressRouteLinkListResult
11671}
11672
11673// NextWithContext advances to the next page of values.  If there was an error making
11674// the request the page does not advance and the error is returned.
11675func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
11676	if tracing.IsEnabled() {
11677		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext")
11678		defer func() {
11679			sc := -1
11680			if page.Response().Response.Response != nil {
11681				sc = page.Response().Response.Response.StatusCode
11682			}
11683			tracing.EndSpan(ctx, sc, err)
11684		}()
11685	}
11686	for {
11687		next, err := page.fn(ctx, page.erllr)
11688		if err != nil {
11689			return err
11690		}
11691		page.erllr = next
11692		if !next.hasNextLink() || !next.IsEmpty() {
11693			break
11694		}
11695	}
11696	return nil
11697}
11698
11699// Next advances to the next page of values.  If there was an error making
11700// the request the page does not advance and the error is returned.
11701// Deprecated: Use NextWithContext() instead.
11702func (page *ExpressRouteLinkListResultPage) Next() error {
11703	return page.NextWithContext(context.Background())
11704}
11705
11706// NotDone returns true if the page enumeration should be started or is not yet complete.
11707func (page ExpressRouteLinkListResultPage) NotDone() bool {
11708	return !page.erllr.IsEmpty()
11709}
11710
11711// Response returns the raw server response from the last page request.
11712func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult {
11713	return page.erllr
11714}
11715
11716// Values returns the slice of values for the current page or nil if there are no values.
11717func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink {
11718	if page.erllr.IsEmpty() {
11719		return nil
11720	}
11721	return *page.erllr.Value
11722}
11723
11724// Creates a new instance of the ExpressRouteLinkListResultPage type.
11725func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage {
11726	return ExpressRouteLinkListResultPage{
11727		fn:    getNextPage,
11728		erllr: cur,
11729	}
11730}
11731
11732// ExpressRouteLinkMacSecConfig expressRouteLink Mac Security Configuration.
11733type ExpressRouteLinkMacSecConfig struct {
11734	// CknSecretIdentifier - Keyvault Secret Identifier URL containing Mac security CKN key.
11735	CknSecretIdentifier *string `json:"cknSecretIdentifier,omitempty"`
11736	// CakSecretIdentifier - Keyvault Secret Identifier URL containing Mac security CAK key.
11737	CakSecretIdentifier *string `json:"cakSecretIdentifier,omitempty"`
11738	// Cipher - Mac security cipher. Possible values include: 'GcmAes128', 'GcmAes256'
11739	Cipher ExpressRouteLinkMacSecCipher `json:"cipher,omitempty"`
11740}
11741
11742// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources.
11743type ExpressRouteLinkPropertiesFormat struct {
11744	// RouterName - READ-ONLY; Name of Azure router associated with physical port.
11745	RouterName *string `json:"routerName,omitempty"`
11746	// InterfaceName - READ-ONLY; Name of Azure router interface.
11747	InterfaceName *string `json:"interfaceName,omitempty"`
11748	// PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port.
11749	PatchPanelID *string `json:"patchPanelId,omitempty"`
11750	// RackID - READ-ONLY; Mapping of physical patch panel to rack.
11751	RackID *string `json:"rackId,omitempty"`
11752	// ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'LC', 'SC'
11753	ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"`
11754	// AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled'
11755	AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"`
11756	// ProvisioningState - READ-ONLY; The provisioning state of the express route link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
11757	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11758	// MacSecConfig - MacSec configuration.
11759	MacSecConfig *ExpressRouteLinkMacSecConfig `json:"macSecConfig,omitempty"`
11760}
11761
11762// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat.
11763func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
11764	objectMap := make(map[string]interface{})
11765	if erlpf.AdminState != "" {
11766		objectMap["adminState"] = erlpf.AdminState
11767	}
11768	if erlpf.MacSecConfig != nil {
11769		objectMap["macSecConfig"] = erlpf.MacSecConfig
11770	}
11771	return json.Marshal(objectMap)
11772}
11773
11774// ExpressRoutePort expressRoutePort resource definition.
11775type ExpressRoutePort struct {
11776	autorest.Response `json:"-"`
11777	// ExpressRoutePortPropertiesFormat - ExpressRoutePort properties.
11778	*ExpressRoutePortPropertiesFormat `json:"properties,omitempty"`
11779	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11780	Etag *string `json:"etag,omitempty"`
11781	// Identity - The identity of ExpressRoutePort, if configured.
11782	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
11783	// ID - Resource ID.
11784	ID *string `json:"id,omitempty"`
11785	// Name - READ-ONLY; Resource name.
11786	Name *string `json:"name,omitempty"`
11787	// Type - READ-ONLY; Resource type.
11788	Type *string `json:"type,omitempty"`
11789	// Location - Resource location.
11790	Location *string `json:"location,omitempty"`
11791	// Tags - Resource tags.
11792	Tags map[string]*string `json:"tags"`
11793}
11794
11795// MarshalJSON is the custom marshaler for ExpressRoutePort.
11796func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) {
11797	objectMap := make(map[string]interface{})
11798	if erp.ExpressRoutePortPropertiesFormat != nil {
11799		objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat
11800	}
11801	if erp.Identity != nil {
11802		objectMap["identity"] = erp.Identity
11803	}
11804	if erp.ID != nil {
11805		objectMap["id"] = erp.ID
11806	}
11807	if erp.Location != nil {
11808		objectMap["location"] = erp.Location
11809	}
11810	if erp.Tags != nil {
11811		objectMap["tags"] = erp.Tags
11812	}
11813	return json.Marshal(objectMap)
11814}
11815
11816// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct.
11817func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error {
11818	var m map[string]*json.RawMessage
11819	err := json.Unmarshal(body, &m)
11820	if err != nil {
11821		return err
11822	}
11823	for k, v := range m {
11824		switch k {
11825		case "properties":
11826			if v != nil {
11827				var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat
11828				err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat)
11829				if err != nil {
11830					return err
11831				}
11832				erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat
11833			}
11834		case "etag":
11835			if v != nil {
11836				var etag string
11837				err = json.Unmarshal(*v, &etag)
11838				if err != nil {
11839					return err
11840				}
11841				erp.Etag = &etag
11842			}
11843		case "identity":
11844			if v != nil {
11845				var identity ManagedServiceIdentity
11846				err = json.Unmarshal(*v, &identity)
11847				if err != nil {
11848					return err
11849				}
11850				erp.Identity = &identity
11851			}
11852		case "id":
11853			if v != nil {
11854				var ID string
11855				err = json.Unmarshal(*v, &ID)
11856				if err != nil {
11857					return err
11858				}
11859				erp.ID = &ID
11860			}
11861		case "name":
11862			if v != nil {
11863				var name string
11864				err = json.Unmarshal(*v, &name)
11865				if err != nil {
11866					return err
11867				}
11868				erp.Name = &name
11869			}
11870		case "type":
11871			if v != nil {
11872				var typeVar string
11873				err = json.Unmarshal(*v, &typeVar)
11874				if err != nil {
11875					return err
11876				}
11877				erp.Type = &typeVar
11878			}
11879		case "location":
11880			if v != nil {
11881				var location string
11882				err = json.Unmarshal(*v, &location)
11883				if err != nil {
11884					return err
11885				}
11886				erp.Location = &location
11887			}
11888		case "tags":
11889			if v != nil {
11890				var tags map[string]*string
11891				err = json.Unmarshal(*v, &tags)
11892				if err != nil {
11893					return err
11894				}
11895				erp.Tags = tags
11896			}
11897		}
11898	}
11899
11900	return nil
11901}
11902
11903// ExpressRoutePortListResult response for ListExpressRoutePorts API service call.
11904type ExpressRoutePortListResult struct {
11905	autorest.Response `json:"-"`
11906	// Value - A list of ExpressRoutePort resources.
11907	Value *[]ExpressRoutePort `json:"value,omitempty"`
11908	// NextLink - The URL to get the next set of results.
11909	NextLink *string `json:"nextLink,omitempty"`
11910}
11911
11912// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values.
11913type ExpressRoutePortListResultIterator struct {
11914	i    int
11915	page ExpressRoutePortListResultPage
11916}
11917
11918// NextWithContext advances to the next value.  If there was an error making
11919// the request the iterator does not advance and the error is returned.
11920func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) {
11921	if tracing.IsEnabled() {
11922		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext")
11923		defer func() {
11924			sc := -1
11925			if iter.Response().Response.Response != nil {
11926				sc = iter.Response().Response.Response.StatusCode
11927			}
11928			tracing.EndSpan(ctx, sc, err)
11929		}()
11930	}
11931	iter.i++
11932	if iter.i < len(iter.page.Values()) {
11933		return nil
11934	}
11935	err = iter.page.NextWithContext(ctx)
11936	if err != nil {
11937		iter.i--
11938		return err
11939	}
11940	iter.i = 0
11941	return nil
11942}
11943
11944// Next advances to the next value.  If there was an error making
11945// the request the iterator does not advance and the error is returned.
11946// Deprecated: Use NextWithContext() instead.
11947func (iter *ExpressRoutePortListResultIterator) Next() error {
11948	return iter.NextWithContext(context.Background())
11949}
11950
11951// NotDone returns true if the enumeration should be started or is not yet complete.
11952func (iter ExpressRoutePortListResultIterator) NotDone() bool {
11953	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11954}
11955
11956// Response returns the raw server response from the last page request.
11957func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult {
11958	return iter.page.Response()
11959}
11960
11961// Value returns the current value or a zero-initialized value if the
11962// iterator has advanced beyond the end of the collection.
11963func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort {
11964	if !iter.page.NotDone() {
11965		return ExpressRoutePort{}
11966	}
11967	return iter.page.Values()[iter.i]
11968}
11969
11970// Creates a new instance of the ExpressRoutePortListResultIterator type.
11971func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator {
11972	return ExpressRoutePortListResultIterator{page: page}
11973}
11974
11975// IsEmpty returns true if the ListResult contains no values.
11976func (erplr ExpressRoutePortListResult) IsEmpty() bool {
11977	return erplr.Value == nil || len(*erplr.Value) == 0
11978}
11979
11980// hasNextLink returns true if the NextLink is not empty.
11981func (erplr ExpressRoutePortListResult) hasNextLink() bool {
11982	return erplr.NextLink != nil && len(*erplr.NextLink) != 0
11983}
11984
11985// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results.
11986// It returns nil if no more results exist.
11987func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) {
11988	if !erplr.hasNextLink() {
11989		return nil, nil
11990	}
11991	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11992		autorest.AsJSON(),
11993		autorest.AsGet(),
11994		autorest.WithBaseURL(to.String(erplr.NextLink)))
11995}
11996
11997// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values.
11998type ExpressRoutePortListResultPage struct {
11999	fn    func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)
12000	erplr ExpressRoutePortListResult
12001}
12002
12003// NextWithContext advances to the next page of values.  If there was an error making
12004// the request the page does not advance and the error is returned.
12005func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) {
12006	if tracing.IsEnabled() {
12007		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext")
12008		defer func() {
12009			sc := -1
12010			if page.Response().Response.Response != nil {
12011				sc = page.Response().Response.Response.StatusCode
12012			}
12013			tracing.EndSpan(ctx, sc, err)
12014		}()
12015	}
12016	for {
12017		next, err := page.fn(ctx, page.erplr)
12018		if err != nil {
12019			return err
12020		}
12021		page.erplr = next
12022		if !next.hasNextLink() || !next.IsEmpty() {
12023			break
12024		}
12025	}
12026	return nil
12027}
12028
12029// Next advances to the next page of values.  If there was an error making
12030// the request the page does not advance and the error is returned.
12031// Deprecated: Use NextWithContext() instead.
12032func (page *ExpressRoutePortListResultPage) Next() error {
12033	return page.NextWithContext(context.Background())
12034}
12035
12036// NotDone returns true if the page enumeration should be started or is not yet complete.
12037func (page ExpressRoutePortListResultPage) NotDone() bool {
12038	return !page.erplr.IsEmpty()
12039}
12040
12041// Response returns the raw server response from the last page request.
12042func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult {
12043	return page.erplr
12044}
12045
12046// Values returns the slice of values for the current page or nil if there are no values.
12047func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort {
12048	if page.erplr.IsEmpty() {
12049		return nil
12050	}
12051	return *page.erplr.Value
12052}
12053
12054// Creates a new instance of the ExpressRoutePortListResultPage type.
12055func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage {
12056	return ExpressRoutePortListResultPage{
12057		fn:    getNextPage,
12058		erplr: cur,
12059	}
12060}
12061
12062// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources.
12063type ExpressRoutePortPropertiesFormat struct {
12064	// PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically.
12065	PeeringLocation *string `json:"peeringLocation,omitempty"`
12066	// BandwidthInGbps - Bandwidth of procured ports in Gbps.
12067	BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"`
12068	// ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths.
12069	ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"`
12070	// Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s).
12071	Mtu *string `json:"mtu,omitempty"`
12072	// Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ'
12073	Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"`
12074	// EtherType - READ-ONLY; Ether type of the physical port.
12075	EtherType *string `json:"etherType,omitempty"`
12076	// AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization.
12077	AllocationDate *string `json:"allocationDate,omitempty"`
12078	// Links - The set of physical links of the ExpressRoutePort resource.
12079	Links *[]ExpressRouteLink `json:"links,omitempty"`
12080	// Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource.
12081	Circuits *[]SubResource `json:"circuits,omitempty"`
12082	// ProvisioningState - READ-ONLY; The provisioning state of the express route port resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12083	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12084	// ResourceGUID - READ-ONLY; The resource GUID property of the express route port resource.
12085	ResourceGUID *string `json:"resourceGuid,omitempty"`
12086}
12087
12088// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat.
12089func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) {
12090	objectMap := make(map[string]interface{})
12091	if erppf.PeeringLocation != nil {
12092		objectMap["peeringLocation"] = erppf.PeeringLocation
12093	}
12094	if erppf.BandwidthInGbps != nil {
12095		objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps
12096	}
12097	if erppf.Encapsulation != "" {
12098		objectMap["encapsulation"] = erppf.Encapsulation
12099	}
12100	if erppf.Links != nil {
12101		objectMap["links"] = erppf.Links
12102	}
12103	return json.Marshal(objectMap)
12104}
12105
12106// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12107// long-running operation.
12108type ExpressRoutePortsCreateOrUpdateFuture struct {
12109	azure.FutureAPI
12110	// Result returns the result of the asynchronous operation.
12111	// If the operation has not completed it will return an error.
12112	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
12113}
12114
12115// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12116// operation.
12117type ExpressRoutePortsDeleteFuture struct {
12118	azure.FutureAPI
12119	// Result returns the result of the asynchronous operation.
12120	// If the operation has not completed it will return an error.
12121	Result func(ExpressRoutePortsClient) (autorest.Response, error)
12122}
12123
12124// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
12125type ExpressRoutePortsLocation struct {
12126	autorest.Response `json:"-"`
12127	// ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties.
12128	*ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"`
12129	// ID - Resource ID.
12130	ID *string `json:"id,omitempty"`
12131	// Name - READ-ONLY; Resource name.
12132	Name *string `json:"name,omitempty"`
12133	// Type - READ-ONLY; Resource type.
12134	Type *string `json:"type,omitempty"`
12135	// Location - Resource location.
12136	Location *string `json:"location,omitempty"`
12137	// Tags - Resource tags.
12138	Tags map[string]*string `json:"tags"`
12139}
12140
12141// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation.
12142func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) {
12143	objectMap := make(map[string]interface{})
12144	if erpl.ExpressRoutePortsLocationPropertiesFormat != nil {
12145		objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat
12146	}
12147	if erpl.ID != nil {
12148		objectMap["id"] = erpl.ID
12149	}
12150	if erpl.Location != nil {
12151		objectMap["location"] = erpl.Location
12152	}
12153	if erpl.Tags != nil {
12154		objectMap["tags"] = erpl.Tags
12155	}
12156	return json.Marshal(objectMap)
12157}
12158
12159// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct.
12160func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error {
12161	var m map[string]*json.RawMessage
12162	err := json.Unmarshal(body, &m)
12163	if err != nil {
12164		return err
12165	}
12166	for k, v := range m {
12167		switch k {
12168		case "properties":
12169			if v != nil {
12170				var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat
12171				err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat)
12172				if err != nil {
12173					return err
12174				}
12175				erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat
12176			}
12177		case "id":
12178			if v != nil {
12179				var ID string
12180				err = json.Unmarshal(*v, &ID)
12181				if err != nil {
12182					return err
12183				}
12184				erpl.ID = &ID
12185			}
12186		case "name":
12187			if v != nil {
12188				var name string
12189				err = json.Unmarshal(*v, &name)
12190				if err != nil {
12191					return err
12192				}
12193				erpl.Name = &name
12194			}
12195		case "type":
12196			if v != nil {
12197				var typeVar string
12198				err = json.Unmarshal(*v, &typeVar)
12199				if err != nil {
12200					return err
12201				}
12202				erpl.Type = &typeVar
12203			}
12204		case "location":
12205			if v != nil {
12206				var location string
12207				err = json.Unmarshal(*v, &location)
12208				if err != nil {
12209					return err
12210				}
12211				erpl.Location = &location
12212			}
12213		case "tags":
12214			if v != nil {
12215				var tags map[string]*string
12216				err = json.Unmarshal(*v, &tags)
12217				if err != nil {
12218					return err
12219				}
12220				erpl.Tags = tags
12221			}
12222		}
12223	}
12224
12225	return nil
12226}
12227
12228// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths.
12229type ExpressRoutePortsLocationBandwidths struct {
12230	// OfferName - READ-ONLY; Bandwidth descriptive name.
12231	OfferName *string `json:"offerName,omitempty"`
12232	// ValueInGbps - READ-ONLY; Bandwidth value in Gbps.
12233	ValueInGbps *int32 `json:"valueInGbps,omitempty"`
12234}
12235
12236// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
12237type ExpressRoutePortsLocationListResult struct {
12238	autorest.Response `json:"-"`
12239	// Value - The list of all ExpressRoutePort peering locations.
12240	Value *[]ExpressRoutePortsLocation `json:"value,omitempty"`
12241	// NextLink - The URL to get the next set of results.
12242	NextLink *string `json:"nextLink,omitempty"`
12243}
12244
12245// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of
12246// ExpressRoutePortsLocation values.
12247type ExpressRoutePortsLocationListResultIterator struct {
12248	i    int
12249	page ExpressRoutePortsLocationListResultPage
12250}
12251
12252// NextWithContext advances to the next value.  If there was an error making
12253// the request the iterator does not advance and the error is returned.
12254func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
12255	if tracing.IsEnabled() {
12256		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext")
12257		defer func() {
12258			sc := -1
12259			if iter.Response().Response.Response != nil {
12260				sc = iter.Response().Response.Response.StatusCode
12261			}
12262			tracing.EndSpan(ctx, sc, err)
12263		}()
12264	}
12265	iter.i++
12266	if iter.i < len(iter.page.Values()) {
12267		return nil
12268	}
12269	err = iter.page.NextWithContext(ctx)
12270	if err != nil {
12271		iter.i--
12272		return err
12273	}
12274	iter.i = 0
12275	return nil
12276}
12277
12278// Next advances to the next value.  If there was an error making
12279// the request the iterator does not advance and the error is returned.
12280// Deprecated: Use NextWithContext() instead.
12281func (iter *ExpressRoutePortsLocationListResultIterator) Next() error {
12282	return iter.NextWithContext(context.Background())
12283}
12284
12285// NotDone returns true if the enumeration should be started or is not yet complete.
12286func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool {
12287	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12288}
12289
12290// Response returns the raw server response from the last page request.
12291func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult {
12292	return iter.page.Response()
12293}
12294
12295// Value returns the current value or a zero-initialized value if the
12296// iterator has advanced beyond the end of the collection.
12297func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation {
12298	if !iter.page.NotDone() {
12299		return ExpressRoutePortsLocation{}
12300	}
12301	return iter.page.Values()[iter.i]
12302}
12303
12304// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type.
12305func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator {
12306	return ExpressRoutePortsLocationListResultIterator{page: page}
12307}
12308
12309// IsEmpty returns true if the ListResult contains no values.
12310func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool {
12311	return erpllr.Value == nil || len(*erpllr.Value) == 0
12312}
12313
12314// hasNextLink returns true if the NextLink is not empty.
12315func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool {
12316	return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0
12317}
12318
12319// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results.
12320// It returns nil if no more results exist.
12321func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) {
12322	if !erpllr.hasNextLink() {
12323		return nil, nil
12324	}
12325	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12326		autorest.AsJSON(),
12327		autorest.AsGet(),
12328		autorest.WithBaseURL(to.String(erpllr.NextLink)))
12329}
12330
12331// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values.
12332type ExpressRoutePortsLocationListResultPage struct {
12333	fn     func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)
12334	erpllr ExpressRoutePortsLocationListResult
12335}
12336
12337// NextWithContext advances to the next page of values.  If there was an error making
12338// the request the page does not advance and the error is returned.
12339func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) {
12340	if tracing.IsEnabled() {
12341		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext")
12342		defer func() {
12343			sc := -1
12344			if page.Response().Response.Response != nil {
12345				sc = page.Response().Response.Response.StatusCode
12346			}
12347			tracing.EndSpan(ctx, sc, err)
12348		}()
12349	}
12350	for {
12351		next, err := page.fn(ctx, page.erpllr)
12352		if err != nil {
12353			return err
12354		}
12355		page.erpllr = next
12356		if !next.hasNextLink() || !next.IsEmpty() {
12357			break
12358		}
12359	}
12360	return nil
12361}
12362
12363// Next advances to the next page of values.  If there was an error making
12364// the request the page does not advance and the error is returned.
12365// Deprecated: Use NextWithContext() instead.
12366func (page *ExpressRoutePortsLocationListResultPage) Next() error {
12367	return page.NextWithContext(context.Background())
12368}
12369
12370// NotDone returns true if the page enumeration should be started or is not yet complete.
12371func (page ExpressRoutePortsLocationListResultPage) NotDone() bool {
12372	return !page.erpllr.IsEmpty()
12373}
12374
12375// Response returns the raw server response from the last page request.
12376func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult {
12377	return page.erpllr
12378}
12379
12380// Values returns the slice of values for the current page or nil if there are no values.
12381func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation {
12382	if page.erpllr.IsEmpty() {
12383		return nil
12384	}
12385	return *page.erpllr.Value
12386}
12387
12388// Creates a new instance of the ExpressRoutePortsLocationListResultPage type.
12389func NewExpressRoutePortsLocationListResultPage(cur ExpressRoutePortsLocationListResult, getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage {
12390	return ExpressRoutePortsLocationListResultPage{
12391		fn:     getNextPage,
12392		erpllr: cur,
12393	}
12394}
12395
12396// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location
12397// resources.
12398type ExpressRoutePortsLocationPropertiesFormat struct {
12399	// Address - READ-ONLY; Address of peering location.
12400	Address *string `json:"address,omitempty"`
12401	// Contact - READ-ONLY; Contact details of peering locations.
12402	Contact *string `json:"contact,omitempty"`
12403	// AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths.
12404	AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"`
12405	// ProvisioningState - READ-ONLY; The provisioning state of the express route port location resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12406	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12407}
12408
12409// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat.
12410func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) {
12411	objectMap := make(map[string]interface{})
12412	if erplpf.AvailableBandwidths != nil {
12413		objectMap["availableBandwidths"] = erplpf.AvailableBandwidths
12414	}
12415	return json.Marshal(objectMap)
12416}
12417
12418// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
12419type ExpressRouteServiceProvider struct {
12420	// ExpressRouteServiceProviderPropertiesFormat - Properties of the express route service provider.
12421	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
12422	// ID - Resource ID.
12423	ID *string `json:"id,omitempty"`
12424	// Name - READ-ONLY; Resource name.
12425	Name *string `json:"name,omitempty"`
12426	// Type - READ-ONLY; Resource type.
12427	Type *string `json:"type,omitempty"`
12428	// Location - Resource location.
12429	Location *string `json:"location,omitempty"`
12430	// Tags - Resource tags.
12431	Tags map[string]*string `json:"tags"`
12432}
12433
12434// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
12435func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
12436	objectMap := make(map[string]interface{})
12437	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
12438		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
12439	}
12440	if ersp.ID != nil {
12441		objectMap["id"] = ersp.ID
12442	}
12443	if ersp.Location != nil {
12444		objectMap["location"] = ersp.Location
12445	}
12446	if ersp.Tags != nil {
12447		objectMap["tags"] = ersp.Tags
12448	}
12449	return json.Marshal(objectMap)
12450}
12451
12452// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
12453func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
12454	var m map[string]*json.RawMessage
12455	err := json.Unmarshal(body, &m)
12456	if err != nil {
12457		return err
12458	}
12459	for k, v := range m {
12460		switch k {
12461		case "properties":
12462			if v != nil {
12463				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
12464				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
12465				if err != nil {
12466					return err
12467				}
12468				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
12469			}
12470		case "id":
12471			if v != nil {
12472				var ID string
12473				err = json.Unmarshal(*v, &ID)
12474				if err != nil {
12475					return err
12476				}
12477				ersp.ID = &ID
12478			}
12479		case "name":
12480			if v != nil {
12481				var name string
12482				err = json.Unmarshal(*v, &name)
12483				if err != nil {
12484					return err
12485				}
12486				ersp.Name = &name
12487			}
12488		case "type":
12489			if v != nil {
12490				var typeVar string
12491				err = json.Unmarshal(*v, &typeVar)
12492				if err != nil {
12493					return err
12494				}
12495				ersp.Type = &typeVar
12496			}
12497		case "location":
12498			if v != nil {
12499				var location string
12500				err = json.Unmarshal(*v, &location)
12501				if err != nil {
12502					return err
12503				}
12504				ersp.Location = &location
12505			}
12506		case "tags":
12507			if v != nil {
12508				var tags map[string]*string
12509				err = json.Unmarshal(*v, &tags)
12510				if err != nil {
12511					return err
12512				}
12513				ersp.Tags = tags
12514			}
12515		}
12516	}
12517
12518	return nil
12519}
12520
12521// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
12522// resources.
12523type ExpressRouteServiceProviderBandwidthsOffered struct {
12524	// OfferName - The OfferName.
12525	OfferName *string `json:"offerName,omitempty"`
12526	// ValueInMbps - The ValueInMbps.
12527	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
12528}
12529
12530// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
12531type ExpressRouteServiceProviderListResult struct {
12532	autorest.Response `json:"-"`
12533	// Value - A list of ExpressRouteResourceProvider resources.
12534	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
12535	// NextLink - The URL to get the next set of results.
12536	NextLink *string `json:"nextLink,omitempty"`
12537}
12538
12539// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
12540// ExpressRouteServiceProvider values.
12541type ExpressRouteServiceProviderListResultIterator struct {
12542	i    int
12543	page ExpressRouteServiceProviderListResultPage
12544}
12545
12546// NextWithContext advances to the next value.  If there was an error making
12547// the request the iterator does not advance and the error is returned.
12548func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
12549	if tracing.IsEnabled() {
12550		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
12551		defer func() {
12552			sc := -1
12553			if iter.Response().Response.Response != nil {
12554				sc = iter.Response().Response.Response.StatusCode
12555			}
12556			tracing.EndSpan(ctx, sc, err)
12557		}()
12558	}
12559	iter.i++
12560	if iter.i < len(iter.page.Values()) {
12561		return nil
12562	}
12563	err = iter.page.NextWithContext(ctx)
12564	if err != nil {
12565		iter.i--
12566		return err
12567	}
12568	iter.i = 0
12569	return nil
12570}
12571
12572// Next advances to the next value.  If there was an error making
12573// the request the iterator does not advance and the error is returned.
12574// Deprecated: Use NextWithContext() instead.
12575func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
12576	return iter.NextWithContext(context.Background())
12577}
12578
12579// NotDone returns true if the enumeration should be started or is not yet complete.
12580func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
12581	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12582}
12583
12584// Response returns the raw server response from the last page request.
12585func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
12586	return iter.page.Response()
12587}
12588
12589// Value returns the current value or a zero-initialized value if the
12590// iterator has advanced beyond the end of the collection.
12591func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
12592	if !iter.page.NotDone() {
12593		return ExpressRouteServiceProvider{}
12594	}
12595	return iter.page.Values()[iter.i]
12596}
12597
12598// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
12599func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
12600	return ExpressRouteServiceProviderListResultIterator{page: page}
12601}
12602
12603// IsEmpty returns true if the ListResult contains no values.
12604func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
12605	return ersplr.Value == nil || len(*ersplr.Value) == 0
12606}
12607
12608// hasNextLink returns true if the NextLink is not empty.
12609func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
12610	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
12611}
12612
12613// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
12614// It returns nil if no more results exist.
12615func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
12616	if !ersplr.hasNextLink() {
12617		return nil, nil
12618	}
12619	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12620		autorest.AsJSON(),
12621		autorest.AsGet(),
12622		autorest.WithBaseURL(to.String(ersplr.NextLink)))
12623}
12624
12625// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
12626type ExpressRouteServiceProviderListResultPage struct {
12627	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
12628	ersplr ExpressRouteServiceProviderListResult
12629}
12630
12631// NextWithContext advances to the next page of values.  If there was an error making
12632// the request the page does not advance and the error is returned.
12633func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
12634	if tracing.IsEnabled() {
12635		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
12636		defer func() {
12637			sc := -1
12638			if page.Response().Response.Response != nil {
12639				sc = page.Response().Response.Response.StatusCode
12640			}
12641			tracing.EndSpan(ctx, sc, err)
12642		}()
12643	}
12644	for {
12645		next, err := page.fn(ctx, page.ersplr)
12646		if err != nil {
12647			return err
12648		}
12649		page.ersplr = next
12650		if !next.hasNextLink() || !next.IsEmpty() {
12651			break
12652		}
12653	}
12654	return nil
12655}
12656
12657// Next advances to the next page of values.  If there was an error making
12658// the request the page does not advance and the error is returned.
12659// Deprecated: Use NextWithContext() instead.
12660func (page *ExpressRouteServiceProviderListResultPage) Next() error {
12661	return page.NextWithContext(context.Background())
12662}
12663
12664// NotDone returns true if the page enumeration should be started or is not yet complete.
12665func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
12666	return !page.ersplr.IsEmpty()
12667}
12668
12669// Response returns the raw server response from the last page request.
12670func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
12671	return page.ersplr
12672}
12673
12674// Values returns the slice of values for the current page or nil if there are no values.
12675func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
12676	if page.ersplr.IsEmpty() {
12677		return nil
12678	}
12679	return *page.ersplr.Value
12680}
12681
12682// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
12683func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
12684	return ExpressRouteServiceProviderListResultPage{
12685		fn:     getNextPage,
12686		ersplr: cur,
12687	}
12688}
12689
12690// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
12691type ExpressRouteServiceProviderPropertiesFormat struct {
12692	// PeeringLocations - A list of peering locations.
12693	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
12694	// BandwidthsOffered - A list of bandwidths offered.
12695	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
12696	// ProvisioningState - READ-ONLY; The provisioning state of the express route service provider resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12697	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12698}
12699
12700// MarshalJSON is the custom marshaler for ExpressRouteServiceProviderPropertiesFormat.
12701func (ersppf ExpressRouteServiceProviderPropertiesFormat) MarshalJSON() ([]byte, error) {
12702	objectMap := make(map[string]interface{})
12703	if ersppf.PeeringLocations != nil {
12704		objectMap["peeringLocations"] = ersppf.PeeringLocations
12705	}
12706	if ersppf.BandwidthsOffered != nil {
12707		objectMap["bandwidthsOffered"] = ersppf.BandwidthsOffered
12708	}
12709	return json.Marshal(objectMap)
12710}
12711
12712// FirewallPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12713// long-running operation.
12714type FirewallPoliciesCreateOrUpdateFuture struct {
12715	azure.FutureAPI
12716	// Result returns the result of the asynchronous operation.
12717	// If the operation has not completed it will return an error.
12718	Result func(FirewallPoliciesClient) (FirewallPolicy, error)
12719}
12720
12721// FirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12722// operation.
12723type FirewallPoliciesDeleteFuture struct {
12724	azure.FutureAPI
12725	// Result returns the result of the asynchronous operation.
12726	// If the operation has not completed it will return an error.
12727	Result func(FirewallPoliciesClient) (autorest.Response, error)
12728}
12729
12730// FirewallPolicy firewallPolicy Resource.
12731type FirewallPolicy struct {
12732	autorest.Response `json:"-"`
12733	// FirewallPolicyPropertiesFormat - Properties of the firewall policy.
12734	*FirewallPolicyPropertiesFormat `json:"properties,omitempty"`
12735	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12736	Etag *string `json:"etag,omitempty"`
12737	// ID - Resource ID.
12738	ID *string `json:"id,omitempty"`
12739	// Name - READ-ONLY; Resource name.
12740	Name *string `json:"name,omitempty"`
12741	// Type - READ-ONLY; Resource type.
12742	Type *string `json:"type,omitempty"`
12743	// Location - Resource location.
12744	Location *string `json:"location,omitempty"`
12745	// Tags - Resource tags.
12746	Tags map[string]*string `json:"tags"`
12747}
12748
12749// MarshalJSON is the custom marshaler for FirewallPolicy.
12750func (fp FirewallPolicy) MarshalJSON() ([]byte, error) {
12751	objectMap := make(map[string]interface{})
12752	if fp.FirewallPolicyPropertiesFormat != nil {
12753		objectMap["properties"] = fp.FirewallPolicyPropertiesFormat
12754	}
12755	if fp.ID != nil {
12756		objectMap["id"] = fp.ID
12757	}
12758	if fp.Location != nil {
12759		objectMap["location"] = fp.Location
12760	}
12761	if fp.Tags != nil {
12762		objectMap["tags"] = fp.Tags
12763	}
12764	return json.Marshal(objectMap)
12765}
12766
12767// UnmarshalJSON is the custom unmarshaler for FirewallPolicy struct.
12768func (fp *FirewallPolicy) UnmarshalJSON(body []byte) error {
12769	var m map[string]*json.RawMessage
12770	err := json.Unmarshal(body, &m)
12771	if err != nil {
12772		return err
12773	}
12774	for k, v := range m {
12775		switch k {
12776		case "properties":
12777			if v != nil {
12778				var firewallPolicyPropertiesFormat FirewallPolicyPropertiesFormat
12779				err = json.Unmarshal(*v, &firewallPolicyPropertiesFormat)
12780				if err != nil {
12781					return err
12782				}
12783				fp.FirewallPolicyPropertiesFormat = &firewallPolicyPropertiesFormat
12784			}
12785		case "etag":
12786			if v != nil {
12787				var etag string
12788				err = json.Unmarshal(*v, &etag)
12789				if err != nil {
12790					return err
12791				}
12792				fp.Etag = &etag
12793			}
12794		case "id":
12795			if v != nil {
12796				var ID string
12797				err = json.Unmarshal(*v, &ID)
12798				if err != nil {
12799					return err
12800				}
12801				fp.ID = &ID
12802			}
12803		case "name":
12804			if v != nil {
12805				var name string
12806				err = json.Unmarshal(*v, &name)
12807				if err != nil {
12808					return err
12809				}
12810				fp.Name = &name
12811			}
12812		case "type":
12813			if v != nil {
12814				var typeVar string
12815				err = json.Unmarshal(*v, &typeVar)
12816				if err != nil {
12817					return err
12818				}
12819				fp.Type = &typeVar
12820			}
12821		case "location":
12822			if v != nil {
12823				var location string
12824				err = json.Unmarshal(*v, &location)
12825				if err != nil {
12826					return err
12827				}
12828				fp.Location = &location
12829			}
12830		case "tags":
12831			if v != nil {
12832				var tags map[string]*string
12833				err = json.Unmarshal(*v, &tags)
12834				if err != nil {
12835					return err
12836				}
12837				fp.Tags = tags
12838			}
12839		}
12840	}
12841
12842	return nil
12843}
12844
12845// FirewallPolicyFilterRule firewall Policy Filter Rule.
12846type FirewallPolicyFilterRule struct {
12847	// Action - The action type of a Filter rule.
12848	Action *FirewallPolicyFilterRuleAction `json:"action,omitempty"`
12849	// RuleConditions - Collection of rule conditions used by a rule.
12850	RuleConditions *[]BasicFirewallPolicyRuleCondition `json:"ruleConditions,omitempty"`
12851	// Name - The name of the rule.
12852	Name *string `json:"name,omitempty"`
12853	// Priority - Priority of the Firewall Policy Rule resource.
12854	Priority *int32 `json:"priority,omitempty"`
12855	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule'
12856	RuleType RuleType `json:"ruleType,omitempty"`
12857}
12858
12859// MarshalJSON is the custom marshaler for FirewallPolicyFilterRule.
12860func (fpfr FirewallPolicyFilterRule) MarshalJSON() ([]byte, error) {
12861	fpfr.RuleType = RuleTypeFirewallPolicyFilterRule
12862	objectMap := make(map[string]interface{})
12863	if fpfr.Action != nil {
12864		objectMap["action"] = fpfr.Action
12865	}
12866	if fpfr.RuleConditions != nil {
12867		objectMap["ruleConditions"] = fpfr.RuleConditions
12868	}
12869	if fpfr.Name != nil {
12870		objectMap["name"] = fpfr.Name
12871	}
12872	if fpfr.Priority != nil {
12873		objectMap["priority"] = fpfr.Priority
12874	}
12875	if fpfr.RuleType != "" {
12876		objectMap["ruleType"] = fpfr.RuleType
12877	}
12878	return json.Marshal(objectMap)
12879}
12880
12881// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
12882func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) {
12883	return nil, false
12884}
12885
12886// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
12887func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) {
12888	return &fpfr, true
12889}
12890
12891// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
12892func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
12893	return nil, false
12894}
12895
12896// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
12897func (fpfr FirewallPolicyFilterRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
12898	return &fpfr, true
12899}
12900
12901// UnmarshalJSON is the custom unmarshaler for FirewallPolicyFilterRule struct.
12902func (fpfr *FirewallPolicyFilterRule) UnmarshalJSON(body []byte) error {
12903	var m map[string]*json.RawMessage
12904	err := json.Unmarshal(body, &m)
12905	if err != nil {
12906		return err
12907	}
12908	for k, v := range m {
12909		switch k {
12910		case "action":
12911			if v != nil {
12912				var action FirewallPolicyFilterRuleAction
12913				err = json.Unmarshal(*v, &action)
12914				if err != nil {
12915					return err
12916				}
12917				fpfr.Action = &action
12918			}
12919		case "ruleConditions":
12920			if v != nil {
12921				ruleConditions, err := unmarshalBasicFirewallPolicyRuleConditionArray(*v)
12922				if err != nil {
12923					return err
12924				}
12925				fpfr.RuleConditions = &ruleConditions
12926			}
12927		case "name":
12928			if v != nil {
12929				var name string
12930				err = json.Unmarshal(*v, &name)
12931				if err != nil {
12932					return err
12933				}
12934				fpfr.Name = &name
12935			}
12936		case "priority":
12937			if v != nil {
12938				var priority int32
12939				err = json.Unmarshal(*v, &priority)
12940				if err != nil {
12941					return err
12942				}
12943				fpfr.Priority = &priority
12944			}
12945		case "ruleType":
12946			if v != nil {
12947				var ruleType RuleType
12948				err = json.Unmarshal(*v, &ruleType)
12949				if err != nil {
12950					return err
12951				}
12952				fpfr.RuleType = ruleType
12953			}
12954		}
12955	}
12956
12957	return nil
12958}
12959
12960// FirewallPolicyFilterRuleAction properties of the FirewallPolicyFilterRuleAction.
12961type FirewallPolicyFilterRuleAction struct {
12962	// Type - The type of action. Possible values include: 'FirewallPolicyFilterRuleActionTypeAllow', 'FirewallPolicyFilterRuleActionTypeDeny'
12963	Type FirewallPolicyFilterRuleActionType `json:"type,omitempty"`
12964}
12965
12966// FirewallPolicyListResult response for ListFirewallPolicies API service call.
12967type FirewallPolicyListResult struct {
12968	autorest.Response `json:"-"`
12969	// Value - List of Firewall Policies in a resource group.
12970	Value *[]FirewallPolicy `json:"value,omitempty"`
12971	// NextLink - URL to get the next set of results.
12972	NextLink *string `json:"nextLink,omitempty"`
12973}
12974
12975// FirewallPolicyListResultIterator provides access to a complete listing of FirewallPolicy values.
12976type FirewallPolicyListResultIterator struct {
12977	i    int
12978	page FirewallPolicyListResultPage
12979}
12980
12981// NextWithContext advances to the next value.  If there was an error making
12982// the request the iterator does not advance and the error is returned.
12983func (iter *FirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
12984	if tracing.IsEnabled() {
12985		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultIterator.NextWithContext")
12986		defer func() {
12987			sc := -1
12988			if iter.Response().Response.Response != nil {
12989				sc = iter.Response().Response.Response.StatusCode
12990			}
12991			tracing.EndSpan(ctx, sc, err)
12992		}()
12993	}
12994	iter.i++
12995	if iter.i < len(iter.page.Values()) {
12996		return nil
12997	}
12998	err = iter.page.NextWithContext(ctx)
12999	if err != nil {
13000		iter.i--
13001		return err
13002	}
13003	iter.i = 0
13004	return nil
13005}
13006
13007// Next advances to the next value.  If there was an error making
13008// the request the iterator does not advance and the error is returned.
13009// Deprecated: Use NextWithContext() instead.
13010func (iter *FirewallPolicyListResultIterator) Next() error {
13011	return iter.NextWithContext(context.Background())
13012}
13013
13014// NotDone returns true if the enumeration should be started or is not yet complete.
13015func (iter FirewallPolicyListResultIterator) NotDone() bool {
13016	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13017}
13018
13019// Response returns the raw server response from the last page request.
13020func (iter FirewallPolicyListResultIterator) Response() FirewallPolicyListResult {
13021	return iter.page.Response()
13022}
13023
13024// Value returns the current value or a zero-initialized value if the
13025// iterator has advanced beyond the end of the collection.
13026func (iter FirewallPolicyListResultIterator) Value() FirewallPolicy {
13027	if !iter.page.NotDone() {
13028		return FirewallPolicy{}
13029	}
13030	return iter.page.Values()[iter.i]
13031}
13032
13033// Creates a new instance of the FirewallPolicyListResultIterator type.
13034func NewFirewallPolicyListResultIterator(page FirewallPolicyListResultPage) FirewallPolicyListResultIterator {
13035	return FirewallPolicyListResultIterator{page: page}
13036}
13037
13038// IsEmpty returns true if the ListResult contains no values.
13039func (fplr FirewallPolicyListResult) IsEmpty() bool {
13040	return fplr.Value == nil || len(*fplr.Value) == 0
13041}
13042
13043// hasNextLink returns true if the NextLink is not empty.
13044func (fplr FirewallPolicyListResult) hasNextLink() bool {
13045	return fplr.NextLink != nil && len(*fplr.NextLink) != 0
13046}
13047
13048// firewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
13049// It returns nil if no more results exist.
13050func (fplr FirewallPolicyListResult) firewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
13051	if !fplr.hasNextLink() {
13052		return nil, nil
13053	}
13054	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13055		autorest.AsJSON(),
13056		autorest.AsGet(),
13057		autorest.WithBaseURL(to.String(fplr.NextLink)))
13058}
13059
13060// FirewallPolicyListResultPage contains a page of FirewallPolicy values.
13061type FirewallPolicyListResultPage struct {
13062	fn   func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)
13063	fplr FirewallPolicyListResult
13064}
13065
13066// NextWithContext advances to the next page of values.  If there was an error making
13067// the request the page does not advance and the error is returned.
13068func (page *FirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
13069	if tracing.IsEnabled() {
13070		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultPage.NextWithContext")
13071		defer func() {
13072			sc := -1
13073			if page.Response().Response.Response != nil {
13074				sc = page.Response().Response.Response.StatusCode
13075			}
13076			tracing.EndSpan(ctx, sc, err)
13077		}()
13078	}
13079	for {
13080		next, err := page.fn(ctx, page.fplr)
13081		if err != nil {
13082			return err
13083		}
13084		page.fplr = next
13085		if !next.hasNextLink() || !next.IsEmpty() {
13086			break
13087		}
13088	}
13089	return nil
13090}
13091
13092// Next advances to the next page of values.  If there was an error making
13093// the request the page does not advance and the error is returned.
13094// Deprecated: Use NextWithContext() instead.
13095func (page *FirewallPolicyListResultPage) Next() error {
13096	return page.NextWithContext(context.Background())
13097}
13098
13099// NotDone returns true if the page enumeration should be started or is not yet complete.
13100func (page FirewallPolicyListResultPage) NotDone() bool {
13101	return !page.fplr.IsEmpty()
13102}
13103
13104// Response returns the raw server response from the last page request.
13105func (page FirewallPolicyListResultPage) Response() FirewallPolicyListResult {
13106	return page.fplr
13107}
13108
13109// Values returns the slice of values for the current page or nil if there are no values.
13110func (page FirewallPolicyListResultPage) Values() []FirewallPolicy {
13111	if page.fplr.IsEmpty() {
13112		return nil
13113	}
13114	return *page.fplr.Value
13115}
13116
13117// Creates a new instance of the FirewallPolicyListResultPage type.
13118func NewFirewallPolicyListResultPage(cur FirewallPolicyListResult, getNextPage func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)) FirewallPolicyListResultPage {
13119	return FirewallPolicyListResultPage{
13120		fn:   getNextPage,
13121		fplr: cur,
13122	}
13123}
13124
13125// FirewallPolicyNatRule firewall Policy NAT Rule.
13126type FirewallPolicyNatRule struct {
13127	// Action - The action type of a Nat rule.
13128	Action *FirewallPolicyNatRuleAction `json:"action,omitempty"`
13129	// TranslatedAddress - The translated address for this NAT rule.
13130	TranslatedAddress *string `json:"translatedAddress,omitempty"`
13131	// TranslatedPort - The translated port for this NAT rule.
13132	TranslatedPort *string `json:"translatedPort,omitempty"`
13133	// RuleCondition - The match conditions for incoming traffic.
13134	RuleCondition BasicFirewallPolicyRuleCondition `json:"ruleCondition,omitempty"`
13135	// Name - The name of the rule.
13136	Name *string `json:"name,omitempty"`
13137	// Priority - Priority of the Firewall Policy Rule resource.
13138	Priority *int32 `json:"priority,omitempty"`
13139	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule'
13140	RuleType RuleType `json:"ruleType,omitempty"`
13141}
13142
13143// MarshalJSON is the custom marshaler for FirewallPolicyNatRule.
13144func (fpnr FirewallPolicyNatRule) MarshalJSON() ([]byte, error) {
13145	fpnr.RuleType = RuleTypeFirewallPolicyNatRule
13146	objectMap := make(map[string]interface{})
13147	if fpnr.Action != nil {
13148		objectMap["action"] = fpnr.Action
13149	}
13150	if fpnr.TranslatedAddress != nil {
13151		objectMap["translatedAddress"] = fpnr.TranslatedAddress
13152	}
13153	if fpnr.TranslatedPort != nil {
13154		objectMap["translatedPort"] = fpnr.TranslatedPort
13155	}
13156	objectMap["ruleCondition"] = fpnr.RuleCondition
13157	if fpnr.Name != nil {
13158		objectMap["name"] = fpnr.Name
13159	}
13160	if fpnr.Priority != nil {
13161		objectMap["priority"] = fpnr.Priority
13162	}
13163	if fpnr.RuleType != "" {
13164		objectMap["ruleType"] = fpnr.RuleType
13165	}
13166	return json.Marshal(objectMap)
13167}
13168
13169// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
13170func (fpnr FirewallPolicyNatRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) {
13171	return &fpnr, true
13172}
13173
13174// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
13175func (fpnr FirewallPolicyNatRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) {
13176	return nil, false
13177}
13178
13179// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
13180func (fpnr FirewallPolicyNatRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
13181	return nil, false
13182}
13183
13184// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
13185func (fpnr FirewallPolicyNatRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
13186	return &fpnr, true
13187}
13188
13189// UnmarshalJSON is the custom unmarshaler for FirewallPolicyNatRule struct.
13190func (fpnr *FirewallPolicyNatRule) UnmarshalJSON(body []byte) error {
13191	var m map[string]*json.RawMessage
13192	err := json.Unmarshal(body, &m)
13193	if err != nil {
13194		return err
13195	}
13196	for k, v := range m {
13197		switch k {
13198		case "action":
13199			if v != nil {
13200				var action FirewallPolicyNatRuleAction
13201				err = json.Unmarshal(*v, &action)
13202				if err != nil {
13203					return err
13204				}
13205				fpnr.Action = &action
13206			}
13207		case "translatedAddress":
13208			if v != nil {
13209				var translatedAddress string
13210				err = json.Unmarshal(*v, &translatedAddress)
13211				if err != nil {
13212					return err
13213				}
13214				fpnr.TranslatedAddress = &translatedAddress
13215			}
13216		case "translatedPort":
13217			if v != nil {
13218				var translatedPort string
13219				err = json.Unmarshal(*v, &translatedPort)
13220				if err != nil {
13221					return err
13222				}
13223				fpnr.TranslatedPort = &translatedPort
13224			}
13225		case "ruleCondition":
13226			if v != nil {
13227				ruleCondition, err := unmarshalBasicFirewallPolicyRuleCondition(*v)
13228				if err != nil {
13229					return err
13230				}
13231				fpnr.RuleCondition = ruleCondition
13232			}
13233		case "name":
13234			if v != nil {
13235				var name string
13236				err = json.Unmarshal(*v, &name)
13237				if err != nil {
13238					return err
13239				}
13240				fpnr.Name = &name
13241			}
13242		case "priority":
13243			if v != nil {
13244				var priority int32
13245				err = json.Unmarshal(*v, &priority)
13246				if err != nil {
13247					return err
13248				}
13249				fpnr.Priority = &priority
13250			}
13251		case "ruleType":
13252			if v != nil {
13253				var ruleType RuleType
13254				err = json.Unmarshal(*v, &ruleType)
13255				if err != nil {
13256					return err
13257				}
13258				fpnr.RuleType = ruleType
13259			}
13260		}
13261	}
13262
13263	return nil
13264}
13265
13266// FirewallPolicyNatRuleAction properties of the FirewallPolicyNatRuleAction.
13267type FirewallPolicyNatRuleAction struct {
13268	// Type - The type of action. Possible values include: 'DNAT'
13269	Type FirewallPolicyNatRuleActionType `json:"type,omitempty"`
13270}
13271
13272// FirewallPolicyPropertiesFormat firewall Policy definition.
13273type FirewallPolicyPropertiesFormat struct {
13274	// RuleGroups - READ-ONLY; List of references to FirewallPolicyRuleGroups.
13275	RuleGroups *[]SubResource `json:"ruleGroups,omitempty"`
13276	// ProvisioningState - READ-ONLY; The provisioning state of the firewall policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
13277	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13278	// BasePolicy - The parent firewall policy from which rules are inherited.
13279	BasePolicy *SubResource `json:"basePolicy,omitempty"`
13280	// Firewalls - READ-ONLY; List of references to Azure Firewalls that this Firewall Policy is associated with.
13281	Firewalls *[]SubResource `json:"firewalls,omitempty"`
13282	// ChildPolicies - READ-ONLY; List of references to Child Firewall Policies.
13283	ChildPolicies *[]SubResource `json:"childPolicies,omitempty"`
13284	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
13285	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
13286}
13287
13288// MarshalJSON is the custom marshaler for FirewallPolicyPropertiesFormat.
13289func (fppf FirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
13290	objectMap := make(map[string]interface{})
13291	if fppf.BasePolicy != nil {
13292		objectMap["basePolicy"] = fppf.BasePolicy
13293	}
13294	if fppf.ThreatIntelMode != "" {
13295		objectMap["threatIntelMode"] = fppf.ThreatIntelMode
13296	}
13297	return json.Marshal(objectMap)
13298}
13299
13300// BasicFirewallPolicyRule properties of the rule.
13301type BasicFirewallPolicyRule interface {
13302	AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool)
13303	AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool)
13304	AsFirewallPolicyRule() (*FirewallPolicyRule, bool)
13305}
13306
13307// FirewallPolicyRule properties of the rule.
13308type FirewallPolicyRule struct {
13309	// Name - The name of the rule.
13310	Name *string `json:"name,omitempty"`
13311	// Priority - Priority of the Firewall Policy Rule resource.
13312	Priority *int32 `json:"priority,omitempty"`
13313	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule'
13314	RuleType RuleType `json:"ruleType,omitempty"`
13315}
13316
13317func unmarshalBasicFirewallPolicyRule(body []byte) (BasicFirewallPolicyRule, error) {
13318	var m map[string]interface{}
13319	err := json.Unmarshal(body, &m)
13320	if err != nil {
13321		return nil, err
13322	}
13323
13324	switch m["ruleType"] {
13325	case string(RuleTypeFirewallPolicyNatRule):
13326		var fpnr FirewallPolicyNatRule
13327		err := json.Unmarshal(body, &fpnr)
13328		return fpnr, err
13329	case string(RuleTypeFirewallPolicyFilterRule):
13330		var fpfr FirewallPolicyFilterRule
13331		err := json.Unmarshal(body, &fpfr)
13332		return fpfr, err
13333	default:
13334		var fpr FirewallPolicyRule
13335		err := json.Unmarshal(body, &fpr)
13336		return fpr, err
13337	}
13338}
13339func unmarshalBasicFirewallPolicyRuleArray(body []byte) ([]BasicFirewallPolicyRule, error) {
13340	var rawMessages []*json.RawMessage
13341	err := json.Unmarshal(body, &rawMessages)
13342	if err != nil {
13343		return nil, err
13344	}
13345
13346	fprArray := make([]BasicFirewallPolicyRule, len(rawMessages))
13347
13348	for index, rawMessage := range rawMessages {
13349		fpr, err := unmarshalBasicFirewallPolicyRule(*rawMessage)
13350		if err != nil {
13351			return nil, err
13352		}
13353		fprArray[index] = fpr
13354	}
13355	return fprArray, nil
13356}
13357
13358// MarshalJSON is the custom marshaler for FirewallPolicyRule.
13359func (fpr FirewallPolicyRule) MarshalJSON() ([]byte, error) {
13360	fpr.RuleType = RuleTypeFirewallPolicyRule
13361	objectMap := make(map[string]interface{})
13362	if fpr.Name != nil {
13363		objectMap["name"] = fpr.Name
13364	}
13365	if fpr.Priority != nil {
13366		objectMap["priority"] = fpr.Priority
13367	}
13368	if fpr.RuleType != "" {
13369		objectMap["ruleType"] = fpr.RuleType
13370	}
13371	return json.Marshal(objectMap)
13372}
13373
13374// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
13375func (fpr FirewallPolicyRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) {
13376	return nil, false
13377}
13378
13379// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
13380func (fpr FirewallPolicyRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) {
13381	return nil, false
13382}
13383
13384// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
13385func (fpr FirewallPolicyRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
13386	return &fpr, true
13387}
13388
13389// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
13390func (fpr FirewallPolicyRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
13391	return &fpr, true
13392}
13393
13394// BasicFirewallPolicyRuleCondition properties of a rule.
13395type BasicFirewallPolicyRuleCondition interface {
13396	AsApplicationRuleCondition() (*ApplicationRuleCondition, bool)
13397	AsNatRuleCondition() (*NatRuleCondition, bool)
13398	AsRuleCondition() (*RuleCondition, bool)
13399	AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool)
13400}
13401
13402// FirewallPolicyRuleCondition properties of a rule.
13403type FirewallPolicyRuleCondition struct {
13404	// Name - Name of the rule condition.
13405	Name *string `json:"name,omitempty"`
13406	// Description - Description of the rule condition.
13407	Description *string `json:"description,omitempty"`
13408	// RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNatRuleCondition', 'RuleConditionTypeNetworkRuleCondition'
13409	RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"`
13410}
13411
13412func unmarshalBasicFirewallPolicyRuleCondition(body []byte) (BasicFirewallPolicyRuleCondition, error) {
13413	var m map[string]interface{}
13414	err := json.Unmarshal(body, &m)
13415	if err != nil {
13416		return nil, err
13417	}
13418
13419	switch m["ruleConditionType"] {
13420	case string(RuleConditionTypeApplicationRuleCondition):
13421		var arc ApplicationRuleCondition
13422		err := json.Unmarshal(body, &arc)
13423		return arc, err
13424	case string(RuleConditionTypeNatRuleCondition):
13425		var nrc NatRuleCondition
13426		err := json.Unmarshal(body, &nrc)
13427		return nrc, err
13428	case string(RuleConditionTypeNetworkRuleCondition):
13429		var rc RuleCondition
13430		err := json.Unmarshal(body, &rc)
13431		return rc, err
13432	default:
13433		var fprc FirewallPolicyRuleCondition
13434		err := json.Unmarshal(body, &fprc)
13435		return fprc, err
13436	}
13437}
13438func unmarshalBasicFirewallPolicyRuleConditionArray(body []byte) ([]BasicFirewallPolicyRuleCondition, error) {
13439	var rawMessages []*json.RawMessage
13440	err := json.Unmarshal(body, &rawMessages)
13441	if err != nil {
13442		return nil, err
13443	}
13444
13445	fprcArray := make([]BasicFirewallPolicyRuleCondition, len(rawMessages))
13446
13447	for index, rawMessage := range rawMessages {
13448		fprc, err := unmarshalBasicFirewallPolicyRuleCondition(*rawMessage)
13449		if err != nil {
13450			return nil, err
13451		}
13452		fprcArray[index] = fprc
13453	}
13454	return fprcArray, nil
13455}
13456
13457// MarshalJSON is the custom marshaler for FirewallPolicyRuleCondition.
13458func (fprc FirewallPolicyRuleCondition) MarshalJSON() ([]byte, error) {
13459	fprc.RuleConditionType = RuleConditionTypeFirewallPolicyRuleCondition
13460	objectMap := make(map[string]interface{})
13461	if fprc.Name != nil {
13462		objectMap["name"] = fprc.Name
13463	}
13464	if fprc.Description != nil {
13465		objectMap["description"] = fprc.Description
13466	}
13467	if fprc.RuleConditionType != "" {
13468		objectMap["ruleConditionType"] = fprc.RuleConditionType
13469	}
13470	return json.Marshal(objectMap)
13471}
13472
13473// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
13474func (fprc FirewallPolicyRuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) {
13475	return nil, false
13476}
13477
13478// AsNatRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
13479func (fprc FirewallPolicyRuleCondition) AsNatRuleCondition() (*NatRuleCondition, bool) {
13480	return nil, false
13481}
13482
13483// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
13484func (fprc FirewallPolicyRuleCondition) AsRuleCondition() (*RuleCondition, bool) {
13485	return nil, false
13486}
13487
13488// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
13489func (fprc FirewallPolicyRuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) {
13490	return &fprc, true
13491}
13492
13493// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
13494func (fprc FirewallPolicyRuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) {
13495	return &fprc, true
13496}
13497
13498// FirewallPolicyRuleConditionApplicationProtocol properties of the application rule protocol.
13499type FirewallPolicyRuleConditionApplicationProtocol struct {
13500	// ProtocolType - Protocol type. Possible values include: 'FirewallPolicyRuleConditionApplicationProtocolTypeHTTP', 'FirewallPolicyRuleConditionApplicationProtocolTypeHTTPS'
13501	ProtocolType FirewallPolicyRuleConditionApplicationProtocolType `json:"protocolType,omitempty"`
13502	// Port - Port number for the protocol, cannot be greater than 64000.
13503	Port *int32 `json:"port,omitempty"`
13504}
13505
13506// FirewallPolicyRuleGroup rule Group resource.
13507type FirewallPolicyRuleGroup struct {
13508	autorest.Response `json:"-"`
13509	// FirewallPolicyRuleGroupProperties - The properties of the firewall policy rule group.
13510	*FirewallPolicyRuleGroupProperties `json:"properties,omitempty"`
13511	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13512	Name *string `json:"name,omitempty"`
13513	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
13514	Etag *string `json:"etag,omitempty"`
13515	// Type - READ-ONLY; Rule Group type.
13516	Type *string `json:"type,omitempty"`
13517	// ID - Resource ID.
13518	ID *string `json:"id,omitempty"`
13519}
13520
13521// MarshalJSON is the custom marshaler for FirewallPolicyRuleGroup.
13522func (fprg FirewallPolicyRuleGroup) MarshalJSON() ([]byte, error) {
13523	objectMap := make(map[string]interface{})
13524	if fprg.FirewallPolicyRuleGroupProperties != nil {
13525		objectMap["properties"] = fprg.FirewallPolicyRuleGroupProperties
13526	}
13527	if fprg.Name != nil {
13528		objectMap["name"] = fprg.Name
13529	}
13530	if fprg.ID != nil {
13531		objectMap["id"] = fprg.ID
13532	}
13533	return json.Marshal(objectMap)
13534}
13535
13536// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleGroup struct.
13537func (fprg *FirewallPolicyRuleGroup) UnmarshalJSON(body []byte) error {
13538	var m map[string]*json.RawMessage
13539	err := json.Unmarshal(body, &m)
13540	if err != nil {
13541		return err
13542	}
13543	for k, v := range m {
13544		switch k {
13545		case "properties":
13546			if v != nil {
13547				var firewallPolicyRuleGroupProperties FirewallPolicyRuleGroupProperties
13548				err = json.Unmarshal(*v, &firewallPolicyRuleGroupProperties)
13549				if err != nil {
13550					return err
13551				}
13552				fprg.FirewallPolicyRuleGroupProperties = &firewallPolicyRuleGroupProperties
13553			}
13554		case "name":
13555			if v != nil {
13556				var name string
13557				err = json.Unmarshal(*v, &name)
13558				if err != nil {
13559					return err
13560				}
13561				fprg.Name = &name
13562			}
13563		case "etag":
13564			if v != nil {
13565				var etag string
13566				err = json.Unmarshal(*v, &etag)
13567				if err != nil {
13568					return err
13569				}
13570				fprg.Etag = &etag
13571			}
13572		case "type":
13573			if v != nil {
13574				var typeVar string
13575				err = json.Unmarshal(*v, &typeVar)
13576				if err != nil {
13577					return err
13578				}
13579				fprg.Type = &typeVar
13580			}
13581		case "id":
13582			if v != nil {
13583				var ID string
13584				err = json.Unmarshal(*v, &ID)
13585				if err != nil {
13586					return err
13587				}
13588				fprg.ID = &ID
13589			}
13590		}
13591	}
13592
13593	return nil
13594}
13595
13596// FirewallPolicyRuleGroupListResult response for ListFirewallPolicyRuleGroups API service call.
13597type FirewallPolicyRuleGroupListResult struct {
13598	autorest.Response `json:"-"`
13599	// Value - List of FirewallPolicyRuleGroups in a FirewallPolicy.
13600	Value *[]FirewallPolicyRuleGroup `json:"value,omitempty"`
13601	// NextLink - URL to get the next set of results.
13602	NextLink *string `json:"nextLink,omitempty"`
13603}
13604
13605// FirewallPolicyRuleGroupListResultIterator provides access to a complete listing of
13606// FirewallPolicyRuleGroup values.
13607type FirewallPolicyRuleGroupListResultIterator struct {
13608	i    int
13609	page FirewallPolicyRuleGroupListResultPage
13610}
13611
13612// NextWithContext advances to the next value.  If there was an error making
13613// the request the iterator does not advance and the error is returned.
13614func (iter *FirewallPolicyRuleGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
13615	if tracing.IsEnabled() {
13616		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupListResultIterator.NextWithContext")
13617		defer func() {
13618			sc := -1
13619			if iter.Response().Response.Response != nil {
13620				sc = iter.Response().Response.Response.StatusCode
13621			}
13622			tracing.EndSpan(ctx, sc, err)
13623		}()
13624	}
13625	iter.i++
13626	if iter.i < len(iter.page.Values()) {
13627		return nil
13628	}
13629	err = iter.page.NextWithContext(ctx)
13630	if err != nil {
13631		iter.i--
13632		return err
13633	}
13634	iter.i = 0
13635	return nil
13636}
13637
13638// Next advances to the next value.  If there was an error making
13639// the request the iterator does not advance and the error is returned.
13640// Deprecated: Use NextWithContext() instead.
13641func (iter *FirewallPolicyRuleGroupListResultIterator) Next() error {
13642	return iter.NextWithContext(context.Background())
13643}
13644
13645// NotDone returns true if the enumeration should be started or is not yet complete.
13646func (iter FirewallPolicyRuleGroupListResultIterator) NotDone() bool {
13647	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13648}
13649
13650// Response returns the raw server response from the last page request.
13651func (iter FirewallPolicyRuleGroupListResultIterator) Response() FirewallPolicyRuleGroupListResult {
13652	return iter.page.Response()
13653}
13654
13655// Value returns the current value or a zero-initialized value if the
13656// iterator has advanced beyond the end of the collection.
13657func (iter FirewallPolicyRuleGroupListResultIterator) Value() FirewallPolicyRuleGroup {
13658	if !iter.page.NotDone() {
13659		return FirewallPolicyRuleGroup{}
13660	}
13661	return iter.page.Values()[iter.i]
13662}
13663
13664// Creates a new instance of the FirewallPolicyRuleGroupListResultIterator type.
13665func NewFirewallPolicyRuleGroupListResultIterator(page FirewallPolicyRuleGroupListResultPage) FirewallPolicyRuleGroupListResultIterator {
13666	return FirewallPolicyRuleGroupListResultIterator{page: page}
13667}
13668
13669// IsEmpty returns true if the ListResult contains no values.
13670func (fprglr FirewallPolicyRuleGroupListResult) IsEmpty() bool {
13671	return fprglr.Value == nil || len(*fprglr.Value) == 0
13672}
13673
13674// hasNextLink returns true if the NextLink is not empty.
13675func (fprglr FirewallPolicyRuleGroupListResult) hasNextLink() bool {
13676	return fprglr.NextLink != nil && len(*fprglr.NextLink) != 0
13677}
13678
13679// firewallPolicyRuleGroupListResultPreparer prepares a request to retrieve the next set of results.
13680// It returns nil if no more results exist.
13681func (fprglr FirewallPolicyRuleGroupListResult) firewallPolicyRuleGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
13682	if !fprglr.hasNextLink() {
13683		return nil, nil
13684	}
13685	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13686		autorest.AsJSON(),
13687		autorest.AsGet(),
13688		autorest.WithBaseURL(to.String(fprglr.NextLink)))
13689}
13690
13691// FirewallPolicyRuleGroupListResultPage contains a page of FirewallPolicyRuleGroup values.
13692type FirewallPolicyRuleGroupListResultPage struct {
13693	fn     func(context.Context, FirewallPolicyRuleGroupListResult) (FirewallPolicyRuleGroupListResult, error)
13694	fprglr FirewallPolicyRuleGroupListResult
13695}
13696
13697// NextWithContext advances to the next page of values.  If there was an error making
13698// the request the page does not advance and the error is returned.
13699func (page *FirewallPolicyRuleGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
13700	if tracing.IsEnabled() {
13701		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupListResultPage.NextWithContext")
13702		defer func() {
13703			sc := -1
13704			if page.Response().Response.Response != nil {
13705				sc = page.Response().Response.Response.StatusCode
13706			}
13707			tracing.EndSpan(ctx, sc, err)
13708		}()
13709	}
13710	for {
13711		next, err := page.fn(ctx, page.fprglr)
13712		if err != nil {
13713			return err
13714		}
13715		page.fprglr = next
13716		if !next.hasNextLink() || !next.IsEmpty() {
13717			break
13718		}
13719	}
13720	return nil
13721}
13722
13723// Next advances to the next page of values.  If there was an error making
13724// the request the page does not advance and the error is returned.
13725// Deprecated: Use NextWithContext() instead.
13726func (page *FirewallPolicyRuleGroupListResultPage) Next() error {
13727	return page.NextWithContext(context.Background())
13728}
13729
13730// NotDone returns true if the page enumeration should be started or is not yet complete.
13731func (page FirewallPolicyRuleGroupListResultPage) NotDone() bool {
13732	return !page.fprglr.IsEmpty()
13733}
13734
13735// Response returns the raw server response from the last page request.
13736func (page FirewallPolicyRuleGroupListResultPage) Response() FirewallPolicyRuleGroupListResult {
13737	return page.fprglr
13738}
13739
13740// Values returns the slice of values for the current page or nil if there are no values.
13741func (page FirewallPolicyRuleGroupListResultPage) Values() []FirewallPolicyRuleGroup {
13742	if page.fprglr.IsEmpty() {
13743		return nil
13744	}
13745	return *page.fprglr.Value
13746}
13747
13748// Creates a new instance of the FirewallPolicyRuleGroupListResultPage type.
13749func NewFirewallPolicyRuleGroupListResultPage(cur FirewallPolicyRuleGroupListResult, getNextPage func(context.Context, FirewallPolicyRuleGroupListResult) (FirewallPolicyRuleGroupListResult, error)) FirewallPolicyRuleGroupListResultPage {
13750	return FirewallPolicyRuleGroupListResultPage{
13751		fn:     getNextPage,
13752		fprglr: cur,
13753	}
13754}
13755
13756// FirewallPolicyRuleGroupProperties properties of the rule group.
13757type FirewallPolicyRuleGroupProperties struct {
13758	// Priority - Priority of the Firewall Policy Rule Group resource.
13759	Priority *int32 `json:"priority,omitempty"`
13760	// Rules - Group of Firewall Policy rules.
13761	Rules *[]BasicFirewallPolicyRule `json:"rules,omitempty"`
13762	// ProvisioningState - READ-ONLY; The provisioning state of the firewall policy rule group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
13763	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13764}
13765
13766// MarshalJSON is the custom marshaler for FirewallPolicyRuleGroupProperties.
13767func (fprgp FirewallPolicyRuleGroupProperties) MarshalJSON() ([]byte, error) {
13768	objectMap := make(map[string]interface{})
13769	if fprgp.Priority != nil {
13770		objectMap["priority"] = fprgp.Priority
13771	}
13772	if fprgp.Rules != nil {
13773		objectMap["rules"] = fprgp.Rules
13774	}
13775	return json.Marshal(objectMap)
13776}
13777
13778// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleGroupProperties struct.
13779func (fprgp *FirewallPolicyRuleGroupProperties) UnmarshalJSON(body []byte) error {
13780	var m map[string]*json.RawMessage
13781	err := json.Unmarshal(body, &m)
13782	if err != nil {
13783		return err
13784	}
13785	for k, v := range m {
13786		switch k {
13787		case "priority":
13788			if v != nil {
13789				var priority int32
13790				err = json.Unmarshal(*v, &priority)
13791				if err != nil {
13792					return err
13793				}
13794				fprgp.Priority = &priority
13795			}
13796		case "rules":
13797			if v != nil {
13798				rules, err := unmarshalBasicFirewallPolicyRuleArray(*v)
13799				if err != nil {
13800					return err
13801				}
13802				fprgp.Rules = &rules
13803			}
13804		case "provisioningState":
13805			if v != nil {
13806				var provisioningState ProvisioningState
13807				err = json.Unmarshal(*v, &provisioningState)
13808				if err != nil {
13809					return err
13810				}
13811				fprgp.ProvisioningState = provisioningState
13812			}
13813		}
13814	}
13815
13816	return nil
13817}
13818
13819// FirewallPolicyRuleGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
13820// a long-running operation.
13821type FirewallPolicyRuleGroupsCreateOrUpdateFuture struct {
13822	azure.FutureAPI
13823	// Result returns the result of the asynchronous operation.
13824	// If the operation has not completed it will return an error.
13825	Result func(FirewallPolicyRuleGroupsClient) (FirewallPolicyRuleGroup, error)
13826}
13827
13828// FirewallPolicyRuleGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
13829// long-running operation.
13830type FirewallPolicyRuleGroupsDeleteFuture struct {
13831	azure.FutureAPI
13832	// Result returns the result of the asynchronous operation.
13833	// If the operation has not completed it will return an error.
13834	Result func(FirewallPolicyRuleGroupsClient) (autorest.Response, error)
13835}
13836
13837// FlowLog a flow log resource.
13838type FlowLog struct {
13839	autorest.Response `json:"-"`
13840	// FlowLogPropertiesFormat - Properties of the flow log.
13841	*FlowLogPropertiesFormat `json:"properties,omitempty"`
13842	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
13843	Etag *string `json:"etag,omitempty"`
13844	// ID - Resource ID.
13845	ID *string `json:"id,omitempty"`
13846	// Name - READ-ONLY; Resource name.
13847	Name *string `json:"name,omitempty"`
13848	// Type - READ-ONLY; Resource type.
13849	Type *string `json:"type,omitempty"`
13850	// Location - Resource location.
13851	Location *string `json:"location,omitempty"`
13852	// Tags - Resource tags.
13853	Tags map[string]*string `json:"tags"`
13854}
13855
13856// MarshalJSON is the custom marshaler for FlowLog.
13857func (fl FlowLog) MarshalJSON() ([]byte, error) {
13858	objectMap := make(map[string]interface{})
13859	if fl.FlowLogPropertiesFormat != nil {
13860		objectMap["properties"] = fl.FlowLogPropertiesFormat
13861	}
13862	if fl.ID != nil {
13863		objectMap["id"] = fl.ID
13864	}
13865	if fl.Location != nil {
13866		objectMap["location"] = fl.Location
13867	}
13868	if fl.Tags != nil {
13869		objectMap["tags"] = fl.Tags
13870	}
13871	return json.Marshal(objectMap)
13872}
13873
13874// UnmarshalJSON is the custom unmarshaler for FlowLog struct.
13875func (fl *FlowLog) UnmarshalJSON(body []byte) error {
13876	var m map[string]*json.RawMessage
13877	err := json.Unmarshal(body, &m)
13878	if err != nil {
13879		return err
13880	}
13881	for k, v := range m {
13882		switch k {
13883		case "properties":
13884			if v != nil {
13885				var flowLogPropertiesFormat FlowLogPropertiesFormat
13886				err = json.Unmarshal(*v, &flowLogPropertiesFormat)
13887				if err != nil {
13888					return err
13889				}
13890				fl.FlowLogPropertiesFormat = &flowLogPropertiesFormat
13891			}
13892		case "etag":
13893			if v != nil {
13894				var etag string
13895				err = json.Unmarshal(*v, &etag)
13896				if err != nil {
13897					return err
13898				}
13899				fl.Etag = &etag
13900			}
13901		case "id":
13902			if v != nil {
13903				var ID string
13904				err = json.Unmarshal(*v, &ID)
13905				if err != nil {
13906					return err
13907				}
13908				fl.ID = &ID
13909			}
13910		case "name":
13911			if v != nil {
13912				var name string
13913				err = json.Unmarshal(*v, &name)
13914				if err != nil {
13915					return err
13916				}
13917				fl.Name = &name
13918			}
13919		case "type":
13920			if v != nil {
13921				var typeVar string
13922				err = json.Unmarshal(*v, &typeVar)
13923				if err != nil {
13924					return err
13925				}
13926				fl.Type = &typeVar
13927			}
13928		case "location":
13929			if v != nil {
13930				var location string
13931				err = json.Unmarshal(*v, &location)
13932				if err != nil {
13933					return err
13934				}
13935				fl.Location = &location
13936			}
13937		case "tags":
13938			if v != nil {
13939				var tags map[string]*string
13940				err = json.Unmarshal(*v, &tags)
13941				if err != nil {
13942					return err
13943				}
13944				fl.Tags = tags
13945			}
13946		}
13947	}
13948
13949	return nil
13950}
13951
13952// FlowLogFormatParameters parameters that define the flow log format.
13953type FlowLogFormatParameters struct {
13954	// Type - The file type of flow log. Possible values include: 'JSON'
13955	Type FlowLogFormatType `json:"type,omitempty"`
13956	// Version - The version (revision) of the flow log.
13957	Version *int32 `json:"version,omitempty"`
13958}
13959
13960// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
13961type FlowLogInformation struct {
13962	autorest.Response `json:"-"`
13963	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
13964	TargetResourceID *string `json:"targetResourceId,omitempty"`
13965	// FlowLogProperties - Properties of the flow log.
13966	*FlowLogProperties `json:"properties,omitempty"`
13967	// FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
13968	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
13969}
13970
13971// MarshalJSON is the custom marshaler for FlowLogInformation.
13972func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
13973	objectMap := make(map[string]interface{})
13974	if fli.TargetResourceID != nil {
13975		objectMap["targetResourceId"] = fli.TargetResourceID
13976	}
13977	if fli.FlowLogProperties != nil {
13978		objectMap["properties"] = fli.FlowLogProperties
13979	}
13980	if fli.FlowAnalyticsConfiguration != nil {
13981		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
13982	}
13983	return json.Marshal(objectMap)
13984}
13985
13986// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
13987func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
13988	var m map[string]*json.RawMessage
13989	err := json.Unmarshal(body, &m)
13990	if err != nil {
13991		return err
13992	}
13993	for k, v := range m {
13994		switch k {
13995		case "targetResourceId":
13996			if v != nil {
13997				var targetResourceID string
13998				err = json.Unmarshal(*v, &targetResourceID)
13999				if err != nil {
14000					return err
14001				}
14002				fli.TargetResourceID = &targetResourceID
14003			}
14004		case "properties":
14005			if v != nil {
14006				var flowLogProperties FlowLogProperties
14007				err = json.Unmarshal(*v, &flowLogProperties)
14008				if err != nil {
14009					return err
14010				}
14011				fli.FlowLogProperties = &flowLogProperties
14012			}
14013		case "flowAnalyticsConfiguration":
14014			if v != nil {
14015				var flowAnalyticsConfiguration TrafficAnalyticsProperties
14016				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
14017				if err != nil {
14018					return err
14019				}
14020				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
14021			}
14022		}
14023	}
14024
14025	return nil
14026}
14027
14028// FlowLogListResult list of flow logs.
14029type FlowLogListResult struct {
14030	autorest.Response `json:"-"`
14031	// Value - Information about flow log resource.
14032	Value *[]FlowLog `json:"value,omitempty"`
14033	// NextLink - READ-ONLY; The URL to get the next set of results.
14034	NextLink *string `json:"nextLink,omitempty"`
14035}
14036
14037// MarshalJSON is the custom marshaler for FlowLogListResult.
14038func (fllr FlowLogListResult) MarshalJSON() ([]byte, error) {
14039	objectMap := make(map[string]interface{})
14040	if fllr.Value != nil {
14041		objectMap["value"] = fllr.Value
14042	}
14043	return json.Marshal(objectMap)
14044}
14045
14046// FlowLogListResultIterator provides access to a complete listing of FlowLog values.
14047type FlowLogListResultIterator struct {
14048	i    int
14049	page FlowLogListResultPage
14050}
14051
14052// NextWithContext advances to the next value.  If there was an error making
14053// the request the iterator does not advance and the error is returned.
14054func (iter *FlowLogListResultIterator) NextWithContext(ctx context.Context) (err error) {
14055	if tracing.IsEnabled() {
14056		ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogListResultIterator.NextWithContext")
14057		defer func() {
14058			sc := -1
14059			if iter.Response().Response.Response != nil {
14060				sc = iter.Response().Response.Response.StatusCode
14061			}
14062			tracing.EndSpan(ctx, sc, err)
14063		}()
14064	}
14065	iter.i++
14066	if iter.i < len(iter.page.Values()) {
14067		return nil
14068	}
14069	err = iter.page.NextWithContext(ctx)
14070	if err != nil {
14071		iter.i--
14072		return err
14073	}
14074	iter.i = 0
14075	return nil
14076}
14077
14078// Next advances to the next value.  If there was an error making
14079// the request the iterator does not advance and the error is returned.
14080// Deprecated: Use NextWithContext() instead.
14081func (iter *FlowLogListResultIterator) Next() error {
14082	return iter.NextWithContext(context.Background())
14083}
14084
14085// NotDone returns true if the enumeration should be started or is not yet complete.
14086func (iter FlowLogListResultIterator) NotDone() bool {
14087	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14088}
14089
14090// Response returns the raw server response from the last page request.
14091func (iter FlowLogListResultIterator) Response() FlowLogListResult {
14092	return iter.page.Response()
14093}
14094
14095// Value returns the current value or a zero-initialized value if the
14096// iterator has advanced beyond the end of the collection.
14097func (iter FlowLogListResultIterator) Value() FlowLog {
14098	if !iter.page.NotDone() {
14099		return FlowLog{}
14100	}
14101	return iter.page.Values()[iter.i]
14102}
14103
14104// Creates a new instance of the FlowLogListResultIterator type.
14105func NewFlowLogListResultIterator(page FlowLogListResultPage) FlowLogListResultIterator {
14106	return FlowLogListResultIterator{page: page}
14107}
14108
14109// IsEmpty returns true if the ListResult contains no values.
14110func (fllr FlowLogListResult) IsEmpty() bool {
14111	return fllr.Value == nil || len(*fllr.Value) == 0
14112}
14113
14114// hasNextLink returns true if the NextLink is not empty.
14115func (fllr FlowLogListResult) hasNextLink() bool {
14116	return fllr.NextLink != nil && len(*fllr.NextLink) != 0
14117}
14118
14119// flowLogListResultPreparer prepares a request to retrieve the next set of results.
14120// It returns nil if no more results exist.
14121func (fllr FlowLogListResult) flowLogListResultPreparer(ctx context.Context) (*http.Request, error) {
14122	if !fllr.hasNextLink() {
14123		return nil, nil
14124	}
14125	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14126		autorest.AsJSON(),
14127		autorest.AsGet(),
14128		autorest.WithBaseURL(to.String(fllr.NextLink)))
14129}
14130
14131// FlowLogListResultPage contains a page of FlowLog values.
14132type FlowLogListResultPage struct {
14133	fn   func(context.Context, FlowLogListResult) (FlowLogListResult, error)
14134	fllr FlowLogListResult
14135}
14136
14137// NextWithContext advances to the next page of values.  If there was an error making
14138// the request the page does not advance and the error is returned.
14139func (page *FlowLogListResultPage) NextWithContext(ctx context.Context) (err error) {
14140	if tracing.IsEnabled() {
14141		ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogListResultPage.NextWithContext")
14142		defer func() {
14143			sc := -1
14144			if page.Response().Response.Response != nil {
14145				sc = page.Response().Response.Response.StatusCode
14146			}
14147			tracing.EndSpan(ctx, sc, err)
14148		}()
14149	}
14150	for {
14151		next, err := page.fn(ctx, page.fllr)
14152		if err != nil {
14153			return err
14154		}
14155		page.fllr = next
14156		if !next.hasNextLink() || !next.IsEmpty() {
14157			break
14158		}
14159	}
14160	return nil
14161}
14162
14163// Next advances to the next page of values.  If there was an error making
14164// the request the page does not advance and the error is returned.
14165// Deprecated: Use NextWithContext() instead.
14166func (page *FlowLogListResultPage) Next() error {
14167	return page.NextWithContext(context.Background())
14168}
14169
14170// NotDone returns true if the page enumeration should be started or is not yet complete.
14171func (page FlowLogListResultPage) NotDone() bool {
14172	return !page.fllr.IsEmpty()
14173}
14174
14175// Response returns the raw server response from the last page request.
14176func (page FlowLogListResultPage) Response() FlowLogListResult {
14177	return page.fllr
14178}
14179
14180// Values returns the slice of values for the current page or nil if there are no values.
14181func (page FlowLogListResultPage) Values() []FlowLog {
14182	if page.fllr.IsEmpty() {
14183		return nil
14184	}
14185	return *page.fllr.Value
14186}
14187
14188// Creates a new instance of the FlowLogListResultPage type.
14189func NewFlowLogListResultPage(cur FlowLogListResult, getNextPage func(context.Context, FlowLogListResult) (FlowLogListResult, error)) FlowLogListResultPage {
14190	return FlowLogListResultPage{
14191		fn:   getNextPage,
14192		fllr: cur,
14193	}
14194}
14195
14196// FlowLogProperties parameters that define the configuration of flow log.
14197type FlowLogProperties struct {
14198	// StorageID - ID of the storage account which is used to store the flow log.
14199	StorageID *string `json:"storageId,omitempty"`
14200	// Enabled - Flag to enable/disable flow logging.
14201	Enabled *bool `json:"enabled,omitempty"`
14202	// RetentionPolicy - Parameters that define the retention policy for flow log.
14203	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
14204	// Format - Parameters that define the flow log format.
14205	Format *FlowLogFormatParameters `json:"format,omitempty"`
14206}
14207
14208// FlowLogPropertiesFormat parameters that define the configuration of flow log.
14209type FlowLogPropertiesFormat struct {
14210	// TargetResourceID - ID of network security group to which flow log will be applied.
14211	TargetResourceID *string `json:"targetResourceId,omitempty"`
14212	// TargetResourceGUID - READ-ONLY; Guid of network security group to which flow log will be applied.
14213	TargetResourceGUID *string `json:"targetResourceGuid,omitempty"`
14214	// StorageID - ID of the storage account which is used to store the flow log.
14215	StorageID *string `json:"storageId,omitempty"`
14216	// Enabled - Flag to enable/disable flow logging.
14217	Enabled *bool `json:"enabled,omitempty"`
14218	// RetentionPolicy - Parameters that define the retention policy for flow log.
14219	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
14220	// Format - Parameters that define the flow log format.
14221	Format *FlowLogFormatParameters `json:"format,omitempty"`
14222	// FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
14223	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
14224	// ProvisioningState - READ-ONLY; The provisioning state of the flow log. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
14225	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14226}
14227
14228// MarshalJSON is the custom marshaler for FlowLogPropertiesFormat.
14229func (flpf FlowLogPropertiesFormat) MarshalJSON() ([]byte, error) {
14230	objectMap := make(map[string]interface{})
14231	if flpf.TargetResourceID != nil {
14232		objectMap["targetResourceId"] = flpf.TargetResourceID
14233	}
14234	if flpf.StorageID != nil {
14235		objectMap["storageId"] = flpf.StorageID
14236	}
14237	if flpf.Enabled != nil {
14238		objectMap["enabled"] = flpf.Enabled
14239	}
14240	if flpf.RetentionPolicy != nil {
14241		objectMap["retentionPolicy"] = flpf.RetentionPolicy
14242	}
14243	if flpf.Format != nil {
14244		objectMap["format"] = flpf.Format
14245	}
14246	if flpf.FlowAnalyticsConfiguration != nil {
14247		objectMap["flowAnalyticsConfiguration"] = flpf.FlowAnalyticsConfiguration
14248	}
14249	return json.Marshal(objectMap)
14250}
14251
14252// FlowLogsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
14253// operation.
14254type FlowLogsCreateOrUpdateFuture struct {
14255	azure.FutureAPI
14256	// Result returns the result of the asynchronous operation.
14257	// If the operation has not completed it will return an error.
14258	Result func(FlowLogsClient) (FlowLog, error)
14259}
14260
14261// FlowLogsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14262// operation.
14263type FlowLogsDeleteFuture struct {
14264	azure.FutureAPI
14265	// Result returns the result of the asynchronous operation.
14266	// If the operation has not completed it will return an error.
14267	Result func(FlowLogsClient) (autorest.Response, error)
14268}
14269
14270// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
14271// (optional) status.
14272type FlowLogStatusParameters struct {
14273	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
14274	TargetResourceID *string `json:"targetResourceId,omitempty"`
14275}
14276
14277// FrontendIPConfiguration frontend IP address of the load balancer.
14278type FrontendIPConfiguration struct {
14279	autorest.Response `json:"-"`
14280	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
14281	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
14282	// 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.
14283	Name *string `json:"name,omitempty"`
14284	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
14285	Etag *string `json:"etag,omitempty"`
14286	// Type - READ-ONLY; Type of the resource.
14287	Type *string `json:"type,omitempty"`
14288	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
14289	Zones *[]string `json:"zones,omitempty"`
14290	// ID - Resource ID.
14291	ID *string `json:"id,omitempty"`
14292}
14293
14294// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
14295func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
14296	objectMap := make(map[string]interface{})
14297	if fic.FrontendIPConfigurationPropertiesFormat != nil {
14298		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
14299	}
14300	if fic.Name != nil {
14301		objectMap["name"] = fic.Name
14302	}
14303	if fic.Zones != nil {
14304		objectMap["zones"] = fic.Zones
14305	}
14306	if fic.ID != nil {
14307		objectMap["id"] = fic.ID
14308	}
14309	return json.Marshal(objectMap)
14310}
14311
14312// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
14313func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
14314	var m map[string]*json.RawMessage
14315	err := json.Unmarshal(body, &m)
14316	if err != nil {
14317		return err
14318	}
14319	for k, v := range m {
14320		switch k {
14321		case "properties":
14322			if v != nil {
14323				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
14324				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
14325				if err != nil {
14326					return err
14327				}
14328				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
14329			}
14330		case "name":
14331			if v != nil {
14332				var name string
14333				err = json.Unmarshal(*v, &name)
14334				if err != nil {
14335					return err
14336				}
14337				fic.Name = &name
14338			}
14339		case "etag":
14340			if v != nil {
14341				var etag string
14342				err = json.Unmarshal(*v, &etag)
14343				if err != nil {
14344					return err
14345				}
14346				fic.Etag = &etag
14347			}
14348		case "type":
14349			if v != nil {
14350				var typeVar string
14351				err = json.Unmarshal(*v, &typeVar)
14352				if err != nil {
14353					return err
14354				}
14355				fic.Type = &typeVar
14356			}
14357		case "zones":
14358			if v != nil {
14359				var zones []string
14360				err = json.Unmarshal(*v, &zones)
14361				if err != nil {
14362					return err
14363				}
14364				fic.Zones = &zones
14365			}
14366		case "id":
14367			if v != nil {
14368				var ID string
14369				err = json.Unmarshal(*v, &ID)
14370				if err != nil {
14371					return err
14372				}
14373				fic.ID = &ID
14374			}
14375		}
14376	}
14377
14378	return nil
14379}
14380
14381// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
14382type FrontendIPConfigurationPropertiesFormat struct {
14383	// InboundNatRules - READ-ONLY; An array of references to inbound rules that use this frontend IP.
14384	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
14385	// InboundNatPools - READ-ONLY; An array of references to inbound pools that use this frontend IP.
14386	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
14387	// OutboundRules - READ-ONLY; An array of references to outbound rules that use this frontend IP.
14388	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
14389	// LoadBalancingRules - READ-ONLY; An array of references to load balancing rules that use this frontend IP.
14390	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
14391	// PrivateIPAddress - The private IP address of the IP configuration.
14392	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
14393	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values include: 'Static', 'Dynamic'
14394	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
14395	// PrivateIPAddressVersion - Whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPv4', 'IPv6'
14396	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
14397	// Subnet - The reference to the subnet resource.
14398	Subnet *Subnet `json:"subnet,omitempty"`
14399	// PublicIPAddress - The reference to the Public IP resource.
14400	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
14401	// PublicIPPrefix - The reference to the Public IP Prefix resource.
14402	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
14403	// ProvisioningState - READ-ONLY; The provisioning state of the frontend IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
14404	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14405}
14406
14407// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
14408func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
14409	objectMap := make(map[string]interface{})
14410	if ficpf.PrivateIPAddress != nil {
14411		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
14412	}
14413	if ficpf.PrivateIPAllocationMethod != "" {
14414		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
14415	}
14416	if ficpf.PrivateIPAddressVersion != "" {
14417		objectMap["privateIPAddressVersion"] = ficpf.PrivateIPAddressVersion
14418	}
14419	if ficpf.Subnet != nil {
14420		objectMap["subnet"] = ficpf.Subnet
14421	}
14422	if ficpf.PublicIPAddress != nil {
14423		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
14424	}
14425	if ficpf.PublicIPPrefix != nil {
14426		objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix
14427	}
14428	return json.Marshal(objectMap)
14429}
14430
14431// GatewayRoute gateway routing details.
14432type GatewayRoute struct {
14433	// LocalAddress - READ-ONLY; The gateway's local address.
14434	LocalAddress *string `json:"localAddress,omitempty"`
14435	// NetworkProperty - READ-ONLY; The route's network prefix.
14436	NetworkProperty *string `json:"network,omitempty"`
14437	// NextHop - READ-ONLY; The route's next hop.
14438	NextHop *string `json:"nextHop,omitempty"`
14439	// SourcePeer - READ-ONLY; The peer this route was learned from.
14440	SourcePeer *string `json:"sourcePeer,omitempty"`
14441	// Origin - READ-ONLY; The source this route was learned from.
14442	Origin *string `json:"origin,omitempty"`
14443	// AsPath - READ-ONLY; The route's AS path sequence.
14444	AsPath *string `json:"asPath,omitempty"`
14445	// Weight - READ-ONLY; The route's weight.
14446	Weight *int32 `json:"weight,omitempty"`
14447}
14448
14449// GatewayRouteListResult list of virtual network gateway routes.
14450type GatewayRouteListResult struct {
14451	autorest.Response `json:"-"`
14452	// Value - List of gateway routes.
14453	Value *[]GatewayRoute `json:"value,omitempty"`
14454}
14455
14456// GeneratevirtualwanvpnserverconfigurationvpnprofileFuture an abstraction for monitoring and retrieving
14457// the results of a long-running operation.
14458type GeneratevirtualwanvpnserverconfigurationvpnprofileFuture struct {
14459	azure.FutureAPI
14460	// Result returns the result of the asynchronous operation.
14461	// If the operation has not completed it will return an error.
14462	Result func(BaseClient) (VpnProfileResponse, error)
14463}
14464
14465// GetActiveSessionsAllFuture an abstraction for monitoring and retrieving the results of a long-running
14466// operation.
14467type GetActiveSessionsAllFuture struct {
14468	azure.FutureAPI
14469	// Result returns the result of the asynchronous operation.
14470	// If the operation has not completed it will return an error.
14471	Result func(BaseClient) (BastionActiveSessionListResultPage, error)
14472}
14473
14474// GetActiveSessionsFuture an abstraction for monitoring and retrieving the results of a long-running
14475// operation.
14476type GetActiveSessionsFuture struct {
14477	azure.FutureAPI
14478	// Result returns the result of the asynchronous operation.
14479	// If the operation has not completed it will return an error.
14480	Result func(BaseClient) (BastionActiveSessionListResultPage, error)
14481}
14482
14483// GetVpnSitesConfigurationRequest list of Vpn-Sites.
14484type GetVpnSitesConfigurationRequest struct {
14485	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
14486	VpnSites *[]string `json:"vpnSites,omitempty"`
14487	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites.
14488	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
14489}
14490
14491// HTTPConfiguration HTTP configuration of the connectivity check.
14492type HTTPConfiguration struct {
14493	// Method - HTTP method. Possible values include: 'HTTPMethodGet'
14494	Method HTTPMethod `json:"method,omitempty"`
14495	// Headers - List of HTTP headers.
14496	Headers *[]HTTPHeader `json:"headers,omitempty"`
14497	// ValidStatusCodes - Valid status codes.
14498	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
14499}
14500
14501// HTTPHeader the HTTP header.
14502type HTTPHeader struct {
14503	// Name - The name in HTTP header.
14504	Name *string `json:"name,omitempty"`
14505	// Value - The value in HTTP header.
14506	Value *string `json:"value,omitempty"`
14507}
14508
14509// HubIPAddresses IP addresses associated with azure firewall.
14510type HubIPAddresses struct {
14511	// PublicIPAddresses - List of Public IP addresses associated with azure firewall.
14512	PublicIPAddresses *[]AzureFirewallPublicIPAddress `json:"publicIPAddresses,omitempty"`
14513	// PrivateIPAddress - Private IP Address associated with azure firewall.
14514	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
14515}
14516
14517// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
14518type HubVirtualNetworkConnection struct {
14519	autorest.Response `json:"-"`
14520	// HubVirtualNetworkConnectionProperties - Properties of the hub virtual network connection.
14521	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
14522	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14523	Name *string `json:"name,omitempty"`
14524	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
14525	Etag *string `json:"etag,omitempty"`
14526	// ID - Resource ID.
14527	ID *string `json:"id,omitempty"`
14528}
14529
14530// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
14531func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
14532	objectMap := make(map[string]interface{})
14533	if hvnc.HubVirtualNetworkConnectionProperties != nil {
14534		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
14535	}
14536	if hvnc.Name != nil {
14537		objectMap["name"] = hvnc.Name
14538	}
14539	if hvnc.ID != nil {
14540		objectMap["id"] = hvnc.ID
14541	}
14542	return json.Marshal(objectMap)
14543}
14544
14545// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
14546func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
14547	var m map[string]*json.RawMessage
14548	err := json.Unmarshal(body, &m)
14549	if err != nil {
14550		return err
14551	}
14552	for k, v := range m {
14553		switch k {
14554		case "properties":
14555			if v != nil {
14556				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
14557				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
14558				if err != nil {
14559					return err
14560				}
14561				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
14562			}
14563		case "name":
14564			if v != nil {
14565				var name string
14566				err = json.Unmarshal(*v, &name)
14567				if err != nil {
14568					return err
14569				}
14570				hvnc.Name = &name
14571			}
14572		case "etag":
14573			if v != nil {
14574				var etag string
14575				err = json.Unmarshal(*v, &etag)
14576				if err != nil {
14577					return err
14578				}
14579				hvnc.Etag = &etag
14580			}
14581		case "id":
14582			if v != nil {
14583				var ID string
14584				err = json.Unmarshal(*v, &ID)
14585				if err != nil {
14586					return err
14587				}
14588				hvnc.ID = &ID
14589			}
14590		}
14591	}
14592
14593	return nil
14594}
14595
14596// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection.
14597type HubVirtualNetworkConnectionProperties struct {
14598	// RemoteVirtualNetwork - Reference to the remote virtual network.
14599	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
14600	// AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not.
14601	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
14602	// AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways.
14603	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
14604	// EnableInternetSecurity - Enable internet security.
14605	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
14606	// ProvisioningState - READ-ONLY; The provisioning state of the hub virtual network connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
14607	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14608}
14609
14610// MarshalJSON is the custom marshaler for HubVirtualNetworkConnectionProperties.
14611func (hvncp HubVirtualNetworkConnectionProperties) MarshalJSON() ([]byte, error) {
14612	objectMap := make(map[string]interface{})
14613	if hvncp.RemoteVirtualNetwork != nil {
14614		objectMap["remoteVirtualNetwork"] = hvncp.RemoteVirtualNetwork
14615	}
14616	if hvncp.AllowHubToRemoteVnetTransit != nil {
14617		objectMap["allowHubToRemoteVnetTransit"] = hvncp.AllowHubToRemoteVnetTransit
14618	}
14619	if hvncp.AllowRemoteVnetToUseHubVnetGateways != nil {
14620		objectMap["allowRemoteVnetToUseHubVnetGateways"] = hvncp.AllowRemoteVnetToUseHubVnetGateways
14621	}
14622	if hvncp.EnableInternetSecurity != nil {
14623		objectMap["enableInternetSecurity"] = hvncp.EnableInternetSecurity
14624	}
14625	return json.Marshal(objectMap)
14626}
14627
14628// InboundNatPool inbound NAT pool of the load balancer.
14629type InboundNatPool struct {
14630	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
14631	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
14632	// 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.
14633	Name *string `json:"name,omitempty"`
14634	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
14635	Etag *string `json:"etag,omitempty"`
14636	// Type - READ-ONLY; Type of the resource.
14637	Type *string `json:"type,omitempty"`
14638	// ID - Resource ID.
14639	ID *string `json:"id,omitempty"`
14640}
14641
14642// MarshalJSON is the custom marshaler for InboundNatPool.
14643func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
14644	objectMap := make(map[string]interface{})
14645	if inp.InboundNatPoolPropertiesFormat != nil {
14646		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
14647	}
14648	if inp.Name != nil {
14649		objectMap["name"] = inp.Name
14650	}
14651	if inp.ID != nil {
14652		objectMap["id"] = inp.ID
14653	}
14654	return json.Marshal(objectMap)
14655}
14656
14657// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
14658func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
14659	var m map[string]*json.RawMessage
14660	err := json.Unmarshal(body, &m)
14661	if err != nil {
14662		return err
14663	}
14664	for k, v := range m {
14665		switch k {
14666		case "properties":
14667			if v != nil {
14668				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
14669				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
14670				if err != nil {
14671					return err
14672				}
14673				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
14674			}
14675		case "name":
14676			if v != nil {
14677				var name string
14678				err = json.Unmarshal(*v, &name)
14679				if err != nil {
14680					return err
14681				}
14682				inp.Name = &name
14683			}
14684		case "etag":
14685			if v != nil {
14686				var etag string
14687				err = json.Unmarshal(*v, &etag)
14688				if err != nil {
14689					return err
14690				}
14691				inp.Etag = &etag
14692			}
14693		case "type":
14694			if v != nil {
14695				var typeVar string
14696				err = json.Unmarshal(*v, &typeVar)
14697				if err != nil {
14698					return err
14699				}
14700				inp.Type = &typeVar
14701			}
14702		case "id":
14703			if v != nil {
14704				var ID string
14705				err = json.Unmarshal(*v, &ID)
14706				if err != nil {
14707					return err
14708				}
14709				inp.ID = &ID
14710			}
14711		}
14712	}
14713
14714	return nil
14715}
14716
14717// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
14718type InboundNatPoolPropertiesFormat struct {
14719	// FrontendIPConfiguration - A reference to frontend IP addresses.
14720	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
14721	// Protocol - The reference to the transport protocol used by the inbound NAT pool. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
14722	Protocol TransportProtocol `json:"protocol,omitempty"`
14723	// 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.
14724	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
14725	// 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.
14726	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
14727	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
14728	BackendPort *int32 `json:"backendPort,omitempty"`
14729	// 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.
14730	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
14731	// 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.
14732	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
14733	// 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.
14734	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
14735	// ProvisioningState - READ-ONLY; The provisioning state of the inbound NAT pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
14736	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14737}
14738
14739// MarshalJSON is the custom marshaler for InboundNatPoolPropertiesFormat.
14740func (inppf InboundNatPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
14741	objectMap := make(map[string]interface{})
14742	if inppf.FrontendIPConfiguration != nil {
14743		objectMap["frontendIPConfiguration"] = inppf.FrontendIPConfiguration
14744	}
14745	if inppf.Protocol != "" {
14746		objectMap["protocol"] = inppf.Protocol
14747	}
14748	if inppf.FrontendPortRangeStart != nil {
14749		objectMap["frontendPortRangeStart"] = inppf.FrontendPortRangeStart
14750	}
14751	if inppf.FrontendPortRangeEnd != nil {
14752		objectMap["frontendPortRangeEnd"] = inppf.FrontendPortRangeEnd
14753	}
14754	if inppf.BackendPort != nil {
14755		objectMap["backendPort"] = inppf.BackendPort
14756	}
14757	if inppf.IdleTimeoutInMinutes != nil {
14758		objectMap["idleTimeoutInMinutes"] = inppf.IdleTimeoutInMinutes
14759	}
14760	if inppf.EnableFloatingIP != nil {
14761		objectMap["enableFloatingIP"] = inppf.EnableFloatingIP
14762	}
14763	if inppf.EnableTCPReset != nil {
14764		objectMap["enableTcpReset"] = inppf.EnableTCPReset
14765	}
14766	return json.Marshal(objectMap)
14767}
14768
14769// InboundNatRule inbound NAT rule of the load balancer.
14770type InboundNatRule struct {
14771	autorest.Response `json:"-"`
14772	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
14773	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
14774	// 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.
14775	Name *string `json:"name,omitempty"`
14776	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
14777	Etag *string `json:"etag,omitempty"`
14778	// Type - READ-ONLY; Type of the resource.
14779	Type *string `json:"type,omitempty"`
14780	// ID - Resource ID.
14781	ID *string `json:"id,omitempty"`
14782}
14783
14784// MarshalJSON is the custom marshaler for InboundNatRule.
14785func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
14786	objectMap := make(map[string]interface{})
14787	if inr.InboundNatRulePropertiesFormat != nil {
14788		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
14789	}
14790	if inr.Name != nil {
14791		objectMap["name"] = inr.Name
14792	}
14793	if inr.ID != nil {
14794		objectMap["id"] = inr.ID
14795	}
14796	return json.Marshal(objectMap)
14797}
14798
14799// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
14800func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
14801	var m map[string]*json.RawMessage
14802	err := json.Unmarshal(body, &m)
14803	if err != nil {
14804		return err
14805	}
14806	for k, v := range m {
14807		switch k {
14808		case "properties":
14809			if v != nil {
14810				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
14811				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
14812				if err != nil {
14813					return err
14814				}
14815				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
14816			}
14817		case "name":
14818			if v != nil {
14819				var name string
14820				err = json.Unmarshal(*v, &name)
14821				if err != nil {
14822					return err
14823				}
14824				inr.Name = &name
14825			}
14826		case "etag":
14827			if v != nil {
14828				var etag string
14829				err = json.Unmarshal(*v, &etag)
14830				if err != nil {
14831					return err
14832				}
14833				inr.Etag = &etag
14834			}
14835		case "type":
14836			if v != nil {
14837				var typeVar string
14838				err = json.Unmarshal(*v, &typeVar)
14839				if err != nil {
14840					return err
14841				}
14842				inr.Type = &typeVar
14843			}
14844		case "id":
14845			if v != nil {
14846				var ID string
14847				err = json.Unmarshal(*v, &ID)
14848				if err != nil {
14849					return err
14850				}
14851				inr.ID = &ID
14852			}
14853		}
14854	}
14855
14856	return nil
14857}
14858
14859// InboundNatRuleListResult response for ListInboundNatRule API service call.
14860type InboundNatRuleListResult struct {
14861	autorest.Response `json:"-"`
14862	// Value - A list of inbound nat rules in a load balancer.
14863	Value *[]InboundNatRule `json:"value,omitempty"`
14864	// NextLink - READ-ONLY; The URL to get the next set of results.
14865	NextLink *string `json:"nextLink,omitempty"`
14866}
14867
14868// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
14869func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
14870	objectMap := make(map[string]interface{})
14871	if inrlr.Value != nil {
14872		objectMap["value"] = inrlr.Value
14873	}
14874	return json.Marshal(objectMap)
14875}
14876
14877// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
14878type InboundNatRuleListResultIterator struct {
14879	i    int
14880	page InboundNatRuleListResultPage
14881}
14882
14883// NextWithContext advances to the next value.  If there was an error making
14884// the request the iterator does not advance and the error is returned.
14885func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
14886	if tracing.IsEnabled() {
14887		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
14888		defer func() {
14889			sc := -1
14890			if iter.Response().Response.Response != nil {
14891				sc = iter.Response().Response.Response.StatusCode
14892			}
14893			tracing.EndSpan(ctx, sc, err)
14894		}()
14895	}
14896	iter.i++
14897	if iter.i < len(iter.page.Values()) {
14898		return nil
14899	}
14900	err = iter.page.NextWithContext(ctx)
14901	if err != nil {
14902		iter.i--
14903		return err
14904	}
14905	iter.i = 0
14906	return nil
14907}
14908
14909// Next advances to the next value.  If there was an error making
14910// the request the iterator does not advance and the error is returned.
14911// Deprecated: Use NextWithContext() instead.
14912func (iter *InboundNatRuleListResultIterator) Next() error {
14913	return iter.NextWithContext(context.Background())
14914}
14915
14916// NotDone returns true if the enumeration should be started or is not yet complete.
14917func (iter InboundNatRuleListResultIterator) NotDone() bool {
14918	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14919}
14920
14921// Response returns the raw server response from the last page request.
14922func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
14923	return iter.page.Response()
14924}
14925
14926// Value returns the current value or a zero-initialized value if the
14927// iterator has advanced beyond the end of the collection.
14928func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
14929	if !iter.page.NotDone() {
14930		return InboundNatRule{}
14931	}
14932	return iter.page.Values()[iter.i]
14933}
14934
14935// Creates a new instance of the InboundNatRuleListResultIterator type.
14936func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
14937	return InboundNatRuleListResultIterator{page: page}
14938}
14939
14940// IsEmpty returns true if the ListResult contains no values.
14941func (inrlr InboundNatRuleListResult) IsEmpty() bool {
14942	return inrlr.Value == nil || len(*inrlr.Value) == 0
14943}
14944
14945// hasNextLink returns true if the NextLink is not empty.
14946func (inrlr InboundNatRuleListResult) hasNextLink() bool {
14947	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
14948}
14949
14950// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
14951// It returns nil if no more results exist.
14952func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
14953	if !inrlr.hasNextLink() {
14954		return nil, nil
14955	}
14956	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14957		autorest.AsJSON(),
14958		autorest.AsGet(),
14959		autorest.WithBaseURL(to.String(inrlr.NextLink)))
14960}
14961
14962// InboundNatRuleListResultPage contains a page of InboundNatRule values.
14963type InboundNatRuleListResultPage struct {
14964	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
14965	inrlr InboundNatRuleListResult
14966}
14967
14968// NextWithContext advances to the next page of values.  If there was an error making
14969// the request the page does not advance and the error is returned.
14970func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
14971	if tracing.IsEnabled() {
14972		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
14973		defer func() {
14974			sc := -1
14975			if page.Response().Response.Response != nil {
14976				sc = page.Response().Response.Response.StatusCode
14977			}
14978			tracing.EndSpan(ctx, sc, err)
14979		}()
14980	}
14981	for {
14982		next, err := page.fn(ctx, page.inrlr)
14983		if err != nil {
14984			return err
14985		}
14986		page.inrlr = next
14987		if !next.hasNextLink() || !next.IsEmpty() {
14988			break
14989		}
14990	}
14991	return nil
14992}
14993
14994// Next advances to the next page of values.  If there was an error making
14995// the request the page does not advance and the error is returned.
14996// Deprecated: Use NextWithContext() instead.
14997func (page *InboundNatRuleListResultPage) Next() error {
14998	return page.NextWithContext(context.Background())
14999}
15000
15001// NotDone returns true if the page enumeration should be started or is not yet complete.
15002func (page InboundNatRuleListResultPage) NotDone() bool {
15003	return !page.inrlr.IsEmpty()
15004}
15005
15006// Response returns the raw server response from the last page request.
15007func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
15008	return page.inrlr
15009}
15010
15011// Values returns the slice of values for the current page or nil if there are no values.
15012func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
15013	if page.inrlr.IsEmpty() {
15014		return nil
15015	}
15016	return *page.inrlr.Value
15017}
15018
15019// Creates a new instance of the InboundNatRuleListResultPage type.
15020func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
15021	return InboundNatRuleListResultPage{
15022		fn:    getNextPage,
15023		inrlr: cur,
15024	}
15025}
15026
15027// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
15028type InboundNatRulePropertiesFormat struct {
15029	// FrontendIPConfiguration - A reference to frontend IP addresses.
15030	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
15031	// 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.
15032	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
15033	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
15034	Protocol TransportProtocol `json:"protocol,omitempty"`
15035	// 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.
15036	FrontendPort *int32 `json:"frontendPort,omitempty"`
15037	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
15038	BackendPort *int32 `json:"backendPort,omitempty"`
15039	// 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.
15040	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
15041	// 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.
15042	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
15043	// 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.
15044	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
15045	// ProvisioningState - READ-ONLY; The provisioning state of the inbound NAT rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
15046	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15047}
15048
15049// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
15050func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
15051	objectMap := make(map[string]interface{})
15052	if inrpf.FrontendIPConfiguration != nil {
15053		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
15054	}
15055	if inrpf.Protocol != "" {
15056		objectMap["protocol"] = inrpf.Protocol
15057	}
15058	if inrpf.FrontendPort != nil {
15059		objectMap["frontendPort"] = inrpf.FrontendPort
15060	}
15061	if inrpf.BackendPort != nil {
15062		objectMap["backendPort"] = inrpf.BackendPort
15063	}
15064	if inrpf.IdleTimeoutInMinutes != nil {
15065		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
15066	}
15067	if inrpf.EnableFloatingIP != nil {
15068		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
15069	}
15070	if inrpf.EnableTCPReset != nil {
15071		objectMap["enableTcpReset"] = inrpf.EnableTCPReset
15072	}
15073	return json.Marshal(objectMap)
15074}
15075
15076// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15077// long-running operation.
15078type InboundNatRulesCreateOrUpdateFuture struct {
15079	azure.FutureAPI
15080	// Result returns the result of the asynchronous operation.
15081	// If the operation has not completed it will return an error.
15082	Result func(InboundNatRulesClient) (InboundNatRule, error)
15083}
15084
15085// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15086// operation.
15087type InboundNatRulesDeleteFuture struct {
15088	azure.FutureAPI
15089	// Result returns the result of the asynchronous operation.
15090	// If the operation has not completed it will return an error.
15091	Result func(InboundNatRulesClient) (autorest.Response, error)
15092}
15093
15094// IntentPolicy network Intent Policy resource.
15095type IntentPolicy struct {
15096	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15097	Etag *string `json:"etag,omitempty"`
15098	// ID - Resource ID.
15099	ID *string `json:"id,omitempty"`
15100	// Name - READ-ONLY; Resource name.
15101	Name *string `json:"name,omitempty"`
15102	// Type - READ-ONLY; Resource type.
15103	Type *string `json:"type,omitempty"`
15104	// Location - Resource location.
15105	Location *string `json:"location,omitempty"`
15106	// Tags - Resource tags.
15107	Tags map[string]*string `json:"tags"`
15108}
15109
15110// MarshalJSON is the custom marshaler for IntentPolicy.
15111func (IP IntentPolicy) MarshalJSON() ([]byte, error) {
15112	objectMap := make(map[string]interface{})
15113	if IP.ID != nil {
15114		objectMap["id"] = IP.ID
15115	}
15116	if IP.Location != nil {
15117		objectMap["location"] = IP.Location
15118	}
15119	if IP.Tags != nil {
15120		objectMap["tags"] = IP.Tags
15121	}
15122	return json.Marshal(objectMap)
15123}
15124
15125// IntentPolicyConfiguration details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest.
15126type IntentPolicyConfiguration struct {
15127	// NetworkIntentPolicyName - The name of the Network Intent Policy for storing in target subscription.
15128	NetworkIntentPolicyName *string `json:"networkIntentPolicyName,omitempty"`
15129	// SourceNetworkIntentPolicy - Source network intent policy.
15130	SourceNetworkIntentPolicy *IntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"`
15131}
15132
15133// Interface a network interface in a resource group.
15134type Interface struct {
15135	autorest.Response `json:"-"`
15136	// InterfacePropertiesFormat - Properties of the network interface.
15137	*InterfacePropertiesFormat `json:"properties,omitempty"`
15138	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15139	Etag *string `json:"etag,omitempty"`
15140	// ID - Resource ID.
15141	ID *string `json:"id,omitempty"`
15142	// Name - READ-ONLY; Resource name.
15143	Name *string `json:"name,omitempty"`
15144	// Type - READ-ONLY; Resource type.
15145	Type *string `json:"type,omitempty"`
15146	// Location - Resource location.
15147	Location *string `json:"location,omitempty"`
15148	// Tags - Resource tags.
15149	Tags map[string]*string `json:"tags"`
15150}
15151
15152// MarshalJSON is the custom marshaler for Interface.
15153func (i Interface) MarshalJSON() ([]byte, error) {
15154	objectMap := make(map[string]interface{})
15155	if i.InterfacePropertiesFormat != nil {
15156		objectMap["properties"] = i.InterfacePropertiesFormat
15157	}
15158	if i.ID != nil {
15159		objectMap["id"] = i.ID
15160	}
15161	if i.Location != nil {
15162		objectMap["location"] = i.Location
15163	}
15164	if i.Tags != nil {
15165		objectMap["tags"] = i.Tags
15166	}
15167	return json.Marshal(objectMap)
15168}
15169
15170// UnmarshalJSON is the custom unmarshaler for Interface struct.
15171func (i *Interface) UnmarshalJSON(body []byte) error {
15172	var m map[string]*json.RawMessage
15173	err := json.Unmarshal(body, &m)
15174	if err != nil {
15175		return err
15176	}
15177	for k, v := range m {
15178		switch k {
15179		case "properties":
15180			if v != nil {
15181				var interfacePropertiesFormat InterfacePropertiesFormat
15182				err = json.Unmarshal(*v, &interfacePropertiesFormat)
15183				if err != nil {
15184					return err
15185				}
15186				i.InterfacePropertiesFormat = &interfacePropertiesFormat
15187			}
15188		case "etag":
15189			if v != nil {
15190				var etag string
15191				err = json.Unmarshal(*v, &etag)
15192				if err != nil {
15193					return err
15194				}
15195				i.Etag = &etag
15196			}
15197		case "id":
15198			if v != nil {
15199				var ID string
15200				err = json.Unmarshal(*v, &ID)
15201				if err != nil {
15202					return err
15203				}
15204				i.ID = &ID
15205			}
15206		case "name":
15207			if v != nil {
15208				var name string
15209				err = json.Unmarshal(*v, &name)
15210				if err != nil {
15211					return err
15212				}
15213				i.Name = &name
15214			}
15215		case "type":
15216			if v != nil {
15217				var typeVar string
15218				err = json.Unmarshal(*v, &typeVar)
15219				if err != nil {
15220					return err
15221				}
15222				i.Type = &typeVar
15223			}
15224		case "location":
15225			if v != nil {
15226				var location string
15227				err = json.Unmarshal(*v, &location)
15228				if err != nil {
15229					return err
15230				}
15231				i.Location = &location
15232			}
15233		case "tags":
15234			if v != nil {
15235				var tags map[string]*string
15236				err = json.Unmarshal(*v, &tags)
15237				if err != nil {
15238					return err
15239				}
15240				i.Tags = tags
15241			}
15242		}
15243	}
15244
15245	return nil
15246}
15247
15248// InterfaceAssociation network interface and its custom security rules.
15249type InterfaceAssociation struct {
15250	// ID - READ-ONLY; Network interface ID.
15251	ID *string `json:"id,omitempty"`
15252	// SecurityRules - Collection of custom security rules.
15253	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
15254}
15255
15256// MarshalJSON is the custom marshaler for InterfaceAssociation.
15257func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
15258	objectMap := make(map[string]interface{})
15259	if ia.SecurityRules != nil {
15260		objectMap["securityRules"] = ia.SecurityRules
15261	}
15262	return json.Marshal(objectMap)
15263}
15264
15265// InterfaceDNSSettings DNS settings of a network interface.
15266type InterfaceDNSSettings struct {
15267	// 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.
15268	DNSServers *[]string `json:"dnsServers,omitempty"`
15269	// 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.
15270	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
15271	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
15272	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
15273	// InternalFqdn - READ-ONLY; Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
15274	InternalFqdn *string `json:"internalFqdn,omitempty"`
15275	// 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.
15276	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
15277}
15278
15279// MarshalJSON is the custom marshaler for InterfaceDNSSettings.
15280func (ids InterfaceDNSSettings) MarshalJSON() ([]byte, error) {
15281	objectMap := make(map[string]interface{})
15282	if ids.DNSServers != nil {
15283		objectMap["dnsServers"] = ids.DNSServers
15284	}
15285	if ids.InternalDNSNameLabel != nil {
15286		objectMap["internalDnsNameLabel"] = ids.InternalDNSNameLabel
15287	}
15288	return json.Marshal(objectMap)
15289}
15290
15291// InterfaceIPConfiguration iPConfiguration in a network interface.
15292type InterfaceIPConfiguration struct {
15293	autorest.Response `json:"-"`
15294	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
15295	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
15296	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15297	Name *string `json:"name,omitempty"`
15298	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15299	Etag *string `json:"etag,omitempty"`
15300	// ID - Resource ID.
15301	ID *string `json:"id,omitempty"`
15302}
15303
15304// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
15305func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
15306	objectMap := make(map[string]interface{})
15307	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
15308		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
15309	}
15310	if iic.Name != nil {
15311		objectMap["name"] = iic.Name
15312	}
15313	if iic.ID != nil {
15314		objectMap["id"] = iic.ID
15315	}
15316	return json.Marshal(objectMap)
15317}
15318
15319// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
15320func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
15321	var m map[string]*json.RawMessage
15322	err := json.Unmarshal(body, &m)
15323	if err != nil {
15324		return err
15325	}
15326	for k, v := range m {
15327		switch k {
15328		case "properties":
15329			if v != nil {
15330				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
15331				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
15332				if err != nil {
15333					return err
15334				}
15335				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
15336			}
15337		case "name":
15338			if v != nil {
15339				var name string
15340				err = json.Unmarshal(*v, &name)
15341				if err != nil {
15342					return err
15343				}
15344				iic.Name = &name
15345			}
15346		case "etag":
15347			if v != nil {
15348				var etag string
15349				err = json.Unmarshal(*v, &etag)
15350				if err != nil {
15351					return err
15352				}
15353				iic.Etag = &etag
15354			}
15355		case "id":
15356			if v != nil {
15357				var ID string
15358				err = json.Unmarshal(*v, &ID)
15359				if err != nil {
15360					return err
15361				}
15362				iic.ID = &ID
15363			}
15364		}
15365	}
15366
15367	return nil
15368}
15369
15370// InterfaceIPConfigurationListResult response for list ip configurations API service call.
15371type InterfaceIPConfigurationListResult struct {
15372	autorest.Response `json:"-"`
15373	// Value - A list of ip configurations.
15374	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
15375	// NextLink - READ-ONLY; The URL to get the next set of results.
15376	NextLink *string `json:"nextLink,omitempty"`
15377}
15378
15379// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
15380func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
15381	objectMap := make(map[string]interface{})
15382	if iiclr.Value != nil {
15383		objectMap["value"] = iiclr.Value
15384	}
15385	return json.Marshal(objectMap)
15386}
15387
15388// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
15389// InterfaceIPConfiguration values.
15390type InterfaceIPConfigurationListResultIterator struct {
15391	i    int
15392	page InterfaceIPConfigurationListResultPage
15393}
15394
15395// NextWithContext advances to the next value.  If there was an error making
15396// the request the iterator does not advance and the error is returned.
15397func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
15398	if tracing.IsEnabled() {
15399		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
15400		defer func() {
15401			sc := -1
15402			if iter.Response().Response.Response != nil {
15403				sc = iter.Response().Response.Response.StatusCode
15404			}
15405			tracing.EndSpan(ctx, sc, err)
15406		}()
15407	}
15408	iter.i++
15409	if iter.i < len(iter.page.Values()) {
15410		return nil
15411	}
15412	err = iter.page.NextWithContext(ctx)
15413	if err != nil {
15414		iter.i--
15415		return err
15416	}
15417	iter.i = 0
15418	return nil
15419}
15420
15421// Next advances to the next value.  If there was an error making
15422// the request the iterator does not advance and the error is returned.
15423// Deprecated: Use NextWithContext() instead.
15424func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
15425	return iter.NextWithContext(context.Background())
15426}
15427
15428// NotDone returns true if the enumeration should be started or is not yet complete.
15429func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
15430	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15431}
15432
15433// Response returns the raw server response from the last page request.
15434func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
15435	return iter.page.Response()
15436}
15437
15438// Value returns the current value or a zero-initialized value if the
15439// iterator has advanced beyond the end of the collection.
15440func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
15441	if !iter.page.NotDone() {
15442		return InterfaceIPConfiguration{}
15443	}
15444	return iter.page.Values()[iter.i]
15445}
15446
15447// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
15448func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
15449	return InterfaceIPConfigurationListResultIterator{page: page}
15450}
15451
15452// IsEmpty returns true if the ListResult contains no values.
15453func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
15454	return iiclr.Value == nil || len(*iiclr.Value) == 0
15455}
15456
15457// hasNextLink returns true if the NextLink is not empty.
15458func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
15459	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
15460}
15461
15462// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
15463// It returns nil if no more results exist.
15464func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
15465	if !iiclr.hasNextLink() {
15466		return nil, nil
15467	}
15468	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15469		autorest.AsJSON(),
15470		autorest.AsGet(),
15471		autorest.WithBaseURL(to.String(iiclr.NextLink)))
15472}
15473
15474// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
15475type InterfaceIPConfigurationListResultPage struct {
15476	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
15477	iiclr InterfaceIPConfigurationListResult
15478}
15479
15480// NextWithContext advances to the next page of values.  If there was an error making
15481// the request the page does not advance and the error is returned.
15482func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
15483	if tracing.IsEnabled() {
15484		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
15485		defer func() {
15486			sc := -1
15487			if page.Response().Response.Response != nil {
15488				sc = page.Response().Response.Response.StatusCode
15489			}
15490			tracing.EndSpan(ctx, sc, err)
15491		}()
15492	}
15493	for {
15494		next, err := page.fn(ctx, page.iiclr)
15495		if err != nil {
15496			return err
15497		}
15498		page.iiclr = next
15499		if !next.hasNextLink() || !next.IsEmpty() {
15500			break
15501		}
15502	}
15503	return nil
15504}
15505
15506// Next advances to the next page of values.  If there was an error making
15507// the request the page does not advance and the error is returned.
15508// Deprecated: Use NextWithContext() instead.
15509func (page *InterfaceIPConfigurationListResultPage) Next() error {
15510	return page.NextWithContext(context.Background())
15511}
15512
15513// NotDone returns true if the page enumeration should be started or is not yet complete.
15514func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
15515	return !page.iiclr.IsEmpty()
15516}
15517
15518// Response returns the raw server response from the last page request.
15519func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
15520	return page.iiclr
15521}
15522
15523// Values returns the slice of values for the current page or nil if there are no values.
15524func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
15525	if page.iiclr.IsEmpty() {
15526		return nil
15527	}
15528	return *page.iiclr.Value
15529}
15530
15531// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
15532func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
15533	return InterfaceIPConfigurationListResultPage{
15534		fn:    getNextPage,
15535		iiclr: cur,
15536	}
15537}
15538
15539// InterfaceIPConfigurationPrivateLinkConnectionProperties privateLinkConnection properties for the network
15540// interface.
15541type InterfaceIPConfigurationPrivateLinkConnectionProperties struct {
15542	// GroupID - READ-ONLY; The group ID for current private link connection.
15543	GroupID *string `json:"groupId,omitempty"`
15544	// RequiredMemberName - READ-ONLY; The required member name for current private link connection.
15545	RequiredMemberName *string `json:"requiredMemberName,omitempty"`
15546	// Fqdns - READ-ONLY; List of FQDNs for current private link connection.
15547	Fqdns *[]string `json:"fqdns,omitempty"`
15548}
15549
15550// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
15551type InterfaceIPConfigurationPropertiesFormat struct {
15552	// VirtualNetworkTaps - The reference to Virtual Network Taps.
15553	VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"`
15554	// ApplicationGatewayBackendAddressPools - The reference to ApplicationGatewayBackendAddressPool resource.
15555	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
15556	// LoadBalancerBackendAddressPools - The reference to LoadBalancerBackendAddressPool resource.
15557	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
15558	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
15559	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
15560	// PrivateIPAddress - Private IP address of the IP configuration.
15561	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
15562	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
15563	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
15564	// PrivateIPAddressVersion - Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPv4', 'IPv6'
15565	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
15566	// Subnet - Subnet bound to the IP configuration.
15567	Subnet *Subnet `json:"subnet,omitempty"`
15568	// Primary - Whether this is a primary customer address on the network interface.
15569	Primary *bool `json:"primary,omitempty"`
15570	// PublicIPAddress - Public IP address bound to the IP configuration.
15571	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
15572	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
15573	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
15574	// ProvisioningState - READ-ONLY; The provisioning state of the network interface IP configuration. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
15575	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15576	// PrivateLinkConnectionProperties - READ-ONLY; PrivateLinkConnection properties for the network interface.
15577	PrivateLinkConnectionProperties *InterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"`
15578}
15579
15580// MarshalJSON is the custom marshaler for InterfaceIPConfigurationPropertiesFormat.
15581func (iicpf InterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
15582	objectMap := make(map[string]interface{})
15583	if iicpf.VirtualNetworkTaps != nil {
15584		objectMap["virtualNetworkTaps"] = iicpf.VirtualNetworkTaps
15585	}
15586	if iicpf.ApplicationGatewayBackendAddressPools != nil {
15587		objectMap["applicationGatewayBackendAddressPools"] = iicpf.ApplicationGatewayBackendAddressPools
15588	}
15589	if iicpf.LoadBalancerBackendAddressPools != nil {
15590		objectMap["loadBalancerBackendAddressPools"] = iicpf.LoadBalancerBackendAddressPools
15591	}
15592	if iicpf.LoadBalancerInboundNatRules != nil {
15593		objectMap["loadBalancerInboundNatRules"] = iicpf.LoadBalancerInboundNatRules
15594	}
15595	if iicpf.PrivateIPAddress != nil {
15596		objectMap["privateIPAddress"] = iicpf.PrivateIPAddress
15597	}
15598	if iicpf.PrivateIPAllocationMethod != "" {
15599		objectMap["privateIPAllocationMethod"] = iicpf.PrivateIPAllocationMethod
15600	}
15601	if iicpf.PrivateIPAddressVersion != "" {
15602		objectMap["privateIPAddressVersion"] = iicpf.PrivateIPAddressVersion
15603	}
15604	if iicpf.Subnet != nil {
15605		objectMap["subnet"] = iicpf.Subnet
15606	}
15607	if iicpf.Primary != nil {
15608		objectMap["primary"] = iicpf.Primary
15609	}
15610	if iicpf.PublicIPAddress != nil {
15611		objectMap["publicIPAddress"] = iicpf.PublicIPAddress
15612	}
15613	if iicpf.ApplicationSecurityGroups != nil {
15614		objectMap["applicationSecurityGroups"] = iicpf.ApplicationSecurityGroups
15615	}
15616	return json.Marshal(objectMap)
15617}
15618
15619// InterfaceListResult response for the ListNetworkInterface API service call.
15620type InterfaceListResult struct {
15621	autorest.Response `json:"-"`
15622	// Value - A list of network interfaces in a resource group.
15623	Value *[]Interface `json:"value,omitempty"`
15624	// NextLink - READ-ONLY; The URL to get the next set of results.
15625	NextLink *string `json:"nextLink,omitempty"`
15626}
15627
15628// MarshalJSON is the custom marshaler for InterfaceListResult.
15629func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
15630	objectMap := make(map[string]interface{})
15631	if ilr.Value != nil {
15632		objectMap["value"] = ilr.Value
15633	}
15634	return json.Marshal(objectMap)
15635}
15636
15637// InterfaceListResultIterator provides access to a complete listing of Interface values.
15638type InterfaceListResultIterator struct {
15639	i    int
15640	page InterfaceListResultPage
15641}
15642
15643// NextWithContext advances to the next value.  If there was an error making
15644// the request the iterator does not advance and the error is returned.
15645func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
15646	if tracing.IsEnabled() {
15647		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
15648		defer func() {
15649			sc := -1
15650			if iter.Response().Response.Response != nil {
15651				sc = iter.Response().Response.Response.StatusCode
15652			}
15653			tracing.EndSpan(ctx, sc, err)
15654		}()
15655	}
15656	iter.i++
15657	if iter.i < len(iter.page.Values()) {
15658		return nil
15659	}
15660	err = iter.page.NextWithContext(ctx)
15661	if err != nil {
15662		iter.i--
15663		return err
15664	}
15665	iter.i = 0
15666	return nil
15667}
15668
15669// Next advances to the next value.  If there was an error making
15670// the request the iterator does not advance and the error is returned.
15671// Deprecated: Use NextWithContext() instead.
15672func (iter *InterfaceListResultIterator) Next() error {
15673	return iter.NextWithContext(context.Background())
15674}
15675
15676// NotDone returns true if the enumeration should be started or is not yet complete.
15677func (iter InterfaceListResultIterator) NotDone() bool {
15678	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15679}
15680
15681// Response returns the raw server response from the last page request.
15682func (iter InterfaceListResultIterator) Response() InterfaceListResult {
15683	return iter.page.Response()
15684}
15685
15686// Value returns the current value or a zero-initialized value if the
15687// iterator has advanced beyond the end of the collection.
15688func (iter InterfaceListResultIterator) Value() Interface {
15689	if !iter.page.NotDone() {
15690		return Interface{}
15691	}
15692	return iter.page.Values()[iter.i]
15693}
15694
15695// Creates a new instance of the InterfaceListResultIterator type.
15696func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
15697	return InterfaceListResultIterator{page: page}
15698}
15699
15700// IsEmpty returns true if the ListResult contains no values.
15701func (ilr InterfaceListResult) IsEmpty() bool {
15702	return ilr.Value == nil || len(*ilr.Value) == 0
15703}
15704
15705// hasNextLink returns true if the NextLink is not empty.
15706func (ilr InterfaceListResult) hasNextLink() bool {
15707	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
15708}
15709
15710// interfaceListResultPreparer prepares a request to retrieve the next set of results.
15711// It returns nil if no more results exist.
15712func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
15713	if !ilr.hasNextLink() {
15714		return nil, nil
15715	}
15716	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15717		autorest.AsJSON(),
15718		autorest.AsGet(),
15719		autorest.WithBaseURL(to.String(ilr.NextLink)))
15720}
15721
15722// InterfaceListResultPage contains a page of Interface values.
15723type InterfaceListResultPage struct {
15724	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
15725	ilr InterfaceListResult
15726}
15727
15728// NextWithContext advances to the next page of values.  If there was an error making
15729// the request the page does not advance and the error is returned.
15730func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
15731	if tracing.IsEnabled() {
15732		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
15733		defer func() {
15734			sc := -1
15735			if page.Response().Response.Response != nil {
15736				sc = page.Response().Response.Response.StatusCode
15737			}
15738			tracing.EndSpan(ctx, sc, err)
15739		}()
15740	}
15741	for {
15742		next, err := page.fn(ctx, page.ilr)
15743		if err != nil {
15744			return err
15745		}
15746		page.ilr = next
15747		if !next.hasNextLink() || !next.IsEmpty() {
15748			break
15749		}
15750	}
15751	return nil
15752}
15753
15754// Next advances to the next page of values.  If there was an error making
15755// the request the page does not advance and the error is returned.
15756// Deprecated: Use NextWithContext() instead.
15757func (page *InterfaceListResultPage) Next() error {
15758	return page.NextWithContext(context.Background())
15759}
15760
15761// NotDone returns true if the page enumeration should be started or is not yet complete.
15762func (page InterfaceListResultPage) NotDone() bool {
15763	return !page.ilr.IsEmpty()
15764}
15765
15766// Response returns the raw server response from the last page request.
15767func (page InterfaceListResultPage) Response() InterfaceListResult {
15768	return page.ilr
15769}
15770
15771// Values returns the slice of values for the current page or nil if there are no values.
15772func (page InterfaceListResultPage) Values() []Interface {
15773	if page.ilr.IsEmpty() {
15774		return nil
15775	}
15776	return *page.ilr.Value
15777}
15778
15779// Creates a new instance of the InterfaceListResultPage type.
15780func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
15781	return InterfaceListResultPage{
15782		fn:  getNextPage,
15783		ilr: cur,
15784	}
15785}
15786
15787// InterfaceLoadBalancerListResult response for list ip configurations API service call.
15788type InterfaceLoadBalancerListResult struct {
15789	autorest.Response `json:"-"`
15790	// Value - A list of load balancers.
15791	Value *[]LoadBalancer `json:"value,omitempty"`
15792	// NextLink - READ-ONLY; The URL to get the next set of results.
15793	NextLink *string `json:"nextLink,omitempty"`
15794}
15795
15796// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
15797func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
15798	objectMap := make(map[string]interface{})
15799	if ilblr.Value != nil {
15800		objectMap["value"] = ilblr.Value
15801	}
15802	return json.Marshal(objectMap)
15803}
15804
15805// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
15806type InterfaceLoadBalancerListResultIterator struct {
15807	i    int
15808	page InterfaceLoadBalancerListResultPage
15809}
15810
15811// NextWithContext advances to the next value.  If there was an error making
15812// the request the iterator does not advance and the error is returned.
15813func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
15814	if tracing.IsEnabled() {
15815		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
15816		defer func() {
15817			sc := -1
15818			if iter.Response().Response.Response != nil {
15819				sc = iter.Response().Response.Response.StatusCode
15820			}
15821			tracing.EndSpan(ctx, sc, err)
15822		}()
15823	}
15824	iter.i++
15825	if iter.i < len(iter.page.Values()) {
15826		return nil
15827	}
15828	err = iter.page.NextWithContext(ctx)
15829	if err != nil {
15830		iter.i--
15831		return err
15832	}
15833	iter.i = 0
15834	return nil
15835}
15836
15837// Next advances to the next value.  If there was an error making
15838// the request the iterator does not advance and the error is returned.
15839// Deprecated: Use NextWithContext() instead.
15840func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
15841	return iter.NextWithContext(context.Background())
15842}
15843
15844// NotDone returns true if the enumeration should be started or is not yet complete.
15845func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
15846	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15847}
15848
15849// Response returns the raw server response from the last page request.
15850func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
15851	return iter.page.Response()
15852}
15853
15854// Value returns the current value or a zero-initialized value if the
15855// iterator has advanced beyond the end of the collection.
15856func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
15857	if !iter.page.NotDone() {
15858		return LoadBalancer{}
15859	}
15860	return iter.page.Values()[iter.i]
15861}
15862
15863// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
15864func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
15865	return InterfaceLoadBalancerListResultIterator{page: page}
15866}
15867
15868// IsEmpty returns true if the ListResult contains no values.
15869func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
15870	return ilblr.Value == nil || len(*ilblr.Value) == 0
15871}
15872
15873// hasNextLink returns true if the NextLink is not empty.
15874func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
15875	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
15876}
15877
15878// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
15879// It returns nil if no more results exist.
15880func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
15881	if !ilblr.hasNextLink() {
15882		return nil, nil
15883	}
15884	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15885		autorest.AsJSON(),
15886		autorest.AsGet(),
15887		autorest.WithBaseURL(to.String(ilblr.NextLink)))
15888}
15889
15890// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
15891type InterfaceLoadBalancerListResultPage struct {
15892	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
15893	ilblr InterfaceLoadBalancerListResult
15894}
15895
15896// NextWithContext advances to the next page of values.  If there was an error making
15897// the request the page does not advance and the error is returned.
15898func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
15899	if tracing.IsEnabled() {
15900		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
15901		defer func() {
15902			sc := -1
15903			if page.Response().Response.Response != nil {
15904				sc = page.Response().Response.Response.StatusCode
15905			}
15906			tracing.EndSpan(ctx, sc, err)
15907		}()
15908	}
15909	for {
15910		next, err := page.fn(ctx, page.ilblr)
15911		if err != nil {
15912			return err
15913		}
15914		page.ilblr = next
15915		if !next.hasNextLink() || !next.IsEmpty() {
15916			break
15917		}
15918	}
15919	return nil
15920}
15921
15922// Next advances to the next page of values.  If there was an error making
15923// the request the page does not advance and the error is returned.
15924// Deprecated: Use NextWithContext() instead.
15925func (page *InterfaceLoadBalancerListResultPage) Next() error {
15926	return page.NextWithContext(context.Background())
15927}
15928
15929// NotDone returns true if the page enumeration should be started or is not yet complete.
15930func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
15931	return !page.ilblr.IsEmpty()
15932}
15933
15934// Response returns the raw server response from the last page request.
15935func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
15936	return page.ilblr
15937}
15938
15939// Values returns the slice of values for the current page or nil if there are no values.
15940func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
15941	if page.ilblr.IsEmpty() {
15942		return nil
15943	}
15944	return *page.ilblr.Value
15945}
15946
15947// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
15948func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
15949	return InterfaceLoadBalancerListResultPage{
15950		fn:    getNextPage,
15951		ilblr: cur,
15952	}
15953}
15954
15955// InterfacePropertiesFormat networkInterface properties.
15956type InterfacePropertiesFormat struct {
15957	// VirtualMachine - READ-ONLY; The reference to a virtual machine.
15958	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
15959	// NetworkSecurityGroup - The reference to the NetworkSecurityGroup resource.
15960	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
15961	// PrivateEndpoint - READ-ONLY; A reference to the private endpoint to which the network interface is linked.
15962	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
15963	// IPConfigurations - A list of IPConfigurations of the network interface.
15964	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
15965	// TapConfigurations - READ-ONLY; A list of TapConfigurations of the network interface.
15966	TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"`
15967	// DNSSettings - The DNS settings in network interface.
15968	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
15969	// MacAddress - READ-ONLY; The MAC address of the network interface.
15970	MacAddress *string `json:"macAddress,omitempty"`
15971	// Primary - READ-ONLY; Whether this is a primary network interface on a virtual machine.
15972	Primary *bool `json:"primary,omitempty"`
15973	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
15974	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
15975	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
15976	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
15977	// HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources.
15978	HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"`
15979	// ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource.
15980	ResourceGUID *string `json:"resourceGuid,omitempty"`
15981	// ProvisioningState - READ-ONLY; The provisioning state of the network interface resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
15982	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15983}
15984
15985// MarshalJSON is the custom marshaler for InterfacePropertiesFormat.
15986func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
15987	objectMap := make(map[string]interface{})
15988	if ipf.NetworkSecurityGroup != nil {
15989		objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup
15990	}
15991	if ipf.IPConfigurations != nil {
15992		objectMap["ipConfigurations"] = ipf.IPConfigurations
15993	}
15994	if ipf.DNSSettings != nil {
15995		objectMap["dnsSettings"] = ipf.DNSSettings
15996	}
15997	if ipf.EnableAcceleratedNetworking != nil {
15998		objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking
15999	}
16000	if ipf.EnableIPForwarding != nil {
16001		objectMap["enableIPForwarding"] = ipf.EnableIPForwarding
16002	}
16003	return json.Marshal(objectMap)
16004}
16005
16006// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16007// long-running operation.
16008type InterfacesCreateOrUpdateFuture struct {
16009	azure.FutureAPI
16010	// Result returns the result of the asynchronous operation.
16011	// If the operation has not completed it will return an error.
16012	Result func(InterfacesClient) (Interface, error)
16013}
16014
16015// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16016// operation.
16017type InterfacesDeleteFuture struct {
16018	azure.FutureAPI
16019	// Result returns the result of the asynchronous operation.
16020	// If the operation has not completed it will return an error.
16021	Result func(InterfacesClient) (autorest.Response, error)
16022}
16023
16024// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
16025// long-running operation.
16026type InterfacesGetEffectiveRouteTableFuture struct {
16027	azure.FutureAPI
16028	// Result returns the result of the asynchronous operation.
16029	// If the operation has not completed it will return an error.
16030	Result func(InterfacesClient) (EffectiveRouteListResult, error)
16031}
16032
16033// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
16034// results of a long-running operation.
16035type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
16036	azure.FutureAPI
16037	// Result returns the result of the asynchronous operation.
16038	// If the operation has not completed it will return an error.
16039	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
16040}
16041
16042// InterfaceTapConfiguration tap configuration in a Network Interface.
16043type InterfaceTapConfiguration struct {
16044	autorest.Response `json:"-"`
16045	// InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration.
16046	*InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"`
16047	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16048	Name *string `json:"name,omitempty"`
16049	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
16050	Etag *string `json:"etag,omitempty"`
16051	// Type - READ-ONLY; Sub Resource type.
16052	Type *string `json:"type,omitempty"`
16053	// ID - Resource ID.
16054	ID *string `json:"id,omitempty"`
16055}
16056
16057// MarshalJSON is the custom marshaler for InterfaceTapConfiguration.
16058func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) {
16059	objectMap := make(map[string]interface{})
16060	if itc.InterfaceTapConfigurationPropertiesFormat != nil {
16061		objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat
16062	}
16063	if itc.Name != nil {
16064		objectMap["name"] = itc.Name
16065	}
16066	if itc.ID != nil {
16067		objectMap["id"] = itc.ID
16068	}
16069	return json.Marshal(objectMap)
16070}
16071
16072// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct.
16073func (itc *InterfaceTapConfiguration) UnmarshalJSON(body []byte) error {
16074	var m map[string]*json.RawMessage
16075	err := json.Unmarshal(body, &m)
16076	if err != nil {
16077		return err
16078	}
16079	for k, v := range m {
16080		switch k {
16081		case "properties":
16082			if v != nil {
16083				var interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat
16084				err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat)
16085				if err != nil {
16086					return err
16087				}
16088				itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat
16089			}
16090		case "name":
16091			if v != nil {
16092				var name string
16093				err = json.Unmarshal(*v, &name)
16094				if err != nil {
16095					return err
16096				}
16097				itc.Name = &name
16098			}
16099		case "etag":
16100			if v != nil {
16101				var etag string
16102				err = json.Unmarshal(*v, &etag)
16103				if err != nil {
16104					return err
16105				}
16106				itc.Etag = &etag
16107			}
16108		case "type":
16109			if v != nil {
16110				var typeVar string
16111				err = json.Unmarshal(*v, &typeVar)
16112				if err != nil {
16113					return err
16114				}
16115				itc.Type = &typeVar
16116			}
16117		case "id":
16118			if v != nil {
16119				var ID string
16120				err = json.Unmarshal(*v, &ID)
16121				if err != nil {
16122					return err
16123				}
16124				itc.ID = &ID
16125			}
16126		}
16127	}
16128
16129	return nil
16130}
16131
16132// InterfaceTapConfigurationListResult response for list tap configurations API service call.
16133type InterfaceTapConfigurationListResult struct {
16134	autorest.Response `json:"-"`
16135	// Value - A list of tap configurations.
16136	Value *[]InterfaceTapConfiguration `json:"value,omitempty"`
16137	// NextLink - READ-ONLY; The URL to get the next set of results.
16138	NextLink *string `json:"nextLink,omitempty"`
16139}
16140
16141// MarshalJSON is the custom marshaler for InterfaceTapConfigurationListResult.
16142func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) {
16143	objectMap := make(map[string]interface{})
16144	if itclr.Value != nil {
16145		objectMap["value"] = itclr.Value
16146	}
16147	return json.Marshal(objectMap)
16148}
16149
16150// InterfaceTapConfigurationListResultIterator provides access to a complete listing of
16151// InterfaceTapConfiguration values.
16152type InterfaceTapConfigurationListResultIterator struct {
16153	i    int
16154	page InterfaceTapConfigurationListResultPage
16155}
16156
16157// NextWithContext advances to the next value.  If there was an error making
16158// the request the iterator does not advance and the error is returned.
16159func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
16160	if tracing.IsEnabled() {
16161		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.NextWithContext")
16162		defer func() {
16163			sc := -1
16164			if iter.Response().Response.Response != nil {
16165				sc = iter.Response().Response.Response.StatusCode
16166			}
16167			tracing.EndSpan(ctx, sc, err)
16168		}()
16169	}
16170	iter.i++
16171	if iter.i < len(iter.page.Values()) {
16172		return nil
16173	}
16174	err = iter.page.NextWithContext(ctx)
16175	if err != nil {
16176		iter.i--
16177		return err
16178	}
16179	iter.i = 0
16180	return nil
16181}
16182
16183// Next advances to the next value.  If there was an error making
16184// the request the iterator does not advance and the error is returned.
16185// Deprecated: Use NextWithContext() instead.
16186func (iter *InterfaceTapConfigurationListResultIterator) Next() error {
16187	return iter.NextWithContext(context.Background())
16188}
16189
16190// NotDone returns true if the enumeration should be started or is not yet complete.
16191func (iter InterfaceTapConfigurationListResultIterator) NotDone() bool {
16192	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16193}
16194
16195// Response returns the raw server response from the last page request.
16196func (iter InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult {
16197	return iter.page.Response()
16198}
16199
16200// Value returns the current value or a zero-initialized value if the
16201// iterator has advanced beyond the end of the collection.
16202func (iter InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration {
16203	if !iter.page.NotDone() {
16204		return InterfaceTapConfiguration{}
16205	}
16206	return iter.page.Values()[iter.i]
16207}
16208
16209// Creates a new instance of the InterfaceTapConfigurationListResultIterator type.
16210func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator {
16211	return InterfaceTapConfigurationListResultIterator{page: page}
16212}
16213
16214// IsEmpty returns true if the ListResult contains no values.
16215func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
16216	return itclr.Value == nil || len(*itclr.Value) == 0
16217}
16218
16219// hasNextLink returns true if the NextLink is not empty.
16220func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool {
16221	return itclr.NextLink != nil && len(*itclr.NextLink) != 0
16222}
16223
16224// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results.
16225// It returns nil if no more results exist.
16226func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
16227	if !itclr.hasNextLink() {
16228		return nil, nil
16229	}
16230	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16231		autorest.AsJSON(),
16232		autorest.AsGet(),
16233		autorest.WithBaseURL(to.String(itclr.NextLink)))
16234}
16235
16236// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values.
16237type InterfaceTapConfigurationListResultPage struct {
16238	fn    func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
16239	itclr InterfaceTapConfigurationListResult
16240}
16241
16242// NextWithContext advances to the next page of values.  If there was an error making
16243// the request the page does not advance and the error is returned.
16244func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
16245	if tracing.IsEnabled() {
16246		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext")
16247		defer func() {
16248			sc := -1
16249			if page.Response().Response.Response != nil {
16250				sc = page.Response().Response.Response.StatusCode
16251			}
16252			tracing.EndSpan(ctx, sc, err)
16253		}()
16254	}
16255	for {
16256		next, err := page.fn(ctx, page.itclr)
16257		if err != nil {
16258			return err
16259		}
16260		page.itclr = next
16261		if !next.hasNextLink() || !next.IsEmpty() {
16262			break
16263		}
16264	}
16265	return nil
16266}
16267
16268// Next advances to the next page of values.  If there was an error making
16269// the request the page does not advance and the error is returned.
16270// Deprecated: Use NextWithContext() instead.
16271func (page *InterfaceTapConfigurationListResultPage) Next() error {
16272	return page.NextWithContext(context.Background())
16273}
16274
16275// NotDone returns true if the page enumeration should be started or is not yet complete.
16276func (page InterfaceTapConfigurationListResultPage) NotDone() bool {
16277	return !page.itclr.IsEmpty()
16278}
16279
16280// Response returns the raw server response from the last page request.
16281func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult {
16282	return page.itclr
16283}
16284
16285// Values returns the slice of values for the current page or nil if there are no values.
16286func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration {
16287	if page.itclr.IsEmpty() {
16288		return nil
16289	}
16290	return *page.itclr.Value
16291}
16292
16293// Creates a new instance of the InterfaceTapConfigurationListResultPage type.
16294func NewInterfaceTapConfigurationListResultPage(cur InterfaceTapConfigurationListResult, getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage {
16295	return InterfaceTapConfigurationListResultPage{
16296		fn:    getNextPage,
16297		itclr: cur,
16298	}
16299}
16300
16301// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration.
16302type InterfaceTapConfigurationPropertiesFormat struct {
16303	// VirtualNetworkTap - The reference to the Virtual Network Tap resource.
16304	VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"`
16305	// ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
16306	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16307}
16308
16309// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat.
16310func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
16311	objectMap := make(map[string]interface{})
16312	if itcpf.VirtualNetworkTap != nil {
16313		objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap
16314	}
16315	return json.Marshal(objectMap)
16316}
16317
16318// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
16319// of a long-running operation.
16320type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
16321	azure.FutureAPI
16322	// Result returns the result of the asynchronous operation.
16323	// If the operation has not completed it will return an error.
16324	Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error)
16325}
16326
16327// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
16328// long-running operation.
16329type InterfaceTapConfigurationsDeleteFuture struct {
16330	azure.FutureAPI
16331	// Result returns the result of the asynchronous operation.
16332	// If the operation has not completed it will return an error.
16333	Result func(InterfaceTapConfigurationsClient) (autorest.Response, error)
16334}
16335
16336// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call.
16337type IPAddressAvailabilityResult struct {
16338	autorest.Response `json:"-"`
16339	// Available - Private IP address availability.
16340	Available *bool `json:"available,omitempty"`
16341	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
16342	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
16343}
16344
16345// IPAllocation ipAllocation resource.
16346type IPAllocation struct {
16347	autorest.Response `json:"-"`
16348	// IPAllocationPropertiesFormat - Properties of the IpAllocation.
16349	*IPAllocationPropertiesFormat `json:"properties,omitempty"`
16350	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
16351	Etag *string `json:"etag,omitempty"`
16352	// ID - Resource ID.
16353	ID *string `json:"id,omitempty"`
16354	// Name - READ-ONLY; Resource name.
16355	Name *string `json:"name,omitempty"`
16356	// Type - READ-ONLY; Resource type.
16357	Type *string `json:"type,omitempty"`
16358	// Location - Resource location.
16359	Location *string `json:"location,omitempty"`
16360	// Tags - Resource tags.
16361	Tags map[string]*string `json:"tags"`
16362}
16363
16364// MarshalJSON is the custom marshaler for IPAllocation.
16365func (ia IPAllocation) MarshalJSON() ([]byte, error) {
16366	objectMap := make(map[string]interface{})
16367	if ia.IPAllocationPropertiesFormat != nil {
16368		objectMap["properties"] = ia.IPAllocationPropertiesFormat
16369	}
16370	if ia.ID != nil {
16371		objectMap["id"] = ia.ID
16372	}
16373	if ia.Location != nil {
16374		objectMap["location"] = ia.Location
16375	}
16376	if ia.Tags != nil {
16377		objectMap["tags"] = ia.Tags
16378	}
16379	return json.Marshal(objectMap)
16380}
16381
16382// UnmarshalJSON is the custom unmarshaler for IPAllocation struct.
16383func (ia *IPAllocation) UnmarshalJSON(body []byte) error {
16384	var m map[string]*json.RawMessage
16385	err := json.Unmarshal(body, &m)
16386	if err != nil {
16387		return err
16388	}
16389	for k, v := range m {
16390		switch k {
16391		case "properties":
16392			if v != nil {
16393				var IPAllocationPropertiesFormat IPAllocationPropertiesFormat
16394				err = json.Unmarshal(*v, &IPAllocationPropertiesFormat)
16395				if err != nil {
16396					return err
16397				}
16398				ia.IPAllocationPropertiesFormat = &IPAllocationPropertiesFormat
16399			}
16400		case "etag":
16401			if v != nil {
16402				var etag string
16403				err = json.Unmarshal(*v, &etag)
16404				if err != nil {
16405					return err
16406				}
16407				ia.Etag = &etag
16408			}
16409		case "id":
16410			if v != nil {
16411				var ID string
16412				err = json.Unmarshal(*v, &ID)
16413				if err != nil {
16414					return err
16415				}
16416				ia.ID = &ID
16417			}
16418		case "name":
16419			if v != nil {
16420				var name string
16421				err = json.Unmarshal(*v, &name)
16422				if err != nil {
16423					return err
16424				}
16425				ia.Name = &name
16426			}
16427		case "type":
16428			if v != nil {
16429				var typeVar string
16430				err = json.Unmarshal(*v, &typeVar)
16431				if err != nil {
16432					return err
16433				}
16434				ia.Type = &typeVar
16435			}
16436		case "location":
16437			if v != nil {
16438				var location string
16439				err = json.Unmarshal(*v, &location)
16440				if err != nil {
16441					return err
16442				}
16443				ia.Location = &location
16444			}
16445		case "tags":
16446			if v != nil {
16447				var tags map[string]*string
16448				err = json.Unmarshal(*v, &tags)
16449				if err != nil {
16450					return err
16451				}
16452				ia.Tags = tags
16453			}
16454		}
16455	}
16456
16457	return nil
16458}
16459
16460// IPAllocationListResult response for the ListIpAllocations API service call.
16461type IPAllocationListResult struct {
16462	autorest.Response `json:"-"`
16463	// Value - A list of IpAllocation resources.
16464	Value *[]IPAllocation `json:"value,omitempty"`
16465	// NextLink - The URL to get the next set of results.
16466	NextLink *string `json:"nextLink,omitempty"`
16467}
16468
16469// IPAllocationListResultIterator provides access to a complete listing of IPAllocation values.
16470type IPAllocationListResultIterator struct {
16471	i    int
16472	page IPAllocationListResultPage
16473}
16474
16475// NextWithContext advances to the next value.  If there was an error making
16476// the request the iterator does not advance and the error is returned.
16477func (iter *IPAllocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
16478	if tracing.IsEnabled() {
16479		ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationListResultIterator.NextWithContext")
16480		defer func() {
16481			sc := -1
16482			if iter.Response().Response.Response != nil {
16483				sc = iter.Response().Response.Response.StatusCode
16484			}
16485			tracing.EndSpan(ctx, sc, err)
16486		}()
16487	}
16488	iter.i++
16489	if iter.i < len(iter.page.Values()) {
16490		return nil
16491	}
16492	err = iter.page.NextWithContext(ctx)
16493	if err != nil {
16494		iter.i--
16495		return err
16496	}
16497	iter.i = 0
16498	return nil
16499}
16500
16501// Next advances to the next value.  If there was an error making
16502// the request the iterator does not advance and the error is returned.
16503// Deprecated: Use NextWithContext() instead.
16504func (iter *IPAllocationListResultIterator) Next() error {
16505	return iter.NextWithContext(context.Background())
16506}
16507
16508// NotDone returns true if the enumeration should be started or is not yet complete.
16509func (iter IPAllocationListResultIterator) NotDone() bool {
16510	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16511}
16512
16513// Response returns the raw server response from the last page request.
16514func (iter IPAllocationListResultIterator) Response() IPAllocationListResult {
16515	return iter.page.Response()
16516}
16517
16518// Value returns the current value or a zero-initialized value if the
16519// iterator has advanced beyond the end of the collection.
16520func (iter IPAllocationListResultIterator) Value() IPAllocation {
16521	if !iter.page.NotDone() {
16522		return IPAllocation{}
16523	}
16524	return iter.page.Values()[iter.i]
16525}
16526
16527// Creates a new instance of the IPAllocationListResultIterator type.
16528func NewIPAllocationListResultIterator(page IPAllocationListResultPage) IPAllocationListResultIterator {
16529	return IPAllocationListResultIterator{page: page}
16530}
16531
16532// IsEmpty returns true if the ListResult contains no values.
16533func (ialr IPAllocationListResult) IsEmpty() bool {
16534	return ialr.Value == nil || len(*ialr.Value) == 0
16535}
16536
16537// hasNextLink returns true if the NextLink is not empty.
16538func (ialr IPAllocationListResult) hasNextLink() bool {
16539	return ialr.NextLink != nil && len(*ialr.NextLink) != 0
16540}
16541
16542// iPAllocationListResultPreparer prepares a request to retrieve the next set of results.
16543// It returns nil if no more results exist.
16544func (ialr IPAllocationListResult) iPAllocationListResultPreparer(ctx context.Context) (*http.Request, error) {
16545	if !ialr.hasNextLink() {
16546		return nil, nil
16547	}
16548	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16549		autorest.AsJSON(),
16550		autorest.AsGet(),
16551		autorest.WithBaseURL(to.String(ialr.NextLink)))
16552}
16553
16554// IPAllocationListResultPage contains a page of IPAllocation values.
16555type IPAllocationListResultPage struct {
16556	fn   func(context.Context, IPAllocationListResult) (IPAllocationListResult, error)
16557	ialr IPAllocationListResult
16558}
16559
16560// NextWithContext advances to the next page of values.  If there was an error making
16561// the request the page does not advance and the error is returned.
16562func (page *IPAllocationListResultPage) NextWithContext(ctx context.Context) (err error) {
16563	if tracing.IsEnabled() {
16564		ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationListResultPage.NextWithContext")
16565		defer func() {
16566			sc := -1
16567			if page.Response().Response.Response != nil {
16568				sc = page.Response().Response.Response.StatusCode
16569			}
16570			tracing.EndSpan(ctx, sc, err)
16571		}()
16572	}
16573	for {
16574		next, err := page.fn(ctx, page.ialr)
16575		if err != nil {
16576			return err
16577		}
16578		page.ialr = next
16579		if !next.hasNextLink() || !next.IsEmpty() {
16580			break
16581		}
16582	}
16583	return nil
16584}
16585
16586// Next advances to the next page of values.  If there was an error making
16587// the request the page does not advance and the error is returned.
16588// Deprecated: Use NextWithContext() instead.
16589func (page *IPAllocationListResultPage) Next() error {
16590	return page.NextWithContext(context.Background())
16591}
16592
16593// NotDone returns true if the page enumeration should be started or is not yet complete.
16594func (page IPAllocationListResultPage) NotDone() bool {
16595	return !page.ialr.IsEmpty()
16596}
16597
16598// Response returns the raw server response from the last page request.
16599func (page IPAllocationListResultPage) Response() IPAllocationListResult {
16600	return page.ialr
16601}
16602
16603// Values returns the slice of values for the current page or nil if there are no values.
16604func (page IPAllocationListResultPage) Values() []IPAllocation {
16605	if page.ialr.IsEmpty() {
16606		return nil
16607	}
16608	return *page.ialr.Value
16609}
16610
16611// Creates a new instance of the IPAllocationListResultPage type.
16612func NewIPAllocationListResultPage(cur IPAllocationListResult, getNextPage func(context.Context, IPAllocationListResult) (IPAllocationListResult, error)) IPAllocationListResultPage {
16613	return IPAllocationListResultPage{
16614		fn:   getNextPage,
16615		ialr: cur,
16616	}
16617}
16618
16619// IPAllocationPropertiesFormat properties of the IpAllocation.
16620type IPAllocationPropertiesFormat struct {
16621	// Subnet - READ-ONLY; The Subnet that using the prefix of this IpAllocation resource.
16622	Subnet *SubResource `json:"subnet,omitempty"`
16623	// VirtualNetwork - READ-ONLY; The VirtualNetwork that using the prefix of this IpAllocation resource.
16624	VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"`
16625	// Type - The type for the IpAllocation. Possible values include: 'Undefined', 'Hypernet'
16626	Type IPAllocationType `json:"type,omitempty"`
16627	// Prefix - The address prefix for the IpAllocation.
16628	Prefix *string `json:"prefix,omitempty"`
16629	// PrefixLength - The address prefix length for the IpAllocation.
16630	PrefixLength *int32 `json:"prefixLength,omitempty"`
16631	// PrefixType - The address prefix Type for the IpAllocation. Possible values include: 'IPv4', 'IPv6'
16632	PrefixType IPVersion `json:"prefixType,omitempty"`
16633	// IpamAllocationID - The IPAM allocation ID.
16634	IpamAllocationID *string `json:"ipamAllocationId,omitempty"`
16635	// AllocationTags - IpAllocation tags.
16636	AllocationTags map[string]*string `json:"allocationTags"`
16637}
16638
16639// MarshalJSON is the custom marshaler for IPAllocationPropertiesFormat.
16640func (iapf IPAllocationPropertiesFormat) MarshalJSON() ([]byte, error) {
16641	objectMap := make(map[string]interface{})
16642	if iapf.Type != "" {
16643		objectMap["type"] = iapf.Type
16644	}
16645	if iapf.Prefix != nil {
16646		objectMap["prefix"] = iapf.Prefix
16647	}
16648	if iapf.PrefixLength != nil {
16649		objectMap["prefixLength"] = iapf.PrefixLength
16650	}
16651	if iapf.PrefixType != "" {
16652		objectMap["prefixType"] = iapf.PrefixType
16653	}
16654	if iapf.IpamAllocationID != nil {
16655		objectMap["ipamAllocationId"] = iapf.IpamAllocationID
16656	}
16657	if iapf.AllocationTags != nil {
16658		objectMap["allocationTags"] = iapf.AllocationTags
16659	}
16660	return json.Marshal(objectMap)
16661}
16662
16663// IPAllocationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16664// long-running operation.
16665type IPAllocationsCreateOrUpdateFuture struct {
16666	azure.FutureAPI
16667	// Result returns the result of the asynchronous operation.
16668	// If the operation has not completed it will return an error.
16669	Result func(IPAllocationsClient) (IPAllocation, error)
16670}
16671
16672// IPAllocationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16673// operation.
16674type IPAllocationsDeleteFuture struct {
16675	azure.FutureAPI
16676	// Result returns the result of the asynchronous operation.
16677	// If the operation has not completed it will return an error.
16678	Result func(IPAllocationsClient) (autorest.Response, error)
16679}
16680
16681// IPConfiguration IP configuration.
16682type IPConfiguration struct {
16683	// IPConfigurationPropertiesFormat - Properties of the IP configuration.
16684	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
16685	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16686	Name *string `json:"name,omitempty"`
16687	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
16688	Etag *string `json:"etag,omitempty"`
16689	// ID - Resource ID.
16690	ID *string `json:"id,omitempty"`
16691}
16692
16693// MarshalJSON is the custom marshaler for IPConfiguration.
16694func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
16695	objectMap := make(map[string]interface{})
16696	if ic.IPConfigurationPropertiesFormat != nil {
16697		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
16698	}
16699	if ic.Name != nil {
16700		objectMap["name"] = ic.Name
16701	}
16702	if ic.ID != nil {
16703		objectMap["id"] = ic.ID
16704	}
16705	return json.Marshal(objectMap)
16706}
16707
16708// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
16709func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
16710	var m map[string]*json.RawMessage
16711	err := json.Unmarshal(body, &m)
16712	if err != nil {
16713		return err
16714	}
16715	for k, v := range m {
16716		switch k {
16717		case "properties":
16718			if v != nil {
16719				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
16720				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
16721				if err != nil {
16722					return err
16723				}
16724				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
16725			}
16726		case "name":
16727			if v != nil {
16728				var name string
16729				err = json.Unmarshal(*v, &name)
16730				if err != nil {
16731					return err
16732				}
16733				ic.Name = &name
16734			}
16735		case "etag":
16736			if v != nil {
16737				var etag string
16738				err = json.Unmarshal(*v, &etag)
16739				if err != nil {
16740					return err
16741				}
16742				ic.Etag = &etag
16743			}
16744		case "id":
16745			if v != nil {
16746				var ID string
16747				err = json.Unmarshal(*v, &ID)
16748				if err != nil {
16749					return err
16750				}
16751				ic.ID = &ID
16752			}
16753		}
16754	}
16755
16756	return nil
16757}
16758
16759// IPConfigurationBgpPeeringAddress properties of IPConfigurationBgpPeeringAddress.
16760type IPConfigurationBgpPeeringAddress struct {
16761	// IpconfigurationID - The ID of IP configuration which belongs to gateway.
16762	IpconfigurationID *string `json:"ipconfigurationId,omitempty"`
16763	// DefaultBgpIPAddresses - READ-ONLY; The list of default BGP peering addresses which belong to IP configuration.
16764	DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"`
16765	// CustomBgpIPAddresses - The list of custom BGP peering addresses which belong to IP configuration.
16766	CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"`
16767	// TunnelIPAddresses - READ-ONLY; The list of tunnel public IP addresses which belong to IP configuration.
16768	TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"`
16769}
16770
16771// MarshalJSON is the custom marshaler for IPConfigurationBgpPeeringAddress.
16772func (icbpa IPConfigurationBgpPeeringAddress) MarshalJSON() ([]byte, error) {
16773	objectMap := make(map[string]interface{})
16774	if icbpa.IpconfigurationID != nil {
16775		objectMap["ipconfigurationId"] = icbpa.IpconfigurationID
16776	}
16777	if icbpa.CustomBgpIPAddresses != nil {
16778		objectMap["customBgpIpAddresses"] = icbpa.CustomBgpIPAddresses
16779	}
16780	return json.Marshal(objectMap)
16781}
16782
16783// IPConfigurationProfile IP configuration profile child resource.
16784type IPConfigurationProfile struct {
16785	// IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile.
16786	*IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"`
16787	// Name - The name of the resource. This name can be used to access the resource.
16788	Name *string `json:"name,omitempty"`
16789	// Type - READ-ONLY; Sub Resource type.
16790	Type *string `json:"type,omitempty"`
16791	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
16792	Etag *string `json:"etag,omitempty"`
16793	// ID - Resource ID.
16794	ID *string `json:"id,omitempty"`
16795}
16796
16797// MarshalJSON is the custom marshaler for IPConfigurationProfile.
16798func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) {
16799	objectMap := make(map[string]interface{})
16800	if icp.IPConfigurationProfilePropertiesFormat != nil {
16801		objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat
16802	}
16803	if icp.Name != nil {
16804		objectMap["name"] = icp.Name
16805	}
16806	if icp.ID != nil {
16807		objectMap["id"] = icp.ID
16808	}
16809	return json.Marshal(objectMap)
16810}
16811
16812// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct.
16813func (icp *IPConfigurationProfile) UnmarshalJSON(body []byte) error {
16814	var m map[string]*json.RawMessage
16815	err := json.Unmarshal(body, &m)
16816	if err != nil {
16817		return err
16818	}
16819	for k, v := range m {
16820		switch k {
16821		case "properties":
16822			if v != nil {
16823				var IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat
16824				err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat)
16825				if err != nil {
16826					return err
16827				}
16828				icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat
16829			}
16830		case "name":
16831			if v != nil {
16832				var name string
16833				err = json.Unmarshal(*v, &name)
16834				if err != nil {
16835					return err
16836				}
16837				icp.Name = &name
16838			}
16839		case "type":
16840			if v != nil {
16841				var typeVar string
16842				err = json.Unmarshal(*v, &typeVar)
16843				if err != nil {
16844					return err
16845				}
16846				icp.Type = &typeVar
16847			}
16848		case "etag":
16849			if v != nil {
16850				var etag string
16851				err = json.Unmarshal(*v, &etag)
16852				if err != nil {
16853					return err
16854				}
16855				icp.Etag = &etag
16856			}
16857		case "id":
16858			if v != nil {
16859				var ID string
16860				err = json.Unmarshal(*v, &ID)
16861				if err != nil {
16862					return err
16863				}
16864				icp.ID = &ID
16865			}
16866		}
16867	}
16868
16869	return nil
16870}
16871
16872// IPConfigurationProfilePropertiesFormat IP configuration profile properties.
16873type IPConfigurationProfilePropertiesFormat struct {
16874	// Subnet - The reference to the subnet resource to create a container network interface ip configuration.
16875	Subnet *Subnet `json:"subnet,omitempty"`
16876	// ProvisioningState - READ-ONLY; The provisioning state of the IP configuration profile resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
16877	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16878}
16879
16880// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat.
16881func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
16882	objectMap := make(map[string]interface{})
16883	if icppf.Subnet != nil {
16884		objectMap["subnet"] = icppf.Subnet
16885	}
16886	return json.Marshal(objectMap)
16887}
16888
16889// IPConfigurationPropertiesFormat properties of IP configuration.
16890type IPConfigurationPropertiesFormat struct {
16891	// PrivateIPAddress - The private IP address of the IP configuration.
16892	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
16893	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
16894	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
16895	// Subnet - The reference to the subnet resource.
16896	Subnet *Subnet `json:"subnet,omitempty"`
16897	// PublicIPAddress - The reference to the public IP resource.
16898	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
16899	// ProvisioningState - READ-ONLY; The provisioning state of the IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
16900	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16901}
16902
16903// MarshalJSON is the custom marshaler for IPConfigurationPropertiesFormat.
16904func (icpf IPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
16905	objectMap := make(map[string]interface{})
16906	if icpf.PrivateIPAddress != nil {
16907		objectMap["privateIPAddress"] = icpf.PrivateIPAddress
16908	}
16909	if icpf.PrivateIPAllocationMethod != "" {
16910		objectMap["privateIPAllocationMethod"] = icpf.PrivateIPAllocationMethod
16911	}
16912	if icpf.Subnet != nil {
16913		objectMap["subnet"] = icpf.Subnet
16914	}
16915	if icpf.PublicIPAddress != nil {
16916		objectMap["publicIPAddress"] = icpf.PublicIPAddress
16917	}
16918	return json.Marshal(objectMap)
16919}
16920
16921// IPGroup the IpGroups resource information.
16922type IPGroup struct {
16923	autorest.Response `json:"-"`
16924	// IPGroupPropertiesFormat - Properties of the IpGroups.
16925	*IPGroupPropertiesFormat `json:"properties,omitempty"`
16926	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
16927	Etag *string `json:"etag,omitempty"`
16928	// ID - Resource ID.
16929	ID *string `json:"id,omitempty"`
16930	// Name - READ-ONLY; Resource name.
16931	Name *string `json:"name,omitempty"`
16932	// Type - READ-ONLY; Resource type.
16933	Type *string `json:"type,omitempty"`
16934	// Location - Resource location.
16935	Location *string `json:"location,omitempty"`
16936	// Tags - Resource tags.
16937	Tags map[string]*string `json:"tags"`
16938}
16939
16940// MarshalJSON is the custom marshaler for IPGroup.
16941func (ig IPGroup) MarshalJSON() ([]byte, error) {
16942	objectMap := make(map[string]interface{})
16943	if ig.IPGroupPropertiesFormat != nil {
16944		objectMap["properties"] = ig.IPGroupPropertiesFormat
16945	}
16946	if ig.ID != nil {
16947		objectMap["id"] = ig.ID
16948	}
16949	if ig.Location != nil {
16950		objectMap["location"] = ig.Location
16951	}
16952	if ig.Tags != nil {
16953		objectMap["tags"] = ig.Tags
16954	}
16955	return json.Marshal(objectMap)
16956}
16957
16958// UnmarshalJSON is the custom unmarshaler for IPGroup struct.
16959func (ig *IPGroup) UnmarshalJSON(body []byte) error {
16960	var m map[string]*json.RawMessage
16961	err := json.Unmarshal(body, &m)
16962	if err != nil {
16963		return err
16964	}
16965	for k, v := range m {
16966		switch k {
16967		case "properties":
16968			if v != nil {
16969				var IPGroupPropertiesFormat IPGroupPropertiesFormat
16970				err = json.Unmarshal(*v, &IPGroupPropertiesFormat)
16971				if err != nil {
16972					return err
16973				}
16974				ig.IPGroupPropertiesFormat = &IPGroupPropertiesFormat
16975			}
16976		case "etag":
16977			if v != nil {
16978				var etag string
16979				err = json.Unmarshal(*v, &etag)
16980				if err != nil {
16981					return err
16982				}
16983				ig.Etag = &etag
16984			}
16985		case "id":
16986			if v != nil {
16987				var ID string
16988				err = json.Unmarshal(*v, &ID)
16989				if err != nil {
16990					return err
16991				}
16992				ig.ID = &ID
16993			}
16994		case "name":
16995			if v != nil {
16996				var name string
16997				err = json.Unmarshal(*v, &name)
16998				if err != nil {
16999					return err
17000				}
17001				ig.Name = &name
17002			}
17003		case "type":
17004			if v != nil {
17005				var typeVar string
17006				err = json.Unmarshal(*v, &typeVar)
17007				if err != nil {
17008					return err
17009				}
17010				ig.Type = &typeVar
17011			}
17012		case "location":
17013			if v != nil {
17014				var location string
17015				err = json.Unmarshal(*v, &location)
17016				if err != nil {
17017					return err
17018				}
17019				ig.Location = &location
17020			}
17021		case "tags":
17022			if v != nil {
17023				var tags map[string]*string
17024				err = json.Unmarshal(*v, &tags)
17025				if err != nil {
17026					return err
17027				}
17028				ig.Tags = tags
17029			}
17030		}
17031	}
17032
17033	return nil
17034}
17035
17036// IPGroupListResult response for the ListIpGroups API service call.
17037type IPGroupListResult struct {
17038	autorest.Response `json:"-"`
17039	// Value - The list of IpGroups information resources.
17040	Value *[]IPGroup `json:"value,omitempty"`
17041	// NextLink - URL to get the next set of results.
17042	NextLink *string `json:"nextLink,omitempty"`
17043}
17044
17045// IPGroupListResultIterator provides access to a complete listing of IPGroup values.
17046type IPGroupListResultIterator struct {
17047	i    int
17048	page IPGroupListResultPage
17049}
17050
17051// NextWithContext advances to the next value.  If there was an error making
17052// the request the iterator does not advance and the error is returned.
17053func (iter *IPGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
17054	if tracing.IsEnabled() {
17055		ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupListResultIterator.NextWithContext")
17056		defer func() {
17057			sc := -1
17058			if iter.Response().Response.Response != nil {
17059				sc = iter.Response().Response.Response.StatusCode
17060			}
17061			tracing.EndSpan(ctx, sc, err)
17062		}()
17063	}
17064	iter.i++
17065	if iter.i < len(iter.page.Values()) {
17066		return nil
17067	}
17068	err = iter.page.NextWithContext(ctx)
17069	if err != nil {
17070		iter.i--
17071		return err
17072	}
17073	iter.i = 0
17074	return nil
17075}
17076
17077// Next advances to the next value.  If there was an error making
17078// the request the iterator does not advance and the error is returned.
17079// Deprecated: Use NextWithContext() instead.
17080func (iter *IPGroupListResultIterator) Next() error {
17081	return iter.NextWithContext(context.Background())
17082}
17083
17084// NotDone returns true if the enumeration should be started or is not yet complete.
17085func (iter IPGroupListResultIterator) NotDone() bool {
17086	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17087}
17088
17089// Response returns the raw server response from the last page request.
17090func (iter IPGroupListResultIterator) Response() IPGroupListResult {
17091	return iter.page.Response()
17092}
17093
17094// Value returns the current value or a zero-initialized value if the
17095// iterator has advanced beyond the end of the collection.
17096func (iter IPGroupListResultIterator) Value() IPGroup {
17097	if !iter.page.NotDone() {
17098		return IPGroup{}
17099	}
17100	return iter.page.Values()[iter.i]
17101}
17102
17103// Creates a new instance of the IPGroupListResultIterator type.
17104func NewIPGroupListResultIterator(page IPGroupListResultPage) IPGroupListResultIterator {
17105	return IPGroupListResultIterator{page: page}
17106}
17107
17108// IsEmpty returns true if the ListResult contains no values.
17109func (iglr IPGroupListResult) IsEmpty() bool {
17110	return iglr.Value == nil || len(*iglr.Value) == 0
17111}
17112
17113// hasNextLink returns true if the NextLink is not empty.
17114func (iglr IPGroupListResult) hasNextLink() bool {
17115	return iglr.NextLink != nil && len(*iglr.NextLink) != 0
17116}
17117
17118// iPGroupListResultPreparer prepares a request to retrieve the next set of results.
17119// It returns nil if no more results exist.
17120func (iglr IPGroupListResult) iPGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
17121	if !iglr.hasNextLink() {
17122		return nil, nil
17123	}
17124	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17125		autorest.AsJSON(),
17126		autorest.AsGet(),
17127		autorest.WithBaseURL(to.String(iglr.NextLink)))
17128}
17129
17130// IPGroupListResultPage contains a page of IPGroup values.
17131type IPGroupListResultPage struct {
17132	fn   func(context.Context, IPGroupListResult) (IPGroupListResult, error)
17133	iglr IPGroupListResult
17134}
17135
17136// NextWithContext advances to the next page of values.  If there was an error making
17137// the request the page does not advance and the error is returned.
17138func (page *IPGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
17139	if tracing.IsEnabled() {
17140		ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupListResultPage.NextWithContext")
17141		defer func() {
17142			sc := -1
17143			if page.Response().Response.Response != nil {
17144				sc = page.Response().Response.Response.StatusCode
17145			}
17146			tracing.EndSpan(ctx, sc, err)
17147		}()
17148	}
17149	for {
17150		next, err := page.fn(ctx, page.iglr)
17151		if err != nil {
17152			return err
17153		}
17154		page.iglr = next
17155		if !next.hasNextLink() || !next.IsEmpty() {
17156			break
17157		}
17158	}
17159	return nil
17160}
17161
17162// Next advances to the next page of values.  If there was an error making
17163// the request the page does not advance and the error is returned.
17164// Deprecated: Use NextWithContext() instead.
17165func (page *IPGroupListResultPage) Next() error {
17166	return page.NextWithContext(context.Background())
17167}
17168
17169// NotDone returns true if the page enumeration should be started or is not yet complete.
17170func (page IPGroupListResultPage) NotDone() bool {
17171	return !page.iglr.IsEmpty()
17172}
17173
17174// Response returns the raw server response from the last page request.
17175func (page IPGroupListResultPage) Response() IPGroupListResult {
17176	return page.iglr
17177}
17178
17179// Values returns the slice of values for the current page or nil if there are no values.
17180func (page IPGroupListResultPage) Values() []IPGroup {
17181	if page.iglr.IsEmpty() {
17182		return nil
17183	}
17184	return *page.iglr.Value
17185}
17186
17187// Creates a new instance of the IPGroupListResultPage type.
17188func NewIPGroupListResultPage(cur IPGroupListResult, getNextPage func(context.Context, IPGroupListResult) (IPGroupListResult, error)) IPGroupListResultPage {
17189	return IPGroupListResultPage{
17190		fn:   getNextPage,
17191		iglr: cur,
17192	}
17193}
17194
17195// IPGroupPropertiesFormat the IpGroups property information.
17196type IPGroupPropertiesFormat struct {
17197	// ProvisioningState - READ-ONLY; The provisioning state of the IpGroups resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17198	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17199	// IPAddresses - IpAddresses/IpAddressPrefixes in the IpGroups resource.
17200	IPAddresses *[]string `json:"ipAddresses,omitempty"`
17201	// Firewalls - READ-ONLY; List of references to Azure resources that this IpGroups is associated with.
17202	Firewalls *[]SubResource `json:"firewalls,omitempty"`
17203}
17204
17205// MarshalJSON is the custom marshaler for IPGroupPropertiesFormat.
17206func (igpf IPGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
17207	objectMap := make(map[string]interface{})
17208	if igpf.IPAddresses != nil {
17209		objectMap["ipAddresses"] = igpf.IPAddresses
17210	}
17211	return json.Marshal(objectMap)
17212}
17213
17214// IPGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
17215// operation.
17216type IPGroupsCreateOrUpdateFuture struct {
17217	azure.FutureAPI
17218	// Result returns the result of the asynchronous operation.
17219	// If the operation has not completed it will return an error.
17220	Result func(IPGroupsClient) (IPGroup, error)
17221}
17222
17223// IPGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17224// operation.
17225type IPGroupsDeleteFuture struct {
17226	azure.FutureAPI
17227	// Result returns the result of the asynchronous operation.
17228	// If the operation has not completed it will return an error.
17229	Result func(IPGroupsClient) (autorest.Response, error)
17230}
17231
17232// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection.
17233type IpsecPolicy struct {
17234	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
17235	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
17236	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
17237	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
17238	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
17239	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
17240	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
17241	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
17242	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
17243	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
17244	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
17245	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
17246	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
17247	DhGroup DhGroup `json:"dhGroup,omitempty"`
17248	// 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'
17249	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
17250}
17251
17252// IPTag contains the IpTag associated with the object.
17253type IPTag struct {
17254	// IPTagType - The IP tag type. Example: FirstPartyUsage.
17255	IPTagType *string `json:"ipTagType,omitempty"`
17256	// Tag - The value of the IP tag associated with the public IP. Example: SQL.
17257	Tag *string `json:"tag,omitempty"`
17258}
17259
17260// Ipv6CircuitConnectionConfig iPv6 Circuit Connection properties for global reach.
17261type Ipv6CircuitConnectionConfig struct {
17262	// AddressPrefix - /125 IP address space to carve out customer addresses for global reach.
17263	AddressPrefix *string `json:"addressPrefix,omitempty"`
17264	// CircuitConnectionStatus - READ-ONLY; Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
17265	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
17266}
17267
17268// MarshalJSON is the custom marshaler for Ipv6CircuitConnectionConfig.
17269func (i6ccc Ipv6CircuitConnectionConfig) MarshalJSON() ([]byte, error) {
17270	objectMap := make(map[string]interface{})
17271	if i6ccc.AddressPrefix != nil {
17272		objectMap["addressPrefix"] = i6ccc.AddressPrefix
17273	}
17274	return json.Marshal(objectMap)
17275}
17276
17277// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
17278type Ipv6ExpressRouteCircuitPeeringConfig struct {
17279	// PrimaryPeerAddressPrefix - The primary address prefix.
17280	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
17281	// SecondaryPeerAddressPrefix - The secondary address prefix.
17282	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
17283	// MicrosoftPeeringConfig - The Microsoft peering configuration.
17284	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
17285	// RouteFilter - The reference to the RouteFilter resource.
17286	RouteFilter *SubResource `json:"routeFilter,omitempty"`
17287	// State - The state of peering. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
17288	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
17289}
17290
17291// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
17292// the next set of results.
17293type ListHubVirtualNetworkConnectionsResult struct {
17294	autorest.Response `json:"-"`
17295	// Value - List of HubVirtualNetworkConnections.
17296	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
17297	// NextLink - URL to get the next set of operation list results if there are any.
17298	NextLink *string `json:"nextLink,omitempty"`
17299}
17300
17301// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
17302// HubVirtualNetworkConnection values.
17303type ListHubVirtualNetworkConnectionsResultIterator struct {
17304	i    int
17305	page ListHubVirtualNetworkConnectionsResultPage
17306}
17307
17308// NextWithContext advances to the next value.  If there was an error making
17309// the request the iterator does not advance and the error is returned.
17310func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
17311	if tracing.IsEnabled() {
17312		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
17313		defer func() {
17314			sc := -1
17315			if iter.Response().Response.Response != nil {
17316				sc = iter.Response().Response.Response.StatusCode
17317			}
17318			tracing.EndSpan(ctx, sc, err)
17319		}()
17320	}
17321	iter.i++
17322	if iter.i < len(iter.page.Values()) {
17323		return nil
17324	}
17325	err = iter.page.NextWithContext(ctx)
17326	if err != nil {
17327		iter.i--
17328		return err
17329	}
17330	iter.i = 0
17331	return nil
17332}
17333
17334// Next advances to the next value.  If there was an error making
17335// the request the iterator does not advance and the error is returned.
17336// Deprecated: Use NextWithContext() instead.
17337func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
17338	return iter.NextWithContext(context.Background())
17339}
17340
17341// NotDone returns true if the enumeration should be started or is not yet complete.
17342func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
17343	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17344}
17345
17346// Response returns the raw server response from the last page request.
17347func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
17348	return iter.page.Response()
17349}
17350
17351// Value returns the current value or a zero-initialized value if the
17352// iterator has advanced beyond the end of the collection.
17353func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
17354	if !iter.page.NotDone() {
17355		return HubVirtualNetworkConnection{}
17356	}
17357	return iter.page.Values()[iter.i]
17358}
17359
17360// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
17361func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
17362	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
17363}
17364
17365// IsEmpty returns true if the ListResult contains no values.
17366func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
17367	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
17368}
17369
17370// hasNextLink returns true if the NextLink is not empty.
17371func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
17372	return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
17373}
17374
17375// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
17376// It returns nil if no more results exist.
17377func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
17378	if !lhvncr.hasNextLink() {
17379		return nil, nil
17380	}
17381	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17382		autorest.AsJSON(),
17383		autorest.AsGet(),
17384		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
17385}
17386
17387// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
17388type ListHubVirtualNetworkConnectionsResultPage struct {
17389	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
17390	lhvncr ListHubVirtualNetworkConnectionsResult
17391}
17392
17393// NextWithContext advances to the next page of values.  If there was an error making
17394// the request the page does not advance and the error is returned.
17395func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
17396	if tracing.IsEnabled() {
17397		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
17398		defer func() {
17399			sc := -1
17400			if page.Response().Response.Response != nil {
17401				sc = page.Response().Response.Response.StatusCode
17402			}
17403			tracing.EndSpan(ctx, sc, err)
17404		}()
17405	}
17406	for {
17407		next, err := page.fn(ctx, page.lhvncr)
17408		if err != nil {
17409			return err
17410		}
17411		page.lhvncr = next
17412		if !next.hasNextLink() || !next.IsEmpty() {
17413			break
17414		}
17415	}
17416	return nil
17417}
17418
17419// Next advances to the next page of values.  If there was an error making
17420// the request the page does not advance and the error is returned.
17421// Deprecated: Use NextWithContext() instead.
17422func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
17423	return page.NextWithContext(context.Background())
17424}
17425
17426// NotDone returns true if the page enumeration should be started or is not yet complete.
17427func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
17428	return !page.lhvncr.IsEmpty()
17429}
17430
17431// Response returns the raw server response from the last page request.
17432func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
17433	return page.lhvncr
17434}
17435
17436// Values returns the slice of values for the current page or nil if there are no values.
17437func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
17438	if page.lhvncr.IsEmpty() {
17439		return nil
17440	}
17441	return *page.lhvncr.Value
17442}
17443
17444// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
17445func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
17446	return ListHubVirtualNetworkConnectionsResultPage{
17447		fn:     getNextPage,
17448		lhvncr: cur,
17449	}
17450}
17451
17452// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of
17453// P2SVpnGateways and a URL nextLink to get the next set of results.
17454type ListP2SVpnGatewaysResult struct {
17455	autorest.Response `json:"-"`
17456	// Value - List of P2SVpnGateways.
17457	Value *[]P2SVpnGateway `json:"value,omitempty"`
17458	// NextLink - URL to get the next set of operation list results if there are any.
17459	NextLink *string `json:"nextLink,omitempty"`
17460}
17461
17462// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values.
17463type ListP2SVpnGatewaysResultIterator struct {
17464	i    int
17465	page ListP2SVpnGatewaysResultPage
17466}
17467
17468// NextWithContext advances to the next value.  If there was an error making
17469// the request the iterator does not advance and the error is returned.
17470func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
17471	if tracing.IsEnabled() {
17472		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.NextWithContext")
17473		defer func() {
17474			sc := -1
17475			if iter.Response().Response.Response != nil {
17476				sc = iter.Response().Response.Response.StatusCode
17477			}
17478			tracing.EndSpan(ctx, sc, err)
17479		}()
17480	}
17481	iter.i++
17482	if iter.i < len(iter.page.Values()) {
17483		return nil
17484	}
17485	err = iter.page.NextWithContext(ctx)
17486	if err != nil {
17487		iter.i--
17488		return err
17489	}
17490	iter.i = 0
17491	return nil
17492}
17493
17494// Next advances to the next value.  If there was an error making
17495// the request the iterator does not advance and the error is returned.
17496// Deprecated: Use NextWithContext() instead.
17497func (iter *ListP2SVpnGatewaysResultIterator) Next() error {
17498	return iter.NextWithContext(context.Background())
17499}
17500
17501// NotDone returns true if the enumeration should be started or is not yet complete.
17502func (iter ListP2SVpnGatewaysResultIterator) NotDone() bool {
17503	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17504}
17505
17506// Response returns the raw server response from the last page request.
17507func (iter ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult {
17508	return iter.page.Response()
17509}
17510
17511// Value returns the current value or a zero-initialized value if the
17512// iterator has advanced beyond the end of the collection.
17513func (iter ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway {
17514	if !iter.page.NotDone() {
17515		return P2SVpnGateway{}
17516	}
17517	return iter.page.Values()[iter.i]
17518}
17519
17520// Creates a new instance of the ListP2SVpnGatewaysResultIterator type.
17521func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator {
17522	return ListP2SVpnGatewaysResultIterator{page: page}
17523}
17524
17525// IsEmpty returns true if the ListResult contains no values.
17526func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
17527	return lpvgr.Value == nil || len(*lpvgr.Value) == 0
17528}
17529
17530// hasNextLink returns true if the NextLink is not empty.
17531func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool {
17532	return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0
17533}
17534
17535// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
17536// It returns nil if no more results exist.
17537func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
17538	if !lpvgr.hasNextLink() {
17539		return nil, nil
17540	}
17541	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17542		autorest.AsJSON(),
17543		autorest.AsGet(),
17544		autorest.WithBaseURL(to.String(lpvgr.NextLink)))
17545}
17546
17547// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values.
17548type ListP2SVpnGatewaysResultPage struct {
17549	fn    func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
17550	lpvgr ListP2SVpnGatewaysResult
17551}
17552
17553// NextWithContext advances to the next page of values.  If there was an error making
17554// the request the page does not advance and the error is returned.
17555func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
17556	if tracing.IsEnabled() {
17557		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext")
17558		defer func() {
17559			sc := -1
17560			if page.Response().Response.Response != nil {
17561				sc = page.Response().Response.Response.StatusCode
17562			}
17563			tracing.EndSpan(ctx, sc, err)
17564		}()
17565	}
17566	for {
17567		next, err := page.fn(ctx, page.lpvgr)
17568		if err != nil {
17569			return err
17570		}
17571		page.lpvgr = next
17572		if !next.hasNextLink() || !next.IsEmpty() {
17573			break
17574		}
17575	}
17576	return nil
17577}
17578
17579// Next advances to the next page of values.  If there was an error making
17580// the request the page does not advance and the error is returned.
17581// Deprecated: Use NextWithContext() instead.
17582func (page *ListP2SVpnGatewaysResultPage) Next() error {
17583	return page.NextWithContext(context.Background())
17584}
17585
17586// NotDone returns true if the page enumeration should be started or is not yet complete.
17587func (page ListP2SVpnGatewaysResultPage) NotDone() bool {
17588	return !page.lpvgr.IsEmpty()
17589}
17590
17591// Response returns the raw server response from the last page request.
17592func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult {
17593	return page.lpvgr
17594}
17595
17596// Values returns the slice of values for the current page or nil if there are no values.
17597func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway {
17598	if page.lpvgr.IsEmpty() {
17599		return nil
17600	}
17601	return *page.lpvgr.Value
17602}
17603
17604// Creates a new instance of the ListP2SVpnGatewaysResultPage type.
17605func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage {
17606	return ListP2SVpnGatewaysResultPage{
17607		fn:    getNextPage,
17608		lpvgr: cur,
17609	}
17610}
17611
17612// ListString ...
17613type ListString struct {
17614	autorest.Response `json:"-"`
17615	Value             *[]string `json:"value,omitempty"`
17616}
17617
17618// ListVirtualHubRouteTableV2sResult list of VirtualHubRouteTableV2s and a URL nextLink to get the next set
17619// of results.
17620type ListVirtualHubRouteTableV2sResult struct {
17621	autorest.Response `json:"-"`
17622	// Value - List of VirtualHubRouteTableV2s.
17623	Value *[]VirtualHubRouteTableV2 `json:"value,omitempty"`
17624	// NextLink - URL to get the next set of operation list results if there are any.
17625	NextLink *string `json:"nextLink,omitempty"`
17626}
17627
17628// ListVirtualHubRouteTableV2sResultIterator provides access to a complete listing of
17629// VirtualHubRouteTableV2 values.
17630type ListVirtualHubRouteTableV2sResultIterator struct {
17631	i    int
17632	page ListVirtualHubRouteTableV2sResultPage
17633}
17634
17635// NextWithContext advances to the next value.  If there was an error making
17636// the request the iterator does not advance and the error is returned.
17637func (iter *ListVirtualHubRouteTableV2sResultIterator) NextWithContext(ctx context.Context) (err error) {
17638	if tracing.IsEnabled() {
17639		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubRouteTableV2sResultIterator.NextWithContext")
17640		defer func() {
17641			sc := -1
17642			if iter.Response().Response.Response != nil {
17643				sc = iter.Response().Response.Response.StatusCode
17644			}
17645			tracing.EndSpan(ctx, sc, err)
17646		}()
17647	}
17648	iter.i++
17649	if iter.i < len(iter.page.Values()) {
17650		return nil
17651	}
17652	err = iter.page.NextWithContext(ctx)
17653	if err != nil {
17654		iter.i--
17655		return err
17656	}
17657	iter.i = 0
17658	return nil
17659}
17660
17661// Next advances to the next value.  If there was an error making
17662// the request the iterator does not advance and the error is returned.
17663// Deprecated: Use NextWithContext() instead.
17664func (iter *ListVirtualHubRouteTableV2sResultIterator) Next() error {
17665	return iter.NextWithContext(context.Background())
17666}
17667
17668// NotDone returns true if the enumeration should be started or is not yet complete.
17669func (iter ListVirtualHubRouteTableV2sResultIterator) NotDone() bool {
17670	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17671}
17672
17673// Response returns the raw server response from the last page request.
17674func (iter ListVirtualHubRouteTableV2sResultIterator) Response() ListVirtualHubRouteTableV2sResult {
17675	return iter.page.Response()
17676}
17677
17678// Value returns the current value or a zero-initialized value if the
17679// iterator has advanced beyond the end of the collection.
17680func (iter ListVirtualHubRouteTableV2sResultIterator) Value() VirtualHubRouteTableV2 {
17681	if !iter.page.NotDone() {
17682		return VirtualHubRouteTableV2{}
17683	}
17684	return iter.page.Values()[iter.i]
17685}
17686
17687// Creates a new instance of the ListVirtualHubRouteTableV2sResultIterator type.
17688func NewListVirtualHubRouteTableV2sResultIterator(page ListVirtualHubRouteTableV2sResultPage) ListVirtualHubRouteTableV2sResultIterator {
17689	return ListVirtualHubRouteTableV2sResultIterator{page: page}
17690}
17691
17692// IsEmpty returns true if the ListResult contains no values.
17693func (lvhrtvr ListVirtualHubRouteTableV2sResult) IsEmpty() bool {
17694	return lvhrtvr.Value == nil || len(*lvhrtvr.Value) == 0
17695}
17696
17697// hasNextLink returns true if the NextLink is not empty.
17698func (lvhrtvr ListVirtualHubRouteTableV2sResult) hasNextLink() bool {
17699	return lvhrtvr.NextLink != nil && len(*lvhrtvr.NextLink) != 0
17700}
17701
17702// listVirtualHubRouteTableV2sResultPreparer prepares a request to retrieve the next set of results.
17703// It returns nil if no more results exist.
17704func (lvhrtvr ListVirtualHubRouteTableV2sResult) listVirtualHubRouteTableV2sResultPreparer(ctx context.Context) (*http.Request, error) {
17705	if !lvhrtvr.hasNextLink() {
17706		return nil, nil
17707	}
17708	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17709		autorest.AsJSON(),
17710		autorest.AsGet(),
17711		autorest.WithBaseURL(to.String(lvhrtvr.NextLink)))
17712}
17713
17714// ListVirtualHubRouteTableV2sResultPage contains a page of VirtualHubRouteTableV2 values.
17715type ListVirtualHubRouteTableV2sResultPage struct {
17716	fn      func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error)
17717	lvhrtvr ListVirtualHubRouteTableV2sResult
17718}
17719
17720// NextWithContext advances to the next page of values.  If there was an error making
17721// the request the page does not advance and the error is returned.
17722func (page *ListVirtualHubRouteTableV2sResultPage) NextWithContext(ctx context.Context) (err error) {
17723	if tracing.IsEnabled() {
17724		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubRouteTableV2sResultPage.NextWithContext")
17725		defer func() {
17726			sc := -1
17727			if page.Response().Response.Response != nil {
17728				sc = page.Response().Response.Response.StatusCode
17729			}
17730			tracing.EndSpan(ctx, sc, err)
17731		}()
17732	}
17733	for {
17734		next, err := page.fn(ctx, page.lvhrtvr)
17735		if err != nil {
17736			return err
17737		}
17738		page.lvhrtvr = next
17739		if !next.hasNextLink() || !next.IsEmpty() {
17740			break
17741		}
17742	}
17743	return nil
17744}
17745
17746// Next advances to the next page of values.  If there was an error making
17747// the request the page does not advance and the error is returned.
17748// Deprecated: Use NextWithContext() instead.
17749func (page *ListVirtualHubRouteTableV2sResultPage) Next() error {
17750	return page.NextWithContext(context.Background())
17751}
17752
17753// NotDone returns true if the page enumeration should be started or is not yet complete.
17754func (page ListVirtualHubRouteTableV2sResultPage) NotDone() bool {
17755	return !page.lvhrtvr.IsEmpty()
17756}
17757
17758// Response returns the raw server response from the last page request.
17759func (page ListVirtualHubRouteTableV2sResultPage) Response() ListVirtualHubRouteTableV2sResult {
17760	return page.lvhrtvr
17761}
17762
17763// Values returns the slice of values for the current page or nil if there are no values.
17764func (page ListVirtualHubRouteTableV2sResultPage) Values() []VirtualHubRouteTableV2 {
17765	if page.lvhrtvr.IsEmpty() {
17766		return nil
17767	}
17768	return *page.lvhrtvr.Value
17769}
17770
17771// Creates a new instance of the ListVirtualHubRouteTableV2sResultPage type.
17772func NewListVirtualHubRouteTableV2sResultPage(cur ListVirtualHubRouteTableV2sResult, getNextPage func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error)) ListVirtualHubRouteTableV2sResultPage {
17773	return ListVirtualHubRouteTableV2sResultPage{
17774		fn:      getNextPage,
17775		lvhrtvr: cur,
17776	}
17777}
17778
17779// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
17780// URL nextLink to get the next set of results.
17781type ListVirtualHubsResult struct {
17782	autorest.Response `json:"-"`
17783	// Value - List of VirtualHubs.
17784	Value *[]VirtualHub `json:"value,omitempty"`
17785	// NextLink - URL to get the next set of operation list results if there are any.
17786	NextLink *string `json:"nextLink,omitempty"`
17787}
17788
17789// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
17790type ListVirtualHubsResultIterator struct {
17791	i    int
17792	page ListVirtualHubsResultPage
17793}
17794
17795// NextWithContext advances to the next value.  If there was an error making
17796// the request the iterator does not advance and the error is returned.
17797func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
17798	if tracing.IsEnabled() {
17799		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
17800		defer func() {
17801			sc := -1
17802			if iter.Response().Response.Response != nil {
17803				sc = iter.Response().Response.Response.StatusCode
17804			}
17805			tracing.EndSpan(ctx, sc, err)
17806		}()
17807	}
17808	iter.i++
17809	if iter.i < len(iter.page.Values()) {
17810		return nil
17811	}
17812	err = iter.page.NextWithContext(ctx)
17813	if err != nil {
17814		iter.i--
17815		return err
17816	}
17817	iter.i = 0
17818	return nil
17819}
17820
17821// Next advances to the next value.  If there was an error making
17822// the request the iterator does not advance and the error is returned.
17823// Deprecated: Use NextWithContext() instead.
17824func (iter *ListVirtualHubsResultIterator) Next() error {
17825	return iter.NextWithContext(context.Background())
17826}
17827
17828// NotDone returns true if the enumeration should be started or is not yet complete.
17829func (iter ListVirtualHubsResultIterator) NotDone() bool {
17830	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17831}
17832
17833// Response returns the raw server response from the last page request.
17834func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
17835	return iter.page.Response()
17836}
17837
17838// Value returns the current value or a zero-initialized value if the
17839// iterator has advanced beyond the end of the collection.
17840func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
17841	if !iter.page.NotDone() {
17842		return VirtualHub{}
17843	}
17844	return iter.page.Values()[iter.i]
17845}
17846
17847// Creates a new instance of the ListVirtualHubsResultIterator type.
17848func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
17849	return ListVirtualHubsResultIterator{page: page}
17850}
17851
17852// IsEmpty returns true if the ListResult contains no values.
17853func (lvhr ListVirtualHubsResult) IsEmpty() bool {
17854	return lvhr.Value == nil || len(*lvhr.Value) == 0
17855}
17856
17857// hasNextLink returns true if the NextLink is not empty.
17858func (lvhr ListVirtualHubsResult) hasNextLink() bool {
17859	return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
17860}
17861
17862// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
17863// It returns nil if no more results exist.
17864func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
17865	if !lvhr.hasNextLink() {
17866		return nil, nil
17867	}
17868	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17869		autorest.AsJSON(),
17870		autorest.AsGet(),
17871		autorest.WithBaseURL(to.String(lvhr.NextLink)))
17872}
17873
17874// ListVirtualHubsResultPage contains a page of VirtualHub values.
17875type ListVirtualHubsResultPage struct {
17876	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
17877	lvhr ListVirtualHubsResult
17878}
17879
17880// NextWithContext advances to the next page of values.  If there was an error making
17881// the request the page does not advance and the error is returned.
17882func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
17883	if tracing.IsEnabled() {
17884		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
17885		defer func() {
17886			sc := -1
17887			if page.Response().Response.Response != nil {
17888				sc = page.Response().Response.Response.StatusCode
17889			}
17890			tracing.EndSpan(ctx, sc, err)
17891		}()
17892	}
17893	for {
17894		next, err := page.fn(ctx, page.lvhr)
17895		if err != nil {
17896			return err
17897		}
17898		page.lvhr = next
17899		if !next.hasNextLink() || !next.IsEmpty() {
17900			break
17901		}
17902	}
17903	return nil
17904}
17905
17906// Next advances to the next page of values.  If there was an error making
17907// the request the page does not advance and the error is returned.
17908// Deprecated: Use NextWithContext() instead.
17909func (page *ListVirtualHubsResultPage) Next() error {
17910	return page.NextWithContext(context.Background())
17911}
17912
17913// NotDone returns true if the page enumeration should be started or is not yet complete.
17914func (page ListVirtualHubsResultPage) NotDone() bool {
17915	return !page.lvhr.IsEmpty()
17916}
17917
17918// Response returns the raw server response from the last page request.
17919func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
17920	return page.lvhr
17921}
17922
17923// Values returns the slice of values for the current page or nil if there are no values.
17924func (page ListVirtualHubsResultPage) Values() []VirtualHub {
17925	if page.lvhr.IsEmpty() {
17926		return nil
17927	}
17928	return *page.lvhr.Value
17929}
17930
17931// Creates a new instance of the ListVirtualHubsResultPage type.
17932func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
17933	return ListVirtualHubsResultPage{
17934		fn:   getNextPage,
17935		lvhr: cur,
17936	}
17937}
17938
17939// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
17940// URL nextLink to get the next set of results.
17941type ListVirtualWANsResult struct {
17942	autorest.Response `json:"-"`
17943	// Value - List of VirtualWANs.
17944	Value *[]VirtualWAN `json:"value,omitempty"`
17945	// NextLink - URL to get the next set of operation list results if there are any.
17946	NextLink *string `json:"nextLink,omitempty"`
17947}
17948
17949// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
17950type ListVirtualWANsResultIterator struct {
17951	i    int
17952	page ListVirtualWANsResultPage
17953}
17954
17955// NextWithContext advances to the next value.  If there was an error making
17956// the request the iterator does not advance and the error is returned.
17957func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
17958	if tracing.IsEnabled() {
17959		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
17960		defer func() {
17961			sc := -1
17962			if iter.Response().Response.Response != nil {
17963				sc = iter.Response().Response.Response.StatusCode
17964			}
17965			tracing.EndSpan(ctx, sc, err)
17966		}()
17967	}
17968	iter.i++
17969	if iter.i < len(iter.page.Values()) {
17970		return nil
17971	}
17972	err = iter.page.NextWithContext(ctx)
17973	if err != nil {
17974		iter.i--
17975		return err
17976	}
17977	iter.i = 0
17978	return nil
17979}
17980
17981// Next advances to the next value.  If there was an error making
17982// the request the iterator does not advance and the error is returned.
17983// Deprecated: Use NextWithContext() instead.
17984func (iter *ListVirtualWANsResultIterator) Next() error {
17985	return iter.NextWithContext(context.Background())
17986}
17987
17988// NotDone returns true if the enumeration should be started or is not yet complete.
17989func (iter ListVirtualWANsResultIterator) NotDone() bool {
17990	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17991}
17992
17993// Response returns the raw server response from the last page request.
17994func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
17995	return iter.page.Response()
17996}
17997
17998// Value returns the current value or a zero-initialized value if the
17999// iterator has advanced beyond the end of the collection.
18000func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
18001	if !iter.page.NotDone() {
18002		return VirtualWAN{}
18003	}
18004	return iter.page.Values()[iter.i]
18005}
18006
18007// Creates a new instance of the ListVirtualWANsResultIterator type.
18008func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
18009	return ListVirtualWANsResultIterator{page: page}
18010}
18011
18012// IsEmpty returns true if the ListResult contains no values.
18013func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
18014	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
18015}
18016
18017// hasNextLink returns true if the NextLink is not empty.
18018func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
18019	return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
18020}
18021
18022// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
18023// It returns nil if no more results exist.
18024func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
18025	if !lvwnr.hasNextLink() {
18026		return nil, nil
18027	}
18028	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18029		autorest.AsJSON(),
18030		autorest.AsGet(),
18031		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
18032}
18033
18034// ListVirtualWANsResultPage contains a page of VirtualWAN values.
18035type ListVirtualWANsResultPage struct {
18036	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
18037	lvwnr ListVirtualWANsResult
18038}
18039
18040// NextWithContext advances to the next page of values.  If there was an error making
18041// the request the page does not advance and the error is returned.
18042func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
18043	if tracing.IsEnabled() {
18044		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
18045		defer func() {
18046			sc := -1
18047			if page.Response().Response.Response != nil {
18048				sc = page.Response().Response.Response.StatusCode
18049			}
18050			tracing.EndSpan(ctx, sc, err)
18051		}()
18052	}
18053	for {
18054		next, err := page.fn(ctx, page.lvwnr)
18055		if err != nil {
18056			return err
18057		}
18058		page.lvwnr = next
18059		if !next.hasNextLink() || !next.IsEmpty() {
18060			break
18061		}
18062	}
18063	return nil
18064}
18065
18066// Next advances to the next page of values.  If there was an error making
18067// the request the page does not advance and the error is returned.
18068// Deprecated: Use NextWithContext() instead.
18069func (page *ListVirtualWANsResultPage) Next() error {
18070	return page.NextWithContext(context.Background())
18071}
18072
18073// NotDone returns true if the page enumeration should be started or is not yet complete.
18074func (page ListVirtualWANsResultPage) NotDone() bool {
18075	return !page.lvwnr.IsEmpty()
18076}
18077
18078// Response returns the raw server response from the last page request.
18079func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
18080	return page.lvwnr
18081}
18082
18083// Values returns the slice of values for the current page or nil if there are no values.
18084func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
18085	if page.lvwnr.IsEmpty() {
18086		return nil
18087	}
18088	return *page.lvwnr.Value
18089}
18090
18091// Creates a new instance of the ListVirtualWANsResultPage type.
18092func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
18093	return ListVirtualWANsResultPage{
18094		fn:    getNextPage,
18095		lvwnr: cur,
18096	}
18097}
18098
18099// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
18100// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
18101type ListVpnConnectionsResult struct {
18102	autorest.Response `json:"-"`
18103	// Value - List of Vpn Connections.
18104	Value *[]VpnConnection `json:"value,omitempty"`
18105	// NextLink - URL to get the next set of operation list results if there are any.
18106	NextLink *string `json:"nextLink,omitempty"`
18107}
18108
18109// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
18110type ListVpnConnectionsResultIterator struct {
18111	i    int
18112	page ListVpnConnectionsResultPage
18113}
18114
18115// NextWithContext advances to the next value.  If there was an error making
18116// the request the iterator does not advance and the error is returned.
18117func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
18118	if tracing.IsEnabled() {
18119		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
18120		defer func() {
18121			sc := -1
18122			if iter.Response().Response.Response != nil {
18123				sc = iter.Response().Response.Response.StatusCode
18124			}
18125			tracing.EndSpan(ctx, sc, err)
18126		}()
18127	}
18128	iter.i++
18129	if iter.i < len(iter.page.Values()) {
18130		return nil
18131	}
18132	err = iter.page.NextWithContext(ctx)
18133	if err != nil {
18134		iter.i--
18135		return err
18136	}
18137	iter.i = 0
18138	return nil
18139}
18140
18141// Next advances to the next value.  If there was an error making
18142// the request the iterator does not advance and the error is returned.
18143// Deprecated: Use NextWithContext() instead.
18144func (iter *ListVpnConnectionsResultIterator) Next() error {
18145	return iter.NextWithContext(context.Background())
18146}
18147
18148// NotDone returns true if the enumeration should be started or is not yet complete.
18149func (iter ListVpnConnectionsResultIterator) NotDone() bool {
18150	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18151}
18152
18153// Response returns the raw server response from the last page request.
18154func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
18155	return iter.page.Response()
18156}
18157
18158// Value returns the current value or a zero-initialized value if the
18159// iterator has advanced beyond the end of the collection.
18160func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
18161	if !iter.page.NotDone() {
18162		return VpnConnection{}
18163	}
18164	return iter.page.Values()[iter.i]
18165}
18166
18167// Creates a new instance of the ListVpnConnectionsResultIterator type.
18168func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
18169	return ListVpnConnectionsResultIterator{page: page}
18170}
18171
18172// IsEmpty returns true if the ListResult contains no values.
18173func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
18174	return lvcr.Value == nil || len(*lvcr.Value) == 0
18175}
18176
18177// hasNextLink returns true if the NextLink is not empty.
18178func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
18179	return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
18180}
18181
18182// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
18183// It returns nil if no more results exist.
18184func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
18185	if !lvcr.hasNextLink() {
18186		return nil, nil
18187	}
18188	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18189		autorest.AsJSON(),
18190		autorest.AsGet(),
18191		autorest.WithBaseURL(to.String(lvcr.NextLink)))
18192}
18193
18194// ListVpnConnectionsResultPage contains a page of VpnConnection values.
18195type ListVpnConnectionsResultPage struct {
18196	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
18197	lvcr ListVpnConnectionsResult
18198}
18199
18200// NextWithContext advances to the next page of values.  If there was an error making
18201// the request the page does not advance and the error is returned.
18202func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
18203	if tracing.IsEnabled() {
18204		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
18205		defer func() {
18206			sc := -1
18207			if page.Response().Response.Response != nil {
18208				sc = page.Response().Response.Response.StatusCode
18209			}
18210			tracing.EndSpan(ctx, sc, err)
18211		}()
18212	}
18213	for {
18214		next, err := page.fn(ctx, page.lvcr)
18215		if err != nil {
18216			return err
18217		}
18218		page.lvcr = next
18219		if !next.hasNextLink() || !next.IsEmpty() {
18220			break
18221		}
18222	}
18223	return nil
18224}
18225
18226// Next advances to the next page of values.  If there was an error making
18227// the request the page does not advance and the error is returned.
18228// Deprecated: Use NextWithContext() instead.
18229func (page *ListVpnConnectionsResultPage) Next() error {
18230	return page.NextWithContext(context.Background())
18231}
18232
18233// NotDone returns true if the page enumeration should be started or is not yet complete.
18234func (page ListVpnConnectionsResultPage) NotDone() bool {
18235	return !page.lvcr.IsEmpty()
18236}
18237
18238// Response returns the raw server response from the last page request.
18239func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
18240	return page.lvcr
18241}
18242
18243// Values returns the slice of values for the current page or nil if there are no values.
18244func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
18245	if page.lvcr.IsEmpty() {
18246		return nil
18247	}
18248	return *page.lvcr.Value
18249}
18250
18251// Creates a new instance of the ListVpnConnectionsResultPage type.
18252func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
18253	return ListVpnConnectionsResultPage{
18254		fn:   getNextPage,
18255		lvcr: cur,
18256	}
18257}
18258
18259// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
18260// URL nextLink to get the next set of results.
18261type ListVpnGatewaysResult struct {
18262	autorest.Response `json:"-"`
18263	// Value - List of VpnGateways.
18264	Value *[]VpnGateway `json:"value,omitempty"`
18265	// NextLink - URL to get the next set of operation list results if there are any.
18266	NextLink *string `json:"nextLink,omitempty"`
18267}
18268
18269// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
18270type ListVpnGatewaysResultIterator struct {
18271	i    int
18272	page ListVpnGatewaysResultPage
18273}
18274
18275// NextWithContext advances to the next value.  If there was an error making
18276// the request the iterator does not advance and the error is returned.
18277func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
18278	if tracing.IsEnabled() {
18279		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
18280		defer func() {
18281			sc := -1
18282			if iter.Response().Response.Response != nil {
18283				sc = iter.Response().Response.Response.StatusCode
18284			}
18285			tracing.EndSpan(ctx, sc, err)
18286		}()
18287	}
18288	iter.i++
18289	if iter.i < len(iter.page.Values()) {
18290		return nil
18291	}
18292	err = iter.page.NextWithContext(ctx)
18293	if err != nil {
18294		iter.i--
18295		return err
18296	}
18297	iter.i = 0
18298	return nil
18299}
18300
18301// Next advances to the next value.  If there was an error making
18302// the request the iterator does not advance and the error is returned.
18303// Deprecated: Use NextWithContext() instead.
18304func (iter *ListVpnGatewaysResultIterator) Next() error {
18305	return iter.NextWithContext(context.Background())
18306}
18307
18308// NotDone returns true if the enumeration should be started or is not yet complete.
18309func (iter ListVpnGatewaysResultIterator) NotDone() bool {
18310	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18311}
18312
18313// Response returns the raw server response from the last page request.
18314func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
18315	return iter.page.Response()
18316}
18317
18318// Value returns the current value or a zero-initialized value if the
18319// iterator has advanced beyond the end of the collection.
18320func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
18321	if !iter.page.NotDone() {
18322		return VpnGateway{}
18323	}
18324	return iter.page.Values()[iter.i]
18325}
18326
18327// Creates a new instance of the ListVpnGatewaysResultIterator type.
18328func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
18329	return ListVpnGatewaysResultIterator{page: page}
18330}
18331
18332// IsEmpty returns true if the ListResult contains no values.
18333func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
18334	return lvgr.Value == nil || len(*lvgr.Value) == 0
18335}
18336
18337// hasNextLink returns true if the NextLink is not empty.
18338func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
18339	return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
18340}
18341
18342// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
18343// It returns nil if no more results exist.
18344func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
18345	if !lvgr.hasNextLink() {
18346		return nil, nil
18347	}
18348	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18349		autorest.AsJSON(),
18350		autorest.AsGet(),
18351		autorest.WithBaseURL(to.String(lvgr.NextLink)))
18352}
18353
18354// ListVpnGatewaysResultPage contains a page of VpnGateway values.
18355type ListVpnGatewaysResultPage struct {
18356	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
18357	lvgr ListVpnGatewaysResult
18358}
18359
18360// NextWithContext advances to the next page of values.  If there was an error making
18361// the request the page does not advance and the error is returned.
18362func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
18363	if tracing.IsEnabled() {
18364		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
18365		defer func() {
18366			sc := -1
18367			if page.Response().Response.Response != nil {
18368				sc = page.Response().Response.Response.StatusCode
18369			}
18370			tracing.EndSpan(ctx, sc, err)
18371		}()
18372	}
18373	for {
18374		next, err := page.fn(ctx, page.lvgr)
18375		if err != nil {
18376			return err
18377		}
18378		page.lvgr = next
18379		if !next.hasNextLink() || !next.IsEmpty() {
18380			break
18381		}
18382	}
18383	return nil
18384}
18385
18386// Next advances to the next page of values.  If there was an error making
18387// the request the page does not advance and the error is returned.
18388// Deprecated: Use NextWithContext() instead.
18389func (page *ListVpnGatewaysResultPage) Next() error {
18390	return page.NextWithContext(context.Background())
18391}
18392
18393// NotDone returns true if the page enumeration should be started or is not yet complete.
18394func (page ListVpnGatewaysResultPage) NotDone() bool {
18395	return !page.lvgr.IsEmpty()
18396}
18397
18398// Response returns the raw server response from the last page request.
18399func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
18400	return page.lvgr
18401}
18402
18403// Values returns the slice of values for the current page or nil if there are no values.
18404func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
18405	if page.lvgr.IsEmpty() {
18406		return nil
18407	}
18408	return *page.lvgr.Value
18409}
18410
18411// Creates a new instance of the ListVpnGatewaysResultPage type.
18412func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
18413	return ListVpnGatewaysResultPage{
18414		fn:   getNextPage,
18415		lvgr: cur,
18416	}
18417}
18418
18419// ListVpnServerConfigurationsResult result of the request to list all VpnServerConfigurations. It contains
18420// a list of VpnServerConfigurations and a URL nextLink to get the next set of results.
18421type ListVpnServerConfigurationsResult struct {
18422	autorest.Response `json:"-"`
18423	// Value - List of VpnServerConfigurations.
18424	Value *[]VpnServerConfiguration `json:"value,omitempty"`
18425	// NextLink - URL to get the next set of operation list results if there are any.
18426	NextLink *string `json:"nextLink,omitempty"`
18427}
18428
18429// ListVpnServerConfigurationsResultIterator provides access to a complete listing of
18430// VpnServerConfiguration values.
18431type ListVpnServerConfigurationsResultIterator struct {
18432	i    int
18433	page ListVpnServerConfigurationsResultPage
18434}
18435
18436// NextWithContext advances to the next value.  If there was an error making
18437// the request the iterator does not advance and the error is returned.
18438func (iter *ListVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) {
18439	if tracing.IsEnabled() {
18440		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnServerConfigurationsResultIterator.NextWithContext")
18441		defer func() {
18442			sc := -1
18443			if iter.Response().Response.Response != nil {
18444				sc = iter.Response().Response.Response.StatusCode
18445			}
18446			tracing.EndSpan(ctx, sc, err)
18447		}()
18448	}
18449	iter.i++
18450	if iter.i < len(iter.page.Values()) {
18451		return nil
18452	}
18453	err = iter.page.NextWithContext(ctx)
18454	if err != nil {
18455		iter.i--
18456		return err
18457	}
18458	iter.i = 0
18459	return nil
18460}
18461
18462// Next advances to the next value.  If there was an error making
18463// the request the iterator does not advance and the error is returned.
18464// Deprecated: Use NextWithContext() instead.
18465func (iter *ListVpnServerConfigurationsResultIterator) Next() error {
18466	return iter.NextWithContext(context.Background())
18467}
18468
18469// NotDone returns true if the enumeration should be started or is not yet complete.
18470func (iter ListVpnServerConfigurationsResultIterator) NotDone() bool {
18471	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18472}
18473
18474// Response returns the raw server response from the last page request.
18475func (iter ListVpnServerConfigurationsResultIterator) Response() ListVpnServerConfigurationsResult {
18476	return iter.page.Response()
18477}
18478
18479// Value returns the current value or a zero-initialized value if the
18480// iterator has advanced beyond the end of the collection.
18481func (iter ListVpnServerConfigurationsResultIterator) Value() VpnServerConfiguration {
18482	if !iter.page.NotDone() {
18483		return VpnServerConfiguration{}
18484	}
18485	return iter.page.Values()[iter.i]
18486}
18487
18488// Creates a new instance of the ListVpnServerConfigurationsResultIterator type.
18489func NewListVpnServerConfigurationsResultIterator(page ListVpnServerConfigurationsResultPage) ListVpnServerConfigurationsResultIterator {
18490	return ListVpnServerConfigurationsResultIterator{page: page}
18491}
18492
18493// IsEmpty returns true if the ListResult contains no values.
18494func (lvscr ListVpnServerConfigurationsResult) IsEmpty() bool {
18495	return lvscr.Value == nil || len(*lvscr.Value) == 0
18496}
18497
18498// hasNextLink returns true if the NextLink is not empty.
18499func (lvscr ListVpnServerConfigurationsResult) hasNextLink() bool {
18500	return lvscr.NextLink != nil && len(*lvscr.NextLink) != 0
18501}
18502
18503// listVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results.
18504// It returns nil if no more results exist.
18505func (lvscr ListVpnServerConfigurationsResult) listVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) {
18506	if !lvscr.hasNextLink() {
18507		return nil, nil
18508	}
18509	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18510		autorest.AsJSON(),
18511		autorest.AsGet(),
18512		autorest.WithBaseURL(to.String(lvscr.NextLink)))
18513}
18514
18515// ListVpnServerConfigurationsResultPage contains a page of VpnServerConfiguration values.
18516type ListVpnServerConfigurationsResultPage struct {
18517	fn    func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error)
18518	lvscr ListVpnServerConfigurationsResult
18519}
18520
18521// NextWithContext advances to the next page of values.  If there was an error making
18522// the request the page does not advance and the error is returned.
18523func (page *ListVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) {
18524	if tracing.IsEnabled() {
18525		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnServerConfigurationsResultPage.NextWithContext")
18526		defer func() {
18527			sc := -1
18528			if page.Response().Response.Response != nil {
18529				sc = page.Response().Response.Response.StatusCode
18530			}
18531			tracing.EndSpan(ctx, sc, err)
18532		}()
18533	}
18534	for {
18535		next, err := page.fn(ctx, page.lvscr)
18536		if err != nil {
18537			return err
18538		}
18539		page.lvscr = next
18540		if !next.hasNextLink() || !next.IsEmpty() {
18541			break
18542		}
18543	}
18544	return nil
18545}
18546
18547// Next advances to the next page of values.  If there was an error making
18548// the request the page does not advance and the error is returned.
18549// Deprecated: Use NextWithContext() instead.
18550func (page *ListVpnServerConfigurationsResultPage) Next() error {
18551	return page.NextWithContext(context.Background())
18552}
18553
18554// NotDone returns true if the page enumeration should be started or is not yet complete.
18555func (page ListVpnServerConfigurationsResultPage) NotDone() bool {
18556	return !page.lvscr.IsEmpty()
18557}
18558
18559// Response returns the raw server response from the last page request.
18560func (page ListVpnServerConfigurationsResultPage) Response() ListVpnServerConfigurationsResult {
18561	return page.lvscr
18562}
18563
18564// Values returns the slice of values for the current page or nil if there are no values.
18565func (page ListVpnServerConfigurationsResultPage) Values() []VpnServerConfiguration {
18566	if page.lvscr.IsEmpty() {
18567		return nil
18568	}
18569	return *page.lvscr.Value
18570}
18571
18572// Creates a new instance of the ListVpnServerConfigurationsResultPage type.
18573func NewListVpnServerConfigurationsResultPage(cur ListVpnServerConfigurationsResult, getNextPage func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error)) ListVpnServerConfigurationsResultPage {
18574	return ListVpnServerConfigurationsResultPage{
18575		fn:    getNextPage,
18576		lvscr: cur,
18577	}
18578}
18579
18580// ListVpnSiteLinkConnectionsResult result of the request to list all vpn connections to a virtual wan vpn
18581// gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
18582type ListVpnSiteLinkConnectionsResult struct {
18583	autorest.Response `json:"-"`
18584	// Value - List of VpnSiteLinkConnections.
18585	Value *[]VpnSiteLinkConnection `json:"value,omitempty"`
18586	// NextLink - URL to get the next set of operation list results if there are any.
18587	NextLink *string `json:"nextLink,omitempty"`
18588}
18589
18590// ListVpnSiteLinkConnectionsResultIterator provides access to a complete listing of VpnSiteLinkConnection
18591// values.
18592type ListVpnSiteLinkConnectionsResultIterator struct {
18593	i    int
18594	page ListVpnSiteLinkConnectionsResultPage
18595}
18596
18597// NextWithContext advances to the next value.  If there was an error making
18598// the request the iterator does not advance and the error is returned.
18599func (iter *ListVpnSiteLinkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
18600	if tracing.IsEnabled() {
18601		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultIterator.NextWithContext")
18602		defer func() {
18603			sc := -1
18604			if iter.Response().Response.Response != nil {
18605				sc = iter.Response().Response.Response.StatusCode
18606			}
18607			tracing.EndSpan(ctx, sc, err)
18608		}()
18609	}
18610	iter.i++
18611	if iter.i < len(iter.page.Values()) {
18612		return nil
18613	}
18614	err = iter.page.NextWithContext(ctx)
18615	if err != nil {
18616		iter.i--
18617		return err
18618	}
18619	iter.i = 0
18620	return nil
18621}
18622
18623// Next advances to the next value.  If there was an error making
18624// the request the iterator does not advance and the error is returned.
18625// Deprecated: Use NextWithContext() instead.
18626func (iter *ListVpnSiteLinkConnectionsResultIterator) Next() error {
18627	return iter.NextWithContext(context.Background())
18628}
18629
18630// NotDone returns true if the enumeration should be started or is not yet complete.
18631func (iter ListVpnSiteLinkConnectionsResultIterator) NotDone() bool {
18632	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18633}
18634
18635// Response returns the raw server response from the last page request.
18636func (iter ListVpnSiteLinkConnectionsResultIterator) Response() ListVpnSiteLinkConnectionsResult {
18637	return iter.page.Response()
18638}
18639
18640// Value returns the current value or a zero-initialized value if the
18641// iterator has advanced beyond the end of the collection.
18642func (iter ListVpnSiteLinkConnectionsResultIterator) Value() VpnSiteLinkConnection {
18643	if !iter.page.NotDone() {
18644		return VpnSiteLinkConnection{}
18645	}
18646	return iter.page.Values()[iter.i]
18647}
18648
18649// Creates a new instance of the ListVpnSiteLinkConnectionsResultIterator type.
18650func NewListVpnSiteLinkConnectionsResultIterator(page ListVpnSiteLinkConnectionsResultPage) ListVpnSiteLinkConnectionsResultIterator {
18651	return ListVpnSiteLinkConnectionsResultIterator{page: page}
18652}
18653
18654// IsEmpty returns true if the ListResult contains no values.
18655func (lvslcr ListVpnSiteLinkConnectionsResult) IsEmpty() bool {
18656	return lvslcr.Value == nil || len(*lvslcr.Value) == 0
18657}
18658
18659// hasNextLink returns true if the NextLink is not empty.
18660func (lvslcr ListVpnSiteLinkConnectionsResult) hasNextLink() bool {
18661	return lvslcr.NextLink != nil && len(*lvslcr.NextLink) != 0
18662}
18663
18664// listVpnSiteLinkConnectionsResultPreparer prepares a request to retrieve the next set of results.
18665// It returns nil if no more results exist.
18666func (lvslcr ListVpnSiteLinkConnectionsResult) listVpnSiteLinkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
18667	if !lvslcr.hasNextLink() {
18668		return nil, nil
18669	}
18670	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18671		autorest.AsJSON(),
18672		autorest.AsGet(),
18673		autorest.WithBaseURL(to.String(lvslcr.NextLink)))
18674}
18675
18676// ListVpnSiteLinkConnectionsResultPage contains a page of VpnSiteLinkConnection values.
18677type ListVpnSiteLinkConnectionsResultPage struct {
18678	fn     func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)
18679	lvslcr ListVpnSiteLinkConnectionsResult
18680}
18681
18682// NextWithContext advances to the next page of values.  If there was an error making
18683// the request the page does not advance and the error is returned.
18684func (page *ListVpnSiteLinkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
18685	if tracing.IsEnabled() {
18686		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultPage.NextWithContext")
18687		defer func() {
18688			sc := -1
18689			if page.Response().Response.Response != nil {
18690				sc = page.Response().Response.Response.StatusCode
18691			}
18692			tracing.EndSpan(ctx, sc, err)
18693		}()
18694	}
18695	for {
18696		next, err := page.fn(ctx, page.lvslcr)
18697		if err != nil {
18698			return err
18699		}
18700		page.lvslcr = next
18701		if !next.hasNextLink() || !next.IsEmpty() {
18702			break
18703		}
18704	}
18705	return nil
18706}
18707
18708// Next advances to the next page of values.  If there was an error making
18709// the request the page does not advance and the error is returned.
18710// Deprecated: Use NextWithContext() instead.
18711func (page *ListVpnSiteLinkConnectionsResultPage) Next() error {
18712	return page.NextWithContext(context.Background())
18713}
18714
18715// NotDone returns true if the page enumeration should be started or is not yet complete.
18716func (page ListVpnSiteLinkConnectionsResultPage) NotDone() bool {
18717	return !page.lvslcr.IsEmpty()
18718}
18719
18720// Response returns the raw server response from the last page request.
18721func (page ListVpnSiteLinkConnectionsResultPage) Response() ListVpnSiteLinkConnectionsResult {
18722	return page.lvslcr
18723}
18724
18725// Values returns the slice of values for the current page or nil if there are no values.
18726func (page ListVpnSiteLinkConnectionsResultPage) Values() []VpnSiteLinkConnection {
18727	if page.lvslcr.IsEmpty() {
18728		return nil
18729	}
18730	return *page.lvslcr.Value
18731}
18732
18733// Creates a new instance of the ListVpnSiteLinkConnectionsResultPage type.
18734func NewListVpnSiteLinkConnectionsResultPage(cur ListVpnSiteLinkConnectionsResult, getNextPage func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)) ListVpnSiteLinkConnectionsResultPage {
18735	return ListVpnSiteLinkConnectionsResultPage{
18736		fn:     getNextPage,
18737		lvslcr: cur,
18738	}
18739}
18740
18741// ListVpnSiteLinksResult result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks
18742// and a URL nextLink to get the next set of results.
18743type ListVpnSiteLinksResult struct {
18744	autorest.Response `json:"-"`
18745	// Value - List of VpnSitesLinks.
18746	Value *[]VpnSiteLink `json:"value,omitempty"`
18747	// NextLink - URL to get the next set of operation list results if there are any.
18748	NextLink *string `json:"nextLink,omitempty"`
18749}
18750
18751// ListVpnSiteLinksResultIterator provides access to a complete listing of VpnSiteLink values.
18752type ListVpnSiteLinksResultIterator struct {
18753	i    int
18754	page ListVpnSiteLinksResultPage
18755}
18756
18757// NextWithContext advances to the next value.  If there was an error making
18758// the request the iterator does not advance and the error is returned.
18759func (iter *ListVpnSiteLinksResultIterator) NextWithContext(ctx context.Context) (err error) {
18760	if tracing.IsEnabled() {
18761		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultIterator.NextWithContext")
18762		defer func() {
18763			sc := -1
18764			if iter.Response().Response.Response != nil {
18765				sc = iter.Response().Response.Response.StatusCode
18766			}
18767			tracing.EndSpan(ctx, sc, err)
18768		}()
18769	}
18770	iter.i++
18771	if iter.i < len(iter.page.Values()) {
18772		return nil
18773	}
18774	err = iter.page.NextWithContext(ctx)
18775	if err != nil {
18776		iter.i--
18777		return err
18778	}
18779	iter.i = 0
18780	return nil
18781}
18782
18783// Next advances to the next value.  If there was an error making
18784// the request the iterator does not advance and the error is returned.
18785// Deprecated: Use NextWithContext() instead.
18786func (iter *ListVpnSiteLinksResultIterator) Next() error {
18787	return iter.NextWithContext(context.Background())
18788}
18789
18790// NotDone returns true if the enumeration should be started or is not yet complete.
18791func (iter ListVpnSiteLinksResultIterator) NotDone() bool {
18792	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18793}
18794
18795// Response returns the raw server response from the last page request.
18796func (iter ListVpnSiteLinksResultIterator) Response() ListVpnSiteLinksResult {
18797	return iter.page.Response()
18798}
18799
18800// Value returns the current value or a zero-initialized value if the
18801// iterator has advanced beyond the end of the collection.
18802func (iter ListVpnSiteLinksResultIterator) Value() VpnSiteLink {
18803	if !iter.page.NotDone() {
18804		return VpnSiteLink{}
18805	}
18806	return iter.page.Values()[iter.i]
18807}
18808
18809// Creates a new instance of the ListVpnSiteLinksResultIterator type.
18810func NewListVpnSiteLinksResultIterator(page ListVpnSiteLinksResultPage) ListVpnSiteLinksResultIterator {
18811	return ListVpnSiteLinksResultIterator{page: page}
18812}
18813
18814// IsEmpty returns true if the ListResult contains no values.
18815func (lvslr ListVpnSiteLinksResult) IsEmpty() bool {
18816	return lvslr.Value == nil || len(*lvslr.Value) == 0
18817}
18818
18819// hasNextLink returns true if the NextLink is not empty.
18820func (lvslr ListVpnSiteLinksResult) hasNextLink() bool {
18821	return lvslr.NextLink != nil && len(*lvslr.NextLink) != 0
18822}
18823
18824// listVpnSiteLinksResultPreparer prepares a request to retrieve the next set of results.
18825// It returns nil if no more results exist.
18826func (lvslr ListVpnSiteLinksResult) listVpnSiteLinksResultPreparer(ctx context.Context) (*http.Request, error) {
18827	if !lvslr.hasNextLink() {
18828		return nil, nil
18829	}
18830	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18831		autorest.AsJSON(),
18832		autorest.AsGet(),
18833		autorest.WithBaseURL(to.String(lvslr.NextLink)))
18834}
18835
18836// ListVpnSiteLinksResultPage contains a page of VpnSiteLink values.
18837type ListVpnSiteLinksResultPage struct {
18838	fn    func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)
18839	lvslr ListVpnSiteLinksResult
18840}
18841
18842// NextWithContext advances to the next page of values.  If there was an error making
18843// the request the page does not advance and the error is returned.
18844func (page *ListVpnSiteLinksResultPage) NextWithContext(ctx context.Context) (err error) {
18845	if tracing.IsEnabled() {
18846		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultPage.NextWithContext")
18847		defer func() {
18848			sc := -1
18849			if page.Response().Response.Response != nil {
18850				sc = page.Response().Response.Response.StatusCode
18851			}
18852			tracing.EndSpan(ctx, sc, err)
18853		}()
18854	}
18855	for {
18856		next, err := page.fn(ctx, page.lvslr)
18857		if err != nil {
18858			return err
18859		}
18860		page.lvslr = next
18861		if !next.hasNextLink() || !next.IsEmpty() {
18862			break
18863		}
18864	}
18865	return nil
18866}
18867
18868// Next advances to the next page of values.  If there was an error making
18869// the request the page does not advance and the error is returned.
18870// Deprecated: Use NextWithContext() instead.
18871func (page *ListVpnSiteLinksResultPage) Next() error {
18872	return page.NextWithContext(context.Background())
18873}
18874
18875// NotDone returns true if the page enumeration should be started or is not yet complete.
18876func (page ListVpnSiteLinksResultPage) NotDone() bool {
18877	return !page.lvslr.IsEmpty()
18878}
18879
18880// Response returns the raw server response from the last page request.
18881func (page ListVpnSiteLinksResultPage) Response() ListVpnSiteLinksResult {
18882	return page.lvslr
18883}
18884
18885// Values returns the slice of values for the current page or nil if there are no values.
18886func (page ListVpnSiteLinksResultPage) Values() []VpnSiteLink {
18887	if page.lvslr.IsEmpty() {
18888		return nil
18889	}
18890	return *page.lvslr.Value
18891}
18892
18893// Creates a new instance of the ListVpnSiteLinksResultPage type.
18894func NewListVpnSiteLinksResultPage(cur ListVpnSiteLinksResult, getNextPage func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)) ListVpnSiteLinksResultPage {
18895	return ListVpnSiteLinksResultPage{
18896		fn:    getNextPage,
18897		lvslr: cur,
18898	}
18899}
18900
18901// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
18902// nextLink to get the next set of results.
18903type ListVpnSitesResult struct {
18904	autorest.Response `json:"-"`
18905	// Value - List of VpnSites.
18906	Value *[]VpnSite `json:"value,omitempty"`
18907	// NextLink - URL to get the next set of operation list results if there are any.
18908	NextLink *string `json:"nextLink,omitempty"`
18909}
18910
18911// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
18912type ListVpnSitesResultIterator struct {
18913	i    int
18914	page ListVpnSitesResultPage
18915}
18916
18917// NextWithContext advances to the next value.  If there was an error making
18918// the request the iterator does not advance and the error is returned.
18919func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
18920	if tracing.IsEnabled() {
18921		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
18922		defer func() {
18923			sc := -1
18924			if iter.Response().Response.Response != nil {
18925				sc = iter.Response().Response.Response.StatusCode
18926			}
18927			tracing.EndSpan(ctx, sc, err)
18928		}()
18929	}
18930	iter.i++
18931	if iter.i < len(iter.page.Values()) {
18932		return nil
18933	}
18934	err = iter.page.NextWithContext(ctx)
18935	if err != nil {
18936		iter.i--
18937		return err
18938	}
18939	iter.i = 0
18940	return nil
18941}
18942
18943// Next advances to the next value.  If there was an error making
18944// the request the iterator does not advance and the error is returned.
18945// Deprecated: Use NextWithContext() instead.
18946func (iter *ListVpnSitesResultIterator) Next() error {
18947	return iter.NextWithContext(context.Background())
18948}
18949
18950// NotDone returns true if the enumeration should be started or is not yet complete.
18951func (iter ListVpnSitesResultIterator) NotDone() bool {
18952	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18953}
18954
18955// Response returns the raw server response from the last page request.
18956func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
18957	return iter.page.Response()
18958}
18959
18960// Value returns the current value or a zero-initialized value if the
18961// iterator has advanced beyond the end of the collection.
18962func (iter ListVpnSitesResultIterator) Value() VpnSite {
18963	if !iter.page.NotDone() {
18964		return VpnSite{}
18965	}
18966	return iter.page.Values()[iter.i]
18967}
18968
18969// Creates a new instance of the ListVpnSitesResultIterator type.
18970func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
18971	return ListVpnSitesResultIterator{page: page}
18972}
18973
18974// IsEmpty returns true if the ListResult contains no values.
18975func (lvsr ListVpnSitesResult) IsEmpty() bool {
18976	return lvsr.Value == nil || len(*lvsr.Value) == 0
18977}
18978
18979// hasNextLink returns true if the NextLink is not empty.
18980func (lvsr ListVpnSitesResult) hasNextLink() bool {
18981	return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
18982}
18983
18984// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
18985// It returns nil if no more results exist.
18986func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
18987	if !lvsr.hasNextLink() {
18988		return nil, nil
18989	}
18990	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18991		autorest.AsJSON(),
18992		autorest.AsGet(),
18993		autorest.WithBaseURL(to.String(lvsr.NextLink)))
18994}
18995
18996// ListVpnSitesResultPage contains a page of VpnSite values.
18997type ListVpnSitesResultPage struct {
18998	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
18999	lvsr ListVpnSitesResult
19000}
19001
19002// NextWithContext advances to the next page of values.  If there was an error making
19003// the request the page does not advance and the error is returned.
19004func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
19005	if tracing.IsEnabled() {
19006		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
19007		defer func() {
19008			sc := -1
19009			if page.Response().Response.Response != nil {
19010				sc = page.Response().Response.Response.StatusCode
19011			}
19012			tracing.EndSpan(ctx, sc, err)
19013		}()
19014	}
19015	for {
19016		next, err := page.fn(ctx, page.lvsr)
19017		if err != nil {
19018			return err
19019		}
19020		page.lvsr = next
19021		if !next.hasNextLink() || !next.IsEmpty() {
19022			break
19023		}
19024	}
19025	return nil
19026}
19027
19028// Next advances to the next page of values.  If there was an error making
19029// the request the page does not advance and the error is returned.
19030// Deprecated: Use NextWithContext() instead.
19031func (page *ListVpnSitesResultPage) Next() error {
19032	return page.NextWithContext(context.Background())
19033}
19034
19035// NotDone returns true if the page enumeration should be started or is not yet complete.
19036func (page ListVpnSitesResultPage) NotDone() bool {
19037	return !page.lvsr.IsEmpty()
19038}
19039
19040// Response returns the raw server response from the last page request.
19041func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
19042	return page.lvsr
19043}
19044
19045// Values returns the slice of values for the current page or nil if there are no values.
19046func (page ListVpnSitesResultPage) Values() []VpnSite {
19047	if page.lvsr.IsEmpty() {
19048		return nil
19049	}
19050	return *page.lvsr.Value
19051}
19052
19053// Creates a new instance of the ListVpnSitesResultPage type.
19054func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
19055	return ListVpnSitesResultPage{
19056		fn:   getNextPage,
19057		lvsr: cur,
19058	}
19059}
19060
19061// LoadBalancer loadBalancer resource.
19062type LoadBalancer struct {
19063	autorest.Response `json:"-"`
19064	// Sku - The load balancer SKU.
19065	Sku *LoadBalancerSku `json:"sku,omitempty"`
19066	// LoadBalancerPropertiesFormat - Properties of load balancer.
19067	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
19068	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19069	Etag *string `json:"etag,omitempty"`
19070	// ID - Resource ID.
19071	ID *string `json:"id,omitempty"`
19072	// Name - READ-ONLY; Resource name.
19073	Name *string `json:"name,omitempty"`
19074	// Type - READ-ONLY; Resource type.
19075	Type *string `json:"type,omitempty"`
19076	// Location - Resource location.
19077	Location *string `json:"location,omitempty"`
19078	// Tags - Resource tags.
19079	Tags map[string]*string `json:"tags"`
19080}
19081
19082// MarshalJSON is the custom marshaler for LoadBalancer.
19083func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
19084	objectMap := make(map[string]interface{})
19085	if lb.Sku != nil {
19086		objectMap["sku"] = lb.Sku
19087	}
19088	if lb.LoadBalancerPropertiesFormat != nil {
19089		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
19090	}
19091	if lb.ID != nil {
19092		objectMap["id"] = lb.ID
19093	}
19094	if lb.Location != nil {
19095		objectMap["location"] = lb.Location
19096	}
19097	if lb.Tags != nil {
19098		objectMap["tags"] = lb.Tags
19099	}
19100	return json.Marshal(objectMap)
19101}
19102
19103// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
19104func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
19105	var m map[string]*json.RawMessage
19106	err := json.Unmarshal(body, &m)
19107	if err != nil {
19108		return err
19109	}
19110	for k, v := range m {
19111		switch k {
19112		case "sku":
19113			if v != nil {
19114				var sku LoadBalancerSku
19115				err = json.Unmarshal(*v, &sku)
19116				if err != nil {
19117					return err
19118				}
19119				lb.Sku = &sku
19120			}
19121		case "properties":
19122			if v != nil {
19123				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
19124				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
19125				if err != nil {
19126					return err
19127				}
19128				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
19129			}
19130		case "etag":
19131			if v != nil {
19132				var etag string
19133				err = json.Unmarshal(*v, &etag)
19134				if err != nil {
19135					return err
19136				}
19137				lb.Etag = &etag
19138			}
19139		case "id":
19140			if v != nil {
19141				var ID string
19142				err = json.Unmarshal(*v, &ID)
19143				if err != nil {
19144					return err
19145				}
19146				lb.ID = &ID
19147			}
19148		case "name":
19149			if v != nil {
19150				var name string
19151				err = json.Unmarshal(*v, &name)
19152				if err != nil {
19153					return err
19154				}
19155				lb.Name = &name
19156			}
19157		case "type":
19158			if v != nil {
19159				var typeVar string
19160				err = json.Unmarshal(*v, &typeVar)
19161				if err != nil {
19162					return err
19163				}
19164				lb.Type = &typeVar
19165			}
19166		case "location":
19167			if v != nil {
19168				var location string
19169				err = json.Unmarshal(*v, &location)
19170				if err != nil {
19171					return err
19172				}
19173				lb.Location = &location
19174			}
19175		case "tags":
19176			if v != nil {
19177				var tags map[string]*string
19178				err = json.Unmarshal(*v, &tags)
19179				if err != nil {
19180					return err
19181				}
19182				lb.Tags = tags
19183			}
19184		}
19185	}
19186
19187	return nil
19188}
19189
19190// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
19191type LoadBalancerBackendAddressPoolListResult struct {
19192	autorest.Response `json:"-"`
19193	// Value - A list of backend address pools in a load balancer.
19194	Value *[]BackendAddressPool `json:"value,omitempty"`
19195	// NextLink - READ-ONLY; The URL to get the next set of results.
19196	NextLink *string `json:"nextLink,omitempty"`
19197}
19198
19199// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
19200func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
19201	objectMap := make(map[string]interface{})
19202	if lbbaplr.Value != nil {
19203		objectMap["value"] = lbbaplr.Value
19204	}
19205	return json.Marshal(objectMap)
19206}
19207
19208// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
19209// BackendAddressPool values.
19210type LoadBalancerBackendAddressPoolListResultIterator struct {
19211	i    int
19212	page LoadBalancerBackendAddressPoolListResultPage
19213}
19214
19215// NextWithContext advances to the next value.  If there was an error making
19216// the request the iterator does not advance and the error is returned.
19217func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
19218	if tracing.IsEnabled() {
19219		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
19220		defer func() {
19221			sc := -1
19222			if iter.Response().Response.Response != nil {
19223				sc = iter.Response().Response.Response.StatusCode
19224			}
19225			tracing.EndSpan(ctx, sc, err)
19226		}()
19227	}
19228	iter.i++
19229	if iter.i < len(iter.page.Values()) {
19230		return nil
19231	}
19232	err = iter.page.NextWithContext(ctx)
19233	if err != nil {
19234		iter.i--
19235		return err
19236	}
19237	iter.i = 0
19238	return nil
19239}
19240
19241// Next advances to the next value.  If there was an error making
19242// the request the iterator does not advance and the error is returned.
19243// Deprecated: Use NextWithContext() instead.
19244func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
19245	return iter.NextWithContext(context.Background())
19246}
19247
19248// NotDone returns true if the enumeration should be started or is not yet complete.
19249func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
19250	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19251}
19252
19253// Response returns the raw server response from the last page request.
19254func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
19255	return iter.page.Response()
19256}
19257
19258// Value returns the current value or a zero-initialized value if the
19259// iterator has advanced beyond the end of the collection.
19260func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
19261	if !iter.page.NotDone() {
19262		return BackendAddressPool{}
19263	}
19264	return iter.page.Values()[iter.i]
19265}
19266
19267// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
19268func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
19269	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
19270}
19271
19272// IsEmpty returns true if the ListResult contains no values.
19273func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
19274	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
19275}
19276
19277// hasNextLink returns true if the NextLink is not empty.
19278func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
19279	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
19280}
19281
19282// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
19283// It returns nil if no more results exist.
19284func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
19285	if !lbbaplr.hasNextLink() {
19286		return nil, nil
19287	}
19288	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19289		autorest.AsJSON(),
19290		autorest.AsGet(),
19291		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
19292}
19293
19294// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
19295type LoadBalancerBackendAddressPoolListResultPage struct {
19296	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
19297	lbbaplr LoadBalancerBackendAddressPoolListResult
19298}
19299
19300// NextWithContext advances to the next page of values.  If there was an error making
19301// the request the page does not advance and the error is returned.
19302func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
19303	if tracing.IsEnabled() {
19304		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
19305		defer func() {
19306			sc := -1
19307			if page.Response().Response.Response != nil {
19308				sc = page.Response().Response.Response.StatusCode
19309			}
19310			tracing.EndSpan(ctx, sc, err)
19311		}()
19312	}
19313	for {
19314		next, err := page.fn(ctx, page.lbbaplr)
19315		if err != nil {
19316			return err
19317		}
19318		page.lbbaplr = next
19319		if !next.hasNextLink() || !next.IsEmpty() {
19320			break
19321		}
19322	}
19323	return nil
19324}
19325
19326// Next advances to the next page of values.  If there was an error making
19327// the request the page does not advance and the error is returned.
19328// Deprecated: Use NextWithContext() instead.
19329func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
19330	return page.NextWithContext(context.Background())
19331}
19332
19333// NotDone returns true if the page enumeration should be started or is not yet complete.
19334func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
19335	return !page.lbbaplr.IsEmpty()
19336}
19337
19338// Response returns the raw server response from the last page request.
19339func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
19340	return page.lbbaplr
19341}
19342
19343// Values returns the slice of values for the current page or nil if there are no values.
19344func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
19345	if page.lbbaplr.IsEmpty() {
19346		return nil
19347	}
19348	return *page.lbbaplr.Value
19349}
19350
19351// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
19352func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
19353	return LoadBalancerBackendAddressPoolListResultPage{
19354		fn:      getNextPage,
19355		lbbaplr: cur,
19356	}
19357}
19358
19359// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
19360type LoadBalancerFrontendIPConfigurationListResult struct {
19361	autorest.Response `json:"-"`
19362	// Value - A list of frontend IP configurations in a load balancer.
19363	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
19364	// NextLink - READ-ONLY; The URL to get the next set of results.
19365	NextLink *string `json:"nextLink,omitempty"`
19366}
19367
19368// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
19369func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
19370	objectMap := make(map[string]interface{})
19371	if lbficlr.Value != nil {
19372		objectMap["value"] = lbficlr.Value
19373	}
19374	return json.Marshal(objectMap)
19375}
19376
19377// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
19378// FrontendIPConfiguration values.
19379type LoadBalancerFrontendIPConfigurationListResultIterator struct {
19380	i    int
19381	page LoadBalancerFrontendIPConfigurationListResultPage
19382}
19383
19384// NextWithContext advances to the next value.  If there was an error making
19385// the request the iterator does not advance and the error is returned.
19386func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
19387	if tracing.IsEnabled() {
19388		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
19389		defer func() {
19390			sc := -1
19391			if iter.Response().Response.Response != nil {
19392				sc = iter.Response().Response.Response.StatusCode
19393			}
19394			tracing.EndSpan(ctx, sc, err)
19395		}()
19396	}
19397	iter.i++
19398	if iter.i < len(iter.page.Values()) {
19399		return nil
19400	}
19401	err = iter.page.NextWithContext(ctx)
19402	if err != nil {
19403		iter.i--
19404		return err
19405	}
19406	iter.i = 0
19407	return nil
19408}
19409
19410// Next advances to the next value.  If there was an error making
19411// the request the iterator does not advance and the error is returned.
19412// Deprecated: Use NextWithContext() instead.
19413func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
19414	return iter.NextWithContext(context.Background())
19415}
19416
19417// NotDone returns true if the enumeration should be started or is not yet complete.
19418func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
19419	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19420}
19421
19422// Response returns the raw server response from the last page request.
19423func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
19424	return iter.page.Response()
19425}
19426
19427// Value returns the current value or a zero-initialized value if the
19428// iterator has advanced beyond the end of the collection.
19429func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
19430	if !iter.page.NotDone() {
19431		return FrontendIPConfiguration{}
19432	}
19433	return iter.page.Values()[iter.i]
19434}
19435
19436// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
19437func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
19438	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
19439}
19440
19441// IsEmpty returns true if the ListResult contains no values.
19442func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
19443	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
19444}
19445
19446// hasNextLink returns true if the NextLink is not empty.
19447func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
19448	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
19449}
19450
19451// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
19452// It returns nil if no more results exist.
19453func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
19454	if !lbficlr.hasNextLink() {
19455		return nil, nil
19456	}
19457	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19458		autorest.AsJSON(),
19459		autorest.AsGet(),
19460		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
19461}
19462
19463// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
19464type LoadBalancerFrontendIPConfigurationListResultPage struct {
19465	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
19466	lbficlr LoadBalancerFrontendIPConfigurationListResult
19467}
19468
19469// NextWithContext advances to the next page of values.  If there was an error making
19470// the request the page does not advance and the error is returned.
19471func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
19472	if tracing.IsEnabled() {
19473		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
19474		defer func() {
19475			sc := -1
19476			if page.Response().Response.Response != nil {
19477				sc = page.Response().Response.Response.StatusCode
19478			}
19479			tracing.EndSpan(ctx, sc, err)
19480		}()
19481	}
19482	for {
19483		next, err := page.fn(ctx, page.lbficlr)
19484		if err != nil {
19485			return err
19486		}
19487		page.lbficlr = next
19488		if !next.hasNextLink() || !next.IsEmpty() {
19489			break
19490		}
19491	}
19492	return nil
19493}
19494
19495// Next advances to the next page of values.  If there was an error making
19496// the request the page does not advance and the error is returned.
19497// Deprecated: Use NextWithContext() instead.
19498func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
19499	return page.NextWithContext(context.Background())
19500}
19501
19502// NotDone returns true if the page enumeration should be started or is not yet complete.
19503func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
19504	return !page.lbficlr.IsEmpty()
19505}
19506
19507// Response returns the raw server response from the last page request.
19508func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
19509	return page.lbficlr
19510}
19511
19512// Values returns the slice of values for the current page or nil if there are no values.
19513func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
19514	if page.lbficlr.IsEmpty() {
19515		return nil
19516	}
19517	return *page.lbficlr.Value
19518}
19519
19520// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
19521func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
19522	return LoadBalancerFrontendIPConfigurationListResultPage{
19523		fn:      getNextPage,
19524		lbficlr: cur,
19525	}
19526}
19527
19528// LoadBalancerListResult response for ListLoadBalancers API service call.
19529type LoadBalancerListResult struct {
19530	autorest.Response `json:"-"`
19531	// Value - A list of load balancers in a resource group.
19532	Value *[]LoadBalancer `json:"value,omitempty"`
19533	// NextLink - READ-ONLY; The URL to get the next set of results.
19534	NextLink *string `json:"nextLink,omitempty"`
19535}
19536
19537// MarshalJSON is the custom marshaler for LoadBalancerListResult.
19538func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
19539	objectMap := make(map[string]interface{})
19540	if lblr.Value != nil {
19541		objectMap["value"] = lblr.Value
19542	}
19543	return json.Marshal(objectMap)
19544}
19545
19546// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
19547type LoadBalancerListResultIterator struct {
19548	i    int
19549	page LoadBalancerListResultPage
19550}
19551
19552// NextWithContext advances to the next value.  If there was an error making
19553// the request the iterator does not advance and the error is returned.
19554func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
19555	if tracing.IsEnabled() {
19556		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
19557		defer func() {
19558			sc := -1
19559			if iter.Response().Response.Response != nil {
19560				sc = iter.Response().Response.Response.StatusCode
19561			}
19562			tracing.EndSpan(ctx, sc, err)
19563		}()
19564	}
19565	iter.i++
19566	if iter.i < len(iter.page.Values()) {
19567		return nil
19568	}
19569	err = iter.page.NextWithContext(ctx)
19570	if err != nil {
19571		iter.i--
19572		return err
19573	}
19574	iter.i = 0
19575	return nil
19576}
19577
19578// Next advances to the next value.  If there was an error making
19579// the request the iterator does not advance and the error is returned.
19580// Deprecated: Use NextWithContext() instead.
19581func (iter *LoadBalancerListResultIterator) Next() error {
19582	return iter.NextWithContext(context.Background())
19583}
19584
19585// NotDone returns true if the enumeration should be started or is not yet complete.
19586func (iter LoadBalancerListResultIterator) NotDone() bool {
19587	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19588}
19589
19590// Response returns the raw server response from the last page request.
19591func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
19592	return iter.page.Response()
19593}
19594
19595// Value returns the current value or a zero-initialized value if the
19596// iterator has advanced beyond the end of the collection.
19597func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
19598	if !iter.page.NotDone() {
19599		return LoadBalancer{}
19600	}
19601	return iter.page.Values()[iter.i]
19602}
19603
19604// Creates a new instance of the LoadBalancerListResultIterator type.
19605func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
19606	return LoadBalancerListResultIterator{page: page}
19607}
19608
19609// IsEmpty returns true if the ListResult contains no values.
19610func (lblr LoadBalancerListResult) IsEmpty() bool {
19611	return lblr.Value == nil || len(*lblr.Value) == 0
19612}
19613
19614// hasNextLink returns true if the NextLink is not empty.
19615func (lblr LoadBalancerListResult) hasNextLink() bool {
19616	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
19617}
19618
19619// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
19620// It returns nil if no more results exist.
19621func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
19622	if !lblr.hasNextLink() {
19623		return nil, nil
19624	}
19625	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19626		autorest.AsJSON(),
19627		autorest.AsGet(),
19628		autorest.WithBaseURL(to.String(lblr.NextLink)))
19629}
19630
19631// LoadBalancerListResultPage contains a page of LoadBalancer values.
19632type LoadBalancerListResultPage struct {
19633	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
19634	lblr LoadBalancerListResult
19635}
19636
19637// NextWithContext advances to the next page of values.  If there was an error making
19638// the request the page does not advance and the error is returned.
19639func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
19640	if tracing.IsEnabled() {
19641		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
19642		defer func() {
19643			sc := -1
19644			if page.Response().Response.Response != nil {
19645				sc = page.Response().Response.Response.StatusCode
19646			}
19647			tracing.EndSpan(ctx, sc, err)
19648		}()
19649	}
19650	for {
19651		next, err := page.fn(ctx, page.lblr)
19652		if err != nil {
19653			return err
19654		}
19655		page.lblr = next
19656		if !next.hasNextLink() || !next.IsEmpty() {
19657			break
19658		}
19659	}
19660	return nil
19661}
19662
19663// Next advances to the next page of values.  If there was an error making
19664// the request the page does not advance and the error is returned.
19665// Deprecated: Use NextWithContext() instead.
19666func (page *LoadBalancerListResultPage) Next() error {
19667	return page.NextWithContext(context.Background())
19668}
19669
19670// NotDone returns true if the page enumeration should be started or is not yet complete.
19671func (page LoadBalancerListResultPage) NotDone() bool {
19672	return !page.lblr.IsEmpty()
19673}
19674
19675// Response returns the raw server response from the last page request.
19676func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
19677	return page.lblr
19678}
19679
19680// Values returns the slice of values for the current page or nil if there are no values.
19681func (page LoadBalancerListResultPage) Values() []LoadBalancer {
19682	if page.lblr.IsEmpty() {
19683		return nil
19684	}
19685	return *page.lblr.Value
19686}
19687
19688// Creates a new instance of the LoadBalancerListResultPage type.
19689func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
19690	return LoadBalancerListResultPage{
19691		fn:   getNextPage,
19692		lblr: cur,
19693	}
19694}
19695
19696// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
19697type LoadBalancerLoadBalancingRuleListResult struct {
19698	autorest.Response `json:"-"`
19699	// Value - A list of load balancing rules in a load balancer.
19700	Value *[]LoadBalancingRule `json:"value,omitempty"`
19701	// NextLink - READ-ONLY; The URL to get the next set of results.
19702	NextLink *string `json:"nextLink,omitempty"`
19703}
19704
19705// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
19706func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
19707	objectMap := make(map[string]interface{})
19708	if lblbrlr.Value != nil {
19709		objectMap["value"] = lblbrlr.Value
19710	}
19711	return json.Marshal(objectMap)
19712}
19713
19714// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
19715// LoadBalancingRule values.
19716type LoadBalancerLoadBalancingRuleListResultIterator struct {
19717	i    int
19718	page LoadBalancerLoadBalancingRuleListResultPage
19719}
19720
19721// NextWithContext advances to the next value.  If there was an error making
19722// the request the iterator does not advance and the error is returned.
19723func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
19724	if tracing.IsEnabled() {
19725		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
19726		defer func() {
19727			sc := -1
19728			if iter.Response().Response.Response != nil {
19729				sc = iter.Response().Response.Response.StatusCode
19730			}
19731			tracing.EndSpan(ctx, sc, err)
19732		}()
19733	}
19734	iter.i++
19735	if iter.i < len(iter.page.Values()) {
19736		return nil
19737	}
19738	err = iter.page.NextWithContext(ctx)
19739	if err != nil {
19740		iter.i--
19741		return err
19742	}
19743	iter.i = 0
19744	return nil
19745}
19746
19747// Next advances to the next value.  If there was an error making
19748// the request the iterator does not advance and the error is returned.
19749// Deprecated: Use NextWithContext() instead.
19750func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
19751	return iter.NextWithContext(context.Background())
19752}
19753
19754// NotDone returns true if the enumeration should be started or is not yet complete.
19755func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
19756	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19757}
19758
19759// Response returns the raw server response from the last page request.
19760func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
19761	return iter.page.Response()
19762}
19763
19764// Value returns the current value or a zero-initialized value if the
19765// iterator has advanced beyond the end of the collection.
19766func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
19767	if !iter.page.NotDone() {
19768		return LoadBalancingRule{}
19769	}
19770	return iter.page.Values()[iter.i]
19771}
19772
19773// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
19774func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
19775	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
19776}
19777
19778// IsEmpty returns true if the ListResult contains no values.
19779func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
19780	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
19781}
19782
19783// hasNextLink returns true if the NextLink is not empty.
19784func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
19785	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
19786}
19787
19788// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
19789// It returns nil if no more results exist.
19790func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
19791	if !lblbrlr.hasNextLink() {
19792		return nil, nil
19793	}
19794	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19795		autorest.AsJSON(),
19796		autorest.AsGet(),
19797		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
19798}
19799
19800// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
19801type LoadBalancerLoadBalancingRuleListResultPage struct {
19802	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
19803	lblbrlr LoadBalancerLoadBalancingRuleListResult
19804}
19805
19806// NextWithContext advances to the next page of values.  If there was an error making
19807// the request the page does not advance and the error is returned.
19808func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
19809	if tracing.IsEnabled() {
19810		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
19811		defer func() {
19812			sc := -1
19813			if page.Response().Response.Response != nil {
19814				sc = page.Response().Response.Response.StatusCode
19815			}
19816			tracing.EndSpan(ctx, sc, err)
19817		}()
19818	}
19819	for {
19820		next, err := page.fn(ctx, page.lblbrlr)
19821		if err != nil {
19822			return err
19823		}
19824		page.lblbrlr = next
19825		if !next.hasNextLink() || !next.IsEmpty() {
19826			break
19827		}
19828	}
19829	return nil
19830}
19831
19832// Next advances to the next page of values.  If there was an error making
19833// the request the page does not advance and the error is returned.
19834// Deprecated: Use NextWithContext() instead.
19835func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
19836	return page.NextWithContext(context.Background())
19837}
19838
19839// NotDone returns true if the page enumeration should be started or is not yet complete.
19840func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
19841	return !page.lblbrlr.IsEmpty()
19842}
19843
19844// Response returns the raw server response from the last page request.
19845func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
19846	return page.lblbrlr
19847}
19848
19849// Values returns the slice of values for the current page or nil if there are no values.
19850func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
19851	if page.lblbrlr.IsEmpty() {
19852		return nil
19853	}
19854	return *page.lblbrlr.Value
19855}
19856
19857// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
19858func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
19859	return LoadBalancerLoadBalancingRuleListResultPage{
19860		fn:      getNextPage,
19861		lblbrlr: cur,
19862	}
19863}
19864
19865// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call.
19866type LoadBalancerOutboundRuleListResult struct {
19867	autorest.Response `json:"-"`
19868	// Value - A list of outbound rules in a load balancer.
19869	Value *[]OutboundRule `json:"value,omitempty"`
19870	// NextLink - READ-ONLY; The URL to get the next set of results.
19871	NextLink *string `json:"nextLink,omitempty"`
19872}
19873
19874// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult.
19875func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) {
19876	objectMap := make(map[string]interface{})
19877	if lborlr.Value != nil {
19878		objectMap["value"] = lborlr.Value
19879	}
19880	return json.Marshal(objectMap)
19881}
19882
19883// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values.
19884type LoadBalancerOutboundRuleListResultIterator struct {
19885	i    int
19886	page LoadBalancerOutboundRuleListResultPage
19887}
19888
19889// NextWithContext advances to the next value.  If there was an error making
19890// the request the iterator does not advance and the error is returned.
19891func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
19892	if tracing.IsEnabled() {
19893		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext")
19894		defer func() {
19895			sc := -1
19896			if iter.Response().Response.Response != nil {
19897				sc = iter.Response().Response.Response.StatusCode
19898			}
19899			tracing.EndSpan(ctx, sc, err)
19900		}()
19901	}
19902	iter.i++
19903	if iter.i < len(iter.page.Values()) {
19904		return nil
19905	}
19906	err = iter.page.NextWithContext(ctx)
19907	if err != nil {
19908		iter.i--
19909		return err
19910	}
19911	iter.i = 0
19912	return nil
19913}
19914
19915// Next advances to the next value.  If there was an error making
19916// the request the iterator does not advance and the error is returned.
19917// Deprecated: Use NextWithContext() instead.
19918func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error {
19919	return iter.NextWithContext(context.Background())
19920}
19921
19922// NotDone returns true if the enumeration should be started or is not yet complete.
19923func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool {
19924	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19925}
19926
19927// Response returns the raw server response from the last page request.
19928func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult {
19929	return iter.page.Response()
19930}
19931
19932// Value returns the current value or a zero-initialized value if the
19933// iterator has advanced beyond the end of the collection.
19934func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule {
19935	if !iter.page.NotDone() {
19936		return OutboundRule{}
19937	}
19938	return iter.page.Values()[iter.i]
19939}
19940
19941// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type.
19942func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator {
19943	return LoadBalancerOutboundRuleListResultIterator{page: page}
19944}
19945
19946// IsEmpty returns true if the ListResult contains no values.
19947func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool {
19948	return lborlr.Value == nil || len(*lborlr.Value) == 0
19949}
19950
19951// hasNextLink returns true if the NextLink is not empty.
19952func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool {
19953	return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0
19954}
19955
19956// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results.
19957// It returns nil if no more results exist.
19958func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
19959	if !lborlr.hasNextLink() {
19960		return nil, nil
19961	}
19962	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19963		autorest.AsJSON(),
19964		autorest.AsGet(),
19965		autorest.WithBaseURL(to.String(lborlr.NextLink)))
19966}
19967
19968// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values.
19969type LoadBalancerOutboundRuleListResultPage struct {
19970	fn     func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)
19971	lborlr LoadBalancerOutboundRuleListResult
19972}
19973
19974// NextWithContext advances to the next page of values.  If there was an error making
19975// the request the page does not advance and the error is returned.
19976func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
19977	if tracing.IsEnabled() {
19978		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext")
19979		defer func() {
19980			sc := -1
19981			if page.Response().Response.Response != nil {
19982				sc = page.Response().Response.Response.StatusCode
19983			}
19984			tracing.EndSpan(ctx, sc, err)
19985		}()
19986	}
19987	for {
19988		next, err := page.fn(ctx, page.lborlr)
19989		if err != nil {
19990			return err
19991		}
19992		page.lborlr = next
19993		if !next.hasNextLink() || !next.IsEmpty() {
19994			break
19995		}
19996	}
19997	return nil
19998}
19999
20000// Next advances to the next page of values.  If there was an error making
20001// the request the page does not advance and the error is returned.
20002// Deprecated: Use NextWithContext() instead.
20003func (page *LoadBalancerOutboundRuleListResultPage) Next() error {
20004	return page.NextWithContext(context.Background())
20005}
20006
20007// NotDone returns true if the page enumeration should be started or is not yet complete.
20008func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool {
20009	return !page.lborlr.IsEmpty()
20010}
20011
20012// Response returns the raw server response from the last page request.
20013func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult {
20014	return page.lborlr
20015}
20016
20017// Values returns the slice of values for the current page or nil if there are no values.
20018func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule {
20019	if page.lborlr.IsEmpty() {
20020		return nil
20021	}
20022	return *page.lborlr.Value
20023}
20024
20025// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type.
20026func NewLoadBalancerOutboundRuleListResultPage(cur LoadBalancerOutboundRuleListResult, getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage {
20027	return LoadBalancerOutboundRuleListResultPage{
20028		fn:     getNextPage,
20029		lborlr: cur,
20030	}
20031}
20032
20033// LoadBalancerProbeListResult response for ListProbe API service call.
20034type LoadBalancerProbeListResult struct {
20035	autorest.Response `json:"-"`
20036	// Value - A list of probes in a load balancer.
20037	Value *[]Probe `json:"value,omitempty"`
20038	// NextLink - READ-ONLY; The URL to get the next set of results.
20039	NextLink *string `json:"nextLink,omitempty"`
20040}
20041
20042// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
20043func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
20044	objectMap := make(map[string]interface{})
20045	if lbplr.Value != nil {
20046		objectMap["value"] = lbplr.Value
20047	}
20048	return json.Marshal(objectMap)
20049}
20050
20051// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
20052type LoadBalancerProbeListResultIterator struct {
20053	i    int
20054	page LoadBalancerProbeListResultPage
20055}
20056
20057// NextWithContext advances to the next value.  If there was an error making
20058// the request the iterator does not advance and the error is returned.
20059func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
20060	if tracing.IsEnabled() {
20061		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
20062		defer func() {
20063			sc := -1
20064			if iter.Response().Response.Response != nil {
20065				sc = iter.Response().Response.Response.StatusCode
20066			}
20067			tracing.EndSpan(ctx, sc, err)
20068		}()
20069	}
20070	iter.i++
20071	if iter.i < len(iter.page.Values()) {
20072		return nil
20073	}
20074	err = iter.page.NextWithContext(ctx)
20075	if err != nil {
20076		iter.i--
20077		return err
20078	}
20079	iter.i = 0
20080	return nil
20081}
20082
20083// Next advances to the next value.  If there was an error making
20084// the request the iterator does not advance and the error is returned.
20085// Deprecated: Use NextWithContext() instead.
20086func (iter *LoadBalancerProbeListResultIterator) Next() error {
20087	return iter.NextWithContext(context.Background())
20088}
20089
20090// NotDone returns true if the enumeration should be started or is not yet complete.
20091func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
20092	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20093}
20094
20095// Response returns the raw server response from the last page request.
20096func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
20097	return iter.page.Response()
20098}
20099
20100// Value returns the current value or a zero-initialized value if the
20101// iterator has advanced beyond the end of the collection.
20102func (iter LoadBalancerProbeListResultIterator) Value() Probe {
20103	if !iter.page.NotDone() {
20104		return Probe{}
20105	}
20106	return iter.page.Values()[iter.i]
20107}
20108
20109// Creates a new instance of the LoadBalancerProbeListResultIterator type.
20110func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
20111	return LoadBalancerProbeListResultIterator{page: page}
20112}
20113
20114// IsEmpty returns true if the ListResult contains no values.
20115func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
20116	return lbplr.Value == nil || len(*lbplr.Value) == 0
20117}
20118
20119// hasNextLink returns true if the NextLink is not empty.
20120func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
20121	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
20122}
20123
20124// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
20125// It returns nil if no more results exist.
20126func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
20127	if !lbplr.hasNextLink() {
20128		return nil, nil
20129	}
20130	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20131		autorest.AsJSON(),
20132		autorest.AsGet(),
20133		autorest.WithBaseURL(to.String(lbplr.NextLink)))
20134}
20135
20136// LoadBalancerProbeListResultPage contains a page of Probe values.
20137type LoadBalancerProbeListResultPage struct {
20138	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
20139	lbplr LoadBalancerProbeListResult
20140}
20141
20142// NextWithContext advances to the next page of values.  If there was an error making
20143// the request the page does not advance and the error is returned.
20144func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
20145	if tracing.IsEnabled() {
20146		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
20147		defer func() {
20148			sc := -1
20149			if page.Response().Response.Response != nil {
20150				sc = page.Response().Response.Response.StatusCode
20151			}
20152			tracing.EndSpan(ctx, sc, err)
20153		}()
20154	}
20155	for {
20156		next, err := page.fn(ctx, page.lbplr)
20157		if err != nil {
20158			return err
20159		}
20160		page.lbplr = next
20161		if !next.hasNextLink() || !next.IsEmpty() {
20162			break
20163		}
20164	}
20165	return nil
20166}
20167
20168// Next advances to the next page of values.  If there was an error making
20169// the request the page does not advance and the error is returned.
20170// Deprecated: Use NextWithContext() instead.
20171func (page *LoadBalancerProbeListResultPage) Next() error {
20172	return page.NextWithContext(context.Background())
20173}
20174
20175// NotDone returns true if the page enumeration should be started or is not yet complete.
20176func (page LoadBalancerProbeListResultPage) NotDone() bool {
20177	return !page.lbplr.IsEmpty()
20178}
20179
20180// Response returns the raw server response from the last page request.
20181func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
20182	return page.lbplr
20183}
20184
20185// Values returns the slice of values for the current page or nil if there are no values.
20186func (page LoadBalancerProbeListResultPage) Values() []Probe {
20187	if page.lbplr.IsEmpty() {
20188		return nil
20189	}
20190	return *page.lbplr.Value
20191}
20192
20193// Creates a new instance of the LoadBalancerProbeListResultPage type.
20194func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
20195	return LoadBalancerProbeListResultPage{
20196		fn:    getNextPage,
20197		lbplr: cur,
20198	}
20199}
20200
20201// LoadBalancerPropertiesFormat properties of the load balancer.
20202type LoadBalancerPropertiesFormat struct {
20203	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer.
20204	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
20205	// BackendAddressPools - Collection of backend address pools used by a load balancer.
20206	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
20207	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning.
20208	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
20209	// Probes - Collection of probe objects used in the load balancer.
20210	Probes *[]Probe `json:"probes,omitempty"`
20211	// 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.
20212	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
20213	// 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.
20214	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
20215	// OutboundRules - The outbound rules.
20216	OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
20217	// ResourceGUID - READ-ONLY; The resource GUID property of the load balancer resource.
20218	ResourceGUID *string `json:"resourceGuid,omitempty"`
20219	// ProvisioningState - READ-ONLY; The provisioning state of the load balancer resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
20220	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20221}
20222
20223// MarshalJSON is the custom marshaler for LoadBalancerPropertiesFormat.
20224func (lbpf LoadBalancerPropertiesFormat) MarshalJSON() ([]byte, error) {
20225	objectMap := make(map[string]interface{})
20226	if lbpf.FrontendIPConfigurations != nil {
20227		objectMap["frontendIPConfigurations"] = lbpf.FrontendIPConfigurations
20228	}
20229	if lbpf.BackendAddressPools != nil {
20230		objectMap["backendAddressPools"] = lbpf.BackendAddressPools
20231	}
20232	if lbpf.LoadBalancingRules != nil {
20233		objectMap["loadBalancingRules"] = lbpf.LoadBalancingRules
20234	}
20235	if lbpf.Probes != nil {
20236		objectMap["probes"] = lbpf.Probes
20237	}
20238	if lbpf.InboundNatRules != nil {
20239		objectMap["inboundNatRules"] = lbpf.InboundNatRules
20240	}
20241	if lbpf.InboundNatPools != nil {
20242		objectMap["inboundNatPools"] = lbpf.InboundNatPools
20243	}
20244	if lbpf.OutboundRules != nil {
20245		objectMap["outboundRules"] = lbpf.OutboundRules
20246	}
20247	return json.Marshal(objectMap)
20248}
20249
20250// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20251// long-running operation.
20252type LoadBalancersCreateOrUpdateFuture struct {
20253	azure.FutureAPI
20254	// Result returns the result of the asynchronous operation.
20255	// If the operation has not completed it will return an error.
20256	Result func(LoadBalancersClient) (LoadBalancer, error)
20257}
20258
20259// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20260// operation.
20261type LoadBalancersDeleteFuture struct {
20262	azure.FutureAPI
20263	// Result returns the result of the asynchronous operation.
20264	// If the operation has not completed it will return an error.
20265	Result func(LoadBalancersClient) (autorest.Response, error)
20266}
20267
20268// LoadBalancerSku SKU of a load balancer.
20269type LoadBalancerSku struct {
20270	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
20271	Name LoadBalancerSkuName `json:"name,omitempty"`
20272}
20273
20274// LoadBalancingRule a load balancing rule for a load balancer.
20275type LoadBalancingRule struct {
20276	autorest.Response `json:"-"`
20277	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
20278	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
20279	// 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.
20280	Name *string `json:"name,omitempty"`
20281	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20282	Etag *string `json:"etag,omitempty"`
20283	// Type - READ-ONLY; Type of the resource.
20284	Type *string `json:"type,omitempty"`
20285	// ID - Resource ID.
20286	ID *string `json:"id,omitempty"`
20287}
20288
20289// MarshalJSON is the custom marshaler for LoadBalancingRule.
20290func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
20291	objectMap := make(map[string]interface{})
20292	if lbr.LoadBalancingRulePropertiesFormat != nil {
20293		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
20294	}
20295	if lbr.Name != nil {
20296		objectMap["name"] = lbr.Name
20297	}
20298	if lbr.ID != nil {
20299		objectMap["id"] = lbr.ID
20300	}
20301	return json.Marshal(objectMap)
20302}
20303
20304// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
20305func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
20306	var m map[string]*json.RawMessage
20307	err := json.Unmarshal(body, &m)
20308	if err != nil {
20309		return err
20310	}
20311	for k, v := range m {
20312		switch k {
20313		case "properties":
20314			if v != nil {
20315				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
20316				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
20317				if err != nil {
20318					return err
20319				}
20320				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
20321			}
20322		case "name":
20323			if v != nil {
20324				var name string
20325				err = json.Unmarshal(*v, &name)
20326				if err != nil {
20327					return err
20328				}
20329				lbr.Name = &name
20330			}
20331		case "etag":
20332			if v != nil {
20333				var etag string
20334				err = json.Unmarshal(*v, &etag)
20335				if err != nil {
20336					return err
20337				}
20338				lbr.Etag = &etag
20339			}
20340		case "type":
20341			if v != nil {
20342				var typeVar string
20343				err = json.Unmarshal(*v, &typeVar)
20344				if err != nil {
20345					return err
20346				}
20347				lbr.Type = &typeVar
20348			}
20349		case "id":
20350			if v != nil {
20351				var ID string
20352				err = json.Unmarshal(*v, &ID)
20353				if err != nil {
20354					return err
20355				}
20356				lbr.ID = &ID
20357			}
20358		}
20359	}
20360
20361	return nil
20362}
20363
20364// LoadBalancingRulePropertiesFormat properties of the load balancer.
20365type LoadBalancingRulePropertiesFormat struct {
20366	// FrontendIPConfiguration - A reference to frontend IP addresses.
20367	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
20368	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
20369	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
20370	// Probe - The reference to the load balancer probe used by the load balancing rule.
20371	Probe *SubResource `json:"probe,omitempty"`
20372	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
20373	Protocol TransportProtocol `json:"protocol,omitempty"`
20374	// LoadDistribution - The load distribution policy for this rule. Possible values include: 'LoadDistributionDefault', 'LoadDistributionSourceIP', 'LoadDistributionSourceIPProtocol'
20375	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
20376	// 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".
20377	FrontendPort *int32 `json:"frontendPort,omitempty"`
20378	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port".
20379	BackendPort *int32 `json:"backendPort,omitempty"`
20380	// 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.
20381	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
20382	// 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.
20383	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
20384	// 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.
20385	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
20386	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
20387	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
20388	// ProvisioningState - READ-ONLY; The provisioning state of the load balancing rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
20389	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20390}
20391
20392// MarshalJSON is the custom marshaler for LoadBalancingRulePropertiesFormat.
20393func (lbrpf LoadBalancingRulePropertiesFormat) MarshalJSON() ([]byte, error) {
20394	objectMap := make(map[string]interface{})
20395	if lbrpf.FrontendIPConfiguration != nil {
20396		objectMap["frontendIPConfiguration"] = lbrpf.FrontendIPConfiguration
20397	}
20398	if lbrpf.BackendAddressPool != nil {
20399		objectMap["backendAddressPool"] = lbrpf.BackendAddressPool
20400	}
20401	if lbrpf.Probe != nil {
20402		objectMap["probe"] = lbrpf.Probe
20403	}
20404	if lbrpf.Protocol != "" {
20405		objectMap["protocol"] = lbrpf.Protocol
20406	}
20407	if lbrpf.LoadDistribution != "" {
20408		objectMap["loadDistribution"] = lbrpf.LoadDistribution
20409	}
20410	if lbrpf.FrontendPort != nil {
20411		objectMap["frontendPort"] = lbrpf.FrontendPort
20412	}
20413	if lbrpf.BackendPort != nil {
20414		objectMap["backendPort"] = lbrpf.BackendPort
20415	}
20416	if lbrpf.IdleTimeoutInMinutes != nil {
20417		objectMap["idleTimeoutInMinutes"] = lbrpf.IdleTimeoutInMinutes
20418	}
20419	if lbrpf.EnableFloatingIP != nil {
20420		objectMap["enableFloatingIP"] = lbrpf.EnableFloatingIP
20421	}
20422	if lbrpf.EnableTCPReset != nil {
20423		objectMap["enableTcpReset"] = lbrpf.EnableTCPReset
20424	}
20425	if lbrpf.DisableOutboundSnat != nil {
20426		objectMap["disableOutboundSnat"] = lbrpf.DisableOutboundSnat
20427	}
20428	return json.Marshal(objectMap)
20429}
20430
20431// LocalNetworkGateway a common class for general resource information.
20432type LocalNetworkGateway struct {
20433	autorest.Response `json:"-"`
20434	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
20435	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
20436	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20437	Etag *string `json:"etag,omitempty"`
20438	// ID - Resource ID.
20439	ID *string `json:"id,omitempty"`
20440	// Name - READ-ONLY; Resource name.
20441	Name *string `json:"name,omitempty"`
20442	// Type - READ-ONLY; Resource type.
20443	Type *string `json:"type,omitempty"`
20444	// Location - Resource location.
20445	Location *string `json:"location,omitempty"`
20446	// Tags - Resource tags.
20447	Tags map[string]*string `json:"tags"`
20448}
20449
20450// MarshalJSON is the custom marshaler for LocalNetworkGateway.
20451func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
20452	objectMap := make(map[string]interface{})
20453	if lng.LocalNetworkGatewayPropertiesFormat != nil {
20454		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
20455	}
20456	if lng.ID != nil {
20457		objectMap["id"] = lng.ID
20458	}
20459	if lng.Location != nil {
20460		objectMap["location"] = lng.Location
20461	}
20462	if lng.Tags != nil {
20463		objectMap["tags"] = lng.Tags
20464	}
20465	return json.Marshal(objectMap)
20466}
20467
20468// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
20469func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
20470	var m map[string]*json.RawMessage
20471	err := json.Unmarshal(body, &m)
20472	if err != nil {
20473		return err
20474	}
20475	for k, v := range m {
20476		switch k {
20477		case "properties":
20478			if v != nil {
20479				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
20480				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
20481				if err != nil {
20482					return err
20483				}
20484				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
20485			}
20486		case "etag":
20487			if v != nil {
20488				var etag string
20489				err = json.Unmarshal(*v, &etag)
20490				if err != nil {
20491					return err
20492				}
20493				lng.Etag = &etag
20494			}
20495		case "id":
20496			if v != nil {
20497				var ID string
20498				err = json.Unmarshal(*v, &ID)
20499				if err != nil {
20500					return err
20501				}
20502				lng.ID = &ID
20503			}
20504		case "name":
20505			if v != nil {
20506				var name string
20507				err = json.Unmarshal(*v, &name)
20508				if err != nil {
20509					return err
20510				}
20511				lng.Name = &name
20512			}
20513		case "type":
20514			if v != nil {
20515				var typeVar string
20516				err = json.Unmarshal(*v, &typeVar)
20517				if err != nil {
20518					return err
20519				}
20520				lng.Type = &typeVar
20521			}
20522		case "location":
20523			if v != nil {
20524				var location string
20525				err = json.Unmarshal(*v, &location)
20526				if err != nil {
20527					return err
20528				}
20529				lng.Location = &location
20530			}
20531		case "tags":
20532			if v != nil {
20533				var tags map[string]*string
20534				err = json.Unmarshal(*v, &tags)
20535				if err != nil {
20536					return err
20537				}
20538				lng.Tags = tags
20539			}
20540		}
20541	}
20542
20543	return nil
20544}
20545
20546// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
20547type LocalNetworkGatewayListResult struct {
20548	autorest.Response `json:"-"`
20549	// Value - A list of local network gateways that exists in a resource group.
20550	Value *[]LocalNetworkGateway `json:"value,omitempty"`
20551	// NextLink - READ-ONLY; The URL to get the next set of results.
20552	NextLink *string `json:"nextLink,omitempty"`
20553}
20554
20555// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
20556func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
20557	objectMap := make(map[string]interface{})
20558	if lnglr.Value != nil {
20559		objectMap["value"] = lnglr.Value
20560	}
20561	return json.Marshal(objectMap)
20562}
20563
20564// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
20565// values.
20566type LocalNetworkGatewayListResultIterator struct {
20567	i    int
20568	page LocalNetworkGatewayListResultPage
20569}
20570
20571// NextWithContext advances to the next value.  If there was an error making
20572// the request the iterator does not advance and the error is returned.
20573func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
20574	if tracing.IsEnabled() {
20575		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
20576		defer func() {
20577			sc := -1
20578			if iter.Response().Response.Response != nil {
20579				sc = iter.Response().Response.Response.StatusCode
20580			}
20581			tracing.EndSpan(ctx, sc, err)
20582		}()
20583	}
20584	iter.i++
20585	if iter.i < len(iter.page.Values()) {
20586		return nil
20587	}
20588	err = iter.page.NextWithContext(ctx)
20589	if err != nil {
20590		iter.i--
20591		return err
20592	}
20593	iter.i = 0
20594	return nil
20595}
20596
20597// Next advances to the next value.  If there was an error making
20598// the request the iterator does not advance and the error is returned.
20599// Deprecated: Use NextWithContext() instead.
20600func (iter *LocalNetworkGatewayListResultIterator) Next() error {
20601	return iter.NextWithContext(context.Background())
20602}
20603
20604// NotDone returns true if the enumeration should be started or is not yet complete.
20605func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
20606	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20607}
20608
20609// Response returns the raw server response from the last page request.
20610func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
20611	return iter.page.Response()
20612}
20613
20614// Value returns the current value or a zero-initialized value if the
20615// iterator has advanced beyond the end of the collection.
20616func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
20617	if !iter.page.NotDone() {
20618		return LocalNetworkGateway{}
20619	}
20620	return iter.page.Values()[iter.i]
20621}
20622
20623// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
20624func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
20625	return LocalNetworkGatewayListResultIterator{page: page}
20626}
20627
20628// IsEmpty returns true if the ListResult contains no values.
20629func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
20630	return lnglr.Value == nil || len(*lnglr.Value) == 0
20631}
20632
20633// hasNextLink returns true if the NextLink is not empty.
20634func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
20635	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
20636}
20637
20638// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
20639// It returns nil if no more results exist.
20640func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
20641	if !lnglr.hasNextLink() {
20642		return nil, nil
20643	}
20644	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20645		autorest.AsJSON(),
20646		autorest.AsGet(),
20647		autorest.WithBaseURL(to.String(lnglr.NextLink)))
20648}
20649
20650// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
20651type LocalNetworkGatewayListResultPage struct {
20652	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
20653	lnglr LocalNetworkGatewayListResult
20654}
20655
20656// NextWithContext advances to the next page of values.  If there was an error making
20657// the request the page does not advance and the error is returned.
20658func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
20659	if tracing.IsEnabled() {
20660		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
20661		defer func() {
20662			sc := -1
20663			if page.Response().Response.Response != nil {
20664				sc = page.Response().Response.Response.StatusCode
20665			}
20666			tracing.EndSpan(ctx, sc, err)
20667		}()
20668	}
20669	for {
20670		next, err := page.fn(ctx, page.lnglr)
20671		if err != nil {
20672			return err
20673		}
20674		page.lnglr = next
20675		if !next.hasNextLink() || !next.IsEmpty() {
20676			break
20677		}
20678	}
20679	return nil
20680}
20681
20682// Next advances to the next page of values.  If there was an error making
20683// the request the page does not advance and the error is returned.
20684// Deprecated: Use NextWithContext() instead.
20685func (page *LocalNetworkGatewayListResultPage) Next() error {
20686	return page.NextWithContext(context.Background())
20687}
20688
20689// NotDone returns true if the page enumeration should be started or is not yet complete.
20690func (page LocalNetworkGatewayListResultPage) NotDone() bool {
20691	return !page.lnglr.IsEmpty()
20692}
20693
20694// Response returns the raw server response from the last page request.
20695func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
20696	return page.lnglr
20697}
20698
20699// Values returns the slice of values for the current page or nil if there are no values.
20700func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
20701	if page.lnglr.IsEmpty() {
20702		return nil
20703	}
20704	return *page.lnglr.Value
20705}
20706
20707// Creates a new instance of the LocalNetworkGatewayListResultPage type.
20708func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
20709	return LocalNetworkGatewayListResultPage{
20710		fn:    getNextPage,
20711		lnglr: cur,
20712	}
20713}
20714
20715// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties.
20716type LocalNetworkGatewayPropertiesFormat struct {
20717	// LocalNetworkAddressSpace - Local network site address space.
20718	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
20719	// GatewayIPAddress - IP address of local network gateway.
20720	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
20721	// Fqdn - FQDN of local network gateway.
20722	Fqdn *string `json:"fqdn,omitempty"`
20723	// BgpSettings - Local network gateway's BGP speaker settings.
20724	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
20725	// ResourceGUID - READ-ONLY; The resource GUID property of the local network gateway resource.
20726	ResourceGUID *string `json:"resourceGuid,omitempty"`
20727	// ProvisioningState - READ-ONLY; The provisioning state of the local network gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
20728	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20729}
20730
20731// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
20732func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
20733	objectMap := make(map[string]interface{})
20734	if lngpf.LocalNetworkAddressSpace != nil {
20735		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
20736	}
20737	if lngpf.GatewayIPAddress != nil {
20738		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
20739	}
20740	if lngpf.Fqdn != nil {
20741		objectMap["fqdn"] = lngpf.Fqdn
20742	}
20743	if lngpf.BgpSettings != nil {
20744		objectMap["bgpSettings"] = lngpf.BgpSettings
20745	}
20746	return json.Marshal(objectMap)
20747}
20748
20749// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20750// long-running operation.
20751type LocalNetworkGatewaysCreateOrUpdateFuture struct {
20752	azure.FutureAPI
20753	// Result returns the result of the asynchronous operation.
20754	// If the operation has not completed it will return an error.
20755	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
20756}
20757
20758// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
20759// long-running operation.
20760type LocalNetworkGatewaysDeleteFuture struct {
20761	azure.FutureAPI
20762	// Result returns the result of the asynchronous operation.
20763	// If the operation has not completed it will return an error.
20764	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
20765}
20766
20767// LogSpecification description of logging specification.
20768type LogSpecification struct {
20769	// Name - The name of the specification.
20770	Name *string `json:"name,omitempty"`
20771	// DisplayName - The display name of the specification.
20772	DisplayName *string `json:"displayName,omitempty"`
20773	// BlobDuration - Duration of the blob.
20774	BlobDuration *string `json:"blobDuration,omitempty"`
20775}
20776
20777// ManagedRuleGroupOverride defines a managed rule group override setting.
20778type ManagedRuleGroupOverride struct {
20779	// RuleGroupName - The managed rule group to override.
20780	RuleGroupName *string `json:"ruleGroupName,omitempty"`
20781	// Rules - List of rules that will be disabled. If none specified, all rules in the group will be disabled.
20782	Rules *[]ManagedRuleOverride `json:"rules,omitempty"`
20783}
20784
20785// ManagedRuleOverride defines a managed rule group override setting.
20786type ManagedRuleOverride struct {
20787	// RuleID - Identifier for the managed rule.
20788	RuleID *string `json:"ruleId,omitempty"`
20789	// State - The state of the managed rule. Defaults to Disabled if not specified. Possible values include: 'ManagedRuleEnabledStateDisabled'
20790	State ManagedRuleEnabledState `json:"state,omitempty"`
20791}
20792
20793// ManagedRulesDefinition allow to exclude some variable satisfy the condition for the WAF check.
20794type ManagedRulesDefinition struct {
20795	// Exclusions - The Exclusions that are applied on the policy.
20796	Exclusions *[]OwaspCrsExclusionEntry `json:"exclusions,omitempty"`
20797	// ManagedRuleSets - The managed rule sets that are associated with the policy.
20798	ManagedRuleSets *[]ManagedRuleSet `json:"managedRuleSets,omitempty"`
20799}
20800
20801// ManagedRuleSet defines a managed rule set.
20802type ManagedRuleSet struct {
20803	// RuleSetType - Defines the rule set type to use.
20804	RuleSetType *string `json:"ruleSetType,omitempty"`
20805	// RuleSetVersion - Defines the version of the rule set to use.
20806	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
20807	// RuleGroupOverrides - Defines the rule group overrides to apply to the rule set.
20808	RuleGroupOverrides *[]ManagedRuleGroupOverride `json:"ruleGroupOverrides,omitempty"`
20809}
20810
20811// ManagedServiceIdentity identity for the resource.
20812type ManagedServiceIdentity struct {
20813	// PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
20814	PrincipalID *string `json:"principalId,omitempty"`
20815	// TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
20816	TenantID *string `json:"tenantId,omitempty"`
20817	// 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'
20818	Type ResourceIdentityType `json:"type,omitempty"`
20819	// 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}'.
20820	UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
20821}
20822
20823// MarshalJSON is the custom marshaler for ManagedServiceIdentity.
20824func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
20825	objectMap := make(map[string]interface{})
20826	if msi.Type != "" {
20827		objectMap["type"] = msi.Type
20828	}
20829	if msi.UserAssignedIdentities != nil {
20830		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
20831	}
20832	return json.Marshal(objectMap)
20833}
20834
20835// ManagedServiceIdentityUserAssignedIdentitiesValue ...
20836type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
20837	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
20838	PrincipalID *string `json:"principalId,omitempty"`
20839	// ClientID - READ-ONLY; The client id of user assigned identity.
20840	ClientID *string `json:"clientId,omitempty"`
20841}
20842
20843// MatchCondition define match conditions.
20844type MatchCondition struct {
20845	// MatchVariables - List of match variables.
20846	MatchVariables *[]MatchVariable `json:"matchVariables,omitempty"`
20847	// Operator - The operator to be matched. Possible values include: 'WebApplicationFirewallOperatorIPMatch', 'WebApplicationFirewallOperatorEqual', 'WebApplicationFirewallOperatorContains', 'WebApplicationFirewallOperatorLessThan', 'WebApplicationFirewallOperatorGreaterThan', 'WebApplicationFirewallOperatorLessThanOrEqual', 'WebApplicationFirewallOperatorGreaterThanOrEqual', 'WebApplicationFirewallOperatorBeginsWith', 'WebApplicationFirewallOperatorEndsWith', 'WebApplicationFirewallOperatorRegex', 'WebApplicationFirewallOperatorGeoMatch'
20848	Operator WebApplicationFirewallOperator `json:"operator,omitempty"`
20849	// NegationConditon - Whether this is negate condition or not.
20850	NegationConditon *bool `json:"negationConditon,omitempty"`
20851	// MatchValues - Match value.
20852	MatchValues *[]string `json:"matchValues,omitempty"`
20853	// Transforms - List of transforms.
20854	Transforms *[]WebApplicationFirewallTransform `json:"transforms,omitempty"`
20855}
20856
20857// MatchedRule matched rule.
20858type MatchedRule struct {
20859	// RuleName - Name of the matched network security rule.
20860	RuleName *string `json:"ruleName,omitempty"`
20861	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
20862	Action *string `json:"action,omitempty"`
20863}
20864
20865// MatchVariable define match variables.
20866type MatchVariable struct {
20867	// VariableName - Match Variable. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestURI', 'RequestHeaders', 'RequestBody', 'RequestCookies'
20868	VariableName WebApplicationFirewallMatchVariable `json:"variableName,omitempty"`
20869	// Selector - The selector of match variable.
20870	Selector *string `json:"selector,omitempty"`
20871}
20872
20873// MetricSpecification description of metrics specification.
20874type MetricSpecification struct {
20875	// Name - The name of the metric.
20876	Name *string `json:"name,omitempty"`
20877	// DisplayName - The display name of the metric.
20878	DisplayName *string `json:"displayName,omitempty"`
20879	// DisplayDescription - The description of the metric.
20880	DisplayDescription *string `json:"displayDescription,omitempty"`
20881	// Unit - Units the metric to be displayed in.
20882	Unit *string `json:"unit,omitempty"`
20883	// AggregationType - The aggregation type.
20884	AggregationType *string `json:"aggregationType,omitempty"`
20885	// Availabilities - List of availability.
20886	Availabilities *[]Availability `json:"availabilities,omitempty"`
20887	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
20888	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
20889	// FillGapWithZero - Whether gaps would be filled with zeros.
20890	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
20891	// MetricFilterPattern - Pattern for the filter of the metric.
20892	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
20893	// Dimensions - List of dimensions.
20894	Dimensions *[]Dimension `json:"dimensions,omitempty"`
20895	// IsInternal - Whether the metric is internal.
20896	IsInternal *bool `json:"isInternal,omitempty"`
20897	// SourceMdmAccount - The source MDM account.
20898	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
20899	// SourceMdmNamespace - The source MDM namespace.
20900	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
20901	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
20902	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
20903}
20904
20905// NatGateway nat Gateway resource.
20906type NatGateway struct {
20907	autorest.Response `json:"-"`
20908	// Sku - The nat gateway SKU.
20909	Sku *NatGatewaySku `json:"sku,omitempty"`
20910	// NatGatewayPropertiesFormat - Nat Gateway properties.
20911	*NatGatewayPropertiesFormat `json:"properties,omitempty"`
20912	// Zones - A list of availability zones denoting the zone in which Nat Gateway should be deployed.
20913	Zones *[]string `json:"zones,omitempty"`
20914	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20915	Etag *string `json:"etag,omitempty"`
20916	// ID - Resource ID.
20917	ID *string `json:"id,omitempty"`
20918	// Name - READ-ONLY; Resource name.
20919	Name *string `json:"name,omitempty"`
20920	// Type - READ-ONLY; Resource type.
20921	Type *string `json:"type,omitempty"`
20922	// Location - Resource location.
20923	Location *string `json:"location,omitempty"`
20924	// Tags - Resource tags.
20925	Tags map[string]*string `json:"tags"`
20926}
20927
20928// MarshalJSON is the custom marshaler for NatGateway.
20929func (ng NatGateway) MarshalJSON() ([]byte, error) {
20930	objectMap := make(map[string]interface{})
20931	if ng.Sku != nil {
20932		objectMap["sku"] = ng.Sku
20933	}
20934	if ng.NatGatewayPropertiesFormat != nil {
20935		objectMap["properties"] = ng.NatGatewayPropertiesFormat
20936	}
20937	if ng.Zones != nil {
20938		objectMap["zones"] = ng.Zones
20939	}
20940	if ng.ID != nil {
20941		objectMap["id"] = ng.ID
20942	}
20943	if ng.Location != nil {
20944		objectMap["location"] = ng.Location
20945	}
20946	if ng.Tags != nil {
20947		objectMap["tags"] = ng.Tags
20948	}
20949	return json.Marshal(objectMap)
20950}
20951
20952// UnmarshalJSON is the custom unmarshaler for NatGateway struct.
20953func (ng *NatGateway) UnmarshalJSON(body []byte) error {
20954	var m map[string]*json.RawMessage
20955	err := json.Unmarshal(body, &m)
20956	if err != nil {
20957		return err
20958	}
20959	for k, v := range m {
20960		switch k {
20961		case "sku":
20962			if v != nil {
20963				var sku NatGatewaySku
20964				err = json.Unmarshal(*v, &sku)
20965				if err != nil {
20966					return err
20967				}
20968				ng.Sku = &sku
20969			}
20970		case "properties":
20971			if v != nil {
20972				var natGatewayPropertiesFormat NatGatewayPropertiesFormat
20973				err = json.Unmarshal(*v, &natGatewayPropertiesFormat)
20974				if err != nil {
20975					return err
20976				}
20977				ng.NatGatewayPropertiesFormat = &natGatewayPropertiesFormat
20978			}
20979		case "zones":
20980			if v != nil {
20981				var zones []string
20982				err = json.Unmarshal(*v, &zones)
20983				if err != nil {
20984					return err
20985				}
20986				ng.Zones = &zones
20987			}
20988		case "etag":
20989			if v != nil {
20990				var etag string
20991				err = json.Unmarshal(*v, &etag)
20992				if err != nil {
20993					return err
20994				}
20995				ng.Etag = &etag
20996			}
20997		case "id":
20998			if v != nil {
20999				var ID string
21000				err = json.Unmarshal(*v, &ID)
21001				if err != nil {
21002					return err
21003				}
21004				ng.ID = &ID
21005			}
21006		case "name":
21007			if v != nil {
21008				var name string
21009				err = json.Unmarshal(*v, &name)
21010				if err != nil {
21011					return err
21012				}
21013				ng.Name = &name
21014			}
21015		case "type":
21016			if v != nil {
21017				var typeVar string
21018				err = json.Unmarshal(*v, &typeVar)
21019				if err != nil {
21020					return err
21021				}
21022				ng.Type = &typeVar
21023			}
21024		case "location":
21025			if v != nil {
21026				var location string
21027				err = json.Unmarshal(*v, &location)
21028				if err != nil {
21029					return err
21030				}
21031				ng.Location = &location
21032			}
21033		case "tags":
21034			if v != nil {
21035				var tags map[string]*string
21036				err = json.Unmarshal(*v, &tags)
21037				if err != nil {
21038					return err
21039				}
21040				ng.Tags = tags
21041			}
21042		}
21043	}
21044
21045	return nil
21046}
21047
21048// NatGatewayListResult response for ListNatGateways API service call.
21049type NatGatewayListResult struct {
21050	autorest.Response `json:"-"`
21051	// Value - A list of Nat Gateways that exists in a resource group.
21052	Value *[]NatGateway `json:"value,omitempty"`
21053	// NextLink - The URL to get the next set of results.
21054	NextLink *string `json:"nextLink,omitempty"`
21055}
21056
21057// NatGatewayListResultIterator provides access to a complete listing of NatGateway values.
21058type NatGatewayListResultIterator struct {
21059	i    int
21060	page NatGatewayListResultPage
21061}
21062
21063// NextWithContext advances to the next value.  If there was an error making
21064// the request the iterator does not advance and the error is returned.
21065func (iter *NatGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
21066	if tracing.IsEnabled() {
21067		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultIterator.NextWithContext")
21068		defer func() {
21069			sc := -1
21070			if iter.Response().Response.Response != nil {
21071				sc = iter.Response().Response.Response.StatusCode
21072			}
21073			tracing.EndSpan(ctx, sc, err)
21074		}()
21075	}
21076	iter.i++
21077	if iter.i < len(iter.page.Values()) {
21078		return nil
21079	}
21080	err = iter.page.NextWithContext(ctx)
21081	if err != nil {
21082		iter.i--
21083		return err
21084	}
21085	iter.i = 0
21086	return nil
21087}
21088
21089// Next advances to the next value.  If there was an error making
21090// the request the iterator does not advance and the error is returned.
21091// Deprecated: Use NextWithContext() instead.
21092func (iter *NatGatewayListResultIterator) Next() error {
21093	return iter.NextWithContext(context.Background())
21094}
21095
21096// NotDone returns true if the enumeration should be started or is not yet complete.
21097func (iter NatGatewayListResultIterator) NotDone() bool {
21098	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21099}
21100
21101// Response returns the raw server response from the last page request.
21102func (iter NatGatewayListResultIterator) Response() NatGatewayListResult {
21103	return iter.page.Response()
21104}
21105
21106// Value returns the current value or a zero-initialized value if the
21107// iterator has advanced beyond the end of the collection.
21108func (iter NatGatewayListResultIterator) Value() NatGateway {
21109	if !iter.page.NotDone() {
21110		return NatGateway{}
21111	}
21112	return iter.page.Values()[iter.i]
21113}
21114
21115// Creates a new instance of the NatGatewayListResultIterator type.
21116func NewNatGatewayListResultIterator(page NatGatewayListResultPage) NatGatewayListResultIterator {
21117	return NatGatewayListResultIterator{page: page}
21118}
21119
21120// IsEmpty returns true if the ListResult contains no values.
21121func (nglr NatGatewayListResult) IsEmpty() bool {
21122	return nglr.Value == nil || len(*nglr.Value) == 0
21123}
21124
21125// hasNextLink returns true if the NextLink is not empty.
21126func (nglr NatGatewayListResult) hasNextLink() bool {
21127	return nglr.NextLink != nil && len(*nglr.NextLink) != 0
21128}
21129
21130// natGatewayListResultPreparer prepares a request to retrieve the next set of results.
21131// It returns nil if no more results exist.
21132func (nglr NatGatewayListResult) natGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
21133	if !nglr.hasNextLink() {
21134		return nil, nil
21135	}
21136	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21137		autorest.AsJSON(),
21138		autorest.AsGet(),
21139		autorest.WithBaseURL(to.String(nglr.NextLink)))
21140}
21141
21142// NatGatewayListResultPage contains a page of NatGateway values.
21143type NatGatewayListResultPage struct {
21144	fn   func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)
21145	nglr NatGatewayListResult
21146}
21147
21148// NextWithContext advances to the next page of values.  If there was an error making
21149// the request the page does not advance and the error is returned.
21150func (page *NatGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
21151	if tracing.IsEnabled() {
21152		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultPage.NextWithContext")
21153		defer func() {
21154			sc := -1
21155			if page.Response().Response.Response != nil {
21156				sc = page.Response().Response.Response.StatusCode
21157			}
21158			tracing.EndSpan(ctx, sc, err)
21159		}()
21160	}
21161	for {
21162		next, err := page.fn(ctx, page.nglr)
21163		if err != nil {
21164			return err
21165		}
21166		page.nglr = next
21167		if !next.hasNextLink() || !next.IsEmpty() {
21168			break
21169		}
21170	}
21171	return nil
21172}
21173
21174// Next advances to the next page of values.  If there was an error making
21175// the request the page does not advance and the error is returned.
21176// Deprecated: Use NextWithContext() instead.
21177func (page *NatGatewayListResultPage) Next() error {
21178	return page.NextWithContext(context.Background())
21179}
21180
21181// NotDone returns true if the page enumeration should be started or is not yet complete.
21182func (page NatGatewayListResultPage) NotDone() bool {
21183	return !page.nglr.IsEmpty()
21184}
21185
21186// Response returns the raw server response from the last page request.
21187func (page NatGatewayListResultPage) Response() NatGatewayListResult {
21188	return page.nglr
21189}
21190
21191// Values returns the slice of values for the current page or nil if there are no values.
21192func (page NatGatewayListResultPage) Values() []NatGateway {
21193	if page.nglr.IsEmpty() {
21194		return nil
21195	}
21196	return *page.nglr.Value
21197}
21198
21199// Creates a new instance of the NatGatewayListResultPage type.
21200func NewNatGatewayListResultPage(cur NatGatewayListResult, getNextPage func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)) NatGatewayListResultPage {
21201	return NatGatewayListResultPage{
21202		fn:   getNextPage,
21203		nglr: cur,
21204	}
21205}
21206
21207// NatGatewayPropertiesFormat nat Gateway properties.
21208type NatGatewayPropertiesFormat struct {
21209	// IdleTimeoutInMinutes - The idle timeout of the nat gateway.
21210	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
21211	// PublicIPAddresses - An array of public ip addresses associated with the nat gateway resource.
21212	PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"`
21213	// PublicIPPrefixes - An array of public ip prefixes associated with the nat gateway resource.
21214	PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"`
21215	// Subnets - READ-ONLY; An array of references to the subnets using this nat gateway resource.
21216	Subnets *[]SubResource `json:"subnets,omitempty"`
21217	// ResourceGUID - READ-ONLY; The resource GUID property of the NAT gateway resource.
21218	ResourceGUID *string `json:"resourceGuid,omitempty"`
21219	// ProvisioningState - READ-ONLY; The provisioning state of the NAT gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
21220	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21221}
21222
21223// MarshalJSON is the custom marshaler for NatGatewayPropertiesFormat.
21224func (ngpf NatGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
21225	objectMap := make(map[string]interface{})
21226	if ngpf.IdleTimeoutInMinutes != nil {
21227		objectMap["idleTimeoutInMinutes"] = ngpf.IdleTimeoutInMinutes
21228	}
21229	if ngpf.PublicIPAddresses != nil {
21230		objectMap["publicIpAddresses"] = ngpf.PublicIPAddresses
21231	}
21232	if ngpf.PublicIPPrefixes != nil {
21233		objectMap["publicIpPrefixes"] = ngpf.PublicIPPrefixes
21234	}
21235	return json.Marshal(objectMap)
21236}
21237
21238// NatGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21239// long-running operation.
21240type NatGatewaysCreateOrUpdateFuture struct {
21241	azure.FutureAPI
21242	// Result returns the result of the asynchronous operation.
21243	// If the operation has not completed it will return an error.
21244	Result func(NatGatewaysClient) (NatGateway, error)
21245}
21246
21247// NatGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21248// operation.
21249type NatGatewaysDeleteFuture struct {
21250	azure.FutureAPI
21251	// Result returns the result of the asynchronous operation.
21252	// If the operation has not completed it will return an error.
21253	Result func(NatGatewaysClient) (autorest.Response, error)
21254}
21255
21256// NatGatewaySku SKU of nat gateway.
21257type NatGatewaySku struct {
21258	// Name - Name of Nat Gateway SKU. Possible values include: 'NatGatewaySkuNameStandard'
21259	Name NatGatewaySkuName `json:"name,omitempty"`
21260}
21261
21262// NatRuleCondition rule condition of type nat.
21263type NatRuleCondition struct {
21264	// IPProtocols - Array of FirewallPolicyRuleConditionNetworkProtocols.
21265	IPProtocols *[]FirewallPolicyRuleConditionNetworkProtocol `json:"ipProtocols,omitempty"`
21266	// SourceAddresses - List of source IP addresses for this rule.
21267	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
21268	// DestinationAddresses - List of destination IP addresses or Service Tags.
21269	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
21270	// DestinationPorts - List of destination ports.
21271	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
21272	// SourceIPGroups - List of source IpGroups for this rule.
21273	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
21274	// Name - Name of the rule condition.
21275	Name *string `json:"name,omitempty"`
21276	// Description - Description of the rule condition.
21277	Description *string `json:"description,omitempty"`
21278	// RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNatRuleCondition', 'RuleConditionTypeNetworkRuleCondition'
21279	RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"`
21280}
21281
21282// MarshalJSON is the custom marshaler for NatRuleCondition.
21283func (nrc NatRuleCondition) MarshalJSON() ([]byte, error) {
21284	nrc.RuleConditionType = RuleConditionTypeNatRuleCondition
21285	objectMap := make(map[string]interface{})
21286	if nrc.IPProtocols != nil {
21287		objectMap["ipProtocols"] = nrc.IPProtocols
21288	}
21289	if nrc.SourceAddresses != nil {
21290		objectMap["sourceAddresses"] = nrc.SourceAddresses
21291	}
21292	if nrc.DestinationAddresses != nil {
21293		objectMap["destinationAddresses"] = nrc.DestinationAddresses
21294	}
21295	if nrc.DestinationPorts != nil {
21296		objectMap["destinationPorts"] = nrc.DestinationPorts
21297	}
21298	if nrc.SourceIPGroups != nil {
21299		objectMap["sourceIpGroups"] = nrc.SourceIPGroups
21300	}
21301	if nrc.Name != nil {
21302		objectMap["name"] = nrc.Name
21303	}
21304	if nrc.Description != nil {
21305		objectMap["description"] = nrc.Description
21306	}
21307	if nrc.RuleConditionType != "" {
21308		objectMap["ruleConditionType"] = nrc.RuleConditionType
21309	}
21310	return json.Marshal(objectMap)
21311}
21312
21313// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for NatRuleCondition.
21314func (nrc NatRuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) {
21315	return nil, false
21316}
21317
21318// AsNatRuleCondition is the BasicFirewallPolicyRuleCondition implementation for NatRuleCondition.
21319func (nrc NatRuleCondition) AsNatRuleCondition() (*NatRuleCondition, bool) {
21320	return &nrc, true
21321}
21322
21323// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for NatRuleCondition.
21324func (nrc NatRuleCondition) AsRuleCondition() (*RuleCondition, bool) {
21325	return nil, false
21326}
21327
21328// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for NatRuleCondition.
21329func (nrc NatRuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) {
21330	return nil, false
21331}
21332
21333// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for NatRuleCondition.
21334func (nrc NatRuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) {
21335	return &nrc, true
21336}
21337
21338// NextHopParameters parameters that define the source and destination endpoint.
21339type NextHopParameters struct {
21340	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
21341	TargetResourceID *string `json:"targetResourceId,omitempty"`
21342	// SourceIPAddress - The source IP address.
21343	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
21344	// DestinationIPAddress - The destination IP address.
21345	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
21346	// 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).
21347	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
21348}
21349
21350// NextHopResult the information about next hop from the specified VM.
21351type NextHopResult struct {
21352	autorest.Response `json:"-"`
21353	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
21354	NextHopType NextHopType `json:"nextHopType,omitempty"`
21355	// NextHopIPAddress - Next hop IP Address.
21356	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
21357	// 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'.
21358	RouteTableID *string `json:"routeTableId,omitempty"`
21359}
21360
21361// Operation network REST API operation definition.
21362type Operation struct {
21363	// Name - Operation name: {provider}/{resource}/{operation}.
21364	Name *string `json:"name,omitempty"`
21365	// Display - Display metadata associated with the operation.
21366	Display *OperationDisplay `json:"display,omitempty"`
21367	// Origin - Origin of the operation.
21368	Origin *string `json:"origin,omitempty"`
21369	// OperationPropertiesFormat - Operation properties format.
21370	*OperationPropertiesFormat `json:"properties,omitempty"`
21371}
21372
21373// MarshalJSON is the custom marshaler for Operation.
21374func (o Operation) MarshalJSON() ([]byte, error) {
21375	objectMap := make(map[string]interface{})
21376	if o.Name != nil {
21377		objectMap["name"] = o.Name
21378	}
21379	if o.Display != nil {
21380		objectMap["display"] = o.Display
21381	}
21382	if o.Origin != nil {
21383		objectMap["origin"] = o.Origin
21384	}
21385	if o.OperationPropertiesFormat != nil {
21386		objectMap["properties"] = o.OperationPropertiesFormat
21387	}
21388	return json.Marshal(objectMap)
21389}
21390
21391// UnmarshalJSON is the custom unmarshaler for Operation struct.
21392func (o *Operation) UnmarshalJSON(body []byte) error {
21393	var m map[string]*json.RawMessage
21394	err := json.Unmarshal(body, &m)
21395	if err != nil {
21396		return err
21397	}
21398	for k, v := range m {
21399		switch k {
21400		case "name":
21401			if v != nil {
21402				var name string
21403				err = json.Unmarshal(*v, &name)
21404				if err != nil {
21405					return err
21406				}
21407				o.Name = &name
21408			}
21409		case "display":
21410			if v != nil {
21411				var display OperationDisplay
21412				err = json.Unmarshal(*v, &display)
21413				if err != nil {
21414					return err
21415				}
21416				o.Display = &display
21417			}
21418		case "origin":
21419			if v != nil {
21420				var origin string
21421				err = json.Unmarshal(*v, &origin)
21422				if err != nil {
21423					return err
21424				}
21425				o.Origin = &origin
21426			}
21427		case "properties":
21428			if v != nil {
21429				var operationPropertiesFormat OperationPropertiesFormat
21430				err = json.Unmarshal(*v, &operationPropertiesFormat)
21431				if err != nil {
21432					return err
21433				}
21434				o.OperationPropertiesFormat = &operationPropertiesFormat
21435			}
21436		}
21437	}
21438
21439	return nil
21440}
21441
21442// OperationDisplay display metadata associated with the operation.
21443type OperationDisplay struct {
21444	// Provider - Service provider: Microsoft Network.
21445	Provider *string `json:"provider,omitempty"`
21446	// Resource - Resource on which the operation is performed.
21447	Resource *string `json:"resource,omitempty"`
21448	// Operation - Type of the operation: get, read, delete, etc.
21449	Operation *string `json:"operation,omitempty"`
21450	// Description - Description of the operation.
21451	Description *string `json:"description,omitempty"`
21452}
21453
21454// OperationListResult result of the request to list Network operations. It contains a list of operations
21455// and a URL link to get the next set of results.
21456type OperationListResult struct {
21457	autorest.Response `json:"-"`
21458	// Value - List of Network operations supported by the Network resource provider.
21459	Value *[]Operation `json:"value,omitempty"`
21460	// NextLink - URL to get the next set of operation list results if there are any.
21461	NextLink *string `json:"nextLink,omitempty"`
21462}
21463
21464// OperationListResultIterator provides access to a complete listing of Operation values.
21465type OperationListResultIterator struct {
21466	i    int
21467	page OperationListResultPage
21468}
21469
21470// NextWithContext advances to the next value.  If there was an error making
21471// the request the iterator does not advance and the error is returned.
21472func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
21473	if tracing.IsEnabled() {
21474		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
21475		defer func() {
21476			sc := -1
21477			if iter.Response().Response.Response != nil {
21478				sc = iter.Response().Response.Response.StatusCode
21479			}
21480			tracing.EndSpan(ctx, sc, err)
21481		}()
21482	}
21483	iter.i++
21484	if iter.i < len(iter.page.Values()) {
21485		return nil
21486	}
21487	err = iter.page.NextWithContext(ctx)
21488	if err != nil {
21489		iter.i--
21490		return err
21491	}
21492	iter.i = 0
21493	return nil
21494}
21495
21496// Next advances to the next value.  If there was an error making
21497// the request the iterator does not advance and the error is returned.
21498// Deprecated: Use NextWithContext() instead.
21499func (iter *OperationListResultIterator) Next() error {
21500	return iter.NextWithContext(context.Background())
21501}
21502
21503// NotDone returns true if the enumeration should be started or is not yet complete.
21504func (iter OperationListResultIterator) NotDone() bool {
21505	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21506}
21507
21508// Response returns the raw server response from the last page request.
21509func (iter OperationListResultIterator) Response() OperationListResult {
21510	return iter.page.Response()
21511}
21512
21513// Value returns the current value or a zero-initialized value if the
21514// iterator has advanced beyond the end of the collection.
21515func (iter OperationListResultIterator) Value() Operation {
21516	if !iter.page.NotDone() {
21517		return Operation{}
21518	}
21519	return iter.page.Values()[iter.i]
21520}
21521
21522// Creates a new instance of the OperationListResultIterator type.
21523func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
21524	return OperationListResultIterator{page: page}
21525}
21526
21527// IsEmpty returns true if the ListResult contains no values.
21528func (olr OperationListResult) IsEmpty() bool {
21529	return olr.Value == nil || len(*olr.Value) == 0
21530}
21531
21532// hasNextLink returns true if the NextLink is not empty.
21533func (olr OperationListResult) hasNextLink() bool {
21534	return olr.NextLink != nil && len(*olr.NextLink) != 0
21535}
21536
21537// operationListResultPreparer prepares a request to retrieve the next set of results.
21538// It returns nil if no more results exist.
21539func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
21540	if !olr.hasNextLink() {
21541		return nil, nil
21542	}
21543	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21544		autorest.AsJSON(),
21545		autorest.AsGet(),
21546		autorest.WithBaseURL(to.String(olr.NextLink)))
21547}
21548
21549// OperationListResultPage contains a page of Operation values.
21550type OperationListResultPage struct {
21551	fn  func(context.Context, OperationListResult) (OperationListResult, error)
21552	olr OperationListResult
21553}
21554
21555// NextWithContext advances to the next page of values.  If there was an error making
21556// the request the page does not advance and the error is returned.
21557func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
21558	if tracing.IsEnabled() {
21559		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
21560		defer func() {
21561			sc := -1
21562			if page.Response().Response.Response != nil {
21563				sc = page.Response().Response.Response.StatusCode
21564			}
21565			tracing.EndSpan(ctx, sc, err)
21566		}()
21567	}
21568	for {
21569		next, err := page.fn(ctx, page.olr)
21570		if err != nil {
21571			return err
21572		}
21573		page.olr = next
21574		if !next.hasNextLink() || !next.IsEmpty() {
21575			break
21576		}
21577	}
21578	return nil
21579}
21580
21581// Next advances to the next page of values.  If there was an error making
21582// the request the page does not advance and the error is returned.
21583// Deprecated: Use NextWithContext() instead.
21584func (page *OperationListResultPage) Next() error {
21585	return page.NextWithContext(context.Background())
21586}
21587
21588// NotDone returns true if the page enumeration should be started or is not yet complete.
21589func (page OperationListResultPage) NotDone() bool {
21590	return !page.olr.IsEmpty()
21591}
21592
21593// Response returns the raw server response from the last page request.
21594func (page OperationListResultPage) Response() OperationListResult {
21595	return page.olr
21596}
21597
21598// Values returns the slice of values for the current page or nil if there are no values.
21599func (page OperationListResultPage) Values() []Operation {
21600	if page.olr.IsEmpty() {
21601		return nil
21602	}
21603	return *page.olr.Value
21604}
21605
21606// Creates a new instance of the OperationListResultPage type.
21607func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
21608	return OperationListResultPage{
21609		fn:  getNextPage,
21610		olr: cur,
21611	}
21612}
21613
21614// OperationPropertiesFormat description of operation properties format.
21615type OperationPropertiesFormat struct {
21616	// ServiceSpecification - Specification of the service.
21617	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
21618}
21619
21620// OperationPropertiesFormatServiceSpecification specification of the service.
21621type OperationPropertiesFormatServiceSpecification struct {
21622	// MetricSpecifications - Operation service specification.
21623	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
21624	// LogSpecifications - Operation log specification.
21625	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
21626}
21627
21628// OutboundRule outbound rule of the load balancer.
21629type OutboundRule struct {
21630	autorest.Response `json:"-"`
21631	// OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
21632	*OutboundRulePropertiesFormat `json:"properties,omitempty"`
21633	// 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.
21634	Name *string `json:"name,omitempty"`
21635	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21636	Etag *string `json:"etag,omitempty"`
21637	// Type - READ-ONLY; Type of the resource.
21638	Type *string `json:"type,omitempty"`
21639	// ID - Resource ID.
21640	ID *string `json:"id,omitempty"`
21641}
21642
21643// MarshalJSON is the custom marshaler for OutboundRule.
21644func (or OutboundRule) MarshalJSON() ([]byte, error) {
21645	objectMap := make(map[string]interface{})
21646	if or.OutboundRulePropertiesFormat != nil {
21647		objectMap["properties"] = or.OutboundRulePropertiesFormat
21648	}
21649	if or.Name != nil {
21650		objectMap["name"] = or.Name
21651	}
21652	if or.ID != nil {
21653		objectMap["id"] = or.ID
21654	}
21655	return json.Marshal(objectMap)
21656}
21657
21658// UnmarshalJSON is the custom unmarshaler for OutboundRule struct.
21659func (or *OutboundRule) UnmarshalJSON(body []byte) error {
21660	var m map[string]*json.RawMessage
21661	err := json.Unmarshal(body, &m)
21662	if err != nil {
21663		return err
21664	}
21665	for k, v := range m {
21666		switch k {
21667		case "properties":
21668			if v != nil {
21669				var outboundRulePropertiesFormat OutboundRulePropertiesFormat
21670				err = json.Unmarshal(*v, &outboundRulePropertiesFormat)
21671				if err != nil {
21672					return err
21673				}
21674				or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat
21675			}
21676		case "name":
21677			if v != nil {
21678				var name string
21679				err = json.Unmarshal(*v, &name)
21680				if err != nil {
21681					return err
21682				}
21683				or.Name = &name
21684			}
21685		case "etag":
21686			if v != nil {
21687				var etag string
21688				err = json.Unmarshal(*v, &etag)
21689				if err != nil {
21690					return err
21691				}
21692				or.Etag = &etag
21693			}
21694		case "type":
21695			if v != nil {
21696				var typeVar string
21697				err = json.Unmarshal(*v, &typeVar)
21698				if err != nil {
21699					return err
21700				}
21701				or.Type = &typeVar
21702			}
21703		case "id":
21704			if v != nil {
21705				var ID string
21706				err = json.Unmarshal(*v, &ID)
21707				if err != nil {
21708					return err
21709				}
21710				or.ID = &ID
21711			}
21712		}
21713	}
21714
21715	return nil
21716}
21717
21718// OutboundRulePropertiesFormat outbound rule of the load balancer.
21719type OutboundRulePropertiesFormat struct {
21720	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
21721	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
21722	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
21723	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
21724	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
21725	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
21726	// ProvisioningState - READ-ONLY; The provisioning state of the outbound rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
21727	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21728	// Protocol - The protocol for the outbound rule in load balancer. Possible values include: 'LoadBalancerOutboundRuleProtocolTCP', 'LoadBalancerOutboundRuleProtocolUDP', 'LoadBalancerOutboundRuleProtocolAll'
21729	Protocol LoadBalancerOutboundRuleProtocol `json:"protocol,omitempty"`
21730	// 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.
21731	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
21732	// IdleTimeoutInMinutes - The timeout for the TCP idle connection.
21733	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
21734}
21735
21736// MarshalJSON is the custom marshaler for OutboundRulePropertiesFormat.
21737func (orpf OutboundRulePropertiesFormat) MarshalJSON() ([]byte, error) {
21738	objectMap := make(map[string]interface{})
21739	if orpf.AllocatedOutboundPorts != nil {
21740		objectMap["allocatedOutboundPorts"] = orpf.AllocatedOutboundPorts
21741	}
21742	if orpf.FrontendIPConfigurations != nil {
21743		objectMap["frontendIPConfigurations"] = orpf.FrontendIPConfigurations
21744	}
21745	if orpf.BackendAddressPool != nil {
21746		objectMap["backendAddressPool"] = orpf.BackendAddressPool
21747	}
21748	if orpf.Protocol != "" {
21749		objectMap["protocol"] = orpf.Protocol
21750	}
21751	if orpf.EnableTCPReset != nil {
21752		objectMap["enableTcpReset"] = orpf.EnableTCPReset
21753	}
21754	if orpf.IdleTimeoutInMinutes != nil {
21755		objectMap["idleTimeoutInMinutes"] = orpf.IdleTimeoutInMinutes
21756	}
21757	return json.Marshal(objectMap)
21758}
21759
21760// OwaspCrsExclusionEntry allow to exclude some variable satisfy the condition for the WAF check.
21761type OwaspCrsExclusionEntry struct {
21762	// MatchVariable - The variable to be excluded. Possible values include: 'RequestHeaderNames', 'RequestCookieNames', 'RequestArgNames'
21763	MatchVariable OwaspCrsExclusionEntryMatchVariable `json:"matchVariable,omitempty"`
21764	// 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'
21765	SelectorMatchOperator OwaspCrsExclusionEntrySelectorMatchOperator `json:"selectorMatchOperator,omitempty"`
21766	// Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
21767	Selector *string `json:"selector,omitempty"`
21768}
21769
21770// P2SConnectionConfiguration p2SConnectionConfiguration Resource.
21771type P2SConnectionConfiguration struct {
21772	// P2SConnectionConfigurationProperties - Properties of the P2S connection configuration.
21773	*P2SConnectionConfigurationProperties `json:"properties,omitempty"`
21774	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21775	Name *string `json:"name,omitempty"`
21776	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21777	Etag *string `json:"etag,omitempty"`
21778	// ID - Resource ID.
21779	ID *string `json:"id,omitempty"`
21780}
21781
21782// MarshalJSON is the custom marshaler for P2SConnectionConfiguration.
21783func (pcc P2SConnectionConfiguration) MarshalJSON() ([]byte, error) {
21784	objectMap := make(map[string]interface{})
21785	if pcc.P2SConnectionConfigurationProperties != nil {
21786		objectMap["properties"] = pcc.P2SConnectionConfigurationProperties
21787	}
21788	if pcc.Name != nil {
21789		objectMap["name"] = pcc.Name
21790	}
21791	if pcc.ID != nil {
21792		objectMap["id"] = pcc.ID
21793	}
21794	return json.Marshal(objectMap)
21795}
21796
21797// UnmarshalJSON is the custom unmarshaler for P2SConnectionConfiguration struct.
21798func (pcc *P2SConnectionConfiguration) UnmarshalJSON(body []byte) error {
21799	var m map[string]*json.RawMessage
21800	err := json.Unmarshal(body, &m)
21801	if err != nil {
21802		return err
21803	}
21804	for k, v := range m {
21805		switch k {
21806		case "properties":
21807			if v != nil {
21808				var p2SConnectionConfigurationProperties P2SConnectionConfigurationProperties
21809				err = json.Unmarshal(*v, &p2SConnectionConfigurationProperties)
21810				if err != nil {
21811					return err
21812				}
21813				pcc.P2SConnectionConfigurationProperties = &p2SConnectionConfigurationProperties
21814			}
21815		case "name":
21816			if v != nil {
21817				var name string
21818				err = json.Unmarshal(*v, &name)
21819				if err != nil {
21820					return err
21821				}
21822				pcc.Name = &name
21823			}
21824		case "etag":
21825			if v != nil {
21826				var etag string
21827				err = json.Unmarshal(*v, &etag)
21828				if err != nil {
21829					return err
21830				}
21831				pcc.Etag = &etag
21832			}
21833		case "id":
21834			if v != nil {
21835				var ID string
21836				err = json.Unmarshal(*v, &ID)
21837				if err != nil {
21838					return err
21839				}
21840				pcc.ID = &ID
21841			}
21842		}
21843	}
21844
21845	return nil
21846}
21847
21848// P2SConnectionConfigurationProperties parameters for P2SConnectionConfiguration.
21849type P2SConnectionConfigurationProperties struct {
21850	// VpnClientAddressPool - The reference to the address space resource which represents Address space for P2S VpnClient.
21851	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
21852	// ProvisioningState - READ-ONLY; The provisioning state of the P2SConnectionConfiguration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
21853	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21854}
21855
21856// MarshalJSON is the custom marshaler for P2SConnectionConfigurationProperties.
21857func (pccp P2SConnectionConfigurationProperties) MarshalJSON() ([]byte, error) {
21858	objectMap := make(map[string]interface{})
21859	if pccp.VpnClientAddressPool != nil {
21860		objectMap["vpnClientAddressPool"] = pccp.VpnClientAddressPool
21861	}
21862	return json.Marshal(objectMap)
21863}
21864
21865// P2SVpnConnectionHealth p2S Vpn connection detailed health written to sas url.
21866type P2SVpnConnectionHealth struct {
21867	autorest.Response `json:"-"`
21868	// SasURL - Returned sas url of the blob to which the p2s vpn connection detailed health will be written.
21869	SasURL *string `json:"sasUrl,omitempty"`
21870}
21871
21872// P2SVpnConnectionHealthRequest list of P2S Vpn connection health request.
21873type P2SVpnConnectionHealthRequest struct {
21874	// VpnUserNamesFilter - The list of p2s vpn user names whose p2s vpn connection detailed health to retrieve for.
21875	VpnUserNamesFilter *[]string `json:"vpnUserNamesFilter,omitempty"`
21876	// OutputBlobSasURL - The sas-url to download the P2S Vpn connection health detail.
21877	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
21878}
21879
21880// P2SVpnConnectionRequest list of p2s vpn connections to be disconnected.
21881type P2SVpnConnectionRequest struct {
21882	// VpnConnectionIds - List of p2s vpn connection Ids.
21883	VpnConnectionIds *[]string `json:"vpnConnectionIds,omitempty"`
21884}
21885
21886// P2SVpnGateway p2SVpnGateway Resource.
21887type P2SVpnGateway struct {
21888	autorest.Response `json:"-"`
21889	// P2SVpnGatewayProperties - Properties of the P2SVpnGateway.
21890	*P2SVpnGatewayProperties `json:"properties,omitempty"`
21891	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21892	Etag *string `json:"etag,omitempty"`
21893	// ID - Resource ID.
21894	ID *string `json:"id,omitempty"`
21895	// Name - READ-ONLY; Resource name.
21896	Name *string `json:"name,omitempty"`
21897	// Type - READ-ONLY; Resource type.
21898	Type *string `json:"type,omitempty"`
21899	// Location - Resource location.
21900	Location *string `json:"location,omitempty"`
21901	// Tags - Resource tags.
21902	Tags map[string]*string `json:"tags"`
21903}
21904
21905// MarshalJSON is the custom marshaler for P2SVpnGateway.
21906func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) {
21907	objectMap := make(map[string]interface{})
21908	if pvg.P2SVpnGatewayProperties != nil {
21909		objectMap["properties"] = pvg.P2SVpnGatewayProperties
21910	}
21911	if pvg.ID != nil {
21912		objectMap["id"] = pvg.ID
21913	}
21914	if pvg.Location != nil {
21915		objectMap["location"] = pvg.Location
21916	}
21917	if pvg.Tags != nil {
21918		objectMap["tags"] = pvg.Tags
21919	}
21920	return json.Marshal(objectMap)
21921}
21922
21923// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct.
21924func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error {
21925	var m map[string]*json.RawMessage
21926	err := json.Unmarshal(body, &m)
21927	if err != nil {
21928		return err
21929	}
21930	for k, v := range m {
21931		switch k {
21932		case "properties":
21933			if v != nil {
21934				var p2SVpnGatewayProperties P2SVpnGatewayProperties
21935				err = json.Unmarshal(*v, &p2SVpnGatewayProperties)
21936				if err != nil {
21937					return err
21938				}
21939				pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties
21940			}
21941		case "etag":
21942			if v != nil {
21943				var etag string
21944				err = json.Unmarshal(*v, &etag)
21945				if err != nil {
21946					return err
21947				}
21948				pvg.Etag = &etag
21949			}
21950		case "id":
21951			if v != nil {
21952				var ID string
21953				err = json.Unmarshal(*v, &ID)
21954				if err != nil {
21955					return err
21956				}
21957				pvg.ID = &ID
21958			}
21959		case "name":
21960			if v != nil {
21961				var name string
21962				err = json.Unmarshal(*v, &name)
21963				if err != nil {
21964					return err
21965				}
21966				pvg.Name = &name
21967			}
21968		case "type":
21969			if v != nil {
21970				var typeVar string
21971				err = json.Unmarshal(*v, &typeVar)
21972				if err != nil {
21973					return err
21974				}
21975				pvg.Type = &typeVar
21976			}
21977		case "location":
21978			if v != nil {
21979				var location string
21980				err = json.Unmarshal(*v, &location)
21981				if err != nil {
21982					return err
21983				}
21984				pvg.Location = &location
21985			}
21986		case "tags":
21987			if v != nil {
21988				var tags map[string]*string
21989				err = json.Unmarshal(*v, &tags)
21990				if err != nil {
21991					return err
21992				}
21993				pvg.Tags = tags
21994			}
21995		}
21996	}
21997
21998	return nil
21999}
22000
22001// P2SVpnGatewayProperties parameters for P2SVpnGateway.
22002type P2SVpnGatewayProperties struct {
22003	// VirtualHub - The VirtualHub to which the gateway belongs.
22004	VirtualHub *SubResource `json:"virtualHub,omitempty"`
22005	// P2SConnectionConfigurations - List of all p2s connection configurations of the gateway.
22006	P2SConnectionConfigurations *[]P2SConnectionConfiguration `json:"p2SConnectionConfigurations,omitempty"`
22007	// ProvisioningState - READ-ONLY; The provisioning state of the P2S VPN gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22008	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22009	// VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway.
22010	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
22011	// VpnServerConfiguration - The VpnServerConfiguration to which the p2sVpnGateway is attached to.
22012	VpnServerConfiguration *SubResource `json:"vpnServerConfiguration,omitempty"`
22013	// VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status.
22014	VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"`
22015}
22016
22017// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties.
22018func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) {
22019	objectMap := make(map[string]interface{})
22020	if pvgp.VirtualHub != nil {
22021		objectMap["virtualHub"] = pvgp.VirtualHub
22022	}
22023	if pvgp.P2SConnectionConfigurations != nil {
22024		objectMap["p2SConnectionConfigurations"] = pvgp.P2SConnectionConfigurations
22025	}
22026	if pvgp.VpnGatewayScaleUnit != nil {
22027		objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit
22028	}
22029	if pvgp.VpnServerConfiguration != nil {
22030		objectMap["vpnServerConfiguration"] = pvgp.VpnServerConfiguration
22031	}
22032	return json.Marshal(objectMap)
22033}
22034
22035// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22036// long-running operation.
22037type P2sVpnGatewaysCreateOrUpdateFuture struct {
22038	azure.FutureAPI
22039	// Result returns the result of the asynchronous operation.
22040	// If the operation has not completed it will return an error.
22041	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
22042}
22043
22044// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22045// operation.
22046type P2sVpnGatewaysDeleteFuture struct {
22047	azure.FutureAPI
22048	// Result returns the result of the asynchronous operation.
22049	// If the operation has not completed it will return an error.
22050	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
22051}
22052
22053// P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture an abstraction for monitoring and retrieving the results
22054// of a long-running operation.
22055type P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture struct {
22056	azure.FutureAPI
22057	// Result returns the result of the asynchronous operation.
22058	// If the operation has not completed it will return an error.
22059	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
22060}
22061
22062// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
22063// long-running operation.
22064type P2sVpnGatewaysGenerateVpnProfileFuture struct {
22065	azure.FutureAPI
22066	// Result returns the result of the asynchronous operation.
22067	// If the operation has not completed it will return an error.
22068	Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error)
22069}
22070
22071// P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture an abstraction for monitoring and retrieving the
22072// results of a long-running operation.
22073type P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture struct {
22074	azure.FutureAPI
22075	// Result returns the result of the asynchronous operation.
22076	// If the operation has not completed it will return an error.
22077	Result func(P2sVpnGatewaysClient) (P2SVpnConnectionHealth, error)
22078}
22079
22080// P2sVpnGatewaysGetP2sVpnConnectionHealthFuture an abstraction for monitoring and retrieving the results
22081// of a long-running operation.
22082type P2sVpnGatewaysGetP2sVpnConnectionHealthFuture struct {
22083	azure.FutureAPI
22084	// Result returns the result of the asynchronous operation.
22085	// If the operation has not completed it will return an error.
22086	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
22087}
22088
22089// P2SVpnProfileParameters vpn Client Parameters for package generation.
22090type P2SVpnProfileParameters struct {
22091	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
22092	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
22093}
22094
22095// PacketCapture parameters that define the create packet capture operation.
22096type PacketCapture struct {
22097	// PacketCaptureParameters - Properties of the packet capture.
22098	*PacketCaptureParameters `json:"properties,omitempty"`
22099}
22100
22101// MarshalJSON is the custom marshaler for PacketCapture.
22102func (pc PacketCapture) MarshalJSON() ([]byte, error) {
22103	objectMap := make(map[string]interface{})
22104	if pc.PacketCaptureParameters != nil {
22105		objectMap["properties"] = pc.PacketCaptureParameters
22106	}
22107	return json.Marshal(objectMap)
22108}
22109
22110// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
22111func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
22112	var m map[string]*json.RawMessage
22113	err := json.Unmarshal(body, &m)
22114	if err != nil {
22115		return err
22116	}
22117	for k, v := range m {
22118		switch k {
22119		case "properties":
22120			if v != nil {
22121				var packetCaptureParameters PacketCaptureParameters
22122				err = json.Unmarshal(*v, &packetCaptureParameters)
22123				if err != nil {
22124					return err
22125				}
22126				pc.PacketCaptureParameters = &packetCaptureParameters
22127			}
22128		}
22129	}
22130
22131	return nil
22132}
22133
22134// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
22135type PacketCaptureFilter struct {
22136	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
22137	Protocol PcProtocol `json:"protocol,omitempty"`
22138	// 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.
22139	LocalIPAddress *string `json:"localIPAddress,omitempty"`
22140	// 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.
22141	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
22142	// 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.
22143	LocalPort *string `json:"localPort,omitempty"`
22144	// 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.
22145	RemotePort *string `json:"remotePort,omitempty"`
22146}
22147
22148// PacketCaptureListResult list of packet capture sessions.
22149type PacketCaptureListResult struct {
22150	autorest.Response `json:"-"`
22151	// Value - Information about packet capture sessions.
22152	Value *[]PacketCaptureResult `json:"value,omitempty"`
22153}
22154
22155// PacketCaptureParameters parameters that define the create packet capture operation.
22156type PacketCaptureParameters struct {
22157	// Target - The ID of the targeted resource, only VM is currently supported.
22158	Target *string `json:"target,omitempty"`
22159	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
22160	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
22161	// TotalBytesPerSession - Maximum size of the capture output.
22162	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
22163	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
22164	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
22165	// StorageLocation - The storage location for a packet capture session.
22166	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
22167	// Filters - A list of packet capture filters.
22168	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
22169}
22170
22171// PacketCaptureQueryStatusResult status of packet capture session.
22172type PacketCaptureQueryStatusResult struct {
22173	autorest.Response `json:"-"`
22174	// Name - The name of the packet capture resource.
22175	Name *string `json:"name,omitempty"`
22176	// ID - The ID of the packet capture resource.
22177	ID *string `json:"id,omitempty"`
22178	// CaptureStartTime - The start time of the packet capture session.
22179	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
22180	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
22181	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
22182	// StopReason - The reason the current packet capture session was stopped.
22183	StopReason *string `json:"stopReason,omitempty"`
22184	// PacketCaptureError - List of errors of packet capture session.
22185	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
22186}
22187
22188// PacketCaptureResult information about packet capture session.
22189type PacketCaptureResult struct {
22190	autorest.Response `json:"-"`
22191	// Name - READ-ONLY; Name of the packet capture session.
22192	Name *string `json:"name,omitempty"`
22193	// ID - READ-ONLY; ID of the packet capture operation.
22194	ID *string `json:"id,omitempty"`
22195	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22196	Etag *string `json:"etag,omitempty"`
22197	// PacketCaptureResultProperties - Properties of the packet capture result.
22198	*PacketCaptureResultProperties `json:"properties,omitempty"`
22199}
22200
22201// MarshalJSON is the custom marshaler for PacketCaptureResult.
22202func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
22203	objectMap := make(map[string]interface{})
22204	if pcr.PacketCaptureResultProperties != nil {
22205		objectMap["properties"] = pcr.PacketCaptureResultProperties
22206	}
22207	return json.Marshal(objectMap)
22208}
22209
22210// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
22211func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
22212	var m map[string]*json.RawMessage
22213	err := json.Unmarshal(body, &m)
22214	if err != nil {
22215		return err
22216	}
22217	for k, v := range m {
22218		switch k {
22219		case "name":
22220			if v != nil {
22221				var name string
22222				err = json.Unmarshal(*v, &name)
22223				if err != nil {
22224					return err
22225				}
22226				pcr.Name = &name
22227			}
22228		case "id":
22229			if v != nil {
22230				var ID string
22231				err = json.Unmarshal(*v, &ID)
22232				if err != nil {
22233					return err
22234				}
22235				pcr.ID = &ID
22236			}
22237		case "etag":
22238			if v != nil {
22239				var etag string
22240				err = json.Unmarshal(*v, &etag)
22241				if err != nil {
22242					return err
22243				}
22244				pcr.Etag = &etag
22245			}
22246		case "properties":
22247			if v != nil {
22248				var packetCaptureResultProperties PacketCaptureResultProperties
22249				err = json.Unmarshal(*v, &packetCaptureResultProperties)
22250				if err != nil {
22251					return err
22252				}
22253				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
22254			}
22255		}
22256	}
22257
22258	return nil
22259}
22260
22261// PacketCaptureResultProperties the properties of a packet capture session.
22262type PacketCaptureResultProperties struct {
22263	// ProvisioningState - READ-ONLY; The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22264	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22265	// Target - The ID of the targeted resource, only VM is currently supported.
22266	Target *string `json:"target,omitempty"`
22267	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
22268	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
22269	// TotalBytesPerSession - Maximum size of the capture output.
22270	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
22271	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
22272	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
22273	// StorageLocation - The storage location for a packet capture session.
22274	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
22275	// Filters - A list of packet capture filters.
22276	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
22277}
22278
22279// MarshalJSON is the custom marshaler for PacketCaptureResultProperties.
22280func (pcrp PacketCaptureResultProperties) MarshalJSON() ([]byte, error) {
22281	objectMap := make(map[string]interface{})
22282	if pcrp.Target != nil {
22283		objectMap["target"] = pcrp.Target
22284	}
22285	if pcrp.BytesToCapturePerPacket != nil {
22286		objectMap["bytesToCapturePerPacket"] = pcrp.BytesToCapturePerPacket
22287	}
22288	if pcrp.TotalBytesPerSession != nil {
22289		objectMap["totalBytesPerSession"] = pcrp.TotalBytesPerSession
22290	}
22291	if pcrp.TimeLimitInSeconds != nil {
22292		objectMap["timeLimitInSeconds"] = pcrp.TimeLimitInSeconds
22293	}
22294	if pcrp.StorageLocation != nil {
22295		objectMap["storageLocation"] = pcrp.StorageLocation
22296	}
22297	if pcrp.Filters != nil {
22298		objectMap["filters"] = pcrp.Filters
22299	}
22300	return json.Marshal(objectMap)
22301}
22302
22303// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
22304// operation.
22305type PacketCapturesCreateFuture struct {
22306	azure.FutureAPI
22307	// Result returns the result of the asynchronous operation.
22308	// If the operation has not completed it will return an error.
22309	Result func(PacketCapturesClient) (PacketCaptureResult, error)
22310}
22311
22312// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22313// operation.
22314type PacketCapturesDeleteFuture struct {
22315	azure.FutureAPI
22316	// Result returns the result of the asynchronous operation.
22317	// If the operation has not completed it will return an error.
22318	Result func(PacketCapturesClient) (autorest.Response, error)
22319}
22320
22321// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
22322// operation.
22323type PacketCapturesGetStatusFuture struct {
22324	azure.FutureAPI
22325	// Result returns the result of the asynchronous operation.
22326	// If the operation has not completed it will return an error.
22327	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
22328}
22329
22330// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
22331// operation.
22332type PacketCapturesStopFuture struct {
22333	azure.FutureAPI
22334	// Result returns the result of the asynchronous operation.
22335	// If the operation has not completed it will return an error.
22336	Result func(PacketCapturesClient) (autorest.Response, error)
22337}
22338
22339// PacketCaptureStorageLocation the storage location for a packet capture session.
22340type PacketCaptureStorageLocation struct {
22341	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
22342	StorageID *string `json:"storageId,omitempty"`
22343	// 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.
22344	StoragePath *string `json:"storagePath,omitempty"`
22345	// 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.
22346	FilePath *string `json:"filePath,omitempty"`
22347}
22348
22349// PatchRouteFilter route Filter Resource.
22350type PatchRouteFilter struct {
22351	// RouteFilterPropertiesFormat - Properties of the route filter.
22352	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
22353	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
22354	Name *string `json:"name,omitempty"`
22355	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22356	Etag *string `json:"etag,omitempty"`
22357	// Type - READ-ONLY; Resource type.
22358	Type *string `json:"type,omitempty"`
22359	// Tags - Resource tags.
22360	Tags map[string]*string `json:"tags"`
22361	// ID - Resource ID.
22362	ID *string `json:"id,omitempty"`
22363}
22364
22365// MarshalJSON is the custom marshaler for PatchRouteFilter.
22366func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
22367	objectMap := make(map[string]interface{})
22368	if prf.RouteFilterPropertiesFormat != nil {
22369		objectMap["properties"] = prf.RouteFilterPropertiesFormat
22370	}
22371	if prf.Tags != nil {
22372		objectMap["tags"] = prf.Tags
22373	}
22374	if prf.ID != nil {
22375		objectMap["id"] = prf.ID
22376	}
22377	return json.Marshal(objectMap)
22378}
22379
22380// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
22381func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
22382	var m map[string]*json.RawMessage
22383	err := json.Unmarshal(body, &m)
22384	if err != nil {
22385		return err
22386	}
22387	for k, v := range m {
22388		switch k {
22389		case "properties":
22390			if v != nil {
22391				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
22392				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
22393				if err != nil {
22394					return err
22395				}
22396				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
22397			}
22398		case "name":
22399			if v != nil {
22400				var name string
22401				err = json.Unmarshal(*v, &name)
22402				if err != nil {
22403					return err
22404				}
22405				prf.Name = &name
22406			}
22407		case "etag":
22408			if v != nil {
22409				var etag string
22410				err = json.Unmarshal(*v, &etag)
22411				if err != nil {
22412					return err
22413				}
22414				prf.Etag = &etag
22415			}
22416		case "type":
22417			if v != nil {
22418				var typeVar string
22419				err = json.Unmarshal(*v, &typeVar)
22420				if err != nil {
22421					return err
22422				}
22423				prf.Type = &typeVar
22424			}
22425		case "tags":
22426			if v != nil {
22427				var tags map[string]*string
22428				err = json.Unmarshal(*v, &tags)
22429				if err != nil {
22430					return err
22431				}
22432				prf.Tags = tags
22433			}
22434		case "id":
22435			if v != nil {
22436				var ID string
22437				err = json.Unmarshal(*v, &ID)
22438				if err != nil {
22439					return err
22440				}
22441				prf.ID = &ID
22442			}
22443		}
22444	}
22445
22446	return nil
22447}
22448
22449// PatchRouteFilterRule route Filter Rule Resource.
22450type PatchRouteFilterRule struct {
22451	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
22452	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
22453	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
22454	Name *string `json:"name,omitempty"`
22455	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22456	Etag *string `json:"etag,omitempty"`
22457	// ID - Resource ID.
22458	ID *string `json:"id,omitempty"`
22459}
22460
22461// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
22462func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
22463	objectMap := make(map[string]interface{})
22464	if prfr.RouteFilterRulePropertiesFormat != nil {
22465		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
22466	}
22467	if prfr.ID != nil {
22468		objectMap["id"] = prfr.ID
22469	}
22470	return json.Marshal(objectMap)
22471}
22472
22473// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
22474func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
22475	var m map[string]*json.RawMessage
22476	err := json.Unmarshal(body, &m)
22477	if err != nil {
22478		return err
22479	}
22480	for k, v := range m {
22481		switch k {
22482		case "properties":
22483			if v != nil {
22484				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
22485				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
22486				if err != nil {
22487					return err
22488				}
22489				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
22490			}
22491		case "name":
22492			if v != nil {
22493				var name string
22494				err = json.Unmarshal(*v, &name)
22495				if err != nil {
22496					return err
22497				}
22498				prfr.Name = &name
22499			}
22500		case "etag":
22501			if v != nil {
22502				var etag string
22503				err = json.Unmarshal(*v, &etag)
22504				if err != nil {
22505					return err
22506				}
22507				prfr.Etag = &etag
22508			}
22509		case "id":
22510			if v != nil {
22511				var ID string
22512				err = json.Unmarshal(*v, &ID)
22513				if err != nil {
22514					return err
22515				}
22516				prfr.ID = &ID
22517			}
22518		}
22519	}
22520
22521	return nil
22522}
22523
22524// PeerExpressRouteCircuitConnection peer Express Route Circuit Connection in an ExpressRouteCircuitPeering
22525// resource.
22526type PeerExpressRouteCircuitConnection struct {
22527	autorest.Response `json:"-"`
22528	// PeerExpressRouteCircuitConnectionPropertiesFormat - Properties of the peer express route circuit connection.
22529	*PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
22530	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
22531	Name *string `json:"name,omitempty"`
22532	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22533	Etag *string `json:"etag,omitempty"`
22534	// Type - READ-ONLY; Type of the resource.
22535	Type *string `json:"type,omitempty"`
22536	// ID - Resource ID.
22537	ID *string `json:"id,omitempty"`
22538}
22539
22540// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnection.
22541func (percc PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
22542	objectMap := make(map[string]interface{})
22543	if percc.PeerExpressRouteCircuitConnectionPropertiesFormat != nil {
22544		objectMap["properties"] = percc.PeerExpressRouteCircuitConnectionPropertiesFormat
22545	}
22546	if percc.Name != nil {
22547		objectMap["name"] = percc.Name
22548	}
22549	if percc.ID != nil {
22550		objectMap["id"] = percc.ID
22551	}
22552	return json.Marshal(objectMap)
22553}
22554
22555// UnmarshalJSON is the custom unmarshaler for PeerExpressRouteCircuitConnection struct.
22556func (percc *PeerExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
22557	var m map[string]*json.RawMessage
22558	err := json.Unmarshal(body, &m)
22559	if err != nil {
22560		return err
22561	}
22562	for k, v := range m {
22563		switch k {
22564		case "properties":
22565			if v != nil {
22566				var peerExpressRouteCircuitConnectionPropertiesFormat PeerExpressRouteCircuitConnectionPropertiesFormat
22567				err = json.Unmarshal(*v, &peerExpressRouteCircuitConnectionPropertiesFormat)
22568				if err != nil {
22569					return err
22570				}
22571				percc.PeerExpressRouteCircuitConnectionPropertiesFormat = &peerExpressRouteCircuitConnectionPropertiesFormat
22572			}
22573		case "name":
22574			if v != nil {
22575				var name string
22576				err = json.Unmarshal(*v, &name)
22577				if err != nil {
22578					return err
22579				}
22580				percc.Name = &name
22581			}
22582		case "etag":
22583			if v != nil {
22584				var etag string
22585				err = json.Unmarshal(*v, &etag)
22586				if err != nil {
22587					return err
22588				}
22589				percc.Etag = &etag
22590			}
22591		case "type":
22592			if v != nil {
22593				var typeVar string
22594				err = json.Unmarshal(*v, &typeVar)
22595				if err != nil {
22596					return err
22597				}
22598				percc.Type = &typeVar
22599			}
22600		case "id":
22601			if v != nil {
22602				var ID string
22603				err = json.Unmarshal(*v, &ID)
22604				if err != nil {
22605					return err
22606				}
22607				percc.ID = &ID
22608			}
22609		}
22610	}
22611
22612	return nil
22613}
22614
22615// PeerExpressRouteCircuitConnectionListResult response for ListPeeredConnections API service call
22616// retrieves all global reach peer circuit connections that belongs to a Private Peering for an
22617// ExpressRouteCircuit.
22618type PeerExpressRouteCircuitConnectionListResult struct {
22619	autorest.Response `json:"-"`
22620	// Value - The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit.
22621	Value *[]PeerExpressRouteCircuitConnection `json:"value,omitempty"`
22622	// NextLink - The URL to get the next set of results.
22623	NextLink *string `json:"nextLink,omitempty"`
22624}
22625
22626// PeerExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
22627// PeerExpressRouteCircuitConnection values.
22628type PeerExpressRouteCircuitConnectionListResultIterator struct {
22629	i    int
22630	page PeerExpressRouteCircuitConnectionListResultPage
22631}
22632
22633// NextWithContext advances to the next value.  If there was an error making
22634// the request the iterator does not advance and the error is returned.
22635func (iter *PeerExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
22636	if tracing.IsEnabled() {
22637		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultIterator.NextWithContext")
22638		defer func() {
22639			sc := -1
22640			if iter.Response().Response.Response != nil {
22641				sc = iter.Response().Response.Response.StatusCode
22642			}
22643			tracing.EndSpan(ctx, sc, err)
22644		}()
22645	}
22646	iter.i++
22647	if iter.i < len(iter.page.Values()) {
22648		return nil
22649	}
22650	err = iter.page.NextWithContext(ctx)
22651	if err != nil {
22652		iter.i--
22653		return err
22654	}
22655	iter.i = 0
22656	return nil
22657}
22658
22659// Next advances to the next value.  If there was an error making
22660// the request the iterator does not advance and the error is returned.
22661// Deprecated: Use NextWithContext() instead.
22662func (iter *PeerExpressRouteCircuitConnectionListResultIterator) Next() error {
22663	return iter.NextWithContext(context.Background())
22664}
22665
22666// NotDone returns true if the enumeration should be started or is not yet complete.
22667func (iter PeerExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
22668	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22669}
22670
22671// Response returns the raw server response from the last page request.
22672func (iter PeerExpressRouteCircuitConnectionListResultIterator) Response() PeerExpressRouteCircuitConnectionListResult {
22673	return iter.page.Response()
22674}
22675
22676// Value returns the current value or a zero-initialized value if the
22677// iterator has advanced beyond the end of the collection.
22678func (iter PeerExpressRouteCircuitConnectionListResultIterator) Value() PeerExpressRouteCircuitConnection {
22679	if !iter.page.NotDone() {
22680		return PeerExpressRouteCircuitConnection{}
22681	}
22682	return iter.page.Values()[iter.i]
22683}
22684
22685// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultIterator type.
22686func NewPeerExpressRouteCircuitConnectionListResultIterator(page PeerExpressRouteCircuitConnectionListResultPage) PeerExpressRouteCircuitConnectionListResultIterator {
22687	return PeerExpressRouteCircuitConnectionListResultIterator{page: page}
22688}
22689
22690// IsEmpty returns true if the ListResult contains no values.
22691func (percclr PeerExpressRouteCircuitConnectionListResult) IsEmpty() bool {
22692	return percclr.Value == nil || len(*percclr.Value) == 0
22693}
22694
22695// hasNextLink returns true if the NextLink is not empty.
22696func (percclr PeerExpressRouteCircuitConnectionListResult) hasNextLink() bool {
22697	return percclr.NextLink != nil && len(*percclr.NextLink) != 0
22698}
22699
22700// peerExpressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
22701// It returns nil if no more results exist.
22702func (percclr PeerExpressRouteCircuitConnectionListResult) peerExpressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
22703	if !percclr.hasNextLink() {
22704		return nil, nil
22705	}
22706	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22707		autorest.AsJSON(),
22708		autorest.AsGet(),
22709		autorest.WithBaseURL(to.String(percclr.NextLink)))
22710}
22711
22712// PeerExpressRouteCircuitConnectionListResultPage contains a page of PeerExpressRouteCircuitConnection
22713// values.
22714type PeerExpressRouteCircuitConnectionListResultPage struct {
22715	fn      func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)
22716	percclr PeerExpressRouteCircuitConnectionListResult
22717}
22718
22719// NextWithContext advances to the next page of values.  If there was an error making
22720// the request the page does not advance and the error is returned.
22721func (page *PeerExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
22722	if tracing.IsEnabled() {
22723		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultPage.NextWithContext")
22724		defer func() {
22725			sc := -1
22726			if page.Response().Response.Response != nil {
22727				sc = page.Response().Response.Response.StatusCode
22728			}
22729			tracing.EndSpan(ctx, sc, err)
22730		}()
22731	}
22732	for {
22733		next, err := page.fn(ctx, page.percclr)
22734		if err != nil {
22735			return err
22736		}
22737		page.percclr = next
22738		if !next.hasNextLink() || !next.IsEmpty() {
22739			break
22740		}
22741	}
22742	return nil
22743}
22744
22745// Next advances to the next page of values.  If there was an error making
22746// the request the page does not advance and the error is returned.
22747// Deprecated: Use NextWithContext() instead.
22748func (page *PeerExpressRouteCircuitConnectionListResultPage) Next() error {
22749	return page.NextWithContext(context.Background())
22750}
22751
22752// NotDone returns true if the page enumeration should be started or is not yet complete.
22753func (page PeerExpressRouteCircuitConnectionListResultPage) NotDone() bool {
22754	return !page.percclr.IsEmpty()
22755}
22756
22757// Response returns the raw server response from the last page request.
22758func (page PeerExpressRouteCircuitConnectionListResultPage) Response() PeerExpressRouteCircuitConnectionListResult {
22759	return page.percclr
22760}
22761
22762// Values returns the slice of values for the current page or nil if there are no values.
22763func (page PeerExpressRouteCircuitConnectionListResultPage) Values() []PeerExpressRouteCircuitConnection {
22764	if page.percclr.IsEmpty() {
22765		return nil
22766	}
22767	return *page.percclr.Value
22768}
22769
22770// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultPage type.
22771func NewPeerExpressRouteCircuitConnectionListResultPage(cur PeerExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)) PeerExpressRouteCircuitConnectionListResultPage {
22772	return PeerExpressRouteCircuitConnectionListResultPage{
22773		fn:      getNextPage,
22774		percclr: cur,
22775	}
22776}
22777
22778// PeerExpressRouteCircuitConnectionPropertiesFormat properties of the peer express route circuit
22779// connection.
22780type PeerExpressRouteCircuitConnectionPropertiesFormat struct {
22781	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit.
22782	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
22783	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
22784	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
22785	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
22786	AddressPrefix *string `json:"addressPrefix,omitempty"`
22787	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
22788	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
22789	// ConnectionName - The name of the express route circuit connection resource.
22790	ConnectionName *string `json:"connectionName,omitempty"`
22791	// AuthResourceGUID - The resource guid of the authorization used for the express route circuit connection.
22792	AuthResourceGUID *string `json:"authResourceGuid,omitempty"`
22793	// ProvisioningState - READ-ONLY; The provisioning state of the peer express route circuit connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22794	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22795}
22796
22797// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnectionPropertiesFormat.
22798func (perccpf PeerExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
22799	objectMap := make(map[string]interface{})
22800	if perccpf.ExpressRouteCircuitPeering != nil {
22801		objectMap["expressRouteCircuitPeering"] = perccpf.ExpressRouteCircuitPeering
22802	}
22803	if perccpf.PeerExpressRouteCircuitPeering != nil {
22804		objectMap["peerExpressRouteCircuitPeering"] = perccpf.PeerExpressRouteCircuitPeering
22805	}
22806	if perccpf.AddressPrefix != nil {
22807		objectMap["addressPrefix"] = perccpf.AddressPrefix
22808	}
22809	if perccpf.CircuitConnectionStatus != "" {
22810		objectMap["circuitConnectionStatus"] = perccpf.CircuitConnectionStatus
22811	}
22812	if perccpf.ConnectionName != nil {
22813		objectMap["connectionName"] = perccpf.ConnectionName
22814	}
22815	if perccpf.AuthResourceGUID != nil {
22816		objectMap["authResourceGuid"] = perccpf.AuthResourceGUID
22817	}
22818	return json.Marshal(objectMap)
22819}
22820
22821// PolicySettings defines contents of a web application firewall global configuration.
22822type PolicySettings struct {
22823	// State - The state of the policy. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled'
22824	State WebApplicationFirewallEnabledState `json:"state,omitempty"`
22825	// Mode - The mode of the policy. Possible values include: 'WebApplicationFirewallModePrevention', 'WebApplicationFirewallModeDetection'
22826	Mode WebApplicationFirewallMode `json:"mode,omitempty"`
22827	// RequestBodyCheck - Whether to allow WAF to check request Body.
22828	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
22829	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
22830	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
22831	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
22832	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
22833}
22834
22835// PrepareNetworkPoliciesRequest details of PrepareNetworkPolicies for Subnet.
22836type PrepareNetworkPoliciesRequest struct {
22837	// ServiceName - The name of the service for which subnet is being prepared for.
22838	ServiceName *string `json:"serviceName,omitempty"`
22839	// NetworkIntentPolicyConfigurations - A list of NetworkIntentPolicyConfiguration.
22840	NetworkIntentPolicyConfigurations *[]IntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"`
22841}
22842
22843// PrivateDNSZoneConfig privateDnsZoneConfig resource.
22844type PrivateDNSZoneConfig struct {
22845	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
22846	Name *string `json:"name,omitempty"`
22847	// PrivateDNSZonePropertiesFormat - Properties of the private dns zone configuration.
22848	*PrivateDNSZonePropertiesFormat `json:"properties,omitempty"`
22849}
22850
22851// MarshalJSON is the custom marshaler for PrivateDNSZoneConfig.
22852func (pdzc PrivateDNSZoneConfig) MarshalJSON() ([]byte, error) {
22853	objectMap := make(map[string]interface{})
22854	if pdzc.Name != nil {
22855		objectMap["name"] = pdzc.Name
22856	}
22857	if pdzc.PrivateDNSZonePropertiesFormat != nil {
22858		objectMap["properties"] = pdzc.PrivateDNSZonePropertiesFormat
22859	}
22860	return json.Marshal(objectMap)
22861}
22862
22863// UnmarshalJSON is the custom unmarshaler for PrivateDNSZoneConfig struct.
22864func (pdzc *PrivateDNSZoneConfig) UnmarshalJSON(body []byte) error {
22865	var m map[string]*json.RawMessage
22866	err := json.Unmarshal(body, &m)
22867	if err != nil {
22868		return err
22869	}
22870	for k, v := range m {
22871		switch k {
22872		case "name":
22873			if v != nil {
22874				var name string
22875				err = json.Unmarshal(*v, &name)
22876				if err != nil {
22877					return err
22878				}
22879				pdzc.Name = &name
22880			}
22881		case "properties":
22882			if v != nil {
22883				var privateDNSZonePropertiesFormat PrivateDNSZonePropertiesFormat
22884				err = json.Unmarshal(*v, &privateDNSZonePropertiesFormat)
22885				if err != nil {
22886					return err
22887				}
22888				pdzc.PrivateDNSZonePropertiesFormat = &privateDNSZonePropertiesFormat
22889			}
22890		}
22891	}
22892
22893	return nil
22894}
22895
22896// PrivateDNSZoneGroup private dns zone group resource.
22897type PrivateDNSZoneGroup struct {
22898	autorest.Response `json:"-"`
22899	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
22900	Name *string `json:"name,omitempty"`
22901	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22902	Etag *string `json:"etag,omitempty"`
22903	// PrivateDNSZoneGroupPropertiesFormat - Properties of the private dns zone group.
22904	*PrivateDNSZoneGroupPropertiesFormat `json:"properties,omitempty"`
22905	// ID - Resource ID.
22906	ID *string `json:"id,omitempty"`
22907}
22908
22909// MarshalJSON is the custom marshaler for PrivateDNSZoneGroup.
22910func (pdzg PrivateDNSZoneGroup) MarshalJSON() ([]byte, error) {
22911	objectMap := make(map[string]interface{})
22912	if pdzg.Name != nil {
22913		objectMap["name"] = pdzg.Name
22914	}
22915	if pdzg.PrivateDNSZoneGroupPropertiesFormat != nil {
22916		objectMap["properties"] = pdzg.PrivateDNSZoneGroupPropertiesFormat
22917	}
22918	if pdzg.ID != nil {
22919		objectMap["id"] = pdzg.ID
22920	}
22921	return json.Marshal(objectMap)
22922}
22923
22924// UnmarshalJSON is the custom unmarshaler for PrivateDNSZoneGroup struct.
22925func (pdzg *PrivateDNSZoneGroup) UnmarshalJSON(body []byte) error {
22926	var m map[string]*json.RawMessage
22927	err := json.Unmarshal(body, &m)
22928	if err != nil {
22929		return err
22930	}
22931	for k, v := range m {
22932		switch k {
22933		case "name":
22934			if v != nil {
22935				var name string
22936				err = json.Unmarshal(*v, &name)
22937				if err != nil {
22938					return err
22939				}
22940				pdzg.Name = &name
22941			}
22942		case "etag":
22943			if v != nil {
22944				var etag string
22945				err = json.Unmarshal(*v, &etag)
22946				if err != nil {
22947					return err
22948				}
22949				pdzg.Etag = &etag
22950			}
22951		case "properties":
22952			if v != nil {
22953				var privateDNSZoneGroupPropertiesFormat PrivateDNSZoneGroupPropertiesFormat
22954				err = json.Unmarshal(*v, &privateDNSZoneGroupPropertiesFormat)
22955				if err != nil {
22956					return err
22957				}
22958				pdzg.PrivateDNSZoneGroupPropertiesFormat = &privateDNSZoneGroupPropertiesFormat
22959			}
22960		case "id":
22961			if v != nil {
22962				var ID string
22963				err = json.Unmarshal(*v, &ID)
22964				if err != nil {
22965					return err
22966				}
22967				pdzg.ID = &ID
22968			}
22969		}
22970	}
22971
22972	return nil
22973}
22974
22975// PrivateDNSZoneGroupListResult response for the ListPrivateDnsZoneGroups API service call.
22976type PrivateDNSZoneGroupListResult struct {
22977	autorest.Response `json:"-"`
22978	// Value - A list of private dns zone group resources in a private endpoint.
22979	Value *[]PrivateDNSZoneGroup `json:"value,omitempty"`
22980	// NextLink - READ-ONLY; The URL to get the next set of results.
22981	NextLink *string `json:"nextLink,omitempty"`
22982}
22983
22984// MarshalJSON is the custom marshaler for PrivateDNSZoneGroupListResult.
22985func (pdzglr PrivateDNSZoneGroupListResult) MarshalJSON() ([]byte, error) {
22986	objectMap := make(map[string]interface{})
22987	if pdzglr.Value != nil {
22988		objectMap["value"] = pdzglr.Value
22989	}
22990	return json.Marshal(objectMap)
22991}
22992
22993// PrivateDNSZoneGroupListResultIterator provides access to a complete listing of PrivateDNSZoneGroup
22994// values.
22995type PrivateDNSZoneGroupListResultIterator struct {
22996	i    int
22997	page PrivateDNSZoneGroupListResultPage
22998}
22999
23000// NextWithContext advances to the next value.  If there was an error making
23001// the request the iterator does not advance and the error is returned.
23002func (iter *PrivateDNSZoneGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
23003	if tracing.IsEnabled() {
23004		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateDNSZoneGroupListResultIterator.NextWithContext")
23005		defer func() {
23006			sc := -1
23007			if iter.Response().Response.Response != nil {
23008				sc = iter.Response().Response.Response.StatusCode
23009			}
23010			tracing.EndSpan(ctx, sc, err)
23011		}()
23012	}
23013	iter.i++
23014	if iter.i < len(iter.page.Values()) {
23015		return nil
23016	}
23017	err = iter.page.NextWithContext(ctx)
23018	if err != nil {
23019		iter.i--
23020		return err
23021	}
23022	iter.i = 0
23023	return nil
23024}
23025
23026// Next advances to the next value.  If there was an error making
23027// the request the iterator does not advance and the error is returned.
23028// Deprecated: Use NextWithContext() instead.
23029func (iter *PrivateDNSZoneGroupListResultIterator) Next() error {
23030	return iter.NextWithContext(context.Background())
23031}
23032
23033// NotDone returns true if the enumeration should be started or is not yet complete.
23034func (iter PrivateDNSZoneGroupListResultIterator) NotDone() bool {
23035	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23036}
23037
23038// Response returns the raw server response from the last page request.
23039func (iter PrivateDNSZoneGroupListResultIterator) Response() PrivateDNSZoneGroupListResult {
23040	return iter.page.Response()
23041}
23042
23043// Value returns the current value or a zero-initialized value if the
23044// iterator has advanced beyond the end of the collection.
23045func (iter PrivateDNSZoneGroupListResultIterator) Value() PrivateDNSZoneGroup {
23046	if !iter.page.NotDone() {
23047		return PrivateDNSZoneGroup{}
23048	}
23049	return iter.page.Values()[iter.i]
23050}
23051
23052// Creates a new instance of the PrivateDNSZoneGroupListResultIterator type.
23053func NewPrivateDNSZoneGroupListResultIterator(page PrivateDNSZoneGroupListResultPage) PrivateDNSZoneGroupListResultIterator {
23054	return PrivateDNSZoneGroupListResultIterator{page: page}
23055}
23056
23057// IsEmpty returns true if the ListResult contains no values.
23058func (pdzglr PrivateDNSZoneGroupListResult) IsEmpty() bool {
23059	return pdzglr.Value == nil || len(*pdzglr.Value) == 0
23060}
23061
23062// hasNextLink returns true if the NextLink is not empty.
23063func (pdzglr PrivateDNSZoneGroupListResult) hasNextLink() bool {
23064	return pdzglr.NextLink != nil && len(*pdzglr.NextLink) != 0
23065}
23066
23067// privateDNSZoneGroupListResultPreparer prepares a request to retrieve the next set of results.
23068// It returns nil if no more results exist.
23069func (pdzglr PrivateDNSZoneGroupListResult) privateDNSZoneGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
23070	if !pdzglr.hasNextLink() {
23071		return nil, nil
23072	}
23073	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23074		autorest.AsJSON(),
23075		autorest.AsGet(),
23076		autorest.WithBaseURL(to.String(pdzglr.NextLink)))
23077}
23078
23079// PrivateDNSZoneGroupListResultPage contains a page of PrivateDNSZoneGroup values.
23080type PrivateDNSZoneGroupListResultPage struct {
23081	fn     func(context.Context, PrivateDNSZoneGroupListResult) (PrivateDNSZoneGroupListResult, error)
23082	pdzglr PrivateDNSZoneGroupListResult
23083}
23084
23085// NextWithContext advances to the next page of values.  If there was an error making
23086// the request the page does not advance and the error is returned.
23087func (page *PrivateDNSZoneGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
23088	if tracing.IsEnabled() {
23089		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateDNSZoneGroupListResultPage.NextWithContext")
23090		defer func() {
23091			sc := -1
23092			if page.Response().Response.Response != nil {
23093				sc = page.Response().Response.Response.StatusCode
23094			}
23095			tracing.EndSpan(ctx, sc, err)
23096		}()
23097	}
23098	for {
23099		next, err := page.fn(ctx, page.pdzglr)
23100		if err != nil {
23101			return err
23102		}
23103		page.pdzglr = next
23104		if !next.hasNextLink() || !next.IsEmpty() {
23105			break
23106		}
23107	}
23108	return nil
23109}
23110
23111// Next advances to the next page of values.  If there was an error making
23112// the request the page does not advance and the error is returned.
23113// Deprecated: Use NextWithContext() instead.
23114func (page *PrivateDNSZoneGroupListResultPage) Next() error {
23115	return page.NextWithContext(context.Background())
23116}
23117
23118// NotDone returns true if the page enumeration should be started or is not yet complete.
23119func (page PrivateDNSZoneGroupListResultPage) NotDone() bool {
23120	return !page.pdzglr.IsEmpty()
23121}
23122
23123// Response returns the raw server response from the last page request.
23124func (page PrivateDNSZoneGroupListResultPage) Response() PrivateDNSZoneGroupListResult {
23125	return page.pdzglr
23126}
23127
23128// Values returns the slice of values for the current page or nil if there are no values.
23129func (page PrivateDNSZoneGroupListResultPage) Values() []PrivateDNSZoneGroup {
23130	if page.pdzglr.IsEmpty() {
23131		return nil
23132	}
23133	return *page.pdzglr.Value
23134}
23135
23136// Creates a new instance of the PrivateDNSZoneGroupListResultPage type.
23137func NewPrivateDNSZoneGroupListResultPage(cur PrivateDNSZoneGroupListResult, getNextPage func(context.Context, PrivateDNSZoneGroupListResult) (PrivateDNSZoneGroupListResult, error)) PrivateDNSZoneGroupListResultPage {
23138	return PrivateDNSZoneGroupListResultPage{
23139		fn:     getNextPage,
23140		pdzglr: cur,
23141	}
23142}
23143
23144// PrivateDNSZoneGroupPropertiesFormat properties of the private dns zone group.
23145type PrivateDNSZoneGroupPropertiesFormat struct {
23146	// ProvisioningState - READ-ONLY; The provisioning state of the private dns zone group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
23147	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
23148	// PrivateDNSZoneConfigs - A collection of private dns zone configurations of the private dns zone group.
23149	PrivateDNSZoneConfigs *[]PrivateDNSZoneConfig `json:"privateDnsZoneConfigs,omitempty"`
23150}
23151
23152// MarshalJSON is the custom marshaler for PrivateDNSZoneGroupPropertiesFormat.
23153func (pdzgpf PrivateDNSZoneGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
23154	objectMap := make(map[string]interface{})
23155	if pdzgpf.PrivateDNSZoneConfigs != nil {
23156		objectMap["privateDnsZoneConfigs"] = pdzgpf.PrivateDNSZoneConfigs
23157	}
23158	return json.Marshal(objectMap)
23159}
23160
23161// PrivateDNSZoneGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23162// long-running operation.
23163type PrivateDNSZoneGroupsCreateOrUpdateFuture struct {
23164	azure.FutureAPI
23165	// Result returns the result of the asynchronous operation.
23166	// If the operation has not completed it will return an error.
23167	Result func(PrivateDNSZoneGroupsClient) (PrivateDNSZoneGroup, error)
23168}
23169
23170// PrivateDNSZoneGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
23171// long-running operation.
23172type PrivateDNSZoneGroupsDeleteFuture struct {
23173	azure.FutureAPI
23174	// Result returns the result of the asynchronous operation.
23175	// If the operation has not completed it will return an error.
23176	Result func(PrivateDNSZoneGroupsClient) (autorest.Response, error)
23177}
23178
23179// PrivateDNSZonePropertiesFormat properties of the private dns zone configuration resource.
23180type PrivateDNSZonePropertiesFormat struct {
23181	// PrivateDNSZoneID - The resource id of the private dns zone.
23182	PrivateDNSZoneID *string `json:"privateDnsZoneId,omitempty"`
23183	// RecordSets - READ-ONLY; A collection of information regarding a recordSet, holding information to identify private resources.
23184	RecordSets *[]RecordSet `json:"recordSets,omitempty"`
23185}
23186
23187// MarshalJSON is the custom marshaler for PrivateDNSZonePropertiesFormat.
23188func (pdzpf PrivateDNSZonePropertiesFormat) MarshalJSON() ([]byte, error) {
23189	objectMap := make(map[string]interface{})
23190	if pdzpf.PrivateDNSZoneID != nil {
23191		objectMap["privateDnsZoneId"] = pdzpf.PrivateDNSZoneID
23192	}
23193	return json.Marshal(objectMap)
23194}
23195
23196// PrivateEndpoint private endpoint resource.
23197type PrivateEndpoint struct {
23198	autorest.Response `json:"-"`
23199	// PrivateEndpointProperties - Properties of the private endpoint.
23200	*PrivateEndpointProperties `json:"properties,omitempty"`
23201	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
23202	Etag *string `json:"etag,omitempty"`
23203	// ID - Resource ID.
23204	ID *string `json:"id,omitempty"`
23205	// Name - READ-ONLY; Resource name.
23206	Name *string `json:"name,omitempty"`
23207	// Type - READ-ONLY; Resource type.
23208	Type *string `json:"type,omitempty"`
23209	// Location - Resource location.
23210	Location *string `json:"location,omitempty"`
23211	// Tags - Resource tags.
23212	Tags map[string]*string `json:"tags"`
23213}
23214
23215// MarshalJSON is the custom marshaler for PrivateEndpoint.
23216func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
23217	objectMap := make(map[string]interface{})
23218	if peVar.PrivateEndpointProperties != nil {
23219		objectMap["properties"] = peVar.PrivateEndpointProperties
23220	}
23221	if peVar.ID != nil {
23222		objectMap["id"] = peVar.ID
23223	}
23224	if peVar.Location != nil {
23225		objectMap["location"] = peVar.Location
23226	}
23227	if peVar.Tags != nil {
23228		objectMap["tags"] = peVar.Tags
23229	}
23230	return json.Marshal(objectMap)
23231}
23232
23233// UnmarshalJSON is the custom unmarshaler for PrivateEndpoint struct.
23234func (peVar *PrivateEndpoint) UnmarshalJSON(body []byte) error {
23235	var m map[string]*json.RawMessage
23236	err := json.Unmarshal(body, &m)
23237	if err != nil {
23238		return err
23239	}
23240	for k, v := range m {
23241		switch k {
23242		case "properties":
23243			if v != nil {
23244				var privateEndpointProperties PrivateEndpointProperties
23245				err = json.Unmarshal(*v, &privateEndpointProperties)
23246				if err != nil {
23247					return err
23248				}
23249				peVar.PrivateEndpointProperties = &privateEndpointProperties
23250			}
23251		case "etag":
23252			if v != nil {
23253				var etag string
23254				err = json.Unmarshal(*v, &etag)
23255				if err != nil {
23256					return err
23257				}
23258				peVar.Etag = &etag
23259			}
23260		case "id":
23261			if v != nil {
23262				var ID string
23263				err = json.Unmarshal(*v, &ID)
23264				if err != nil {
23265					return err
23266				}
23267				peVar.ID = &ID
23268			}
23269		case "name":
23270			if v != nil {
23271				var name string
23272				err = json.Unmarshal(*v, &name)
23273				if err != nil {
23274					return err
23275				}
23276				peVar.Name = &name
23277			}
23278		case "type":
23279			if v != nil {
23280				var typeVar string
23281				err = json.Unmarshal(*v, &typeVar)
23282				if err != nil {
23283					return err
23284				}
23285				peVar.Type = &typeVar
23286			}
23287		case "location":
23288			if v != nil {
23289				var location string
23290				err = json.Unmarshal(*v, &location)
23291				if err != nil {
23292					return err
23293				}
23294				peVar.Location = &location
23295			}
23296		case "tags":
23297			if v != nil {
23298				var tags map[string]*string
23299				err = json.Unmarshal(*v, &tags)
23300				if err != nil {
23301					return err
23302				}
23303				peVar.Tags = tags
23304			}
23305		}
23306	}
23307
23308	return nil
23309}
23310
23311// PrivateEndpointConnection privateEndpointConnection resource.
23312type PrivateEndpointConnection struct {
23313	autorest.Response `json:"-"`
23314	// PrivateEndpointConnectionProperties - Properties of the private end point connection.
23315	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
23316	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
23317	Name *string `json:"name,omitempty"`
23318	// Type - READ-ONLY; The resource type.
23319	Type *string `json:"type,omitempty"`
23320	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
23321	Etag *string `json:"etag,omitempty"`
23322	// ID - Resource ID.
23323	ID *string `json:"id,omitempty"`
23324}
23325
23326// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
23327func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
23328	objectMap := make(map[string]interface{})
23329	if pec.PrivateEndpointConnectionProperties != nil {
23330		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
23331	}
23332	if pec.Name != nil {
23333		objectMap["name"] = pec.Name
23334	}
23335	if pec.ID != nil {
23336		objectMap["id"] = pec.ID
23337	}
23338	return json.Marshal(objectMap)
23339}
23340
23341// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
23342func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
23343	var m map[string]*json.RawMessage
23344	err := json.Unmarshal(body, &m)
23345	if err != nil {
23346		return err
23347	}
23348	for k, v := range m {
23349		switch k {
23350		case "properties":
23351			if v != nil {
23352				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
23353				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
23354				if err != nil {
23355					return err
23356				}
23357				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
23358			}
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				pec.Name = &name
23367			}
23368		case "type":
23369			if v != nil {
23370				var typeVar string
23371				err = json.Unmarshal(*v, &typeVar)
23372				if err != nil {
23373					return err
23374				}
23375				pec.Type = &typeVar
23376			}
23377		case "etag":
23378			if v != nil {
23379				var etag string
23380				err = json.Unmarshal(*v, &etag)
23381				if err != nil {
23382					return err
23383				}
23384				pec.Etag = &etag
23385			}
23386		case "id":
23387			if v != nil {
23388				var ID string
23389				err = json.Unmarshal(*v, &ID)
23390				if err != nil {
23391					return err
23392				}
23393				pec.ID = &ID
23394			}
23395		}
23396	}
23397
23398	return nil
23399}
23400
23401// PrivateEndpointConnectionListResult response for the ListPrivateEndpointConnection API service call.
23402type PrivateEndpointConnectionListResult struct {
23403	autorest.Response `json:"-"`
23404	// Value - A list of PrivateEndpointConnection resources for a specific private link service.
23405	Value *[]PrivateEndpointConnection `json:"value,omitempty"`
23406	// NextLink - READ-ONLY; The URL to get the next set of results.
23407	NextLink *string `json:"nextLink,omitempty"`
23408}
23409
23410// MarshalJSON is the custom marshaler for PrivateEndpointConnectionListResult.
23411func (peclr PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) {
23412	objectMap := make(map[string]interface{})
23413	if peclr.Value != nil {
23414		objectMap["value"] = peclr.Value
23415	}
23416	return json.Marshal(objectMap)
23417}
23418
23419// PrivateEndpointConnectionListResultIterator provides access to a complete listing of
23420// PrivateEndpointConnection values.
23421type PrivateEndpointConnectionListResultIterator struct {
23422	i    int
23423	page PrivateEndpointConnectionListResultPage
23424}
23425
23426// NextWithContext advances to the next value.  If there was an error making
23427// the request the iterator does not advance and the error is returned.
23428func (iter *PrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
23429	if tracing.IsEnabled() {
23430		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultIterator.NextWithContext")
23431		defer func() {
23432			sc := -1
23433			if iter.Response().Response.Response != nil {
23434				sc = iter.Response().Response.Response.StatusCode
23435			}
23436			tracing.EndSpan(ctx, sc, err)
23437		}()
23438	}
23439	iter.i++
23440	if iter.i < len(iter.page.Values()) {
23441		return nil
23442	}
23443	err = iter.page.NextWithContext(ctx)
23444	if err != nil {
23445		iter.i--
23446		return err
23447	}
23448	iter.i = 0
23449	return nil
23450}
23451
23452// Next advances to the next value.  If there was an error making
23453// the request the iterator does not advance and the error is returned.
23454// Deprecated: Use NextWithContext() instead.
23455func (iter *PrivateEndpointConnectionListResultIterator) Next() error {
23456	return iter.NextWithContext(context.Background())
23457}
23458
23459// NotDone returns true if the enumeration should be started or is not yet complete.
23460func (iter PrivateEndpointConnectionListResultIterator) NotDone() bool {
23461	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23462}
23463
23464// Response returns the raw server response from the last page request.
23465func (iter PrivateEndpointConnectionListResultIterator) Response() PrivateEndpointConnectionListResult {
23466	return iter.page.Response()
23467}
23468
23469// Value returns the current value or a zero-initialized value if the
23470// iterator has advanced beyond the end of the collection.
23471func (iter PrivateEndpointConnectionListResultIterator) Value() PrivateEndpointConnection {
23472	if !iter.page.NotDone() {
23473		return PrivateEndpointConnection{}
23474	}
23475	return iter.page.Values()[iter.i]
23476}
23477
23478// Creates a new instance of the PrivateEndpointConnectionListResultIterator type.
23479func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator {
23480	return PrivateEndpointConnectionListResultIterator{page: page}
23481}
23482
23483// IsEmpty returns true if the ListResult contains no values.
23484func (peclr PrivateEndpointConnectionListResult) IsEmpty() bool {
23485	return peclr.Value == nil || len(*peclr.Value) == 0
23486}
23487
23488// hasNextLink returns true if the NextLink is not empty.
23489func (peclr PrivateEndpointConnectionListResult) hasNextLink() bool {
23490	return peclr.NextLink != nil && len(*peclr.NextLink) != 0
23491}
23492
23493// privateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results.
23494// It returns nil if no more results exist.
23495func (peclr PrivateEndpointConnectionListResult) privateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
23496	if !peclr.hasNextLink() {
23497		return nil, nil
23498	}
23499	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23500		autorest.AsJSON(),
23501		autorest.AsGet(),
23502		autorest.WithBaseURL(to.String(peclr.NextLink)))
23503}
23504
23505// PrivateEndpointConnectionListResultPage contains a page of PrivateEndpointConnection values.
23506type PrivateEndpointConnectionListResultPage struct {
23507	fn    func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)
23508	peclr PrivateEndpointConnectionListResult
23509}
23510
23511// NextWithContext advances to the next page of values.  If there was an error making
23512// the request the page does not advance and the error is returned.
23513func (page *PrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
23514	if tracing.IsEnabled() {
23515		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultPage.NextWithContext")
23516		defer func() {
23517			sc := -1
23518			if page.Response().Response.Response != nil {
23519				sc = page.Response().Response.Response.StatusCode
23520			}
23521			tracing.EndSpan(ctx, sc, err)
23522		}()
23523	}
23524	for {
23525		next, err := page.fn(ctx, page.peclr)
23526		if err != nil {
23527			return err
23528		}
23529		page.peclr = next
23530		if !next.hasNextLink() || !next.IsEmpty() {
23531			break
23532		}
23533	}
23534	return nil
23535}
23536
23537// Next advances to the next page of values.  If there was an error making
23538// the request the page does not advance and the error is returned.
23539// Deprecated: Use NextWithContext() instead.
23540func (page *PrivateEndpointConnectionListResultPage) Next() error {
23541	return page.NextWithContext(context.Background())
23542}
23543
23544// NotDone returns true if the page enumeration should be started or is not yet complete.
23545func (page PrivateEndpointConnectionListResultPage) NotDone() bool {
23546	return !page.peclr.IsEmpty()
23547}
23548
23549// Response returns the raw server response from the last page request.
23550func (page PrivateEndpointConnectionListResultPage) Response() PrivateEndpointConnectionListResult {
23551	return page.peclr
23552}
23553
23554// Values returns the slice of values for the current page or nil if there are no values.
23555func (page PrivateEndpointConnectionListResultPage) Values() []PrivateEndpointConnection {
23556	if page.peclr.IsEmpty() {
23557		return nil
23558	}
23559	return *page.peclr.Value
23560}
23561
23562// Creates a new instance of the PrivateEndpointConnectionListResultPage type.
23563func NewPrivateEndpointConnectionListResultPage(cur PrivateEndpointConnectionListResult, getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage {
23564	return PrivateEndpointConnectionListResultPage{
23565		fn:    getNextPage,
23566		peclr: cur,
23567	}
23568}
23569
23570// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
23571type PrivateEndpointConnectionProperties struct {
23572	// PrivateEndpoint - READ-ONLY; The resource of private end point.
23573	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
23574	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
23575	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
23576	// ProvisioningState - READ-ONLY; The provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
23577	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
23578	// LinkIdentifier - READ-ONLY; The consumer link id.
23579	LinkIdentifier *string `json:"linkIdentifier,omitempty"`
23580}
23581
23582// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties.
23583func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) {
23584	objectMap := make(map[string]interface{})
23585	if pecp.PrivateLinkServiceConnectionState != nil {
23586		objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState
23587	}
23588	return json.Marshal(objectMap)
23589}
23590
23591// PrivateEndpointListResult response for the ListPrivateEndpoints API service call.
23592type PrivateEndpointListResult struct {
23593	autorest.Response `json:"-"`
23594	// Value - A list of private endpoint resources in a resource group.
23595	Value *[]PrivateEndpoint `json:"value,omitempty"`
23596	// NextLink - READ-ONLY; The URL to get the next set of results.
23597	NextLink *string `json:"nextLink,omitempty"`
23598}
23599
23600// MarshalJSON is the custom marshaler for PrivateEndpointListResult.
23601func (pelr PrivateEndpointListResult) MarshalJSON() ([]byte, error) {
23602	objectMap := make(map[string]interface{})
23603	if pelr.Value != nil {
23604		objectMap["value"] = pelr.Value
23605	}
23606	return json.Marshal(objectMap)
23607}
23608
23609// PrivateEndpointListResultIterator provides access to a complete listing of PrivateEndpoint values.
23610type PrivateEndpointListResultIterator struct {
23611	i    int
23612	page PrivateEndpointListResultPage
23613}
23614
23615// NextWithContext advances to the next value.  If there was an error making
23616// the request the iterator does not advance and the error is returned.
23617func (iter *PrivateEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
23618	if tracing.IsEnabled() {
23619		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultIterator.NextWithContext")
23620		defer func() {
23621			sc := -1
23622			if iter.Response().Response.Response != nil {
23623				sc = iter.Response().Response.Response.StatusCode
23624			}
23625			tracing.EndSpan(ctx, sc, err)
23626		}()
23627	}
23628	iter.i++
23629	if iter.i < len(iter.page.Values()) {
23630		return nil
23631	}
23632	err = iter.page.NextWithContext(ctx)
23633	if err != nil {
23634		iter.i--
23635		return err
23636	}
23637	iter.i = 0
23638	return nil
23639}
23640
23641// Next advances to the next value.  If there was an error making
23642// the request the iterator does not advance and the error is returned.
23643// Deprecated: Use NextWithContext() instead.
23644func (iter *PrivateEndpointListResultIterator) Next() error {
23645	return iter.NextWithContext(context.Background())
23646}
23647
23648// NotDone returns true if the enumeration should be started or is not yet complete.
23649func (iter PrivateEndpointListResultIterator) NotDone() bool {
23650	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23651}
23652
23653// Response returns the raw server response from the last page request.
23654func (iter PrivateEndpointListResultIterator) Response() PrivateEndpointListResult {
23655	return iter.page.Response()
23656}
23657
23658// Value returns the current value or a zero-initialized value if the
23659// iterator has advanced beyond the end of the collection.
23660func (iter PrivateEndpointListResultIterator) Value() PrivateEndpoint {
23661	if !iter.page.NotDone() {
23662		return PrivateEndpoint{}
23663	}
23664	return iter.page.Values()[iter.i]
23665}
23666
23667// Creates a new instance of the PrivateEndpointListResultIterator type.
23668func NewPrivateEndpointListResultIterator(page PrivateEndpointListResultPage) PrivateEndpointListResultIterator {
23669	return PrivateEndpointListResultIterator{page: page}
23670}
23671
23672// IsEmpty returns true if the ListResult contains no values.
23673func (pelr PrivateEndpointListResult) IsEmpty() bool {
23674	return pelr.Value == nil || len(*pelr.Value) == 0
23675}
23676
23677// hasNextLink returns true if the NextLink is not empty.
23678func (pelr PrivateEndpointListResult) hasNextLink() bool {
23679	return pelr.NextLink != nil && len(*pelr.NextLink) != 0
23680}
23681
23682// privateEndpointListResultPreparer prepares a request to retrieve the next set of results.
23683// It returns nil if no more results exist.
23684func (pelr PrivateEndpointListResult) privateEndpointListResultPreparer(ctx context.Context) (*http.Request, error) {
23685	if !pelr.hasNextLink() {
23686		return nil, nil
23687	}
23688	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23689		autorest.AsJSON(),
23690		autorest.AsGet(),
23691		autorest.WithBaseURL(to.String(pelr.NextLink)))
23692}
23693
23694// PrivateEndpointListResultPage contains a page of PrivateEndpoint values.
23695type PrivateEndpointListResultPage struct {
23696	fn   func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)
23697	pelr PrivateEndpointListResult
23698}
23699
23700// NextWithContext advances to the next page of values.  If there was an error making
23701// the request the page does not advance and the error is returned.
23702func (page *PrivateEndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
23703	if tracing.IsEnabled() {
23704		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultPage.NextWithContext")
23705		defer func() {
23706			sc := -1
23707			if page.Response().Response.Response != nil {
23708				sc = page.Response().Response.Response.StatusCode
23709			}
23710			tracing.EndSpan(ctx, sc, err)
23711		}()
23712	}
23713	for {
23714		next, err := page.fn(ctx, page.pelr)
23715		if err != nil {
23716			return err
23717		}
23718		page.pelr = next
23719		if !next.hasNextLink() || !next.IsEmpty() {
23720			break
23721		}
23722	}
23723	return nil
23724}
23725
23726// Next advances to the next page of values.  If there was an error making
23727// the request the page does not advance and the error is returned.
23728// Deprecated: Use NextWithContext() instead.
23729func (page *PrivateEndpointListResultPage) Next() error {
23730	return page.NextWithContext(context.Background())
23731}
23732
23733// NotDone returns true if the page enumeration should be started or is not yet complete.
23734func (page PrivateEndpointListResultPage) NotDone() bool {
23735	return !page.pelr.IsEmpty()
23736}
23737
23738// Response returns the raw server response from the last page request.
23739func (page PrivateEndpointListResultPage) Response() PrivateEndpointListResult {
23740	return page.pelr
23741}
23742
23743// Values returns the slice of values for the current page or nil if there are no values.
23744func (page PrivateEndpointListResultPage) Values() []PrivateEndpoint {
23745	if page.pelr.IsEmpty() {
23746		return nil
23747	}
23748	return *page.pelr.Value
23749}
23750
23751// Creates a new instance of the PrivateEndpointListResultPage type.
23752func NewPrivateEndpointListResultPage(cur PrivateEndpointListResult, getNextPage func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)) PrivateEndpointListResultPage {
23753	return PrivateEndpointListResultPage{
23754		fn:   getNextPage,
23755		pelr: cur,
23756	}
23757}
23758
23759// PrivateEndpointProperties properties of the private endpoint.
23760type PrivateEndpointProperties struct {
23761	// Subnet - The ID of the subnet from which the private IP will be allocated.
23762	Subnet *Subnet `json:"subnet,omitempty"`
23763	// NetworkInterfaces - READ-ONLY; An array of references to the network interfaces created for this private endpoint.
23764	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
23765	// ProvisioningState - READ-ONLY; The provisioning state of the private endpoint resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
23766	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
23767	// PrivateLinkServiceConnections - A grouping of information about the connection to the remote resource.
23768	PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"`
23769	// 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.
23770	ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"`
23771	// CustomDNSConfigs - An array of custom dns configurations.
23772	CustomDNSConfigs *[]CustomDNSConfigPropertiesFormat `json:"customDnsConfigs,omitempty"`
23773}
23774
23775// MarshalJSON is the custom marshaler for PrivateEndpointProperties.
23776func (pep PrivateEndpointProperties) MarshalJSON() ([]byte, error) {
23777	objectMap := make(map[string]interface{})
23778	if pep.Subnet != nil {
23779		objectMap["subnet"] = pep.Subnet
23780	}
23781	if pep.PrivateLinkServiceConnections != nil {
23782		objectMap["privateLinkServiceConnections"] = pep.PrivateLinkServiceConnections
23783	}
23784	if pep.ManualPrivateLinkServiceConnections != nil {
23785		objectMap["manualPrivateLinkServiceConnections"] = pep.ManualPrivateLinkServiceConnections
23786	}
23787	if pep.CustomDNSConfigs != nil {
23788		objectMap["customDnsConfigs"] = pep.CustomDNSConfigs
23789	}
23790	return json.Marshal(objectMap)
23791}
23792
23793// PrivateEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23794// long-running operation.
23795type PrivateEndpointsCreateOrUpdateFuture struct {
23796	azure.FutureAPI
23797	// Result returns the result of the asynchronous operation.
23798	// If the operation has not completed it will return an error.
23799	Result func(PrivateEndpointsClient) (PrivateEndpoint, error)
23800}
23801
23802// PrivateEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23803// operation.
23804type PrivateEndpointsDeleteFuture struct {
23805	azure.FutureAPI
23806	// Result returns the result of the asynchronous operation.
23807	// If the operation has not completed it will return an error.
23808	Result func(PrivateEndpointsClient) (autorest.Response, error)
23809}
23810
23811// PrivateLinkService private link service resource.
23812type PrivateLinkService struct {
23813	autorest.Response `json:"-"`
23814	// PrivateLinkServiceProperties - Properties of the private link service.
23815	*PrivateLinkServiceProperties `json:"properties,omitempty"`
23816	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
23817	Etag *string `json:"etag,omitempty"`
23818	// ID - Resource ID.
23819	ID *string `json:"id,omitempty"`
23820	// Name - READ-ONLY; Resource name.
23821	Name *string `json:"name,omitempty"`
23822	// Type - READ-ONLY; Resource type.
23823	Type *string `json:"type,omitempty"`
23824	// Location - Resource location.
23825	Location *string `json:"location,omitempty"`
23826	// Tags - Resource tags.
23827	Tags map[string]*string `json:"tags"`
23828}
23829
23830// MarshalJSON is the custom marshaler for PrivateLinkService.
23831func (pls PrivateLinkService) MarshalJSON() ([]byte, error) {
23832	objectMap := make(map[string]interface{})
23833	if pls.PrivateLinkServiceProperties != nil {
23834		objectMap["properties"] = pls.PrivateLinkServiceProperties
23835	}
23836	if pls.ID != nil {
23837		objectMap["id"] = pls.ID
23838	}
23839	if pls.Location != nil {
23840		objectMap["location"] = pls.Location
23841	}
23842	if pls.Tags != nil {
23843		objectMap["tags"] = pls.Tags
23844	}
23845	return json.Marshal(objectMap)
23846}
23847
23848// UnmarshalJSON is the custom unmarshaler for PrivateLinkService struct.
23849func (pls *PrivateLinkService) UnmarshalJSON(body []byte) error {
23850	var m map[string]*json.RawMessage
23851	err := json.Unmarshal(body, &m)
23852	if err != nil {
23853		return err
23854	}
23855	for k, v := range m {
23856		switch k {
23857		case "properties":
23858			if v != nil {
23859				var privateLinkServiceProperties PrivateLinkServiceProperties
23860				err = json.Unmarshal(*v, &privateLinkServiceProperties)
23861				if err != nil {
23862					return err
23863				}
23864				pls.PrivateLinkServiceProperties = &privateLinkServiceProperties
23865			}
23866		case "etag":
23867			if v != nil {
23868				var etag string
23869				err = json.Unmarshal(*v, &etag)
23870				if err != nil {
23871					return err
23872				}
23873				pls.Etag = &etag
23874			}
23875		case "id":
23876			if v != nil {
23877				var ID string
23878				err = json.Unmarshal(*v, &ID)
23879				if err != nil {
23880					return err
23881				}
23882				pls.ID = &ID
23883			}
23884		case "name":
23885			if v != nil {
23886				var name string
23887				err = json.Unmarshal(*v, &name)
23888				if err != nil {
23889					return err
23890				}
23891				pls.Name = &name
23892			}
23893		case "type":
23894			if v != nil {
23895				var typeVar string
23896				err = json.Unmarshal(*v, &typeVar)
23897				if err != nil {
23898					return err
23899				}
23900				pls.Type = &typeVar
23901			}
23902		case "location":
23903			if v != nil {
23904				var location string
23905				err = json.Unmarshal(*v, &location)
23906				if err != nil {
23907					return err
23908				}
23909				pls.Location = &location
23910			}
23911		case "tags":
23912			if v != nil {
23913				var tags map[string]*string
23914				err = json.Unmarshal(*v, &tags)
23915				if err != nil {
23916					return err
23917				}
23918				pls.Tags = tags
23919			}
23920		}
23921	}
23922
23923	return nil
23924}
23925
23926// PrivateLinkServiceConnection privateLinkServiceConnection resource.
23927type PrivateLinkServiceConnection struct {
23928	// PrivateLinkServiceConnectionProperties - Properties of the private link service connection.
23929	*PrivateLinkServiceConnectionProperties `json:"properties,omitempty"`
23930	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
23931	Name *string `json:"name,omitempty"`
23932	// Type - READ-ONLY; The resource type.
23933	Type *string `json:"type,omitempty"`
23934	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
23935	Etag *string `json:"etag,omitempty"`
23936	// ID - Resource ID.
23937	ID *string `json:"id,omitempty"`
23938}
23939
23940// MarshalJSON is the custom marshaler for PrivateLinkServiceConnection.
23941func (plsc PrivateLinkServiceConnection) MarshalJSON() ([]byte, error) {
23942	objectMap := make(map[string]interface{})
23943	if plsc.PrivateLinkServiceConnectionProperties != nil {
23944		objectMap["properties"] = plsc.PrivateLinkServiceConnectionProperties
23945	}
23946	if plsc.Name != nil {
23947		objectMap["name"] = plsc.Name
23948	}
23949	if plsc.ID != nil {
23950		objectMap["id"] = plsc.ID
23951	}
23952	return json.Marshal(objectMap)
23953}
23954
23955// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceConnection struct.
23956func (plsc *PrivateLinkServiceConnection) UnmarshalJSON(body []byte) error {
23957	var m map[string]*json.RawMessage
23958	err := json.Unmarshal(body, &m)
23959	if err != nil {
23960		return err
23961	}
23962	for k, v := range m {
23963		switch k {
23964		case "properties":
23965			if v != nil {
23966				var privateLinkServiceConnectionProperties PrivateLinkServiceConnectionProperties
23967				err = json.Unmarshal(*v, &privateLinkServiceConnectionProperties)
23968				if err != nil {
23969					return err
23970				}
23971				plsc.PrivateLinkServiceConnectionProperties = &privateLinkServiceConnectionProperties
23972			}
23973		case "name":
23974			if v != nil {
23975				var name string
23976				err = json.Unmarshal(*v, &name)
23977				if err != nil {
23978					return err
23979				}
23980				plsc.Name = &name
23981			}
23982		case "type":
23983			if v != nil {
23984				var typeVar string
23985				err = json.Unmarshal(*v, &typeVar)
23986				if err != nil {
23987					return err
23988				}
23989				plsc.Type = &typeVar
23990			}
23991		case "etag":
23992			if v != nil {
23993				var etag string
23994				err = json.Unmarshal(*v, &etag)
23995				if err != nil {
23996					return err
23997				}
23998				plsc.Etag = &etag
23999			}
24000		case "id":
24001			if v != nil {
24002				var ID string
24003				err = json.Unmarshal(*v, &ID)
24004				if err != nil {
24005					return err
24006				}
24007				plsc.ID = &ID
24008			}
24009		}
24010	}
24011
24012	return nil
24013}
24014
24015// PrivateLinkServiceConnectionProperties properties of the PrivateLinkServiceConnection.
24016type PrivateLinkServiceConnectionProperties struct {
24017	// ProvisioningState - READ-ONLY; The provisioning state of the private link service connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24018	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24019	// PrivateLinkServiceID - The resource id of private link service.
24020	PrivateLinkServiceID *string `json:"privateLinkServiceId,omitempty"`
24021	// GroupIds - The ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to.
24022	GroupIds *[]string `json:"groupIds,omitempty"`
24023	// RequestMessage - A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars.
24024	RequestMessage *string `json:"requestMessage,omitempty"`
24025	// PrivateLinkServiceConnectionState - A collection of read-only information about the state of the connection to the remote resource.
24026	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
24027}
24028
24029// MarshalJSON is the custom marshaler for PrivateLinkServiceConnectionProperties.
24030func (plscp PrivateLinkServiceConnectionProperties) MarshalJSON() ([]byte, error) {
24031	objectMap := make(map[string]interface{})
24032	if plscp.PrivateLinkServiceID != nil {
24033		objectMap["privateLinkServiceId"] = plscp.PrivateLinkServiceID
24034	}
24035	if plscp.GroupIds != nil {
24036		objectMap["groupIds"] = plscp.GroupIds
24037	}
24038	if plscp.RequestMessage != nil {
24039		objectMap["requestMessage"] = plscp.RequestMessage
24040	}
24041	if plscp.PrivateLinkServiceConnectionState != nil {
24042		objectMap["privateLinkServiceConnectionState"] = plscp.PrivateLinkServiceConnectionState
24043	}
24044	return json.Marshal(objectMap)
24045}
24046
24047// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
24048// service consumer and provider.
24049type PrivateLinkServiceConnectionState struct {
24050	// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
24051	Status *string `json:"status,omitempty"`
24052	// Description - The reason for approval/rejection of the connection.
24053	Description *string `json:"description,omitempty"`
24054	// ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
24055	ActionsRequired *string `json:"actionsRequired,omitempty"`
24056}
24057
24058// PrivateLinkServiceIPConfiguration the private link service ip configuration.
24059type PrivateLinkServiceIPConfiguration struct {
24060	// PrivateLinkServiceIPConfigurationProperties - Properties of the private link service ip configuration.
24061	*PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"`
24062	// Name - The name of private link service ip configuration.
24063	Name *string `json:"name,omitempty"`
24064	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24065	Etag *string `json:"etag,omitempty"`
24066	// Type - READ-ONLY; The resource type.
24067	Type *string `json:"type,omitempty"`
24068	// ID - Resource ID.
24069	ID *string `json:"id,omitempty"`
24070}
24071
24072// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfiguration.
24073func (plsic PrivateLinkServiceIPConfiguration) MarshalJSON() ([]byte, error) {
24074	objectMap := make(map[string]interface{})
24075	if plsic.PrivateLinkServiceIPConfigurationProperties != nil {
24076		objectMap["properties"] = plsic.PrivateLinkServiceIPConfigurationProperties
24077	}
24078	if plsic.Name != nil {
24079		objectMap["name"] = plsic.Name
24080	}
24081	if plsic.ID != nil {
24082		objectMap["id"] = plsic.ID
24083	}
24084	return json.Marshal(objectMap)
24085}
24086
24087// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceIPConfiguration struct.
24088func (plsic *PrivateLinkServiceIPConfiguration) UnmarshalJSON(body []byte) error {
24089	var m map[string]*json.RawMessage
24090	err := json.Unmarshal(body, &m)
24091	if err != nil {
24092		return err
24093	}
24094	for k, v := range m {
24095		switch k {
24096		case "properties":
24097			if v != nil {
24098				var privateLinkServiceIPConfigurationProperties PrivateLinkServiceIPConfigurationProperties
24099				err = json.Unmarshal(*v, &privateLinkServiceIPConfigurationProperties)
24100				if err != nil {
24101					return err
24102				}
24103				plsic.PrivateLinkServiceIPConfigurationProperties = &privateLinkServiceIPConfigurationProperties
24104			}
24105		case "name":
24106			if v != nil {
24107				var name string
24108				err = json.Unmarshal(*v, &name)
24109				if err != nil {
24110					return err
24111				}
24112				plsic.Name = &name
24113			}
24114		case "etag":
24115			if v != nil {
24116				var etag string
24117				err = json.Unmarshal(*v, &etag)
24118				if err != nil {
24119					return err
24120				}
24121				plsic.Etag = &etag
24122			}
24123		case "type":
24124			if v != nil {
24125				var typeVar string
24126				err = json.Unmarshal(*v, &typeVar)
24127				if err != nil {
24128					return err
24129				}
24130				plsic.Type = &typeVar
24131			}
24132		case "id":
24133			if v != nil {
24134				var ID string
24135				err = json.Unmarshal(*v, &ID)
24136				if err != nil {
24137					return err
24138				}
24139				plsic.ID = &ID
24140			}
24141		}
24142	}
24143
24144	return nil
24145}
24146
24147// PrivateLinkServiceIPConfigurationProperties properties of private link service IP configuration.
24148type PrivateLinkServiceIPConfigurationProperties struct {
24149	// PrivateIPAddress - The private IP address of the IP configuration.
24150	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
24151	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
24152	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
24153	// Subnet - The reference to the subnet resource.
24154	Subnet *Subnet `json:"subnet,omitempty"`
24155	// Primary - Whether the ip configuration is primary or not.
24156	Primary *bool `json:"primary,omitempty"`
24157	// ProvisioningState - READ-ONLY; The provisioning state of the private link service IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24158	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24159	// PrivateIPAddressVersion - Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPv4', 'IPv6'
24160	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
24161}
24162
24163// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfigurationProperties.
24164func (plsicp PrivateLinkServiceIPConfigurationProperties) MarshalJSON() ([]byte, error) {
24165	objectMap := make(map[string]interface{})
24166	if plsicp.PrivateIPAddress != nil {
24167		objectMap["privateIPAddress"] = plsicp.PrivateIPAddress
24168	}
24169	if plsicp.PrivateIPAllocationMethod != "" {
24170		objectMap["privateIPAllocationMethod"] = plsicp.PrivateIPAllocationMethod
24171	}
24172	if plsicp.Subnet != nil {
24173		objectMap["subnet"] = plsicp.Subnet
24174	}
24175	if plsicp.Primary != nil {
24176		objectMap["primary"] = plsicp.Primary
24177	}
24178	if plsicp.PrivateIPAddressVersion != "" {
24179		objectMap["privateIPAddressVersion"] = plsicp.PrivateIPAddressVersion
24180	}
24181	return json.Marshal(objectMap)
24182}
24183
24184// PrivateLinkServiceListResult response for the ListPrivateLinkService API service call.
24185type PrivateLinkServiceListResult struct {
24186	autorest.Response `json:"-"`
24187	// Value - A list of PrivateLinkService resources in a resource group.
24188	Value *[]PrivateLinkService `json:"value,omitempty"`
24189	// NextLink - READ-ONLY; The URL to get the next set of results.
24190	NextLink *string `json:"nextLink,omitempty"`
24191}
24192
24193// MarshalJSON is the custom marshaler for PrivateLinkServiceListResult.
24194func (plslr PrivateLinkServiceListResult) MarshalJSON() ([]byte, error) {
24195	objectMap := make(map[string]interface{})
24196	if plslr.Value != nil {
24197		objectMap["value"] = plslr.Value
24198	}
24199	return json.Marshal(objectMap)
24200}
24201
24202// PrivateLinkServiceListResultIterator provides access to a complete listing of PrivateLinkService values.
24203type PrivateLinkServiceListResultIterator struct {
24204	i    int
24205	page PrivateLinkServiceListResultPage
24206}
24207
24208// NextWithContext advances to the next value.  If there was an error making
24209// the request the iterator does not advance and the error is returned.
24210func (iter *PrivateLinkServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
24211	if tracing.IsEnabled() {
24212		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultIterator.NextWithContext")
24213		defer func() {
24214			sc := -1
24215			if iter.Response().Response.Response != nil {
24216				sc = iter.Response().Response.Response.StatusCode
24217			}
24218			tracing.EndSpan(ctx, sc, err)
24219		}()
24220	}
24221	iter.i++
24222	if iter.i < len(iter.page.Values()) {
24223		return nil
24224	}
24225	err = iter.page.NextWithContext(ctx)
24226	if err != nil {
24227		iter.i--
24228		return err
24229	}
24230	iter.i = 0
24231	return nil
24232}
24233
24234// Next advances to the next value.  If there was an error making
24235// the request the iterator does not advance and the error is returned.
24236// Deprecated: Use NextWithContext() instead.
24237func (iter *PrivateLinkServiceListResultIterator) Next() error {
24238	return iter.NextWithContext(context.Background())
24239}
24240
24241// NotDone returns true if the enumeration should be started or is not yet complete.
24242func (iter PrivateLinkServiceListResultIterator) NotDone() bool {
24243	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24244}
24245
24246// Response returns the raw server response from the last page request.
24247func (iter PrivateLinkServiceListResultIterator) Response() PrivateLinkServiceListResult {
24248	return iter.page.Response()
24249}
24250
24251// Value returns the current value or a zero-initialized value if the
24252// iterator has advanced beyond the end of the collection.
24253func (iter PrivateLinkServiceListResultIterator) Value() PrivateLinkService {
24254	if !iter.page.NotDone() {
24255		return PrivateLinkService{}
24256	}
24257	return iter.page.Values()[iter.i]
24258}
24259
24260// Creates a new instance of the PrivateLinkServiceListResultIterator type.
24261func NewPrivateLinkServiceListResultIterator(page PrivateLinkServiceListResultPage) PrivateLinkServiceListResultIterator {
24262	return PrivateLinkServiceListResultIterator{page: page}
24263}
24264
24265// IsEmpty returns true if the ListResult contains no values.
24266func (plslr PrivateLinkServiceListResult) IsEmpty() bool {
24267	return plslr.Value == nil || len(*plslr.Value) == 0
24268}
24269
24270// hasNextLink returns true if the NextLink is not empty.
24271func (plslr PrivateLinkServiceListResult) hasNextLink() bool {
24272	return plslr.NextLink != nil && len(*plslr.NextLink) != 0
24273}
24274
24275// privateLinkServiceListResultPreparer prepares a request to retrieve the next set of results.
24276// It returns nil if no more results exist.
24277func (plslr PrivateLinkServiceListResult) privateLinkServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
24278	if !plslr.hasNextLink() {
24279		return nil, nil
24280	}
24281	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24282		autorest.AsJSON(),
24283		autorest.AsGet(),
24284		autorest.WithBaseURL(to.String(plslr.NextLink)))
24285}
24286
24287// PrivateLinkServiceListResultPage contains a page of PrivateLinkService values.
24288type PrivateLinkServiceListResultPage struct {
24289	fn    func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)
24290	plslr PrivateLinkServiceListResult
24291}
24292
24293// NextWithContext advances to the next page of values.  If there was an error making
24294// the request the page does not advance and the error is returned.
24295func (page *PrivateLinkServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
24296	if tracing.IsEnabled() {
24297		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultPage.NextWithContext")
24298		defer func() {
24299			sc := -1
24300			if page.Response().Response.Response != nil {
24301				sc = page.Response().Response.Response.StatusCode
24302			}
24303			tracing.EndSpan(ctx, sc, err)
24304		}()
24305	}
24306	for {
24307		next, err := page.fn(ctx, page.plslr)
24308		if err != nil {
24309			return err
24310		}
24311		page.plslr = next
24312		if !next.hasNextLink() || !next.IsEmpty() {
24313			break
24314		}
24315	}
24316	return nil
24317}
24318
24319// Next advances to the next page of values.  If there was an error making
24320// the request the page does not advance and the error is returned.
24321// Deprecated: Use NextWithContext() instead.
24322func (page *PrivateLinkServiceListResultPage) Next() error {
24323	return page.NextWithContext(context.Background())
24324}
24325
24326// NotDone returns true if the page enumeration should be started or is not yet complete.
24327func (page PrivateLinkServiceListResultPage) NotDone() bool {
24328	return !page.plslr.IsEmpty()
24329}
24330
24331// Response returns the raw server response from the last page request.
24332func (page PrivateLinkServiceListResultPage) Response() PrivateLinkServiceListResult {
24333	return page.plslr
24334}
24335
24336// Values returns the slice of values for the current page or nil if there are no values.
24337func (page PrivateLinkServiceListResultPage) Values() []PrivateLinkService {
24338	if page.plslr.IsEmpty() {
24339		return nil
24340	}
24341	return *page.plslr.Value
24342}
24343
24344// Creates a new instance of the PrivateLinkServiceListResultPage type.
24345func NewPrivateLinkServiceListResultPage(cur PrivateLinkServiceListResult, getNextPage func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)) PrivateLinkServiceListResultPage {
24346	return PrivateLinkServiceListResultPage{
24347		fn:    getNextPage,
24348		plslr: cur,
24349	}
24350}
24351
24352// PrivateLinkServiceProperties properties of the private link service.
24353type PrivateLinkServiceProperties struct {
24354	// LoadBalancerFrontendIPConfigurations - An array of references to the load balancer IP configurations.
24355	LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"`
24356	// IPConfigurations - An array of private link service IP configurations.
24357	IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"`
24358	// NetworkInterfaces - READ-ONLY; An array of references to the network interfaces created for this private link service.
24359	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
24360	// ProvisioningState - READ-ONLY; The provisioning state of the private link service resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24361	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24362	// PrivateEndpointConnections - READ-ONLY; An array of list about connections to the private endpoint.
24363	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
24364	// Visibility - The visibility list of the private link service.
24365	Visibility *PrivateLinkServicePropertiesVisibility `json:"visibility,omitempty"`
24366	// AutoApproval - The auto-approval list of the private link service.
24367	AutoApproval *PrivateLinkServicePropertiesAutoApproval `json:"autoApproval,omitempty"`
24368	// Fqdns - The list of Fqdn.
24369	Fqdns *[]string `json:"fqdns,omitempty"`
24370	// Alias - READ-ONLY; The alias of the private link service.
24371	Alias *string `json:"alias,omitempty"`
24372	// EnableProxyProtocol - Whether the private link service is enabled for proxy protocol or not.
24373	EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"`
24374}
24375
24376// MarshalJSON is the custom marshaler for PrivateLinkServiceProperties.
24377func (plsp PrivateLinkServiceProperties) MarshalJSON() ([]byte, error) {
24378	objectMap := make(map[string]interface{})
24379	if plsp.LoadBalancerFrontendIPConfigurations != nil {
24380		objectMap["loadBalancerFrontendIpConfigurations"] = plsp.LoadBalancerFrontendIPConfigurations
24381	}
24382	if plsp.IPConfigurations != nil {
24383		objectMap["ipConfigurations"] = plsp.IPConfigurations
24384	}
24385	if plsp.Visibility != nil {
24386		objectMap["visibility"] = plsp.Visibility
24387	}
24388	if plsp.AutoApproval != nil {
24389		objectMap["autoApproval"] = plsp.AutoApproval
24390	}
24391	if plsp.Fqdns != nil {
24392		objectMap["fqdns"] = plsp.Fqdns
24393	}
24394	if plsp.EnableProxyProtocol != nil {
24395		objectMap["enableProxyProtocol"] = plsp.EnableProxyProtocol
24396	}
24397	return json.Marshal(objectMap)
24398}
24399
24400// PrivateLinkServicePropertiesAutoApproval the auto-approval list of the private link service.
24401type PrivateLinkServicePropertiesAutoApproval struct {
24402	// Subscriptions - The list of subscriptions.
24403	Subscriptions *[]string `json:"subscriptions,omitempty"`
24404}
24405
24406// PrivateLinkServicePropertiesVisibility the visibility list of the private link service.
24407type PrivateLinkServicePropertiesVisibility struct {
24408	// Subscriptions - The list of subscriptions.
24409	Subscriptions *[]string `json:"subscriptions,omitempty"`
24410}
24411
24412// PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture an abstraction for monitoring
24413// and retrieving the results of a long-running operation.
24414type PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture struct {
24415	azure.FutureAPI
24416	// Result returns the result of the asynchronous operation.
24417	// If the operation has not completed it will return an error.
24418	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
24419}
24420
24421// PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture an abstraction for monitoring and retrieving
24422// the results of a long-running operation.
24423type PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture struct {
24424	azure.FutureAPI
24425	// Result returns the result of the asynchronous operation.
24426	// If the operation has not completed it will return an error.
24427	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
24428}
24429
24430// PrivateLinkServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
24431// long-running operation.
24432type PrivateLinkServicesCreateOrUpdateFuture struct {
24433	azure.FutureAPI
24434	// Result returns the result of the asynchronous operation.
24435	// If the operation has not completed it will return an error.
24436	Result func(PrivateLinkServicesClient) (PrivateLinkService, error)
24437}
24438
24439// PrivateLinkServicesDeleteFuture an abstraction for monitoring and retrieving the results of a
24440// long-running operation.
24441type PrivateLinkServicesDeleteFuture struct {
24442	azure.FutureAPI
24443	// Result returns the result of the asynchronous operation.
24444	// If the operation has not completed it will return an error.
24445	Result func(PrivateLinkServicesClient) (autorest.Response, error)
24446}
24447
24448// PrivateLinkServicesDeletePrivateEndpointConnectionFuture an abstraction for monitoring and retrieving
24449// the results of a long-running operation.
24450type PrivateLinkServicesDeletePrivateEndpointConnectionFuture struct {
24451	azure.FutureAPI
24452	// Result returns the result of the asynchronous operation.
24453	// If the operation has not completed it will return an error.
24454	Result func(PrivateLinkServicesClient) (autorest.Response, error)
24455}
24456
24457// PrivateLinkServiceVisibility response for the CheckPrivateLinkServiceVisibility API service call.
24458type PrivateLinkServiceVisibility struct {
24459	autorest.Response `json:"-"`
24460	// Visible - Private Link Service Visibility (True/False).
24461	Visible *bool `json:"visible,omitempty"`
24462}
24463
24464// Probe a load balancer probe.
24465type Probe struct {
24466	autorest.Response `json:"-"`
24467	// ProbePropertiesFormat - Properties of load balancer probe.
24468	*ProbePropertiesFormat `json:"properties,omitempty"`
24469	// 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.
24470	Name *string `json:"name,omitempty"`
24471	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24472	Etag *string `json:"etag,omitempty"`
24473	// Type - READ-ONLY; Type of the resource.
24474	Type *string `json:"type,omitempty"`
24475	// ID - Resource ID.
24476	ID *string `json:"id,omitempty"`
24477}
24478
24479// MarshalJSON is the custom marshaler for Probe.
24480func (p Probe) MarshalJSON() ([]byte, error) {
24481	objectMap := make(map[string]interface{})
24482	if p.ProbePropertiesFormat != nil {
24483		objectMap["properties"] = p.ProbePropertiesFormat
24484	}
24485	if p.Name != nil {
24486		objectMap["name"] = p.Name
24487	}
24488	if p.ID != nil {
24489		objectMap["id"] = p.ID
24490	}
24491	return json.Marshal(objectMap)
24492}
24493
24494// UnmarshalJSON is the custom unmarshaler for Probe struct.
24495func (p *Probe) UnmarshalJSON(body []byte) error {
24496	var m map[string]*json.RawMessage
24497	err := json.Unmarshal(body, &m)
24498	if err != nil {
24499		return err
24500	}
24501	for k, v := range m {
24502		switch k {
24503		case "properties":
24504			if v != nil {
24505				var probePropertiesFormat ProbePropertiesFormat
24506				err = json.Unmarshal(*v, &probePropertiesFormat)
24507				if err != nil {
24508					return err
24509				}
24510				p.ProbePropertiesFormat = &probePropertiesFormat
24511			}
24512		case "name":
24513			if v != nil {
24514				var name string
24515				err = json.Unmarshal(*v, &name)
24516				if err != nil {
24517					return err
24518				}
24519				p.Name = &name
24520			}
24521		case "etag":
24522			if v != nil {
24523				var etag string
24524				err = json.Unmarshal(*v, &etag)
24525				if err != nil {
24526					return err
24527				}
24528				p.Etag = &etag
24529			}
24530		case "type":
24531			if v != nil {
24532				var typeVar string
24533				err = json.Unmarshal(*v, &typeVar)
24534				if err != nil {
24535					return err
24536				}
24537				p.Type = &typeVar
24538			}
24539		case "id":
24540			if v != nil {
24541				var ID string
24542				err = json.Unmarshal(*v, &ID)
24543				if err != nil {
24544					return err
24545				}
24546				p.ID = &ID
24547			}
24548		}
24549	}
24550
24551	return nil
24552}
24553
24554// ProbePropertiesFormat load balancer probe resource.
24555type ProbePropertiesFormat struct {
24556	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
24557	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
24558	// 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'
24559	Protocol ProbeProtocol `json:"protocol,omitempty"`
24560	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
24561	Port *int32 `json:"port,omitempty"`
24562	// 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.
24563	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
24564	// 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.
24565	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
24566	// 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.
24567	RequestPath *string `json:"requestPath,omitempty"`
24568	// ProvisioningState - READ-ONLY; The provisioning state of the probe resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24569	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24570}
24571
24572// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
24573func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
24574	objectMap := make(map[string]interface{})
24575	if ppf.Protocol != "" {
24576		objectMap["protocol"] = ppf.Protocol
24577	}
24578	if ppf.Port != nil {
24579		objectMap["port"] = ppf.Port
24580	}
24581	if ppf.IntervalInSeconds != nil {
24582		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
24583	}
24584	if ppf.NumberOfProbes != nil {
24585		objectMap["numberOfProbes"] = ppf.NumberOfProbes
24586	}
24587	if ppf.RequestPath != nil {
24588		objectMap["requestPath"] = ppf.RequestPath
24589	}
24590	return json.Marshal(objectMap)
24591}
24592
24593// Profile network profile resource.
24594type Profile struct {
24595	autorest.Response `json:"-"`
24596	// ProfilePropertiesFormat - Network profile properties.
24597	*ProfilePropertiesFormat `json:"properties,omitempty"`
24598	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24599	Etag *string `json:"etag,omitempty"`
24600	// ID - Resource ID.
24601	ID *string `json:"id,omitempty"`
24602	// Name - READ-ONLY; Resource name.
24603	Name *string `json:"name,omitempty"`
24604	// Type - READ-ONLY; Resource type.
24605	Type *string `json:"type,omitempty"`
24606	// Location - Resource location.
24607	Location *string `json:"location,omitempty"`
24608	// Tags - Resource tags.
24609	Tags map[string]*string `json:"tags"`
24610}
24611
24612// MarshalJSON is the custom marshaler for Profile.
24613func (p Profile) MarshalJSON() ([]byte, error) {
24614	objectMap := make(map[string]interface{})
24615	if p.ProfilePropertiesFormat != nil {
24616		objectMap["properties"] = p.ProfilePropertiesFormat
24617	}
24618	if p.ID != nil {
24619		objectMap["id"] = p.ID
24620	}
24621	if p.Location != nil {
24622		objectMap["location"] = p.Location
24623	}
24624	if p.Tags != nil {
24625		objectMap["tags"] = p.Tags
24626	}
24627	return json.Marshal(objectMap)
24628}
24629
24630// UnmarshalJSON is the custom unmarshaler for Profile struct.
24631func (p *Profile) UnmarshalJSON(body []byte) error {
24632	var m map[string]*json.RawMessage
24633	err := json.Unmarshal(body, &m)
24634	if err != nil {
24635		return err
24636	}
24637	for k, v := range m {
24638		switch k {
24639		case "properties":
24640			if v != nil {
24641				var profilePropertiesFormat ProfilePropertiesFormat
24642				err = json.Unmarshal(*v, &profilePropertiesFormat)
24643				if err != nil {
24644					return err
24645				}
24646				p.ProfilePropertiesFormat = &profilePropertiesFormat
24647			}
24648		case "etag":
24649			if v != nil {
24650				var etag string
24651				err = json.Unmarshal(*v, &etag)
24652				if err != nil {
24653					return err
24654				}
24655				p.Etag = &etag
24656			}
24657		case "id":
24658			if v != nil {
24659				var ID string
24660				err = json.Unmarshal(*v, &ID)
24661				if err != nil {
24662					return err
24663				}
24664				p.ID = &ID
24665			}
24666		case "name":
24667			if v != nil {
24668				var name string
24669				err = json.Unmarshal(*v, &name)
24670				if err != nil {
24671					return err
24672				}
24673				p.Name = &name
24674			}
24675		case "type":
24676			if v != nil {
24677				var typeVar string
24678				err = json.Unmarshal(*v, &typeVar)
24679				if err != nil {
24680					return err
24681				}
24682				p.Type = &typeVar
24683			}
24684		case "location":
24685			if v != nil {
24686				var location string
24687				err = json.Unmarshal(*v, &location)
24688				if err != nil {
24689					return err
24690				}
24691				p.Location = &location
24692			}
24693		case "tags":
24694			if v != nil {
24695				var tags map[string]*string
24696				err = json.Unmarshal(*v, &tags)
24697				if err != nil {
24698					return err
24699				}
24700				p.Tags = tags
24701			}
24702		}
24703	}
24704
24705	return nil
24706}
24707
24708// ProfileListResult response for ListNetworkProfiles API service call.
24709type ProfileListResult struct {
24710	autorest.Response `json:"-"`
24711	// Value - A list of network profiles that exist in a resource group.
24712	Value *[]Profile `json:"value,omitempty"`
24713	// NextLink - The URL to get the next set of results.
24714	NextLink *string `json:"nextLink,omitempty"`
24715}
24716
24717// ProfileListResultIterator provides access to a complete listing of Profile values.
24718type ProfileListResultIterator struct {
24719	i    int
24720	page ProfileListResultPage
24721}
24722
24723// NextWithContext advances to the next value.  If there was an error making
24724// the request the iterator does not advance and the error is returned.
24725func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
24726	if tracing.IsEnabled() {
24727		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
24728		defer func() {
24729			sc := -1
24730			if iter.Response().Response.Response != nil {
24731				sc = iter.Response().Response.Response.StatusCode
24732			}
24733			tracing.EndSpan(ctx, sc, err)
24734		}()
24735	}
24736	iter.i++
24737	if iter.i < len(iter.page.Values()) {
24738		return nil
24739	}
24740	err = iter.page.NextWithContext(ctx)
24741	if err != nil {
24742		iter.i--
24743		return err
24744	}
24745	iter.i = 0
24746	return nil
24747}
24748
24749// Next advances to the next value.  If there was an error making
24750// the request the iterator does not advance and the error is returned.
24751// Deprecated: Use NextWithContext() instead.
24752func (iter *ProfileListResultIterator) Next() error {
24753	return iter.NextWithContext(context.Background())
24754}
24755
24756// NotDone returns true if the enumeration should be started or is not yet complete.
24757func (iter ProfileListResultIterator) NotDone() bool {
24758	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24759}
24760
24761// Response returns the raw server response from the last page request.
24762func (iter ProfileListResultIterator) Response() ProfileListResult {
24763	return iter.page.Response()
24764}
24765
24766// Value returns the current value or a zero-initialized value if the
24767// iterator has advanced beyond the end of the collection.
24768func (iter ProfileListResultIterator) Value() Profile {
24769	if !iter.page.NotDone() {
24770		return Profile{}
24771	}
24772	return iter.page.Values()[iter.i]
24773}
24774
24775// Creates a new instance of the ProfileListResultIterator type.
24776func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
24777	return ProfileListResultIterator{page: page}
24778}
24779
24780// IsEmpty returns true if the ListResult contains no values.
24781func (plr ProfileListResult) IsEmpty() bool {
24782	return plr.Value == nil || len(*plr.Value) == 0
24783}
24784
24785// hasNextLink returns true if the NextLink is not empty.
24786func (plr ProfileListResult) hasNextLink() bool {
24787	return plr.NextLink != nil && len(*plr.NextLink) != 0
24788}
24789
24790// profileListResultPreparer prepares a request to retrieve the next set of results.
24791// It returns nil if no more results exist.
24792func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
24793	if !plr.hasNextLink() {
24794		return nil, nil
24795	}
24796	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24797		autorest.AsJSON(),
24798		autorest.AsGet(),
24799		autorest.WithBaseURL(to.String(plr.NextLink)))
24800}
24801
24802// ProfileListResultPage contains a page of Profile values.
24803type ProfileListResultPage struct {
24804	fn  func(context.Context, ProfileListResult) (ProfileListResult, error)
24805	plr ProfileListResult
24806}
24807
24808// NextWithContext advances to the next page of values.  If there was an error making
24809// the request the page does not advance and the error is returned.
24810func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
24811	if tracing.IsEnabled() {
24812		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
24813		defer func() {
24814			sc := -1
24815			if page.Response().Response.Response != nil {
24816				sc = page.Response().Response.Response.StatusCode
24817			}
24818			tracing.EndSpan(ctx, sc, err)
24819		}()
24820	}
24821	for {
24822		next, err := page.fn(ctx, page.plr)
24823		if err != nil {
24824			return err
24825		}
24826		page.plr = next
24827		if !next.hasNextLink() || !next.IsEmpty() {
24828			break
24829		}
24830	}
24831	return nil
24832}
24833
24834// Next advances to the next page of values.  If there was an error making
24835// the request the page does not advance and the error is returned.
24836// Deprecated: Use NextWithContext() instead.
24837func (page *ProfileListResultPage) Next() error {
24838	return page.NextWithContext(context.Background())
24839}
24840
24841// NotDone returns true if the page enumeration should be started or is not yet complete.
24842func (page ProfileListResultPage) NotDone() bool {
24843	return !page.plr.IsEmpty()
24844}
24845
24846// Response returns the raw server response from the last page request.
24847func (page ProfileListResultPage) Response() ProfileListResult {
24848	return page.plr
24849}
24850
24851// Values returns the slice of values for the current page or nil if there are no values.
24852func (page ProfileListResultPage) Values() []Profile {
24853	if page.plr.IsEmpty() {
24854		return nil
24855	}
24856	return *page.plr.Value
24857}
24858
24859// Creates a new instance of the ProfileListResultPage type.
24860func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
24861	return ProfileListResultPage{
24862		fn:  getNextPage,
24863		plr: cur,
24864	}
24865}
24866
24867// ProfilePropertiesFormat network profile properties.
24868type ProfilePropertiesFormat struct {
24869	// ContainerNetworkInterfaces - READ-ONLY; List of child container network interfaces.
24870	ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"`
24871	// ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations.
24872	ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"`
24873	// ResourceGUID - READ-ONLY; The resource GUID property of the network profile resource.
24874	ResourceGUID *string `json:"resourceGuid,omitempty"`
24875	// ProvisioningState - READ-ONLY; The provisioning state of the network profile resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24876	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24877}
24878
24879// MarshalJSON is the custom marshaler for ProfilePropertiesFormat.
24880func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
24881	objectMap := make(map[string]interface{})
24882	if ppf.ContainerNetworkInterfaceConfigurations != nil {
24883		objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations
24884	}
24885	return json.Marshal(objectMap)
24886}
24887
24888// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
24889// operation.
24890type ProfilesDeleteFuture struct {
24891	azure.FutureAPI
24892	// Result returns the result of the asynchronous operation.
24893	// If the operation has not completed it will return an error.
24894	Result func(ProfilesClient) (autorest.Response, error)
24895}
24896
24897// ProtocolConfiguration configuration of the protocol.
24898type ProtocolConfiguration struct {
24899	// HTTPConfiguration - HTTP configuration of the connectivity check.
24900	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
24901}
24902
24903// ProtocolCustomSettingsFormat dDoS custom policy properties.
24904type ProtocolCustomSettingsFormat struct {
24905	// Protocol - The protocol for which the DDoS protection policy is being customized. Possible values include: 'DdosCustomPolicyProtocolTCP', 'DdosCustomPolicyProtocolUDP', 'DdosCustomPolicyProtocolSyn'
24906	Protocol DdosCustomPolicyProtocol `json:"protocol,omitempty"`
24907	// TriggerRateOverride - The customized DDoS protection trigger rate.
24908	TriggerRateOverride *string `json:"triggerRateOverride,omitempty"`
24909	// SourceRateOverride - The customized DDoS protection source rate.
24910	SourceRateOverride *string `json:"sourceRateOverride,omitempty"`
24911	// 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'
24912	TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"`
24913}
24914
24915// PublicIPAddress public IP address resource.
24916type PublicIPAddress struct {
24917	autorest.Response `json:"-"`
24918	// Sku - The public IP address SKU.
24919	Sku *PublicIPAddressSku `json:"sku,omitempty"`
24920	// PublicIPAddressPropertiesFormat - Public IP address properties.
24921	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
24922	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24923	Etag *string `json:"etag,omitempty"`
24924	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
24925	Zones *[]string `json:"zones,omitempty"`
24926	// ID - Resource ID.
24927	ID *string `json:"id,omitempty"`
24928	// Name - READ-ONLY; Resource name.
24929	Name *string `json:"name,omitempty"`
24930	// Type - READ-ONLY; Resource type.
24931	Type *string `json:"type,omitempty"`
24932	// Location - Resource location.
24933	Location *string `json:"location,omitempty"`
24934	// Tags - Resource tags.
24935	Tags map[string]*string `json:"tags"`
24936}
24937
24938// MarshalJSON is the custom marshaler for PublicIPAddress.
24939func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
24940	objectMap := make(map[string]interface{})
24941	if pia.Sku != nil {
24942		objectMap["sku"] = pia.Sku
24943	}
24944	if pia.PublicIPAddressPropertiesFormat != nil {
24945		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
24946	}
24947	if pia.Zones != nil {
24948		objectMap["zones"] = pia.Zones
24949	}
24950	if pia.ID != nil {
24951		objectMap["id"] = pia.ID
24952	}
24953	if pia.Location != nil {
24954		objectMap["location"] = pia.Location
24955	}
24956	if pia.Tags != nil {
24957		objectMap["tags"] = pia.Tags
24958	}
24959	return json.Marshal(objectMap)
24960}
24961
24962// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
24963func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
24964	var m map[string]*json.RawMessage
24965	err := json.Unmarshal(body, &m)
24966	if err != nil {
24967		return err
24968	}
24969	for k, v := range m {
24970		switch k {
24971		case "sku":
24972			if v != nil {
24973				var sku PublicIPAddressSku
24974				err = json.Unmarshal(*v, &sku)
24975				if err != nil {
24976					return err
24977				}
24978				pia.Sku = &sku
24979			}
24980		case "properties":
24981			if v != nil {
24982				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
24983				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
24984				if err != nil {
24985					return err
24986				}
24987				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
24988			}
24989		case "etag":
24990			if v != nil {
24991				var etag string
24992				err = json.Unmarshal(*v, &etag)
24993				if err != nil {
24994					return err
24995				}
24996				pia.Etag = &etag
24997			}
24998		case "zones":
24999			if v != nil {
25000				var zones []string
25001				err = json.Unmarshal(*v, &zones)
25002				if err != nil {
25003					return err
25004				}
25005				pia.Zones = &zones
25006			}
25007		case "id":
25008			if v != nil {
25009				var ID string
25010				err = json.Unmarshal(*v, &ID)
25011				if err != nil {
25012					return err
25013				}
25014				pia.ID = &ID
25015			}
25016		case "name":
25017			if v != nil {
25018				var name string
25019				err = json.Unmarshal(*v, &name)
25020				if err != nil {
25021					return err
25022				}
25023				pia.Name = &name
25024			}
25025		case "type":
25026			if v != nil {
25027				var typeVar string
25028				err = json.Unmarshal(*v, &typeVar)
25029				if err != nil {
25030					return err
25031				}
25032				pia.Type = &typeVar
25033			}
25034		case "location":
25035			if v != nil {
25036				var location string
25037				err = json.Unmarshal(*v, &location)
25038				if err != nil {
25039					return err
25040				}
25041				pia.Location = &location
25042			}
25043		case "tags":
25044			if v != nil {
25045				var tags map[string]*string
25046				err = json.Unmarshal(*v, &tags)
25047				if err != nil {
25048					return err
25049				}
25050				pia.Tags = tags
25051			}
25052		}
25053	}
25054
25055	return nil
25056}
25057
25058// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address.
25059type PublicIPAddressDNSSettings struct {
25060	// 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.
25061	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
25062	// 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.
25063	Fqdn *string `json:"fqdn,omitempty"`
25064	// 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.
25065	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
25066}
25067
25068// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25069// long-running operation.
25070type PublicIPAddressesCreateOrUpdateFuture struct {
25071	azure.FutureAPI
25072	// Result returns the result of the asynchronous operation.
25073	// If the operation has not completed it will return an error.
25074	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
25075}
25076
25077// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25078// operation.
25079type PublicIPAddressesDeleteFuture struct {
25080	azure.FutureAPI
25081	// Result returns the result of the asynchronous operation.
25082	// If the operation has not completed it will return an error.
25083	Result func(PublicIPAddressesClient) (autorest.Response, error)
25084}
25085
25086// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
25087type PublicIPAddressListResult struct {
25088	autorest.Response `json:"-"`
25089	// Value - A list of public IP addresses that exists in a resource group.
25090	Value *[]PublicIPAddress `json:"value,omitempty"`
25091	// NextLink - The URL to get the next set of results.
25092	NextLink *string `json:"nextLink,omitempty"`
25093}
25094
25095// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
25096type PublicIPAddressListResultIterator struct {
25097	i    int
25098	page PublicIPAddressListResultPage
25099}
25100
25101// NextWithContext advances to the next value.  If there was an error making
25102// the request the iterator does not advance and the error is returned.
25103func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
25104	if tracing.IsEnabled() {
25105		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
25106		defer func() {
25107			sc := -1
25108			if iter.Response().Response.Response != nil {
25109				sc = iter.Response().Response.Response.StatusCode
25110			}
25111			tracing.EndSpan(ctx, sc, err)
25112		}()
25113	}
25114	iter.i++
25115	if iter.i < len(iter.page.Values()) {
25116		return nil
25117	}
25118	err = iter.page.NextWithContext(ctx)
25119	if err != nil {
25120		iter.i--
25121		return err
25122	}
25123	iter.i = 0
25124	return nil
25125}
25126
25127// Next advances to the next value.  If there was an error making
25128// the request the iterator does not advance and the error is returned.
25129// Deprecated: Use NextWithContext() instead.
25130func (iter *PublicIPAddressListResultIterator) Next() error {
25131	return iter.NextWithContext(context.Background())
25132}
25133
25134// NotDone returns true if the enumeration should be started or is not yet complete.
25135func (iter PublicIPAddressListResultIterator) NotDone() bool {
25136	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25137}
25138
25139// Response returns the raw server response from the last page request.
25140func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
25141	return iter.page.Response()
25142}
25143
25144// Value returns the current value or a zero-initialized value if the
25145// iterator has advanced beyond the end of the collection.
25146func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
25147	if !iter.page.NotDone() {
25148		return PublicIPAddress{}
25149	}
25150	return iter.page.Values()[iter.i]
25151}
25152
25153// Creates a new instance of the PublicIPAddressListResultIterator type.
25154func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
25155	return PublicIPAddressListResultIterator{page: page}
25156}
25157
25158// IsEmpty returns true if the ListResult contains no values.
25159func (pialr PublicIPAddressListResult) IsEmpty() bool {
25160	return pialr.Value == nil || len(*pialr.Value) == 0
25161}
25162
25163// hasNextLink returns true if the NextLink is not empty.
25164func (pialr PublicIPAddressListResult) hasNextLink() bool {
25165	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
25166}
25167
25168// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
25169// It returns nil if no more results exist.
25170func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
25171	if !pialr.hasNextLink() {
25172		return nil, nil
25173	}
25174	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25175		autorest.AsJSON(),
25176		autorest.AsGet(),
25177		autorest.WithBaseURL(to.String(pialr.NextLink)))
25178}
25179
25180// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
25181type PublicIPAddressListResultPage struct {
25182	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
25183	pialr PublicIPAddressListResult
25184}
25185
25186// NextWithContext advances to the next page of values.  If there was an error making
25187// the request the page does not advance and the error is returned.
25188func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
25189	if tracing.IsEnabled() {
25190		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
25191		defer func() {
25192			sc := -1
25193			if page.Response().Response.Response != nil {
25194				sc = page.Response().Response.Response.StatusCode
25195			}
25196			tracing.EndSpan(ctx, sc, err)
25197		}()
25198	}
25199	for {
25200		next, err := page.fn(ctx, page.pialr)
25201		if err != nil {
25202			return err
25203		}
25204		page.pialr = next
25205		if !next.hasNextLink() || !next.IsEmpty() {
25206			break
25207		}
25208	}
25209	return nil
25210}
25211
25212// Next advances to the next page of values.  If there was an error making
25213// the request the page does not advance and the error is returned.
25214// Deprecated: Use NextWithContext() instead.
25215func (page *PublicIPAddressListResultPage) Next() error {
25216	return page.NextWithContext(context.Background())
25217}
25218
25219// NotDone returns true if the page enumeration should be started or is not yet complete.
25220func (page PublicIPAddressListResultPage) NotDone() bool {
25221	return !page.pialr.IsEmpty()
25222}
25223
25224// Response returns the raw server response from the last page request.
25225func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
25226	return page.pialr
25227}
25228
25229// Values returns the slice of values for the current page or nil if there are no values.
25230func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
25231	if page.pialr.IsEmpty() {
25232		return nil
25233	}
25234	return *page.pialr.Value
25235}
25236
25237// Creates a new instance of the PublicIPAddressListResultPage type.
25238func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
25239	return PublicIPAddressListResultPage{
25240		fn:    getNextPage,
25241		pialr: cur,
25242	}
25243}
25244
25245// PublicIPAddressPropertiesFormat public IP address properties.
25246type PublicIPAddressPropertiesFormat struct {
25247	// PublicIPAllocationMethod - The public IP address allocation method. Possible values include: 'Static', 'Dynamic'
25248	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
25249	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
25250	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
25251	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
25252	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
25253	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
25254	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
25255	// DdosSettings - The DDoS protection custom policy associated with the public IP address.
25256	DdosSettings *DdosSettings `json:"ddosSettings,omitempty"`
25257	// IPTags - The list of tags associated with the public IP address.
25258	IPTags *[]IPTag `json:"ipTags,omitempty"`
25259	// IPAddress - The IP address associated with the public IP address resource.
25260	IPAddress *string `json:"ipAddress,omitempty"`
25261	// PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from.
25262	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
25263	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
25264	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
25265	// ResourceGUID - READ-ONLY; The resource GUID property of the public IP address resource.
25266	ResourceGUID *string `json:"resourceGuid,omitempty"`
25267	// ProvisioningState - READ-ONLY; The provisioning state of the public IP address resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25268	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25269}
25270
25271// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
25272func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
25273	objectMap := make(map[string]interface{})
25274	if piapf.PublicIPAllocationMethod != "" {
25275		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
25276	}
25277	if piapf.PublicIPAddressVersion != "" {
25278		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
25279	}
25280	if piapf.DNSSettings != nil {
25281		objectMap["dnsSettings"] = piapf.DNSSettings
25282	}
25283	if piapf.DdosSettings != nil {
25284		objectMap["ddosSettings"] = piapf.DdosSettings
25285	}
25286	if piapf.IPTags != nil {
25287		objectMap["ipTags"] = piapf.IPTags
25288	}
25289	if piapf.IPAddress != nil {
25290		objectMap["ipAddress"] = piapf.IPAddress
25291	}
25292	if piapf.PublicIPPrefix != nil {
25293		objectMap["publicIPPrefix"] = piapf.PublicIPPrefix
25294	}
25295	if piapf.IdleTimeoutInMinutes != nil {
25296		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
25297	}
25298	return json.Marshal(objectMap)
25299}
25300
25301// PublicIPAddressSku SKU of a public IP address.
25302type PublicIPAddressSku struct {
25303	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
25304	Name PublicIPAddressSkuName `json:"name,omitempty"`
25305}
25306
25307// PublicIPPrefix public IP prefix resource.
25308type PublicIPPrefix struct {
25309	autorest.Response `json:"-"`
25310	// Sku - The public IP prefix SKU.
25311	Sku *PublicIPPrefixSku `json:"sku,omitempty"`
25312	// PublicIPPrefixPropertiesFormat - Public IP prefix properties.
25313	*PublicIPPrefixPropertiesFormat `json:"properties,omitempty"`
25314	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
25315	Etag *string `json:"etag,omitempty"`
25316	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
25317	Zones *[]string `json:"zones,omitempty"`
25318	// ID - Resource ID.
25319	ID *string `json:"id,omitempty"`
25320	// Name - READ-ONLY; Resource name.
25321	Name *string `json:"name,omitempty"`
25322	// Type - READ-ONLY; Resource type.
25323	Type *string `json:"type,omitempty"`
25324	// Location - Resource location.
25325	Location *string `json:"location,omitempty"`
25326	// Tags - Resource tags.
25327	Tags map[string]*string `json:"tags"`
25328}
25329
25330// MarshalJSON is the custom marshaler for PublicIPPrefix.
25331func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) {
25332	objectMap := make(map[string]interface{})
25333	if pip.Sku != nil {
25334		objectMap["sku"] = pip.Sku
25335	}
25336	if pip.PublicIPPrefixPropertiesFormat != nil {
25337		objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat
25338	}
25339	if pip.Zones != nil {
25340		objectMap["zones"] = pip.Zones
25341	}
25342	if pip.ID != nil {
25343		objectMap["id"] = pip.ID
25344	}
25345	if pip.Location != nil {
25346		objectMap["location"] = pip.Location
25347	}
25348	if pip.Tags != nil {
25349		objectMap["tags"] = pip.Tags
25350	}
25351	return json.Marshal(objectMap)
25352}
25353
25354// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct.
25355func (pip *PublicIPPrefix) UnmarshalJSON(body []byte) error {
25356	var m map[string]*json.RawMessage
25357	err := json.Unmarshal(body, &m)
25358	if err != nil {
25359		return err
25360	}
25361	for k, v := range m {
25362		switch k {
25363		case "sku":
25364			if v != nil {
25365				var sku PublicIPPrefixSku
25366				err = json.Unmarshal(*v, &sku)
25367				if err != nil {
25368					return err
25369				}
25370				pip.Sku = &sku
25371			}
25372		case "properties":
25373			if v != nil {
25374				var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat
25375				err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat)
25376				if err != nil {
25377					return err
25378				}
25379				pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat
25380			}
25381		case "etag":
25382			if v != nil {
25383				var etag string
25384				err = json.Unmarshal(*v, &etag)
25385				if err != nil {
25386					return err
25387				}
25388				pip.Etag = &etag
25389			}
25390		case "zones":
25391			if v != nil {
25392				var zones []string
25393				err = json.Unmarshal(*v, &zones)
25394				if err != nil {
25395					return err
25396				}
25397				pip.Zones = &zones
25398			}
25399		case "id":
25400			if v != nil {
25401				var ID string
25402				err = json.Unmarshal(*v, &ID)
25403				if err != nil {
25404					return err
25405				}
25406				pip.ID = &ID
25407			}
25408		case "name":
25409			if v != nil {
25410				var name string
25411				err = json.Unmarshal(*v, &name)
25412				if err != nil {
25413					return err
25414				}
25415				pip.Name = &name
25416			}
25417		case "type":
25418			if v != nil {
25419				var typeVar string
25420				err = json.Unmarshal(*v, &typeVar)
25421				if err != nil {
25422					return err
25423				}
25424				pip.Type = &typeVar
25425			}
25426		case "location":
25427			if v != nil {
25428				var location string
25429				err = json.Unmarshal(*v, &location)
25430				if err != nil {
25431					return err
25432				}
25433				pip.Location = &location
25434			}
25435		case "tags":
25436			if v != nil {
25437				var tags map[string]*string
25438				err = json.Unmarshal(*v, &tags)
25439				if err != nil {
25440					return err
25441				}
25442				pip.Tags = tags
25443			}
25444		}
25445	}
25446
25447	return nil
25448}
25449
25450// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25451// long-running operation.
25452type PublicIPPrefixesCreateOrUpdateFuture struct {
25453	azure.FutureAPI
25454	// Result returns the result of the asynchronous operation.
25455	// If the operation has not completed it will return an error.
25456	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
25457}
25458
25459// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25460// operation.
25461type PublicIPPrefixesDeleteFuture struct {
25462	azure.FutureAPI
25463	// Result returns the result of the asynchronous operation.
25464	// If the operation has not completed it will return an error.
25465	Result func(PublicIPPrefixesClient) (autorest.Response, error)
25466}
25467
25468// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
25469type PublicIPPrefixListResult struct {
25470	autorest.Response `json:"-"`
25471	// Value - A list of public IP prefixes that exists in a resource group.
25472	Value *[]PublicIPPrefix `json:"value,omitempty"`
25473	// NextLink - The URL to get the next set of results.
25474	NextLink *string `json:"nextLink,omitempty"`
25475}
25476
25477// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values.
25478type PublicIPPrefixListResultIterator struct {
25479	i    int
25480	page PublicIPPrefixListResultPage
25481}
25482
25483// NextWithContext advances to the next value.  If there was an error making
25484// the request the iterator does not advance and the error is returned.
25485func (iter *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
25486	if tracing.IsEnabled() {
25487		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.NextWithContext")
25488		defer func() {
25489			sc := -1
25490			if iter.Response().Response.Response != nil {
25491				sc = iter.Response().Response.Response.StatusCode
25492			}
25493			tracing.EndSpan(ctx, sc, err)
25494		}()
25495	}
25496	iter.i++
25497	if iter.i < len(iter.page.Values()) {
25498		return nil
25499	}
25500	err = iter.page.NextWithContext(ctx)
25501	if err != nil {
25502		iter.i--
25503		return err
25504	}
25505	iter.i = 0
25506	return nil
25507}
25508
25509// Next advances to the next value.  If there was an error making
25510// the request the iterator does not advance and the error is returned.
25511// Deprecated: Use NextWithContext() instead.
25512func (iter *PublicIPPrefixListResultIterator) Next() error {
25513	return iter.NextWithContext(context.Background())
25514}
25515
25516// NotDone returns true if the enumeration should be started or is not yet complete.
25517func (iter PublicIPPrefixListResultIterator) NotDone() bool {
25518	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25519}
25520
25521// Response returns the raw server response from the last page request.
25522func (iter PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult {
25523	return iter.page.Response()
25524}
25525
25526// Value returns the current value or a zero-initialized value if the
25527// iterator has advanced beyond the end of the collection.
25528func (iter PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
25529	if !iter.page.NotDone() {
25530		return PublicIPPrefix{}
25531	}
25532	return iter.page.Values()[iter.i]
25533}
25534
25535// Creates a new instance of the PublicIPPrefixListResultIterator type.
25536func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
25537	return PublicIPPrefixListResultIterator{page: page}
25538}
25539
25540// IsEmpty returns true if the ListResult contains no values.
25541func (piplr PublicIPPrefixListResult) IsEmpty() bool {
25542	return piplr.Value == nil || len(*piplr.Value) == 0
25543}
25544
25545// hasNextLink returns true if the NextLink is not empty.
25546func (piplr PublicIPPrefixListResult) hasNextLink() bool {
25547	return piplr.NextLink != nil && len(*piplr.NextLink) != 0
25548}
25549
25550// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
25551// It returns nil if no more results exist.
25552func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
25553	if !piplr.hasNextLink() {
25554		return nil, nil
25555	}
25556	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25557		autorest.AsJSON(),
25558		autorest.AsGet(),
25559		autorest.WithBaseURL(to.String(piplr.NextLink)))
25560}
25561
25562// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
25563type PublicIPPrefixListResultPage struct {
25564	fn    func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
25565	piplr PublicIPPrefixListResult
25566}
25567
25568// NextWithContext advances to the next page of values.  If there was an error making
25569// the request the page does not advance and the error is returned.
25570func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
25571	if tracing.IsEnabled() {
25572		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext")
25573		defer func() {
25574			sc := -1
25575			if page.Response().Response.Response != nil {
25576				sc = page.Response().Response.Response.StatusCode
25577			}
25578			tracing.EndSpan(ctx, sc, err)
25579		}()
25580	}
25581	for {
25582		next, err := page.fn(ctx, page.piplr)
25583		if err != nil {
25584			return err
25585		}
25586		page.piplr = next
25587		if !next.hasNextLink() || !next.IsEmpty() {
25588			break
25589		}
25590	}
25591	return nil
25592}
25593
25594// Next advances to the next page of values.  If there was an error making
25595// the request the page does not advance and the error is returned.
25596// Deprecated: Use NextWithContext() instead.
25597func (page *PublicIPPrefixListResultPage) Next() error {
25598	return page.NextWithContext(context.Background())
25599}
25600
25601// NotDone returns true if the page enumeration should be started or is not yet complete.
25602func (page PublicIPPrefixListResultPage) NotDone() bool {
25603	return !page.piplr.IsEmpty()
25604}
25605
25606// Response returns the raw server response from the last page request.
25607func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult {
25608	return page.piplr
25609}
25610
25611// Values returns the slice of values for the current page or nil if there are no values.
25612func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
25613	if page.piplr.IsEmpty() {
25614		return nil
25615	}
25616	return *page.piplr.Value
25617}
25618
25619// Creates a new instance of the PublicIPPrefixListResultPage type.
25620func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
25621	return PublicIPPrefixListResultPage{
25622		fn:    getNextPage,
25623		piplr: cur,
25624	}
25625}
25626
25627// PublicIPPrefixPropertiesFormat public IP prefix properties.
25628type PublicIPPrefixPropertiesFormat struct {
25629	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
25630	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
25631	// IPTags - The list of tags associated with the public IP prefix.
25632	IPTags *[]IPTag `json:"ipTags,omitempty"`
25633	// PrefixLength - The Length of the Public IP Prefix.
25634	PrefixLength *int32 `json:"prefixLength,omitempty"`
25635	// IPPrefix - READ-ONLY; The allocated Prefix.
25636	IPPrefix *string `json:"ipPrefix,omitempty"`
25637	// PublicIPAddresses - READ-ONLY; The list of all referenced PublicIPAddresses.
25638	PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"`
25639	// LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix.
25640	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"`
25641	// ResourceGUID - READ-ONLY; The resource GUID property of the public IP prefix resource.
25642	ResourceGUID *string `json:"resourceGuid,omitempty"`
25643	// ProvisioningState - READ-ONLY; The provisioning state of the public IP prefix resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25644	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25645}
25646
25647// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat.
25648func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
25649	objectMap := make(map[string]interface{})
25650	if pippf.PublicIPAddressVersion != "" {
25651		objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion
25652	}
25653	if pippf.IPTags != nil {
25654		objectMap["ipTags"] = pippf.IPTags
25655	}
25656	if pippf.PrefixLength != nil {
25657		objectMap["prefixLength"] = pippf.PrefixLength
25658	}
25659	return json.Marshal(objectMap)
25660}
25661
25662// PublicIPPrefixSku SKU of a public IP prefix.
25663type PublicIPPrefixSku struct {
25664	// Name - Name of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuNameStandard'
25665	Name PublicIPPrefixSkuName `json:"name,omitempty"`
25666}
25667
25668// PutBastionShareableLinkAllFuture an abstraction for monitoring and retrieving the results of a
25669// long-running operation.
25670type PutBastionShareableLinkAllFuture struct {
25671	azure.FutureAPI
25672	// Result returns the result of the asynchronous operation.
25673	// If the operation has not completed it will return an error.
25674	Result func(BaseClient) (BastionShareableLinkListResultPage, error)
25675}
25676
25677// PutBastionShareableLinkFuture an abstraction for monitoring and retrieving the results of a long-running
25678// operation.
25679type PutBastionShareableLinkFuture struct {
25680	azure.FutureAPI
25681	// Result returns the result of the asynchronous operation.
25682	// If the operation has not completed it will return an error.
25683	Result func(BaseClient) (BastionShareableLinkListResultPage, error)
25684}
25685
25686// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
25687type QueryTroubleshootingParameters struct {
25688	// TargetResourceID - The target resource ID to query the troubleshooting result.
25689	TargetResourceID *string `json:"targetResourceId,omitempty"`
25690}
25691
25692// RadiusServer radius Server Settings.
25693type RadiusServer struct {
25694	// RadiusServerAddress - The address of this radius server.
25695	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
25696	// RadiusServerScore - The initial score assigned to this radius server.
25697	RadiusServerScore *int64 `json:"radiusServerScore,omitempty"`
25698	// RadiusServerSecret - The secret used for this radius server.
25699	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
25700}
25701
25702// RecordSet a collective group of information about the record set information.
25703type RecordSet struct {
25704	// RecordType - Resource record type.
25705	RecordType *string `json:"recordType,omitempty"`
25706	// RecordSetName - Recordset name.
25707	RecordSetName *string `json:"recordSetName,omitempty"`
25708	// Fqdn - Fqdn that resolves to private endpoint ip address.
25709	Fqdn *string `json:"fqdn,omitempty"`
25710	// ProvisioningState - READ-ONLY; The provisioning state of the recordset. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25711	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25712	// TTL - Recordset time to live.
25713	TTL *int32 `json:"ttl,omitempty"`
25714	// IPAddresses - The private ip address of the private endpoint.
25715	IPAddresses *[]string `json:"ipAddresses,omitempty"`
25716}
25717
25718// MarshalJSON is the custom marshaler for RecordSet.
25719func (rs RecordSet) MarshalJSON() ([]byte, error) {
25720	objectMap := make(map[string]interface{})
25721	if rs.RecordType != nil {
25722		objectMap["recordType"] = rs.RecordType
25723	}
25724	if rs.RecordSetName != nil {
25725		objectMap["recordSetName"] = rs.RecordSetName
25726	}
25727	if rs.Fqdn != nil {
25728		objectMap["fqdn"] = rs.Fqdn
25729	}
25730	if rs.TTL != nil {
25731		objectMap["ttl"] = rs.TTL
25732	}
25733	if rs.IPAddresses != nil {
25734		objectMap["ipAddresses"] = rs.IPAddresses
25735	}
25736	return json.Marshal(objectMap)
25737}
25738
25739// ReferencedPublicIPAddress reference to a public IP address.
25740type ReferencedPublicIPAddress struct {
25741	// ID - The PublicIPAddress Reference.
25742	ID *string `json:"id,omitempty"`
25743}
25744
25745// Resource common resource representation.
25746type Resource struct {
25747	// ID - Resource ID.
25748	ID *string `json:"id,omitempty"`
25749	// Name - READ-ONLY; Resource name.
25750	Name *string `json:"name,omitempty"`
25751	// Type - READ-ONLY; Resource type.
25752	Type *string `json:"type,omitempty"`
25753	// Location - Resource location.
25754	Location *string `json:"location,omitempty"`
25755	// Tags - Resource tags.
25756	Tags map[string]*string `json:"tags"`
25757}
25758
25759// MarshalJSON is the custom marshaler for Resource.
25760func (r Resource) MarshalJSON() ([]byte, error) {
25761	objectMap := make(map[string]interface{})
25762	if r.ID != nil {
25763		objectMap["id"] = r.ID
25764	}
25765	if r.Location != nil {
25766		objectMap["location"] = r.Location
25767	}
25768	if r.Tags != nil {
25769		objectMap["tags"] = r.Tags
25770	}
25771	return json.Marshal(objectMap)
25772}
25773
25774// ResourceNavigationLink resourceNavigationLink resource.
25775type ResourceNavigationLink struct {
25776	// ResourceNavigationLinkFormat - Resource navigation link properties format.
25777	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
25778	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
25779	Name *string `json:"name,omitempty"`
25780	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
25781	Etag *string `json:"etag,omitempty"`
25782	// Type - READ-ONLY; Resource type.
25783	Type *string `json:"type,omitempty"`
25784	// ID - Resource ID.
25785	ID *string `json:"id,omitempty"`
25786}
25787
25788// MarshalJSON is the custom marshaler for ResourceNavigationLink.
25789func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
25790	objectMap := make(map[string]interface{})
25791	if rnl.ResourceNavigationLinkFormat != nil {
25792		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
25793	}
25794	if rnl.Name != nil {
25795		objectMap["name"] = rnl.Name
25796	}
25797	if rnl.ID != nil {
25798		objectMap["id"] = rnl.ID
25799	}
25800	return json.Marshal(objectMap)
25801}
25802
25803// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
25804func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
25805	var m map[string]*json.RawMessage
25806	err := json.Unmarshal(body, &m)
25807	if err != nil {
25808		return err
25809	}
25810	for k, v := range m {
25811		switch k {
25812		case "properties":
25813			if v != nil {
25814				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
25815				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
25816				if err != nil {
25817					return err
25818				}
25819				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
25820			}
25821		case "name":
25822			if v != nil {
25823				var name string
25824				err = json.Unmarshal(*v, &name)
25825				if err != nil {
25826					return err
25827				}
25828				rnl.Name = &name
25829			}
25830		case "etag":
25831			if v != nil {
25832				var etag string
25833				err = json.Unmarshal(*v, &etag)
25834				if err != nil {
25835					return err
25836				}
25837				rnl.Etag = &etag
25838			}
25839		case "type":
25840			if v != nil {
25841				var typeVar string
25842				err = json.Unmarshal(*v, &typeVar)
25843				if err != nil {
25844					return err
25845				}
25846				rnl.Type = &typeVar
25847			}
25848		case "id":
25849			if v != nil {
25850				var ID string
25851				err = json.Unmarshal(*v, &ID)
25852				if err != nil {
25853					return err
25854				}
25855				rnl.ID = &ID
25856			}
25857		}
25858	}
25859
25860	return nil
25861}
25862
25863// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
25864type ResourceNavigationLinkFormat struct {
25865	// LinkedResourceType - Resource type of the linked resource.
25866	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
25867	// Link - Link to the external resource.
25868	Link *string `json:"link,omitempty"`
25869	// ProvisioningState - READ-ONLY; The provisioning state of the resource navigation link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25870	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25871}
25872
25873// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
25874func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
25875	objectMap := make(map[string]interface{})
25876	if rnlf.LinkedResourceType != nil {
25877		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
25878	}
25879	if rnlf.Link != nil {
25880		objectMap["link"] = rnlf.Link
25881	}
25882	return json.Marshal(objectMap)
25883}
25884
25885// ResourceNavigationLinksListResult response for ResourceNavigationLinks_List operation.
25886type ResourceNavigationLinksListResult struct {
25887	autorest.Response `json:"-"`
25888	// Value - The resource navigation links in a subnet.
25889	Value *[]ResourceNavigationLink `json:"value,omitempty"`
25890	// NextLink - READ-ONLY; The URL to get the next set of results.
25891	NextLink *string `json:"nextLink,omitempty"`
25892}
25893
25894// MarshalJSON is the custom marshaler for ResourceNavigationLinksListResult.
25895func (rnllr ResourceNavigationLinksListResult) MarshalJSON() ([]byte, error) {
25896	objectMap := make(map[string]interface{})
25897	if rnllr.Value != nil {
25898		objectMap["value"] = rnllr.Value
25899	}
25900	return json.Marshal(objectMap)
25901}
25902
25903// ResourceSet the base resource set for visibility and auto-approval.
25904type ResourceSet struct {
25905	// Subscriptions - The list of subscriptions.
25906	Subscriptions *[]string `json:"subscriptions,omitempty"`
25907}
25908
25909// RetentionPolicyParameters parameters that define the retention policy for flow log.
25910type RetentionPolicyParameters struct {
25911	// Days - Number of days to retain flow log records.
25912	Days *int32 `json:"days,omitempty"`
25913	// Enabled - Flag to enable/disable retention.
25914	Enabled *bool `json:"enabled,omitempty"`
25915}
25916
25917// Route route resource.
25918type Route struct {
25919	autorest.Response `json:"-"`
25920	// RoutePropertiesFormat - Properties of the route.
25921	*RoutePropertiesFormat `json:"properties,omitempty"`
25922	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
25923	Name *string `json:"name,omitempty"`
25924	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
25925	Etag *string `json:"etag,omitempty"`
25926	// ID - Resource ID.
25927	ID *string `json:"id,omitempty"`
25928}
25929
25930// MarshalJSON is the custom marshaler for Route.
25931func (r Route) MarshalJSON() ([]byte, error) {
25932	objectMap := make(map[string]interface{})
25933	if r.RoutePropertiesFormat != nil {
25934		objectMap["properties"] = r.RoutePropertiesFormat
25935	}
25936	if r.Name != nil {
25937		objectMap["name"] = r.Name
25938	}
25939	if r.ID != nil {
25940		objectMap["id"] = r.ID
25941	}
25942	return json.Marshal(objectMap)
25943}
25944
25945// UnmarshalJSON is the custom unmarshaler for Route struct.
25946func (r *Route) UnmarshalJSON(body []byte) error {
25947	var m map[string]*json.RawMessage
25948	err := json.Unmarshal(body, &m)
25949	if err != nil {
25950		return err
25951	}
25952	for k, v := range m {
25953		switch k {
25954		case "properties":
25955			if v != nil {
25956				var routePropertiesFormat RoutePropertiesFormat
25957				err = json.Unmarshal(*v, &routePropertiesFormat)
25958				if err != nil {
25959					return err
25960				}
25961				r.RoutePropertiesFormat = &routePropertiesFormat
25962			}
25963		case "name":
25964			if v != nil {
25965				var name string
25966				err = json.Unmarshal(*v, &name)
25967				if err != nil {
25968					return err
25969				}
25970				r.Name = &name
25971			}
25972		case "etag":
25973			if v != nil {
25974				var etag string
25975				err = json.Unmarshal(*v, &etag)
25976				if err != nil {
25977					return err
25978				}
25979				r.Etag = &etag
25980			}
25981		case "id":
25982			if v != nil {
25983				var ID string
25984				err = json.Unmarshal(*v, &ID)
25985				if err != nil {
25986					return err
25987				}
25988				r.ID = &ID
25989			}
25990		}
25991	}
25992
25993	return nil
25994}
25995
25996// RouteFilter route Filter Resource.
25997type RouteFilter struct {
25998	autorest.Response `json:"-"`
25999	// RouteFilterPropertiesFormat - Properties of the route filter.
26000	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
26001	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26002	Etag *string `json:"etag,omitempty"`
26003	// ID - Resource ID.
26004	ID *string `json:"id,omitempty"`
26005	// Name - READ-ONLY; Resource name.
26006	Name *string `json:"name,omitempty"`
26007	// Type - READ-ONLY; Resource type.
26008	Type *string `json:"type,omitempty"`
26009	// Location - Resource location.
26010	Location *string `json:"location,omitempty"`
26011	// Tags - Resource tags.
26012	Tags map[string]*string `json:"tags"`
26013}
26014
26015// MarshalJSON is the custom marshaler for RouteFilter.
26016func (rf RouteFilter) MarshalJSON() ([]byte, error) {
26017	objectMap := make(map[string]interface{})
26018	if rf.RouteFilterPropertiesFormat != nil {
26019		objectMap["properties"] = rf.RouteFilterPropertiesFormat
26020	}
26021	if rf.ID != nil {
26022		objectMap["id"] = rf.ID
26023	}
26024	if rf.Location != nil {
26025		objectMap["location"] = rf.Location
26026	}
26027	if rf.Tags != nil {
26028		objectMap["tags"] = rf.Tags
26029	}
26030	return json.Marshal(objectMap)
26031}
26032
26033// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
26034func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
26035	var m map[string]*json.RawMessage
26036	err := json.Unmarshal(body, &m)
26037	if err != nil {
26038		return err
26039	}
26040	for k, v := range m {
26041		switch k {
26042		case "properties":
26043			if v != nil {
26044				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
26045				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
26046				if err != nil {
26047					return err
26048				}
26049				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
26050			}
26051		case "etag":
26052			if v != nil {
26053				var etag string
26054				err = json.Unmarshal(*v, &etag)
26055				if err != nil {
26056					return err
26057				}
26058				rf.Etag = &etag
26059			}
26060		case "id":
26061			if v != nil {
26062				var ID string
26063				err = json.Unmarshal(*v, &ID)
26064				if err != nil {
26065					return err
26066				}
26067				rf.ID = &ID
26068			}
26069		case "name":
26070			if v != nil {
26071				var name string
26072				err = json.Unmarshal(*v, &name)
26073				if err != nil {
26074					return err
26075				}
26076				rf.Name = &name
26077			}
26078		case "type":
26079			if v != nil {
26080				var typeVar string
26081				err = json.Unmarshal(*v, &typeVar)
26082				if err != nil {
26083					return err
26084				}
26085				rf.Type = &typeVar
26086			}
26087		case "location":
26088			if v != nil {
26089				var location string
26090				err = json.Unmarshal(*v, &location)
26091				if err != nil {
26092					return err
26093				}
26094				rf.Location = &location
26095			}
26096		case "tags":
26097			if v != nil {
26098				var tags map[string]*string
26099				err = json.Unmarshal(*v, &tags)
26100				if err != nil {
26101					return err
26102				}
26103				rf.Tags = tags
26104			}
26105		}
26106	}
26107
26108	return nil
26109}
26110
26111// RouteFilterListResult response for the ListRouteFilters API service call.
26112type RouteFilterListResult struct {
26113	autorest.Response `json:"-"`
26114	// Value - A list of route filters in a resource group.
26115	Value *[]RouteFilter `json:"value,omitempty"`
26116	// NextLink - The URL to get the next set of results.
26117	NextLink *string `json:"nextLink,omitempty"`
26118}
26119
26120// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
26121type RouteFilterListResultIterator struct {
26122	i    int
26123	page RouteFilterListResultPage
26124}
26125
26126// NextWithContext advances to the next value.  If there was an error making
26127// the request the iterator does not advance and the error is returned.
26128func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
26129	if tracing.IsEnabled() {
26130		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
26131		defer func() {
26132			sc := -1
26133			if iter.Response().Response.Response != nil {
26134				sc = iter.Response().Response.Response.StatusCode
26135			}
26136			tracing.EndSpan(ctx, sc, err)
26137		}()
26138	}
26139	iter.i++
26140	if iter.i < len(iter.page.Values()) {
26141		return nil
26142	}
26143	err = iter.page.NextWithContext(ctx)
26144	if err != nil {
26145		iter.i--
26146		return err
26147	}
26148	iter.i = 0
26149	return nil
26150}
26151
26152// Next advances to the next value.  If there was an error making
26153// the request the iterator does not advance and the error is returned.
26154// Deprecated: Use NextWithContext() instead.
26155func (iter *RouteFilterListResultIterator) Next() error {
26156	return iter.NextWithContext(context.Background())
26157}
26158
26159// NotDone returns true if the enumeration should be started or is not yet complete.
26160func (iter RouteFilterListResultIterator) NotDone() bool {
26161	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26162}
26163
26164// Response returns the raw server response from the last page request.
26165func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
26166	return iter.page.Response()
26167}
26168
26169// Value returns the current value or a zero-initialized value if the
26170// iterator has advanced beyond the end of the collection.
26171func (iter RouteFilterListResultIterator) Value() RouteFilter {
26172	if !iter.page.NotDone() {
26173		return RouteFilter{}
26174	}
26175	return iter.page.Values()[iter.i]
26176}
26177
26178// Creates a new instance of the RouteFilterListResultIterator type.
26179func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
26180	return RouteFilterListResultIterator{page: page}
26181}
26182
26183// IsEmpty returns true if the ListResult contains no values.
26184func (rflr RouteFilterListResult) IsEmpty() bool {
26185	return rflr.Value == nil || len(*rflr.Value) == 0
26186}
26187
26188// hasNextLink returns true if the NextLink is not empty.
26189func (rflr RouteFilterListResult) hasNextLink() bool {
26190	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
26191}
26192
26193// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
26194// It returns nil if no more results exist.
26195func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
26196	if !rflr.hasNextLink() {
26197		return nil, nil
26198	}
26199	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26200		autorest.AsJSON(),
26201		autorest.AsGet(),
26202		autorest.WithBaseURL(to.String(rflr.NextLink)))
26203}
26204
26205// RouteFilterListResultPage contains a page of RouteFilter values.
26206type RouteFilterListResultPage struct {
26207	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
26208	rflr RouteFilterListResult
26209}
26210
26211// NextWithContext advances to the next page of values.  If there was an error making
26212// the request the page does not advance and the error is returned.
26213func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
26214	if tracing.IsEnabled() {
26215		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
26216		defer func() {
26217			sc := -1
26218			if page.Response().Response.Response != nil {
26219				sc = page.Response().Response.Response.StatusCode
26220			}
26221			tracing.EndSpan(ctx, sc, err)
26222		}()
26223	}
26224	for {
26225		next, err := page.fn(ctx, page.rflr)
26226		if err != nil {
26227			return err
26228		}
26229		page.rflr = next
26230		if !next.hasNextLink() || !next.IsEmpty() {
26231			break
26232		}
26233	}
26234	return nil
26235}
26236
26237// Next advances to the next page of values.  If there was an error making
26238// the request the page does not advance and the error is returned.
26239// Deprecated: Use NextWithContext() instead.
26240func (page *RouteFilterListResultPage) Next() error {
26241	return page.NextWithContext(context.Background())
26242}
26243
26244// NotDone returns true if the page enumeration should be started or is not yet complete.
26245func (page RouteFilterListResultPage) NotDone() bool {
26246	return !page.rflr.IsEmpty()
26247}
26248
26249// Response returns the raw server response from the last page request.
26250func (page RouteFilterListResultPage) Response() RouteFilterListResult {
26251	return page.rflr
26252}
26253
26254// Values returns the slice of values for the current page or nil if there are no values.
26255func (page RouteFilterListResultPage) Values() []RouteFilter {
26256	if page.rflr.IsEmpty() {
26257		return nil
26258	}
26259	return *page.rflr.Value
26260}
26261
26262// Creates a new instance of the RouteFilterListResultPage type.
26263func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
26264	return RouteFilterListResultPage{
26265		fn:   getNextPage,
26266		rflr: cur,
26267	}
26268}
26269
26270// RouteFilterPropertiesFormat route Filter Resource.
26271type RouteFilterPropertiesFormat struct {
26272	// Rules - Collection of RouteFilterRules contained within a route filter.
26273	Rules *[]RouteFilterRule `json:"rules,omitempty"`
26274	// Peerings - READ-ONLY; A collection of references to express route circuit peerings.
26275	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
26276	// Ipv6Peerings - READ-ONLY; A collection of references to express route circuit ipv6 peerings.
26277	Ipv6Peerings *[]ExpressRouteCircuitPeering `json:"ipv6Peerings,omitempty"`
26278	// ProvisioningState - READ-ONLY; The provisioning state of the route filter resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26279	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26280}
26281
26282// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
26283func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
26284	objectMap := make(map[string]interface{})
26285	if rfpf.Rules != nil {
26286		objectMap["rules"] = rfpf.Rules
26287	}
26288	return json.Marshal(objectMap)
26289}
26290
26291// RouteFilterRule route Filter Rule Resource.
26292type RouteFilterRule struct {
26293	autorest.Response `json:"-"`
26294	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
26295	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
26296	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
26297	Name *string `json:"name,omitempty"`
26298	// Location - Resource location.
26299	Location *string `json:"location,omitempty"`
26300	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26301	Etag *string `json:"etag,omitempty"`
26302	// ID - Resource ID.
26303	ID *string `json:"id,omitempty"`
26304}
26305
26306// MarshalJSON is the custom marshaler for RouteFilterRule.
26307func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
26308	objectMap := make(map[string]interface{})
26309	if rfr.RouteFilterRulePropertiesFormat != nil {
26310		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
26311	}
26312	if rfr.Name != nil {
26313		objectMap["name"] = rfr.Name
26314	}
26315	if rfr.Location != nil {
26316		objectMap["location"] = rfr.Location
26317	}
26318	if rfr.ID != nil {
26319		objectMap["id"] = rfr.ID
26320	}
26321	return json.Marshal(objectMap)
26322}
26323
26324// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
26325func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
26326	var m map[string]*json.RawMessage
26327	err := json.Unmarshal(body, &m)
26328	if err != nil {
26329		return err
26330	}
26331	for k, v := range m {
26332		switch k {
26333		case "properties":
26334			if v != nil {
26335				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
26336				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
26337				if err != nil {
26338					return err
26339				}
26340				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
26341			}
26342		case "name":
26343			if v != nil {
26344				var name string
26345				err = json.Unmarshal(*v, &name)
26346				if err != nil {
26347					return err
26348				}
26349				rfr.Name = &name
26350			}
26351		case "location":
26352			if v != nil {
26353				var location string
26354				err = json.Unmarshal(*v, &location)
26355				if err != nil {
26356					return err
26357				}
26358				rfr.Location = &location
26359			}
26360		case "etag":
26361			if v != nil {
26362				var etag string
26363				err = json.Unmarshal(*v, &etag)
26364				if err != nil {
26365					return err
26366				}
26367				rfr.Etag = &etag
26368			}
26369		case "id":
26370			if v != nil {
26371				var ID string
26372				err = json.Unmarshal(*v, &ID)
26373				if err != nil {
26374					return err
26375				}
26376				rfr.ID = &ID
26377			}
26378		}
26379	}
26380
26381	return nil
26382}
26383
26384// RouteFilterRuleListResult response for the ListRouteFilterRules API service call.
26385type RouteFilterRuleListResult struct {
26386	autorest.Response `json:"-"`
26387	// Value - A list of RouteFilterRules in a resource group.
26388	Value *[]RouteFilterRule `json:"value,omitempty"`
26389	// NextLink - The URL to get the next set of results.
26390	NextLink *string `json:"nextLink,omitempty"`
26391}
26392
26393// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
26394type RouteFilterRuleListResultIterator struct {
26395	i    int
26396	page RouteFilterRuleListResultPage
26397}
26398
26399// NextWithContext advances to the next value.  If there was an error making
26400// the request the iterator does not advance and the error is returned.
26401func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
26402	if tracing.IsEnabled() {
26403		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
26404		defer func() {
26405			sc := -1
26406			if iter.Response().Response.Response != nil {
26407				sc = iter.Response().Response.Response.StatusCode
26408			}
26409			tracing.EndSpan(ctx, sc, err)
26410		}()
26411	}
26412	iter.i++
26413	if iter.i < len(iter.page.Values()) {
26414		return nil
26415	}
26416	err = iter.page.NextWithContext(ctx)
26417	if err != nil {
26418		iter.i--
26419		return err
26420	}
26421	iter.i = 0
26422	return nil
26423}
26424
26425// Next advances to the next value.  If there was an error making
26426// the request the iterator does not advance and the error is returned.
26427// Deprecated: Use NextWithContext() instead.
26428func (iter *RouteFilterRuleListResultIterator) Next() error {
26429	return iter.NextWithContext(context.Background())
26430}
26431
26432// NotDone returns true if the enumeration should be started or is not yet complete.
26433func (iter RouteFilterRuleListResultIterator) NotDone() bool {
26434	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26435}
26436
26437// Response returns the raw server response from the last page request.
26438func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
26439	return iter.page.Response()
26440}
26441
26442// Value returns the current value or a zero-initialized value if the
26443// iterator has advanced beyond the end of the collection.
26444func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
26445	if !iter.page.NotDone() {
26446		return RouteFilterRule{}
26447	}
26448	return iter.page.Values()[iter.i]
26449}
26450
26451// Creates a new instance of the RouteFilterRuleListResultIterator type.
26452func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
26453	return RouteFilterRuleListResultIterator{page: page}
26454}
26455
26456// IsEmpty returns true if the ListResult contains no values.
26457func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
26458	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
26459}
26460
26461// hasNextLink returns true if the NextLink is not empty.
26462func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
26463	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
26464}
26465
26466// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
26467// It returns nil if no more results exist.
26468func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
26469	if !rfrlr.hasNextLink() {
26470		return nil, nil
26471	}
26472	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26473		autorest.AsJSON(),
26474		autorest.AsGet(),
26475		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
26476}
26477
26478// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
26479type RouteFilterRuleListResultPage struct {
26480	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
26481	rfrlr RouteFilterRuleListResult
26482}
26483
26484// NextWithContext advances to the next page of values.  If there was an error making
26485// the request the page does not advance and the error is returned.
26486func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
26487	if tracing.IsEnabled() {
26488		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
26489		defer func() {
26490			sc := -1
26491			if page.Response().Response.Response != nil {
26492				sc = page.Response().Response.Response.StatusCode
26493			}
26494			tracing.EndSpan(ctx, sc, err)
26495		}()
26496	}
26497	for {
26498		next, err := page.fn(ctx, page.rfrlr)
26499		if err != nil {
26500			return err
26501		}
26502		page.rfrlr = next
26503		if !next.hasNextLink() || !next.IsEmpty() {
26504			break
26505		}
26506	}
26507	return nil
26508}
26509
26510// Next advances to the next page of values.  If there was an error making
26511// the request the page does not advance and the error is returned.
26512// Deprecated: Use NextWithContext() instead.
26513func (page *RouteFilterRuleListResultPage) Next() error {
26514	return page.NextWithContext(context.Background())
26515}
26516
26517// NotDone returns true if the page enumeration should be started or is not yet complete.
26518func (page RouteFilterRuleListResultPage) NotDone() bool {
26519	return !page.rfrlr.IsEmpty()
26520}
26521
26522// Response returns the raw server response from the last page request.
26523func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
26524	return page.rfrlr
26525}
26526
26527// Values returns the slice of values for the current page or nil if there are no values.
26528func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
26529	if page.rfrlr.IsEmpty() {
26530		return nil
26531	}
26532	return *page.rfrlr.Value
26533}
26534
26535// Creates a new instance of the RouteFilterRuleListResultPage type.
26536func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
26537	return RouteFilterRuleListResultPage{
26538		fn:    getNextPage,
26539		rfrlr: cur,
26540	}
26541}
26542
26543// RouteFilterRulePropertiesFormat route Filter Rule Resource.
26544type RouteFilterRulePropertiesFormat struct {
26545	// Access - The access type of the rule. Possible values include: 'Allow', 'Deny'
26546	Access Access `json:"access,omitempty"`
26547	// RouteFilterRuleType - The rule type of the rule.
26548	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
26549	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
26550	Communities *[]string `json:"communities,omitempty"`
26551	// ProvisioningState - READ-ONLY; The provisioning state of the route filter rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26552	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26553}
26554
26555// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
26556func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
26557	objectMap := make(map[string]interface{})
26558	if rfrpf.Access != "" {
26559		objectMap["access"] = rfrpf.Access
26560	}
26561	if rfrpf.RouteFilterRuleType != nil {
26562		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
26563	}
26564	if rfrpf.Communities != nil {
26565		objectMap["communities"] = rfrpf.Communities
26566	}
26567	return json.Marshal(objectMap)
26568}
26569
26570// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
26571// long-running operation.
26572type RouteFilterRulesCreateOrUpdateFuture struct {
26573	azure.FutureAPI
26574	// Result returns the result of the asynchronous operation.
26575	// If the operation has not completed it will return an error.
26576	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
26577}
26578
26579// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26580// operation.
26581type RouteFilterRulesDeleteFuture struct {
26582	azure.FutureAPI
26583	// Result returns the result of the asynchronous operation.
26584	// If the operation has not completed it will return an error.
26585	Result func(RouteFilterRulesClient) (autorest.Response, error)
26586}
26587
26588// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
26589// long-running operation.
26590type RouteFiltersCreateOrUpdateFuture struct {
26591	azure.FutureAPI
26592	// Result returns the result of the asynchronous operation.
26593	// If the operation has not completed it will return an error.
26594	Result func(RouteFiltersClient) (RouteFilter, error)
26595}
26596
26597// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26598// operation.
26599type RouteFiltersDeleteFuture struct {
26600	azure.FutureAPI
26601	// Result returns the result of the asynchronous operation.
26602	// If the operation has not completed it will return an error.
26603	Result func(RouteFiltersClient) (autorest.Response, error)
26604}
26605
26606// RouteListResult response for the ListRoute API service call.
26607type RouteListResult struct {
26608	autorest.Response `json:"-"`
26609	// Value - A list of routes in a resource group.
26610	Value *[]Route `json:"value,omitempty"`
26611	// NextLink - The URL to get the next set of results.
26612	NextLink *string `json:"nextLink,omitempty"`
26613}
26614
26615// RouteListResultIterator provides access to a complete listing of Route values.
26616type RouteListResultIterator struct {
26617	i    int
26618	page RouteListResultPage
26619}
26620
26621// NextWithContext advances to the next value.  If there was an error making
26622// the request the iterator does not advance and the error is returned.
26623func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
26624	if tracing.IsEnabled() {
26625		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
26626		defer func() {
26627			sc := -1
26628			if iter.Response().Response.Response != nil {
26629				sc = iter.Response().Response.Response.StatusCode
26630			}
26631			tracing.EndSpan(ctx, sc, err)
26632		}()
26633	}
26634	iter.i++
26635	if iter.i < len(iter.page.Values()) {
26636		return nil
26637	}
26638	err = iter.page.NextWithContext(ctx)
26639	if err != nil {
26640		iter.i--
26641		return err
26642	}
26643	iter.i = 0
26644	return nil
26645}
26646
26647// Next advances to the next value.  If there was an error making
26648// the request the iterator does not advance and the error is returned.
26649// Deprecated: Use NextWithContext() instead.
26650func (iter *RouteListResultIterator) Next() error {
26651	return iter.NextWithContext(context.Background())
26652}
26653
26654// NotDone returns true if the enumeration should be started or is not yet complete.
26655func (iter RouteListResultIterator) NotDone() bool {
26656	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26657}
26658
26659// Response returns the raw server response from the last page request.
26660func (iter RouteListResultIterator) Response() RouteListResult {
26661	return iter.page.Response()
26662}
26663
26664// Value returns the current value or a zero-initialized value if the
26665// iterator has advanced beyond the end of the collection.
26666func (iter RouteListResultIterator) Value() Route {
26667	if !iter.page.NotDone() {
26668		return Route{}
26669	}
26670	return iter.page.Values()[iter.i]
26671}
26672
26673// Creates a new instance of the RouteListResultIterator type.
26674func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
26675	return RouteListResultIterator{page: page}
26676}
26677
26678// IsEmpty returns true if the ListResult contains no values.
26679func (rlr RouteListResult) IsEmpty() bool {
26680	return rlr.Value == nil || len(*rlr.Value) == 0
26681}
26682
26683// hasNextLink returns true if the NextLink is not empty.
26684func (rlr RouteListResult) hasNextLink() bool {
26685	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
26686}
26687
26688// routeListResultPreparer prepares a request to retrieve the next set of results.
26689// It returns nil if no more results exist.
26690func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
26691	if !rlr.hasNextLink() {
26692		return nil, nil
26693	}
26694	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26695		autorest.AsJSON(),
26696		autorest.AsGet(),
26697		autorest.WithBaseURL(to.String(rlr.NextLink)))
26698}
26699
26700// RouteListResultPage contains a page of Route values.
26701type RouteListResultPage struct {
26702	fn  func(context.Context, RouteListResult) (RouteListResult, error)
26703	rlr RouteListResult
26704}
26705
26706// NextWithContext advances to the next page of values.  If there was an error making
26707// the request the page does not advance and the error is returned.
26708func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
26709	if tracing.IsEnabled() {
26710		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
26711		defer func() {
26712			sc := -1
26713			if page.Response().Response.Response != nil {
26714				sc = page.Response().Response.Response.StatusCode
26715			}
26716			tracing.EndSpan(ctx, sc, err)
26717		}()
26718	}
26719	for {
26720		next, err := page.fn(ctx, page.rlr)
26721		if err != nil {
26722			return err
26723		}
26724		page.rlr = next
26725		if !next.hasNextLink() || !next.IsEmpty() {
26726			break
26727		}
26728	}
26729	return nil
26730}
26731
26732// Next advances to the next page of values.  If there was an error making
26733// the request the page does not advance and the error is returned.
26734// Deprecated: Use NextWithContext() instead.
26735func (page *RouteListResultPage) Next() error {
26736	return page.NextWithContext(context.Background())
26737}
26738
26739// NotDone returns true if the page enumeration should be started or is not yet complete.
26740func (page RouteListResultPage) NotDone() bool {
26741	return !page.rlr.IsEmpty()
26742}
26743
26744// Response returns the raw server response from the last page request.
26745func (page RouteListResultPage) Response() RouteListResult {
26746	return page.rlr
26747}
26748
26749// Values returns the slice of values for the current page or nil if there are no values.
26750func (page RouteListResultPage) Values() []Route {
26751	if page.rlr.IsEmpty() {
26752		return nil
26753	}
26754	return *page.rlr.Value
26755}
26756
26757// Creates a new instance of the RouteListResultPage type.
26758func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
26759	return RouteListResultPage{
26760		fn:  getNextPage,
26761		rlr: cur,
26762	}
26763}
26764
26765// RoutePropertiesFormat route resource.
26766type RoutePropertiesFormat struct {
26767	// AddressPrefix - The destination CIDR to which the route applies.
26768	AddressPrefix *string `json:"addressPrefix,omitempty"`
26769	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
26770	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
26771	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
26772	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
26773	// ProvisioningState - READ-ONLY; The provisioning state of the route resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26774	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26775}
26776
26777// MarshalJSON is the custom marshaler for RoutePropertiesFormat.
26778func (rpf RoutePropertiesFormat) MarshalJSON() ([]byte, error) {
26779	objectMap := make(map[string]interface{})
26780	if rpf.AddressPrefix != nil {
26781		objectMap["addressPrefix"] = rpf.AddressPrefix
26782	}
26783	if rpf.NextHopType != "" {
26784		objectMap["nextHopType"] = rpf.NextHopType
26785	}
26786	if rpf.NextHopIPAddress != nil {
26787		objectMap["nextHopIpAddress"] = rpf.NextHopIPAddress
26788	}
26789	return json.Marshal(objectMap)
26790}
26791
26792// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
26793// operation.
26794type RoutesCreateOrUpdateFuture struct {
26795	azure.FutureAPI
26796	// Result returns the result of the asynchronous operation.
26797	// If the operation has not completed it will return an error.
26798	Result func(RoutesClient) (Route, error)
26799}
26800
26801// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
26802type RoutesDeleteFuture struct {
26803	azure.FutureAPI
26804	// Result returns the result of the asynchronous operation.
26805	// If the operation has not completed it will return an error.
26806	Result func(RoutesClient) (autorest.Response, error)
26807}
26808
26809// RouteTable route table resource.
26810type RouteTable struct {
26811	autorest.Response `json:"-"`
26812	// RouteTablePropertiesFormat - Properties of the route table.
26813	*RouteTablePropertiesFormat `json:"properties,omitempty"`
26814	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26815	Etag *string `json:"etag,omitempty"`
26816	// ID - Resource ID.
26817	ID *string `json:"id,omitempty"`
26818	// Name - READ-ONLY; Resource name.
26819	Name *string `json:"name,omitempty"`
26820	// Type - READ-ONLY; Resource type.
26821	Type *string `json:"type,omitempty"`
26822	// Location - Resource location.
26823	Location *string `json:"location,omitempty"`
26824	// Tags - Resource tags.
26825	Tags map[string]*string `json:"tags"`
26826}
26827
26828// MarshalJSON is the custom marshaler for RouteTable.
26829func (rt RouteTable) MarshalJSON() ([]byte, error) {
26830	objectMap := make(map[string]interface{})
26831	if rt.RouteTablePropertiesFormat != nil {
26832		objectMap["properties"] = rt.RouteTablePropertiesFormat
26833	}
26834	if rt.ID != nil {
26835		objectMap["id"] = rt.ID
26836	}
26837	if rt.Location != nil {
26838		objectMap["location"] = rt.Location
26839	}
26840	if rt.Tags != nil {
26841		objectMap["tags"] = rt.Tags
26842	}
26843	return json.Marshal(objectMap)
26844}
26845
26846// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
26847func (rt *RouteTable) UnmarshalJSON(body []byte) error {
26848	var m map[string]*json.RawMessage
26849	err := json.Unmarshal(body, &m)
26850	if err != nil {
26851		return err
26852	}
26853	for k, v := range m {
26854		switch k {
26855		case "properties":
26856			if v != nil {
26857				var routeTablePropertiesFormat RouteTablePropertiesFormat
26858				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
26859				if err != nil {
26860					return err
26861				}
26862				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
26863			}
26864		case "etag":
26865			if v != nil {
26866				var etag string
26867				err = json.Unmarshal(*v, &etag)
26868				if err != nil {
26869					return err
26870				}
26871				rt.Etag = &etag
26872			}
26873		case "id":
26874			if v != nil {
26875				var ID string
26876				err = json.Unmarshal(*v, &ID)
26877				if err != nil {
26878					return err
26879				}
26880				rt.ID = &ID
26881			}
26882		case "name":
26883			if v != nil {
26884				var name string
26885				err = json.Unmarshal(*v, &name)
26886				if err != nil {
26887					return err
26888				}
26889				rt.Name = &name
26890			}
26891		case "type":
26892			if v != nil {
26893				var typeVar string
26894				err = json.Unmarshal(*v, &typeVar)
26895				if err != nil {
26896					return err
26897				}
26898				rt.Type = &typeVar
26899			}
26900		case "location":
26901			if v != nil {
26902				var location string
26903				err = json.Unmarshal(*v, &location)
26904				if err != nil {
26905					return err
26906				}
26907				rt.Location = &location
26908			}
26909		case "tags":
26910			if v != nil {
26911				var tags map[string]*string
26912				err = json.Unmarshal(*v, &tags)
26913				if err != nil {
26914					return err
26915				}
26916				rt.Tags = tags
26917			}
26918		}
26919	}
26920
26921	return nil
26922}
26923
26924// RouteTableListResult response for the ListRouteTable API service call.
26925type RouteTableListResult struct {
26926	autorest.Response `json:"-"`
26927	// Value - A list of route tables in a resource group.
26928	Value *[]RouteTable `json:"value,omitempty"`
26929	// NextLink - The URL to get the next set of results.
26930	NextLink *string `json:"nextLink,omitempty"`
26931}
26932
26933// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
26934type RouteTableListResultIterator struct {
26935	i    int
26936	page RouteTableListResultPage
26937}
26938
26939// NextWithContext advances to the next value.  If there was an error making
26940// the request the iterator does not advance and the error is returned.
26941func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
26942	if tracing.IsEnabled() {
26943		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
26944		defer func() {
26945			sc := -1
26946			if iter.Response().Response.Response != nil {
26947				sc = iter.Response().Response.Response.StatusCode
26948			}
26949			tracing.EndSpan(ctx, sc, err)
26950		}()
26951	}
26952	iter.i++
26953	if iter.i < len(iter.page.Values()) {
26954		return nil
26955	}
26956	err = iter.page.NextWithContext(ctx)
26957	if err != nil {
26958		iter.i--
26959		return err
26960	}
26961	iter.i = 0
26962	return nil
26963}
26964
26965// Next advances to the next value.  If there was an error making
26966// the request the iterator does not advance and the error is returned.
26967// Deprecated: Use NextWithContext() instead.
26968func (iter *RouteTableListResultIterator) Next() error {
26969	return iter.NextWithContext(context.Background())
26970}
26971
26972// NotDone returns true if the enumeration should be started or is not yet complete.
26973func (iter RouteTableListResultIterator) NotDone() bool {
26974	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26975}
26976
26977// Response returns the raw server response from the last page request.
26978func (iter RouteTableListResultIterator) Response() RouteTableListResult {
26979	return iter.page.Response()
26980}
26981
26982// Value returns the current value or a zero-initialized value if the
26983// iterator has advanced beyond the end of the collection.
26984func (iter RouteTableListResultIterator) Value() RouteTable {
26985	if !iter.page.NotDone() {
26986		return RouteTable{}
26987	}
26988	return iter.page.Values()[iter.i]
26989}
26990
26991// Creates a new instance of the RouteTableListResultIterator type.
26992func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
26993	return RouteTableListResultIterator{page: page}
26994}
26995
26996// IsEmpty returns true if the ListResult contains no values.
26997func (rtlr RouteTableListResult) IsEmpty() bool {
26998	return rtlr.Value == nil || len(*rtlr.Value) == 0
26999}
27000
27001// hasNextLink returns true if the NextLink is not empty.
27002func (rtlr RouteTableListResult) hasNextLink() bool {
27003	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
27004}
27005
27006// routeTableListResultPreparer prepares a request to retrieve the next set of results.
27007// It returns nil if no more results exist.
27008func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
27009	if !rtlr.hasNextLink() {
27010		return nil, nil
27011	}
27012	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27013		autorest.AsJSON(),
27014		autorest.AsGet(),
27015		autorest.WithBaseURL(to.String(rtlr.NextLink)))
27016}
27017
27018// RouteTableListResultPage contains a page of RouteTable values.
27019type RouteTableListResultPage struct {
27020	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
27021	rtlr RouteTableListResult
27022}
27023
27024// NextWithContext advances to the next page of values.  If there was an error making
27025// the request the page does not advance and the error is returned.
27026func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
27027	if tracing.IsEnabled() {
27028		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
27029		defer func() {
27030			sc := -1
27031			if page.Response().Response.Response != nil {
27032				sc = page.Response().Response.Response.StatusCode
27033			}
27034			tracing.EndSpan(ctx, sc, err)
27035		}()
27036	}
27037	for {
27038		next, err := page.fn(ctx, page.rtlr)
27039		if err != nil {
27040			return err
27041		}
27042		page.rtlr = next
27043		if !next.hasNextLink() || !next.IsEmpty() {
27044			break
27045		}
27046	}
27047	return nil
27048}
27049
27050// Next advances to the next page of values.  If there was an error making
27051// the request the page does not advance and the error is returned.
27052// Deprecated: Use NextWithContext() instead.
27053func (page *RouteTableListResultPage) Next() error {
27054	return page.NextWithContext(context.Background())
27055}
27056
27057// NotDone returns true if the page enumeration should be started or is not yet complete.
27058func (page RouteTableListResultPage) NotDone() bool {
27059	return !page.rtlr.IsEmpty()
27060}
27061
27062// Response returns the raw server response from the last page request.
27063func (page RouteTableListResultPage) Response() RouteTableListResult {
27064	return page.rtlr
27065}
27066
27067// Values returns the slice of values for the current page or nil if there are no values.
27068func (page RouteTableListResultPage) Values() []RouteTable {
27069	if page.rtlr.IsEmpty() {
27070		return nil
27071	}
27072	return *page.rtlr.Value
27073}
27074
27075// Creates a new instance of the RouteTableListResultPage type.
27076func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
27077	return RouteTableListResultPage{
27078		fn:   getNextPage,
27079		rtlr: cur,
27080	}
27081}
27082
27083// RouteTablePropertiesFormat route Table resource.
27084type RouteTablePropertiesFormat struct {
27085	// Routes - Collection of routes contained within a route table.
27086	Routes *[]Route `json:"routes,omitempty"`
27087	// Subnets - READ-ONLY; A collection of references to subnets.
27088	Subnets *[]Subnet `json:"subnets,omitempty"`
27089	// DisableBgpRoutePropagation - Whether to disable the routes learned by BGP on that route table. True means disable.
27090	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
27091	// ProvisioningState - READ-ONLY; The provisioning state of the route table resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
27092	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27093}
27094
27095// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
27096func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
27097	objectMap := make(map[string]interface{})
27098	if rtpf.Routes != nil {
27099		objectMap["routes"] = rtpf.Routes
27100	}
27101	if rtpf.DisableBgpRoutePropagation != nil {
27102		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
27103	}
27104	return json.Marshal(objectMap)
27105}
27106
27107// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
27108// long-running operation.
27109type RouteTablesCreateOrUpdateFuture struct {
27110	azure.FutureAPI
27111	// Result returns the result of the asynchronous operation.
27112	// If the operation has not completed it will return an error.
27113	Result func(RouteTablesClient) (RouteTable, error)
27114}
27115
27116// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
27117// operation.
27118type RouteTablesDeleteFuture struct {
27119	azure.FutureAPI
27120	// Result returns the result of the asynchronous operation.
27121	// If the operation has not completed it will return an error.
27122	Result func(RouteTablesClient) (autorest.Response, error)
27123}
27124
27125// RuleCondition rule condition of type network.
27126type RuleCondition struct {
27127	// IPProtocols - Array of FirewallPolicyRuleConditionNetworkProtocols.
27128	IPProtocols *[]FirewallPolicyRuleConditionNetworkProtocol `json:"ipProtocols,omitempty"`
27129	// SourceAddresses - List of source IP addresses for this rule.
27130	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
27131	// DestinationAddresses - List of destination IP addresses or Service Tags.
27132	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
27133	// DestinationPorts - List of destination ports.
27134	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
27135	// SourceIPGroups - List of source IpGroups for this rule.
27136	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
27137	// DestinationIPGroups - List of destination IpGroups for this rule.
27138	DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"`
27139	// Name - Name of the rule condition.
27140	Name *string `json:"name,omitempty"`
27141	// Description - Description of the rule condition.
27142	Description *string `json:"description,omitempty"`
27143	// RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNatRuleCondition', 'RuleConditionTypeNetworkRuleCondition'
27144	RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"`
27145}
27146
27147// MarshalJSON is the custom marshaler for RuleCondition.
27148func (rc RuleCondition) MarshalJSON() ([]byte, error) {
27149	rc.RuleConditionType = RuleConditionTypeNetworkRuleCondition
27150	objectMap := make(map[string]interface{})
27151	if rc.IPProtocols != nil {
27152		objectMap["ipProtocols"] = rc.IPProtocols
27153	}
27154	if rc.SourceAddresses != nil {
27155		objectMap["sourceAddresses"] = rc.SourceAddresses
27156	}
27157	if rc.DestinationAddresses != nil {
27158		objectMap["destinationAddresses"] = rc.DestinationAddresses
27159	}
27160	if rc.DestinationPorts != nil {
27161		objectMap["destinationPorts"] = rc.DestinationPorts
27162	}
27163	if rc.SourceIPGroups != nil {
27164		objectMap["sourceIpGroups"] = rc.SourceIPGroups
27165	}
27166	if rc.DestinationIPGroups != nil {
27167		objectMap["destinationIpGroups"] = rc.DestinationIPGroups
27168	}
27169	if rc.Name != nil {
27170		objectMap["name"] = rc.Name
27171	}
27172	if rc.Description != nil {
27173		objectMap["description"] = rc.Description
27174	}
27175	if rc.RuleConditionType != "" {
27176		objectMap["ruleConditionType"] = rc.RuleConditionType
27177	}
27178	return json.Marshal(objectMap)
27179}
27180
27181// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
27182func (rc RuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) {
27183	return nil, false
27184}
27185
27186// AsNatRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
27187func (rc RuleCondition) AsNatRuleCondition() (*NatRuleCondition, bool) {
27188	return nil, false
27189}
27190
27191// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
27192func (rc RuleCondition) AsRuleCondition() (*RuleCondition, bool) {
27193	return &rc, true
27194}
27195
27196// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
27197func (rc RuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) {
27198	return nil, false
27199}
27200
27201// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
27202func (rc RuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) {
27203	return &rc, true
27204}
27205
27206// SecurityGroup networkSecurityGroup resource.
27207type SecurityGroup struct {
27208	autorest.Response `json:"-"`
27209	// SecurityGroupPropertiesFormat - Properties of the network security group.
27210	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
27211	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
27212	Etag *string `json:"etag,omitempty"`
27213	// ID - Resource ID.
27214	ID *string `json:"id,omitempty"`
27215	// Name - READ-ONLY; Resource name.
27216	Name *string `json:"name,omitempty"`
27217	// Type - READ-ONLY; Resource type.
27218	Type *string `json:"type,omitempty"`
27219	// Location - Resource location.
27220	Location *string `json:"location,omitempty"`
27221	// Tags - Resource tags.
27222	Tags map[string]*string `json:"tags"`
27223}
27224
27225// MarshalJSON is the custom marshaler for SecurityGroup.
27226func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
27227	objectMap := make(map[string]interface{})
27228	if sg.SecurityGroupPropertiesFormat != nil {
27229		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
27230	}
27231	if sg.ID != nil {
27232		objectMap["id"] = sg.ID
27233	}
27234	if sg.Location != nil {
27235		objectMap["location"] = sg.Location
27236	}
27237	if sg.Tags != nil {
27238		objectMap["tags"] = sg.Tags
27239	}
27240	return json.Marshal(objectMap)
27241}
27242
27243// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
27244func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
27245	var m map[string]*json.RawMessage
27246	err := json.Unmarshal(body, &m)
27247	if err != nil {
27248		return err
27249	}
27250	for k, v := range m {
27251		switch k {
27252		case "properties":
27253			if v != nil {
27254				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
27255				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
27256				if err != nil {
27257					return err
27258				}
27259				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
27260			}
27261		case "etag":
27262			if v != nil {
27263				var etag string
27264				err = json.Unmarshal(*v, &etag)
27265				if err != nil {
27266					return err
27267				}
27268				sg.Etag = &etag
27269			}
27270		case "id":
27271			if v != nil {
27272				var ID string
27273				err = json.Unmarshal(*v, &ID)
27274				if err != nil {
27275					return err
27276				}
27277				sg.ID = &ID
27278			}
27279		case "name":
27280			if v != nil {
27281				var name string
27282				err = json.Unmarshal(*v, &name)
27283				if err != nil {
27284					return err
27285				}
27286				sg.Name = &name
27287			}
27288		case "type":
27289			if v != nil {
27290				var typeVar string
27291				err = json.Unmarshal(*v, &typeVar)
27292				if err != nil {
27293					return err
27294				}
27295				sg.Type = &typeVar
27296			}
27297		case "location":
27298			if v != nil {
27299				var location string
27300				err = json.Unmarshal(*v, &location)
27301				if err != nil {
27302					return err
27303				}
27304				sg.Location = &location
27305			}
27306		case "tags":
27307			if v != nil {
27308				var tags map[string]*string
27309				err = json.Unmarshal(*v, &tags)
27310				if err != nil {
27311					return err
27312				}
27313				sg.Tags = tags
27314			}
27315		}
27316	}
27317
27318	return nil
27319}
27320
27321// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
27322type SecurityGroupListResult struct {
27323	autorest.Response `json:"-"`
27324	// Value - A list of NetworkSecurityGroup resources.
27325	Value *[]SecurityGroup `json:"value,omitempty"`
27326	// NextLink - The URL to get the next set of results.
27327	NextLink *string `json:"nextLink,omitempty"`
27328}
27329
27330// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
27331type SecurityGroupListResultIterator struct {
27332	i    int
27333	page SecurityGroupListResultPage
27334}
27335
27336// NextWithContext advances to the next value.  If there was an error making
27337// the request the iterator does not advance and the error is returned.
27338func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
27339	if tracing.IsEnabled() {
27340		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
27341		defer func() {
27342			sc := -1
27343			if iter.Response().Response.Response != nil {
27344				sc = iter.Response().Response.Response.StatusCode
27345			}
27346			tracing.EndSpan(ctx, sc, err)
27347		}()
27348	}
27349	iter.i++
27350	if iter.i < len(iter.page.Values()) {
27351		return nil
27352	}
27353	err = iter.page.NextWithContext(ctx)
27354	if err != nil {
27355		iter.i--
27356		return err
27357	}
27358	iter.i = 0
27359	return nil
27360}
27361
27362// Next advances to the next value.  If there was an error making
27363// the request the iterator does not advance and the error is returned.
27364// Deprecated: Use NextWithContext() instead.
27365func (iter *SecurityGroupListResultIterator) Next() error {
27366	return iter.NextWithContext(context.Background())
27367}
27368
27369// NotDone returns true if the enumeration should be started or is not yet complete.
27370func (iter SecurityGroupListResultIterator) NotDone() bool {
27371	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27372}
27373
27374// Response returns the raw server response from the last page request.
27375func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
27376	return iter.page.Response()
27377}
27378
27379// Value returns the current value or a zero-initialized value if the
27380// iterator has advanced beyond the end of the collection.
27381func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
27382	if !iter.page.NotDone() {
27383		return SecurityGroup{}
27384	}
27385	return iter.page.Values()[iter.i]
27386}
27387
27388// Creates a new instance of the SecurityGroupListResultIterator type.
27389func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
27390	return SecurityGroupListResultIterator{page: page}
27391}
27392
27393// IsEmpty returns true if the ListResult contains no values.
27394func (sglr SecurityGroupListResult) IsEmpty() bool {
27395	return sglr.Value == nil || len(*sglr.Value) == 0
27396}
27397
27398// hasNextLink returns true if the NextLink is not empty.
27399func (sglr SecurityGroupListResult) hasNextLink() bool {
27400	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
27401}
27402
27403// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
27404// It returns nil if no more results exist.
27405func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
27406	if !sglr.hasNextLink() {
27407		return nil, nil
27408	}
27409	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27410		autorest.AsJSON(),
27411		autorest.AsGet(),
27412		autorest.WithBaseURL(to.String(sglr.NextLink)))
27413}
27414
27415// SecurityGroupListResultPage contains a page of SecurityGroup values.
27416type SecurityGroupListResultPage struct {
27417	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
27418	sglr SecurityGroupListResult
27419}
27420
27421// NextWithContext advances to the next page of values.  If there was an error making
27422// the request the page does not advance and the error is returned.
27423func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
27424	if tracing.IsEnabled() {
27425		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
27426		defer func() {
27427			sc := -1
27428			if page.Response().Response.Response != nil {
27429				sc = page.Response().Response.Response.StatusCode
27430			}
27431			tracing.EndSpan(ctx, sc, err)
27432		}()
27433	}
27434	for {
27435		next, err := page.fn(ctx, page.sglr)
27436		if err != nil {
27437			return err
27438		}
27439		page.sglr = next
27440		if !next.hasNextLink() || !next.IsEmpty() {
27441			break
27442		}
27443	}
27444	return nil
27445}
27446
27447// Next advances to the next page of values.  If there was an error making
27448// the request the page does not advance and the error is returned.
27449// Deprecated: Use NextWithContext() instead.
27450func (page *SecurityGroupListResultPage) Next() error {
27451	return page.NextWithContext(context.Background())
27452}
27453
27454// NotDone returns true if the page enumeration should be started or is not yet complete.
27455func (page SecurityGroupListResultPage) NotDone() bool {
27456	return !page.sglr.IsEmpty()
27457}
27458
27459// Response returns the raw server response from the last page request.
27460func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
27461	return page.sglr
27462}
27463
27464// Values returns the slice of values for the current page or nil if there are no values.
27465func (page SecurityGroupListResultPage) Values() []SecurityGroup {
27466	if page.sglr.IsEmpty() {
27467		return nil
27468	}
27469	return *page.sglr.Value
27470}
27471
27472// Creates a new instance of the SecurityGroupListResultPage type.
27473func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
27474	return SecurityGroupListResultPage{
27475		fn:   getNextPage,
27476		sglr: cur,
27477	}
27478}
27479
27480// SecurityGroupNetworkInterface network interface and all its associated security rules.
27481type SecurityGroupNetworkInterface struct {
27482	// ID - ID of the network interface.
27483	ID *string `json:"id,omitempty"`
27484	// SecurityRuleAssociations - All security rules associated with the network interface.
27485	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
27486}
27487
27488// SecurityGroupPropertiesFormat network Security Group resource.
27489type SecurityGroupPropertiesFormat struct {
27490	// SecurityRules - A collection of security rules of the network security group.
27491	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
27492	// DefaultSecurityRules - READ-ONLY; The default security rules of network security group.
27493	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
27494	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
27495	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
27496	// Subnets - READ-ONLY; A collection of references to subnets.
27497	Subnets *[]Subnet `json:"subnets,omitempty"`
27498	// FlowLogs - READ-ONLY; A collection of references to flow log resources.
27499	FlowLogs *[]FlowLog `json:"flowLogs,omitempty"`
27500	// ResourceGUID - READ-ONLY; The resource GUID property of the network security group resource.
27501	ResourceGUID *string `json:"resourceGuid,omitempty"`
27502	// ProvisioningState - READ-ONLY; The provisioning state of the network security group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
27503	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27504}
27505
27506// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
27507func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
27508	objectMap := make(map[string]interface{})
27509	if sgpf.SecurityRules != nil {
27510		objectMap["securityRules"] = sgpf.SecurityRules
27511	}
27512	return json.Marshal(objectMap)
27513}
27514
27515// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
27516type SecurityGroupResult struct {
27517	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
27518	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
27519	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
27520	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
27521}
27522
27523// MarshalJSON is the custom marshaler for SecurityGroupResult.
27524func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
27525	objectMap := make(map[string]interface{})
27526	if sgr.SecurityRuleAccessResult != "" {
27527		objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
27528	}
27529	return json.Marshal(objectMap)
27530}
27531
27532// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
27533// long-running operation.
27534type SecurityGroupsCreateOrUpdateFuture struct {
27535	azure.FutureAPI
27536	// Result returns the result of the asynchronous operation.
27537	// If the operation has not completed it will return an error.
27538	Result func(SecurityGroupsClient) (SecurityGroup, error)
27539}
27540
27541// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
27542// operation.
27543type SecurityGroupsDeleteFuture struct {
27544	azure.FutureAPI
27545	// Result returns the result of the asynchronous operation.
27546	// If the operation has not completed it will return an error.
27547	Result func(SecurityGroupsClient) (autorest.Response, error)
27548}
27549
27550// SecurityGroupViewParameters parameters that define the VM to check security groups for.
27551type SecurityGroupViewParameters struct {
27552	// TargetResourceID - ID of the target VM.
27553	TargetResourceID *string `json:"targetResourceId,omitempty"`
27554}
27555
27556// SecurityGroupViewResult the information about security rules applied to the specified VM.
27557type SecurityGroupViewResult struct {
27558	autorest.Response `json:"-"`
27559	// NetworkInterfaces - List of network interfaces on the specified VM.
27560	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
27561}
27562
27563// SecurityPartnerProvider security Partner Provider resource.
27564type SecurityPartnerProvider struct {
27565	autorest.Response `json:"-"`
27566	// SecurityPartnerProviderPropertiesFormat - Properties of the Security Partner Provider.
27567	*SecurityPartnerProviderPropertiesFormat `json:"properties,omitempty"`
27568	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
27569	Etag *string `json:"etag,omitempty"`
27570	// ID - Resource ID.
27571	ID *string `json:"id,omitempty"`
27572	// Name - READ-ONLY; Resource name.
27573	Name *string `json:"name,omitempty"`
27574	// Type - READ-ONLY; Resource type.
27575	Type *string `json:"type,omitempty"`
27576	// Location - Resource location.
27577	Location *string `json:"location,omitempty"`
27578	// Tags - Resource tags.
27579	Tags map[string]*string `json:"tags"`
27580}
27581
27582// MarshalJSON is the custom marshaler for SecurityPartnerProvider.
27583func (spp SecurityPartnerProvider) MarshalJSON() ([]byte, error) {
27584	objectMap := make(map[string]interface{})
27585	if spp.SecurityPartnerProviderPropertiesFormat != nil {
27586		objectMap["properties"] = spp.SecurityPartnerProviderPropertiesFormat
27587	}
27588	if spp.ID != nil {
27589		objectMap["id"] = spp.ID
27590	}
27591	if spp.Location != nil {
27592		objectMap["location"] = spp.Location
27593	}
27594	if spp.Tags != nil {
27595		objectMap["tags"] = spp.Tags
27596	}
27597	return json.Marshal(objectMap)
27598}
27599
27600// UnmarshalJSON is the custom unmarshaler for SecurityPartnerProvider struct.
27601func (spp *SecurityPartnerProvider) UnmarshalJSON(body []byte) error {
27602	var m map[string]*json.RawMessage
27603	err := json.Unmarshal(body, &m)
27604	if err != nil {
27605		return err
27606	}
27607	for k, v := range m {
27608		switch k {
27609		case "properties":
27610			if v != nil {
27611				var securityPartnerProviderPropertiesFormat SecurityPartnerProviderPropertiesFormat
27612				err = json.Unmarshal(*v, &securityPartnerProviderPropertiesFormat)
27613				if err != nil {
27614					return err
27615				}
27616				spp.SecurityPartnerProviderPropertiesFormat = &securityPartnerProviderPropertiesFormat
27617			}
27618		case "etag":
27619			if v != nil {
27620				var etag string
27621				err = json.Unmarshal(*v, &etag)
27622				if err != nil {
27623					return err
27624				}
27625				spp.Etag = &etag
27626			}
27627		case "id":
27628			if v != nil {
27629				var ID string
27630				err = json.Unmarshal(*v, &ID)
27631				if err != nil {
27632					return err
27633				}
27634				spp.ID = &ID
27635			}
27636		case "name":
27637			if v != nil {
27638				var name string
27639				err = json.Unmarshal(*v, &name)
27640				if err != nil {
27641					return err
27642				}
27643				spp.Name = &name
27644			}
27645		case "type":
27646			if v != nil {
27647				var typeVar string
27648				err = json.Unmarshal(*v, &typeVar)
27649				if err != nil {
27650					return err
27651				}
27652				spp.Type = &typeVar
27653			}
27654		case "location":
27655			if v != nil {
27656				var location string
27657				err = json.Unmarshal(*v, &location)
27658				if err != nil {
27659					return err
27660				}
27661				spp.Location = &location
27662			}
27663		case "tags":
27664			if v != nil {
27665				var tags map[string]*string
27666				err = json.Unmarshal(*v, &tags)
27667				if err != nil {
27668					return err
27669				}
27670				spp.Tags = tags
27671			}
27672		}
27673	}
27674
27675	return nil
27676}
27677
27678// SecurityPartnerProviderListResult response for ListSecurityPartnerProviders API service call.
27679type SecurityPartnerProviderListResult struct {
27680	autorest.Response `json:"-"`
27681	// Value - List of Security Partner Providers in a resource group.
27682	Value *[]SecurityPartnerProvider `json:"value,omitempty"`
27683	// NextLink - URL to get the next set of results.
27684	NextLink *string `json:"nextLink,omitempty"`
27685}
27686
27687// SecurityPartnerProviderListResultIterator provides access to a complete listing of
27688// SecurityPartnerProvider values.
27689type SecurityPartnerProviderListResultIterator struct {
27690	i    int
27691	page SecurityPartnerProviderListResultPage
27692}
27693
27694// NextWithContext advances to the next value.  If there was an error making
27695// the request the iterator does not advance and the error is returned.
27696func (iter *SecurityPartnerProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
27697	if tracing.IsEnabled() {
27698		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProviderListResultIterator.NextWithContext")
27699		defer func() {
27700			sc := -1
27701			if iter.Response().Response.Response != nil {
27702				sc = iter.Response().Response.Response.StatusCode
27703			}
27704			tracing.EndSpan(ctx, sc, err)
27705		}()
27706	}
27707	iter.i++
27708	if iter.i < len(iter.page.Values()) {
27709		return nil
27710	}
27711	err = iter.page.NextWithContext(ctx)
27712	if err != nil {
27713		iter.i--
27714		return err
27715	}
27716	iter.i = 0
27717	return nil
27718}
27719
27720// Next advances to the next value.  If there was an error making
27721// the request the iterator does not advance and the error is returned.
27722// Deprecated: Use NextWithContext() instead.
27723func (iter *SecurityPartnerProviderListResultIterator) Next() error {
27724	return iter.NextWithContext(context.Background())
27725}
27726
27727// NotDone returns true if the enumeration should be started or is not yet complete.
27728func (iter SecurityPartnerProviderListResultIterator) NotDone() bool {
27729	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27730}
27731
27732// Response returns the raw server response from the last page request.
27733func (iter SecurityPartnerProviderListResultIterator) Response() SecurityPartnerProviderListResult {
27734	return iter.page.Response()
27735}
27736
27737// Value returns the current value or a zero-initialized value if the
27738// iterator has advanced beyond the end of the collection.
27739func (iter SecurityPartnerProviderListResultIterator) Value() SecurityPartnerProvider {
27740	if !iter.page.NotDone() {
27741		return SecurityPartnerProvider{}
27742	}
27743	return iter.page.Values()[iter.i]
27744}
27745
27746// Creates a new instance of the SecurityPartnerProviderListResultIterator type.
27747func NewSecurityPartnerProviderListResultIterator(page SecurityPartnerProviderListResultPage) SecurityPartnerProviderListResultIterator {
27748	return SecurityPartnerProviderListResultIterator{page: page}
27749}
27750
27751// IsEmpty returns true if the ListResult contains no values.
27752func (spplr SecurityPartnerProviderListResult) IsEmpty() bool {
27753	return spplr.Value == nil || len(*spplr.Value) == 0
27754}
27755
27756// hasNextLink returns true if the NextLink is not empty.
27757func (spplr SecurityPartnerProviderListResult) hasNextLink() bool {
27758	return spplr.NextLink != nil && len(*spplr.NextLink) != 0
27759}
27760
27761// securityPartnerProviderListResultPreparer prepares a request to retrieve the next set of results.
27762// It returns nil if no more results exist.
27763func (spplr SecurityPartnerProviderListResult) securityPartnerProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
27764	if !spplr.hasNextLink() {
27765		return nil, nil
27766	}
27767	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27768		autorest.AsJSON(),
27769		autorest.AsGet(),
27770		autorest.WithBaseURL(to.String(spplr.NextLink)))
27771}
27772
27773// SecurityPartnerProviderListResultPage contains a page of SecurityPartnerProvider values.
27774type SecurityPartnerProviderListResultPage struct {
27775	fn    func(context.Context, SecurityPartnerProviderListResult) (SecurityPartnerProviderListResult, error)
27776	spplr SecurityPartnerProviderListResult
27777}
27778
27779// NextWithContext advances to the next page of values.  If there was an error making
27780// the request the page does not advance and the error is returned.
27781func (page *SecurityPartnerProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
27782	if tracing.IsEnabled() {
27783		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProviderListResultPage.NextWithContext")
27784		defer func() {
27785			sc := -1
27786			if page.Response().Response.Response != nil {
27787				sc = page.Response().Response.Response.StatusCode
27788			}
27789			tracing.EndSpan(ctx, sc, err)
27790		}()
27791	}
27792	for {
27793		next, err := page.fn(ctx, page.spplr)
27794		if err != nil {
27795			return err
27796		}
27797		page.spplr = next
27798		if !next.hasNextLink() || !next.IsEmpty() {
27799			break
27800		}
27801	}
27802	return nil
27803}
27804
27805// Next advances to the next page of values.  If there was an error making
27806// the request the page does not advance and the error is returned.
27807// Deprecated: Use NextWithContext() instead.
27808func (page *SecurityPartnerProviderListResultPage) Next() error {
27809	return page.NextWithContext(context.Background())
27810}
27811
27812// NotDone returns true if the page enumeration should be started or is not yet complete.
27813func (page SecurityPartnerProviderListResultPage) NotDone() bool {
27814	return !page.spplr.IsEmpty()
27815}
27816
27817// Response returns the raw server response from the last page request.
27818func (page SecurityPartnerProviderListResultPage) Response() SecurityPartnerProviderListResult {
27819	return page.spplr
27820}
27821
27822// Values returns the slice of values for the current page or nil if there are no values.
27823func (page SecurityPartnerProviderListResultPage) Values() []SecurityPartnerProvider {
27824	if page.spplr.IsEmpty() {
27825		return nil
27826	}
27827	return *page.spplr.Value
27828}
27829
27830// Creates a new instance of the SecurityPartnerProviderListResultPage type.
27831func NewSecurityPartnerProviderListResultPage(cur SecurityPartnerProviderListResult, getNextPage func(context.Context, SecurityPartnerProviderListResult) (SecurityPartnerProviderListResult, error)) SecurityPartnerProviderListResultPage {
27832	return SecurityPartnerProviderListResultPage{
27833		fn:    getNextPage,
27834		spplr: cur,
27835	}
27836}
27837
27838// SecurityPartnerProviderPropertiesFormat properties of the Security Partner Provider.
27839type SecurityPartnerProviderPropertiesFormat struct {
27840	// ProvisioningState - READ-ONLY; The provisioning state of the Security Partner Provider resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
27841	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27842	// SecurityProviderName - The security provider name. Possible values include: 'ZScaler', 'IBoss', 'Checkpoint'
27843	SecurityProviderName SecurityProviderName `json:"securityProviderName,omitempty"`
27844	// ConnectionStatus - READ-ONLY; The connection status with the Security Partner Provider. Possible values include: 'SecurityPartnerProviderConnectionStatusUnknown', 'SecurityPartnerProviderConnectionStatusPartiallyConnected', 'SecurityPartnerProviderConnectionStatusConnected', 'SecurityPartnerProviderConnectionStatusNotConnected'
27845	ConnectionStatus SecurityPartnerProviderConnectionStatus `json:"connectionStatus,omitempty"`
27846	// VirtualHub - The virtualHub to which the Security Partner Provider belongs.
27847	VirtualHub *SubResource `json:"virtualHub,omitempty"`
27848}
27849
27850// MarshalJSON is the custom marshaler for SecurityPartnerProviderPropertiesFormat.
27851func (spppf SecurityPartnerProviderPropertiesFormat) MarshalJSON() ([]byte, error) {
27852	objectMap := make(map[string]interface{})
27853	if spppf.SecurityProviderName != "" {
27854		objectMap["securityProviderName"] = spppf.SecurityProviderName
27855	}
27856	if spppf.VirtualHub != nil {
27857		objectMap["virtualHub"] = spppf.VirtualHub
27858	}
27859	return json.Marshal(objectMap)
27860}
27861
27862// SecurityPartnerProvidersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
27863// a long-running operation.
27864type SecurityPartnerProvidersCreateOrUpdateFuture struct {
27865	azure.FutureAPI
27866	// Result returns the result of the asynchronous operation.
27867	// If the operation has not completed it will return an error.
27868	Result func(SecurityPartnerProvidersClient) (SecurityPartnerProvider, error)
27869}
27870
27871// SecurityPartnerProvidersDeleteFuture an abstraction for monitoring and retrieving the results of a
27872// long-running operation.
27873type SecurityPartnerProvidersDeleteFuture struct {
27874	azure.FutureAPI
27875	// Result returns the result of the asynchronous operation.
27876	// If the operation has not completed it will return an error.
27877	Result func(SecurityPartnerProvidersClient) (autorest.Response, error)
27878}
27879
27880// SecurityRule network security rule.
27881type SecurityRule struct {
27882	autorest.Response `json:"-"`
27883	// SecurityRulePropertiesFormat - Properties of the security rule.
27884	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
27885	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
27886	Name *string `json:"name,omitempty"`
27887	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
27888	Etag *string `json:"etag,omitempty"`
27889	// ID - Resource ID.
27890	ID *string `json:"id,omitempty"`
27891}
27892
27893// MarshalJSON is the custom marshaler for SecurityRule.
27894func (sr SecurityRule) MarshalJSON() ([]byte, error) {
27895	objectMap := make(map[string]interface{})
27896	if sr.SecurityRulePropertiesFormat != nil {
27897		objectMap["properties"] = sr.SecurityRulePropertiesFormat
27898	}
27899	if sr.Name != nil {
27900		objectMap["name"] = sr.Name
27901	}
27902	if sr.ID != nil {
27903		objectMap["id"] = sr.ID
27904	}
27905	return json.Marshal(objectMap)
27906}
27907
27908// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
27909func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
27910	var m map[string]*json.RawMessage
27911	err := json.Unmarshal(body, &m)
27912	if err != nil {
27913		return err
27914	}
27915	for k, v := range m {
27916		switch k {
27917		case "properties":
27918			if v != nil {
27919				var securityRulePropertiesFormat SecurityRulePropertiesFormat
27920				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
27921				if err != nil {
27922					return err
27923				}
27924				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
27925			}
27926		case "name":
27927			if v != nil {
27928				var name string
27929				err = json.Unmarshal(*v, &name)
27930				if err != nil {
27931					return err
27932				}
27933				sr.Name = &name
27934			}
27935		case "etag":
27936			if v != nil {
27937				var etag string
27938				err = json.Unmarshal(*v, &etag)
27939				if err != nil {
27940					return err
27941				}
27942				sr.Etag = &etag
27943			}
27944		case "id":
27945			if v != nil {
27946				var ID string
27947				err = json.Unmarshal(*v, &ID)
27948				if err != nil {
27949					return err
27950				}
27951				sr.ID = &ID
27952			}
27953		}
27954	}
27955
27956	return nil
27957}
27958
27959// SecurityRuleAssociations all security rules associated with the network interface.
27960type SecurityRuleAssociations struct {
27961	// NetworkInterfaceAssociation - Network interface and it's custom security rules.
27962	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
27963	// SubnetAssociation - Subnet and it's custom security rules.
27964	SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"`
27965	// DefaultSecurityRules - Collection of default security rules of the network security group.
27966	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
27967	// EffectiveSecurityRules - Collection of effective security rules.
27968	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
27969}
27970
27971// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
27972// belongs to a network security group.
27973type SecurityRuleListResult struct {
27974	autorest.Response `json:"-"`
27975	// Value - The security rules in a network security group.
27976	Value *[]SecurityRule `json:"value,omitempty"`
27977	// NextLink - The URL to get the next set of results.
27978	NextLink *string `json:"nextLink,omitempty"`
27979}
27980
27981// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
27982type SecurityRuleListResultIterator struct {
27983	i    int
27984	page SecurityRuleListResultPage
27985}
27986
27987// NextWithContext advances to the next value.  If there was an error making
27988// the request the iterator does not advance and the error is returned.
27989func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
27990	if tracing.IsEnabled() {
27991		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
27992		defer func() {
27993			sc := -1
27994			if iter.Response().Response.Response != nil {
27995				sc = iter.Response().Response.Response.StatusCode
27996			}
27997			tracing.EndSpan(ctx, sc, err)
27998		}()
27999	}
28000	iter.i++
28001	if iter.i < len(iter.page.Values()) {
28002		return nil
28003	}
28004	err = iter.page.NextWithContext(ctx)
28005	if err != nil {
28006		iter.i--
28007		return err
28008	}
28009	iter.i = 0
28010	return nil
28011}
28012
28013// Next advances to the next value.  If there was an error making
28014// the request the iterator does not advance and the error is returned.
28015// Deprecated: Use NextWithContext() instead.
28016func (iter *SecurityRuleListResultIterator) Next() error {
28017	return iter.NextWithContext(context.Background())
28018}
28019
28020// NotDone returns true if the enumeration should be started or is not yet complete.
28021func (iter SecurityRuleListResultIterator) NotDone() bool {
28022	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28023}
28024
28025// Response returns the raw server response from the last page request.
28026func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
28027	return iter.page.Response()
28028}
28029
28030// Value returns the current value or a zero-initialized value if the
28031// iterator has advanced beyond the end of the collection.
28032func (iter SecurityRuleListResultIterator) Value() SecurityRule {
28033	if !iter.page.NotDone() {
28034		return SecurityRule{}
28035	}
28036	return iter.page.Values()[iter.i]
28037}
28038
28039// Creates a new instance of the SecurityRuleListResultIterator type.
28040func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
28041	return SecurityRuleListResultIterator{page: page}
28042}
28043
28044// IsEmpty returns true if the ListResult contains no values.
28045func (srlr SecurityRuleListResult) IsEmpty() bool {
28046	return srlr.Value == nil || len(*srlr.Value) == 0
28047}
28048
28049// hasNextLink returns true if the NextLink is not empty.
28050func (srlr SecurityRuleListResult) hasNextLink() bool {
28051	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
28052}
28053
28054// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
28055// It returns nil if no more results exist.
28056func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
28057	if !srlr.hasNextLink() {
28058		return nil, nil
28059	}
28060	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28061		autorest.AsJSON(),
28062		autorest.AsGet(),
28063		autorest.WithBaseURL(to.String(srlr.NextLink)))
28064}
28065
28066// SecurityRuleListResultPage contains a page of SecurityRule values.
28067type SecurityRuleListResultPage struct {
28068	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
28069	srlr SecurityRuleListResult
28070}
28071
28072// NextWithContext advances to the next page of values.  If there was an error making
28073// the request the page does not advance and the error is returned.
28074func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
28075	if tracing.IsEnabled() {
28076		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
28077		defer func() {
28078			sc := -1
28079			if page.Response().Response.Response != nil {
28080				sc = page.Response().Response.Response.StatusCode
28081			}
28082			tracing.EndSpan(ctx, sc, err)
28083		}()
28084	}
28085	for {
28086		next, err := page.fn(ctx, page.srlr)
28087		if err != nil {
28088			return err
28089		}
28090		page.srlr = next
28091		if !next.hasNextLink() || !next.IsEmpty() {
28092			break
28093		}
28094	}
28095	return nil
28096}
28097
28098// Next advances to the next page of values.  If there was an error making
28099// the request the page does not advance and the error is returned.
28100// Deprecated: Use NextWithContext() instead.
28101func (page *SecurityRuleListResultPage) Next() error {
28102	return page.NextWithContext(context.Background())
28103}
28104
28105// NotDone returns true if the page enumeration should be started or is not yet complete.
28106func (page SecurityRuleListResultPage) NotDone() bool {
28107	return !page.srlr.IsEmpty()
28108}
28109
28110// Response returns the raw server response from the last page request.
28111func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
28112	return page.srlr
28113}
28114
28115// Values returns the slice of values for the current page or nil if there are no values.
28116func (page SecurityRuleListResultPage) Values() []SecurityRule {
28117	if page.srlr.IsEmpty() {
28118		return nil
28119	}
28120	return *page.srlr.Value
28121}
28122
28123// Creates a new instance of the SecurityRuleListResultPage type.
28124func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
28125	return SecurityRuleListResultPage{
28126		fn:   getNextPage,
28127		srlr: cur,
28128	}
28129}
28130
28131// SecurityRulePropertiesFormat security rule resource.
28132type SecurityRulePropertiesFormat struct {
28133	// Description - A description for this rule. Restricted to 140 chars.
28134	Description *string `json:"description,omitempty"`
28135	// Protocol - Network protocol this rule applies to. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolIcmp', 'SecurityRuleProtocolEsp', 'SecurityRuleProtocolAsterisk', 'SecurityRuleProtocolAh'
28136	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
28137	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
28138	SourcePortRange *string `json:"sourcePortRange,omitempty"`
28139	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
28140	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
28141	// 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.
28142	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
28143	// SourceAddressPrefixes - The CIDR or source IP ranges.
28144	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
28145	// SourceApplicationSecurityGroups - The application security group specified as source.
28146	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
28147	// 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.
28148	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
28149	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
28150	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
28151	// DestinationApplicationSecurityGroups - The application security group specified as destination.
28152	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
28153	// SourcePortRanges - The source port ranges.
28154	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
28155	// DestinationPortRanges - The destination port ranges.
28156	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
28157	// Access - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
28158	Access SecurityRuleAccess `json:"access,omitempty"`
28159	// 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.
28160	Priority *int32 `json:"priority,omitempty"`
28161	// Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
28162	Direction SecurityRuleDirection `json:"direction,omitempty"`
28163	// ProvisioningState - READ-ONLY; The provisioning state of the security rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
28164	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28165}
28166
28167// MarshalJSON is the custom marshaler for SecurityRulePropertiesFormat.
28168func (srpf SecurityRulePropertiesFormat) MarshalJSON() ([]byte, error) {
28169	objectMap := make(map[string]interface{})
28170	if srpf.Description != nil {
28171		objectMap["description"] = srpf.Description
28172	}
28173	if srpf.Protocol != "" {
28174		objectMap["protocol"] = srpf.Protocol
28175	}
28176	if srpf.SourcePortRange != nil {
28177		objectMap["sourcePortRange"] = srpf.SourcePortRange
28178	}
28179	if srpf.DestinationPortRange != nil {
28180		objectMap["destinationPortRange"] = srpf.DestinationPortRange
28181	}
28182	if srpf.SourceAddressPrefix != nil {
28183		objectMap["sourceAddressPrefix"] = srpf.SourceAddressPrefix
28184	}
28185	if srpf.SourceAddressPrefixes != nil {
28186		objectMap["sourceAddressPrefixes"] = srpf.SourceAddressPrefixes
28187	}
28188	if srpf.SourceApplicationSecurityGroups != nil {
28189		objectMap["sourceApplicationSecurityGroups"] = srpf.SourceApplicationSecurityGroups
28190	}
28191	if srpf.DestinationAddressPrefix != nil {
28192		objectMap["destinationAddressPrefix"] = srpf.DestinationAddressPrefix
28193	}
28194	if srpf.DestinationAddressPrefixes != nil {
28195		objectMap["destinationAddressPrefixes"] = srpf.DestinationAddressPrefixes
28196	}
28197	if srpf.DestinationApplicationSecurityGroups != nil {
28198		objectMap["destinationApplicationSecurityGroups"] = srpf.DestinationApplicationSecurityGroups
28199	}
28200	if srpf.SourcePortRanges != nil {
28201		objectMap["sourcePortRanges"] = srpf.SourcePortRanges
28202	}
28203	if srpf.DestinationPortRanges != nil {
28204		objectMap["destinationPortRanges"] = srpf.DestinationPortRanges
28205	}
28206	if srpf.Access != "" {
28207		objectMap["access"] = srpf.Access
28208	}
28209	if srpf.Priority != nil {
28210		objectMap["priority"] = srpf.Priority
28211	}
28212	if srpf.Direction != "" {
28213		objectMap["direction"] = srpf.Direction
28214	}
28215	return json.Marshal(objectMap)
28216}
28217
28218// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28219// long-running operation.
28220type SecurityRulesCreateOrUpdateFuture struct {
28221	azure.FutureAPI
28222	// Result returns the result of the asynchronous operation.
28223	// If the operation has not completed it will return an error.
28224	Result func(SecurityRulesClient) (SecurityRule, error)
28225}
28226
28227// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
28228// operation.
28229type SecurityRulesDeleteFuture struct {
28230	azure.FutureAPI
28231	// Result returns the result of the asynchronous operation.
28232	// If the operation has not completed it will return an error.
28233	Result func(SecurityRulesClient) (autorest.Response, error)
28234}
28235
28236// SecurityRulesEvaluationResult network security rules evaluation result.
28237type SecurityRulesEvaluationResult struct {
28238	// Name - Name of the network security rule.
28239	Name *string `json:"name,omitempty"`
28240	// ProtocolMatched - Value indicating whether protocol is matched.
28241	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
28242	// SourceMatched - Value indicating whether source is matched.
28243	SourceMatched *bool `json:"sourceMatched,omitempty"`
28244	// SourcePortMatched - Value indicating whether source port is matched.
28245	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
28246	// DestinationMatched - Value indicating whether destination is matched.
28247	DestinationMatched *bool `json:"destinationMatched,omitempty"`
28248	// DestinationPortMatched - Value indicating whether destination port is matched.
28249	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
28250}
28251
28252// ServiceAssociationLink serviceAssociationLink resource.
28253type ServiceAssociationLink struct {
28254	// ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format.
28255	*ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"`
28256	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
28257	Name *string `json:"name,omitempty"`
28258	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
28259	Etag *string `json:"etag,omitempty"`
28260	// Type - READ-ONLY; Resource type.
28261	Type *string `json:"type,omitempty"`
28262	// ID - Resource ID.
28263	ID *string `json:"id,omitempty"`
28264}
28265
28266// MarshalJSON is the custom marshaler for ServiceAssociationLink.
28267func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) {
28268	objectMap := make(map[string]interface{})
28269	if sal.ServiceAssociationLinkPropertiesFormat != nil {
28270		objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat
28271	}
28272	if sal.Name != nil {
28273		objectMap["name"] = sal.Name
28274	}
28275	if sal.ID != nil {
28276		objectMap["id"] = sal.ID
28277	}
28278	return json.Marshal(objectMap)
28279}
28280
28281// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct.
28282func (sal *ServiceAssociationLink) UnmarshalJSON(body []byte) error {
28283	var m map[string]*json.RawMessage
28284	err := json.Unmarshal(body, &m)
28285	if err != nil {
28286		return err
28287	}
28288	for k, v := range m {
28289		switch k {
28290		case "properties":
28291			if v != nil {
28292				var serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat
28293				err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat)
28294				if err != nil {
28295					return err
28296				}
28297				sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat
28298			}
28299		case "name":
28300			if v != nil {
28301				var name string
28302				err = json.Unmarshal(*v, &name)
28303				if err != nil {
28304					return err
28305				}
28306				sal.Name = &name
28307			}
28308		case "etag":
28309			if v != nil {
28310				var etag string
28311				err = json.Unmarshal(*v, &etag)
28312				if err != nil {
28313					return err
28314				}
28315				sal.Etag = &etag
28316			}
28317		case "type":
28318			if v != nil {
28319				var typeVar string
28320				err = json.Unmarshal(*v, &typeVar)
28321				if err != nil {
28322					return err
28323				}
28324				sal.Type = &typeVar
28325			}
28326		case "id":
28327			if v != nil {
28328				var ID string
28329				err = json.Unmarshal(*v, &ID)
28330				if err != nil {
28331					return err
28332				}
28333				sal.ID = &ID
28334			}
28335		}
28336	}
28337
28338	return nil
28339}
28340
28341// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink.
28342type ServiceAssociationLinkPropertiesFormat struct {
28343	// LinkedResourceType - Resource type of the linked resource.
28344	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
28345	// Link - Link to the external resource.
28346	Link *string `json:"link,omitempty"`
28347	// ProvisioningState - READ-ONLY; The provisioning state of the service association link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
28348	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28349	// AllowDelete - If true, the resource can be deleted.
28350	AllowDelete *bool `json:"allowDelete,omitempty"`
28351	// Locations - A list of locations.
28352	Locations *[]string `json:"locations,omitempty"`
28353}
28354
28355// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat.
28356func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
28357	objectMap := make(map[string]interface{})
28358	if salpf.LinkedResourceType != nil {
28359		objectMap["linkedResourceType"] = salpf.LinkedResourceType
28360	}
28361	if salpf.Link != nil {
28362		objectMap["link"] = salpf.Link
28363	}
28364	if salpf.AllowDelete != nil {
28365		objectMap["allowDelete"] = salpf.AllowDelete
28366	}
28367	if salpf.Locations != nil {
28368		objectMap["locations"] = salpf.Locations
28369	}
28370	return json.Marshal(objectMap)
28371}
28372
28373// ServiceAssociationLinksListResult response for ServiceAssociationLinks_List operation.
28374type ServiceAssociationLinksListResult struct {
28375	autorest.Response `json:"-"`
28376	// Value - The service association links in a subnet.
28377	Value *[]ServiceAssociationLink `json:"value,omitempty"`
28378	// NextLink - READ-ONLY; The URL to get the next set of results.
28379	NextLink *string `json:"nextLink,omitempty"`
28380}
28381
28382// MarshalJSON is the custom marshaler for ServiceAssociationLinksListResult.
28383func (sallr ServiceAssociationLinksListResult) MarshalJSON() ([]byte, error) {
28384	objectMap := make(map[string]interface{})
28385	if sallr.Value != nil {
28386		objectMap["value"] = sallr.Value
28387	}
28388	return json.Marshal(objectMap)
28389}
28390
28391// ServiceDelegationPropertiesFormat properties of a service delegation.
28392type ServiceDelegationPropertiesFormat struct {
28393	// ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers).
28394	ServiceName *string `json:"serviceName,omitempty"`
28395	// Actions - READ-ONLY; The actions permitted to the service upon delegation.
28396	Actions *[]string `json:"actions,omitempty"`
28397	// ProvisioningState - READ-ONLY; The provisioning state of the service delegation resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
28398	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28399}
28400
28401// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat.
28402func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) {
28403	objectMap := make(map[string]interface{})
28404	if sdpf.ServiceName != nil {
28405		objectMap["serviceName"] = sdpf.ServiceName
28406	}
28407	return json.Marshal(objectMap)
28408}
28409
28410// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
28411// a long-running operation.
28412type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
28413	azure.FutureAPI
28414	// Result returns the result of the asynchronous operation.
28415	// If the operation has not completed it will return an error.
28416	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
28417}
28418
28419// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
28420// long-running operation.
28421type ServiceEndpointPoliciesDeleteFuture struct {
28422	azure.FutureAPI
28423	// Result returns the result of the asynchronous operation.
28424	// If the operation has not completed it will return an error.
28425	Result func(ServiceEndpointPoliciesClient) (autorest.Response, error)
28426}
28427
28428// ServiceEndpointPolicy service End point policy resource.
28429type ServiceEndpointPolicy struct {
28430	autorest.Response `json:"-"`
28431	// ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy.
28432	*ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"`
28433	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
28434	Etag *string `json:"etag,omitempty"`
28435	// ID - Resource ID.
28436	ID *string `json:"id,omitempty"`
28437	// Name - READ-ONLY; Resource name.
28438	Name *string `json:"name,omitempty"`
28439	// Type - READ-ONLY; Resource type.
28440	Type *string `json:"type,omitempty"`
28441	// Location - Resource location.
28442	Location *string `json:"location,omitempty"`
28443	// Tags - Resource tags.
28444	Tags map[string]*string `json:"tags"`
28445}
28446
28447// MarshalJSON is the custom marshaler for ServiceEndpointPolicy.
28448func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) {
28449	objectMap := make(map[string]interface{})
28450	if sep.ServiceEndpointPolicyPropertiesFormat != nil {
28451		objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat
28452	}
28453	if sep.ID != nil {
28454		objectMap["id"] = sep.ID
28455	}
28456	if sep.Location != nil {
28457		objectMap["location"] = sep.Location
28458	}
28459	if sep.Tags != nil {
28460		objectMap["tags"] = sep.Tags
28461	}
28462	return json.Marshal(objectMap)
28463}
28464
28465// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct.
28466func (sep *ServiceEndpointPolicy) UnmarshalJSON(body []byte) error {
28467	var m map[string]*json.RawMessage
28468	err := json.Unmarshal(body, &m)
28469	if err != nil {
28470		return err
28471	}
28472	for k, v := range m {
28473		switch k {
28474		case "properties":
28475			if v != nil {
28476				var serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat
28477				err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat)
28478				if err != nil {
28479					return err
28480				}
28481				sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat
28482			}
28483		case "etag":
28484			if v != nil {
28485				var etag string
28486				err = json.Unmarshal(*v, &etag)
28487				if err != nil {
28488					return err
28489				}
28490				sep.Etag = &etag
28491			}
28492		case "id":
28493			if v != nil {
28494				var ID string
28495				err = json.Unmarshal(*v, &ID)
28496				if err != nil {
28497					return err
28498				}
28499				sep.ID = &ID
28500			}
28501		case "name":
28502			if v != nil {
28503				var name string
28504				err = json.Unmarshal(*v, &name)
28505				if err != nil {
28506					return err
28507				}
28508				sep.Name = &name
28509			}
28510		case "type":
28511			if v != nil {
28512				var typeVar string
28513				err = json.Unmarshal(*v, &typeVar)
28514				if err != nil {
28515					return err
28516				}
28517				sep.Type = &typeVar
28518			}
28519		case "location":
28520			if v != nil {
28521				var location string
28522				err = json.Unmarshal(*v, &location)
28523				if err != nil {
28524					return err
28525				}
28526				sep.Location = &location
28527			}
28528		case "tags":
28529			if v != nil {
28530				var tags map[string]*string
28531				err = json.Unmarshal(*v, &tags)
28532				if err != nil {
28533					return err
28534				}
28535				sep.Tags = tags
28536			}
28537		}
28538	}
28539
28540	return nil
28541}
28542
28543// ServiceEndpointPolicyDefinition service Endpoint policy definitions.
28544type ServiceEndpointPolicyDefinition struct {
28545	autorest.Response `json:"-"`
28546	// ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition.
28547	*ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"`
28548	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
28549	Name *string `json:"name,omitempty"`
28550	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
28551	Etag *string `json:"etag,omitempty"`
28552	// ID - Resource ID.
28553	ID *string `json:"id,omitempty"`
28554}
28555
28556// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition.
28557func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) {
28558	objectMap := make(map[string]interface{})
28559	if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil {
28560		objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat
28561	}
28562	if sepd.Name != nil {
28563		objectMap["name"] = sepd.Name
28564	}
28565	if sepd.ID != nil {
28566		objectMap["id"] = sepd.ID
28567	}
28568	return json.Marshal(objectMap)
28569}
28570
28571// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct.
28572func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error {
28573	var m map[string]*json.RawMessage
28574	err := json.Unmarshal(body, &m)
28575	if err != nil {
28576		return err
28577	}
28578	for k, v := range m {
28579		switch k {
28580		case "properties":
28581			if v != nil {
28582				var serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat
28583				err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat)
28584				if err != nil {
28585					return err
28586				}
28587				sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat
28588			}
28589		case "name":
28590			if v != nil {
28591				var name string
28592				err = json.Unmarshal(*v, &name)
28593				if err != nil {
28594					return err
28595				}
28596				sepd.Name = &name
28597			}
28598		case "etag":
28599			if v != nil {
28600				var etag string
28601				err = json.Unmarshal(*v, &etag)
28602				if err != nil {
28603					return err
28604				}
28605				sepd.Etag = &etag
28606			}
28607		case "id":
28608			if v != nil {
28609				var ID string
28610				err = json.Unmarshal(*v, &ID)
28611				if err != nil {
28612					return err
28613				}
28614				sepd.ID = &ID
28615			}
28616		}
28617	}
28618
28619	return nil
28620}
28621
28622// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service
28623// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
28624type ServiceEndpointPolicyDefinitionListResult struct {
28625	autorest.Response `json:"-"`
28626	// Value - The service endpoint policy definition in a service endpoint policy.
28627	Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"`
28628	// NextLink - The URL to get the next set of results.
28629	NextLink *string `json:"nextLink,omitempty"`
28630}
28631
28632// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of
28633// ServiceEndpointPolicyDefinition values.
28634type ServiceEndpointPolicyDefinitionListResultIterator struct {
28635	i    int
28636	page ServiceEndpointPolicyDefinitionListResultPage
28637}
28638
28639// NextWithContext advances to the next value.  If there was an error making
28640// the request the iterator does not advance and the error is returned.
28641func (iter *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
28642	if tracing.IsEnabled() {
28643		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.NextWithContext")
28644		defer func() {
28645			sc := -1
28646			if iter.Response().Response.Response != nil {
28647				sc = iter.Response().Response.Response.StatusCode
28648			}
28649			tracing.EndSpan(ctx, sc, err)
28650		}()
28651	}
28652	iter.i++
28653	if iter.i < len(iter.page.Values()) {
28654		return nil
28655	}
28656	err = iter.page.NextWithContext(ctx)
28657	if err != nil {
28658		iter.i--
28659		return err
28660	}
28661	iter.i = 0
28662	return nil
28663}
28664
28665// Next advances to the next value.  If there was an error making
28666// the request the iterator does not advance and the error is returned.
28667// Deprecated: Use NextWithContext() instead.
28668func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
28669	return iter.NextWithContext(context.Background())
28670}
28671
28672// NotDone returns true if the enumeration should be started or is not yet complete.
28673func (iter ServiceEndpointPolicyDefinitionListResultIterator) NotDone() bool {
28674	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28675}
28676
28677// Response returns the raw server response from the last page request.
28678func (iter ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult {
28679	return iter.page.Response()
28680}
28681
28682// Value returns the current value or a zero-initialized value if the
28683// iterator has advanced beyond the end of the collection.
28684func (iter ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition {
28685	if !iter.page.NotDone() {
28686		return ServiceEndpointPolicyDefinition{}
28687	}
28688	return iter.page.Values()[iter.i]
28689}
28690
28691// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
28692func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
28693	return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
28694}
28695
28696// IsEmpty returns true if the ListResult contains no values.
28697func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
28698	return sepdlr.Value == nil || len(*sepdlr.Value) == 0
28699}
28700
28701// hasNextLink returns true if the NextLink is not empty.
28702func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool {
28703	return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0
28704}
28705
28706// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
28707// It returns nil if no more results exist.
28708func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
28709	if !sepdlr.hasNextLink() {
28710		return nil, nil
28711	}
28712	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28713		autorest.AsJSON(),
28714		autorest.AsGet(),
28715		autorest.WithBaseURL(to.String(sepdlr.NextLink)))
28716}
28717
28718// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
28719type ServiceEndpointPolicyDefinitionListResultPage struct {
28720	fn     func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
28721	sepdlr ServiceEndpointPolicyDefinitionListResult
28722}
28723
28724// NextWithContext advances to the next page of values.  If there was an error making
28725// the request the page does not advance and the error is returned.
28726func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
28727	if tracing.IsEnabled() {
28728		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext")
28729		defer func() {
28730			sc := -1
28731			if page.Response().Response.Response != nil {
28732				sc = page.Response().Response.Response.StatusCode
28733			}
28734			tracing.EndSpan(ctx, sc, err)
28735		}()
28736	}
28737	for {
28738		next, err := page.fn(ctx, page.sepdlr)
28739		if err != nil {
28740			return err
28741		}
28742		page.sepdlr = next
28743		if !next.hasNextLink() || !next.IsEmpty() {
28744			break
28745		}
28746	}
28747	return nil
28748}
28749
28750// Next advances to the next page of values.  If there was an error making
28751// the request the page does not advance and the error is returned.
28752// Deprecated: Use NextWithContext() instead.
28753func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
28754	return page.NextWithContext(context.Background())
28755}
28756
28757// NotDone returns true if the page enumeration should be started or is not yet complete.
28758func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
28759	return !page.sepdlr.IsEmpty()
28760}
28761
28762// Response returns the raw server response from the last page request.
28763func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult {
28764	return page.sepdlr
28765}
28766
28767// Values returns the slice of values for the current page or nil if there are no values.
28768func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition {
28769	if page.sepdlr.IsEmpty() {
28770		return nil
28771	}
28772	return *page.sepdlr.Value
28773}
28774
28775// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
28776func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
28777	return ServiceEndpointPolicyDefinitionListResultPage{
28778		fn:     getNextPage,
28779		sepdlr: cur,
28780	}
28781}
28782
28783// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
28784type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
28785	// Description - A description for this rule. Restricted to 140 chars.
28786	Description *string `json:"description,omitempty"`
28787	// Service - Service endpoint name.
28788	Service *string `json:"service,omitempty"`
28789	// ServiceResources - A list of service resources.
28790	ServiceResources *[]string `json:"serviceResources,omitempty"`
28791	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy definition resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
28792	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28793}
28794
28795// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat.
28796func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) {
28797	objectMap := make(map[string]interface{})
28798	if sepdpf.Description != nil {
28799		objectMap["description"] = sepdpf.Description
28800	}
28801	if sepdpf.Service != nil {
28802		objectMap["service"] = sepdpf.Service
28803	}
28804	if sepdpf.ServiceResources != nil {
28805		objectMap["serviceResources"] = sepdpf.ServiceResources
28806	}
28807	return json.Marshal(objectMap)
28808}
28809
28810// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
28811// results of a long-running operation.
28812type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
28813	azure.FutureAPI
28814	// Result returns the result of the asynchronous operation.
28815	// If the operation has not completed it will return an error.
28816	Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error)
28817}
28818
28819// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
28820// a long-running operation.
28821type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
28822	azure.FutureAPI
28823	// Result returns the result of the asynchronous operation.
28824	// If the operation has not completed it will return an error.
28825	Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error)
28826}
28827
28828// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
28829type ServiceEndpointPolicyListResult struct {
28830	autorest.Response `json:"-"`
28831	// Value - A list of ServiceEndpointPolicy resources.
28832	Value *[]ServiceEndpointPolicy `json:"value,omitempty"`
28833	// NextLink - READ-ONLY; The URL to get the next set of results.
28834	NextLink *string `json:"nextLink,omitempty"`
28835}
28836
28837// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult.
28838func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) {
28839	objectMap := make(map[string]interface{})
28840	if seplr.Value != nil {
28841		objectMap["value"] = seplr.Value
28842	}
28843	return json.Marshal(objectMap)
28844}
28845
28846// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
28847// values.
28848type ServiceEndpointPolicyListResultIterator struct {
28849	i    int
28850	page ServiceEndpointPolicyListResultPage
28851}
28852
28853// NextWithContext advances to the next value.  If there was an error making
28854// the request the iterator does not advance and the error is returned.
28855func (iter *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
28856	if tracing.IsEnabled() {
28857		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.NextWithContext")
28858		defer func() {
28859			sc := -1
28860			if iter.Response().Response.Response != nil {
28861				sc = iter.Response().Response.Response.StatusCode
28862			}
28863			tracing.EndSpan(ctx, sc, err)
28864		}()
28865	}
28866	iter.i++
28867	if iter.i < len(iter.page.Values()) {
28868		return nil
28869	}
28870	err = iter.page.NextWithContext(ctx)
28871	if err != nil {
28872		iter.i--
28873		return err
28874	}
28875	iter.i = 0
28876	return nil
28877}
28878
28879// Next advances to the next value.  If there was an error making
28880// the request the iterator does not advance and the error is returned.
28881// Deprecated: Use NextWithContext() instead.
28882func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
28883	return iter.NextWithContext(context.Background())
28884}
28885
28886// NotDone returns true if the enumeration should be started or is not yet complete.
28887func (iter ServiceEndpointPolicyListResultIterator) NotDone() bool {
28888	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28889}
28890
28891// Response returns the raw server response from the last page request.
28892func (iter ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult {
28893	return iter.page.Response()
28894}
28895
28896// Value returns the current value or a zero-initialized value if the
28897// iterator has advanced beyond the end of the collection.
28898func (iter ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy {
28899	if !iter.page.NotDone() {
28900		return ServiceEndpointPolicy{}
28901	}
28902	return iter.page.Values()[iter.i]
28903}
28904
28905// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
28906func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
28907	return ServiceEndpointPolicyListResultIterator{page: page}
28908}
28909
28910// IsEmpty returns true if the ListResult contains no values.
28911func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
28912	return seplr.Value == nil || len(*seplr.Value) == 0
28913}
28914
28915// hasNextLink returns true if the NextLink is not empty.
28916func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool {
28917	return seplr.NextLink != nil && len(*seplr.NextLink) != 0
28918}
28919
28920// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
28921// It returns nil if no more results exist.
28922func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
28923	if !seplr.hasNextLink() {
28924		return nil, nil
28925	}
28926	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28927		autorest.AsJSON(),
28928		autorest.AsGet(),
28929		autorest.WithBaseURL(to.String(seplr.NextLink)))
28930}
28931
28932// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
28933type ServiceEndpointPolicyListResultPage struct {
28934	fn    func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
28935	seplr ServiceEndpointPolicyListResult
28936}
28937
28938// NextWithContext advances to the next page of values.  If there was an error making
28939// the request the page does not advance and the error is returned.
28940func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
28941	if tracing.IsEnabled() {
28942		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext")
28943		defer func() {
28944			sc := -1
28945			if page.Response().Response.Response != nil {
28946				sc = page.Response().Response.Response.StatusCode
28947			}
28948			tracing.EndSpan(ctx, sc, err)
28949		}()
28950	}
28951	for {
28952		next, err := page.fn(ctx, page.seplr)
28953		if err != nil {
28954			return err
28955		}
28956		page.seplr = next
28957		if !next.hasNextLink() || !next.IsEmpty() {
28958			break
28959		}
28960	}
28961	return nil
28962}
28963
28964// Next advances to the next page of values.  If there was an error making
28965// the request the page does not advance and the error is returned.
28966// Deprecated: Use NextWithContext() instead.
28967func (page *ServiceEndpointPolicyListResultPage) Next() error {
28968	return page.NextWithContext(context.Background())
28969}
28970
28971// NotDone returns true if the page enumeration should be started or is not yet complete.
28972func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
28973	return !page.seplr.IsEmpty()
28974}
28975
28976// Response returns the raw server response from the last page request.
28977func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult {
28978	return page.seplr
28979}
28980
28981// Values returns the slice of values for the current page or nil if there are no values.
28982func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy {
28983	if page.seplr.IsEmpty() {
28984		return nil
28985	}
28986	return *page.seplr.Value
28987}
28988
28989// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
28990func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
28991	return ServiceEndpointPolicyListResultPage{
28992		fn:    getNextPage,
28993		seplr: cur,
28994	}
28995}
28996
28997// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
28998type ServiceEndpointPolicyPropertiesFormat struct {
28999	// ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
29000	ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"`
29001	// Subnets - READ-ONLY; A collection of references to subnets.
29002	Subnets *[]Subnet `json:"subnets,omitempty"`
29003	// ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource.
29004	ResourceGUID *string `json:"resourceGuid,omitempty"`
29005	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29006	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29007}
29008
29009// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat.
29010func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
29011	objectMap := make(map[string]interface{})
29012	if seppf.ServiceEndpointPolicyDefinitions != nil {
29013		objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions
29014	}
29015	return json.Marshal(objectMap)
29016}
29017
29018// ServiceEndpointPropertiesFormat the service endpoint properties.
29019type ServiceEndpointPropertiesFormat struct {
29020	// Service - The type of the endpoint service.
29021	Service *string `json:"service,omitempty"`
29022	// Locations - A list of locations.
29023	Locations *[]string `json:"locations,omitempty"`
29024	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29025	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29026}
29027
29028// MarshalJSON is the custom marshaler for ServiceEndpointPropertiesFormat.
29029func (sepf ServiceEndpointPropertiesFormat) MarshalJSON() ([]byte, error) {
29030	objectMap := make(map[string]interface{})
29031	if sepf.Service != nil {
29032		objectMap["service"] = sepf.Service
29033	}
29034	if sepf.Locations != nil {
29035		objectMap["locations"] = sepf.Locations
29036	}
29037	return json.Marshal(objectMap)
29038}
29039
29040// ServiceTagInformation the service tag information.
29041type ServiceTagInformation struct {
29042	// Properties - READ-ONLY; Properties of the service tag information.
29043	Properties *ServiceTagInformationPropertiesFormat `json:"properties,omitempty"`
29044	// Name - READ-ONLY; The name of service tag.
29045	Name *string `json:"name,omitempty"`
29046	// ID - READ-ONLY; The ID of service tag.
29047	ID *string `json:"id,omitempty"`
29048}
29049
29050// ServiceTagInformationPropertiesFormat properties of the service tag information.
29051type ServiceTagInformationPropertiesFormat struct {
29052	// ChangeNumber - READ-ONLY; The iteration number of service tag.
29053	ChangeNumber *string `json:"changeNumber,omitempty"`
29054	// Region - READ-ONLY; The region of service tag.
29055	Region *string `json:"region,omitempty"`
29056	// SystemService - READ-ONLY; The name of system service.
29057	SystemService *string `json:"systemService,omitempty"`
29058	// AddressPrefixes - READ-ONLY; The list of IP address prefixes.
29059	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
29060}
29061
29062// ServiceTagsListResult response for the ListServiceTags API service call.
29063type ServiceTagsListResult struct {
29064	autorest.Response `json:"-"`
29065	// Name - READ-ONLY; The name of the cloud.
29066	Name *string `json:"name,omitempty"`
29067	// ID - READ-ONLY; The ID of the cloud.
29068	ID *string `json:"id,omitempty"`
29069	// Type - READ-ONLY; The azure resource type.
29070	Type *string `json:"type,omitempty"`
29071	// ChangeNumber - READ-ONLY; The iteration number.
29072	ChangeNumber *string `json:"changeNumber,omitempty"`
29073	// Cloud - READ-ONLY; The name of the cloud.
29074	Cloud *string `json:"cloud,omitempty"`
29075	// Values - READ-ONLY; The list of service tag information resources.
29076	Values *[]ServiceTagInformation `json:"values,omitempty"`
29077}
29078
29079// SessionIds list of session IDs.
29080type SessionIds struct {
29081	// SessionIds - List of session IDs.
29082	SessionIds *[]string `json:"sessionIds,omitempty"`
29083}
29084
29085// String ...
29086type String struct {
29087	autorest.Response `json:"-"`
29088	Value             *string `json:"value,omitempty"`
29089}
29090
29091// Subnet subnet in a virtual network resource.
29092type Subnet struct {
29093	autorest.Response `json:"-"`
29094	// SubnetPropertiesFormat - Properties of the subnet.
29095	*SubnetPropertiesFormat `json:"properties,omitempty"`
29096	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29097	Name *string `json:"name,omitempty"`
29098	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29099	Etag *string `json:"etag,omitempty"`
29100	// ID - Resource ID.
29101	ID *string `json:"id,omitempty"`
29102}
29103
29104// MarshalJSON is the custom marshaler for Subnet.
29105func (s Subnet) MarshalJSON() ([]byte, error) {
29106	objectMap := make(map[string]interface{})
29107	if s.SubnetPropertiesFormat != nil {
29108		objectMap["properties"] = s.SubnetPropertiesFormat
29109	}
29110	if s.Name != nil {
29111		objectMap["name"] = s.Name
29112	}
29113	if s.ID != nil {
29114		objectMap["id"] = s.ID
29115	}
29116	return json.Marshal(objectMap)
29117}
29118
29119// UnmarshalJSON is the custom unmarshaler for Subnet struct.
29120func (s *Subnet) UnmarshalJSON(body []byte) error {
29121	var m map[string]*json.RawMessage
29122	err := json.Unmarshal(body, &m)
29123	if err != nil {
29124		return err
29125	}
29126	for k, v := range m {
29127		switch k {
29128		case "properties":
29129			if v != nil {
29130				var subnetPropertiesFormat SubnetPropertiesFormat
29131				err = json.Unmarshal(*v, &subnetPropertiesFormat)
29132				if err != nil {
29133					return err
29134				}
29135				s.SubnetPropertiesFormat = &subnetPropertiesFormat
29136			}
29137		case "name":
29138			if v != nil {
29139				var name string
29140				err = json.Unmarshal(*v, &name)
29141				if err != nil {
29142					return err
29143				}
29144				s.Name = &name
29145			}
29146		case "etag":
29147			if v != nil {
29148				var etag string
29149				err = json.Unmarshal(*v, &etag)
29150				if err != nil {
29151					return err
29152				}
29153				s.Etag = &etag
29154			}
29155		case "id":
29156			if v != nil {
29157				var ID string
29158				err = json.Unmarshal(*v, &ID)
29159				if err != nil {
29160					return err
29161				}
29162				s.ID = &ID
29163			}
29164		}
29165	}
29166
29167	return nil
29168}
29169
29170// SubnetAssociation subnet and it's custom security rules.
29171type SubnetAssociation struct {
29172	// ID - READ-ONLY; Subnet ID.
29173	ID *string `json:"id,omitempty"`
29174	// SecurityRules - Collection of custom security rules.
29175	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
29176}
29177
29178// MarshalJSON is the custom marshaler for SubnetAssociation.
29179func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
29180	objectMap := make(map[string]interface{})
29181	if sa.SecurityRules != nil {
29182		objectMap["securityRules"] = sa.SecurityRules
29183	}
29184	return json.Marshal(objectMap)
29185}
29186
29187// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
29188// network.
29189type SubnetListResult struct {
29190	autorest.Response `json:"-"`
29191	// Value - The subnets in a virtual network.
29192	Value *[]Subnet `json:"value,omitempty"`
29193	// NextLink - The URL to get the next set of results.
29194	NextLink *string `json:"nextLink,omitempty"`
29195}
29196
29197// SubnetListResultIterator provides access to a complete listing of Subnet values.
29198type SubnetListResultIterator struct {
29199	i    int
29200	page SubnetListResultPage
29201}
29202
29203// NextWithContext advances to the next value.  If there was an error making
29204// the request the iterator does not advance and the error is returned.
29205func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
29206	if tracing.IsEnabled() {
29207		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
29208		defer func() {
29209			sc := -1
29210			if iter.Response().Response.Response != nil {
29211				sc = iter.Response().Response.Response.StatusCode
29212			}
29213			tracing.EndSpan(ctx, sc, err)
29214		}()
29215	}
29216	iter.i++
29217	if iter.i < len(iter.page.Values()) {
29218		return nil
29219	}
29220	err = iter.page.NextWithContext(ctx)
29221	if err != nil {
29222		iter.i--
29223		return err
29224	}
29225	iter.i = 0
29226	return nil
29227}
29228
29229// Next advances to the next value.  If there was an error making
29230// the request the iterator does not advance and the error is returned.
29231// Deprecated: Use NextWithContext() instead.
29232func (iter *SubnetListResultIterator) Next() error {
29233	return iter.NextWithContext(context.Background())
29234}
29235
29236// NotDone returns true if the enumeration should be started or is not yet complete.
29237func (iter SubnetListResultIterator) NotDone() bool {
29238	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29239}
29240
29241// Response returns the raw server response from the last page request.
29242func (iter SubnetListResultIterator) Response() SubnetListResult {
29243	return iter.page.Response()
29244}
29245
29246// Value returns the current value or a zero-initialized value if the
29247// iterator has advanced beyond the end of the collection.
29248func (iter SubnetListResultIterator) Value() Subnet {
29249	if !iter.page.NotDone() {
29250		return Subnet{}
29251	}
29252	return iter.page.Values()[iter.i]
29253}
29254
29255// Creates a new instance of the SubnetListResultIterator type.
29256func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
29257	return SubnetListResultIterator{page: page}
29258}
29259
29260// IsEmpty returns true if the ListResult contains no values.
29261func (slr SubnetListResult) IsEmpty() bool {
29262	return slr.Value == nil || len(*slr.Value) == 0
29263}
29264
29265// hasNextLink returns true if the NextLink is not empty.
29266func (slr SubnetListResult) hasNextLink() bool {
29267	return slr.NextLink != nil && len(*slr.NextLink) != 0
29268}
29269
29270// subnetListResultPreparer prepares a request to retrieve the next set of results.
29271// It returns nil if no more results exist.
29272func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
29273	if !slr.hasNextLink() {
29274		return nil, nil
29275	}
29276	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29277		autorest.AsJSON(),
29278		autorest.AsGet(),
29279		autorest.WithBaseURL(to.String(slr.NextLink)))
29280}
29281
29282// SubnetListResultPage contains a page of Subnet values.
29283type SubnetListResultPage struct {
29284	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
29285	slr SubnetListResult
29286}
29287
29288// NextWithContext advances to the next page of values.  If there was an error making
29289// the request the page does not advance and the error is returned.
29290func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
29291	if tracing.IsEnabled() {
29292		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
29293		defer func() {
29294			sc := -1
29295			if page.Response().Response.Response != nil {
29296				sc = page.Response().Response.Response.StatusCode
29297			}
29298			tracing.EndSpan(ctx, sc, err)
29299		}()
29300	}
29301	for {
29302		next, err := page.fn(ctx, page.slr)
29303		if err != nil {
29304			return err
29305		}
29306		page.slr = next
29307		if !next.hasNextLink() || !next.IsEmpty() {
29308			break
29309		}
29310	}
29311	return nil
29312}
29313
29314// Next advances to the next page of values.  If there was an error making
29315// the request the page does not advance and the error is returned.
29316// Deprecated: Use NextWithContext() instead.
29317func (page *SubnetListResultPage) Next() error {
29318	return page.NextWithContext(context.Background())
29319}
29320
29321// NotDone returns true if the page enumeration should be started or is not yet complete.
29322func (page SubnetListResultPage) NotDone() bool {
29323	return !page.slr.IsEmpty()
29324}
29325
29326// Response returns the raw server response from the last page request.
29327func (page SubnetListResultPage) Response() SubnetListResult {
29328	return page.slr
29329}
29330
29331// Values returns the slice of values for the current page or nil if there are no values.
29332func (page SubnetListResultPage) Values() []Subnet {
29333	if page.slr.IsEmpty() {
29334		return nil
29335	}
29336	return *page.slr.Value
29337}
29338
29339// Creates a new instance of the SubnetListResultPage type.
29340func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
29341	return SubnetListResultPage{
29342		fn:  getNextPage,
29343		slr: cur,
29344	}
29345}
29346
29347// SubnetPropertiesFormat properties of the subnet.
29348type SubnetPropertiesFormat struct {
29349	// AddressPrefix - The address prefix for the subnet.
29350	AddressPrefix *string `json:"addressPrefix,omitempty"`
29351	// AddressPrefixes - List of address prefixes for the subnet.
29352	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
29353	// NetworkSecurityGroup - The reference to the NetworkSecurityGroup resource.
29354	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
29355	// RouteTable - The reference to the RouteTable resource.
29356	RouteTable *RouteTable `json:"routeTable,omitempty"`
29357	// NatGateway - Nat gateway associated with this subnet.
29358	NatGateway *SubResource `json:"natGateway,omitempty"`
29359	// ServiceEndpoints - An array of service endpoints.
29360	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
29361	// ServiceEndpointPolicies - An array of service endpoint policies.
29362	ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"`
29363	// PrivateEndpoints - READ-ONLY; An array of references to private endpoints.
29364	PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"`
29365	// IPConfigurations - READ-ONLY; An array of references to the network interface IP configurations using subnet.
29366	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
29367	// IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet.
29368	IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"`
29369	// IPAllocations - Array of IpAllocation which reference this subnet.
29370	IPAllocations *[]SubResource `json:"ipAllocations,omitempty"`
29371	// ResourceNavigationLinks - READ-ONLY; An array of references to the external resources using subnet.
29372	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
29373	// ServiceAssociationLinks - READ-ONLY; An array of references to services injecting into this subnet.
29374	ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"`
29375	// Delegations - An array of references to the delegations on the subnet.
29376	Delegations *[]Delegation `json:"delegations,omitempty"`
29377	// Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.
29378	Purpose *string `json:"purpose,omitempty"`
29379	// ProvisioningState - READ-ONLY; The provisioning state of the subnet resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29380	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29381	// PrivateEndpointNetworkPolicies - Enable or Disable apply network policies on private end point in the subnet.
29382	PrivateEndpointNetworkPolicies *string `json:"privateEndpointNetworkPolicies,omitempty"`
29383	// PrivateLinkServiceNetworkPolicies - Enable or Disable apply network policies on private link service in the subnet.
29384	PrivateLinkServiceNetworkPolicies *string `json:"privateLinkServiceNetworkPolicies,omitempty"`
29385}
29386
29387// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
29388func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
29389	objectMap := make(map[string]interface{})
29390	if spf.AddressPrefix != nil {
29391		objectMap["addressPrefix"] = spf.AddressPrefix
29392	}
29393	if spf.AddressPrefixes != nil {
29394		objectMap["addressPrefixes"] = spf.AddressPrefixes
29395	}
29396	if spf.NetworkSecurityGroup != nil {
29397		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
29398	}
29399	if spf.RouteTable != nil {
29400		objectMap["routeTable"] = spf.RouteTable
29401	}
29402	if spf.NatGateway != nil {
29403		objectMap["natGateway"] = spf.NatGateway
29404	}
29405	if spf.ServiceEndpoints != nil {
29406		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
29407	}
29408	if spf.ServiceEndpointPolicies != nil {
29409		objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies
29410	}
29411	if spf.IPAllocations != nil {
29412		objectMap["ipAllocations"] = spf.IPAllocations
29413	}
29414	if spf.Delegations != nil {
29415		objectMap["delegations"] = spf.Delegations
29416	}
29417	if spf.PrivateEndpointNetworkPolicies != nil {
29418		objectMap["privateEndpointNetworkPolicies"] = spf.PrivateEndpointNetworkPolicies
29419	}
29420	if spf.PrivateLinkServiceNetworkPolicies != nil {
29421		objectMap["privateLinkServiceNetworkPolicies"] = spf.PrivateLinkServiceNetworkPolicies
29422	}
29423	return json.Marshal(objectMap)
29424}
29425
29426// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
29427// operation.
29428type SubnetsCreateOrUpdateFuture struct {
29429	azure.FutureAPI
29430	// Result returns the result of the asynchronous operation.
29431	// If the operation has not completed it will return an error.
29432	Result func(SubnetsClient) (Subnet, error)
29433}
29434
29435// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29436// operation.
29437type SubnetsDeleteFuture struct {
29438	azure.FutureAPI
29439	// Result returns the result of the asynchronous operation.
29440	// If the operation has not completed it will return an error.
29441	Result func(SubnetsClient) (autorest.Response, error)
29442}
29443
29444// SubnetsPrepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
29445// long-running operation.
29446type SubnetsPrepareNetworkPoliciesFuture struct {
29447	azure.FutureAPI
29448	// Result returns the result of the asynchronous operation.
29449	// If the operation has not completed it will return an error.
29450	Result func(SubnetsClient) (autorest.Response, error)
29451}
29452
29453// SubnetsUnprepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
29454// long-running operation.
29455type SubnetsUnprepareNetworkPoliciesFuture struct {
29456	azure.FutureAPI
29457	// Result returns the result of the asynchronous operation.
29458	// If the operation has not completed it will return an error.
29459	Result func(SubnetsClient) (autorest.Response, error)
29460}
29461
29462// SubResource reference to another subresource.
29463type SubResource struct {
29464	// ID - Resource ID.
29465	ID *string `json:"id,omitempty"`
29466}
29467
29468// TagsObject tags object for patch operations.
29469type TagsObject struct {
29470	// Tags - Resource tags.
29471	Tags map[string]*string `json:"tags"`
29472}
29473
29474// MarshalJSON is the custom marshaler for TagsObject.
29475func (toVar TagsObject) MarshalJSON() ([]byte, error) {
29476	objectMap := make(map[string]interface{})
29477	if toVar.Tags != nil {
29478		objectMap["tags"] = toVar.Tags
29479	}
29480	return json.Marshal(objectMap)
29481}
29482
29483// Topology topology of the specified resource group.
29484type Topology struct {
29485	autorest.Response `json:"-"`
29486	// ID - READ-ONLY; GUID representing the operation id.
29487	ID *string `json:"id,omitempty"`
29488	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
29489	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
29490	// LastModified - READ-ONLY; The datetime when the topology was last modified.
29491	LastModified *date.Time `json:"lastModified,omitempty"`
29492	// Resources - A list of topology resources.
29493	Resources *[]TopologyResource `json:"resources,omitempty"`
29494}
29495
29496// MarshalJSON is the custom marshaler for Topology.
29497func (t Topology) MarshalJSON() ([]byte, error) {
29498	objectMap := make(map[string]interface{})
29499	if t.Resources != nil {
29500		objectMap["resources"] = t.Resources
29501	}
29502	return json.Marshal(objectMap)
29503}
29504
29505// TopologyAssociation resources that have an association with the parent resource.
29506type TopologyAssociation struct {
29507	// Name - The name of the resource that is associated with the parent resource.
29508	Name *string `json:"name,omitempty"`
29509	// ResourceID - The ID of the resource that is associated with the parent resource.
29510	ResourceID *string `json:"resourceId,omitempty"`
29511	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
29512	AssociationType AssociationType `json:"associationType,omitempty"`
29513}
29514
29515// TopologyParameters parameters that define the representation of topology.
29516type TopologyParameters struct {
29517	// TargetResourceGroupName - The name of the target resource group to perform topology on.
29518	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
29519	// TargetVirtualNetwork - The reference to the Virtual Network resource.
29520	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
29521	// TargetSubnet - The reference to the Subnet resource.
29522	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
29523}
29524
29525// TopologyResource the network resource topology information for the given resource group.
29526type TopologyResource struct {
29527	// Name - Name of the resource.
29528	Name *string `json:"name,omitempty"`
29529	// ID - ID of the resource.
29530	ID *string `json:"id,omitempty"`
29531	// Location - Resource location.
29532	Location *string `json:"location,omitempty"`
29533	// Associations - Holds the associations the resource has with other resources in the resource group.
29534	Associations *[]TopologyAssociation `json:"associations,omitempty"`
29535}
29536
29537// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
29538type TrafficAnalyticsConfigurationProperties struct {
29539	// Enabled - Flag to enable/disable traffic analytics.
29540	Enabled *bool `json:"enabled,omitempty"`
29541	// WorkspaceID - The resource guid of the attached workspace.
29542	WorkspaceID *string `json:"workspaceId,omitempty"`
29543	// WorkspaceRegion - The location of the attached workspace.
29544	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
29545	// WorkspaceResourceID - Resource Id of the attached workspace.
29546	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
29547	// TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics.
29548	TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"`
29549}
29550
29551// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
29552type TrafficAnalyticsProperties struct {
29553	// NetworkWatcherFlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
29554	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
29555}
29556
29557// TrafficSelectorPolicy an traffic selector policy for a virtual network gateway connection.
29558type TrafficSelectorPolicy struct {
29559	// LocalAddressRanges - A collection of local address spaces in CIDR format.
29560	LocalAddressRanges *[]string `json:"localAddressRanges,omitempty"`
29561	// RemoteAddressRanges - A collection of remote address spaces in CIDR format.
29562	RemoteAddressRanges *[]string `json:"remoteAddressRanges,omitempty"`
29563}
29564
29565// TroubleshootingDetails information gained from troubleshooting of specified resource.
29566type TroubleshootingDetails struct {
29567	// ID - The id of the get troubleshoot operation.
29568	ID *string `json:"id,omitempty"`
29569	// ReasonType - Reason type of failure.
29570	ReasonType *string `json:"reasonType,omitempty"`
29571	// Summary - A summary of troubleshooting.
29572	Summary *string `json:"summary,omitempty"`
29573	// Detail - Details on troubleshooting results.
29574	Detail *string `json:"detail,omitempty"`
29575	// RecommendedActions - List of recommended actions.
29576	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
29577}
29578
29579// TroubleshootingParameters parameters that define the resource to troubleshoot.
29580type TroubleshootingParameters struct {
29581	// TargetResourceID - The target resource to troubleshoot.
29582	TargetResourceID *string `json:"targetResourceId,omitempty"`
29583	// TroubleshootingProperties - Properties of the troubleshooting resource.
29584	*TroubleshootingProperties `json:"properties,omitempty"`
29585}
29586
29587// MarshalJSON is the custom marshaler for TroubleshootingParameters.
29588func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
29589	objectMap := make(map[string]interface{})
29590	if tp.TargetResourceID != nil {
29591		objectMap["targetResourceId"] = tp.TargetResourceID
29592	}
29593	if tp.TroubleshootingProperties != nil {
29594		objectMap["properties"] = tp.TroubleshootingProperties
29595	}
29596	return json.Marshal(objectMap)
29597}
29598
29599// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
29600func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
29601	var m map[string]*json.RawMessage
29602	err := json.Unmarshal(body, &m)
29603	if err != nil {
29604		return err
29605	}
29606	for k, v := range m {
29607		switch k {
29608		case "targetResourceId":
29609			if v != nil {
29610				var targetResourceID string
29611				err = json.Unmarshal(*v, &targetResourceID)
29612				if err != nil {
29613					return err
29614				}
29615				tp.TargetResourceID = &targetResourceID
29616			}
29617		case "properties":
29618			if v != nil {
29619				var troubleshootingProperties TroubleshootingProperties
29620				err = json.Unmarshal(*v, &troubleshootingProperties)
29621				if err != nil {
29622					return err
29623				}
29624				tp.TroubleshootingProperties = &troubleshootingProperties
29625			}
29626		}
29627	}
29628
29629	return nil
29630}
29631
29632// TroubleshootingProperties storage location provided for troubleshoot.
29633type TroubleshootingProperties struct {
29634	// StorageID - The ID for the storage account to save the troubleshoot result.
29635	StorageID *string `json:"storageId,omitempty"`
29636	// StoragePath - The path to the blob to save the troubleshoot result in.
29637	StoragePath *string `json:"storagePath,omitempty"`
29638}
29639
29640// TroubleshootingRecommendedActions recommended actions based on discovered issues.
29641type TroubleshootingRecommendedActions struct {
29642	// ActionID - ID of the recommended action.
29643	ActionID *string `json:"actionId,omitempty"`
29644	// ActionText - Description of recommended actions.
29645	ActionText *string `json:"actionText,omitempty"`
29646	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
29647	ActionURI *string `json:"actionUri,omitempty"`
29648	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
29649	ActionURIText *string `json:"actionUriText,omitempty"`
29650}
29651
29652// TroubleshootingResult troubleshooting information gained from specified resource.
29653type TroubleshootingResult struct {
29654	autorest.Response `json:"-"`
29655	// StartTime - The start time of the troubleshooting.
29656	StartTime *date.Time `json:"startTime,omitempty"`
29657	// EndTime - The end time of the troubleshooting.
29658	EndTime *date.Time `json:"endTime,omitempty"`
29659	// Code - The result code of the troubleshooting.
29660	Code *string `json:"code,omitempty"`
29661	// Results - Information from troubleshooting.
29662	Results *[]TroubleshootingDetails `json:"results,omitempty"`
29663}
29664
29665// TunnelConnectionHealth virtualNetworkGatewayConnection properties.
29666type TunnelConnectionHealth struct {
29667	// Tunnel - READ-ONLY; Tunnel name.
29668	Tunnel *string `json:"tunnel,omitempty"`
29669	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
29670	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
29671	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection.
29672	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
29673	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection.
29674	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
29675	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
29676	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
29677}
29678
29679// UnprepareNetworkPoliciesRequest details of UnprepareNetworkPolicies for Subnet.
29680type UnprepareNetworkPoliciesRequest struct {
29681	// ServiceName - The name of the service for which subnet is being unprepared for.
29682	ServiceName *string `json:"serviceName,omitempty"`
29683}
29684
29685// Usage the network resource usage.
29686type Usage struct {
29687	// ID - READ-ONLY; Resource identifier.
29688	ID *string `json:"id,omitempty"`
29689	// Unit - An enum describing the unit of measurement.
29690	Unit *string `json:"unit,omitempty"`
29691	// CurrentValue - The current value of the usage.
29692	CurrentValue *int64 `json:"currentValue,omitempty"`
29693	// Limit - The limit of usage.
29694	Limit *int64 `json:"limit,omitempty"`
29695	// Name - The name of the type of usage.
29696	Name *UsageName `json:"name,omitempty"`
29697}
29698
29699// MarshalJSON is the custom marshaler for Usage.
29700func (u Usage) MarshalJSON() ([]byte, error) {
29701	objectMap := make(map[string]interface{})
29702	if u.Unit != nil {
29703		objectMap["unit"] = u.Unit
29704	}
29705	if u.CurrentValue != nil {
29706		objectMap["currentValue"] = u.CurrentValue
29707	}
29708	if u.Limit != nil {
29709		objectMap["limit"] = u.Limit
29710	}
29711	if u.Name != nil {
29712		objectMap["name"] = u.Name
29713	}
29714	return json.Marshal(objectMap)
29715}
29716
29717// UsageName the usage names.
29718type UsageName struct {
29719	// Value - A string describing the resource name.
29720	Value *string `json:"value,omitempty"`
29721	// LocalizedValue - A localized string describing the resource name.
29722	LocalizedValue *string `json:"localizedValue,omitempty"`
29723}
29724
29725// UsagesListResult the list usages operation response.
29726type UsagesListResult struct {
29727	autorest.Response `json:"-"`
29728	// Value - The list network resource usages.
29729	Value *[]Usage `json:"value,omitempty"`
29730	// NextLink - URL to get the next set of results.
29731	NextLink *string `json:"nextLink,omitempty"`
29732}
29733
29734// UsagesListResultIterator provides access to a complete listing of Usage values.
29735type UsagesListResultIterator struct {
29736	i    int
29737	page UsagesListResultPage
29738}
29739
29740// NextWithContext advances to the next value.  If there was an error making
29741// the request the iterator does not advance and the error is returned.
29742func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
29743	if tracing.IsEnabled() {
29744		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
29745		defer func() {
29746			sc := -1
29747			if iter.Response().Response.Response != nil {
29748				sc = iter.Response().Response.Response.StatusCode
29749			}
29750			tracing.EndSpan(ctx, sc, err)
29751		}()
29752	}
29753	iter.i++
29754	if iter.i < len(iter.page.Values()) {
29755		return nil
29756	}
29757	err = iter.page.NextWithContext(ctx)
29758	if err != nil {
29759		iter.i--
29760		return err
29761	}
29762	iter.i = 0
29763	return nil
29764}
29765
29766// Next advances to the next value.  If there was an error making
29767// the request the iterator does not advance and the error is returned.
29768// Deprecated: Use NextWithContext() instead.
29769func (iter *UsagesListResultIterator) Next() error {
29770	return iter.NextWithContext(context.Background())
29771}
29772
29773// NotDone returns true if the enumeration should be started or is not yet complete.
29774func (iter UsagesListResultIterator) NotDone() bool {
29775	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29776}
29777
29778// Response returns the raw server response from the last page request.
29779func (iter UsagesListResultIterator) Response() UsagesListResult {
29780	return iter.page.Response()
29781}
29782
29783// Value returns the current value or a zero-initialized value if the
29784// iterator has advanced beyond the end of the collection.
29785func (iter UsagesListResultIterator) Value() Usage {
29786	if !iter.page.NotDone() {
29787		return Usage{}
29788	}
29789	return iter.page.Values()[iter.i]
29790}
29791
29792// Creates a new instance of the UsagesListResultIterator type.
29793func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
29794	return UsagesListResultIterator{page: page}
29795}
29796
29797// IsEmpty returns true if the ListResult contains no values.
29798func (ulr UsagesListResult) IsEmpty() bool {
29799	return ulr.Value == nil || len(*ulr.Value) == 0
29800}
29801
29802// hasNextLink returns true if the NextLink is not empty.
29803func (ulr UsagesListResult) hasNextLink() bool {
29804	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
29805}
29806
29807// usagesListResultPreparer prepares a request to retrieve the next set of results.
29808// It returns nil if no more results exist.
29809func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
29810	if !ulr.hasNextLink() {
29811		return nil, nil
29812	}
29813	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29814		autorest.AsJSON(),
29815		autorest.AsGet(),
29816		autorest.WithBaseURL(to.String(ulr.NextLink)))
29817}
29818
29819// UsagesListResultPage contains a page of Usage values.
29820type UsagesListResultPage struct {
29821	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
29822	ulr UsagesListResult
29823}
29824
29825// NextWithContext advances to the next page of values.  If there was an error making
29826// the request the page does not advance and the error is returned.
29827func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
29828	if tracing.IsEnabled() {
29829		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
29830		defer func() {
29831			sc := -1
29832			if page.Response().Response.Response != nil {
29833				sc = page.Response().Response.Response.StatusCode
29834			}
29835			tracing.EndSpan(ctx, sc, err)
29836		}()
29837	}
29838	for {
29839		next, err := page.fn(ctx, page.ulr)
29840		if err != nil {
29841			return err
29842		}
29843		page.ulr = next
29844		if !next.hasNextLink() || !next.IsEmpty() {
29845			break
29846		}
29847	}
29848	return nil
29849}
29850
29851// Next advances to the next page of values.  If there was an error making
29852// the request the page does not advance and the error is returned.
29853// Deprecated: Use NextWithContext() instead.
29854func (page *UsagesListResultPage) Next() error {
29855	return page.NextWithContext(context.Background())
29856}
29857
29858// NotDone returns true if the page enumeration should be started or is not yet complete.
29859func (page UsagesListResultPage) NotDone() bool {
29860	return !page.ulr.IsEmpty()
29861}
29862
29863// Response returns the raw server response from the last page request.
29864func (page UsagesListResultPage) Response() UsagesListResult {
29865	return page.ulr
29866}
29867
29868// Values returns the slice of values for the current page or nil if there are no values.
29869func (page UsagesListResultPage) Values() []Usage {
29870	if page.ulr.IsEmpty() {
29871		return nil
29872	}
29873	return *page.ulr.Value
29874}
29875
29876// Creates a new instance of the UsagesListResultPage type.
29877func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
29878	return UsagesListResultPage{
29879		fn:  getNextPage,
29880		ulr: cur,
29881	}
29882}
29883
29884// VerificationIPFlowParameters parameters that define the IP flow to be verified.
29885type VerificationIPFlowParameters struct {
29886	// TargetResourceID - The ID of the target resource to perform next-hop on.
29887	TargetResourceID *string `json:"targetResourceId,omitempty"`
29888	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
29889	Direction Direction `json:"direction,omitempty"`
29890	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
29891	Protocol IPFlowProtocol `json:"protocol,omitempty"`
29892	// 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.
29893	LocalPort *string `json:"localPort,omitempty"`
29894	// 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.
29895	RemotePort *string `json:"remotePort,omitempty"`
29896	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
29897	LocalIPAddress *string `json:"localIPAddress,omitempty"`
29898	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
29899	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
29900	// 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).
29901	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
29902}
29903
29904// VerificationIPFlowResult results of IP flow verification on the target resource.
29905type VerificationIPFlowResult struct {
29906	autorest.Response `json:"-"`
29907	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
29908	Access Access `json:"access,omitempty"`
29909	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
29910	RuleName *string `json:"ruleName,omitempty"`
29911}
29912
29913// VirtualAppliance networkVirtualAppliance Resource.
29914type VirtualAppliance struct {
29915	autorest.Response `json:"-"`
29916	// VirtualAppliancePropertiesFormat - Properties of the Network Virtual Appliance.
29917	*VirtualAppliancePropertiesFormat `json:"properties,omitempty"`
29918	// Identity - The service principal that has read access to cloud-init and config blob.
29919	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
29920	// Sku - Network Virtual Appliance SKU.
29921	Sku *VirtualApplianceSkuProperties `json:"sku,omitempty"`
29922	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29923	Etag *string `json:"etag,omitempty"`
29924	// ID - Resource ID.
29925	ID *string `json:"id,omitempty"`
29926	// Name - READ-ONLY; Resource name.
29927	Name *string `json:"name,omitempty"`
29928	// Type - READ-ONLY; Resource type.
29929	Type *string `json:"type,omitempty"`
29930	// Location - Resource location.
29931	Location *string `json:"location,omitempty"`
29932	// Tags - Resource tags.
29933	Tags map[string]*string `json:"tags"`
29934}
29935
29936// MarshalJSON is the custom marshaler for VirtualAppliance.
29937func (va VirtualAppliance) MarshalJSON() ([]byte, error) {
29938	objectMap := make(map[string]interface{})
29939	if va.VirtualAppliancePropertiesFormat != nil {
29940		objectMap["properties"] = va.VirtualAppliancePropertiesFormat
29941	}
29942	if va.Identity != nil {
29943		objectMap["identity"] = va.Identity
29944	}
29945	if va.Sku != nil {
29946		objectMap["sku"] = va.Sku
29947	}
29948	if va.ID != nil {
29949		objectMap["id"] = va.ID
29950	}
29951	if va.Location != nil {
29952		objectMap["location"] = va.Location
29953	}
29954	if va.Tags != nil {
29955		objectMap["tags"] = va.Tags
29956	}
29957	return json.Marshal(objectMap)
29958}
29959
29960// UnmarshalJSON is the custom unmarshaler for VirtualAppliance struct.
29961func (va *VirtualAppliance) UnmarshalJSON(body []byte) error {
29962	var m map[string]*json.RawMessage
29963	err := json.Unmarshal(body, &m)
29964	if err != nil {
29965		return err
29966	}
29967	for k, v := range m {
29968		switch k {
29969		case "properties":
29970			if v != nil {
29971				var virtualAppliancePropertiesFormat VirtualAppliancePropertiesFormat
29972				err = json.Unmarshal(*v, &virtualAppliancePropertiesFormat)
29973				if err != nil {
29974					return err
29975				}
29976				va.VirtualAppliancePropertiesFormat = &virtualAppliancePropertiesFormat
29977			}
29978		case "identity":
29979			if v != nil {
29980				var identity ManagedServiceIdentity
29981				err = json.Unmarshal(*v, &identity)
29982				if err != nil {
29983					return err
29984				}
29985				va.Identity = &identity
29986			}
29987		case "sku":
29988			if v != nil {
29989				var sku VirtualApplianceSkuProperties
29990				err = json.Unmarshal(*v, &sku)
29991				if err != nil {
29992					return err
29993				}
29994				va.Sku = &sku
29995			}
29996		case "etag":
29997			if v != nil {
29998				var etag string
29999				err = json.Unmarshal(*v, &etag)
30000				if err != nil {
30001					return err
30002				}
30003				va.Etag = &etag
30004			}
30005		case "id":
30006			if v != nil {
30007				var ID string
30008				err = json.Unmarshal(*v, &ID)
30009				if err != nil {
30010					return err
30011				}
30012				va.ID = &ID
30013			}
30014		case "name":
30015			if v != nil {
30016				var name string
30017				err = json.Unmarshal(*v, &name)
30018				if err != nil {
30019					return err
30020				}
30021				va.Name = &name
30022			}
30023		case "type":
30024			if v != nil {
30025				var typeVar string
30026				err = json.Unmarshal(*v, &typeVar)
30027				if err != nil {
30028					return err
30029				}
30030				va.Type = &typeVar
30031			}
30032		case "location":
30033			if v != nil {
30034				var location string
30035				err = json.Unmarshal(*v, &location)
30036				if err != nil {
30037					return err
30038				}
30039				va.Location = &location
30040			}
30041		case "tags":
30042			if v != nil {
30043				var tags map[string]*string
30044				err = json.Unmarshal(*v, &tags)
30045				if err != nil {
30046					return err
30047				}
30048				va.Tags = tags
30049			}
30050		}
30051	}
30052
30053	return nil
30054}
30055
30056// VirtualApplianceListResult response for ListNetworkVirtualAppliances API service call.
30057type VirtualApplianceListResult struct {
30058	autorest.Response `json:"-"`
30059	// Value - List of Network Virtual Appliances.
30060	Value *[]VirtualAppliance `json:"value,omitempty"`
30061	// NextLink - URL to get the next set of results.
30062	NextLink *string `json:"nextLink,omitempty"`
30063}
30064
30065// VirtualApplianceListResultIterator provides access to a complete listing of VirtualAppliance values.
30066type VirtualApplianceListResultIterator struct {
30067	i    int
30068	page VirtualApplianceListResultPage
30069}
30070
30071// NextWithContext advances to the next value.  If there was an error making
30072// the request the iterator does not advance and the error is returned.
30073func (iter *VirtualApplianceListResultIterator) NextWithContext(ctx context.Context) (err error) {
30074	if tracing.IsEnabled() {
30075		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceListResultIterator.NextWithContext")
30076		defer func() {
30077			sc := -1
30078			if iter.Response().Response.Response != nil {
30079				sc = iter.Response().Response.Response.StatusCode
30080			}
30081			tracing.EndSpan(ctx, sc, err)
30082		}()
30083	}
30084	iter.i++
30085	if iter.i < len(iter.page.Values()) {
30086		return nil
30087	}
30088	err = iter.page.NextWithContext(ctx)
30089	if err != nil {
30090		iter.i--
30091		return err
30092	}
30093	iter.i = 0
30094	return nil
30095}
30096
30097// Next advances to the next value.  If there was an error making
30098// the request the iterator does not advance and the error is returned.
30099// Deprecated: Use NextWithContext() instead.
30100func (iter *VirtualApplianceListResultIterator) Next() error {
30101	return iter.NextWithContext(context.Background())
30102}
30103
30104// NotDone returns true if the enumeration should be started or is not yet complete.
30105func (iter VirtualApplianceListResultIterator) NotDone() bool {
30106	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30107}
30108
30109// Response returns the raw server response from the last page request.
30110func (iter VirtualApplianceListResultIterator) Response() VirtualApplianceListResult {
30111	return iter.page.Response()
30112}
30113
30114// Value returns the current value or a zero-initialized value if the
30115// iterator has advanced beyond the end of the collection.
30116func (iter VirtualApplianceListResultIterator) Value() VirtualAppliance {
30117	if !iter.page.NotDone() {
30118		return VirtualAppliance{}
30119	}
30120	return iter.page.Values()[iter.i]
30121}
30122
30123// Creates a new instance of the VirtualApplianceListResultIterator type.
30124func NewVirtualApplianceListResultIterator(page VirtualApplianceListResultPage) VirtualApplianceListResultIterator {
30125	return VirtualApplianceListResultIterator{page: page}
30126}
30127
30128// IsEmpty returns true if the ListResult contains no values.
30129func (valr VirtualApplianceListResult) IsEmpty() bool {
30130	return valr.Value == nil || len(*valr.Value) == 0
30131}
30132
30133// hasNextLink returns true if the NextLink is not empty.
30134func (valr VirtualApplianceListResult) hasNextLink() bool {
30135	return valr.NextLink != nil && len(*valr.NextLink) != 0
30136}
30137
30138// virtualApplianceListResultPreparer prepares a request to retrieve the next set of results.
30139// It returns nil if no more results exist.
30140func (valr VirtualApplianceListResult) virtualApplianceListResultPreparer(ctx context.Context) (*http.Request, error) {
30141	if !valr.hasNextLink() {
30142		return nil, nil
30143	}
30144	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30145		autorest.AsJSON(),
30146		autorest.AsGet(),
30147		autorest.WithBaseURL(to.String(valr.NextLink)))
30148}
30149
30150// VirtualApplianceListResultPage contains a page of VirtualAppliance values.
30151type VirtualApplianceListResultPage struct {
30152	fn   func(context.Context, VirtualApplianceListResult) (VirtualApplianceListResult, error)
30153	valr VirtualApplianceListResult
30154}
30155
30156// NextWithContext advances to the next page of values.  If there was an error making
30157// the request the page does not advance and the error is returned.
30158func (page *VirtualApplianceListResultPage) NextWithContext(ctx context.Context) (err error) {
30159	if tracing.IsEnabled() {
30160		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceListResultPage.NextWithContext")
30161		defer func() {
30162			sc := -1
30163			if page.Response().Response.Response != nil {
30164				sc = page.Response().Response.Response.StatusCode
30165			}
30166			tracing.EndSpan(ctx, sc, err)
30167		}()
30168	}
30169	for {
30170		next, err := page.fn(ctx, page.valr)
30171		if err != nil {
30172			return err
30173		}
30174		page.valr = next
30175		if !next.hasNextLink() || !next.IsEmpty() {
30176			break
30177		}
30178	}
30179	return nil
30180}
30181
30182// Next advances to the next page of values.  If there was an error making
30183// the request the page does not advance and the error is returned.
30184// Deprecated: Use NextWithContext() instead.
30185func (page *VirtualApplianceListResultPage) Next() error {
30186	return page.NextWithContext(context.Background())
30187}
30188
30189// NotDone returns true if the page enumeration should be started or is not yet complete.
30190func (page VirtualApplianceListResultPage) NotDone() bool {
30191	return !page.valr.IsEmpty()
30192}
30193
30194// Response returns the raw server response from the last page request.
30195func (page VirtualApplianceListResultPage) Response() VirtualApplianceListResult {
30196	return page.valr
30197}
30198
30199// Values returns the slice of values for the current page or nil if there are no values.
30200func (page VirtualApplianceListResultPage) Values() []VirtualAppliance {
30201	if page.valr.IsEmpty() {
30202		return nil
30203	}
30204	return *page.valr.Value
30205}
30206
30207// Creates a new instance of the VirtualApplianceListResultPage type.
30208func NewVirtualApplianceListResultPage(cur VirtualApplianceListResult, getNextPage func(context.Context, VirtualApplianceListResult) (VirtualApplianceListResult, error)) VirtualApplianceListResultPage {
30209	return VirtualApplianceListResultPage{
30210		fn:   getNextPage,
30211		valr: cur,
30212	}
30213}
30214
30215// VirtualApplianceNicProperties network Virtual Appliance NIC properties.
30216type VirtualApplianceNicProperties struct {
30217	// Name - READ-ONLY; NIC name.
30218	Name *string `json:"name,omitempty"`
30219	// PublicIPAddress - READ-ONLY; Public IP address.
30220	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
30221	// PrivateIPAddress - READ-ONLY; Private IP address.
30222	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
30223}
30224
30225// VirtualAppliancePropertiesFormat network Virtual Appliance definition.
30226type VirtualAppliancePropertiesFormat struct {
30227	// BootStrapConfigurationBlob - BootStrapConfigurationBlob storage URLs.
30228	BootStrapConfigurationBlob *[]string `json:"bootStrapConfigurationBlob,omitempty"`
30229	// VirtualHub - The Virtual Hub where Network Virtual Appliance is being deployed.
30230	VirtualHub *SubResource `json:"virtualHub,omitempty"`
30231	// CloudInitConfigurationBlob - CloudInitConfigurationBlob storage URLs.
30232	CloudInitConfigurationBlob *[]string `json:"cloudInitConfigurationBlob,omitempty"`
30233	// VirtualApplianceAsn - VirtualAppliance ASN.
30234	VirtualApplianceAsn *int64 `json:"virtualApplianceAsn,omitempty"`
30235	// VirtualApplianceNics - READ-ONLY; List of Virtual Appliance Network Interfaces.
30236	VirtualApplianceNics *[]VirtualApplianceNicProperties `json:"virtualApplianceNics,omitempty"`
30237	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30238	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30239}
30240
30241// MarshalJSON is the custom marshaler for VirtualAppliancePropertiesFormat.
30242func (vapf VirtualAppliancePropertiesFormat) MarshalJSON() ([]byte, error) {
30243	objectMap := make(map[string]interface{})
30244	if vapf.BootStrapConfigurationBlob != nil {
30245		objectMap["bootStrapConfigurationBlob"] = vapf.BootStrapConfigurationBlob
30246	}
30247	if vapf.VirtualHub != nil {
30248		objectMap["virtualHub"] = vapf.VirtualHub
30249	}
30250	if vapf.CloudInitConfigurationBlob != nil {
30251		objectMap["cloudInitConfigurationBlob"] = vapf.CloudInitConfigurationBlob
30252	}
30253	if vapf.VirtualApplianceAsn != nil {
30254		objectMap["virtualApplianceAsn"] = vapf.VirtualApplianceAsn
30255	}
30256	return json.Marshal(objectMap)
30257}
30258
30259// VirtualAppliancesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30260// long-running operation.
30261type VirtualAppliancesCreateOrUpdateFuture struct {
30262	azure.FutureAPI
30263	// Result returns the result of the asynchronous operation.
30264	// If the operation has not completed it will return an error.
30265	Result func(VirtualAppliancesClient) (VirtualAppliance, error)
30266}
30267
30268// VirtualAppliancesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30269// operation.
30270type VirtualAppliancesDeleteFuture struct {
30271	azure.FutureAPI
30272	// Result returns the result of the asynchronous operation.
30273	// If the operation has not completed it will return an error.
30274	Result func(VirtualAppliancesClient) (autorest.Response, error)
30275}
30276
30277// VirtualApplianceSkuProperties network Virtual Appliance Sku Properties.
30278type VirtualApplianceSkuProperties struct {
30279	// Vendor - Virtual Appliance Vendor.
30280	Vendor *string `json:"vendor,omitempty"`
30281	// BundledScaleUnit - Virtual Appliance Scale Unit.
30282	BundledScaleUnit *string `json:"bundledScaleUnit,omitempty"`
30283	// MarketPlaceVersion - Virtual Appliance Version.
30284	MarketPlaceVersion *string `json:"marketPlaceVersion,omitempty"`
30285}
30286
30287// VirtualHub virtualHub Resource.
30288type VirtualHub struct {
30289	autorest.Response `json:"-"`
30290	// VirtualHubProperties - Properties of the virtual hub.
30291	*VirtualHubProperties `json:"properties,omitempty"`
30292	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
30293	Etag *string `json:"etag,omitempty"`
30294	// ID - Resource ID.
30295	ID *string `json:"id,omitempty"`
30296	// Name - READ-ONLY; Resource name.
30297	Name *string `json:"name,omitempty"`
30298	// Type - READ-ONLY; Resource type.
30299	Type *string `json:"type,omitempty"`
30300	// Location - Resource location.
30301	Location *string `json:"location,omitempty"`
30302	// Tags - Resource tags.
30303	Tags map[string]*string `json:"tags"`
30304}
30305
30306// MarshalJSON is the custom marshaler for VirtualHub.
30307func (vh VirtualHub) MarshalJSON() ([]byte, error) {
30308	objectMap := make(map[string]interface{})
30309	if vh.VirtualHubProperties != nil {
30310		objectMap["properties"] = vh.VirtualHubProperties
30311	}
30312	if vh.ID != nil {
30313		objectMap["id"] = vh.ID
30314	}
30315	if vh.Location != nil {
30316		objectMap["location"] = vh.Location
30317	}
30318	if vh.Tags != nil {
30319		objectMap["tags"] = vh.Tags
30320	}
30321	return json.Marshal(objectMap)
30322}
30323
30324// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
30325func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
30326	var m map[string]*json.RawMessage
30327	err := json.Unmarshal(body, &m)
30328	if err != nil {
30329		return err
30330	}
30331	for k, v := range m {
30332		switch k {
30333		case "properties":
30334			if v != nil {
30335				var virtualHubProperties VirtualHubProperties
30336				err = json.Unmarshal(*v, &virtualHubProperties)
30337				if err != nil {
30338					return err
30339				}
30340				vh.VirtualHubProperties = &virtualHubProperties
30341			}
30342		case "etag":
30343			if v != nil {
30344				var etag string
30345				err = json.Unmarshal(*v, &etag)
30346				if err != nil {
30347					return err
30348				}
30349				vh.Etag = &etag
30350			}
30351		case "id":
30352			if v != nil {
30353				var ID string
30354				err = json.Unmarshal(*v, &ID)
30355				if err != nil {
30356					return err
30357				}
30358				vh.ID = &ID
30359			}
30360		case "name":
30361			if v != nil {
30362				var name string
30363				err = json.Unmarshal(*v, &name)
30364				if err != nil {
30365					return err
30366				}
30367				vh.Name = &name
30368			}
30369		case "type":
30370			if v != nil {
30371				var typeVar string
30372				err = json.Unmarshal(*v, &typeVar)
30373				if err != nil {
30374					return err
30375				}
30376				vh.Type = &typeVar
30377			}
30378		case "location":
30379			if v != nil {
30380				var location string
30381				err = json.Unmarshal(*v, &location)
30382				if err != nil {
30383					return err
30384				}
30385				vh.Location = &location
30386			}
30387		case "tags":
30388			if v != nil {
30389				var tags map[string]*string
30390				err = json.Unmarshal(*v, &tags)
30391				if err != nil {
30392					return err
30393				}
30394				vh.Tags = tags
30395			}
30396		}
30397	}
30398
30399	return nil
30400}
30401
30402// VirtualHubID virtual Hub identifier.
30403type VirtualHubID struct {
30404	// 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.
30405	ID *string `json:"id,omitempty"`
30406}
30407
30408// VirtualHubProperties parameters for VirtualHub.
30409type VirtualHubProperties struct {
30410	// VirtualWan - The VirtualWAN to which the VirtualHub belongs.
30411	VirtualWan *SubResource `json:"virtualWan,omitempty"`
30412	// VpnGateway - The VpnGateway associated with this VirtualHub.
30413	VpnGateway *SubResource `json:"vpnGateway,omitempty"`
30414	// P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub.
30415	P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"`
30416	// ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub.
30417	ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"`
30418	// AzureFirewall - The azureFirewall associated with this VirtualHub.
30419	AzureFirewall *SubResource `json:"azureFirewall,omitempty"`
30420	// SecurityPartnerProvider - The securityPartnerProvider associated with this VirtualHub.
30421	SecurityPartnerProvider *SubResource `json:"securityPartnerProvider,omitempty"`
30422	// VirtualNetworkConnections - List of all vnet connections with this VirtualHub.
30423	VirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"virtualNetworkConnections,omitempty"`
30424	// AddressPrefix - Address-prefix for this VirtualHub.
30425	AddressPrefix *string `json:"addressPrefix,omitempty"`
30426	// RouteTable - The routeTable associated with this virtual hub.
30427	RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"`
30428	// ProvisioningState - READ-ONLY; The provisioning state of the virtual hub resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30429	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30430	// SecurityProviderName - The Security Provider name.
30431	SecurityProviderName *string `json:"securityProviderName,omitempty"`
30432	// VirtualHubRouteTableV2s - List of all virtual hub route table v2s associated with this VirtualHub.
30433	VirtualHubRouteTableV2s *[]VirtualHubRouteTableV2 `json:"virtualHubRouteTableV2s,omitempty"`
30434	// Sku - The sku of this VirtualHub.
30435	Sku *string `json:"sku,omitempty"`
30436}
30437
30438// MarshalJSON is the custom marshaler for VirtualHubProperties.
30439func (vhp VirtualHubProperties) MarshalJSON() ([]byte, error) {
30440	objectMap := make(map[string]interface{})
30441	if vhp.VirtualWan != nil {
30442		objectMap["virtualWan"] = vhp.VirtualWan
30443	}
30444	if vhp.VpnGateway != nil {
30445		objectMap["vpnGateway"] = vhp.VpnGateway
30446	}
30447	if vhp.P2SVpnGateway != nil {
30448		objectMap["p2SVpnGateway"] = vhp.P2SVpnGateway
30449	}
30450	if vhp.ExpressRouteGateway != nil {
30451		objectMap["expressRouteGateway"] = vhp.ExpressRouteGateway
30452	}
30453	if vhp.AzureFirewall != nil {
30454		objectMap["azureFirewall"] = vhp.AzureFirewall
30455	}
30456	if vhp.SecurityPartnerProvider != nil {
30457		objectMap["securityPartnerProvider"] = vhp.SecurityPartnerProvider
30458	}
30459	if vhp.VirtualNetworkConnections != nil {
30460		objectMap["virtualNetworkConnections"] = vhp.VirtualNetworkConnections
30461	}
30462	if vhp.AddressPrefix != nil {
30463		objectMap["addressPrefix"] = vhp.AddressPrefix
30464	}
30465	if vhp.RouteTable != nil {
30466		objectMap["routeTable"] = vhp.RouteTable
30467	}
30468	if vhp.SecurityProviderName != nil {
30469		objectMap["securityProviderName"] = vhp.SecurityProviderName
30470	}
30471	if vhp.VirtualHubRouteTableV2s != nil {
30472		objectMap["virtualHubRouteTableV2s"] = vhp.VirtualHubRouteTableV2s
30473	}
30474	if vhp.Sku != nil {
30475		objectMap["sku"] = vhp.Sku
30476	}
30477	return json.Marshal(objectMap)
30478}
30479
30480// VirtualHubRoute virtualHub route.
30481type VirtualHubRoute struct {
30482	// AddressPrefixes - List of all addressPrefixes.
30483	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
30484	// NextHopIPAddress - NextHop ip address.
30485	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
30486}
30487
30488// VirtualHubRouteTable virtualHub route table.
30489type VirtualHubRouteTable struct {
30490	// Routes - List of all routes.
30491	Routes *[]VirtualHubRoute `json:"routes,omitempty"`
30492}
30493
30494// VirtualHubRouteTableV2 virtualHubRouteTableV2 Resource.
30495type VirtualHubRouteTableV2 struct {
30496	autorest.Response `json:"-"`
30497	// VirtualHubRouteTableV2Properties - Properties of the virtual hub route table v2.
30498	*VirtualHubRouteTableV2Properties `json:"properties,omitempty"`
30499	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
30500	Name *string `json:"name,omitempty"`
30501	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
30502	Etag *string `json:"etag,omitempty"`
30503	// ID - Resource ID.
30504	ID *string `json:"id,omitempty"`
30505}
30506
30507// MarshalJSON is the custom marshaler for VirtualHubRouteTableV2.
30508func (vhrtv VirtualHubRouteTableV2) MarshalJSON() ([]byte, error) {
30509	objectMap := make(map[string]interface{})
30510	if vhrtv.VirtualHubRouteTableV2Properties != nil {
30511		objectMap["properties"] = vhrtv.VirtualHubRouteTableV2Properties
30512	}
30513	if vhrtv.Name != nil {
30514		objectMap["name"] = vhrtv.Name
30515	}
30516	if vhrtv.ID != nil {
30517		objectMap["id"] = vhrtv.ID
30518	}
30519	return json.Marshal(objectMap)
30520}
30521
30522// UnmarshalJSON is the custom unmarshaler for VirtualHubRouteTableV2 struct.
30523func (vhrtv *VirtualHubRouteTableV2) UnmarshalJSON(body []byte) error {
30524	var m map[string]*json.RawMessage
30525	err := json.Unmarshal(body, &m)
30526	if err != nil {
30527		return err
30528	}
30529	for k, v := range m {
30530		switch k {
30531		case "properties":
30532			if v != nil {
30533				var virtualHubRouteTableV2Properties VirtualHubRouteTableV2Properties
30534				err = json.Unmarshal(*v, &virtualHubRouteTableV2Properties)
30535				if err != nil {
30536					return err
30537				}
30538				vhrtv.VirtualHubRouteTableV2Properties = &virtualHubRouteTableV2Properties
30539			}
30540		case "name":
30541			if v != nil {
30542				var name string
30543				err = json.Unmarshal(*v, &name)
30544				if err != nil {
30545					return err
30546				}
30547				vhrtv.Name = &name
30548			}
30549		case "etag":
30550			if v != nil {
30551				var etag string
30552				err = json.Unmarshal(*v, &etag)
30553				if err != nil {
30554					return err
30555				}
30556				vhrtv.Etag = &etag
30557			}
30558		case "id":
30559			if v != nil {
30560				var ID string
30561				err = json.Unmarshal(*v, &ID)
30562				if err != nil {
30563					return err
30564				}
30565				vhrtv.ID = &ID
30566			}
30567		}
30568	}
30569
30570	return nil
30571}
30572
30573// VirtualHubRouteTableV2Properties parameters for VirtualHubRouteTableV2.
30574type VirtualHubRouteTableV2Properties struct {
30575	// Routes - List of all routes.
30576	Routes *[]VirtualHubRouteV2 `json:"routes,omitempty"`
30577	// AttachedConnections - List of all connections attached to this route table v2.
30578	AttachedConnections *[]string `json:"attachedConnections,omitempty"`
30579	// ProvisioningState - READ-ONLY; The provisioning state of the virtual hub route table v2 resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30580	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30581}
30582
30583// MarshalJSON is the custom marshaler for VirtualHubRouteTableV2Properties.
30584func (vhrtvp VirtualHubRouteTableV2Properties) MarshalJSON() ([]byte, error) {
30585	objectMap := make(map[string]interface{})
30586	if vhrtvp.Routes != nil {
30587		objectMap["routes"] = vhrtvp.Routes
30588	}
30589	if vhrtvp.AttachedConnections != nil {
30590		objectMap["attachedConnections"] = vhrtvp.AttachedConnections
30591	}
30592	return json.Marshal(objectMap)
30593}
30594
30595// VirtualHubRouteTableV2sCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
30596// a long-running operation.
30597type VirtualHubRouteTableV2sCreateOrUpdateFuture struct {
30598	azure.FutureAPI
30599	// Result returns the result of the asynchronous operation.
30600	// If the operation has not completed it will return an error.
30601	Result func(VirtualHubRouteTableV2sClient) (VirtualHubRouteTableV2, error)
30602}
30603
30604// VirtualHubRouteTableV2sDeleteFuture an abstraction for monitoring and retrieving the results of a
30605// long-running operation.
30606type VirtualHubRouteTableV2sDeleteFuture struct {
30607	azure.FutureAPI
30608	// Result returns the result of the asynchronous operation.
30609	// If the operation has not completed it will return an error.
30610	Result func(VirtualHubRouteTableV2sClient) (autorest.Response, error)
30611}
30612
30613// VirtualHubRouteV2 virtualHubRouteTableV2 route.
30614type VirtualHubRouteV2 struct {
30615	// DestinationType - The type of destinations.
30616	DestinationType *string `json:"destinationType,omitempty"`
30617	// Destinations - List of all destinations.
30618	Destinations *[]string `json:"destinations,omitempty"`
30619	// NextHopType - The type of next hops.
30620	NextHopType *string `json:"nextHopType,omitempty"`
30621	// NextHops - NextHops ip address.
30622	NextHops *[]string `json:"nextHops,omitempty"`
30623}
30624
30625// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30626// long-running operation.
30627type VirtualHubsCreateOrUpdateFuture struct {
30628	azure.FutureAPI
30629	// Result returns the result of the asynchronous operation.
30630	// If the operation has not completed it will return an error.
30631	Result func(VirtualHubsClient) (VirtualHub, error)
30632}
30633
30634// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30635// operation.
30636type VirtualHubsDeleteFuture struct {
30637	azure.FutureAPI
30638	// Result returns the result of the asynchronous operation.
30639	// If the operation has not completed it will return an error.
30640	Result func(VirtualHubsClient) (autorest.Response, error)
30641}
30642
30643// VirtualNetwork virtual Network resource.
30644type VirtualNetwork struct {
30645	autorest.Response `json:"-"`
30646	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
30647	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
30648	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
30649	Etag *string `json:"etag,omitempty"`
30650	// ID - Resource ID.
30651	ID *string `json:"id,omitempty"`
30652	// Name - READ-ONLY; Resource name.
30653	Name *string `json:"name,omitempty"`
30654	// Type - READ-ONLY; Resource type.
30655	Type *string `json:"type,omitempty"`
30656	// Location - Resource location.
30657	Location *string `json:"location,omitempty"`
30658	// Tags - Resource tags.
30659	Tags map[string]*string `json:"tags"`
30660}
30661
30662// MarshalJSON is the custom marshaler for VirtualNetwork.
30663func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
30664	objectMap := make(map[string]interface{})
30665	if vn.VirtualNetworkPropertiesFormat != nil {
30666		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
30667	}
30668	if vn.ID != nil {
30669		objectMap["id"] = vn.ID
30670	}
30671	if vn.Location != nil {
30672		objectMap["location"] = vn.Location
30673	}
30674	if vn.Tags != nil {
30675		objectMap["tags"] = vn.Tags
30676	}
30677	return json.Marshal(objectMap)
30678}
30679
30680// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
30681func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
30682	var m map[string]*json.RawMessage
30683	err := json.Unmarshal(body, &m)
30684	if err != nil {
30685		return err
30686	}
30687	for k, v := range m {
30688		switch k {
30689		case "properties":
30690			if v != nil {
30691				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
30692				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
30693				if err != nil {
30694					return err
30695				}
30696				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
30697			}
30698		case "etag":
30699			if v != nil {
30700				var etag string
30701				err = json.Unmarshal(*v, &etag)
30702				if err != nil {
30703					return err
30704				}
30705				vn.Etag = &etag
30706			}
30707		case "id":
30708			if v != nil {
30709				var ID string
30710				err = json.Unmarshal(*v, &ID)
30711				if err != nil {
30712					return err
30713				}
30714				vn.ID = &ID
30715			}
30716		case "name":
30717			if v != nil {
30718				var name string
30719				err = json.Unmarshal(*v, &name)
30720				if err != nil {
30721					return err
30722				}
30723				vn.Name = &name
30724			}
30725		case "type":
30726			if v != nil {
30727				var typeVar string
30728				err = json.Unmarshal(*v, &typeVar)
30729				if err != nil {
30730					return err
30731				}
30732				vn.Type = &typeVar
30733			}
30734		case "location":
30735			if v != nil {
30736				var location string
30737				err = json.Unmarshal(*v, &location)
30738				if err != nil {
30739					return err
30740				}
30741				vn.Location = &location
30742			}
30743		case "tags":
30744			if v != nil {
30745				var tags map[string]*string
30746				err = json.Unmarshal(*v, &tags)
30747				if err != nil {
30748					return err
30749				}
30750				vn.Tags = tags
30751			}
30752		}
30753	}
30754
30755	return nil
30756}
30757
30758// VirtualNetworkBgpCommunities bgp Communities sent over ExpressRoute with each route corresponding to a
30759// prefix in this VNET.
30760type VirtualNetworkBgpCommunities struct {
30761	// VirtualNetworkCommunity - The BGP community associated with the virtual network.
30762	VirtualNetworkCommunity *string `json:"virtualNetworkCommunity,omitempty"`
30763	// RegionalCommunity - READ-ONLY; The BGP community associated with the region of the virtual network.
30764	RegionalCommunity *string `json:"regionalCommunity,omitempty"`
30765}
30766
30767// MarshalJSON is the custom marshaler for VirtualNetworkBgpCommunities.
30768func (vnbc VirtualNetworkBgpCommunities) MarshalJSON() ([]byte, error) {
30769	objectMap := make(map[string]interface{})
30770	if vnbc.VirtualNetworkCommunity != nil {
30771		objectMap["virtualNetworkCommunity"] = vnbc.VirtualNetworkCommunity
30772	}
30773	return json.Marshal(objectMap)
30774}
30775
30776// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
30777// resource.
30778type VirtualNetworkConnectionGatewayReference struct {
30779	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
30780	ID *string `json:"id,omitempty"`
30781}
30782
30783// VirtualNetworkGateway a common class for general resource information.
30784type VirtualNetworkGateway struct {
30785	autorest.Response `json:"-"`
30786	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
30787	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
30788	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
30789	Etag *string `json:"etag,omitempty"`
30790	// ID - Resource ID.
30791	ID *string `json:"id,omitempty"`
30792	// Name - READ-ONLY; Resource name.
30793	Name *string `json:"name,omitempty"`
30794	// Type - READ-ONLY; Resource type.
30795	Type *string `json:"type,omitempty"`
30796	// Location - Resource location.
30797	Location *string `json:"location,omitempty"`
30798	// Tags - Resource tags.
30799	Tags map[string]*string `json:"tags"`
30800}
30801
30802// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
30803func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
30804	objectMap := make(map[string]interface{})
30805	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
30806		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
30807	}
30808	if vng.ID != nil {
30809		objectMap["id"] = vng.ID
30810	}
30811	if vng.Location != nil {
30812		objectMap["location"] = vng.Location
30813	}
30814	if vng.Tags != nil {
30815		objectMap["tags"] = vng.Tags
30816	}
30817	return json.Marshal(objectMap)
30818}
30819
30820// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
30821func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
30822	var m map[string]*json.RawMessage
30823	err := json.Unmarshal(body, &m)
30824	if err != nil {
30825		return err
30826	}
30827	for k, v := range m {
30828		switch k {
30829		case "properties":
30830			if v != nil {
30831				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
30832				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
30833				if err != nil {
30834					return err
30835				}
30836				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
30837			}
30838		case "etag":
30839			if v != nil {
30840				var etag string
30841				err = json.Unmarshal(*v, &etag)
30842				if err != nil {
30843					return err
30844				}
30845				vng.Etag = &etag
30846			}
30847		case "id":
30848			if v != nil {
30849				var ID string
30850				err = json.Unmarshal(*v, &ID)
30851				if err != nil {
30852					return err
30853				}
30854				vng.ID = &ID
30855			}
30856		case "name":
30857			if v != nil {
30858				var name string
30859				err = json.Unmarshal(*v, &name)
30860				if err != nil {
30861					return err
30862				}
30863				vng.Name = &name
30864			}
30865		case "type":
30866			if v != nil {
30867				var typeVar string
30868				err = json.Unmarshal(*v, &typeVar)
30869				if err != nil {
30870					return err
30871				}
30872				vng.Type = &typeVar
30873			}
30874		case "location":
30875			if v != nil {
30876				var location string
30877				err = json.Unmarshal(*v, &location)
30878				if err != nil {
30879					return err
30880				}
30881				vng.Location = &location
30882			}
30883		case "tags":
30884			if v != nil {
30885				var tags map[string]*string
30886				err = json.Unmarshal(*v, &tags)
30887				if err != nil {
30888					return err
30889				}
30890				vng.Tags = tags
30891			}
30892		}
30893	}
30894
30895	return nil
30896}
30897
30898// VirtualNetworkGatewayConnection a common class for general resource information.
30899type VirtualNetworkGatewayConnection struct {
30900	autorest.Response `json:"-"`
30901	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
30902	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
30903	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
30904	Etag *string `json:"etag,omitempty"`
30905	// ID - Resource ID.
30906	ID *string `json:"id,omitempty"`
30907	// Name - READ-ONLY; Resource name.
30908	Name *string `json:"name,omitempty"`
30909	// Type - READ-ONLY; Resource type.
30910	Type *string `json:"type,omitempty"`
30911	// Location - Resource location.
30912	Location *string `json:"location,omitempty"`
30913	// Tags - Resource tags.
30914	Tags map[string]*string `json:"tags"`
30915}
30916
30917// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
30918func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
30919	objectMap := make(map[string]interface{})
30920	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
30921		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
30922	}
30923	if vngc.ID != nil {
30924		objectMap["id"] = vngc.ID
30925	}
30926	if vngc.Location != nil {
30927		objectMap["location"] = vngc.Location
30928	}
30929	if vngc.Tags != nil {
30930		objectMap["tags"] = vngc.Tags
30931	}
30932	return json.Marshal(objectMap)
30933}
30934
30935// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
30936func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
30937	var m map[string]*json.RawMessage
30938	err := json.Unmarshal(body, &m)
30939	if err != nil {
30940		return err
30941	}
30942	for k, v := range m {
30943		switch k {
30944		case "properties":
30945			if v != nil {
30946				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
30947				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
30948				if err != nil {
30949					return err
30950				}
30951				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
30952			}
30953		case "etag":
30954			if v != nil {
30955				var etag string
30956				err = json.Unmarshal(*v, &etag)
30957				if err != nil {
30958					return err
30959				}
30960				vngc.Etag = &etag
30961			}
30962		case "id":
30963			if v != nil {
30964				var ID string
30965				err = json.Unmarshal(*v, &ID)
30966				if err != nil {
30967					return err
30968				}
30969				vngc.ID = &ID
30970			}
30971		case "name":
30972			if v != nil {
30973				var name string
30974				err = json.Unmarshal(*v, &name)
30975				if err != nil {
30976					return err
30977				}
30978				vngc.Name = &name
30979			}
30980		case "type":
30981			if v != nil {
30982				var typeVar string
30983				err = json.Unmarshal(*v, &typeVar)
30984				if err != nil {
30985					return err
30986				}
30987				vngc.Type = &typeVar
30988			}
30989		case "location":
30990			if v != nil {
30991				var location string
30992				err = json.Unmarshal(*v, &location)
30993				if err != nil {
30994					return err
30995				}
30996				vngc.Location = &location
30997			}
30998		case "tags":
30999			if v != nil {
31000				var tags map[string]*string
31001				err = json.Unmarshal(*v, &tags)
31002				if err != nil {
31003					return err
31004				}
31005				vngc.Tags = tags
31006			}
31007		}
31008	}
31009
31010	return nil
31011}
31012
31013// VirtualNetworkGatewayConnectionListEntity a common class for general resource information.
31014type VirtualNetworkGatewayConnectionListEntity struct {
31015	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
31016	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
31017	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
31018	Etag *string `json:"etag,omitempty"`
31019	// ID - Resource ID.
31020	ID *string `json:"id,omitempty"`
31021	// Name - READ-ONLY; Resource name.
31022	Name *string `json:"name,omitempty"`
31023	// Type - READ-ONLY; Resource type.
31024	Type *string `json:"type,omitempty"`
31025	// Location - Resource location.
31026	Location *string `json:"location,omitempty"`
31027	// Tags - Resource tags.
31028	Tags map[string]*string `json:"tags"`
31029}
31030
31031// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
31032func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
31033	objectMap := make(map[string]interface{})
31034	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
31035		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
31036	}
31037	if vngcle.ID != nil {
31038		objectMap["id"] = vngcle.ID
31039	}
31040	if vngcle.Location != nil {
31041		objectMap["location"] = vngcle.Location
31042	}
31043	if vngcle.Tags != nil {
31044		objectMap["tags"] = vngcle.Tags
31045	}
31046	return json.Marshal(objectMap)
31047}
31048
31049// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
31050func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
31051	var m map[string]*json.RawMessage
31052	err := json.Unmarshal(body, &m)
31053	if err != nil {
31054		return err
31055	}
31056	for k, v := range m {
31057		switch k {
31058		case "properties":
31059			if v != nil {
31060				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
31061				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
31062				if err != nil {
31063					return err
31064				}
31065				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
31066			}
31067		case "etag":
31068			if v != nil {
31069				var etag string
31070				err = json.Unmarshal(*v, &etag)
31071				if err != nil {
31072					return err
31073				}
31074				vngcle.Etag = &etag
31075			}
31076		case "id":
31077			if v != nil {
31078				var ID string
31079				err = json.Unmarshal(*v, &ID)
31080				if err != nil {
31081					return err
31082				}
31083				vngcle.ID = &ID
31084			}
31085		case "name":
31086			if v != nil {
31087				var name string
31088				err = json.Unmarshal(*v, &name)
31089				if err != nil {
31090					return err
31091				}
31092				vngcle.Name = &name
31093			}
31094		case "type":
31095			if v != nil {
31096				var typeVar string
31097				err = json.Unmarshal(*v, &typeVar)
31098				if err != nil {
31099					return err
31100				}
31101				vngcle.Type = &typeVar
31102			}
31103		case "location":
31104			if v != nil {
31105				var location string
31106				err = json.Unmarshal(*v, &location)
31107				if err != nil {
31108					return err
31109				}
31110				vngcle.Location = &location
31111			}
31112		case "tags":
31113			if v != nil {
31114				var tags map[string]*string
31115				err = json.Unmarshal(*v, &tags)
31116				if err != nil {
31117					return err
31118				}
31119				vngcle.Tags = tags
31120			}
31121		}
31122	}
31123
31124	return nil
31125}
31126
31127// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties.
31128type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
31129	// AuthorizationKey - The authorizationKey.
31130	AuthorizationKey *string `json:"authorizationKey,omitempty"`
31131	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
31132	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
31133	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
31134	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
31135	// LocalNetworkGateway2 - The reference to local network gateway resource.
31136	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
31137	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
31138	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
31139	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
31140	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
31141	// RoutingWeight - The routing weight.
31142	RoutingWeight *int32 `json:"routingWeight,omitempty"`
31143	// SharedKey - The IPSec shared key.
31144	SharedKey *string `json:"sharedKey,omitempty"`
31145	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
31146	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
31147	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
31148	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
31149	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
31150	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
31151	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
31152	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
31153	// Peer - The reference to peerings resource.
31154	Peer *SubResource `json:"peer,omitempty"`
31155	// EnableBgp - EnableBgp flag.
31156	EnableBgp *bool `json:"enableBgp,omitempty"`
31157	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
31158	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
31159	// IpsecPolicies - The IPSec Policies to be considered by this connection.
31160	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
31161	// TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection.
31162	TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"`
31163	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway connection resource.
31164	ResourceGUID *string `json:"resourceGuid,omitempty"`
31165	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
31166	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31167	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
31168	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
31169}
31170
31171// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
31172func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
31173	objectMap := make(map[string]interface{})
31174	if vngclepf.AuthorizationKey != nil {
31175		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
31176	}
31177	if vngclepf.VirtualNetworkGateway1 != nil {
31178		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
31179	}
31180	if vngclepf.VirtualNetworkGateway2 != nil {
31181		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
31182	}
31183	if vngclepf.LocalNetworkGateway2 != nil {
31184		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
31185	}
31186	if vngclepf.ConnectionType != "" {
31187		objectMap["connectionType"] = vngclepf.ConnectionType
31188	}
31189	if vngclepf.ConnectionProtocol != "" {
31190		objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol
31191	}
31192	if vngclepf.RoutingWeight != nil {
31193		objectMap["routingWeight"] = vngclepf.RoutingWeight
31194	}
31195	if vngclepf.SharedKey != nil {
31196		objectMap["sharedKey"] = vngclepf.SharedKey
31197	}
31198	if vngclepf.Peer != nil {
31199		objectMap["peer"] = vngclepf.Peer
31200	}
31201	if vngclepf.EnableBgp != nil {
31202		objectMap["enableBgp"] = vngclepf.EnableBgp
31203	}
31204	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
31205		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
31206	}
31207	if vngclepf.IpsecPolicies != nil {
31208		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
31209	}
31210	if vngclepf.TrafficSelectorPolicies != nil {
31211		objectMap["trafficSelectorPolicies"] = vngclepf.TrafficSelectorPolicies
31212	}
31213	if vngclepf.ExpressRouteGatewayBypass != nil {
31214		objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass
31215	}
31216	return json.Marshal(objectMap)
31217}
31218
31219// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
31220// service call.
31221type VirtualNetworkGatewayConnectionListResult struct {
31222	autorest.Response `json:"-"`
31223	// Value - A list of VirtualNetworkGatewayConnection resources that exists in a resource group.
31224	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
31225	// NextLink - READ-ONLY; The URL to get the next set of results.
31226	NextLink *string `json:"nextLink,omitempty"`
31227}
31228
31229// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
31230func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
31231	objectMap := make(map[string]interface{})
31232	if vngclr.Value != nil {
31233		objectMap["value"] = vngclr.Value
31234	}
31235	return json.Marshal(objectMap)
31236}
31237
31238// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
31239// VirtualNetworkGatewayConnection values.
31240type VirtualNetworkGatewayConnectionListResultIterator struct {
31241	i    int
31242	page VirtualNetworkGatewayConnectionListResultPage
31243}
31244
31245// NextWithContext advances to the next value.  If there was an error making
31246// the request the iterator does not advance and the error is returned.
31247func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
31248	if tracing.IsEnabled() {
31249		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
31250		defer func() {
31251			sc := -1
31252			if iter.Response().Response.Response != nil {
31253				sc = iter.Response().Response.Response.StatusCode
31254			}
31255			tracing.EndSpan(ctx, sc, err)
31256		}()
31257	}
31258	iter.i++
31259	if iter.i < len(iter.page.Values()) {
31260		return nil
31261	}
31262	err = iter.page.NextWithContext(ctx)
31263	if err != nil {
31264		iter.i--
31265		return err
31266	}
31267	iter.i = 0
31268	return nil
31269}
31270
31271// Next advances to the next value.  If there was an error making
31272// the request the iterator does not advance and the error is returned.
31273// Deprecated: Use NextWithContext() instead.
31274func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
31275	return iter.NextWithContext(context.Background())
31276}
31277
31278// NotDone returns true if the enumeration should be started or is not yet complete.
31279func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
31280	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31281}
31282
31283// Response returns the raw server response from the last page request.
31284func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
31285	return iter.page.Response()
31286}
31287
31288// Value returns the current value or a zero-initialized value if the
31289// iterator has advanced beyond the end of the collection.
31290func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
31291	if !iter.page.NotDone() {
31292		return VirtualNetworkGatewayConnection{}
31293	}
31294	return iter.page.Values()[iter.i]
31295}
31296
31297// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
31298func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
31299	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
31300}
31301
31302// IsEmpty returns true if the ListResult contains no values.
31303func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
31304	return vngclr.Value == nil || len(*vngclr.Value) == 0
31305}
31306
31307// hasNextLink returns true if the NextLink is not empty.
31308func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
31309	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
31310}
31311
31312// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
31313// It returns nil if no more results exist.
31314func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
31315	if !vngclr.hasNextLink() {
31316		return nil, nil
31317	}
31318	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31319		autorest.AsJSON(),
31320		autorest.AsGet(),
31321		autorest.WithBaseURL(to.String(vngclr.NextLink)))
31322}
31323
31324// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
31325type VirtualNetworkGatewayConnectionListResultPage struct {
31326	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
31327	vngclr VirtualNetworkGatewayConnectionListResult
31328}
31329
31330// NextWithContext advances to the next page of values.  If there was an error making
31331// the request the page does not advance and the error is returned.
31332func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
31333	if tracing.IsEnabled() {
31334		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
31335		defer func() {
31336			sc := -1
31337			if page.Response().Response.Response != nil {
31338				sc = page.Response().Response.Response.StatusCode
31339			}
31340			tracing.EndSpan(ctx, sc, err)
31341		}()
31342	}
31343	for {
31344		next, err := page.fn(ctx, page.vngclr)
31345		if err != nil {
31346			return err
31347		}
31348		page.vngclr = next
31349		if !next.hasNextLink() || !next.IsEmpty() {
31350			break
31351		}
31352	}
31353	return nil
31354}
31355
31356// Next advances to the next page of values.  If there was an error making
31357// the request the page does not advance and the error is returned.
31358// Deprecated: Use NextWithContext() instead.
31359func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
31360	return page.NextWithContext(context.Background())
31361}
31362
31363// NotDone returns true if the page enumeration should be started or is not yet complete.
31364func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
31365	return !page.vngclr.IsEmpty()
31366}
31367
31368// Response returns the raw server response from the last page request.
31369func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
31370	return page.vngclr
31371}
31372
31373// Values returns the slice of values for the current page or nil if there are no values.
31374func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
31375	if page.vngclr.IsEmpty() {
31376		return nil
31377	}
31378	return *page.vngclr.Value
31379}
31380
31381// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
31382func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
31383	return VirtualNetworkGatewayConnectionListResultPage{
31384		fn:     getNextPage,
31385		vngclr: cur,
31386	}
31387}
31388
31389// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties.
31390type VirtualNetworkGatewayConnectionPropertiesFormat struct {
31391	// AuthorizationKey - The authorizationKey.
31392	AuthorizationKey *string `json:"authorizationKey,omitempty"`
31393	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
31394	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
31395	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
31396	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
31397	// LocalNetworkGateway2 - The reference to local network gateway resource.
31398	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
31399	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
31400	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
31401	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
31402	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
31403	// RoutingWeight - The routing weight.
31404	RoutingWeight *int32 `json:"routingWeight,omitempty"`
31405	// DpdTimeoutSeconds - The dead peer detection timeout of this connection in seconds.
31406	DpdTimeoutSeconds *int32 `json:"dpdTimeoutSeconds,omitempty"`
31407	// SharedKey - The IPSec shared key.
31408	SharedKey *string `json:"sharedKey,omitempty"`
31409	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
31410	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
31411	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
31412	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
31413	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
31414	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
31415	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
31416	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
31417	// Peer - The reference to peerings resource.
31418	Peer *SubResource `json:"peer,omitempty"`
31419	// EnableBgp - EnableBgp flag.
31420	EnableBgp *bool `json:"enableBgp,omitempty"`
31421	// UseLocalAzureIPAddress - Use private local Azure IP for the connection.
31422	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
31423	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
31424	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
31425	// IpsecPolicies - The IPSec Policies to be considered by this connection.
31426	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
31427	// TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection.
31428	TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"`
31429	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway connection resource.
31430	ResourceGUID *string `json:"resourceGuid,omitempty"`
31431	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
31432	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31433	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
31434	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
31435}
31436
31437// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
31438func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
31439	objectMap := make(map[string]interface{})
31440	if vngcpf.AuthorizationKey != nil {
31441		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
31442	}
31443	if vngcpf.VirtualNetworkGateway1 != nil {
31444		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
31445	}
31446	if vngcpf.VirtualNetworkGateway2 != nil {
31447		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
31448	}
31449	if vngcpf.LocalNetworkGateway2 != nil {
31450		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
31451	}
31452	if vngcpf.ConnectionType != "" {
31453		objectMap["connectionType"] = vngcpf.ConnectionType
31454	}
31455	if vngcpf.ConnectionProtocol != "" {
31456		objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol
31457	}
31458	if vngcpf.RoutingWeight != nil {
31459		objectMap["routingWeight"] = vngcpf.RoutingWeight
31460	}
31461	if vngcpf.DpdTimeoutSeconds != nil {
31462		objectMap["dpdTimeoutSeconds"] = vngcpf.DpdTimeoutSeconds
31463	}
31464	if vngcpf.SharedKey != nil {
31465		objectMap["sharedKey"] = vngcpf.SharedKey
31466	}
31467	if vngcpf.Peer != nil {
31468		objectMap["peer"] = vngcpf.Peer
31469	}
31470	if vngcpf.EnableBgp != nil {
31471		objectMap["enableBgp"] = vngcpf.EnableBgp
31472	}
31473	if vngcpf.UseLocalAzureIPAddress != nil {
31474		objectMap["useLocalAzureIpAddress"] = vngcpf.UseLocalAzureIPAddress
31475	}
31476	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
31477		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
31478	}
31479	if vngcpf.IpsecPolicies != nil {
31480		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
31481	}
31482	if vngcpf.TrafficSelectorPolicies != nil {
31483		objectMap["trafficSelectorPolicies"] = vngcpf.TrafficSelectorPolicies
31484	}
31485	if vngcpf.ExpressRouteGatewayBypass != nil {
31486		objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass
31487	}
31488	return json.Marshal(objectMap)
31489}
31490
31491// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
31492// results of a long-running operation.
31493type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
31494	azure.FutureAPI
31495	// Result returns the result of the asynchronous operation.
31496	// If the operation has not completed it will return an error.
31497	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
31498}
31499
31500// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
31501// a long-running operation.
31502type VirtualNetworkGatewayConnectionsDeleteFuture struct {
31503	azure.FutureAPI
31504	// Result returns the result of the asynchronous operation.
31505	// If the operation has not completed it will return an error.
31506	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
31507}
31508
31509// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
31510// results of a long-running operation.
31511type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
31512	azure.FutureAPI
31513	// Result returns the result of the asynchronous operation.
31514	// If the operation has not completed it will return an error.
31515	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
31516}
31517
31518// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
31519// results of a long-running operation.
31520type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
31521	azure.FutureAPI
31522	// Result returns the result of the asynchronous operation.
31523	// If the operation has not completed it will return an error.
31524	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
31525}
31526
31527// VirtualNetworkGatewayConnectionsStartPacketCaptureFuture an abstraction for monitoring and retrieving
31528// the results of a long-running operation.
31529type VirtualNetworkGatewayConnectionsStartPacketCaptureFuture struct {
31530	azure.FutureAPI
31531	// Result returns the result of the asynchronous operation.
31532	// If the operation has not completed it will return an error.
31533	Result func(VirtualNetworkGatewayConnectionsClient) (String, error)
31534}
31535
31536// VirtualNetworkGatewayConnectionsStopPacketCaptureFuture an abstraction for monitoring and retrieving the
31537// results of a long-running operation.
31538type VirtualNetworkGatewayConnectionsStopPacketCaptureFuture struct {
31539	azure.FutureAPI
31540	// Result returns the result of the asynchronous operation.
31541	// If the operation has not completed it will return an error.
31542	Result func(VirtualNetworkGatewayConnectionsClient) (String, error)
31543}
31544
31545// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
31546// results of a long-running operation.
31547type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
31548	azure.FutureAPI
31549	// Result returns the result of the asynchronous operation.
31550	// If the operation has not completed it will return an error.
31551	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
31552}
31553
31554// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway.
31555type VirtualNetworkGatewayIPConfiguration struct {
31556	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
31557	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
31558	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
31559	Name *string `json:"name,omitempty"`
31560	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
31561	Etag *string `json:"etag,omitempty"`
31562	// ID - Resource ID.
31563	ID *string `json:"id,omitempty"`
31564}
31565
31566// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
31567func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
31568	objectMap := make(map[string]interface{})
31569	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
31570		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
31571	}
31572	if vngic.Name != nil {
31573		objectMap["name"] = vngic.Name
31574	}
31575	if vngic.ID != nil {
31576		objectMap["id"] = vngic.ID
31577	}
31578	return json.Marshal(objectMap)
31579}
31580
31581// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
31582func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
31583	var m map[string]*json.RawMessage
31584	err := json.Unmarshal(body, &m)
31585	if err != nil {
31586		return err
31587	}
31588	for k, v := range m {
31589		switch k {
31590		case "properties":
31591			if v != nil {
31592				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
31593				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
31594				if err != nil {
31595					return err
31596				}
31597				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
31598			}
31599		case "name":
31600			if v != nil {
31601				var name string
31602				err = json.Unmarshal(*v, &name)
31603				if err != nil {
31604					return err
31605				}
31606				vngic.Name = &name
31607			}
31608		case "etag":
31609			if v != nil {
31610				var etag string
31611				err = json.Unmarshal(*v, &etag)
31612				if err != nil {
31613					return err
31614				}
31615				vngic.Etag = &etag
31616			}
31617		case "id":
31618			if v != nil {
31619				var ID string
31620				err = json.Unmarshal(*v, &ID)
31621				if err != nil {
31622					return err
31623				}
31624				vngic.ID = &ID
31625			}
31626		}
31627	}
31628
31629	return nil
31630}
31631
31632// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration.
31633type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
31634	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
31635	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
31636	// Subnet - The reference to the subnet resource.
31637	Subnet *SubResource `json:"subnet,omitempty"`
31638	// PublicIPAddress - The reference to the public IP resource.
31639	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
31640	// PrivateIPAddress - READ-ONLY; Private IP Address for this gateway.
31641	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
31642	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
31643	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31644}
31645
31646// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
31647func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
31648	objectMap := make(map[string]interface{})
31649	if vngicpf.PrivateIPAllocationMethod != "" {
31650		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
31651	}
31652	if vngicpf.Subnet != nil {
31653		objectMap["subnet"] = vngicpf.Subnet
31654	}
31655	if vngicpf.PublicIPAddress != nil {
31656		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
31657	}
31658	return json.Marshal(objectMap)
31659}
31660
31661// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
31662// service call.
31663type VirtualNetworkGatewayListConnectionsResult struct {
31664	autorest.Response `json:"-"`
31665	// Value - A list of VirtualNetworkGatewayConnection resources that exists in a resource group.
31666	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
31667	// NextLink - READ-ONLY; The URL to get the next set of results.
31668	NextLink *string `json:"nextLink,omitempty"`
31669}
31670
31671// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
31672func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
31673	objectMap := make(map[string]interface{})
31674	if vnglcr.Value != nil {
31675		objectMap["value"] = vnglcr.Value
31676	}
31677	return json.Marshal(objectMap)
31678}
31679
31680// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
31681// VirtualNetworkGatewayConnectionListEntity values.
31682type VirtualNetworkGatewayListConnectionsResultIterator struct {
31683	i    int
31684	page VirtualNetworkGatewayListConnectionsResultPage
31685}
31686
31687// NextWithContext advances to the next value.  If there was an error making
31688// the request the iterator does not advance and the error is returned.
31689func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
31690	if tracing.IsEnabled() {
31691		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
31692		defer func() {
31693			sc := -1
31694			if iter.Response().Response.Response != nil {
31695				sc = iter.Response().Response.Response.StatusCode
31696			}
31697			tracing.EndSpan(ctx, sc, err)
31698		}()
31699	}
31700	iter.i++
31701	if iter.i < len(iter.page.Values()) {
31702		return nil
31703	}
31704	err = iter.page.NextWithContext(ctx)
31705	if err != nil {
31706		iter.i--
31707		return err
31708	}
31709	iter.i = 0
31710	return nil
31711}
31712
31713// Next advances to the next value.  If there was an error making
31714// the request the iterator does not advance and the error is returned.
31715// Deprecated: Use NextWithContext() instead.
31716func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
31717	return iter.NextWithContext(context.Background())
31718}
31719
31720// NotDone returns true if the enumeration should be started or is not yet complete.
31721func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
31722	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31723}
31724
31725// Response returns the raw server response from the last page request.
31726func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
31727	return iter.page.Response()
31728}
31729
31730// Value returns the current value or a zero-initialized value if the
31731// iterator has advanced beyond the end of the collection.
31732func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
31733	if !iter.page.NotDone() {
31734		return VirtualNetworkGatewayConnectionListEntity{}
31735	}
31736	return iter.page.Values()[iter.i]
31737}
31738
31739// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
31740func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
31741	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
31742}
31743
31744// IsEmpty returns true if the ListResult contains no values.
31745func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
31746	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
31747}
31748
31749// hasNextLink returns true if the NextLink is not empty.
31750func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
31751	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
31752}
31753
31754// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
31755// It returns nil if no more results exist.
31756func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
31757	if !vnglcr.hasNextLink() {
31758		return nil, nil
31759	}
31760	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31761		autorest.AsJSON(),
31762		autorest.AsGet(),
31763		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
31764}
31765
31766// VirtualNetworkGatewayListConnectionsResultPage contains a page of
31767// VirtualNetworkGatewayConnectionListEntity values.
31768type VirtualNetworkGatewayListConnectionsResultPage struct {
31769	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
31770	vnglcr VirtualNetworkGatewayListConnectionsResult
31771}
31772
31773// NextWithContext advances to the next page of values.  If there was an error making
31774// the request the page does not advance and the error is returned.
31775func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
31776	if tracing.IsEnabled() {
31777		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
31778		defer func() {
31779			sc := -1
31780			if page.Response().Response.Response != nil {
31781				sc = page.Response().Response.Response.StatusCode
31782			}
31783			tracing.EndSpan(ctx, sc, err)
31784		}()
31785	}
31786	for {
31787		next, err := page.fn(ctx, page.vnglcr)
31788		if err != nil {
31789			return err
31790		}
31791		page.vnglcr = next
31792		if !next.hasNextLink() || !next.IsEmpty() {
31793			break
31794		}
31795	}
31796	return nil
31797}
31798
31799// Next advances to the next page of values.  If there was an error making
31800// the request the page does not advance and the error is returned.
31801// Deprecated: Use NextWithContext() instead.
31802func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
31803	return page.NextWithContext(context.Background())
31804}
31805
31806// NotDone returns true if the page enumeration should be started or is not yet complete.
31807func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
31808	return !page.vnglcr.IsEmpty()
31809}
31810
31811// Response returns the raw server response from the last page request.
31812func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
31813	return page.vnglcr
31814}
31815
31816// Values returns the slice of values for the current page or nil if there are no values.
31817func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
31818	if page.vnglcr.IsEmpty() {
31819		return nil
31820	}
31821	return *page.vnglcr.Value
31822}
31823
31824// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
31825func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
31826	return VirtualNetworkGatewayListConnectionsResultPage{
31827		fn:     getNextPage,
31828		vnglcr: cur,
31829	}
31830}
31831
31832// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
31833type VirtualNetworkGatewayListResult struct {
31834	autorest.Response `json:"-"`
31835	// Value - A list of VirtualNetworkGateway resources that exists in a resource group.
31836	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
31837	// NextLink - READ-ONLY; The URL to get the next set of results.
31838	NextLink *string `json:"nextLink,omitempty"`
31839}
31840
31841// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
31842func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
31843	objectMap := make(map[string]interface{})
31844	if vnglr.Value != nil {
31845		objectMap["value"] = vnglr.Value
31846	}
31847	return json.Marshal(objectMap)
31848}
31849
31850// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
31851// values.
31852type VirtualNetworkGatewayListResultIterator struct {
31853	i    int
31854	page VirtualNetworkGatewayListResultPage
31855}
31856
31857// NextWithContext advances to the next value.  If there was an error making
31858// the request the iterator does not advance and the error is returned.
31859func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
31860	if tracing.IsEnabled() {
31861		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
31862		defer func() {
31863			sc := -1
31864			if iter.Response().Response.Response != nil {
31865				sc = iter.Response().Response.Response.StatusCode
31866			}
31867			tracing.EndSpan(ctx, sc, err)
31868		}()
31869	}
31870	iter.i++
31871	if iter.i < len(iter.page.Values()) {
31872		return nil
31873	}
31874	err = iter.page.NextWithContext(ctx)
31875	if err != nil {
31876		iter.i--
31877		return err
31878	}
31879	iter.i = 0
31880	return nil
31881}
31882
31883// Next advances to the next value.  If there was an error making
31884// the request the iterator does not advance and the error is returned.
31885// Deprecated: Use NextWithContext() instead.
31886func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
31887	return iter.NextWithContext(context.Background())
31888}
31889
31890// NotDone returns true if the enumeration should be started or is not yet complete.
31891func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
31892	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31893}
31894
31895// Response returns the raw server response from the last page request.
31896func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
31897	return iter.page.Response()
31898}
31899
31900// Value returns the current value or a zero-initialized value if the
31901// iterator has advanced beyond the end of the collection.
31902func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
31903	if !iter.page.NotDone() {
31904		return VirtualNetworkGateway{}
31905	}
31906	return iter.page.Values()[iter.i]
31907}
31908
31909// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
31910func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
31911	return VirtualNetworkGatewayListResultIterator{page: page}
31912}
31913
31914// IsEmpty returns true if the ListResult contains no values.
31915func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
31916	return vnglr.Value == nil || len(*vnglr.Value) == 0
31917}
31918
31919// hasNextLink returns true if the NextLink is not empty.
31920func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
31921	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
31922}
31923
31924// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
31925// It returns nil if no more results exist.
31926func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
31927	if !vnglr.hasNextLink() {
31928		return nil, nil
31929	}
31930	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31931		autorest.AsJSON(),
31932		autorest.AsGet(),
31933		autorest.WithBaseURL(to.String(vnglr.NextLink)))
31934}
31935
31936// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
31937type VirtualNetworkGatewayListResultPage struct {
31938	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
31939	vnglr VirtualNetworkGatewayListResult
31940}
31941
31942// NextWithContext advances to the next page of values.  If there was an error making
31943// the request the page does not advance and the error is returned.
31944func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
31945	if tracing.IsEnabled() {
31946		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
31947		defer func() {
31948			sc := -1
31949			if page.Response().Response.Response != nil {
31950				sc = page.Response().Response.Response.StatusCode
31951			}
31952			tracing.EndSpan(ctx, sc, err)
31953		}()
31954	}
31955	for {
31956		next, err := page.fn(ctx, page.vnglr)
31957		if err != nil {
31958			return err
31959		}
31960		page.vnglr = next
31961		if !next.hasNextLink() || !next.IsEmpty() {
31962			break
31963		}
31964	}
31965	return nil
31966}
31967
31968// Next advances to the next page of values.  If there was an error making
31969// the request the page does not advance and the error is returned.
31970// Deprecated: Use NextWithContext() instead.
31971func (page *VirtualNetworkGatewayListResultPage) Next() error {
31972	return page.NextWithContext(context.Background())
31973}
31974
31975// NotDone returns true if the page enumeration should be started or is not yet complete.
31976func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
31977	return !page.vnglr.IsEmpty()
31978}
31979
31980// Response returns the raw server response from the last page request.
31981func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
31982	return page.vnglr
31983}
31984
31985// Values returns the slice of values for the current page or nil if there are no values.
31986func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
31987	if page.vnglr.IsEmpty() {
31988		return nil
31989	}
31990	return *page.vnglr.Value
31991}
31992
31993// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
31994func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
31995	return VirtualNetworkGatewayListResultPage{
31996		fn:    getNextPage,
31997		vnglr: cur,
31998	}
31999}
32000
32001// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties.
32002type VirtualNetworkGatewayPropertiesFormat struct {
32003	// IPConfigurations - IP configurations for virtual network gateway.
32004	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
32005	// GatewayType - The type of this virtual network gateway. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
32006	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
32007	// VpnType - The type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased'
32008	VpnType VpnType `json:"vpnType,omitempty"`
32009	// VpnGatewayGeneration - The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. Possible values include: 'VpnGatewayGenerationNone', 'VpnGatewayGenerationGeneration1', 'VpnGatewayGenerationGeneration2'
32010	VpnGatewayGeneration VpnGatewayGeneration `json:"vpnGatewayGeneration,omitempty"`
32011	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
32012	EnableBgp *bool `json:"enableBgp,omitempty"`
32013	// EnablePrivateIPAddress - Whether private IP needs to be enabled on this gateway for connections or not.
32014	EnablePrivateIPAddress *bool `json:"enablePrivateIpAddress,omitempty"`
32015	// ActiveActive - ActiveActive flag.
32016	ActiveActive *bool `json:"activeActive,omitempty"`
32017	// 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.
32018	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
32019	// Sku - The reference to the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
32020	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
32021	// VpnClientConfiguration - The reference to the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
32022	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
32023	// BgpSettings - Virtual network gateway's BGP speaker settings.
32024	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
32025	// 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.
32026	CustomRoutes *AddressSpace `json:"customRoutes,omitempty"`
32027	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway resource.
32028	ResourceGUID *string `json:"resourceGuid,omitempty"`
32029	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
32030	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32031	// EnableDNSForwarding - Whether dns forwarding is enabled or not.
32032	EnableDNSForwarding *bool `json:"enableDnsForwarding,omitempty"`
32033	// InboundDNSForwardingEndpoint - READ-ONLY; The IP address allocated by the gateway to which dns requests can be sent.
32034	InboundDNSForwardingEndpoint *string `json:"inboundDnsForwardingEndpoint,omitempty"`
32035}
32036
32037// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
32038func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
32039	objectMap := make(map[string]interface{})
32040	if vngpf.IPConfigurations != nil {
32041		objectMap["ipConfigurations"] = vngpf.IPConfigurations
32042	}
32043	if vngpf.GatewayType != "" {
32044		objectMap["gatewayType"] = vngpf.GatewayType
32045	}
32046	if vngpf.VpnType != "" {
32047		objectMap["vpnType"] = vngpf.VpnType
32048	}
32049	if vngpf.VpnGatewayGeneration != "" {
32050		objectMap["vpnGatewayGeneration"] = vngpf.VpnGatewayGeneration
32051	}
32052	if vngpf.EnableBgp != nil {
32053		objectMap["enableBgp"] = vngpf.EnableBgp
32054	}
32055	if vngpf.EnablePrivateIPAddress != nil {
32056		objectMap["enablePrivateIpAddress"] = vngpf.EnablePrivateIPAddress
32057	}
32058	if vngpf.ActiveActive != nil {
32059		objectMap["activeActive"] = vngpf.ActiveActive
32060	}
32061	if vngpf.GatewayDefaultSite != nil {
32062		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
32063	}
32064	if vngpf.Sku != nil {
32065		objectMap["sku"] = vngpf.Sku
32066	}
32067	if vngpf.VpnClientConfiguration != nil {
32068		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
32069	}
32070	if vngpf.BgpSettings != nil {
32071		objectMap["bgpSettings"] = vngpf.BgpSettings
32072	}
32073	if vngpf.CustomRoutes != nil {
32074		objectMap["customRoutes"] = vngpf.CustomRoutes
32075	}
32076	if vngpf.EnableDNSForwarding != nil {
32077		objectMap["enableDnsForwarding"] = vngpf.EnableDNSForwarding
32078	}
32079	return json.Marshal(objectMap)
32080}
32081
32082// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
32083// long-running operation.
32084type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
32085	azure.FutureAPI
32086	// Result returns the result of the asynchronous operation.
32087	// If the operation has not completed it will return an error.
32088	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
32089}
32090
32091// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
32092// long-running operation.
32093type VirtualNetworkGatewaysDeleteFuture struct {
32094	azure.FutureAPI
32095	// Result returns the result of the asynchronous operation.
32096	// If the operation has not completed it will return an error.
32097	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
32098}
32099
32100// VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture an abstraction for monitoring
32101// and retrieving the results of a long-running operation.
32102type VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture struct {
32103	azure.FutureAPI
32104	// Result returns the result of the asynchronous operation.
32105	// If the operation has not completed it will return an error.
32106	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
32107}
32108
32109// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
32110// results of a long-running operation.
32111type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
32112	azure.FutureAPI
32113	// Result returns the result of the asynchronous operation.
32114	// If the operation has not completed it will return an error.
32115	Result func(VirtualNetworkGatewaysClient) (String, error)
32116}
32117
32118// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
32119// of a long-running operation.
32120type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
32121	azure.FutureAPI
32122	// Result returns the result of the asynchronous operation.
32123	// If the operation has not completed it will return an error.
32124	Result func(VirtualNetworkGatewaysClient) (String, error)
32125}
32126
32127// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
32128// of a long-running operation.
32129type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
32130	azure.FutureAPI
32131	// Result returns the result of the asynchronous operation.
32132	// If the operation has not completed it will return an error.
32133	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
32134}
32135
32136// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
32137// a long-running operation.
32138type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
32139	azure.FutureAPI
32140	// Result returns the result of the asynchronous operation.
32141	// If the operation has not completed it will return an error.
32142	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
32143}
32144
32145// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
32146// a long-running operation.
32147type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
32148	azure.FutureAPI
32149	// Result returns the result of the asynchronous operation.
32150	// If the operation has not completed it will return an error.
32151	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
32152}
32153
32154// VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture an abstraction for monitoring and retrieving
32155// the results of a long-running operation.
32156type VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture struct {
32157	azure.FutureAPI
32158	// Result returns the result of the asynchronous operation.
32159	// If the operation has not completed it will return an error.
32160	Result func(VirtualNetworkGatewaysClient) (VpnClientConnectionHealthDetailListResult, error)
32161}
32162
32163// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
32164// results of a long-running operation.
32165type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
32166	azure.FutureAPI
32167	// Result returns the result of the asynchronous operation.
32168	// If the operation has not completed it will return an error.
32169	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
32170}
32171
32172// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
32173// results of a long-running operation.
32174type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
32175	azure.FutureAPI
32176	// Result returns the result of the asynchronous operation.
32177	// If the operation has not completed it will return an error.
32178	Result func(VirtualNetworkGatewaysClient) (String, error)
32179}
32180
32181// VirtualNetworkGatewaySku virtualNetworkGatewaySku details.
32182type VirtualNetworkGatewaySku struct {
32183	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw4', 'VirtualNetworkGatewaySkuNameVpnGw5', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameVpnGw4AZ', 'VirtualNetworkGatewaySkuNameVpnGw5AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
32184	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
32185	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw4', 'VirtualNetworkGatewaySkuTierVpnGw5', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierVpnGw4AZ', 'VirtualNetworkGatewaySkuTierVpnGw5AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
32186	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
32187	// Capacity - READ-ONLY; The capacity.
32188	Capacity *int32 `json:"capacity,omitempty"`
32189}
32190
32191// MarshalJSON is the custom marshaler for VirtualNetworkGatewaySku.
32192func (vngs VirtualNetworkGatewaySku) MarshalJSON() ([]byte, error) {
32193	objectMap := make(map[string]interface{})
32194	if vngs.Name != "" {
32195		objectMap["name"] = vngs.Name
32196	}
32197	if vngs.Tier != "" {
32198		objectMap["tier"] = vngs.Tier
32199	}
32200	return json.Marshal(objectMap)
32201}
32202
32203// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
32204// long-running operation.
32205type VirtualNetworkGatewaysResetFuture struct {
32206	azure.FutureAPI
32207	// Result returns the result of the asynchronous operation.
32208	// If the operation has not completed it will return an error.
32209	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
32210}
32211
32212// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
32213// results of a long-running operation.
32214type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
32215	azure.FutureAPI
32216	// Result returns the result of the asynchronous operation.
32217	// If the operation has not completed it will return an error.
32218	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
32219}
32220
32221// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
32222// results of a long-running operation.
32223type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
32224	azure.FutureAPI
32225	// Result returns the result of the asynchronous operation.
32226	// If the operation has not completed it will return an error.
32227	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
32228}
32229
32230// VirtualNetworkGatewaysStartPacketCaptureFuture an abstraction for monitoring and retrieving the results
32231// of a long-running operation.
32232type VirtualNetworkGatewaysStartPacketCaptureFuture struct {
32233	azure.FutureAPI
32234	// Result returns the result of the asynchronous operation.
32235	// If the operation has not completed it will return an error.
32236	Result func(VirtualNetworkGatewaysClient) (String, error)
32237}
32238
32239// VirtualNetworkGatewaysStopPacketCaptureFuture an abstraction for monitoring and retrieving the results
32240// of a long-running operation.
32241type VirtualNetworkGatewaysStopPacketCaptureFuture struct {
32242	azure.FutureAPI
32243	// Result returns the result of the asynchronous operation.
32244	// If the operation has not completed it will return an error.
32245	Result func(VirtualNetworkGatewaysClient) (String, error)
32246}
32247
32248// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
32249// long-running operation.
32250type VirtualNetworkGatewaysUpdateTagsFuture struct {
32251	azure.FutureAPI
32252	// Result returns the result of the asynchronous operation.
32253	// If the operation has not completed it will return an error.
32254	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
32255}
32256
32257// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
32258type VirtualNetworkListResult struct {
32259	autorest.Response `json:"-"`
32260	// Value - A list of VirtualNetwork resources in a resource group.
32261	Value *[]VirtualNetwork `json:"value,omitempty"`
32262	// NextLink - The URL to get the next set of results.
32263	NextLink *string `json:"nextLink,omitempty"`
32264}
32265
32266// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
32267type VirtualNetworkListResultIterator struct {
32268	i    int
32269	page VirtualNetworkListResultPage
32270}
32271
32272// NextWithContext advances to the next value.  If there was an error making
32273// the request the iterator does not advance and the error is returned.
32274func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
32275	if tracing.IsEnabled() {
32276		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
32277		defer func() {
32278			sc := -1
32279			if iter.Response().Response.Response != nil {
32280				sc = iter.Response().Response.Response.StatusCode
32281			}
32282			tracing.EndSpan(ctx, sc, err)
32283		}()
32284	}
32285	iter.i++
32286	if iter.i < len(iter.page.Values()) {
32287		return nil
32288	}
32289	err = iter.page.NextWithContext(ctx)
32290	if err != nil {
32291		iter.i--
32292		return err
32293	}
32294	iter.i = 0
32295	return nil
32296}
32297
32298// Next advances to the next value.  If there was an error making
32299// the request the iterator does not advance and the error is returned.
32300// Deprecated: Use NextWithContext() instead.
32301func (iter *VirtualNetworkListResultIterator) Next() error {
32302	return iter.NextWithContext(context.Background())
32303}
32304
32305// NotDone returns true if the enumeration should be started or is not yet complete.
32306func (iter VirtualNetworkListResultIterator) NotDone() bool {
32307	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32308}
32309
32310// Response returns the raw server response from the last page request.
32311func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
32312	return iter.page.Response()
32313}
32314
32315// Value returns the current value or a zero-initialized value if the
32316// iterator has advanced beyond the end of the collection.
32317func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
32318	if !iter.page.NotDone() {
32319		return VirtualNetwork{}
32320	}
32321	return iter.page.Values()[iter.i]
32322}
32323
32324// Creates a new instance of the VirtualNetworkListResultIterator type.
32325func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
32326	return VirtualNetworkListResultIterator{page: page}
32327}
32328
32329// IsEmpty returns true if the ListResult contains no values.
32330func (vnlr VirtualNetworkListResult) IsEmpty() bool {
32331	return vnlr.Value == nil || len(*vnlr.Value) == 0
32332}
32333
32334// hasNextLink returns true if the NextLink is not empty.
32335func (vnlr VirtualNetworkListResult) hasNextLink() bool {
32336	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
32337}
32338
32339// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
32340// It returns nil if no more results exist.
32341func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
32342	if !vnlr.hasNextLink() {
32343		return nil, nil
32344	}
32345	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32346		autorest.AsJSON(),
32347		autorest.AsGet(),
32348		autorest.WithBaseURL(to.String(vnlr.NextLink)))
32349}
32350
32351// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
32352type VirtualNetworkListResultPage struct {
32353	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
32354	vnlr VirtualNetworkListResult
32355}
32356
32357// NextWithContext advances to the next page of values.  If there was an error making
32358// the request the page does not advance and the error is returned.
32359func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
32360	if tracing.IsEnabled() {
32361		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
32362		defer func() {
32363			sc := -1
32364			if page.Response().Response.Response != nil {
32365				sc = page.Response().Response.Response.StatusCode
32366			}
32367			tracing.EndSpan(ctx, sc, err)
32368		}()
32369	}
32370	for {
32371		next, err := page.fn(ctx, page.vnlr)
32372		if err != nil {
32373			return err
32374		}
32375		page.vnlr = next
32376		if !next.hasNextLink() || !next.IsEmpty() {
32377			break
32378		}
32379	}
32380	return nil
32381}
32382
32383// Next advances to the next page of values.  If there was an error making
32384// the request the page does not advance and the error is returned.
32385// Deprecated: Use NextWithContext() instead.
32386func (page *VirtualNetworkListResultPage) Next() error {
32387	return page.NextWithContext(context.Background())
32388}
32389
32390// NotDone returns true if the page enumeration should be started or is not yet complete.
32391func (page VirtualNetworkListResultPage) NotDone() bool {
32392	return !page.vnlr.IsEmpty()
32393}
32394
32395// Response returns the raw server response from the last page request.
32396func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
32397	return page.vnlr
32398}
32399
32400// Values returns the slice of values for the current page or nil if there are no values.
32401func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
32402	if page.vnlr.IsEmpty() {
32403		return nil
32404	}
32405	return *page.vnlr.Value
32406}
32407
32408// Creates a new instance of the VirtualNetworkListResultPage type.
32409func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
32410	return VirtualNetworkListResultPage{
32411		fn:   getNextPage,
32412		vnlr: cur,
32413	}
32414}
32415
32416// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
32417type VirtualNetworkListUsageResult struct {
32418	autorest.Response `json:"-"`
32419	// Value - READ-ONLY; VirtualNetwork usage stats.
32420	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
32421	// NextLink - The URL to get the next set of results.
32422	NextLink *string `json:"nextLink,omitempty"`
32423}
32424
32425// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
32426func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
32427	objectMap := make(map[string]interface{})
32428	if vnlur.NextLink != nil {
32429		objectMap["nextLink"] = vnlur.NextLink
32430	}
32431	return json.Marshal(objectMap)
32432}
32433
32434// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
32435// values.
32436type VirtualNetworkListUsageResultIterator struct {
32437	i    int
32438	page VirtualNetworkListUsageResultPage
32439}
32440
32441// NextWithContext advances to the next value.  If there was an error making
32442// the request the iterator does not advance and the error is returned.
32443func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
32444	if tracing.IsEnabled() {
32445		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
32446		defer func() {
32447			sc := -1
32448			if iter.Response().Response.Response != nil {
32449				sc = iter.Response().Response.Response.StatusCode
32450			}
32451			tracing.EndSpan(ctx, sc, err)
32452		}()
32453	}
32454	iter.i++
32455	if iter.i < len(iter.page.Values()) {
32456		return nil
32457	}
32458	err = iter.page.NextWithContext(ctx)
32459	if err != nil {
32460		iter.i--
32461		return err
32462	}
32463	iter.i = 0
32464	return nil
32465}
32466
32467// Next advances to the next value.  If there was an error making
32468// the request the iterator does not advance and the error is returned.
32469// Deprecated: Use NextWithContext() instead.
32470func (iter *VirtualNetworkListUsageResultIterator) Next() error {
32471	return iter.NextWithContext(context.Background())
32472}
32473
32474// NotDone returns true if the enumeration should be started or is not yet complete.
32475func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
32476	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32477}
32478
32479// Response returns the raw server response from the last page request.
32480func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
32481	return iter.page.Response()
32482}
32483
32484// Value returns the current value or a zero-initialized value if the
32485// iterator has advanced beyond the end of the collection.
32486func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
32487	if !iter.page.NotDone() {
32488		return VirtualNetworkUsage{}
32489	}
32490	return iter.page.Values()[iter.i]
32491}
32492
32493// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
32494func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
32495	return VirtualNetworkListUsageResultIterator{page: page}
32496}
32497
32498// IsEmpty returns true if the ListResult contains no values.
32499func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
32500	return vnlur.Value == nil || len(*vnlur.Value) == 0
32501}
32502
32503// hasNextLink returns true if the NextLink is not empty.
32504func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
32505	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
32506}
32507
32508// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
32509// It returns nil if no more results exist.
32510func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
32511	if !vnlur.hasNextLink() {
32512		return nil, nil
32513	}
32514	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32515		autorest.AsJSON(),
32516		autorest.AsGet(),
32517		autorest.WithBaseURL(to.String(vnlur.NextLink)))
32518}
32519
32520// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
32521type VirtualNetworkListUsageResultPage struct {
32522	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
32523	vnlur VirtualNetworkListUsageResult
32524}
32525
32526// NextWithContext advances to the next page of values.  If there was an error making
32527// the request the page does not advance and the error is returned.
32528func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
32529	if tracing.IsEnabled() {
32530		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
32531		defer func() {
32532			sc := -1
32533			if page.Response().Response.Response != nil {
32534				sc = page.Response().Response.Response.StatusCode
32535			}
32536			tracing.EndSpan(ctx, sc, err)
32537		}()
32538	}
32539	for {
32540		next, err := page.fn(ctx, page.vnlur)
32541		if err != nil {
32542			return err
32543		}
32544		page.vnlur = next
32545		if !next.hasNextLink() || !next.IsEmpty() {
32546			break
32547		}
32548	}
32549	return nil
32550}
32551
32552// Next advances to the next page of values.  If there was an error making
32553// the request the page does not advance and the error is returned.
32554// Deprecated: Use NextWithContext() instead.
32555func (page *VirtualNetworkListUsageResultPage) Next() error {
32556	return page.NextWithContext(context.Background())
32557}
32558
32559// NotDone returns true if the page enumeration should be started or is not yet complete.
32560func (page VirtualNetworkListUsageResultPage) NotDone() bool {
32561	return !page.vnlur.IsEmpty()
32562}
32563
32564// Response returns the raw server response from the last page request.
32565func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
32566	return page.vnlur
32567}
32568
32569// Values returns the slice of values for the current page or nil if there are no values.
32570func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
32571	if page.vnlur.IsEmpty() {
32572		return nil
32573	}
32574	return *page.vnlur.Value
32575}
32576
32577// Creates a new instance of the VirtualNetworkListUsageResultPage type.
32578func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
32579	return VirtualNetworkListUsageResultPage{
32580		fn:    getNextPage,
32581		vnlur: cur,
32582	}
32583}
32584
32585// VirtualNetworkPeering peerings in a virtual network resource.
32586type VirtualNetworkPeering struct {
32587	autorest.Response `json:"-"`
32588	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
32589	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
32590	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
32591	Name *string `json:"name,omitempty"`
32592	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
32593	Etag *string `json:"etag,omitempty"`
32594	// ID - Resource ID.
32595	ID *string `json:"id,omitempty"`
32596}
32597
32598// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
32599func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
32600	objectMap := make(map[string]interface{})
32601	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
32602		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
32603	}
32604	if vnp.Name != nil {
32605		objectMap["name"] = vnp.Name
32606	}
32607	if vnp.ID != nil {
32608		objectMap["id"] = vnp.ID
32609	}
32610	return json.Marshal(objectMap)
32611}
32612
32613// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
32614func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
32615	var m map[string]*json.RawMessage
32616	err := json.Unmarshal(body, &m)
32617	if err != nil {
32618		return err
32619	}
32620	for k, v := range m {
32621		switch k {
32622		case "properties":
32623			if v != nil {
32624				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
32625				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
32626				if err != nil {
32627					return err
32628				}
32629				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
32630			}
32631		case "name":
32632			if v != nil {
32633				var name string
32634				err = json.Unmarshal(*v, &name)
32635				if err != nil {
32636					return err
32637				}
32638				vnp.Name = &name
32639			}
32640		case "etag":
32641			if v != nil {
32642				var etag string
32643				err = json.Unmarshal(*v, &etag)
32644				if err != nil {
32645					return err
32646				}
32647				vnp.Etag = &etag
32648			}
32649		case "id":
32650			if v != nil {
32651				var ID string
32652				err = json.Unmarshal(*v, &ID)
32653				if err != nil {
32654					return err
32655				}
32656				vnp.ID = &ID
32657			}
32658		}
32659	}
32660
32661	return nil
32662}
32663
32664// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
32665// belong to a virtual network.
32666type VirtualNetworkPeeringListResult struct {
32667	autorest.Response `json:"-"`
32668	// Value - The peerings in a virtual network.
32669	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
32670	// NextLink - The URL to get the next set of results.
32671	NextLink *string `json:"nextLink,omitempty"`
32672}
32673
32674// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
32675// values.
32676type VirtualNetworkPeeringListResultIterator struct {
32677	i    int
32678	page VirtualNetworkPeeringListResultPage
32679}
32680
32681// NextWithContext advances to the next value.  If there was an error making
32682// the request the iterator does not advance and the error is returned.
32683func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
32684	if tracing.IsEnabled() {
32685		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
32686		defer func() {
32687			sc := -1
32688			if iter.Response().Response.Response != nil {
32689				sc = iter.Response().Response.Response.StatusCode
32690			}
32691			tracing.EndSpan(ctx, sc, err)
32692		}()
32693	}
32694	iter.i++
32695	if iter.i < len(iter.page.Values()) {
32696		return nil
32697	}
32698	err = iter.page.NextWithContext(ctx)
32699	if err != nil {
32700		iter.i--
32701		return err
32702	}
32703	iter.i = 0
32704	return nil
32705}
32706
32707// Next advances to the next value.  If there was an error making
32708// the request the iterator does not advance and the error is returned.
32709// Deprecated: Use NextWithContext() instead.
32710func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
32711	return iter.NextWithContext(context.Background())
32712}
32713
32714// NotDone returns true if the enumeration should be started or is not yet complete.
32715func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
32716	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32717}
32718
32719// Response returns the raw server response from the last page request.
32720func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
32721	return iter.page.Response()
32722}
32723
32724// Value returns the current value or a zero-initialized value if the
32725// iterator has advanced beyond the end of the collection.
32726func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
32727	if !iter.page.NotDone() {
32728		return VirtualNetworkPeering{}
32729	}
32730	return iter.page.Values()[iter.i]
32731}
32732
32733// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
32734func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
32735	return VirtualNetworkPeeringListResultIterator{page: page}
32736}
32737
32738// IsEmpty returns true if the ListResult contains no values.
32739func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
32740	return vnplr.Value == nil || len(*vnplr.Value) == 0
32741}
32742
32743// hasNextLink returns true if the NextLink is not empty.
32744func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
32745	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
32746}
32747
32748// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
32749// It returns nil if no more results exist.
32750func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
32751	if !vnplr.hasNextLink() {
32752		return nil, nil
32753	}
32754	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32755		autorest.AsJSON(),
32756		autorest.AsGet(),
32757		autorest.WithBaseURL(to.String(vnplr.NextLink)))
32758}
32759
32760// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
32761type VirtualNetworkPeeringListResultPage struct {
32762	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
32763	vnplr VirtualNetworkPeeringListResult
32764}
32765
32766// NextWithContext advances to the next page of values.  If there was an error making
32767// the request the page does not advance and the error is returned.
32768func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
32769	if tracing.IsEnabled() {
32770		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
32771		defer func() {
32772			sc := -1
32773			if page.Response().Response.Response != nil {
32774				sc = page.Response().Response.Response.StatusCode
32775			}
32776			tracing.EndSpan(ctx, sc, err)
32777		}()
32778	}
32779	for {
32780		next, err := page.fn(ctx, page.vnplr)
32781		if err != nil {
32782			return err
32783		}
32784		page.vnplr = next
32785		if !next.hasNextLink() || !next.IsEmpty() {
32786			break
32787		}
32788	}
32789	return nil
32790}
32791
32792// Next 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.
32794// Deprecated: Use NextWithContext() instead.
32795func (page *VirtualNetworkPeeringListResultPage) Next() error {
32796	return page.NextWithContext(context.Background())
32797}
32798
32799// NotDone returns true if the page enumeration should be started or is not yet complete.
32800func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
32801	return !page.vnplr.IsEmpty()
32802}
32803
32804// Response returns the raw server response from the last page request.
32805func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
32806	return page.vnplr
32807}
32808
32809// Values returns the slice of values for the current page or nil if there are no values.
32810func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
32811	if page.vnplr.IsEmpty() {
32812		return nil
32813	}
32814	return *page.vnplr.Value
32815}
32816
32817// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
32818func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
32819	return VirtualNetworkPeeringListResultPage{
32820		fn:    getNextPage,
32821		vnplr: cur,
32822	}
32823}
32824
32825// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
32826type VirtualNetworkPeeringPropertiesFormat struct {
32827	// AllowVirtualNetworkAccess - Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
32828	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
32829	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
32830	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
32831	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
32832	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
32833	// 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.
32834	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
32835	// 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).
32836	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
32837	// RemoteAddressSpace - The reference to the remote virtual network address space.
32838	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
32839	// PeeringState - The status of the virtual network peering. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
32840	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
32841	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
32842	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32843}
32844
32845// MarshalJSON is the custom marshaler for VirtualNetworkPeeringPropertiesFormat.
32846func (vnppf VirtualNetworkPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
32847	objectMap := make(map[string]interface{})
32848	if vnppf.AllowVirtualNetworkAccess != nil {
32849		objectMap["allowVirtualNetworkAccess"] = vnppf.AllowVirtualNetworkAccess
32850	}
32851	if vnppf.AllowForwardedTraffic != nil {
32852		objectMap["allowForwardedTraffic"] = vnppf.AllowForwardedTraffic
32853	}
32854	if vnppf.AllowGatewayTransit != nil {
32855		objectMap["allowGatewayTransit"] = vnppf.AllowGatewayTransit
32856	}
32857	if vnppf.UseRemoteGateways != nil {
32858		objectMap["useRemoteGateways"] = vnppf.UseRemoteGateways
32859	}
32860	if vnppf.RemoteVirtualNetwork != nil {
32861		objectMap["remoteVirtualNetwork"] = vnppf.RemoteVirtualNetwork
32862	}
32863	if vnppf.RemoteAddressSpace != nil {
32864		objectMap["remoteAddressSpace"] = vnppf.RemoteAddressSpace
32865	}
32866	if vnppf.PeeringState != "" {
32867		objectMap["peeringState"] = vnppf.PeeringState
32868	}
32869	return json.Marshal(objectMap)
32870}
32871
32872// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
32873// long-running operation.
32874type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
32875	azure.FutureAPI
32876	// Result returns the result of the asynchronous operation.
32877	// If the operation has not completed it will return an error.
32878	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
32879}
32880
32881// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
32882// long-running operation.
32883type VirtualNetworkPeeringsDeleteFuture struct {
32884	azure.FutureAPI
32885	// Result returns the result of the asynchronous operation.
32886	// If the operation has not completed it will return an error.
32887	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
32888}
32889
32890// VirtualNetworkPropertiesFormat properties of the virtual network.
32891type VirtualNetworkPropertiesFormat struct {
32892	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
32893	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
32894	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
32895	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
32896	// Subnets - A list of subnets in a Virtual Network.
32897	Subnets *[]Subnet `json:"subnets,omitempty"`
32898	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
32899	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
32900	// ResourceGUID - READ-ONLY; The resourceGuid property of the Virtual Network resource.
32901	ResourceGUID *string `json:"resourceGuid,omitempty"`
32902	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
32903	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32904	// 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.
32905	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
32906	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
32907	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
32908	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
32909	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
32910	// BgpCommunities - Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET.
32911	BgpCommunities *VirtualNetworkBgpCommunities `json:"bgpCommunities,omitempty"`
32912	// IPAllocations - Array of IpAllocation which reference this VNET.
32913	IPAllocations *[]SubResource `json:"ipAllocations,omitempty"`
32914}
32915
32916// MarshalJSON is the custom marshaler for VirtualNetworkPropertiesFormat.
32917func (vnpf VirtualNetworkPropertiesFormat) MarshalJSON() ([]byte, error) {
32918	objectMap := make(map[string]interface{})
32919	if vnpf.AddressSpace != nil {
32920		objectMap["addressSpace"] = vnpf.AddressSpace
32921	}
32922	if vnpf.DhcpOptions != nil {
32923		objectMap["dhcpOptions"] = vnpf.DhcpOptions
32924	}
32925	if vnpf.Subnets != nil {
32926		objectMap["subnets"] = vnpf.Subnets
32927	}
32928	if vnpf.VirtualNetworkPeerings != nil {
32929		objectMap["virtualNetworkPeerings"] = vnpf.VirtualNetworkPeerings
32930	}
32931	if vnpf.EnableDdosProtection != nil {
32932		objectMap["enableDdosProtection"] = vnpf.EnableDdosProtection
32933	}
32934	if vnpf.EnableVMProtection != nil {
32935		objectMap["enableVmProtection"] = vnpf.EnableVMProtection
32936	}
32937	if vnpf.DdosProtectionPlan != nil {
32938		objectMap["ddosProtectionPlan"] = vnpf.DdosProtectionPlan
32939	}
32940	if vnpf.BgpCommunities != nil {
32941		objectMap["bgpCommunities"] = vnpf.BgpCommunities
32942	}
32943	if vnpf.IPAllocations != nil {
32944		objectMap["ipAllocations"] = vnpf.IPAllocations
32945	}
32946	return json.Marshal(objectMap)
32947}
32948
32949// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
32950// long-running operation.
32951type VirtualNetworksCreateOrUpdateFuture struct {
32952	azure.FutureAPI
32953	// Result returns the result of the asynchronous operation.
32954	// If the operation has not completed it will return an error.
32955	Result func(VirtualNetworksClient) (VirtualNetwork, error)
32956}
32957
32958// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
32959// operation.
32960type VirtualNetworksDeleteFuture struct {
32961	azure.FutureAPI
32962	// Result returns the result of the asynchronous operation.
32963	// If the operation has not completed it will return an error.
32964	Result func(VirtualNetworksClient) (autorest.Response, error)
32965}
32966
32967// VirtualNetworkTap virtual Network Tap resource.
32968type VirtualNetworkTap struct {
32969	autorest.Response `json:"-"`
32970	// VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties.
32971	*VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"`
32972	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
32973	Etag *string `json:"etag,omitempty"`
32974	// ID - Resource ID.
32975	ID *string `json:"id,omitempty"`
32976	// Name - READ-ONLY; Resource name.
32977	Name *string `json:"name,omitempty"`
32978	// Type - READ-ONLY; Resource type.
32979	Type *string `json:"type,omitempty"`
32980	// Location - Resource location.
32981	Location *string `json:"location,omitempty"`
32982	// Tags - Resource tags.
32983	Tags map[string]*string `json:"tags"`
32984}
32985
32986// MarshalJSON is the custom marshaler for VirtualNetworkTap.
32987func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) {
32988	objectMap := make(map[string]interface{})
32989	if vnt.VirtualNetworkTapPropertiesFormat != nil {
32990		objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat
32991	}
32992	if vnt.ID != nil {
32993		objectMap["id"] = vnt.ID
32994	}
32995	if vnt.Location != nil {
32996		objectMap["location"] = vnt.Location
32997	}
32998	if vnt.Tags != nil {
32999		objectMap["tags"] = vnt.Tags
33000	}
33001	return json.Marshal(objectMap)
33002}
33003
33004// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct.
33005func (vnt *VirtualNetworkTap) UnmarshalJSON(body []byte) error {
33006	var m map[string]*json.RawMessage
33007	err := json.Unmarshal(body, &m)
33008	if err != nil {
33009		return err
33010	}
33011	for k, v := range m {
33012		switch k {
33013		case "properties":
33014			if v != nil {
33015				var virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat
33016				err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat)
33017				if err != nil {
33018					return err
33019				}
33020				vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat
33021			}
33022		case "etag":
33023			if v != nil {
33024				var etag string
33025				err = json.Unmarshal(*v, &etag)
33026				if err != nil {
33027					return err
33028				}
33029				vnt.Etag = &etag
33030			}
33031		case "id":
33032			if v != nil {
33033				var ID string
33034				err = json.Unmarshal(*v, &ID)
33035				if err != nil {
33036					return err
33037				}
33038				vnt.ID = &ID
33039			}
33040		case "name":
33041			if v != nil {
33042				var name string
33043				err = json.Unmarshal(*v, &name)
33044				if err != nil {
33045					return err
33046				}
33047				vnt.Name = &name
33048			}
33049		case "type":
33050			if v != nil {
33051				var typeVar string
33052				err = json.Unmarshal(*v, &typeVar)
33053				if err != nil {
33054					return err
33055				}
33056				vnt.Type = &typeVar
33057			}
33058		case "location":
33059			if v != nil {
33060				var location string
33061				err = json.Unmarshal(*v, &location)
33062				if err != nil {
33063					return err
33064				}
33065				vnt.Location = &location
33066			}
33067		case "tags":
33068			if v != nil {
33069				var tags map[string]*string
33070				err = json.Unmarshal(*v, &tags)
33071				if err != nil {
33072					return err
33073				}
33074				vnt.Tags = tags
33075			}
33076		}
33077	}
33078
33079	return nil
33080}
33081
33082// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call.
33083type VirtualNetworkTapListResult struct {
33084	autorest.Response `json:"-"`
33085	// Value - A list of VirtualNetworkTaps in a resource group.
33086	Value *[]VirtualNetworkTap `json:"value,omitempty"`
33087	// NextLink - The URL to get the next set of results.
33088	NextLink *string `json:"nextLink,omitempty"`
33089}
33090
33091// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values.
33092type VirtualNetworkTapListResultIterator struct {
33093	i    int
33094	page VirtualNetworkTapListResultPage
33095}
33096
33097// NextWithContext advances to the next value.  If there was an error making
33098// the request the iterator does not advance and the error is returned.
33099func (iter *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) {
33100	if tracing.IsEnabled() {
33101		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.NextWithContext")
33102		defer func() {
33103			sc := -1
33104			if iter.Response().Response.Response != nil {
33105				sc = iter.Response().Response.Response.StatusCode
33106			}
33107			tracing.EndSpan(ctx, sc, err)
33108		}()
33109	}
33110	iter.i++
33111	if iter.i < len(iter.page.Values()) {
33112		return nil
33113	}
33114	err = iter.page.NextWithContext(ctx)
33115	if err != nil {
33116		iter.i--
33117		return err
33118	}
33119	iter.i = 0
33120	return nil
33121}
33122
33123// Next advances to the next value.  If there was an error making
33124// the request the iterator does not advance and the error is returned.
33125// Deprecated: Use NextWithContext() instead.
33126func (iter *VirtualNetworkTapListResultIterator) Next() error {
33127	return iter.NextWithContext(context.Background())
33128}
33129
33130// NotDone returns true if the enumeration should be started or is not yet complete.
33131func (iter VirtualNetworkTapListResultIterator) NotDone() bool {
33132	return iter.page.NotDone() && iter.i < len(iter.page.Values())
33133}
33134
33135// Response returns the raw server response from the last page request.
33136func (iter VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult {
33137	return iter.page.Response()
33138}
33139
33140// Value returns the current value or a zero-initialized value if the
33141// iterator has advanced beyond the end of the collection.
33142func (iter VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap {
33143	if !iter.page.NotDone() {
33144		return VirtualNetworkTap{}
33145	}
33146	return iter.page.Values()[iter.i]
33147}
33148
33149// Creates a new instance of the VirtualNetworkTapListResultIterator type.
33150func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator {
33151	return VirtualNetworkTapListResultIterator{page: page}
33152}
33153
33154// IsEmpty returns true if the ListResult contains no values.
33155func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
33156	return vntlr.Value == nil || len(*vntlr.Value) == 0
33157}
33158
33159// hasNextLink returns true if the NextLink is not empty.
33160func (vntlr VirtualNetworkTapListResult) hasNextLink() bool {
33161	return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0
33162}
33163
33164// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results.
33165// It returns nil if no more results exist.
33166func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) {
33167	if !vntlr.hasNextLink() {
33168		return nil, nil
33169	}
33170	return autorest.Prepare((&http.Request{}).WithContext(ctx),
33171		autorest.AsJSON(),
33172		autorest.AsGet(),
33173		autorest.WithBaseURL(to.String(vntlr.NextLink)))
33174}
33175
33176// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values.
33177type VirtualNetworkTapListResultPage struct {
33178	fn    func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
33179	vntlr VirtualNetworkTapListResult
33180}
33181
33182// NextWithContext advances to the next page of values.  If there was an error making
33183// the request the page does not advance and the error is returned.
33184func (page *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) {
33185	if tracing.IsEnabled() {
33186		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.NextWithContext")
33187		defer func() {
33188			sc := -1
33189			if page.Response().Response.Response != nil {
33190				sc = page.Response().Response.Response.StatusCode
33191			}
33192			tracing.EndSpan(ctx, sc, err)
33193		}()
33194	}
33195	for {
33196		next, err := page.fn(ctx, page.vntlr)
33197		if err != nil {
33198			return err
33199		}
33200		page.vntlr = next
33201		if !next.hasNextLink() || !next.IsEmpty() {
33202			break
33203		}
33204	}
33205	return nil
33206}
33207
33208// Next advances to the next page of values.  If there was an error making
33209// the request the page does not advance and the error is returned.
33210// Deprecated: Use NextWithContext() instead.
33211func (page *VirtualNetworkTapListResultPage) Next() error {
33212	return page.NextWithContext(context.Background())
33213}
33214
33215// NotDone returns true if the page enumeration should be started or is not yet complete.
33216func (page VirtualNetworkTapListResultPage) NotDone() bool {
33217	return !page.vntlr.IsEmpty()
33218}
33219
33220// Response returns the raw server response from the last page request.
33221func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult {
33222	return page.vntlr
33223}
33224
33225// Values returns the slice of values for the current page or nil if there are no values.
33226func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap {
33227	if page.vntlr.IsEmpty() {
33228		return nil
33229	}
33230	return *page.vntlr.Value
33231}
33232
33233// Creates a new instance of the VirtualNetworkTapListResultPage type.
33234func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage {
33235	return VirtualNetworkTapListResultPage{
33236		fn:    getNextPage,
33237		vntlr: cur,
33238	}
33239}
33240
33241// VirtualNetworkTapPropertiesFormat virtual Network Tap properties.
33242type VirtualNetworkTapPropertiesFormat struct {
33243	// NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
33244	NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"`
33245	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network tap resource.
33246	ResourceGUID *string `json:"resourceGuid,omitempty"`
33247	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
33248	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
33249	// DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap.
33250	DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"`
33251	// DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap.
33252	DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"`
33253	// DestinationPort - The VXLAN destination port that will receive the tapped traffic.
33254	DestinationPort *int32 `json:"destinationPort,omitempty"`
33255}
33256
33257// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat.
33258func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) {
33259	objectMap := make(map[string]interface{})
33260	if vntpf.DestinationNetworkInterfaceIPConfiguration != nil {
33261		objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration
33262	}
33263	if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil {
33264		objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration
33265	}
33266	if vntpf.DestinationPort != nil {
33267		objectMap["destinationPort"] = vntpf.DestinationPort
33268	}
33269	return json.Marshal(objectMap)
33270}
33271
33272// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
33273// long-running operation.
33274type VirtualNetworkTapsCreateOrUpdateFuture struct {
33275	azure.FutureAPI
33276	// Result returns the result of the asynchronous operation.
33277	// If the operation has not completed it will return an error.
33278	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
33279}
33280
33281// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a
33282// long-running operation.
33283type VirtualNetworkTapsDeleteFuture struct {
33284	azure.FutureAPI
33285	// Result returns the result of the asynchronous operation.
33286	// If the operation has not completed it will return an error.
33287	Result func(VirtualNetworkTapsClient) (autorest.Response, error)
33288}
33289
33290// VirtualNetworkUsage usage details for subnet.
33291type VirtualNetworkUsage struct {
33292	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
33293	CurrentValue *float64 `json:"currentValue,omitempty"`
33294	// ID - READ-ONLY; Subnet identifier.
33295	ID *string `json:"id,omitempty"`
33296	// Limit - READ-ONLY; Indicates the size of the subnet.
33297	Limit *float64 `json:"limit,omitempty"`
33298	// Name - READ-ONLY; The name containing common and localized value for usage.
33299	Name *VirtualNetworkUsageName `json:"name,omitempty"`
33300	// Unit - READ-ONLY; Usage units. Returns 'Count'.
33301	Unit *string `json:"unit,omitempty"`
33302}
33303
33304// VirtualNetworkUsageName usage strings container.
33305type VirtualNetworkUsageName struct {
33306	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
33307	LocalizedValue *string `json:"localizedValue,omitempty"`
33308	// Value - READ-ONLY; Subnet size and usage string.
33309	Value *string `json:"value,omitempty"`
33310}
33311
33312// VirtualRouter virtualRouter Resource.
33313type VirtualRouter struct {
33314	autorest.Response `json:"-"`
33315	// VirtualRouterPropertiesFormat - Properties of the Virtual Router.
33316	*VirtualRouterPropertiesFormat `json:"properties,omitempty"`
33317	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
33318	Etag *string `json:"etag,omitempty"`
33319	// ID - Resource ID.
33320	ID *string `json:"id,omitempty"`
33321	// Name - READ-ONLY; Resource name.
33322	Name *string `json:"name,omitempty"`
33323	// Type - READ-ONLY; Resource type.
33324	Type *string `json:"type,omitempty"`
33325	// Location - Resource location.
33326	Location *string `json:"location,omitempty"`
33327	// Tags - Resource tags.
33328	Tags map[string]*string `json:"tags"`
33329}
33330
33331// MarshalJSON is the custom marshaler for VirtualRouter.
33332func (vr VirtualRouter) MarshalJSON() ([]byte, error) {
33333	objectMap := make(map[string]interface{})
33334	if vr.VirtualRouterPropertiesFormat != nil {
33335		objectMap["properties"] = vr.VirtualRouterPropertiesFormat
33336	}
33337	if vr.ID != nil {
33338		objectMap["id"] = vr.ID
33339	}
33340	if vr.Location != nil {
33341		objectMap["location"] = vr.Location
33342	}
33343	if vr.Tags != nil {
33344		objectMap["tags"] = vr.Tags
33345	}
33346	return json.Marshal(objectMap)
33347}
33348
33349// UnmarshalJSON is the custom unmarshaler for VirtualRouter struct.
33350func (vr *VirtualRouter) UnmarshalJSON(body []byte) error {
33351	var m map[string]*json.RawMessage
33352	err := json.Unmarshal(body, &m)
33353	if err != nil {
33354		return err
33355	}
33356	for k, v := range m {
33357		switch k {
33358		case "properties":
33359			if v != nil {
33360				var virtualRouterPropertiesFormat VirtualRouterPropertiesFormat
33361				err = json.Unmarshal(*v, &virtualRouterPropertiesFormat)
33362				if err != nil {
33363					return err
33364				}
33365				vr.VirtualRouterPropertiesFormat = &virtualRouterPropertiesFormat
33366			}
33367		case "etag":
33368			if v != nil {
33369				var etag string
33370				err = json.Unmarshal(*v, &etag)
33371				if err != nil {
33372					return err
33373				}
33374				vr.Etag = &etag
33375			}
33376		case "id":
33377			if v != nil {
33378				var ID string
33379				err = json.Unmarshal(*v, &ID)
33380				if err != nil {
33381					return err
33382				}
33383				vr.ID = &ID
33384			}
33385		case "name":
33386			if v != nil {
33387				var name string
33388				err = json.Unmarshal(*v, &name)
33389				if err != nil {
33390					return err
33391				}
33392				vr.Name = &name
33393			}
33394		case "type":
33395			if v != nil {
33396				var typeVar string
33397				err = json.Unmarshal(*v, &typeVar)
33398				if err != nil {
33399					return err
33400				}
33401				vr.Type = &typeVar
33402			}
33403		case "location":
33404			if v != nil {
33405				var location string
33406				err = json.Unmarshal(*v, &location)
33407				if err != nil {
33408					return err
33409				}
33410				vr.Location = &location
33411			}
33412		case "tags":
33413			if v != nil {
33414				var tags map[string]*string
33415				err = json.Unmarshal(*v, &tags)
33416				if err != nil {
33417					return err
33418				}
33419				vr.Tags = tags
33420			}
33421		}
33422	}
33423
33424	return nil
33425}
33426
33427// VirtualRouterListResult response for ListVirtualRouters API service call.
33428type VirtualRouterListResult struct {
33429	autorest.Response `json:"-"`
33430	// Value - List of Virtual Routers.
33431	Value *[]VirtualRouter `json:"value,omitempty"`
33432	// NextLink - URL to get the next set of results.
33433	NextLink *string `json:"nextLink,omitempty"`
33434}
33435
33436// VirtualRouterListResultIterator provides access to a complete listing of VirtualRouter values.
33437type VirtualRouterListResultIterator struct {
33438	i    int
33439	page VirtualRouterListResultPage
33440}
33441
33442// NextWithContext advances to the next value.  If there was an error making
33443// the request the iterator does not advance and the error is returned.
33444func (iter *VirtualRouterListResultIterator) NextWithContext(ctx context.Context) (err error) {
33445	if tracing.IsEnabled() {
33446		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterListResultIterator.NextWithContext")
33447		defer func() {
33448			sc := -1
33449			if iter.Response().Response.Response != nil {
33450				sc = iter.Response().Response.Response.StatusCode
33451			}
33452			tracing.EndSpan(ctx, sc, err)
33453		}()
33454	}
33455	iter.i++
33456	if iter.i < len(iter.page.Values()) {
33457		return nil
33458	}
33459	err = iter.page.NextWithContext(ctx)
33460	if err != nil {
33461		iter.i--
33462		return err
33463	}
33464	iter.i = 0
33465	return nil
33466}
33467
33468// Next advances to the next value.  If there was an error making
33469// the request the iterator does not advance and the error is returned.
33470// Deprecated: Use NextWithContext() instead.
33471func (iter *VirtualRouterListResultIterator) Next() error {
33472	return iter.NextWithContext(context.Background())
33473}
33474
33475// NotDone returns true if the enumeration should be started or is not yet complete.
33476func (iter VirtualRouterListResultIterator) NotDone() bool {
33477	return iter.page.NotDone() && iter.i < len(iter.page.Values())
33478}
33479
33480// Response returns the raw server response from the last page request.
33481func (iter VirtualRouterListResultIterator) Response() VirtualRouterListResult {
33482	return iter.page.Response()
33483}
33484
33485// Value returns the current value or a zero-initialized value if the
33486// iterator has advanced beyond the end of the collection.
33487func (iter VirtualRouterListResultIterator) Value() VirtualRouter {
33488	if !iter.page.NotDone() {
33489		return VirtualRouter{}
33490	}
33491	return iter.page.Values()[iter.i]
33492}
33493
33494// Creates a new instance of the VirtualRouterListResultIterator type.
33495func NewVirtualRouterListResultIterator(page VirtualRouterListResultPage) VirtualRouterListResultIterator {
33496	return VirtualRouterListResultIterator{page: page}
33497}
33498
33499// IsEmpty returns true if the ListResult contains no values.
33500func (vrlr VirtualRouterListResult) IsEmpty() bool {
33501	return vrlr.Value == nil || len(*vrlr.Value) == 0
33502}
33503
33504// hasNextLink returns true if the NextLink is not empty.
33505func (vrlr VirtualRouterListResult) hasNextLink() bool {
33506	return vrlr.NextLink != nil && len(*vrlr.NextLink) != 0
33507}
33508
33509// virtualRouterListResultPreparer prepares a request to retrieve the next set of results.
33510// It returns nil if no more results exist.
33511func (vrlr VirtualRouterListResult) virtualRouterListResultPreparer(ctx context.Context) (*http.Request, error) {
33512	if !vrlr.hasNextLink() {
33513		return nil, nil
33514	}
33515	return autorest.Prepare((&http.Request{}).WithContext(ctx),
33516		autorest.AsJSON(),
33517		autorest.AsGet(),
33518		autorest.WithBaseURL(to.String(vrlr.NextLink)))
33519}
33520
33521// VirtualRouterListResultPage contains a page of VirtualRouter values.
33522type VirtualRouterListResultPage struct {
33523	fn   func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error)
33524	vrlr VirtualRouterListResult
33525}
33526
33527// NextWithContext advances to the next page of values.  If there was an error making
33528// the request the page does not advance and the error is returned.
33529func (page *VirtualRouterListResultPage) NextWithContext(ctx context.Context) (err error) {
33530	if tracing.IsEnabled() {
33531		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterListResultPage.NextWithContext")
33532		defer func() {
33533			sc := -1
33534			if page.Response().Response.Response != nil {
33535				sc = page.Response().Response.Response.StatusCode
33536			}
33537			tracing.EndSpan(ctx, sc, err)
33538		}()
33539	}
33540	for {
33541		next, err := page.fn(ctx, page.vrlr)
33542		if err != nil {
33543			return err
33544		}
33545		page.vrlr = next
33546		if !next.hasNextLink() || !next.IsEmpty() {
33547			break
33548		}
33549	}
33550	return nil
33551}
33552
33553// Next advances to the next page of values.  If there was an error making
33554// the request the page does not advance and the error is returned.
33555// Deprecated: Use NextWithContext() instead.
33556func (page *VirtualRouterListResultPage) Next() error {
33557	return page.NextWithContext(context.Background())
33558}
33559
33560// NotDone returns true if the page enumeration should be started or is not yet complete.
33561func (page VirtualRouterListResultPage) NotDone() bool {
33562	return !page.vrlr.IsEmpty()
33563}
33564
33565// Response returns the raw server response from the last page request.
33566func (page VirtualRouterListResultPage) Response() VirtualRouterListResult {
33567	return page.vrlr
33568}
33569
33570// Values returns the slice of values for the current page or nil if there are no values.
33571func (page VirtualRouterListResultPage) Values() []VirtualRouter {
33572	if page.vrlr.IsEmpty() {
33573		return nil
33574	}
33575	return *page.vrlr.Value
33576}
33577
33578// Creates a new instance of the VirtualRouterListResultPage type.
33579func NewVirtualRouterListResultPage(cur VirtualRouterListResult, getNextPage func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error)) VirtualRouterListResultPage {
33580	return VirtualRouterListResultPage{
33581		fn:   getNextPage,
33582		vrlr: cur,
33583	}
33584}
33585
33586// VirtualRouterPeering virtual Router Peering resource.
33587type VirtualRouterPeering struct {
33588	autorest.Response `json:"-"`
33589	// VirtualRouterPeeringProperties - The properties of the Virtual Router Peering.
33590	*VirtualRouterPeeringProperties `json:"properties,omitempty"`
33591	// Name - Name of the virtual router peering that is unique within a virtual router.
33592	Name *string `json:"name,omitempty"`
33593	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
33594	Etag *string `json:"etag,omitempty"`
33595	// Type - READ-ONLY; Peering type.
33596	Type *string `json:"type,omitempty"`
33597	// ID - Resource ID.
33598	ID *string `json:"id,omitempty"`
33599}
33600
33601// MarshalJSON is the custom marshaler for VirtualRouterPeering.
33602func (vrp VirtualRouterPeering) MarshalJSON() ([]byte, error) {
33603	objectMap := make(map[string]interface{})
33604	if vrp.VirtualRouterPeeringProperties != nil {
33605		objectMap["properties"] = vrp.VirtualRouterPeeringProperties
33606	}
33607	if vrp.Name != nil {
33608		objectMap["name"] = vrp.Name
33609	}
33610	if vrp.ID != nil {
33611		objectMap["id"] = vrp.ID
33612	}
33613	return json.Marshal(objectMap)
33614}
33615
33616// UnmarshalJSON is the custom unmarshaler for VirtualRouterPeering struct.
33617func (vrp *VirtualRouterPeering) UnmarshalJSON(body []byte) error {
33618	var m map[string]*json.RawMessage
33619	err := json.Unmarshal(body, &m)
33620	if err != nil {
33621		return err
33622	}
33623	for k, v := range m {
33624		switch k {
33625		case "properties":
33626			if v != nil {
33627				var virtualRouterPeeringProperties VirtualRouterPeeringProperties
33628				err = json.Unmarshal(*v, &virtualRouterPeeringProperties)
33629				if err != nil {
33630					return err
33631				}
33632				vrp.VirtualRouterPeeringProperties = &virtualRouterPeeringProperties
33633			}
33634		case "name":
33635			if v != nil {
33636				var name string
33637				err = json.Unmarshal(*v, &name)
33638				if err != nil {
33639					return err
33640				}
33641				vrp.Name = &name
33642			}
33643		case "etag":
33644			if v != nil {
33645				var etag string
33646				err = json.Unmarshal(*v, &etag)
33647				if err != nil {
33648					return err
33649				}
33650				vrp.Etag = &etag
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				vrp.Type = &typeVar
33660			}
33661		case "id":
33662			if v != nil {
33663				var ID string
33664				err = json.Unmarshal(*v, &ID)
33665				if err != nil {
33666					return err
33667				}
33668				vrp.ID = &ID
33669			}
33670		}
33671	}
33672
33673	return nil
33674}
33675
33676// VirtualRouterPeeringListResult response for ListVirtualRouterPeerings API service call.
33677type VirtualRouterPeeringListResult struct {
33678	autorest.Response `json:"-"`
33679	// Value - List of VirtualRouterPeerings in a VirtualRouter.
33680	Value *[]VirtualRouterPeering `json:"value,omitempty"`
33681	// NextLink - URL to get the next set of results.
33682	NextLink *string `json:"nextLink,omitempty"`
33683}
33684
33685// VirtualRouterPeeringListResultIterator provides access to a complete listing of VirtualRouterPeering
33686// values.
33687type VirtualRouterPeeringListResultIterator struct {
33688	i    int
33689	page VirtualRouterPeeringListResultPage
33690}
33691
33692// NextWithContext advances to the next value.  If there was an error making
33693// the request the iterator does not advance and the error is returned.
33694func (iter *VirtualRouterPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
33695	if tracing.IsEnabled() {
33696		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringListResultIterator.NextWithContext")
33697		defer func() {
33698			sc := -1
33699			if iter.Response().Response.Response != nil {
33700				sc = iter.Response().Response.Response.StatusCode
33701			}
33702			tracing.EndSpan(ctx, sc, err)
33703		}()
33704	}
33705	iter.i++
33706	if iter.i < len(iter.page.Values()) {
33707		return nil
33708	}
33709	err = iter.page.NextWithContext(ctx)
33710	if err != nil {
33711		iter.i--
33712		return err
33713	}
33714	iter.i = 0
33715	return nil
33716}
33717
33718// Next advances to the next value.  If there was an error making
33719// the request the iterator does not advance and the error is returned.
33720// Deprecated: Use NextWithContext() instead.
33721func (iter *VirtualRouterPeeringListResultIterator) Next() error {
33722	return iter.NextWithContext(context.Background())
33723}
33724
33725// NotDone returns true if the enumeration should be started or is not yet complete.
33726func (iter VirtualRouterPeeringListResultIterator) NotDone() bool {
33727	return iter.page.NotDone() && iter.i < len(iter.page.Values())
33728}
33729
33730// Response returns the raw server response from the last page request.
33731func (iter VirtualRouterPeeringListResultIterator) Response() VirtualRouterPeeringListResult {
33732	return iter.page.Response()
33733}
33734
33735// Value returns the current value or a zero-initialized value if the
33736// iterator has advanced beyond the end of the collection.
33737func (iter VirtualRouterPeeringListResultIterator) Value() VirtualRouterPeering {
33738	if !iter.page.NotDone() {
33739		return VirtualRouterPeering{}
33740	}
33741	return iter.page.Values()[iter.i]
33742}
33743
33744// Creates a new instance of the VirtualRouterPeeringListResultIterator type.
33745func NewVirtualRouterPeeringListResultIterator(page VirtualRouterPeeringListResultPage) VirtualRouterPeeringListResultIterator {
33746	return VirtualRouterPeeringListResultIterator{page: page}
33747}
33748
33749// IsEmpty returns true if the ListResult contains no values.
33750func (vrplr VirtualRouterPeeringListResult) IsEmpty() bool {
33751	return vrplr.Value == nil || len(*vrplr.Value) == 0
33752}
33753
33754// hasNextLink returns true if the NextLink is not empty.
33755func (vrplr VirtualRouterPeeringListResult) hasNextLink() bool {
33756	return vrplr.NextLink != nil && len(*vrplr.NextLink) != 0
33757}
33758
33759// virtualRouterPeeringListResultPreparer prepares a request to retrieve the next set of results.
33760// It returns nil if no more results exist.
33761func (vrplr VirtualRouterPeeringListResult) virtualRouterPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
33762	if !vrplr.hasNextLink() {
33763		return nil, nil
33764	}
33765	return autorest.Prepare((&http.Request{}).WithContext(ctx),
33766		autorest.AsJSON(),
33767		autorest.AsGet(),
33768		autorest.WithBaseURL(to.String(vrplr.NextLink)))
33769}
33770
33771// VirtualRouterPeeringListResultPage contains a page of VirtualRouterPeering values.
33772type VirtualRouterPeeringListResultPage struct {
33773	fn    func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error)
33774	vrplr VirtualRouterPeeringListResult
33775}
33776
33777// NextWithContext advances to the next page of values.  If there was an error making
33778// the request the page does not advance and the error is returned.
33779func (page *VirtualRouterPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
33780	if tracing.IsEnabled() {
33781		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringListResultPage.NextWithContext")
33782		defer func() {
33783			sc := -1
33784			if page.Response().Response.Response != nil {
33785				sc = page.Response().Response.Response.StatusCode
33786			}
33787			tracing.EndSpan(ctx, sc, err)
33788		}()
33789	}
33790	for {
33791		next, err := page.fn(ctx, page.vrplr)
33792		if err != nil {
33793			return err
33794		}
33795		page.vrplr = next
33796		if !next.hasNextLink() || !next.IsEmpty() {
33797			break
33798		}
33799	}
33800	return nil
33801}
33802
33803// Next advances to the next page of values.  If there was an error making
33804// the request the page does not advance and the error is returned.
33805// Deprecated: Use NextWithContext() instead.
33806func (page *VirtualRouterPeeringListResultPage) Next() error {
33807	return page.NextWithContext(context.Background())
33808}
33809
33810// NotDone returns true if the page enumeration should be started or is not yet complete.
33811func (page VirtualRouterPeeringListResultPage) NotDone() bool {
33812	return !page.vrplr.IsEmpty()
33813}
33814
33815// Response returns the raw server response from the last page request.
33816func (page VirtualRouterPeeringListResultPage) Response() VirtualRouterPeeringListResult {
33817	return page.vrplr
33818}
33819
33820// Values returns the slice of values for the current page or nil if there are no values.
33821func (page VirtualRouterPeeringListResultPage) Values() []VirtualRouterPeering {
33822	if page.vrplr.IsEmpty() {
33823		return nil
33824	}
33825	return *page.vrplr.Value
33826}
33827
33828// Creates a new instance of the VirtualRouterPeeringListResultPage type.
33829func NewVirtualRouterPeeringListResultPage(cur VirtualRouterPeeringListResult, getNextPage func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error)) VirtualRouterPeeringListResultPage {
33830	return VirtualRouterPeeringListResultPage{
33831		fn:    getNextPage,
33832		vrplr: cur,
33833	}
33834}
33835
33836// VirtualRouterPeeringProperties properties of the rule group.
33837type VirtualRouterPeeringProperties struct {
33838	// PeerAsn - Peer ASN.
33839	PeerAsn *int64 `json:"peerAsn,omitempty"`
33840	// PeerIP - Peer IP.
33841	PeerIP *string `json:"peerIp,omitempty"`
33842	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
33843	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
33844}
33845
33846// MarshalJSON is the custom marshaler for VirtualRouterPeeringProperties.
33847func (vrpp VirtualRouterPeeringProperties) MarshalJSON() ([]byte, error) {
33848	objectMap := make(map[string]interface{})
33849	if vrpp.PeerAsn != nil {
33850		objectMap["peerAsn"] = vrpp.PeerAsn
33851	}
33852	if vrpp.PeerIP != nil {
33853		objectMap["peerIp"] = vrpp.PeerIP
33854	}
33855	return json.Marshal(objectMap)
33856}
33857
33858// VirtualRouterPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
33859// long-running operation.
33860type VirtualRouterPeeringsCreateOrUpdateFuture struct {
33861	azure.FutureAPI
33862	// Result returns the result of the asynchronous operation.
33863	// If the operation has not completed it will return an error.
33864	Result func(VirtualRouterPeeringsClient) (VirtualRouterPeering, error)
33865}
33866
33867// VirtualRouterPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
33868// long-running operation.
33869type VirtualRouterPeeringsDeleteFuture struct {
33870	azure.FutureAPI
33871	// Result returns the result of the asynchronous operation.
33872	// If the operation has not completed it will return an error.
33873	Result func(VirtualRouterPeeringsClient) (autorest.Response, error)
33874}
33875
33876// VirtualRouterPropertiesFormat virtual Router definition.
33877type VirtualRouterPropertiesFormat struct {
33878	// VirtualRouterAsn - VirtualRouter ASN.
33879	VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"`
33880	// VirtualRouterIps - VirtualRouter IPs.
33881	VirtualRouterIps *[]string `json:"virtualRouterIps,omitempty"`
33882	// HostedSubnet - The Subnet on which VirtualRouter is hosted.
33883	HostedSubnet *SubResource `json:"hostedSubnet,omitempty"`
33884	// HostedGateway - The Gateway on which VirtualRouter is hosted.
33885	HostedGateway *SubResource `json:"hostedGateway,omitempty"`
33886	// Peerings - READ-ONLY; List of references to VirtualRouterPeerings.
33887	Peerings *[]SubResource `json:"peerings,omitempty"`
33888	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
33889	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
33890}
33891
33892// MarshalJSON is the custom marshaler for VirtualRouterPropertiesFormat.
33893func (vrpf VirtualRouterPropertiesFormat) MarshalJSON() ([]byte, error) {
33894	objectMap := make(map[string]interface{})
33895	if vrpf.VirtualRouterAsn != nil {
33896		objectMap["virtualRouterAsn"] = vrpf.VirtualRouterAsn
33897	}
33898	if vrpf.VirtualRouterIps != nil {
33899		objectMap["virtualRouterIps"] = vrpf.VirtualRouterIps
33900	}
33901	if vrpf.HostedSubnet != nil {
33902		objectMap["hostedSubnet"] = vrpf.HostedSubnet
33903	}
33904	if vrpf.HostedGateway != nil {
33905		objectMap["hostedGateway"] = vrpf.HostedGateway
33906	}
33907	return json.Marshal(objectMap)
33908}
33909
33910// VirtualRoutersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
33911// long-running operation.
33912type VirtualRoutersCreateOrUpdateFuture struct {
33913	azure.FutureAPI
33914	// Result returns the result of the asynchronous operation.
33915	// If the operation has not completed it will return an error.
33916	Result func(VirtualRoutersClient) (VirtualRouter, error)
33917}
33918
33919// VirtualRoutersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
33920// operation.
33921type VirtualRoutersDeleteFuture struct {
33922	azure.FutureAPI
33923	// Result returns the result of the asynchronous operation.
33924	// If the operation has not completed it will return an error.
33925	Result func(VirtualRoutersClient) (autorest.Response, error)
33926}
33927
33928// VirtualWAN virtualWAN Resource.
33929type VirtualWAN struct {
33930	autorest.Response `json:"-"`
33931	// VirtualWanProperties - Properties of the virtual WAN.
33932	*VirtualWanProperties `json:"properties,omitempty"`
33933	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
33934	Etag *string `json:"etag,omitempty"`
33935	// ID - Resource ID.
33936	ID *string `json:"id,omitempty"`
33937	// Name - READ-ONLY; Resource name.
33938	Name *string `json:"name,omitempty"`
33939	// Type - READ-ONLY; Resource type.
33940	Type *string `json:"type,omitempty"`
33941	// Location - Resource location.
33942	Location *string `json:"location,omitempty"`
33943	// Tags - Resource tags.
33944	Tags map[string]*string `json:"tags"`
33945}
33946
33947// MarshalJSON is the custom marshaler for VirtualWAN.
33948func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
33949	objectMap := make(map[string]interface{})
33950	if vw.VirtualWanProperties != nil {
33951		objectMap["properties"] = vw.VirtualWanProperties
33952	}
33953	if vw.ID != nil {
33954		objectMap["id"] = vw.ID
33955	}
33956	if vw.Location != nil {
33957		objectMap["location"] = vw.Location
33958	}
33959	if vw.Tags != nil {
33960		objectMap["tags"] = vw.Tags
33961	}
33962	return json.Marshal(objectMap)
33963}
33964
33965// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
33966func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
33967	var m map[string]*json.RawMessage
33968	err := json.Unmarshal(body, &m)
33969	if err != nil {
33970		return err
33971	}
33972	for k, v := range m {
33973		switch k {
33974		case "properties":
33975			if v != nil {
33976				var virtualWanProperties VirtualWanProperties
33977				err = json.Unmarshal(*v, &virtualWanProperties)
33978				if err != nil {
33979					return err
33980				}
33981				vw.VirtualWanProperties = &virtualWanProperties
33982			}
33983		case "etag":
33984			if v != nil {
33985				var etag string
33986				err = json.Unmarshal(*v, &etag)
33987				if err != nil {
33988					return err
33989				}
33990				vw.Etag = &etag
33991			}
33992		case "id":
33993			if v != nil {
33994				var ID string
33995				err = json.Unmarshal(*v, &ID)
33996				if err != nil {
33997					return err
33998				}
33999				vw.ID = &ID
34000			}
34001		case "name":
34002			if v != nil {
34003				var name string
34004				err = json.Unmarshal(*v, &name)
34005				if err != nil {
34006					return err
34007				}
34008				vw.Name = &name
34009			}
34010		case "type":
34011			if v != nil {
34012				var typeVar string
34013				err = json.Unmarshal(*v, &typeVar)
34014				if err != nil {
34015					return err
34016				}
34017				vw.Type = &typeVar
34018			}
34019		case "location":
34020			if v != nil {
34021				var location string
34022				err = json.Unmarshal(*v, &location)
34023				if err != nil {
34024					return err
34025				}
34026				vw.Location = &location
34027			}
34028		case "tags":
34029			if v != nil {
34030				var tags map[string]*string
34031				err = json.Unmarshal(*v, &tags)
34032				if err != nil {
34033					return err
34034				}
34035				vw.Tags = tags
34036			}
34037		}
34038	}
34039
34040	return nil
34041}
34042
34043// VirtualWanProperties parameters for VirtualWAN.
34044type VirtualWanProperties struct {
34045	// DisableVpnEncryption - Vpn encryption to be disabled or not.
34046	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
34047	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
34048	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
34049	// VpnSites - READ-ONLY; List of VpnSites in the VirtualWAN.
34050	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
34051	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
34052	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
34053	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
34054	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
34055	// Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone'
34056	Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"`
34057	// ProvisioningState - READ-ONLY; The provisioning state of the virtual WAN resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
34058	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34059	// Type - The type of the VirtualWAN.
34060	Type *string `json:"type,omitempty"`
34061}
34062
34063// MarshalJSON is the custom marshaler for VirtualWanProperties.
34064func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
34065	objectMap := make(map[string]interface{})
34066	if vwp.DisableVpnEncryption != nil {
34067		objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
34068	}
34069	if vwp.AllowBranchToBranchTraffic != nil {
34070		objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic
34071	}
34072	if vwp.AllowVnetToVnetTraffic != nil {
34073		objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic
34074	}
34075	if vwp.Office365LocalBreakoutCategory != "" {
34076		objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory
34077	}
34078	if vwp.Type != nil {
34079		objectMap["type"] = vwp.Type
34080	}
34081	return json.Marshal(objectMap)
34082}
34083
34084// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
34085// long-running operation.
34086type VirtualWansCreateOrUpdateFuture struct {
34087	azure.FutureAPI
34088	// Result returns the result of the asynchronous operation.
34089	// If the operation has not completed it will return an error.
34090	Result func(VirtualWansClient) (VirtualWAN, error)
34091}
34092
34093// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
34094// operation.
34095type VirtualWansDeleteFuture struct {
34096	azure.FutureAPI
34097	// Result returns the result of the asynchronous operation.
34098	// If the operation has not completed it will return an error.
34099	Result func(VirtualWansClient) (autorest.Response, error)
34100}
34101
34102// VirtualWanSecurityProvider collection of SecurityProviders.
34103type VirtualWanSecurityProvider struct {
34104	// Name - Name of the security provider.
34105	Name *string `json:"name,omitempty"`
34106	// URL - Url of the security provider.
34107	URL *string `json:"url,omitempty"`
34108	// Type - Name of the security provider. Possible values include: 'External', 'Native'
34109	Type VirtualWanSecurityProviderType `json:"type,omitempty"`
34110}
34111
34112// VirtualWanSecurityProviders collection of SecurityProviders.
34113type VirtualWanSecurityProviders struct {
34114	autorest.Response `json:"-"`
34115	// SupportedProviders - List of VirtualWAN security providers.
34116	SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"`
34117}
34118
34119// VirtualWanVpnProfileParameters virtual Wan Vpn profile parameters Vpn profile generation.
34120type VirtualWanVpnProfileParameters struct {
34121	// VpnServerConfigurationResourceID - VpnServerConfiguration partial resource uri with which VirtualWan is associated to.
34122	VpnServerConfigurationResourceID *string `json:"vpnServerConfigurationResourceId,omitempty"`
34123	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
34124	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
34125}
34126
34127// VM describes a Virtual Machine.
34128type VM struct {
34129	// ID - Resource ID.
34130	ID *string `json:"id,omitempty"`
34131	// Name - READ-ONLY; Resource name.
34132	Name *string `json:"name,omitempty"`
34133	// Type - READ-ONLY; Resource type.
34134	Type *string `json:"type,omitempty"`
34135	// Location - Resource location.
34136	Location *string `json:"location,omitempty"`
34137	// Tags - Resource tags.
34138	Tags map[string]*string `json:"tags"`
34139}
34140
34141// MarshalJSON is the custom marshaler for VM.
34142func (vVar VM) MarshalJSON() ([]byte, error) {
34143	objectMap := make(map[string]interface{})
34144	if vVar.ID != nil {
34145		objectMap["id"] = vVar.ID
34146	}
34147	if vVar.Location != nil {
34148		objectMap["location"] = vVar.Location
34149	}
34150	if vVar.Tags != nil {
34151		objectMap["tags"] = vVar.Tags
34152	}
34153	return json.Marshal(objectMap)
34154}
34155
34156// VpnClientConfiguration vpnClientConfiguration for P2S client.
34157type VpnClientConfiguration struct {
34158	// VpnClientAddressPool - The reference to the address space resource which represents Address space for P2S VpnClient.
34159	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
34160	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
34161	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
34162	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
34163	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
34164	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
34165	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
34166	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
34167	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
34168	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
34169	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
34170	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
34171	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
34172	// RadiusServers - The radiusServers property for multiple radius server configuration.
34173	RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"`
34174	// AadTenant - The AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
34175	AadTenant *string `json:"aadTenant,omitempty"`
34176	// AadAudience - The AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
34177	AadAudience *string `json:"aadAudience,omitempty"`
34178	// AadIssuer - The AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
34179	AadIssuer *string `json:"aadIssuer,omitempty"`
34180}
34181
34182// VpnClientConnectionHealth vpnClientConnectionHealth properties.
34183type VpnClientConnectionHealth struct {
34184	// TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection.
34185	TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"`
34186	// TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection.
34187	TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"`
34188	// VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway.
34189	VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"`
34190	// AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients.
34191	AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"`
34192}
34193
34194// MarshalJSON is the custom marshaler for VpnClientConnectionHealth.
34195func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) {
34196	objectMap := make(map[string]interface{})
34197	if vcch.VpnClientConnectionsCount != nil {
34198		objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount
34199	}
34200	if vcch.AllocatedIPAddresses != nil {
34201		objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses
34202	}
34203	return json.Marshal(objectMap)
34204}
34205
34206// VpnClientConnectionHealthDetail VPN client connection health detail.
34207type VpnClientConnectionHealthDetail struct {
34208	// VpnConnectionID - READ-ONLY; The vpn client Id.
34209	VpnConnectionID *string `json:"vpnConnectionId,omitempty"`
34210	// VpnConnectionDuration - READ-ONLY; The duration time of a connected vpn client.
34211	VpnConnectionDuration *int64 `json:"vpnConnectionDuration,omitempty"`
34212	// VpnConnectionTime - READ-ONLY; The start time of a connected vpn client.
34213	VpnConnectionTime *string `json:"vpnConnectionTime,omitempty"`
34214	// PublicIPAddress - READ-ONLY; The public Ip of a connected vpn client.
34215	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
34216	// PrivateIPAddress - READ-ONLY; The assigned private Ip of a connected vpn client.
34217	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
34218	// VpnUserName - READ-ONLY; The user name of a connected vpn client.
34219	VpnUserName *string `json:"vpnUserName,omitempty"`
34220	// MaxBandwidth - READ-ONLY; The max band width.
34221	MaxBandwidth *int64 `json:"maxBandwidth,omitempty"`
34222	// EgressPacketsTransferred - READ-ONLY; The egress packets per second.
34223	EgressPacketsTransferred *int64 `json:"egressPacketsTransferred,omitempty"`
34224	// EgressBytesTransferred - READ-ONLY; The egress bytes per second.
34225	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
34226	// IngressPacketsTransferred - READ-ONLY; The ingress packets per second.
34227	IngressPacketsTransferred *int64 `json:"ingressPacketsTransferred,omitempty"`
34228	// IngressBytesTransferred - READ-ONLY; The ingress bytes per second.
34229	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
34230	// MaxPacketsPerSecond - READ-ONLY; The max packets transferred per second.
34231	MaxPacketsPerSecond *int64 `json:"maxPacketsPerSecond,omitempty"`
34232}
34233
34234// VpnClientConnectionHealthDetailListResult list of virtual network gateway vpn client connection health.
34235type VpnClientConnectionHealthDetailListResult struct {
34236	autorest.Response `json:"-"`
34237	// Value - List of vpn client connection health.
34238	Value *[]VpnClientConnectionHealthDetail `json:"value,omitempty"`
34239}
34240
34241// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
34242type VpnClientIPsecParameters struct {
34243	autorest.Response `json:"-"`
34244	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
34245	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
34246	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
34247	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
34248	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
34249	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
34250	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
34251	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
34252	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
34253	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
34254	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
34255	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
34256	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
34257	DhGroup DhGroup `json:"dhGroup,omitempty"`
34258	// 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'
34259	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
34260}
34261
34262// VpnClientParameters vpn Client Parameters for package generation.
34263type VpnClientParameters struct {
34264	// ProcessorArchitecture - VPN client Processor Architecture. Possible values include: 'Amd64', 'X86'
34265	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
34266	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
34267	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
34268	// 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.
34269	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
34270	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
34271	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
34272}
34273
34274// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
34275type VpnClientRevokedCertificate struct {
34276	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
34277	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
34278	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
34279	Name *string `json:"name,omitempty"`
34280	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
34281	Etag *string `json:"etag,omitempty"`
34282	// ID - Resource ID.
34283	ID *string `json:"id,omitempty"`
34284}
34285
34286// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
34287func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
34288	objectMap := make(map[string]interface{})
34289	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
34290		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
34291	}
34292	if vcrc.Name != nil {
34293		objectMap["name"] = vcrc.Name
34294	}
34295	if vcrc.ID != nil {
34296		objectMap["id"] = vcrc.ID
34297	}
34298	return json.Marshal(objectMap)
34299}
34300
34301// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
34302func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
34303	var m map[string]*json.RawMessage
34304	err := json.Unmarshal(body, &m)
34305	if err != nil {
34306		return err
34307	}
34308	for k, v := range m {
34309		switch k {
34310		case "properties":
34311			if v != nil {
34312				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
34313				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
34314				if err != nil {
34315					return err
34316				}
34317				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
34318			}
34319		case "name":
34320			if v != nil {
34321				var name string
34322				err = json.Unmarshal(*v, &name)
34323				if err != nil {
34324					return err
34325				}
34326				vcrc.Name = &name
34327			}
34328		case "etag":
34329			if v != nil {
34330				var etag string
34331				err = json.Unmarshal(*v, &etag)
34332				if err != nil {
34333					return err
34334				}
34335				vcrc.Etag = &etag
34336			}
34337		case "id":
34338			if v != nil {
34339				var ID string
34340				err = json.Unmarshal(*v, &ID)
34341				if err != nil {
34342					return err
34343				}
34344				vcrc.ID = &ID
34345			}
34346		}
34347	}
34348
34349	return nil
34350}
34351
34352// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
34353// network gateway.
34354type VpnClientRevokedCertificatePropertiesFormat struct {
34355	// Thumbprint - The revoked VPN client certificate thumbprint.
34356	Thumbprint *string `json:"thumbprint,omitempty"`
34357	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
34358	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34359}
34360
34361// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
34362func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
34363	objectMap := make(map[string]interface{})
34364	if vcrcpf.Thumbprint != nil {
34365		objectMap["thumbprint"] = vcrcpf.Thumbprint
34366	}
34367	return json.Marshal(objectMap)
34368}
34369
34370// VpnClientRootCertificate VPN client root certificate of virtual network gateway.
34371type VpnClientRootCertificate struct {
34372	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
34373	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
34374	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
34375	Name *string `json:"name,omitempty"`
34376	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
34377	Etag *string `json:"etag,omitempty"`
34378	// ID - Resource ID.
34379	ID *string `json:"id,omitempty"`
34380}
34381
34382// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
34383func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
34384	objectMap := make(map[string]interface{})
34385	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
34386		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
34387	}
34388	if vcrc.Name != nil {
34389		objectMap["name"] = vcrc.Name
34390	}
34391	if vcrc.ID != nil {
34392		objectMap["id"] = vcrc.ID
34393	}
34394	return json.Marshal(objectMap)
34395}
34396
34397// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
34398func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
34399	var m map[string]*json.RawMessage
34400	err := json.Unmarshal(body, &m)
34401	if err != nil {
34402		return err
34403	}
34404	for k, v := range m {
34405		switch k {
34406		case "properties":
34407			if v != nil {
34408				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
34409				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
34410				if err != nil {
34411					return err
34412				}
34413				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
34414			}
34415		case "name":
34416			if v != nil {
34417				var name string
34418				err = json.Unmarshal(*v, &name)
34419				if err != nil {
34420					return err
34421				}
34422				vcrc.Name = &name
34423			}
34424		case "etag":
34425			if v != nil {
34426				var etag string
34427				err = json.Unmarshal(*v, &etag)
34428				if err != nil {
34429					return err
34430				}
34431				vcrc.Etag = &etag
34432			}
34433		case "id":
34434			if v != nil {
34435				var ID string
34436				err = json.Unmarshal(*v, &ID)
34437				if err != nil {
34438					return err
34439				}
34440				vcrc.ID = &ID
34441			}
34442		}
34443	}
34444
34445	return nil
34446}
34447
34448// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway.
34449type VpnClientRootCertificatePropertiesFormat struct {
34450	// PublicCertData - The certificate public data.
34451	PublicCertData *string `json:"publicCertData,omitempty"`
34452	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
34453	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34454}
34455
34456// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
34457func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
34458	objectMap := make(map[string]interface{})
34459	if vcrcpf.PublicCertData != nil {
34460		objectMap["publicCertData"] = vcrcpf.PublicCertData
34461	}
34462	return json.Marshal(objectMap)
34463}
34464
34465// VpnConnection vpnConnection Resource.
34466type VpnConnection struct {
34467	autorest.Response `json:"-"`
34468	// VpnConnectionProperties - Properties of the VPN connection.
34469	*VpnConnectionProperties `json:"properties,omitempty"`
34470	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
34471	Name *string `json:"name,omitempty"`
34472	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
34473	Etag *string `json:"etag,omitempty"`
34474	// ID - Resource ID.
34475	ID *string `json:"id,omitempty"`
34476}
34477
34478// MarshalJSON is the custom marshaler for VpnConnection.
34479func (vc VpnConnection) MarshalJSON() ([]byte, error) {
34480	objectMap := make(map[string]interface{})
34481	if vc.VpnConnectionProperties != nil {
34482		objectMap["properties"] = vc.VpnConnectionProperties
34483	}
34484	if vc.Name != nil {
34485		objectMap["name"] = vc.Name
34486	}
34487	if vc.ID != nil {
34488		objectMap["id"] = vc.ID
34489	}
34490	return json.Marshal(objectMap)
34491}
34492
34493// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
34494func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
34495	var m map[string]*json.RawMessage
34496	err := json.Unmarshal(body, &m)
34497	if err != nil {
34498		return err
34499	}
34500	for k, v := range m {
34501		switch k {
34502		case "properties":
34503			if v != nil {
34504				var vpnConnectionProperties VpnConnectionProperties
34505				err = json.Unmarshal(*v, &vpnConnectionProperties)
34506				if err != nil {
34507					return err
34508				}
34509				vc.VpnConnectionProperties = &vpnConnectionProperties
34510			}
34511		case "name":
34512			if v != nil {
34513				var name string
34514				err = json.Unmarshal(*v, &name)
34515				if err != nil {
34516					return err
34517				}
34518				vc.Name = &name
34519			}
34520		case "etag":
34521			if v != nil {
34522				var etag string
34523				err = json.Unmarshal(*v, &etag)
34524				if err != nil {
34525					return err
34526				}
34527				vc.Etag = &etag
34528			}
34529		case "id":
34530			if v != nil {
34531				var ID string
34532				err = json.Unmarshal(*v, &ID)
34533				if err != nil {
34534					return err
34535				}
34536				vc.ID = &ID
34537			}
34538		}
34539	}
34540
34541	return nil
34542}
34543
34544// VpnConnectionProperties parameters for VpnConnection.
34545type VpnConnectionProperties struct {
34546	// RemoteVpnSite - Id of the connected vpn site.
34547	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
34548	// RoutingWeight - Routing weight for vpn connection.
34549	RoutingWeight *int32 `json:"routingWeight,omitempty"`
34550	// DpdTimeoutSeconds - The dead peer detection timeout for a vpn connection in seconds.
34551	DpdTimeoutSeconds *int32 `json:"dpdTimeoutSeconds,omitempty"`
34552	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
34553	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
34554	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
34555	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
34556	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
34557	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
34558	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
34559	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
34560	// ConnectionBandwidth - Expected bandwidth in MBPS.
34561	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
34562	// SharedKey - SharedKey for the vpn connection.
34563	SharedKey *string `json:"sharedKey,omitempty"`
34564	// EnableBgp - EnableBgp flag.
34565	EnableBgp *bool `json:"enableBgp,omitempty"`
34566	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
34567	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
34568	// IpsecPolicies - The IPSec Policies to be considered by this connection.
34569	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
34570	// EnableRateLimiting - EnableBgp flag.
34571	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
34572	// EnableInternetSecurity - Enable internet security.
34573	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
34574	// UseLocalAzureIPAddress - Use local azure ip to initiate connection.
34575	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
34576	// ProvisioningState - READ-ONLY; The provisioning state of the VPN connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
34577	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34578	// VpnLinkConnections - List of all vpn site link connections to the gateway.
34579	VpnLinkConnections *[]VpnSiteLinkConnection `json:"vpnLinkConnections,omitempty"`
34580}
34581
34582// MarshalJSON is the custom marshaler for VpnConnectionProperties.
34583func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
34584	objectMap := make(map[string]interface{})
34585	if vcp.RemoteVpnSite != nil {
34586		objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
34587	}
34588	if vcp.RoutingWeight != nil {
34589		objectMap["routingWeight"] = vcp.RoutingWeight
34590	}
34591	if vcp.DpdTimeoutSeconds != nil {
34592		objectMap["dpdTimeoutSeconds"] = vcp.DpdTimeoutSeconds
34593	}
34594	if vcp.ConnectionStatus != "" {
34595		objectMap["connectionStatus"] = vcp.ConnectionStatus
34596	}
34597	if vcp.VpnConnectionProtocolType != "" {
34598		objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType
34599	}
34600	if vcp.ConnectionBandwidth != nil {
34601		objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth
34602	}
34603	if vcp.SharedKey != nil {
34604		objectMap["sharedKey"] = vcp.SharedKey
34605	}
34606	if vcp.EnableBgp != nil {
34607		objectMap["enableBgp"] = vcp.EnableBgp
34608	}
34609	if vcp.UsePolicyBasedTrafficSelectors != nil {
34610		objectMap["usePolicyBasedTrafficSelectors"] = vcp.UsePolicyBasedTrafficSelectors
34611	}
34612	if vcp.IpsecPolicies != nil {
34613		objectMap["ipsecPolicies"] = vcp.IpsecPolicies
34614	}
34615	if vcp.EnableRateLimiting != nil {
34616		objectMap["enableRateLimiting"] = vcp.EnableRateLimiting
34617	}
34618	if vcp.EnableInternetSecurity != nil {
34619		objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity
34620	}
34621	if vcp.UseLocalAzureIPAddress != nil {
34622		objectMap["useLocalAzureIpAddress"] = vcp.UseLocalAzureIPAddress
34623	}
34624	if vcp.VpnLinkConnections != nil {
34625		objectMap["vpnLinkConnections"] = vcp.VpnLinkConnections
34626	}
34627	return json.Marshal(objectMap)
34628}
34629
34630// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
34631// long-running operation.
34632type VpnConnectionsCreateOrUpdateFuture struct {
34633	azure.FutureAPI
34634	// Result returns the result of the asynchronous operation.
34635	// If the operation has not completed it will return an error.
34636	Result func(VpnConnectionsClient) (VpnConnection, error)
34637}
34638
34639// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
34640// operation.
34641type VpnConnectionsDeleteFuture struct {
34642	azure.FutureAPI
34643	// Result returns the result of the asynchronous operation.
34644	// If the operation has not completed it will return an error.
34645	Result func(VpnConnectionsClient) (autorest.Response, error)
34646}
34647
34648// VpnDeviceScriptParameters vpn device configuration script generation parameters.
34649type VpnDeviceScriptParameters struct {
34650	// Vendor - The vendor for the vpn device.
34651	Vendor *string `json:"vendor,omitempty"`
34652	// DeviceFamily - The device family for the vpn device.
34653	DeviceFamily *string `json:"deviceFamily,omitempty"`
34654	// FirmwareVersion - The firmware version for the vpn device.
34655	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
34656}
34657
34658// VpnGateway vpnGateway Resource.
34659type VpnGateway struct {
34660	autorest.Response `json:"-"`
34661	// VpnGatewayProperties - Properties of the VPN gateway.
34662	*VpnGatewayProperties `json:"properties,omitempty"`
34663	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
34664	Etag *string `json:"etag,omitempty"`
34665	// ID - Resource ID.
34666	ID *string `json:"id,omitempty"`
34667	// Name - READ-ONLY; Resource name.
34668	Name *string `json:"name,omitempty"`
34669	// Type - READ-ONLY; Resource type.
34670	Type *string `json:"type,omitempty"`
34671	// Location - Resource location.
34672	Location *string `json:"location,omitempty"`
34673	// Tags - Resource tags.
34674	Tags map[string]*string `json:"tags"`
34675}
34676
34677// MarshalJSON is the custom marshaler for VpnGateway.
34678func (vg VpnGateway) MarshalJSON() ([]byte, error) {
34679	objectMap := make(map[string]interface{})
34680	if vg.VpnGatewayProperties != nil {
34681		objectMap["properties"] = vg.VpnGatewayProperties
34682	}
34683	if vg.ID != nil {
34684		objectMap["id"] = vg.ID
34685	}
34686	if vg.Location != nil {
34687		objectMap["location"] = vg.Location
34688	}
34689	if vg.Tags != nil {
34690		objectMap["tags"] = vg.Tags
34691	}
34692	return json.Marshal(objectMap)
34693}
34694
34695// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
34696func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
34697	var m map[string]*json.RawMessage
34698	err := json.Unmarshal(body, &m)
34699	if err != nil {
34700		return err
34701	}
34702	for k, v := range m {
34703		switch k {
34704		case "properties":
34705			if v != nil {
34706				var vpnGatewayProperties VpnGatewayProperties
34707				err = json.Unmarshal(*v, &vpnGatewayProperties)
34708				if err != nil {
34709					return err
34710				}
34711				vg.VpnGatewayProperties = &vpnGatewayProperties
34712			}
34713		case "etag":
34714			if v != nil {
34715				var etag string
34716				err = json.Unmarshal(*v, &etag)
34717				if err != nil {
34718					return err
34719				}
34720				vg.Etag = &etag
34721			}
34722		case "id":
34723			if v != nil {
34724				var ID string
34725				err = json.Unmarshal(*v, &ID)
34726				if err != nil {
34727					return err
34728				}
34729				vg.ID = &ID
34730			}
34731		case "name":
34732			if v != nil {
34733				var name string
34734				err = json.Unmarshal(*v, &name)
34735				if err != nil {
34736					return err
34737				}
34738				vg.Name = &name
34739			}
34740		case "type":
34741			if v != nil {
34742				var typeVar string
34743				err = json.Unmarshal(*v, &typeVar)
34744				if err != nil {
34745					return err
34746				}
34747				vg.Type = &typeVar
34748			}
34749		case "location":
34750			if v != nil {
34751				var location string
34752				err = json.Unmarshal(*v, &location)
34753				if err != nil {
34754					return err
34755				}
34756				vg.Location = &location
34757			}
34758		case "tags":
34759			if v != nil {
34760				var tags map[string]*string
34761				err = json.Unmarshal(*v, &tags)
34762				if err != nil {
34763					return err
34764				}
34765				vg.Tags = tags
34766			}
34767		}
34768	}
34769
34770	return nil
34771}
34772
34773// VpnGatewayProperties parameters for VpnGateway.
34774type VpnGatewayProperties struct {
34775	// VirtualHub - The VirtualHub to which the gateway belongs.
34776	VirtualHub *SubResource `json:"virtualHub,omitempty"`
34777	// Connections - List of all vpn connections to the gateway.
34778	Connections *[]VpnConnection `json:"connections,omitempty"`
34779	// BgpSettings - Local network gateway's BGP speaker settings.
34780	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
34781	// ProvisioningState - READ-ONLY; The provisioning state of the VPN gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
34782	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34783	// VpnGatewayScaleUnit - The scale unit for this vpn gateway.
34784	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
34785}
34786
34787// MarshalJSON is the custom marshaler for VpnGatewayProperties.
34788func (vgp VpnGatewayProperties) MarshalJSON() ([]byte, error) {
34789	objectMap := make(map[string]interface{})
34790	if vgp.VirtualHub != nil {
34791		objectMap["virtualHub"] = vgp.VirtualHub
34792	}
34793	if vgp.Connections != nil {
34794		objectMap["connections"] = vgp.Connections
34795	}
34796	if vgp.BgpSettings != nil {
34797		objectMap["bgpSettings"] = vgp.BgpSettings
34798	}
34799	if vgp.VpnGatewayScaleUnit != nil {
34800		objectMap["vpnGatewayScaleUnit"] = vgp.VpnGatewayScaleUnit
34801	}
34802	return json.Marshal(objectMap)
34803}
34804
34805// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
34806// long-running operation.
34807type VpnGatewaysCreateOrUpdateFuture struct {
34808	azure.FutureAPI
34809	// Result returns the result of the asynchronous operation.
34810	// If the operation has not completed it will return an error.
34811	Result func(VpnGatewaysClient) (VpnGateway, error)
34812}
34813
34814// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
34815// operation.
34816type VpnGatewaysDeleteFuture struct {
34817	azure.FutureAPI
34818	// Result returns the result of the asynchronous operation.
34819	// If the operation has not completed it will return an error.
34820	Result func(VpnGatewaysClient) (autorest.Response, error)
34821}
34822
34823// VpnGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running
34824// operation.
34825type VpnGatewaysResetFuture struct {
34826	azure.FutureAPI
34827	// Result returns the result of the asynchronous operation.
34828	// If the operation has not completed it will return an error.
34829	Result func(VpnGatewaysClient) (VpnGateway, error)
34830}
34831
34832// VpnLinkBgpSettings BGP settings details for a link.
34833type VpnLinkBgpSettings struct {
34834	// Asn - The BGP speaker's ASN.
34835	Asn *int64 `json:"asn,omitempty"`
34836	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
34837	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
34838}
34839
34840// VpnLinkProviderProperties list of properties of a link provider.
34841type VpnLinkProviderProperties struct {
34842	// LinkProviderName - Name of the link provider.
34843	LinkProviderName *string `json:"linkProviderName,omitempty"`
34844	// LinkSpeedInMbps - Link speed.
34845	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
34846}
34847
34848// VpnPacketCaptureStartParameters start packet capture parameters on virtual network gateway.
34849type VpnPacketCaptureStartParameters struct {
34850	// FilterData - Start Packet capture parameters.
34851	FilterData *string `json:"filterData,omitempty"`
34852}
34853
34854// VpnPacketCaptureStopParameters stop packet capture parameters.
34855type VpnPacketCaptureStopParameters struct {
34856	// SasURL - SAS url for packet capture on virtual network gateway.
34857	SasURL *string `json:"sasUrl,omitempty"`
34858}
34859
34860// VpnProfileResponse vpn Profile Response for package generation.
34861type VpnProfileResponse struct {
34862	autorest.Response `json:"-"`
34863	// ProfileURL - URL to the VPN profile.
34864	ProfileURL *string `json:"profileUrl,omitempty"`
34865}
34866
34867// VpnServerConfigRadiusClientRootCertificate properties of the Radius client root certificate of
34868// VpnServerConfiguration.
34869type VpnServerConfigRadiusClientRootCertificate struct {
34870	// Name - The certificate name.
34871	Name *string `json:"name,omitempty"`
34872	// Thumbprint - The Radius client root certificate thumbprint.
34873	Thumbprint *string `json:"thumbprint,omitempty"`
34874}
34875
34876// VpnServerConfigRadiusServerRootCertificate properties of Radius Server root certificate of
34877// VpnServerConfiguration.
34878type VpnServerConfigRadiusServerRootCertificate struct {
34879	// Name - The certificate name.
34880	Name *string `json:"name,omitempty"`
34881	// PublicCertData - The certificate public data.
34882	PublicCertData *string `json:"publicCertData,omitempty"`
34883}
34884
34885// VpnServerConfiguration vpnServerConfiguration Resource.
34886type VpnServerConfiguration struct {
34887	autorest.Response `json:"-"`
34888	// VpnServerConfigurationProperties - Properties of the P2SVpnServer configuration.
34889	*VpnServerConfigurationProperties `json:"properties,omitempty"`
34890	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
34891	Etag *string `json:"etag,omitempty"`
34892	// ID - Resource ID.
34893	ID *string `json:"id,omitempty"`
34894	// Name - READ-ONLY; Resource name.
34895	Name *string `json:"name,omitempty"`
34896	// Type - READ-ONLY; Resource type.
34897	Type *string `json:"type,omitempty"`
34898	// Location - Resource location.
34899	Location *string `json:"location,omitempty"`
34900	// Tags - Resource tags.
34901	Tags map[string]*string `json:"tags"`
34902}
34903
34904// MarshalJSON is the custom marshaler for VpnServerConfiguration.
34905func (vsc VpnServerConfiguration) MarshalJSON() ([]byte, error) {
34906	objectMap := make(map[string]interface{})
34907	if vsc.VpnServerConfigurationProperties != nil {
34908		objectMap["properties"] = vsc.VpnServerConfigurationProperties
34909	}
34910	if vsc.ID != nil {
34911		objectMap["id"] = vsc.ID
34912	}
34913	if vsc.Location != nil {
34914		objectMap["location"] = vsc.Location
34915	}
34916	if vsc.Tags != nil {
34917		objectMap["tags"] = vsc.Tags
34918	}
34919	return json.Marshal(objectMap)
34920}
34921
34922// UnmarshalJSON is the custom unmarshaler for VpnServerConfiguration struct.
34923func (vsc *VpnServerConfiguration) UnmarshalJSON(body []byte) error {
34924	var m map[string]*json.RawMessage
34925	err := json.Unmarshal(body, &m)
34926	if err != nil {
34927		return err
34928	}
34929	for k, v := range m {
34930		switch k {
34931		case "properties":
34932			if v != nil {
34933				var vpnServerConfigurationProperties VpnServerConfigurationProperties
34934				err = json.Unmarshal(*v, &vpnServerConfigurationProperties)
34935				if err != nil {
34936					return err
34937				}
34938				vsc.VpnServerConfigurationProperties = &vpnServerConfigurationProperties
34939			}
34940		case "etag":
34941			if v != nil {
34942				var etag string
34943				err = json.Unmarshal(*v, &etag)
34944				if err != nil {
34945					return err
34946				}
34947				vsc.Etag = &etag
34948			}
34949		case "id":
34950			if v != nil {
34951				var ID string
34952				err = json.Unmarshal(*v, &ID)
34953				if err != nil {
34954					return err
34955				}
34956				vsc.ID = &ID
34957			}
34958		case "name":
34959			if v != nil {
34960				var name string
34961				err = json.Unmarshal(*v, &name)
34962				if err != nil {
34963					return err
34964				}
34965				vsc.Name = &name
34966			}
34967		case "type":
34968			if v != nil {
34969				var typeVar string
34970				err = json.Unmarshal(*v, &typeVar)
34971				if err != nil {
34972					return err
34973				}
34974				vsc.Type = &typeVar
34975			}
34976		case "location":
34977			if v != nil {
34978				var location string
34979				err = json.Unmarshal(*v, &location)
34980				if err != nil {
34981					return err
34982				}
34983				vsc.Location = &location
34984			}
34985		case "tags":
34986			if v != nil {
34987				var tags map[string]*string
34988				err = json.Unmarshal(*v, &tags)
34989				if err != nil {
34990					return err
34991				}
34992				vsc.Tags = tags
34993			}
34994		}
34995	}
34996
34997	return nil
34998}
34999
35000// VpnServerConfigurationProperties parameters for VpnServerConfiguration.
35001type VpnServerConfigurationProperties struct {
35002	// Name - The name of the VpnServerConfiguration that is unique within a resource group.
35003	Name *string `json:"name,omitempty"`
35004	// VpnProtocols - VPN protocols for the VpnServerConfiguration.
35005	VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"`
35006	// VpnAuthenticationTypes - VPN authentication types for the VpnServerConfiguration.
35007	VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"`
35008	// VpnClientRootCertificates - VPN client root certificate of VpnServerConfiguration.
35009	VpnClientRootCertificates *[]VpnServerConfigVpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
35010	// VpnClientRevokedCertificates - VPN client revoked certificate of VpnServerConfiguration.
35011	VpnClientRevokedCertificates *[]VpnServerConfigVpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
35012	// RadiusServerRootCertificates - Radius Server root certificate of VpnServerConfiguration.
35013	RadiusServerRootCertificates *[]VpnServerConfigRadiusServerRootCertificate `json:"radiusServerRootCertificates,omitempty"`
35014	// RadiusClientRootCertificates - Radius client root certificate of VpnServerConfiguration.
35015	RadiusClientRootCertificates *[]VpnServerConfigRadiusClientRootCertificate `json:"radiusClientRootCertificates,omitempty"`
35016	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for VpnServerConfiguration.
35017	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
35018	// RadiusServerAddress - The radius server address property of the VpnServerConfiguration resource for point to site client connection.
35019	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
35020	// RadiusServerSecret - The radius secret property of the VpnServerConfiguration resource for point to site client connection.
35021	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
35022	// RadiusServers - Multiple Radius Server configuration for VpnServerConfiguration.
35023	RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"`
35024	// AadAuthenticationParameters - The set of aad vpn authentication parameters.
35025	AadAuthenticationParameters *AadAuthenticationParameters `json:"aadAuthenticationParameters,omitempty"`
35026	// ProvisioningState - READ-ONLY; The provisioning state of the VpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
35027	ProvisioningState *string `json:"provisioningState,omitempty"`
35028	// P2SVpnGateways - READ-ONLY; List of references to P2SVpnGateways.
35029	P2SVpnGateways *[]P2SVpnGateway `json:"p2SVpnGateways,omitempty"`
35030	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35031	Etag *string `json:"etag,omitempty"`
35032}
35033
35034// MarshalJSON is the custom marshaler for VpnServerConfigurationProperties.
35035func (vscp VpnServerConfigurationProperties) MarshalJSON() ([]byte, error) {
35036	objectMap := make(map[string]interface{})
35037	if vscp.Name != nil {
35038		objectMap["name"] = vscp.Name
35039	}
35040	if vscp.VpnProtocols != nil {
35041		objectMap["vpnProtocols"] = vscp.VpnProtocols
35042	}
35043	if vscp.VpnAuthenticationTypes != nil {
35044		objectMap["vpnAuthenticationTypes"] = vscp.VpnAuthenticationTypes
35045	}
35046	if vscp.VpnClientRootCertificates != nil {
35047		objectMap["vpnClientRootCertificates"] = vscp.VpnClientRootCertificates
35048	}
35049	if vscp.VpnClientRevokedCertificates != nil {
35050		objectMap["vpnClientRevokedCertificates"] = vscp.VpnClientRevokedCertificates
35051	}
35052	if vscp.RadiusServerRootCertificates != nil {
35053		objectMap["radiusServerRootCertificates"] = vscp.RadiusServerRootCertificates
35054	}
35055	if vscp.RadiusClientRootCertificates != nil {
35056		objectMap["radiusClientRootCertificates"] = vscp.RadiusClientRootCertificates
35057	}
35058	if vscp.VpnClientIpsecPolicies != nil {
35059		objectMap["vpnClientIpsecPolicies"] = vscp.VpnClientIpsecPolicies
35060	}
35061	if vscp.RadiusServerAddress != nil {
35062		objectMap["radiusServerAddress"] = vscp.RadiusServerAddress
35063	}
35064	if vscp.RadiusServerSecret != nil {
35065		objectMap["radiusServerSecret"] = vscp.RadiusServerSecret
35066	}
35067	if vscp.RadiusServers != nil {
35068		objectMap["radiusServers"] = vscp.RadiusServers
35069	}
35070	if vscp.AadAuthenticationParameters != nil {
35071		objectMap["aadAuthenticationParameters"] = vscp.AadAuthenticationParameters
35072	}
35073	return json.Marshal(objectMap)
35074}
35075
35076// VpnServerConfigurationsAssociatedWithVirtualWanListFuture an abstraction for monitoring and retrieving
35077// the results of a long-running operation.
35078type VpnServerConfigurationsAssociatedWithVirtualWanListFuture struct {
35079	azure.FutureAPI
35080	// Result returns the result of the asynchronous operation.
35081	// If the operation has not completed it will return an error.
35082	Result func(VpnServerConfigurationsAssociatedWithVirtualWanClient) (VpnServerConfigurationsResponse, error)
35083}
35084
35085// VpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
35086// a long-running operation.
35087type VpnServerConfigurationsCreateOrUpdateFuture struct {
35088	azure.FutureAPI
35089	// Result returns the result of the asynchronous operation.
35090	// If the operation has not completed it will return an error.
35091	Result func(VpnServerConfigurationsClient) (VpnServerConfiguration, error)
35092}
35093
35094// VpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
35095// long-running operation.
35096type VpnServerConfigurationsDeleteFuture struct {
35097	azure.FutureAPI
35098	// Result returns the result of the asynchronous operation.
35099	// If the operation has not completed it will return an error.
35100	Result func(VpnServerConfigurationsClient) (autorest.Response, error)
35101}
35102
35103// VpnServerConfigurationsResponse vpnServerConfigurations list associated with VirtualWan Response.
35104type VpnServerConfigurationsResponse struct {
35105	autorest.Response `json:"-"`
35106	// VpnServerConfigurationResourceIds - List of VpnServerConfigurations associated with VirtualWan.
35107	VpnServerConfigurationResourceIds *[]string `json:"vpnServerConfigurationResourceIds,omitempty"`
35108}
35109
35110// VpnServerConfigVpnClientRevokedCertificate properties of the revoked VPN client certificate of
35111// VpnServerConfiguration.
35112type VpnServerConfigVpnClientRevokedCertificate struct {
35113	// Name - The certificate name.
35114	Name *string `json:"name,omitempty"`
35115	// Thumbprint - The revoked VPN client certificate thumbprint.
35116	Thumbprint *string `json:"thumbprint,omitempty"`
35117}
35118
35119// VpnServerConfigVpnClientRootCertificate properties of VPN client root certificate of
35120// VpnServerConfiguration.
35121type VpnServerConfigVpnClientRootCertificate struct {
35122	// Name - The certificate name.
35123	Name *string `json:"name,omitempty"`
35124	// PublicCertData - The certificate public data.
35125	PublicCertData *string `json:"publicCertData,omitempty"`
35126}
35127
35128// VpnSite vpnSite Resource.
35129type VpnSite struct {
35130	autorest.Response `json:"-"`
35131	// VpnSiteProperties - Properties of the VPN site.
35132	*VpnSiteProperties `json:"properties,omitempty"`
35133	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35134	Etag *string `json:"etag,omitempty"`
35135	// ID - Resource ID.
35136	ID *string `json:"id,omitempty"`
35137	// Name - READ-ONLY; Resource name.
35138	Name *string `json:"name,omitempty"`
35139	// Type - READ-ONLY; Resource type.
35140	Type *string `json:"type,omitempty"`
35141	// Location - Resource location.
35142	Location *string `json:"location,omitempty"`
35143	// Tags - Resource tags.
35144	Tags map[string]*string `json:"tags"`
35145}
35146
35147// MarshalJSON is the custom marshaler for VpnSite.
35148func (vs VpnSite) MarshalJSON() ([]byte, error) {
35149	objectMap := make(map[string]interface{})
35150	if vs.VpnSiteProperties != nil {
35151		objectMap["properties"] = vs.VpnSiteProperties
35152	}
35153	if vs.ID != nil {
35154		objectMap["id"] = vs.ID
35155	}
35156	if vs.Location != nil {
35157		objectMap["location"] = vs.Location
35158	}
35159	if vs.Tags != nil {
35160		objectMap["tags"] = vs.Tags
35161	}
35162	return json.Marshal(objectMap)
35163}
35164
35165// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
35166func (vs *VpnSite) UnmarshalJSON(body []byte) error {
35167	var m map[string]*json.RawMessage
35168	err := json.Unmarshal(body, &m)
35169	if err != nil {
35170		return err
35171	}
35172	for k, v := range m {
35173		switch k {
35174		case "properties":
35175			if v != nil {
35176				var vpnSiteProperties VpnSiteProperties
35177				err = json.Unmarshal(*v, &vpnSiteProperties)
35178				if err != nil {
35179					return err
35180				}
35181				vs.VpnSiteProperties = &vpnSiteProperties
35182			}
35183		case "etag":
35184			if v != nil {
35185				var etag string
35186				err = json.Unmarshal(*v, &etag)
35187				if err != nil {
35188					return err
35189				}
35190				vs.Etag = &etag
35191			}
35192		case "id":
35193			if v != nil {
35194				var ID string
35195				err = json.Unmarshal(*v, &ID)
35196				if err != nil {
35197					return err
35198				}
35199				vs.ID = &ID
35200			}
35201		case "name":
35202			if v != nil {
35203				var name string
35204				err = json.Unmarshal(*v, &name)
35205				if err != nil {
35206					return err
35207				}
35208				vs.Name = &name
35209			}
35210		case "type":
35211			if v != nil {
35212				var typeVar string
35213				err = json.Unmarshal(*v, &typeVar)
35214				if err != nil {
35215					return err
35216				}
35217				vs.Type = &typeVar
35218			}
35219		case "location":
35220			if v != nil {
35221				var location string
35222				err = json.Unmarshal(*v, &location)
35223				if err != nil {
35224					return err
35225				}
35226				vs.Location = &location
35227			}
35228		case "tags":
35229			if v != nil {
35230				var tags map[string]*string
35231				err = json.Unmarshal(*v, &tags)
35232				if err != nil {
35233					return err
35234				}
35235				vs.Tags = tags
35236			}
35237		}
35238	}
35239
35240	return nil
35241}
35242
35243// VpnSiteID vpnSite Resource.
35244type VpnSiteID struct {
35245	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
35246	VpnSite *string `json:"vpnSite,omitempty"`
35247}
35248
35249// VpnSiteLink vpnSiteLink Resource.
35250type VpnSiteLink struct {
35251	autorest.Response `json:"-"`
35252	// VpnSiteLinkProperties - Properties of the VPN site link.
35253	*VpnSiteLinkProperties `json:"properties,omitempty"`
35254	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35255	Etag *string `json:"etag,omitempty"`
35256	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
35257	Name *string `json:"name,omitempty"`
35258	// Type - READ-ONLY; Resource type.
35259	Type *string `json:"type,omitempty"`
35260	// ID - Resource ID.
35261	ID *string `json:"id,omitempty"`
35262}
35263
35264// MarshalJSON is the custom marshaler for VpnSiteLink.
35265func (vsl VpnSiteLink) MarshalJSON() ([]byte, error) {
35266	objectMap := make(map[string]interface{})
35267	if vsl.VpnSiteLinkProperties != nil {
35268		objectMap["properties"] = vsl.VpnSiteLinkProperties
35269	}
35270	if vsl.Name != nil {
35271		objectMap["name"] = vsl.Name
35272	}
35273	if vsl.ID != nil {
35274		objectMap["id"] = vsl.ID
35275	}
35276	return json.Marshal(objectMap)
35277}
35278
35279// UnmarshalJSON is the custom unmarshaler for VpnSiteLink struct.
35280func (vsl *VpnSiteLink) UnmarshalJSON(body []byte) error {
35281	var m map[string]*json.RawMessage
35282	err := json.Unmarshal(body, &m)
35283	if err != nil {
35284		return err
35285	}
35286	for k, v := range m {
35287		switch k {
35288		case "properties":
35289			if v != nil {
35290				var vpnSiteLinkProperties VpnSiteLinkProperties
35291				err = json.Unmarshal(*v, &vpnSiteLinkProperties)
35292				if err != nil {
35293					return err
35294				}
35295				vsl.VpnSiteLinkProperties = &vpnSiteLinkProperties
35296			}
35297		case "etag":
35298			if v != nil {
35299				var etag string
35300				err = json.Unmarshal(*v, &etag)
35301				if err != nil {
35302					return err
35303				}
35304				vsl.Etag = &etag
35305			}
35306		case "name":
35307			if v != nil {
35308				var name string
35309				err = json.Unmarshal(*v, &name)
35310				if err != nil {
35311					return err
35312				}
35313				vsl.Name = &name
35314			}
35315		case "type":
35316			if v != nil {
35317				var typeVar string
35318				err = json.Unmarshal(*v, &typeVar)
35319				if err != nil {
35320					return err
35321				}
35322				vsl.Type = &typeVar
35323			}
35324		case "id":
35325			if v != nil {
35326				var ID string
35327				err = json.Unmarshal(*v, &ID)
35328				if err != nil {
35329					return err
35330				}
35331				vsl.ID = &ID
35332			}
35333		}
35334	}
35335
35336	return nil
35337}
35338
35339// VpnSiteLinkConnection vpnSiteLinkConnection Resource.
35340type VpnSiteLinkConnection struct {
35341	autorest.Response `json:"-"`
35342	// VpnSiteLinkConnectionProperties - Properties of the VPN site link connection.
35343	*VpnSiteLinkConnectionProperties `json:"properties,omitempty"`
35344	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
35345	Name *string `json:"name,omitempty"`
35346	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35347	Etag *string `json:"etag,omitempty"`
35348	// Type - READ-ONLY; Resource type.
35349	Type *string `json:"type,omitempty"`
35350	// ID - Resource ID.
35351	ID *string `json:"id,omitempty"`
35352}
35353
35354// MarshalJSON is the custom marshaler for VpnSiteLinkConnection.
35355func (vslc VpnSiteLinkConnection) MarshalJSON() ([]byte, error) {
35356	objectMap := make(map[string]interface{})
35357	if vslc.VpnSiteLinkConnectionProperties != nil {
35358		objectMap["properties"] = vslc.VpnSiteLinkConnectionProperties
35359	}
35360	if vslc.Name != nil {
35361		objectMap["name"] = vslc.Name
35362	}
35363	if vslc.ID != nil {
35364		objectMap["id"] = vslc.ID
35365	}
35366	return json.Marshal(objectMap)
35367}
35368
35369// UnmarshalJSON is the custom unmarshaler for VpnSiteLinkConnection struct.
35370func (vslc *VpnSiteLinkConnection) UnmarshalJSON(body []byte) error {
35371	var m map[string]*json.RawMessage
35372	err := json.Unmarshal(body, &m)
35373	if err != nil {
35374		return err
35375	}
35376	for k, v := range m {
35377		switch k {
35378		case "properties":
35379			if v != nil {
35380				var vpnSiteLinkConnectionProperties VpnSiteLinkConnectionProperties
35381				err = json.Unmarshal(*v, &vpnSiteLinkConnectionProperties)
35382				if err != nil {
35383					return err
35384				}
35385				vslc.VpnSiteLinkConnectionProperties = &vpnSiteLinkConnectionProperties
35386			}
35387		case "name":
35388			if v != nil {
35389				var name string
35390				err = json.Unmarshal(*v, &name)
35391				if err != nil {
35392					return err
35393				}
35394				vslc.Name = &name
35395			}
35396		case "etag":
35397			if v != nil {
35398				var etag string
35399				err = json.Unmarshal(*v, &etag)
35400				if err != nil {
35401					return err
35402				}
35403				vslc.Etag = &etag
35404			}
35405		case "type":
35406			if v != nil {
35407				var typeVar string
35408				err = json.Unmarshal(*v, &typeVar)
35409				if err != nil {
35410					return err
35411				}
35412				vslc.Type = &typeVar
35413			}
35414		case "id":
35415			if v != nil {
35416				var ID string
35417				err = json.Unmarshal(*v, &ID)
35418				if err != nil {
35419					return err
35420				}
35421				vslc.ID = &ID
35422			}
35423		}
35424	}
35425
35426	return nil
35427}
35428
35429// VpnSiteLinkConnectionProperties parameters for VpnConnection.
35430type VpnSiteLinkConnectionProperties struct {
35431	// VpnSiteLink - Id of the connected vpn site link.
35432	VpnSiteLink *SubResource `json:"vpnSiteLink,omitempty"`
35433	// RoutingWeight - Routing weight for vpn connection.
35434	RoutingWeight *int32 `json:"routingWeight,omitempty"`
35435	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
35436	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
35437	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
35438	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
35439	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
35440	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
35441	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
35442	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
35443	// ConnectionBandwidth - Expected bandwidth in MBPS.
35444	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
35445	// SharedKey - SharedKey for the vpn connection.
35446	SharedKey *string `json:"sharedKey,omitempty"`
35447	// EnableBgp - EnableBgp flag.
35448	EnableBgp *bool `json:"enableBgp,omitempty"`
35449	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
35450	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
35451	// IpsecPolicies - The IPSec Policies to be considered by this connection.
35452	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
35453	// EnableRateLimiting - EnableBgp flag.
35454	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
35455	// UseLocalAzureIPAddress - Use local azure ip to initiate connection.
35456	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
35457	// ProvisioningState - READ-ONLY; The provisioning state of the VPN site link connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35458	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35459}
35460
35461// MarshalJSON is the custom marshaler for VpnSiteLinkConnectionProperties.
35462func (vslcp VpnSiteLinkConnectionProperties) MarshalJSON() ([]byte, error) {
35463	objectMap := make(map[string]interface{})
35464	if vslcp.VpnSiteLink != nil {
35465		objectMap["vpnSiteLink"] = vslcp.VpnSiteLink
35466	}
35467	if vslcp.RoutingWeight != nil {
35468		objectMap["routingWeight"] = vslcp.RoutingWeight
35469	}
35470	if vslcp.ConnectionStatus != "" {
35471		objectMap["connectionStatus"] = vslcp.ConnectionStatus
35472	}
35473	if vslcp.VpnConnectionProtocolType != "" {
35474		objectMap["vpnConnectionProtocolType"] = vslcp.VpnConnectionProtocolType
35475	}
35476	if vslcp.ConnectionBandwidth != nil {
35477		objectMap["connectionBandwidth"] = vslcp.ConnectionBandwidth
35478	}
35479	if vslcp.SharedKey != nil {
35480		objectMap["sharedKey"] = vslcp.SharedKey
35481	}
35482	if vslcp.EnableBgp != nil {
35483		objectMap["enableBgp"] = vslcp.EnableBgp
35484	}
35485	if vslcp.UsePolicyBasedTrafficSelectors != nil {
35486		objectMap["usePolicyBasedTrafficSelectors"] = vslcp.UsePolicyBasedTrafficSelectors
35487	}
35488	if vslcp.IpsecPolicies != nil {
35489		objectMap["ipsecPolicies"] = vslcp.IpsecPolicies
35490	}
35491	if vslcp.EnableRateLimiting != nil {
35492		objectMap["enableRateLimiting"] = vslcp.EnableRateLimiting
35493	}
35494	if vslcp.UseLocalAzureIPAddress != nil {
35495		objectMap["useLocalAzureIpAddress"] = vslcp.UseLocalAzureIPAddress
35496	}
35497	return json.Marshal(objectMap)
35498}
35499
35500// VpnSiteLinkProperties parameters for VpnSite.
35501type VpnSiteLinkProperties struct {
35502	// LinkProperties - The link provider properties.
35503	LinkProperties *VpnLinkProviderProperties `json:"linkProperties,omitempty"`
35504	// IPAddress - The ip-address for the vpn-site-link.
35505	IPAddress *string `json:"ipAddress,omitempty"`
35506	// Fqdn - FQDN of vpn-site-link.
35507	Fqdn *string `json:"fqdn,omitempty"`
35508	// BgpProperties - The set of bgp properties.
35509	BgpProperties *VpnLinkBgpSettings `json:"bgpProperties,omitempty"`
35510	// ProvisioningState - READ-ONLY; The provisioning state of the VPN site link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35511	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35512}
35513
35514// MarshalJSON is the custom marshaler for VpnSiteLinkProperties.
35515func (vslp VpnSiteLinkProperties) MarshalJSON() ([]byte, error) {
35516	objectMap := make(map[string]interface{})
35517	if vslp.LinkProperties != nil {
35518		objectMap["linkProperties"] = vslp.LinkProperties
35519	}
35520	if vslp.IPAddress != nil {
35521		objectMap["ipAddress"] = vslp.IPAddress
35522	}
35523	if vslp.Fqdn != nil {
35524		objectMap["fqdn"] = vslp.Fqdn
35525	}
35526	if vslp.BgpProperties != nil {
35527		objectMap["bgpProperties"] = vslp.BgpProperties
35528	}
35529	return json.Marshal(objectMap)
35530}
35531
35532// VpnSiteProperties parameters for VpnSite.
35533type VpnSiteProperties struct {
35534	// VirtualWan - The VirtualWAN to which the vpnSite belongs.
35535	VirtualWan *SubResource `json:"virtualWan,omitempty"`
35536	// DeviceProperties - The device properties.
35537	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
35538	// IPAddress - The ip-address for the vpn-site.
35539	IPAddress *string `json:"ipAddress,omitempty"`
35540	// SiteKey - The key for vpn-site that can be used for connections.
35541	SiteKey *string `json:"siteKey,omitempty"`
35542	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
35543	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
35544	// BgpProperties - The set of bgp properties.
35545	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
35546	// ProvisioningState - READ-ONLY; The provisioning state of the VPN site resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35547	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35548	// IsSecuritySite - IsSecuritySite flag.
35549	IsSecuritySite *bool `json:"isSecuritySite,omitempty"`
35550	// VpnSiteLinks - List of all vpn site links.
35551	VpnSiteLinks *[]VpnSiteLink `json:"vpnSiteLinks,omitempty"`
35552}
35553
35554// MarshalJSON is the custom marshaler for VpnSiteProperties.
35555func (vsp VpnSiteProperties) MarshalJSON() ([]byte, error) {
35556	objectMap := make(map[string]interface{})
35557	if vsp.VirtualWan != nil {
35558		objectMap["virtualWan"] = vsp.VirtualWan
35559	}
35560	if vsp.DeviceProperties != nil {
35561		objectMap["deviceProperties"] = vsp.DeviceProperties
35562	}
35563	if vsp.IPAddress != nil {
35564		objectMap["ipAddress"] = vsp.IPAddress
35565	}
35566	if vsp.SiteKey != nil {
35567		objectMap["siteKey"] = vsp.SiteKey
35568	}
35569	if vsp.AddressSpace != nil {
35570		objectMap["addressSpace"] = vsp.AddressSpace
35571	}
35572	if vsp.BgpProperties != nil {
35573		objectMap["bgpProperties"] = vsp.BgpProperties
35574	}
35575	if vsp.IsSecuritySite != nil {
35576		objectMap["isSecuritySite"] = vsp.IsSecuritySite
35577	}
35578	if vsp.VpnSiteLinks != nil {
35579		objectMap["vpnSiteLinks"] = vsp.VpnSiteLinks
35580	}
35581	return json.Marshal(objectMap)
35582}
35583
35584// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
35585// long-running operation.
35586type VpnSitesConfigurationDownloadFuture struct {
35587	azure.FutureAPI
35588	// Result returns the result of the asynchronous operation.
35589	// If the operation has not completed it will return an error.
35590	Result func(VpnSitesConfigurationClient) (autorest.Response, error)
35591}
35592
35593// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
35594// operation.
35595type VpnSitesCreateOrUpdateFuture struct {
35596	azure.FutureAPI
35597	// Result returns the result of the asynchronous operation.
35598	// If the operation has not completed it will return an error.
35599	Result func(VpnSitesClient) (VpnSite, error)
35600}
35601
35602// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
35603// operation.
35604type VpnSitesDeleteFuture struct {
35605	azure.FutureAPI
35606	// Result returns the result of the asynchronous operation.
35607	// If the operation has not completed it will return an error.
35608	Result func(VpnSitesClient) (autorest.Response, error)
35609}
35610
35611// Watcher network watcher in a resource group.
35612type Watcher struct {
35613	autorest.Response `json:"-"`
35614	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35615	Etag *string `json:"etag,omitempty"`
35616	// WatcherPropertiesFormat - Properties of the network watcher.
35617	*WatcherPropertiesFormat `json:"properties,omitempty"`
35618	// ID - Resource ID.
35619	ID *string `json:"id,omitempty"`
35620	// Name - READ-ONLY; Resource name.
35621	Name *string `json:"name,omitempty"`
35622	// Type - READ-ONLY; Resource type.
35623	Type *string `json:"type,omitempty"`
35624	// Location - Resource location.
35625	Location *string `json:"location,omitempty"`
35626	// Tags - Resource tags.
35627	Tags map[string]*string `json:"tags"`
35628}
35629
35630// MarshalJSON is the custom marshaler for Watcher.
35631func (w Watcher) MarshalJSON() ([]byte, error) {
35632	objectMap := make(map[string]interface{})
35633	if w.WatcherPropertiesFormat != nil {
35634		objectMap["properties"] = w.WatcherPropertiesFormat
35635	}
35636	if w.ID != nil {
35637		objectMap["id"] = w.ID
35638	}
35639	if w.Location != nil {
35640		objectMap["location"] = w.Location
35641	}
35642	if w.Tags != nil {
35643		objectMap["tags"] = w.Tags
35644	}
35645	return json.Marshal(objectMap)
35646}
35647
35648// UnmarshalJSON is the custom unmarshaler for Watcher struct.
35649func (w *Watcher) UnmarshalJSON(body []byte) error {
35650	var m map[string]*json.RawMessage
35651	err := json.Unmarshal(body, &m)
35652	if err != nil {
35653		return err
35654	}
35655	for k, v := range m {
35656		switch k {
35657		case "etag":
35658			if v != nil {
35659				var etag string
35660				err = json.Unmarshal(*v, &etag)
35661				if err != nil {
35662					return err
35663				}
35664				w.Etag = &etag
35665			}
35666		case "properties":
35667			if v != nil {
35668				var watcherPropertiesFormat WatcherPropertiesFormat
35669				err = json.Unmarshal(*v, &watcherPropertiesFormat)
35670				if err != nil {
35671					return err
35672				}
35673				w.WatcherPropertiesFormat = &watcherPropertiesFormat
35674			}
35675		case "id":
35676			if v != nil {
35677				var ID string
35678				err = json.Unmarshal(*v, &ID)
35679				if err != nil {
35680					return err
35681				}
35682				w.ID = &ID
35683			}
35684		case "name":
35685			if v != nil {
35686				var name string
35687				err = json.Unmarshal(*v, &name)
35688				if err != nil {
35689					return err
35690				}
35691				w.Name = &name
35692			}
35693		case "type":
35694			if v != nil {
35695				var typeVar string
35696				err = json.Unmarshal(*v, &typeVar)
35697				if err != nil {
35698					return err
35699				}
35700				w.Type = &typeVar
35701			}
35702		case "location":
35703			if v != nil {
35704				var location string
35705				err = json.Unmarshal(*v, &location)
35706				if err != nil {
35707					return err
35708				}
35709				w.Location = &location
35710			}
35711		case "tags":
35712			if v != nil {
35713				var tags map[string]*string
35714				err = json.Unmarshal(*v, &tags)
35715				if err != nil {
35716					return err
35717				}
35718				w.Tags = tags
35719			}
35720		}
35721	}
35722
35723	return nil
35724}
35725
35726// WatcherListResult response for ListNetworkWatchers API service call.
35727type WatcherListResult struct {
35728	autorest.Response `json:"-"`
35729	// Value - List of network watcher resources.
35730	Value *[]Watcher `json:"value,omitempty"`
35731}
35732
35733// WatcherPropertiesFormat the network watcher properties.
35734type WatcherPropertiesFormat struct {
35735	// ProvisioningState - READ-ONLY; The provisioning state of the network watcher resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35736	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35737}
35738
35739// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
35740// long-running operation.
35741type WatchersCheckConnectivityFuture struct {
35742	azure.FutureAPI
35743	// Result returns the result of the asynchronous operation.
35744	// If the operation has not completed it will return an error.
35745	Result func(WatchersClient) (ConnectivityInformation, error)
35746}
35747
35748// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
35749// operation.
35750type WatchersDeleteFuture struct {
35751	azure.FutureAPI
35752	// Result returns the result of the asynchronous operation.
35753	// If the operation has not completed it will return an error.
35754	Result func(WatchersClient) (autorest.Response, error)
35755}
35756
35757// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
35758// long-running operation.
35759type WatchersGetAzureReachabilityReportFuture struct {
35760	azure.FutureAPI
35761	// Result returns the result of the asynchronous operation.
35762	// If the operation has not completed it will return an error.
35763	Result func(WatchersClient) (AzureReachabilityReport, error)
35764}
35765
35766// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
35767// long-running operation.
35768type WatchersGetFlowLogStatusFuture struct {
35769	azure.FutureAPI
35770	// Result returns the result of the asynchronous operation.
35771	// If the operation has not completed it will return an error.
35772	Result func(WatchersClient) (FlowLogInformation, error)
35773}
35774
35775// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
35776// of a long-running operation.
35777type WatchersGetNetworkConfigurationDiagnosticFuture struct {
35778	azure.FutureAPI
35779	// Result returns the result of the asynchronous operation.
35780	// If the operation has not completed it will return an error.
35781	Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
35782}
35783
35784// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
35785// operation.
35786type WatchersGetNextHopFuture struct {
35787	azure.FutureAPI
35788	// Result returns the result of the asynchronous operation.
35789	// If the operation has not completed it will return an error.
35790	Result func(WatchersClient) (NextHopResult, error)
35791}
35792
35793// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
35794// long-running operation.
35795type WatchersGetTroubleshootingFuture struct {
35796	azure.FutureAPI
35797	// Result returns the result of the asynchronous operation.
35798	// If the operation has not completed it will return an error.
35799	Result func(WatchersClient) (TroubleshootingResult, error)
35800}
35801
35802// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
35803// long-running operation.
35804type WatchersGetTroubleshootingResultFuture struct {
35805	azure.FutureAPI
35806	// Result returns the result of the asynchronous operation.
35807	// If the operation has not completed it will return an error.
35808	Result func(WatchersClient) (TroubleshootingResult, error)
35809}
35810
35811// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
35812// long-running operation.
35813type WatchersGetVMSecurityRulesFuture struct {
35814	azure.FutureAPI
35815	// Result returns the result of the asynchronous operation.
35816	// If the operation has not completed it will return an error.
35817	Result func(WatchersClient) (SecurityGroupViewResult, error)
35818}
35819
35820// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
35821// long-running operation.
35822type WatchersListAvailableProvidersFuture struct {
35823	azure.FutureAPI
35824	// Result returns the result of the asynchronous operation.
35825	// If the operation has not completed it will return an error.
35826	Result func(WatchersClient) (AvailableProvidersList, error)
35827}
35828
35829// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
35830// long-running operation.
35831type WatchersSetFlowLogConfigurationFuture struct {
35832	azure.FutureAPI
35833	// Result returns the result of the asynchronous operation.
35834	// If the operation has not completed it will return an error.
35835	Result func(WatchersClient) (FlowLogInformation, error)
35836}
35837
35838// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
35839// operation.
35840type WatchersVerifyIPFlowFuture struct {
35841	azure.FutureAPI
35842	// Result returns the result of the asynchronous operation.
35843	// If the operation has not completed it will return an error.
35844	Result func(WatchersClient) (VerificationIPFlowResult, error)
35845}
35846
35847// WebApplicationFirewallCustomRule defines contents of a web application rule.
35848type WebApplicationFirewallCustomRule struct {
35849	// Name - The name of the resource that is unique within a policy. This name can be used to access the resource.
35850	Name *string `json:"name,omitempty"`
35851	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35852	Etag *string `json:"etag,omitempty"`
35853	// Priority - Priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
35854	Priority *int32 `json:"priority,omitempty"`
35855	// RuleType - The rule type. Possible values include: 'WebApplicationFirewallRuleTypeMatchRule', 'WebApplicationFirewallRuleTypeInvalid'
35856	RuleType WebApplicationFirewallRuleType `json:"ruleType,omitempty"`
35857	// MatchConditions - List of match conditions.
35858	MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"`
35859	// Action - Type of Actions. Possible values include: 'WebApplicationFirewallActionAllow', 'WebApplicationFirewallActionBlock', 'WebApplicationFirewallActionLog'
35860	Action WebApplicationFirewallAction `json:"action,omitempty"`
35861}
35862
35863// MarshalJSON is the custom marshaler for WebApplicationFirewallCustomRule.
35864func (wafcr WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) {
35865	objectMap := make(map[string]interface{})
35866	if wafcr.Name != nil {
35867		objectMap["name"] = wafcr.Name
35868	}
35869	if wafcr.Priority != nil {
35870		objectMap["priority"] = wafcr.Priority
35871	}
35872	if wafcr.RuleType != "" {
35873		objectMap["ruleType"] = wafcr.RuleType
35874	}
35875	if wafcr.MatchConditions != nil {
35876		objectMap["matchConditions"] = wafcr.MatchConditions
35877	}
35878	if wafcr.Action != "" {
35879		objectMap["action"] = wafcr.Action
35880	}
35881	return json.Marshal(objectMap)
35882}
35883
35884// WebApplicationFirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
35885// long-running operation.
35886type WebApplicationFirewallPoliciesDeleteFuture struct {
35887	azure.FutureAPI
35888	// Result returns the result of the asynchronous operation.
35889	// If the operation has not completed it will return an error.
35890	Result func(WebApplicationFirewallPoliciesClient) (autorest.Response, error)
35891}
35892
35893// WebApplicationFirewallPolicy defines web application firewall policy.
35894type WebApplicationFirewallPolicy struct {
35895	autorest.Response `json:"-"`
35896	// WebApplicationFirewallPolicyPropertiesFormat - Properties of the web application firewall policy.
35897	*WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"`
35898	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35899	Etag *string `json:"etag,omitempty"`
35900	// ID - Resource ID.
35901	ID *string `json:"id,omitempty"`
35902	// Name - READ-ONLY; Resource name.
35903	Name *string `json:"name,omitempty"`
35904	// Type - READ-ONLY; Resource type.
35905	Type *string `json:"type,omitempty"`
35906	// Location - Resource location.
35907	Location *string `json:"location,omitempty"`
35908	// Tags - Resource tags.
35909	Tags map[string]*string `json:"tags"`
35910}
35911
35912// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicy.
35913func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) {
35914	objectMap := make(map[string]interface{})
35915	if wafp.WebApplicationFirewallPolicyPropertiesFormat != nil {
35916		objectMap["properties"] = wafp.WebApplicationFirewallPolicyPropertiesFormat
35917	}
35918	if wafp.ID != nil {
35919		objectMap["id"] = wafp.ID
35920	}
35921	if wafp.Location != nil {
35922		objectMap["location"] = wafp.Location
35923	}
35924	if wafp.Tags != nil {
35925		objectMap["tags"] = wafp.Tags
35926	}
35927	return json.Marshal(objectMap)
35928}
35929
35930// UnmarshalJSON is the custom unmarshaler for WebApplicationFirewallPolicy struct.
35931func (wafp *WebApplicationFirewallPolicy) UnmarshalJSON(body []byte) error {
35932	var m map[string]*json.RawMessage
35933	err := json.Unmarshal(body, &m)
35934	if err != nil {
35935		return err
35936	}
35937	for k, v := range m {
35938		switch k {
35939		case "properties":
35940			if v != nil {
35941				var webApplicationFirewallPolicyPropertiesFormat WebApplicationFirewallPolicyPropertiesFormat
35942				err = json.Unmarshal(*v, &webApplicationFirewallPolicyPropertiesFormat)
35943				if err != nil {
35944					return err
35945				}
35946				wafp.WebApplicationFirewallPolicyPropertiesFormat = &webApplicationFirewallPolicyPropertiesFormat
35947			}
35948		case "etag":
35949			if v != nil {
35950				var etag string
35951				err = json.Unmarshal(*v, &etag)
35952				if err != nil {
35953					return err
35954				}
35955				wafp.Etag = &etag
35956			}
35957		case "id":
35958			if v != nil {
35959				var ID string
35960				err = json.Unmarshal(*v, &ID)
35961				if err != nil {
35962					return err
35963				}
35964				wafp.ID = &ID
35965			}
35966		case "name":
35967			if v != nil {
35968				var name string
35969				err = json.Unmarshal(*v, &name)
35970				if err != nil {
35971					return err
35972				}
35973				wafp.Name = &name
35974			}
35975		case "type":
35976			if v != nil {
35977				var typeVar string
35978				err = json.Unmarshal(*v, &typeVar)
35979				if err != nil {
35980					return err
35981				}
35982				wafp.Type = &typeVar
35983			}
35984		case "location":
35985			if v != nil {
35986				var location string
35987				err = json.Unmarshal(*v, &location)
35988				if err != nil {
35989					return err
35990				}
35991				wafp.Location = &location
35992			}
35993		case "tags":
35994			if v != nil {
35995				var tags map[string]*string
35996				err = json.Unmarshal(*v, &tags)
35997				if err != nil {
35998					return err
35999				}
36000				wafp.Tags = tags
36001			}
36002		}
36003	}
36004
36005	return nil
36006}
36007
36008// WebApplicationFirewallPolicyListResult result of the request to list WebApplicationFirewallPolicies. It
36009// contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results.
36010type WebApplicationFirewallPolicyListResult struct {
36011	autorest.Response `json:"-"`
36012	// Value - READ-ONLY; List of WebApplicationFirewallPolicies within a resource group.
36013	Value *[]WebApplicationFirewallPolicy `json:"value,omitempty"`
36014	// NextLink - READ-ONLY; URL to get the next set of WebApplicationFirewallPolicy objects if there are any.
36015	NextLink *string `json:"nextLink,omitempty"`
36016}
36017
36018// WebApplicationFirewallPolicyListResultIterator provides access to a complete listing of
36019// WebApplicationFirewallPolicy values.
36020type WebApplicationFirewallPolicyListResultIterator struct {
36021	i    int
36022	page WebApplicationFirewallPolicyListResultPage
36023}
36024
36025// NextWithContext advances to the next value.  If there was an error making
36026// the request the iterator does not advance and the error is returned.
36027func (iter *WebApplicationFirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
36028	if tracing.IsEnabled() {
36029		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultIterator.NextWithContext")
36030		defer func() {
36031			sc := -1
36032			if iter.Response().Response.Response != nil {
36033				sc = iter.Response().Response.Response.StatusCode
36034			}
36035			tracing.EndSpan(ctx, sc, err)
36036		}()
36037	}
36038	iter.i++
36039	if iter.i < len(iter.page.Values()) {
36040		return nil
36041	}
36042	err = iter.page.NextWithContext(ctx)
36043	if err != nil {
36044		iter.i--
36045		return err
36046	}
36047	iter.i = 0
36048	return nil
36049}
36050
36051// Next advances to the next value.  If there was an error making
36052// the request the iterator does not advance and the error is returned.
36053// Deprecated: Use NextWithContext() instead.
36054func (iter *WebApplicationFirewallPolicyListResultIterator) Next() error {
36055	return iter.NextWithContext(context.Background())
36056}
36057
36058// NotDone returns true if the enumeration should be started or is not yet complete.
36059func (iter WebApplicationFirewallPolicyListResultIterator) NotDone() bool {
36060	return iter.page.NotDone() && iter.i < len(iter.page.Values())
36061}
36062
36063// Response returns the raw server response from the last page request.
36064func (iter WebApplicationFirewallPolicyListResultIterator) Response() WebApplicationFirewallPolicyListResult {
36065	return iter.page.Response()
36066}
36067
36068// Value returns the current value or a zero-initialized value if the
36069// iterator has advanced beyond the end of the collection.
36070func (iter WebApplicationFirewallPolicyListResultIterator) Value() WebApplicationFirewallPolicy {
36071	if !iter.page.NotDone() {
36072		return WebApplicationFirewallPolicy{}
36073	}
36074	return iter.page.Values()[iter.i]
36075}
36076
36077// Creates a new instance of the WebApplicationFirewallPolicyListResultIterator type.
36078func NewWebApplicationFirewallPolicyListResultIterator(page WebApplicationFirewallPolicyListResultPage) WebApplicationFirewallPolicyListResultIterator {
36079	return WebApplicationFirewallPolicyListResultIterator{page: page}
36080}
36081
36082// IsEmpty returns true if the ListResult contains no values.
36083func (wafplr WebApplicationFirewallPolicyListResult) IsEmpty() bool {
36084	return wafplr.Value == nil || len(*wafplr.Value) == 0
36085}
36086
36087// hasNextLink returns true if the NextLink is not empty.
36088func (wafplr WebApplicationFirewallPolicyListResult) hasNextLink() bool {
36089	return wafplr.NextLink != nil && len(*wafplr.NextLink) != 0
36090}
36091
36092// webApplicationFirewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
36093// It returns nil if no more results exist.
36094func (wafplr WebApplicationFirewallPolicyListResult) webApplicationFirewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
36095	if !wafplr.hasNextLink() {
36096		return nil, nil
36097	}
36098	return autorest.Prepare((&http.Request{}).WithContext(ctx),
36099		autorest.AsJSON(),
36100		autorest.AsGet(),
36101		autorest.WithBaseURL(to.String(wafplr.NextLink)))
36102}
36103
36104// WebApplicationFirewallPolicyListResultPage contains a page of WebApplicationFirewallPolicy values.
36105type WebApplicationFirewallPolicyListResultPage struct {
36106	fn     func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)
36107	wafplr WebApplicationFirewallPolicyListResult
36108}
36109
36110// NextWithContext advances to the next page of values.  If there was an error making
36111// the request the page does not advance and the error is returned.
36112func (page *WebApplicationFirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
36113	if tracing.IsEnabled() {
36114		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultPage.NextWithContext")
36115		defer func() {
36116			sc := -1
36117			if page.Response().Response.Response != nil {
36118				sc = page.Response().Response.Response.StatusCode
36119			}
36120			tracing.EndSpan(ctx, sc, err)
36121		}()
36122	}
36123	for {
36124		next, err := page.fn(ctx, page.wafplr)
36125		if err != nil {
36126			return err
36127		}
36128		page.wafplr = next
36129		if !next.hasNextLink() || !next.IsEmpty() {
36130			break
36131		}
36132	}
36133	return nil
36134}
36135
36136// Next advances to the next page of values.  If there was an error making
36137// the request the page does not advance and the error is returned.
36138// Deprecated: Use NextWithContext() instead.
36139func (page *WebApplicationFirewallPolicyListResultPage) Next() error {
36140	return page.NextWithContext(context.Background())
36141}
36142
36143// NotDone returns true if the page enumeration should be started or is not yet complete.
36144func (page WebApplicationFirewallPolicyListResultPage) NotDone() bool {
36145	return !page.wafplr.IsEmpty()
36146}
36147
36148// Response returns the raw server response from the last page request.
36149func (page WebApplicationFirewallPolicyListResultPage) Response() WebApplicationFirewallPolicyListResult {
36150	return page.wafplr
36151}
36152
36153// Values returns the slice of values for the current page or nil if there are no values.
36154func (page WebApplicationFirewallPolicyListResultPage) Values() []WebApplicationFirewallPolicy {
36155	if page.wafplr.IsEmpty() {
36156		return nil
36157	}
36158	return *page.wafplr.Value
36159}
36160
36161// Creates a new instance of the WebApplicationFirewallPolicyListResultPage type.
36162func NewWebApplicationFirewallPolicyListResultPage(cur WebApplicationFirewallPolicyListResult, getNextPage func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)) WebApplicationFirewallPolicyListResultPage {
36163	return WebApplicationFirewallPolicyListResultPage{
36164		fn:     getNextPage,
36165		wafplr: cur,
36166	}
36167}
36168
36169// WebApplicationFirewallPolicyPropertiesFormat defines web application firewall policy properties.
36170type WebApplicationFirewallPolicyPropertiesFormat struct {
36171	// PolicySettings - The PolicySettings for policy.
36172	PolicySettings *PolicySettings `json:"policySettings,omitempty"`
36173	// CustomRules - The custom rules inside the policy.
36174	CustomRules *[]WebApplicationFirewallCustomRule `json:"customRules,omitempty"`
36175	// ApplicationGateways - READ-ONLY; A collection of references to application gateways.
36176	ApplicationGateways *[]ApplicationGateway `json:"applicationGateways,omitempty"`
36177	// ProvisioningState - READ-ONLY; The provisioning state of the web application firewall policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
36178	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36179	// ResourceState - READ-ONLY; Resource status of the policy. Possible values include: 'WebApplicationFirewallPolicyResourceStateCreating', 'WebApplicationFirewallPolicyResourceStateEnabling', 'WebApplicationFirewallPolicyResourceStateEnabled', 'WebApplicationFirewallPolicyResourceStateDisabling', 'WebApplicationFirewallPolicyResourceStateDisabled', 'WebApplicationFirewallPolicyResourceStateDeleting'
36180	ResourceState WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"`
36181	// ManagedRules - Describes the managedRules structure.
36182	ManagedRules *ManagedRulesDefinition `json:"managedRules,omitempty"`
36183	// HTTPListeners - READ-ONLY; A collection of references to application gateway http listeners.
36184	HTTPListeners *[]SubResource `json:"httpListeners,omitempty"`
36185	// PathBasedRules - READ-ONLY; A collection of references to application gateway path rules.
36186	PathBasedRules *[]SubResource `json:"pathBasedRules,omitempty"`
36187}
36188
36189// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyPropertiesFormat.
36190func (wafppf WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
36191	objectMap := make(map[string]interface{})
36192	if wafppf.PolicySettings != nil {
36193		objectMap["policySettings"] = wafppf.PolicySettings
36194	}
36195	if wafppf.CustomRules != nil {
36196		objectMap["customRules"] = wafppf.CustomRules
36197	}
36198	if wafppf.ManagedRules != nil {
36199		objectMap["managedRules"] = wafppf.ManagedRules
36200	}
36201	return json.Marshal(objectMap)
36202}
36203