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-11-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// ApplicationGatewayClientAuthConfiguration application gateway client authentication configuration.
926type ApplicationGatewayClientAuthConfiguration struct {
927	// VerifyClientCertIssuerDN - Verify client certificate issuer name on the application gateway.
928	VerifyClientCertIssuerDN *bool `json:"verifyClientCertIssuerDN,omitempty"`
929}
930
931// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
932// be active for a specified time after the backend server got removed from the configuration.
933type ApplicationGatewayConnectionDraining struct {
934	// Enabled - Whether connection draining is enabled or not.
935	Enabled *bool `json:"enabled,omitempty"`
936	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
937	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
938}
939
940// ApplicationGatewayCustomError customer error of an application gateway.
941type ApplicationGatewayCustomError struct {
942	// StatusCode - Status code of the application gateway customer error. Possible values include: 'HTTPStatus403', 'HTTPStatus502'
943	StatusCode ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"`
944	// CustomErrorPageURL - Error page URL of the application gateway customer error.
945	CustomErrorPageURL *string `json:"customErrorPageUrl,omitempty"`
946}
947
948// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
949// rule group.
950type ApplicationGatewayFirewallDisabledRuleGroup struct {
951	// RuleGroupName - The name of the rule group that will be disabled.
952	RuleGroupName *string `json:"ruleGroupName,omitempty"`
953	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
954	Rules *[]int32 `json:"rules,omitempty"`
955}
956
957// ApplicationGatewayFirewallExclusion allow to exclude some variable satisfy the condition for the WAF
958// check.
959type ApplicationGatewayFirewallExclusion struct {
960	// MatchVariable - The variable to be excluded.
961	MatchVariable *string `json:"matchVariable,omitempty"`
962	// SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to.
963	SelectorMatchOperator *string `json:"selectorMatchOperator,omitempty"`
964	// Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
965	Selector *string `json:"selector,omitempty"`
966}
967
968// ApplicationGatewayFirewallRule a web application firewall rule.
969type ApplicationGatewayFirewallRule struct {
970	// RuleID - The identifier of the web application firewall rule.
971	RuleID *int32 `json:"ruleId,omitempty"`
972	// Description - The description of the web application firewall rule.
973	Description *string `json:"description,omitempty"`
974}
975
976// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
977type ApplicationGatewayFirewallRuleGroup struct {
978	// RuleGroupName - The name of the web application firewall rule group.
979	RuleGroupName *string `json:"ruleGroupName,omitempty"`
980	// Description - The description of the web application firewall rule group.
981	Description *string `json:"description,omitempty"`
982	// Rules - The rules of the web application firewall rule group.
983	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
984}
985
986// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
987type ApplicationGatewayFirewallRuleSet struct {
988	// ApplicationGatewayFirewallRuleSetPropertiesFormat - Properties of the application gateway firewall rule set.
989	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
990	// ID - Resource ID.
991	ID *string `json:"id,omitempty"`
992	// Name - READ-ONLY; Resource name.
993	Name *string `json:"name,omitempty"`
994	// Type - READ-ONLY; Resource type.
995	Type *string `json:"type,omitempty"`
996	// Location - Resource location.
997	Location *string `json:"location,omitempty"`
998	// Tags - Resource tags.
999	Tags map[string]*string `json:"tags"`
1000}
1001
1002// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
1003func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
1004	objectMap := make(map[string]interface{})
1005	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
1006		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
1007	}
1008	if agfrs.ID != nil {
1009		objectMap["id"] = agfrs.ID
1010	}
1011	if agfrs.Location != nil {
1012		objectMap["location"] = agfrs.Location
1013	}
1014	if agfrs.Tags != nil {
1015		objectMap["tags"] = agfrs.Tags
1016	}
1017	return json.Marshal(objectMap)
1018}
1019
1020// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
1021func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
1022	var m map[string]*json.RawMessage
1023	err := json.Unmarshal(body, &m)
1024	if err != nil {
1025		return err
1026	}
1027	for k, v := range m {
1028		switch k {
1029		case "properties":
1030			if v != nil {
1031				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
1032				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
1033				if err != nil {
1034					return err
1035				}
1036				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
1037			}
1038		case "id":
1039			if v != nil {
1040				var ID string
1041				err = json.Unmarshal(*v, &ID)
1042				if err != nil {
1043					return err
1044				}
1045				agfrs.ID = &ID
1046			}
1047		case "name":
1048			if v != nil {
1049				var name string
1050				err = json.Unmarshal(*v, &name)
1051				if err != nil {
1052					return err
1053				}
1054				agfrs.Name = &name
1055			}
1056		case "type":
1057			if v != nil {
1058				var typeVar string
1059				err = json.Unmarshal(*v, &typeVar)
1060				if err != nil {
1061					return err
1062				}
1063				agfrs.Type = &typeVar
1064			}
1065		case "location":
1066			if v != nil {
1067				var location string
1068				err = json.Unmarshal(*v, &location)
1069				if err != nil {
1070					return err
1071				}
1072				agfrs.Location = &location
1073			}
1074		case "tags":
1075			if v != nil {
1076				var tags map[string]*string
1077				err = json.Unmarshal(*v, &tags)
1078				if err != nil {
1079					return err
1080				}
1081				agfrs.Tags = tags
1082			}
1083		}
1084	}
1085
1086	return nil
1087}
1088
1089// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
1090type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
1091	// ProvisioningState - READ-ONLY; The provisioning state of the web application firewall rule set. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1092	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1093	// RuleSetType - The type of the web application firewall rule set.
1094	RuleSetType *string `json:"ruleSetType,omitempty"`
1095	// RuleSetVersion - The version of the web application firewall rule set type.
1096	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
1097	// RuleGroups - The rule groups of the web application firewall rule set.
1098	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
1099}
1100
1101// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSetPropertiesFormat.
1102func (agfrspf ApplicationGatewayFirewallRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) {
1103	objectMap := make(map[string]interface{})
1104	if agfrspf.RuleSetType != nil {
1105		objectMap["ruleSetType"] = agfrspf.RuleSetType
1106	}
1107	if agfrspf.RuleSetVersion != nil {
1108		objectMap["ruleSetVersion"] = agfrspf.RuleSetVersion
1109	}
1110	if agfrspf.RuleGroups != nil {
1111		objectMap["ruleGroups"] = agfrspf.RuleGroups
1112	}
1113	return json.Marshal(objectMap)
1114}
1115
1116// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
1117type ApplicationGatewayFrontendIPConfiguration struct {
1118	// ApplicationGatewayFrontendIPConfigurationPropertiesFormat - Properties of the application gateway frontend IP configuration.
1119	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1120	// Name - Name of the frontend IP configuration that is unique within an Application Gateway.
1121	Name *string `json:"name,omitempty"`
1122	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1123	Etag *string `json:"etag,omitempty"`
1124	// Type - READ-ONLY; Type of the resource.
1125	Type *string `json:"type,omitempty"`
1126	// ID - Resource ID.
1127	ID *string `json:"id,omitempty"`
1128}
1129
1130// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
1131func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
1132	objectMap := make(map[string]interface{})
1133	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
1134		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1135	}
1136	if agfic.Name != nil {
1137		objectMap["name"] = agfic.Name
1138	}
1139	if agfic.ID != nil {
1140		objectMap["id"] = agfic.ID
1141	}
1142	return json.Marshal(objectMap)
1143}
1144
1145// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
1146func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
1147	var m map[string]*json.RawMessage
1148	err := json.Unmarshal(body, &m)
1149	if err != nil {
1150		return err
1151	}
1152	for k, v := range m {
1153		switch k {
1154		case "properties":
1155			if v != nil {
1156				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1157				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
1158				if err != nil {
1159					return err
1160				}
1161				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
1162			}
1163		case "name":
1164			if v != nil {
1165				var name string
1166				err = json.Unmarshal(*v, &name)
1167				if err != nil {
1168					return err
1169				}
1170				agfic.Name = &name
1171			}
1172		case "etag":
1173			if v != nil {
1174				var etag string
1175				err = json.Unmarshal(*v, &etag)
1176				if err != nil {
1177					return err
1178				}
1179				agfic.Etag = &etag
1180			}
1181		case "type":
1182			if v != nil {
1183				var typeVar string
1184				err = json.Unmarshal(*v, &typeVar)
1185				if err != nil {
1186					return err
1187				}
1188				agfic.Type = &typeVar
1189			}
1190		case "id":
1191			if v != nil {
1192				var ID string
1193				err = json.Unmarshal(*v, &ID)
1194				if err != nil {
1195					return err
1196				}
1197				agfic.ID = &ID
1198			}
1199		}
1200	}
1201
1202	return nil
1203}
1204
1205// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
1206// application gateway.
1207type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
1208	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
1209	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
1210	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
1211	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
1212	// Subnet - Reference to the subnet resource.
1213	Subnet *SubResource `json:"subnet,omitempty"`
1214	// PublicIPAddress - Reference to the PublicIP resource.
1215	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
1216	// PrivateLinkConfiguration - Reference to the application gateway private link configuration.
1217	PrivateLinkConfiguration *SubResource `json:"privateLinkConfiguration,omitempty"`
1218	// ProvisioningState - READ-ONLY; The provisioning state of the frontend IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1219	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1220}
1221
1222// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfigurationPropertiesFormat.
1223func (agficpf ApplicationGatewayFrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
1224	objectMap := make(map[string]interface{})
1225	if agficpf.PrivateIPAddress != nil {
1226		objectMap["privateIPAddress"] = agficpf.PrivateIPAddress
1227	}
1228	if agficpf.PrivateIPAllocationMethod != "" {
1229		objectMap["privateIPAllocationMethod"] = agficpf.PrivateIPAllocationMethod
1230	}
1231	if agficpf.Subnet != nil {
1232		objectMap["subnet"] = agficpf.Subnet
1233	}
1234	if agficpf.PublicIPAddress != nil {
1235		objectMap["publicIPAddress"] = agficpf.PublicIPAddress
1236	}
1237	if agficpf.PrivateLinkConfiguration != nil {
1238		objectMap["privateLinkConfiguration"] = agficpf.PrivateLinkConfiguration
1239	}
1240	return json.Marshal(objectMap)
1241}
1242
1243// ApplicationGatewayFrontendPort frontend port of an application gateway.
1244type ApplicationGatewayFrontendPort struct {
1245	// ApplicationGatewayFrontendPortPropertiesFormat - Properties of the application gateway frontend port.
1246	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
1247	// Name - Name of the frontend port that is unique within an Application Gateway.
1248	Name *string `json:"name,omitempty"`
1249	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1250	Etag *string `json:"etag,omitempty"`
1251	// Type - READ-ONLY; Type of the resource.
1252	Type *string `json:"type,omitempty"`
1253	// ID - Resource ID.
1254	ID *string `json:"id,omitempty"`
1255}
1256
1257// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
1258func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
1259	objectMap := make(map[string]interface{})
1260	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
1261		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
1262	}
1263	if agfp.Name != nil {
1264		objectMap["name"] = agfp.Name
1265	}
1266	if agfp.ID != nil {
1267		objectMap["id"] = agfp.ID
1268	}
1269	return json.Marshal(objectMap)
1270}
1271
1272// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
1273func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
1274	var m map[string]*json.RawMessage
1275	err := json.Unmarshal(body, &m)
1276	if err != nil {
1277		return err
1278	}
1279	for k, v := range m {
1280		switch k {
1281		case "properties":
1282			if v != nil {
1283				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
1284				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
1285				if err != nil {
1286					return err
1287				}
1288				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
1289			}
1290		case "name":
1291			if v != nil {
1292				var name string
1293				err = json.Unmarshal(*v, &name)
1294				if err != nil {
1295					return err
1296				}
1297				agfp.Name = &name
1298			}
1299		case "etag":
1300			if v != nil {
1301				var etag string
1302				err = json.Unmarshal(*v, &etag)
1303				if err != nil {
1304					return err
1305				}
1306				agfp.Etag = &etag
1307			}
1308		case "type":
1309			if v != nil {
1310				var typeVar string
1311				err = json.Unmarshal(*v, &typeVar)
1312				if err != nil {
1313					return err
1314				}
1315				agfp.Type = &typeVar
1316			}
1317		case "id":
1318			if v != nil {
1319				var ID string
1320				err = json.Unmarshal(*v, &ID)
1321				if err != nil {
1322					return err
1323				}
1324				agfp.ID = &ID
1325			}
1326		}
1327	}
1328
1329	return nil
1330}
1331
1332// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1333type ApplicationGatewayFrontendPortPropertiesFormat struct {
1334	// Port - Frontend port.
1335	Port *int32 `json:"port,omitempty"`
1336	// ProvisioningState - READ-ONLY; The provisioning state of the frontend port resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1337	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1338}
1339
1340// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPortPropertiesFormat.
1341func (agfppf ApplicationGatewayFrontendPortPropertiesFormat) MarshalJSON() ([]byte, error) {
1342	objectMap := make(map[string]interface{})
1343	if agfppf.Port != nil {
1344		objectMap["port"] = agfppf.Port
1345	}
1346	return json.Marshal(objectMap)
1347}
1348
1349// ApplicationGatewayHeaderConfiguration header configuration of the Actions set in Application Gateway.
1350type ApplicationGatewayHeaderConfiguration struct {
1351	// HeaderName - Header name of the header configuration.
1352	HeaderName *string `json:"headerName,omitempty"`
1353	// HeaderValue - Header value of the header configuration.
1354	HeaderValue *string `json:"headerValue,omitempty"`
1355}
1356
1357// ApplicationGatewayHTTPListener http listener of an application gateway.
1358type ApplicationGatewayHTTPListener struct {
1359	// ApplicationGatewayHTTPListenerPropertiesFormat - Properties of the application gateway HTTP listener.
1360	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1361	// Name - Name of the HTTP listener that is unique within an Application Gateway.
1362	Name *string `json:"name,omitempty"`
1363	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1364	Etag *string `json:"etag,omitempty"`
1365	// Type - READ-ONLY; Type of the resource.
1366	Type *string `json:"type,omitempty"`
1367	// ID - Resource ID.
1368	ID *string `json:"id,omitempty"`
1369}
1370
1371// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
1372func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1373	objectMap := make(map[string]interface{})
1374	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1375		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1376	}
1377	if aghl.Name != nil {
1378		objectMap["name"] = aghl.Name
1379	}
1380	if aghl.ID != nil {
1381		objectMap["id"] = aghl.ID
1382	}
1383	return json.Marshal(objectMap)
1384}
1385
1386// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1387func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1388	var m map[string]*json.RawMessage
1389	err := json.Unmarshal(body, &m)
1390	if err != nil {
1391		return err
1392	}
1393	for k, v := range m {
1394		switch k {
1395		case "properties":
1396			if v != nil {
1397				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1398				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1399				if err != nil {
1400					return err
1401				}
1402				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1403			}
1404		case "name":
1405			if v != nil {
1406				var name string
1407				err = json.Unmarshal(*v, &name)
1408				if err != nil {
1409					return err
1410				}
1411				aghl.Name = &name
1412			}
1413		case "etag":
1414			if v != nil {
1415				var etag string
1416				err = json.Unmarshal(*v, &etag)
1417				if err != nil {
1418					return err
1419				}
1420				aghl.Etag = &etag
1421			}
1422		case "type":
1423			if v != nil {
1424				var typeVar string
1425				err = json.Unmarshal(*v, &typeVar)
1426				if err != nil {
1427					return err
1428				}
1429				aghl.Type = &typeVar
1430			}
1431		case "id":
1432			if v != nil {
1433				var ID string
1434				err = json.Unmarshal(*v, &ID)
1435				if err != nil {
1436					return err
1437				}
1438				aghl.ID = &ID
1439			}
1440		}
1441	}
1442
1443	return nil
1444}
1445
1446// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1447type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1448	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1449	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1450	// FrontendPort - Frontend port resource of an application gateway.
1451	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1452	// Protocol - Protocol of the HTTP listener. Possible values include: 'HTTP', 'HTTPS'
1453	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1454	// HostName - Host name of HTTP listener.
1455	HostName *string `json:"hostName,omitempty"`
1456	// SslCertificate - SSL certificate resource of an application gateway.
1457	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1458	// SslProfile - SSL profile resource of the application gateway.
1459	SslProfile *SubResource `json:"sslProfile,omitempty"`
1460	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1461	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1462	// ProvisioningState - READ-ONLY; The provisioning state of the HTTP listener resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1463	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1464	// CustomErrorConfigurations - Custom error configurations of the HTTP listener.
1465	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1466	// FirewallPolicy - Reference to the FirewallPolicy resource.
1467	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
1468	// HostNames - List of Host names for HTTP Listener that allows special wildcard characters as well.
1469	HostNames *[]string `json:"hostNames,omitempty"`
1470}
1471
1472// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListenerPropertiesFormat.
1473func (aghlpf ApplicationGatewayHTTPListenerPropertiesFormat) MarshalJSON() ([]byte, error) {
1474	objectMap := make(map[string]interface{})
1475	if aghlpf.FrontendIPConfiguration != nil {
1476		objectMap["frontendIPConfiguration"] = aghlpf.FrontendIPConfiguration
1477	}
1478	if aghlpf.FrontendPort != nil {
1479		objectMap["frontendPort"] = aghlpf.FrontendPort
1480	}
1481	if aghlpf.Protocol != "" {
1482		objectMap["protocol"] = aghlpf.Protocol
1483	}
1484	if aghlpf.HostName != nil {
1485		objectMap["hostName"] = aghlpf.HostName
1486	}
1487	if aghlpf.SslCertificate != nil {
1488		objectMap["sslCertificate"] = aghlpf.SslCertificate
1489	}
1490	if aghlpf.SslProfile != nil {
1491		objectMap["sslProfile"] = aghlpf.SslProfile
1492	}
1493	if aghlpf.RequireServerNameIndication != nil {
1494		objectMap["requireServerNameIndication"] = aghlpf.RequireServerNameIndication
1495	}
1496	if aghlpf.CustomErrorConfigurations != nil {
1497		objectMap["customErrorConfigurations"] = aghlpf.CustomErrorConfigurations
1498	}
1499	if aghlpf.FirewallPolicy != nil {
1500		objectMap["firewallPolicy"] = aghlpf.FirewallPolicy
1501	}
1502	if aghlpf.HostNames != nil {
1503		objectMap["hostNames"] = aghlpf.HostNames
1504	}
1505	return json.Marshal(objectMap)
1506}
1507
1508// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
1509// private IP configuration is allowed.
1510type ApplicationGatewayIPConfiguration struct {
1511	// ApplicationGatewayIPConfigurationPropertiesFormat - Properties of the application gateway IP configuration.
1512	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1513	// Name - Name of the IP configuration that is unique within an Application Gateway.
1514	Name *string `json:"name,omitempty"`
1515	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1516	Etag *string `json:"etag,omitempty"`
1517	// Type - READ-ONLY; Type of the resource.
1518	Type *string `json:"type,omitempty"`
1519	// ID - Resource ID.
1520	ID *string `json:"id,omitempty"`
1521}
1522
1523// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1524func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1525	objectMap := make(map[string]interface{})
1526	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1527		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1528	}
1529	if agic.Name != nil {
1530		objectMap["name"] = agic.Name
1531	}
1532	if agic.ID != nil {
1533		objectMap["id"] = agic.ID
1534	}
1535	return json.Marshal(objectMap)
1536}
1537
1538// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1539func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1540	var m map[string]*json.RawMessage
1541	err := json.Unmarshal(body, &m)
1542	if err != nil {
1543		return err
1544	}
1545	for k, v := range m {
1546		switch k {
1547		case "properties":
1548			if v != nil {
1549				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1550				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1551				if err != nil {
1552					return err
1553				}
1554				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1555			}
1556		case "name":
1557			if v != nil {
1558				var name string
1559				err = json.Unmarshal(*v, &name)
1560				if err != nil {
1561					return err
1562				}
1563				agic.Name = &name
1564			}
1565		case "etag":
1566			if v != nil {
1567				var etag string
1568				err = json.Unmarshal(*v, &etag)
1569				if err != nil {
1570					return err
1571				}
1572				agic.Etag = &etag
1573			}
1574		case "type":
1575			if v != nil {
1576				var typeVar string
1577				err = json.Unmarshal(*v, &typeVar)
1578				if err != nil {
1579					return err
1580				}
1581				agic.Type = &typeVar
1582			}
1583		case "id":
1584			if v != nil {
1585				var ID string
1586				err = json.Unmarshal(*v, &ID)
1587				if err != nil {
1588					return err
1589				}
1590				agic.ID = &ID
1591			}
1592		}
1593	}
1594
1595	return nil
1596}
1597
1598// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
1599// gateway.
1600type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1601	// Subnet - Reference to the subnet resource. A subnet from where application gateway gets its private address.
1602	Subnet *SubResource `json:"subnet,omitempty"`
1603	// ProvisioningState - READ-ONLY; The provisioning state of the application gateway IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1604	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1605}
1606
1607// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfigurationPropertiesFormat.
1608func (agicpf ApplicationGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
1609	objectMap := make(map[string]interface{})
1610	if agicpf.Subnet != nil {
1611		objectMap["subnet"] = agicpf.Subnet
1612	}
1613	return json.Marshal(objectMap)
1614}
1615
1616// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1617type ApplicationGatewayListResult struct {
1618	autorest.Response `json:"-"`
1619	// Value - List of an application gateways in a resource group.
1620	Value *[]ApplicationGateway `json:"value,omitempty"`
1621	// NextLink - URL to get the next set of results.
1622	NextLink *string `json:"nextLink,omitempty"`
1623}
1624
1625// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1626type ApplicationGatewayListResultIterator struct {
1627	i    int
1628	page ApplicationGatewayListResultPage
1629}
1630
1631// NextWithContext advances to the next value.  If there was an error making
1632// the request the iterator does not advance and the error is returned.
1633func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
1634	if tracing.IsEnabled() {
1635		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
1636		defer func() {
1637			sc := -1
1638			if iter.Response().Response.Response != nil {
1639				sc = iter.Response().Response.Response.StatusCode
1640			}
1641			tracing.EndSpan(ctx, sc, err)
1642		}()
1643	}
1644	iter.i++
1645	if iter.i < len(iter.page.Values()) {
1646		return nil
1647	}
1648	err = iter.page.NextWithContext(ctx)
1649	if err != nil {
1650		iter.i--
1651		return err
1652	}
1653	iter.i = 0
1654	return nil
1655}
1656
1657// Next advances to the next value.  If there was an error making
1658// the request the iterator does not advance and the error is returned.
1659// Deprecated: Use NextWithContext() instead.
1660func (iter *ApplicationGatewayListResultIterator) Next() error {
1661	return iter.NextWithContext(context.Background())
1662}
1663
1664// NotDone returns true if the enumeration should be started or is not yet complete.
1665func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1666	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1667}
1668
1669// Response returns the raw server response from the last page request.
1670func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1671	return iter.page.Response()
1672}
1673
1674// Value returns the current value or a zero-initialized value if the
1675// iterator has advanced beyond the end of the collection.
1676func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1677	if !iter.page.NotDone() {
1678		return ApplicationGateway{}
1679	}
1680	return iter.page.Values()[iter.i]
1681}
1682
1683// Creates a new instance of the ApplicationGatewayListResultIterator type.
1684func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
1685	return ApplicationGatewayListResultIterator{page: page}
1686}
1687
1688// IsEmpty returns true if the ListResult contains no values.
1689func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1690	return aglr.Value == nil || len(*aglr.Value) == 0
1691}
1692
1693// hasNextLink returns true if the NextLink is not empty.
1694func (aglr ApplicationGatewayListResult) hasNextLink() bool {
1695	return aglr.NextLink != nil && len(*aglr.NextLink) != 0
1696}
1697
1698// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1699// It returns nil if no more results exist.
1700func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
1701	if !aglr.hasNextLink() {
1702		return nil, nil
1703	}
1704	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1705		autorest.AsJSON(),
1706		autorest.AsGet(),
1707		autorest.WithBaseURL(to.String(aglr.NextLink)))
1708}
1709
1710// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1711type ApplicationGatewayListResultPage struct {
1712	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1713	aglr ApplicationGatewayListResult
1714}
1715
1716// NextWithContext advances to the next page of values.  If there was an error making
1717// the request the page does not advance and the error is returned.
1718func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
1719	if tracing.IsEnabled() {
1720		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
1721		defer func() {
1722			sc := -1
1723			if page.Response().Response.Response != nil {
1724				sc = page.Response().Response.Response.StatusCode
1725			}
1726			tracing.EndSpan(ctx, sc, err)
1727		}()
1728	}
1729	for {
1730		next, err := page.fn(ctx, page.aglr)
1731		if err != nil {
1732			return err
1733		}
1734		page.aglr = next
1735		if !next.hasNextLink() || !next.IsEmpty() {
1736			break
1737		}
1738	}
1739	return nil
1740}
1741
1742// Next advances to the next page of values.  If there was an error making
1743// the request the page does not advance and the error is returned.
1744// Deprecated: Use NextWithContext() instead.
1745func (page *ApplicationGatewayListResultPage) Next() error {
1746	return page.NextWithContext(context.Background())
1747}
1748
1749// NotDone returns true if the page enumeration should be started or is not yet complete.
1750func (page ApplicationGatewayListResultPage) NotDone() bool {
1751	return !page.aglr.IsEmpty()
1752}
1753
1754// Response returns the raw server response from the last page request.
1755func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1756	return page.aglr
1757}
1758
1759// Values returns the slice of values for the current page or nil if there are no values.
1760func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1761	if page.aglr.IsEmpty() {
1762		return nil
1763	}
1764	return *page.aglr.Value
1765}
1766
1767// Creates a new instance of the ApplicationGatewayListResultPage type.
1768func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
1769	return ApplicationGatewayListResultPage{
1770		fn:   getNextPage,
1771		aglr: cur,
1772	}
1773}
1774
1775// ApplicationGatewayOnDemandProbe details of on demand test probe request.
1776type ApplicationGatewayOnDemandProbe struct {
1777	// Protocol - The protocol used for the probe. Possible values include: 'HTTP', 'HTTPS'
1778	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1779	// Host - Host name to send the probe to.
1780	Host *string `json:"host,omitempty"`
1781	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>.
1782	Path *string `json:"path,omitempty"`
1783	// 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.
1784	Timeout *int32 `json:"timeout,omitempty"`
1785	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1786	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1787	// Match - Criterion for classifying a healthy probe response.
1788	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1789	// BackendAddressPool - Reference to backend pool of application gateway to which probe request will be sent.
1790	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1791	// BackendHTTPSettings - Reference to backend http setting of application gateway to be used for test probe.
1792	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1793}
1794
1795// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1796type ApplicationGatewayPathRule struct {
1797	// ApplicationGatewayPathRulePropertiesFormat - Properties of the application gateway path rule.
1798	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1799	// Name - Name of the path rule that is unique within an Application Gateway.
1800	Name *string `json:"name,omitempty"`
1801	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1802	Etag *string `json:"etag,omitempty"`
1803	// Type - READ-ONLY; Type of the resource.
1804	Type *string `json:"type,omitempty"`
1805	// ID - Resource ID.
1806	ID *string `json:"id,omitempty"`
1807}
1808
1809// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1810func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1811	objectMap := make(map[string]interface{})
1812	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1813		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1814	}
1815	if agpr.Name != nil {
1816		objectMap["name"] = agpr.Name
1817	}
1818	if agpr.ID != nil {
1819		objectMap["id"] = agpr.ID
1820	}
1821	return json.Marshal(objectMap)
1822}
1823
1824// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1825func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1826	var m map[string]*json.RawMessage
1827	err := json.Unmarshal(body, &m)
1828	if err != nil {
1829		return err
1830	}
1831	for k, v := range m {
1832		switch k {
1833		case "properties":
1834			if v != nil {
1835				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1836				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1837				if err != nil {
1838					return err
1839				}
1840				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1841			}
1842		case "name":
1843			if v != nil {
1844				var name string
1845				err = json.Unmarshal(*v, &name)
1846				if err != nil {
1847					return err
1848				}
1849				agpr.Name = &name
1850			}
1851		case "etag":
1852			if v != nil {
1853				var etag string
1854				err = json.Unmarshal(*v, &etag)
1855				if err != nil {
1856					return err
1857				}
1858				agpr.Etag = &etag
1859			}
1860		case "type":
1861			if v != nil {
1862				var typeVar string
1863				err = json.Unmarshal(*v, &typeVar)
1864				if err != nil {
1865					return err
1866				}
1867				agpr.Type = &typeVar
1868			}
1869		case "id":
1870			if v != nil {
1871				var ID string
1872				err = json.Unmarshal(*v, &ID)
1873				if err != nil {
1874					return err
1875				}
1876				agpr.ID = &ID
1877			}
1878		}
1879	}
1880
1881	return nil
1882}
1883
1884// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
1885type ApplicationGatewayPathRulePropertiesFormat struct {
1886	// Paths - Path rules of URL path map.
1887	Paths *[]string `json:"paths,omitempty"`
1888	// BackendAddressPool - Backend address pool resource of URL path map path rule.
1889	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1890	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
1891	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1892	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
1893	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
1894	// RewriteRuleSet - Rewrite rule set resource of URL path map path rule.
1895	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
1896	// ProvisioningState - READ-ONLY; The provisioning state of the path rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
1897	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1898	// FirewallPolicy - Reference to the FirewallPolicy resource.
1899	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
1900}
1901
1902// MarshalJSON is the custom marshaler for ApplicationGatewayPathRulePropertiesFormat.
1903func (agprpf ApplicationGatewayPathRulePropertiesFormat) MarshalJSON() ([]byte, error) {
1904	objectMap := make(map[string]interface{})
1905	if agprpf.Paths != nil {
1906		objectMap["paths"] = agprpf.Paths
1907	}
1908	if agprpf.BackendAddressPool != nil {
1909		objectMap["backendAddressPool"] = agprpf.BackendAddressPool
1910	}
1911	if agprpf.BackendHTTPSettings != nil {
1912		objectMap["backendHttpSettings"] = agprpf.BackendHTTPSettings
1913	}
1914	if agprpf.RedirectConfiguration != nil {
1915		objectMap["redirectConfiguration"] = agprpf.RedirectConfiguration
1916	}
1917	if agprpf.RewriteRuleSet != nil {
1918		objectMap["rewriteRuleSet"] = agprpf.RewriteRuleSet
1919	}
1920	if agprpf.FirewallPolicy != nil {
1921		objectMap["firewallPolicy"] = agprpf.FirewallPolicy
1922	}
1923	return json.Marshal(objectMap)
1924}
1925
1926// ApplicationGatewayPrivateEndpointConnection private Endpoint connection on an application gateway.
1927type ApplicationGatewayPrivateEndpointConnection struct {
1928	autorest.Response `json:"-"`
1929	// ApplicationGatewayPrivateEndpointConnectionProperties - Properties of the application gateway private endpoint connection.
1930	*ApplicationGatewayPrivateEndpointConnectionProperties `json:"properties,omitempty"`
1931	// Name - Name of the private endpoint connection on an application gateway.
1932	Name *string `json:"name,omitempty"`
1933	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
1934	Etag *string `json:"etag,omitempty"`
1935	// Type - READ-ONLY; Type of the resource.
1936	Type *string `json:"type,omitempty"`
1937	// ID - Resource ID.
1938	ID *string `json:"id,omitempty"`
1939}
1940
1941// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateEndpointConnection.
1942func (agpec ApplicationGatewayPrivateEndpointConnection) MarshalJSON() ([]byte, error) {
1943	objectMap := make(map[string]interface{})
1944	if agpec.ApplicationGatewayPrivateEndpointConnectionProperties != nil {
1945		objectMap["properties"] = agpec.ApplicationGatewayPrivateEndpointConnectionProperties
1946	}
1947	if agpec.Name != nil {
1948		objectMap["name"] = agpec.Name
1949	}
1950	if agpec.ID != nil {
1951		objectMap["id"] = agpec.ID
1952	}
1953	return json.Marshal(objectMap)
1954}
1955
1956// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPrivateEndpointConnection struct.
1957func (agpec *ApplicationGatewayPrivateEndpointConnection) UnmarshalJSON(body []byte) error {
1958	var m map[string]*json.RawMessage
1959	err := json.Unmarshal(body, &m)
1960	if err != nil {
1961		return err
1962	}
1963	for k, v := range m {
1964		switch k {
1965		case "properties":
1966			if v != nil {
1967				var applicationGatewayPrivateEndpointConnectionProperties ApplicationGatewayPrivateEndpointConnectionProperties
1968				err = json.Unmarshal(*v, &applicationGatewayPrivateEndpointConnectionProperties)
1969				if err != nil {
1970					return err
1971				}
1972				agpec.ApplicationGatewayPrivateEndpointConnectionProperties = &applicationGatewayPrivateEndpointConnectionProperties
1973			}
1974		case "name":
1975			if v != nil {
1976				var name string
1977				err = json.Unmarshal(*v, &name)
1978				if err != nil {
1979					return err
1980				}
1981				agpec.Name = &name
1982			}
1983		case "etag":
1984			if v != nil {
1985				var etag string
1986				err = json.Unmarshal(*v, &etag)
1987				if err != nil {
1988					return err
1989				}
1990				agpec.Etag = &etag
1991			}
1992		case "type":
1993			if v != nil {
1994				var typeVar string
1995				err = json.Unmarshal(*v, &typeVar)
1996				if err != nil {
1997					return err
1998				}
1999				agpec.Type = &typeVar
2000			}
2001		case "id":
2002			if v != nil {
2003				var ID string
2004				err = json.Unmarshal(*v, &ID)
2005				if err != nil {
2006					return err
2007				}
2008				agpec.ID = &ID
2009			}
2010		}
2011	}
2012
2013	return nil
2014}
2015
2016// ApplicationGatewayPrivateEndpointConnectionListResult response for
2017// ListApplicationGatewayPrivateEndpointConnection API service call. Gets all private endpoint connections
2018// for an application gateway.
2019type ApplicationGatewayPrivateEndpointConnectionListResult struct {
2020	autorest.Response `json:"-"`
2021	// Value - List of private endpoint connections on an application gateway.
2022	Value *[]ApplicationGatewayPrivateEndpointConnection `json:"value,omitempty"`
2023	// NextLink - URL to get the next set of results.
2024	NextLink *string `json:"nextLink,omitempty"`
2025}
2026
2027// ApplicationGatewayPrivateEndpointConnectionListResultIterator provides access to a complete listing of
2028// ApplicationGatewayPrivateEndpointConnection values.
2029type ApplicationGatewayPrivateEndpointConnectionListResultIterator struct {
2030	i    int
2031	page ApplicationGatewayPrivateEndpointConnectionListResultPage
2032}
2033
2034// NextWithContext advances to the next value.  If there was an error making
2035// the request the iterator does not advance and the error is returned.
2036func (iter *ApplicationGatewayPrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
2037	if tracing.IsEnabled() {
2038		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateEndpointConnectionListResultIterator.NextWithContext")
2039		defer func() {
2040			sc := -1
2041			if iter.Response().Response.Response != nil {
2042				sc = iter.Response().Response.Response.StatusCode
2043			}
2044			tracing.EndSpan(ctx, sc, err)
2045		}()
2046	}
2047	iter.i++
2048	if iter.i < len(iter.page.Values()) {
2049		return nil
2050	}
2051	err = iter.page.NextWithContext(ctx)
2052	if err != nil {
2053		iter.i--
2054		return err
2055	}
2056	iter.i = 0
2057	return nil
2058}
2059
2060// Next advances to the next value.  If there was an error making
2061// the request the iterator does not advance and the error is returned.
2062// Deprecated: Use NextWithContext() instead.
2063func (iter *ApplicationGatewayPrivateEndpointConnectionListResultIterator) Next() error {
2064	return iter.NextWithContext(context.Background())
2065}
2066
2067// NotDone returns true if the enumeration should be started or is not yet complete.
2068func (iter ApplicationGatewayPrivateEndpointConnectionListResultIterator) NotDone() bool {
2069	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2070}
2071
2072// Response returns the raw server response from the last page request.
2073func (iter ApplicationGatewayPrivateEndpointConnectionListResultIterator) Response() ApplicationGatewayPrivateEndpointConnectionListResult {
2074	return iter.page.Response()
2075}
2076
2077// Value returns the current value or a zero-initialized value if the
2078// iterator has advanced beyond the end of the collection.
2079func (iter ApplicationGatewayPrivateEndpointConnectionListResultIterator) Value() ApplicationGatewayPrivateEndpointConnection {
2080	if !iter.page.NotDone() {
2081		return ApplicationGatewayPrivateEndpointConnection{}
2082	}
2083	return iter.page.Values()[iter.i]
2084}
2085
2086// Creates a new instance of the ApplicationGatewayPrivateEndpointConnectionListResultIterator type.
2087func NewApplicationGatewayPrivateEndpointConnectionListResultIterator(page ApplicationGatewayPrivateEndpointConnectionListResultPage) ApplicationGatewayPrivateEndpointConnectionListResultIterator {
2088	return ApplicationGatewayPrivateEndpointConnectionListResultIterator{page: page}
2089}
2090
2091// IsEmpty returns true if the ListResult contains no values.
2092func (agpeclr ApplicationGatewayPrivateEndpointConnectionListResult) IsEmpty() bool {
2093	return agpeclr.Value == nil || len(*agpeclr.Value) == 0
2094}
2095
2096// hasNextLink returns true if the NextLink is not empty.
2097func (agpeclr ApplicationGatewayPrivateEndpointConnectionListResult) hasNextLink() bool {
2098	return agpeclr.NextLink != nil && len(*agpeclr.NextLink) != 0
2099}
2100
2101// applicationGatewayPrivateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results.
2102// It returns nil if no more results exist.
2103func (agpeclr ApplicationGatewayPrivateEndpointConnectionListResult) applicationGatewayPrivateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
2104	if !agpeclr.hasNextLink() {
2105		return nil, nil
2106	}
2107	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2108		autorest.AsJSON(),
2109		autorest.AsGet(),
2110		autorest.WithBaseURL(to.String(agpeclr.NextLink)))
2111}
2112
2113// ApplicationGatewayPrivateEndpointConnectionListResultPage contains a page of
2114// ApplicationGatewayPrivateEndpointConnection values.
2115type ApplicationGatewayPrivateEndpointConnectionListResultPage struct {
2116	fn      func(context.Context, ApplicationGatewayPrivateEndpointConnectionListResult) (ApplicationGatewayPrivateEndpointConnectionListResult, error)
2117	agpeclr ApplicationGatewayPrivateEndpointConnectionListResult
2118}
2119
2120// NextWithContext advances to the next page of values.  If there was an error making
2121// the request the page does not advance and the error is returned.
2122func (page *ApplicationGatewayPrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
2123	if tracing.IsEnabled() {
2124		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateEndpointConnectionListResultPage.NextWithContext")
2125		defer func() {
2126			sc := -1
2127			if page.Response().Response.Response != nil {
2128				sc = page.Response().Response.Response.StatusCode
2129			}
2130			tracing.EndSpan(ctx, sc, err)
2131		}()
2132	}
2133	for {
2134		next, err := page.fn(ctx, page.agpeclr)
2135		if err != nil {
2136			return err
2137		}
2138		page.agpeclr = next
2139		if !next.hasNextLink() || !next.IsEmpty() {
2140			break
2141		}
2142	}
2143	return nil
2144}
2145
2146// Next advances to the next page of values.  If there was an error making
2147// the request the page does not advance and the error is returned.
2148// Deprecated: Use NextWithContext() instead.
2149func (page *ApplicationGatewayPrivateEndpointConnectionListResultPage) Next() error {
2150	return page.NextWithContext(context.Background())
2151}
2152
2153// NotDone returns true if the page enumeration should be started or is not yet complete.
2154func (page ApplicationGatewayPrivateEndpointConnectionListResultPage) NotDone() bool {
2155	return !page.agpeclr.IsEmpty()
2156}
2157
2158// Response returns the raw server response from the last page request.
2159func (page ApplicationGatewayPrivateEndpointConnectionListResultPage) Response() ApplicationGatewayPrivateEndpointConnectionListResult {
2160	return page.agpeclr
2161}
2162
2163// Values returns the slice of values for the current page or nil if there are no values.
2164func (page ApplicationGatewayPrivateEndpointConnectionListResultPage) Values() []ApplicationGatewayPrivateEndpointConnection {
2165	if page.agpeclr.IsEmpty() {
2166		return nil
2167	}
2168	return *page.agpeclr.Value
2169}
2170
2171// Creates a new instance of the ApplicationGatewayPrivateEndpointConnectionListResultPage type.
2172func NewApplicationGatewayPrivateEndpointConnectionListResultPage(cur ApplicationGatewayPrivateEndpointConnectionListResult, getNextPage func(context.Context, ApplicationGatewayPrivateEndpointConnectionListResult) (ApplicationGatewayPrivateEndpointConnectionListResult, error)) ApplicationGatewayPrivateEndpointConnectionListResultPage {
2173	return ApplicationGatewayPrivateEndpointConnectionListResultPage{
2174		fn:      getNextPage,
2175		agpeclr: cur,
2176	}
2177}
2178
2179// ApplicationGatewayPrivateEndpointConnectionProperties properties of Private Link Resource of an
2180// application gateway.
2181type ApplicationGatewayPrivateEndpointConnectionProperties struct {
2182	// PrivateEndpoint - READ-ONLY; The resource of private end point.
2183	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
2184	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
2185	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
2186	// ProvisioningState - READ-ONLY; The provisioning state of the application gateway private endpoint connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2187	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2188	// LinkIdentifier - READ-ONLY; The consumer link id.
2189	LinkIdentifier *string `json:"linkIdentifier,omitempty"`
2190}
2191
2192// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateEndpointConnectionProperties.
2193func (agpecp ApplicationGatewayPrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) {
2194	objectMap := make(map[string]interface{})
2195	if agpecp.PrivateLinkServiceConnectionState != nil {
2196		objectMap["privateLinkServiceConnectionState"] = agpecp.PrivateLinkServiceConnectionState
2197	}
2198	return json.Marshal(objectMap)
2199}
2200
2201// ApplicationGatewayPrivateEndpointConnectionsDeleteFuture an abstraction for monitoring and retrieving
2202// the results of a long-running operation.
2203type ApplicationGatewayPrivateEndpointConnectionsDeleteFuture struct {
2204	azure.FutureAPI
2205	// Result returns the result of the asynchronous operation.
2206	// If the operation has not completed it will return an error.
2207	Result func(ApplicationGatewayPrivateEndpointConnectionsClient) (autorest.Response, error)
2208}
2209
2210// ApplicationGatewayPrivateEndpointConnectionsUpdateFuture an abstraction for monitoring and retrieving
2211// the results of a long-running operation.
2212type ApplicationGatewayPrivateEndpointConnectionsUpdateFuture struct {
2213	azure.FutureAPI
2214	// Result returns the result of the asynchronous operation.
2215	// If the operation has not completed it will return an error.
2216	Result func(ApplicationGatewayPrivateEndpointConnectionsClient) (ApplicationGatewayPrivateEndpointConnection, error)
2217}
2218
2219// ApplicationGatewayPrivateLinkConfiguration private Link Configuration on an application gateway.
2220type ApplicationGatewayPrivateLinkConfiguration struct {
2221	// ApplicationGatewayPrivateLinkConfigurationProperties - Properties of the application gateway private link configuration.
2222	*ApplicationGatewayPrivateLinkConfigurationProperties `json:"properties,omitempty"`
2223	// Name - Name of the private link configuration that is unique within an Application Gateway.
2224	Name *string `json:"name,omitempty"`
2225	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2226	Etag *string `json:"etag,omitempty"`
2227	// Type - READ-ONLY; Type of the resource.
2228	Type *string `json:"type,omitempty"`
2229	// ID - Resource ID.
2230	ID *string `json:"id,omitempty"`
2231}
2232
2233// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkConfiguration.
2234func (agplc ApplicationGatewayPrivateLinkConfiguration) MarshalJSON() ([]byte, error) {
2235	objectMap := make(map[string]interface{})
2236	if agplc.ApplicationGatewayPrivateLinkConfigurationProperties != nil {
2237		objectMap["properties"] = agplc.ApplicationGatewayPrivateLinkConfigurationProperties
2238	}
2239	if agplc.Name != nil {
2240		objectMap["name"] = agplc.Name
2241	}
2242	if agplc.ID != nil {
2243		objectMap["id"] = agplc.ID
2244	}
2245	return json.Marshal(objectMap)
2246}
2247
2248// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPrivateLinkConfiguration struct.
2249func (agplc *ApplicationGatewayPrivateLinkConfiguration) UnmarshalJSON(body []byte) error {
2250	var m map[string]*json.RawMessage
2251	err := json.Unmarshal(body, &m)
2252	if err != nil {
2253		return err
2254	}
2255	for k, v := range m {
2256		switch k {
2257		case "properties":
2258			if v != nil {
2259				var applicationGatewayPrivateLinkConfigurationProperties ApplicationGatewayPrivateLinkConfigurationProperties
2260				err = json.Unmarshal(*v, &applicationGatewayPrivateLinkConfigurationProperties)
2261				if err != nil {
2262					return err
2263				}
2264				agplc.ApplicationGatewayPrivateLinkConfigurationProperties = &applicationGatewayPrivateLinkConfigurationProperties
2265			}
2266		case "name":
2267			if v != nil {
2268				var name string
2269				err = json.Unmarshal(*v, &name)
2270				if err != nil {
2271					return err
2272				}
2273				agplc.Name = &name
2274			}
2275		case "etag":
2276			if v != nil {
2277				var etag string
2278				err = json.Unmarshal(*v, &etag)
2279				if err != nil {
2280					return err
2281				}
2282				agplc.Etag = &etag
2283			}
2284		case "type":
2285			if v != nil {
2286				var typeVar string
2287				err = json.Unmarshal(*v, &typeVar)
2288				if err != nil {
2289					return err
2290				}
2291				agplc.Type = &typeVar
2292			}
2293		case "id":
2294			if v != nil {
2295				var ID string
2296				err = json.Unmarshal(*v, &ID)
2297				if err != nil {
2298					return err
2299				}
2300				agplc.ID = &ID
2301			}
2302		}
2303	}
2304
2305	return nil
2306}
2307
2308// ApplicationGatewayPrivateLinkConfigurationProperties properties of private link configuration on an
2309// application gateway.
2310type ApplicationGatewayPrivateLinkConfigurationProperties struct {
2311	// IPConfigurations - An array of application gateway private link ip configurations.
2312	IPConfigurations *[]ApplicationGatewayPrivateLinkIPConfiguration `json:"ipConfigurations,omitempty"`
2313	// ProvisioningState - READ-ONLY; The provisioning state of the application gateway private link configuration. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2314	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2315}
2316
2317// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkConfigurationProperties.
2318func (agplcp ApplicationGatewayPrivateLinkConfigurationProperties) MarshalJSON() ([]byte, error) {
2319	objectMap := make(map[string]interface{})
2320	if agplcp.IPConfigurations != nil {
2321		objectMap["ipConfigurations"] = agplcp.IPConfigurations
2322	}
2323	return json.Marshal(objectMap)
2324}
2325
2326// ApplicationGatewayPrivateLinkIPConfiguration the application gateway private link ip configuration.
2327type ApplicationGatewayPrivateLinkIPConfiguration struct {
2328	// ApplicationGatewayPrivateLinkIPConfigurationProperties - Properties of an application gateway private link ip configuration.
2329	*ApplicationGatewayPrivateLinkIPConfigurationProperties `json:"properties,omitempty"`
2330	// Name - The name of application gateway private link ip configuration.
2331	Name *string `json:"name,omitempty"`
2332	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2333	Etag *string `json:"etag,omitempty"`
2334	// Type - READ-ONLY; The resource type.
2335	Type *string `json:"type,omitempty"`
2336	// ID - Resource ID.
2337	ID *string `json:"id,omitempty"`
2338}
2339
2340// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkIPConfiguration.
2341func (agplic ApplicationGatewayPrivateLinkIPConfiguration) MarshalJSON() ([]byte, error) {
2342	objectMap := make(map[string]interface{})
2343	if agplic.ApplicationGatewayPrivateLinkIPConfigurationProperties != nil {
2344		objectMap["properties"] = agplic.ApplicationGatewayPrivateLinkIPConfigurationProperties
2345	}
2346	if agplic.Name != nil {
2347		objectMap["name"] = agplic.Name
2348	}
2349	if agplic.ID != nil {
2350		objectMap["id"] = agplic.ID
2351	}
2352	return json.Marshal(objectMap)
2353}
2354
2355// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPrivateLinkIPConfiguration struct.
2356func (agplic *ApplicationGatewayPrivateLinkIPConfiguration) UnmarshalJSON(body []byte) error {
2357	var m map[string]*json.RawMessage
2358	err := json.Unmarshal(body, &m)
2359	if err != nil {
2360		return err
2361	}
2362	for k, v := range m {
2363		switch k {
2364		case "properties":
2365			if v != nil {
2366				var applicationGatewayPrivateLinkIPConfigurationProperties ApplicationGatewayPrivateLinkIPConfigurationProperties
2367				err = json.Unmarshal(*v, &applicationGatewayPrivateLinkIPConfigurationProperties)
2368				if err != nil {
2369					return err
2370				}
2371				agplic.ApplicationGatewayPrivateLinkIPConfigurationProperties = &applicationGatewayPrivateLinkIPConfigurationProperties
2372			}
2373		case "name":
2374			if v != nil {
2375				var name string
2376				err = json.Unmarshal(*v, &name)
2377				if err != nil {
2378					return err
2379				}
2380				agplic.Name = &name
2381			}
2382		case "etag":
2383			if v != nil {
2384				var etag string
2385				err = json.Unmarshal(*v, &etag)
2386				if err != nil {
2387					return err
2388				}
2389				agplic.Etag = &etag
2390			}
2391		case "type":
2392			if v != nil {
2393				var typeVar string
2394				err = json.Unmarshal(*v, &typeVar)
2395				if err != nil {
2396					return err
2397				}
2398				agplic.Type = &typeVar
2399			}
2400		case "id":
2401			if v != nil {
2402				var ID string
2403				err = json.Unmarshal(*v, &ID)
2404				if err != nil {
2405					return err
2406				}
2407				agplic.ID = &ID
2408			}
2409		}
2410	}
2411
2412	return nil
2413}
2414
2415// ApplicationGatewayPrivateLinkIPConfigurationProperties properties of an application gateway private link
2416// IP configuration.
2417type ApplicationGatewayPrivateLinkIPConfigurationProperties struct {
2418	// PrivateIPAddress - The private IP address of the IP configuration.
2419	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
2420	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
2421	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
2422	// Subnet - Reference to the subnet resource.
2423	Subnet *SubResource `json:"subnet,omitempty"`
2424	// Primary - Whether the ip configuration is primary or not.
2425	Primary *bool `json:"primary,omitempty"`
2426	// ProvisioningState - READ-ONLY; The provisioning state of the application gateway private link IP configuration. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2427	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2428}
2429
2430// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkIPConfigurationProperties.
2431func (agplicp ApplicationGatewayPrivateLinkIPConfigurationProperties) MarshalJSON() ([]byte, error) {
2432	objectMap := make(map[string]interface{})
2433	if agplicp.PrivateIPAddress != nil {
2434		objectMap["privateIPAddress"] = agplicp.PrivateIPAddress
2435	}
2436	if agplicp.PrivateIPAllocationMethod != "" {
2437		objectMap["privateIPAllocationMethod"] = agplicp.PrivateIPAllocationMethod
2438	}
2439	if agplicp.Subnet != nil {
2440		objectMap["subnet"] = agplicp.Subnet
2441	}
2442	if agplicp.Primary != nil {
2443		objectMap["primary"] = agplicp.Primary
2444	}
2445	return json.Marshal(objectMap)
2446}
2447
2448// ApplicationGatewayPrivateLinkResource privateLink Resource of an application gateway.
2449type ApplicationGatewayPrivateLinkResource struct {
2450	// ApplicationGatewayPrivateLinkResourceProperties - Properties of the application gateway private link resource.
2451	*ApplicationGatewayPrivateLinkResourceProperties `json:"properties,omitempty"`
2452	// Name - Name of the private link resource that is unique within an Application Gateway.
2453	Name *string `json:"name,omitempty"`
2454	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2455	Etag *string `json:"etag,omitempty"`
2456	// Type - READ-ONLY; Type of the resource.
2457	Type *string `json:"type,omitempty"`
2458	// ID - Resource ID.
2459	ID *string `json:"id,omitempty"`
2460}
2461
2462// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkResource.
2463func (agplr ApplicationGatewayPrivateLinkResource) MarshalJSON() ([]byte, error) {
2464	objectMap := make(map[string]interface{})
2465	if agplr.ApplicationGatewayPrivateLinkResourceProperties != nil {
2466		objectMap["properties"] = agplr.ApplicationGatewayPrivateLinkResourceProperties
2467	}
2468	if agplr.Name != nil {
2469		objectMap["name"] = agplr.Name
2470	}
2471	if agplr.ID != nil {
2472		objectMap["id"] = agplr.ID
2473	}
2474	return json.Marshal(objectMap)
2475}
2476
2477// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPrivateLinkResource struct.
2478func (agplr *ApplicationGatewayPrivateLinkResource) UnmarshalJSON(body []byte) error {
2479	var m map[string]*json.RawMessage
2480	err := json.Unmarshal(body, &m)
2481	if err != nil {
2482		return err
2483	}
2484	for k, v := range m {
2485		switch k {
2486		case "properties":
2487			if v != nil {
2488				var applicationGatewayPrivateLinkResourceProperties ApplicationGatewayPrivateLinkResourceProperties
2489				err = json.Unmarshal(*v, &applicationGatewayPrivateLinkResourceProperties)
2490				if err != nil {
2491					return err
2492				}
2493				agplr.ApplicationGatewayPrivateLinkResourceProperties = &applicationGatewayPrivateLinkResourceProperties
2494			}
2495		case "name":
2496			if v != nil {
2497				var name string
2498				err = json.Unmarshal(*v, &name)
2499				if err != nil {
2500					return err
2501				}
2502				agplr.Name = &name
2503			}
2504		case "etag":
2505			if v != nil {
2506				var etag string
2507				err = json.Unmarshal(*v, &etag)
2508				if err != nil {
2509					return err
2510				}
2511				agplr.Etag = &etag
2512			}
2513		case "type":
2514			if v != nil {
2515				var typeVar string
2516				err = json.Unmarshal(*v, &typeVar)
2517				if err != nil {
2518					return err
2519				}
2520				agplr.Type = &typeVar
2521			}
2522		case "id":
2523			if v != nil {
2524				var ID string
2525				err = json.Unmarshal(*v, &ID)
2526				if err != nil {
2527					return err
2528				}
2529				agplr.ID = &ID
2530			}
2531		}
2532	}
2533
2534	return nil
2535}
2536
2537// ApplicationGatewayPrivateLinkResourceListResult response for ListApplicationGatewayPrivateLinkResources
2538// API service call. Gets all private link resources for an application gateway.
2539type ApplicationGatewayPrivateLinkResourceListResult struct {
2540	autorest.Response `json:"-"`
2541	// Value - List of private link resources of an application gateway.
2542	Value *[]ApplicationGatewayPrivateLinkResource `json:"value,omitempty"`
2543	// NextLink - URL to get the next set of results.
2544	NextLink *string `json:"nextLink,omitempty"`
2545}
2546
2547// ApplicationGatewayPrivateLinkResourceListResultIterator provides access to a complete listing of
2548// ApplicationGatewayPrivateLinkResource values.
2549type ApplicationGatewayPrivateLinkResourceListResultIterator struct {
2550	i    int
2551	page ApplicationGatewayPrivateLinkResourceListResultPage
2552}
2553
2554// NextWithContext advances to the next value.  If there was an error making
2555// the request the iterator does not advance and the error is returned.
2556func (iter *ApplicationGatewayPrivateLinkResourceListResultIterator) NextWithContext(ctx context.Context) (err error) {
2557	if tracing.IsEnabled() {
2558		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateLinkResourceListResultIterator.NextWithContext")
2559		defer func() {
2560			sc := -1
2561			if iter.Response().Response.Response != nil {
2562				sc = iter.Response().Response.Response.StatusCode
2563			}
2564			tracing.EndSpan(ctx, sc, err)
2565		}()
2566	}
2567	iter.i++
2568	if iter.i < len(iter.page.Values()) {
2569		return nil
2570	}
2571	err = iter.page.NextWithContext(ctx)
2572	if err != nil {
2573		iter.i--
2574		return err
2575	}
2576	iter.i = 0
2577	return nil
2578}
2579
2580// Next advances to the next value.  If there was an error making
2581// the request the iterator does not advance and the error is returned.
2582// Deprecated: Use NextWithContext() instead.
2583func (iter *ApplicationGatewayPrivateLinkResourceListResultIterator) Next() error {
2584	return iter.NextWithContext(context.Background())
2585}
2586
2587// NotDone returns true if the enumeration should be started or is not yet complete.
2588func (iter ApplicationGatewayPrivateLinkResourceListResultIterator) NotDone() bool {
2589	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2590}
2591
2592// Response returns the raw server response from the last page request.
2593func (iter ApplicationGatewayPrivateLinkResourceListResultIterator) Response() ApplicationGatewayPrivateLinkResourceListResult {
2594	return iter.page.Response()
2595}
2596
2597// Value returns the current value or a zero-initialized value if the
2598// iterator has advanced beyond the end of the collection.
2599func (iter ApplicationGatewayPrivateLinkResourceListResultIterator) Value() ApplicationGatewayPrivateLinkResource {
2600	if !iter.page.NotDone() {
2601		return ApplicationGatewayPrivateLinkResource{}
2602	}
2603	return iter.page.Values()[iter.i]
2604}
2605
2606// Creates a new instance of the ApplicationGatewayPrivateLinkResourceListResultIterator type.
2607func NewApplicationGatewayPrivateLinkResourceListResultIterator(page ApplicationGatewayPrivateLinkResourceListResultPage) ApplicationGatewayPrivateLinkResourceListResultIterator {
2608	return ApplicationGatewayPrivateLinkResourceListResultIterator{page: page}
2609}
2610
2611// IsEmpty returns true if the ListResult contains no values.
2612func (agplrlr ApplicationGatewayPrivateLinkResourceListResult) IsEmpty() bool {
2613	return agplrlr.Value == nil || len(*agplrlr.Value) == 0
2614}
2615
2616// hasNextLink returns true if the NextLink is not empty.
2617func (agplrlr ApplicationGatewayPrivateLinkResourceListResult) hasNextLink() bool {
2618	return agplrlr.NextLink != nil && len(*agplrlr.NextLink) != 0
2619}
2620
2621// applicationGatewayPrivateLinkResourceListResultPreparer prepares a request to retrieve the next set of results.
2622// It returns nil if no more results exist.
2623func (agplrlr ApplicationGatewayPrivateLinkResourceListResult) applicationGatewayPrivateLinkResourceListResultPreparer(ctx context.Context) (*http.Request, error) {
2624	if !agplrlr.hasNextLink() {
2625		return nil, nil
2626	}
2627	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2628		autorest.AsJSON(),
2629		autorest.AsGet(),
2630		autorest.WithBaseURL(to.String(agplrlr.NextLink)))
2631}
2632
2633// ApplicationGatewayPrivateLinkResourceListResultPage contains a page of
2634// ApplicationGatewayPrivateLinkResource values.
2635type ApplicationGatewayPrivateLinkResourceListResultPage struct {
2636	fn      func(context.Context, ApplicationGatewayPrivateLinkResourceListResult) (ApplicationGatewayPrivateLinkResourceListResult, error)
2637	agplrlr ApplicationGatewayPrivateLinkResourceListResult
2638}
2639
2640// NextWithContext advances to the next page of values.  If there was an error making
2641// the request the page does not advance and the error is returned.
2642func (page *ApplicationGatewayPrivateLinkResourceListResultPage) NextWithContext(ctx context.Context) (err error) {
2643	if tracing.IsEnabled() {
2644		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayPrivateLinkResourceListResultPage.NextWithContext")
2645		defer func() {
2646			sc := -1
2647			if page.Response().Response.Response != nil {
2648				sc = page.Response().Response.Response.StatusCode
2649			}
2650			tracing.EndSpan(ctx, sc, err)
2651		}()
2652	}
2653	for {
2654		next, err := page.fn(ctx, page.agplrlr)
2655		if err != nil {
2656			return err
2657		}
2658		page.agplrlr = next
2659		if !next.hasNextLink() || !next.IsEmpty() {
2660			break
2661		}
2662	}
2663	return nil
2664}
2665
2666// Next advances to the next page of values.  If there was an error making
2667// the request the page does not advance and the error is returned.
2668// Deprecated: Use NextWithContext() instead.
2669func (page *ApplicationGatewayPrivateLinkResourceListResultPage) Next() error {
2670	return page.NextWithContext(context.Background())
2671}
2672
2673// NotDone returns true if the page enumeration should be started or is not yet complete.
2674func (page ApplicationGatewayPrivateLinkResourceListResultPage) NotDone() bool {
2675	return !page.agplrlr.IsEmpty()
2676}
2677
2678// Response returns the raw server response from the last page request.
2679func (page ApplicationGatewayPrivateLinkResourceListResultPage) Response() ApplicationGatewayPrivateLinkResourceListResult {
2680	return page.agplrlr
2681}
2682
2683// Values returns the slice of values for the current page or nil if there are no values.
2684func (page ApplicationGatewayPrivateLinkResourceListResultPage) Values() []ApplicationGatewayPrivateLinkResource {
2685	if page.agplrlr.IsEmpty() {
2686		return nil
2687	}
2688	return *page.agplrlr.Value
2689}
2690
2691// Creates a new instance of the ApplicationGatewayPrivateLinkResourceListResultPage type.
2692func NewApplicationGatewayPrivateLinkResourceListResultPage(cur ApplicationGatewayPrivateLinkResourceListResult, getNextPage func(context.Context, ApplicationGatewayPrivateLinkResourceListResult) (ApplicationGatewayPrivateLinkResourceListResult, error)) ApplicationGatewayPrivateLinkResourceListResultPage {
2693	return ApplicationGatewayPrivateLinkResourceListResultPage{
2694		fn:      getNextPage,
2695		agplrlr: cur,
2696	}
2697}
2698
2699// ApplicationGatewayPrivateLinkResourceProperties properties of a private link resource.
2700type ApplicationGatewayPrivateLinkResourceProperties struct {
2701	// GroupID - READ-ONLY; Group identifier of private link resource.
2702	GroupID *string `json:"groupId,omitempty"`
2703	// RequiredMembers - READ-ONLY; Required member names of private link resource.
2704	RequiredMembers *[]string `json:"requiredMembers,omitempty"`
2705	// RequiredZoneNames - Required DNS zone names of the the private link resource.
2706	RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
2707}
2708
2709// MarshalJSON is the custom marshaler for ApplicationGatewayPrivateLinkResourceProperties.
2710func (agplrp ApplicationGatewayPrivateLinkResourceProperties) MarshalJSON() ([]byte, error) {
2711	objectMap := make(map[string]interface{})
2712	if agplrp.RequiredZoneNames != nil {
2713		objectMap["requiredZoneNames"] = agplrp.RequiredZoneNames
2714	}
2715	return json.Marshal(objectMap)
2716}
2717
2718// ApplicationGatewayProbe probe of the application gateway.
2719type ApplicationGatewayProbe struct {
2720	// ApplicationGatewayProbePropertiesFormat - Properties of the application gateway probe.
2721	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
2722	// Name - Name of the probe that is unique within an Application Gateway.
2723	Name *string `json:"name,omitempty"`
2724	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2725	Etag *string `json:"etag,omitempty"`
2726	// Type - READ-ONLY; Type of the resource.
2727	Type *string `json:"type,omitempty"`
2728	// ID - Resource ID.
2729	ID *string `json:"id,omitempty"`
2730}
2731
2732// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
2733func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
2734	objectMap := make(map[string]interface{})
2735	if agp.ApplicationGatewayProbePropertiesFormat != nil {
2736		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
2737	}
2738	if agp.Name != nil {
2739		objectMap["name"] = agp.Name
2740	}
2741	if agp.ID != nil {
2742		objectMap["id"] = agp.ID
2743	}
2744	return json.Marshal(objectMap)
2745}
2746
2747// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
2748func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
2749	var m map[string]*json.RawMessage
2750	err := json.Unmarshal(body, &m)
2751	if err != nil {
2752		return err
2753	}
2754	for k, v := range m {
2755		switch k {
2756		case "properties":
2757			if v != nil {
2758				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
2759				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
2760				if err != nil {
2761					return err
2762				}
2763				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
2764			}
2765		case "name":
2766			if v != nil {
2767				var name string
2768				err = json.Unmarshal(*v, &name)
2769				if err != nil {
2770					return err
2771				}
2772				agp.Name = &name
2773			}
2774		case "etag":
2775			if v != nil {
2776				var etag string
2777				err = json.Unmarshal(*v, &etag)
2778				if err != nil {
2779					return err
2780				}
2781				agp.Etag = &etag
2782			}
2783		case "type":
2784			if v != nil {
2785				var typeVar string
2786				err = json.Unmarshal(*v, &typeVar)
2787				if err != nil {
2788					return err
2789				}
2790				agp.Type = &typeVar
2791			}
2792		case "id":
2793			if v != nil {
2794				var ID string
2795				err = json.Unmarshal(*v, &ID)
2796				if err != nil {
2797					return err
2798				}
2799				agp.ID = &ID
2800			}
2801		}
2802	}
2803
2804	return nil
2805}
2806
2807// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match.
2808type ApplicationGatewayProbeHealthResponseMatch struct {
2809	// Body - Body that must be contained in the health response. Default value is empty.
2810	Body *string `json:"body,omitempty"`
2811	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
2812	StatusCodes *[]string `json:"statusCodes,omitempty"`
2813}
2814
2815// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
2816type ApplicationGatewayProbePropertiesFormat struct {
2817	// Protocol - The protocol used for the probe. Possible values include: 'HTTP', 'HTTPS'
2818	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
2819	// Host - Host name to send the probe to.
2820	Host *string `json:"host,omitempty"`
2821	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>.
2822	Path *string `json:"path,omitempty"`
2823	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
2824	Interval *int32 `json:"interval,omitempty"`
2825	// 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.
2826	Timeout *int32 `json:"timeout,omitempty"`
2827	// 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.
2828	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
2829	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
2830	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
2831	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
2832	MinServers *int32 `json:"minServers,omitempty"`
2833	// Match - Criterion for classifying a healthy probe response.
2834	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
2835	// ProvisioningState - READ-ONLY; The provisioning state of the probe resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2836	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2837	// 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.
2838	Port *int32 `json:"port,omitempty"`
2839}
2840
2841// MarshalJSON is the custom marshaler for ApplicationGatewayProbePropertiesFormat.
2842func (agppf ApplicationGatewayProbePropertiesFormat) MarshalJSON() ([]byte, error) {
2843	objectMap := make(map[string]interface{})
2844	if agppf.Protocol != "" {
2845		objectMap["protocol"] = agppf.Protocol
2846	}
2847	if agppf.Host != nil {
2848		objectMap["host"] = agppf.Host
2849	}
2850	if agppf.Path != nil {
2851		objectMap["path"] = agppf.Path
2852	}
2853	if agppf.Interval != nil {
2854		objectMap["interval"] = agppf.Interval
2855	}
2856	if agppf.Timeout != nil {
2857		objectMap["timeout"] = agppf.Timeout
2858	}
2859	if agppf.UnhealthyThreshold != nil {
2860		objectMap["unhealthyThreshold"] = agppf.UnhealthyThreshold
2861	}
2862	if agppf.PickHostNameFromBackendHTTPSettings != nil {
2863		objectMap["pickHostNameFromBackendHttpSettings"] = agppf.PickHostNameFromBackendHTTPSettings
2864	}
2865	if agppf.MinServers != nil {
2866		objectMap["minServers"] = agppf.MinServers
2867	}
2868	if agppf.Match != nil {
2869		objectMap["match"] = agppf.Match
2870	}
2871	if agppf.Port != nil {
2872		objectMap["port"] = agppf.Port
2873	}
2874	return json.Marshal(objectMap)
2875}
2876
2877// ApplicationGatewayPropertiesFormat properties of the application gateway.
2878type ApplicationGatewayPropertiesFormat struct {
2879	// Sku - SKU of the application gateway resource.
2880	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
2881	// SslPolicy - SSL policy of the application gateway resource.
2882	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
2883	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
2884	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
2885	// 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).
2886	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
2887	// 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).
2888	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
2889	// 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).
2890	TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"`
2891	// TrustedClientCertificates - Trusted client certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
2892	TrustedClientCertificates *[]ApplicationGatewayTrustedClientCertificate `json:"trustedClientCertificates,omitempty"`
2893	// 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).
2894	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
2895	// 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).
2896	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
2897	// 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).
2898	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
2899	// Probes - Probes of the application gateway resource.
2900	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
2901	// 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).
2902	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
2903	// 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).
2904	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
2905	// 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).
2906	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
2907	// SslProfiles - SSL profiles of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
2908	SslProfiles *[]ApplicationGatewaySslProfile `json:"sslProfiles,omitempty"`
2909	// 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).
2910	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
2911	// RequestRoutingRules - Request routing rules of the application gateway resource.
2912	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
2913	// RewriteRuleSets - Rewrite rules for the application gateway resource.
2914	RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"`
2915	// 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).
2916	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
2917	// WebApplicationFirewallConfiguration - Web application firewall configuration.
2918	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
2919	// FirewallPolicy - Reference to the FirewallPolicy resource.
2920	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
2921	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
2922	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
2923	// EnableFips - Whether FIPS is enabled on the application gateway resource.
2924	EnableFips *bool `json:"enableFips,omitempty"`
2925	// AutoscaleConfiguration - Autoscale Configuration.
2926	AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"`
2927	// PrivateLinkConfigurations - PrivateLink configurations on application gateway.
2928	PrivateLinkConfigurations *[]ApplicationGatewayPrivateLinkConfiguration `json:"privateLinkConfigurations,omitempty"`
2929	// PrivateEndpointConnections - READ-ONLY; Private Endpoint connections on application gateway.
2930	PrivateEndpointConnections *[]ApplicationGatewayPrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
2931	// ResourceGUID - READ-ONLY; The resource GUID property of the application gateway resource.
2932	ResourceGUID *string `json:"resourceGuid,omitempty"`
2933	// ProvisioningState - READ-ONLY; The provisioning state of the application gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
2934	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2935	// CustomErrorConfigurations - Custom error configurations of the application gateway resource.
2936	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
2937	// ForceFirewallPolicyAssociation - If true, associates a firewall policy with an application gateway regardless whether the policy differs from the WAF Config.
2938	ForceFirewallPolicyAssociation *bool `json:"forceFirewallPolicyAssociation,omitempty"`
2939}
2940
2941// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
2942func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
2943	objectMap := make(map[string]interface{})
2944	if agpf.Sku != nil {
2945		objectMap["sku"] = agpf.Sku
2946	}
2947	if agpf.SslPolicy != nil {
2948		objectMap["sslPolicy"] = agpf.SslPolicy
2949	}
2950	if agpf.GatewayIPConfigurations != nil {
2951		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
2952	}
2953	if agpf.AuthenticationCertificates != nil {
2954		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
2955	}
2956	if agpf.TrustedRootCertificates != nil {
2957		objectMap["trustedRootCertificates"] = agpf.TrustedRootCertificates
2958	}
2959	if agpf.TrustedClientCertificates != nil {
2960		objectMap["trustedClientCertificates"] = agpf.TrustedClientCertificates
2961	}
2962	if agpf.SslCertificates != nil {
2963		objectMap["sslCertificates"] = agpf.SslCertificates
2964	}
2965	if agpf.FrontendIPConfigurations != nil {
2966		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
2967	}
2968	if agpf.FrontendPorts != nil {
2969		objectMap["frontendPorts"] = agpf.FrontendPorts
2970	}
2971	if agpf.Probes != nil {
2972		objectMap["probes"] = agpf.Probes
2973	}
2974	if agpf.BackendAddressPools != nil {
2975		objectMap["backendAddressPools"] = agpf.BackendAddressPools
2976	}
2977	if agpf.BackendHTTPSettingsCollection != nil {
2978		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
2979	}
2980	if agpf.HTTPListeners != nil {
2981		objectMap["httpListeners"] = agpf.HTTPListeners
2982	}
2983	if agpf.SslProfiles != nil {
2984		objectMap["sslProfiles"] = agpf.SslProfiles
2985	}
2986	if agpf.URLPathMaps != nil {
2987		objectMap["urlPathMaps"] = agpf.URLPathMaps
2988	}
2989	if agpf.RequestRoutingRules != nil {
2990		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
2991	}
2992	if agpf.RewriteRuleSets != nil {
2993		objectMap["rewriteRuleSets"] = agpf.RewriteRuleSets
2994	}
2995	if agpf.RedirectConfigurations != nil {
2996		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
2997	}
2998	if agpf.WebApplicationFirewallConfiguration != nil {
2999		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
3000	}
3001	if agpf.FirewallPolicy != nil {
3002		objectMap["firewallPolicy"] = agpf.FirewallPolicy
3003	}
3004	if agpf.EnableHTTP2 != nil {
3005		objectMap["enableHttp2"] = agpf.EnableHTTP2
3006	}
3007	if agpf.EnableFips != nil {
3008		objectMap["enableFips"] = agpf.EnableFips
3009	}
3010	if agpf.AutoscaleConfiguration != nil {
3011		objectMap["autoscaleConfiguration"] = agpf.AutoscaleConfiguration
3012	}
3013	if agpf.PrivateLinkConfigurations != nil {
3014		objectMap["privateLinkConfigurations"] = agpf.PrivateLinkConfigurations
3015	}
3016	if agpf.CustomErrorConfigurations != nil {
3017		objectMap["customErrorConfigurations"] = agpf.CustomErrorConfigurations
3018	}
3019	if agpf.ForceFirewallPolicyAssociation != nil {
3020		objectMap["forceFirewallPolicyAssociation"] = agpf.ForceFirewallPolicyAssociation
3021	}
3022	return json.Marshal(objectMap)
3023}
3024
3025// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
3026type ApplicationGatewayRedirectConfiguration struct {
3027	// ApplicationGatewayRedirectConfigurationPropertiesFormat - Properties of the application gateway redirect configuration.
3028	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
3029	// Name - Name of the redirect configuration that is unique within an Application Gateway.
3030	Name *string `json:"name,omitempty"`
3031	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3032	Etag *string `json:"etag,omitempty"`
3033	// Type - READ-ONLY; Type of the resource.
3034	Type *string `json:"type,omitempty"`
3035	// ID - Resource ID.
3036	ID *string `json:"id,omitempty"`
3037}
3038
3039// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
3040func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
3041	objectMap := make(map[string]interface{})
3042	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
3043		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
3044	}
3045	if agrc.Name != nil {
3046		objectMap["name"] = agrc.Name
3047	}
3048	if agrc.ID != nil {
3049		objectMap["id"] = agrc.ID
3050	}
3051	return json.Marshal(objectMap)
3052}
3053
3054// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
3055func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
3056	var m map[string]*json.RawMessage
3057	err := json.Unmarshal(body, &m)
3058	if err != nil {
3059		return err
3060	}
3061	for k, v := range m {
3062		switch k {
3063		case "properties":
3064			if v != nil {
3065				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
3066				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
3067				if err != nil {
3068					return err
3069				}
3070				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
3071			}
3072		case "name":
3073			if v != nil {
3074				var name string
3075				err = json.Unmarshal(*v, &name)
3076				if err != nil {
3077					return err
3078				}
3079				agrc.Name = &name
3080			}
3081		case "etag":
3082			if v != nil {
3083				var etag string
3084				err = json.Unmarshal(*v, &etag)
3085				if err != nil {
3086					return err
3087				}
3088				agrc.Etag = &etag
3089			}
3090		case "type":
3091			if v != nil {
3092				var typeVar string
3093				err = json.Unmarshal(*v, &typeVar)
3094				if err != nil {
3095					return err
3096				}
3097				agrc.Type = &typeVar
3098			}
3099		case "id":
3100			if v != nil {
3101				var ID string
3102				err = json.Unmarshal(*v, &ID)
3103				if err != nil {
3104					return err
3105				}
3106				agrc.ID = &ID
3107			}
3108		}
3109	}
3110
3111	return nil
3112}
3113
3114// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
3115// application gateway.
3116type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
3117	// RedirectType - HTTP redirection type. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
3118	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
3119	// TargetListener - Reference to a listener to redirect the request to.
3120	TargetListener *SubResource `json:"targetListener,omitempty"`
3121	// TargetURL - Url to redirect the request to.
3122	TargetURL *string `json:"targetUrl,omitempty"`
3123	// IncludePath - Include path in the redirected url.
3124	IncludePath *bool `json:"includePath,omitempty"`
3125	// IncludeQueryString - Include query string in the redirected url.
3126	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
3127	// RequestRoutingRules - Request routing specifying redirect configuration.
3128	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
3129	// URLPathMaps - Url path maps specifying default redirect configuration.
3130	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
3131	// PathRules - Path rules specifying redirect configuration.
3132	PathRules *[]SubResource `json:"pathRules,omitempty"`
3133}
3134
3135// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
3136type ApplicationGatewayRequestRoutingRule struct {
3137	// ApplicationGatewayRequestRoutingRulePropertiesFormat - Properties of the application gateway request routing rule.
3138	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
3139	// Name - Name of the request routing rule that is unique within an Application Gateway.
3140	Name *string `json:"name,omitempty"`
3141	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3142	Etag *string `json:"etag,omitempty"`
3143	// Type - READ-ONLY; Type of the resource.
3144	Type *string `json:"type,omitempty"`
3145	// ID - Resource ID.
3146	ID *string `json:"id,omitempty"`
3147}
3148
3149// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
3150func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
3151	objectMap := make(map[string]interface{})
3152	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
3153		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
3154	}
3155	if agrrr.Name != nil {
3156		objectMap["name"] = agrrr.Name
3157	}
3158	if agrrr.ID != nil {
3159		objectMap["id"] = agrrr.ID
3160	}
3161	return json.Marshal(objectMap)
3162}
3163
3164// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
3165func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
3166	var m map[string]*json.RawMessage
3167	err := json.Unmarshal(body, &m)
3168	if err != nil {
3169		return err
3170	}
3171	for k, v := range m {
3172		switch k {
3173		case "properties":
3174			if v != nil {
3175				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
3176				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
3177				if err != nil {
3178					return err
3179				}
3180				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
3181			}
3182		case "name":
3183			if v != nil {
3184				var name string
3185				err = json.Unmarshal(*v, &name)
3186				if err != nil {
3187					return err
3188				}
3189				agrrr.Name = &name
3190			}
3191		case "etag":
3192			if v != nil {
3193				var etag string
3194				err = json.Unmarshal(*v, &etag)
3195				if err != nil {
3196					return err
3197				}
3198				agrrr.Etag = &etag
3199			}
3200		case "type":
3201			if v != nil {
3202				var typeVar string
3203				err = json.Unmarshal(*v, &typeVar)
3204				if err != nil {
3205					return err
3206				}
3207				agrrr.Type = &typeVar
3208			}
3209		case "id":
3210			if v != nil {
3211				var ID string
3212				err = json.Unmarshal(*v, &ID)
3213				if err != nil {
3214					return err
3215				}
3216				agrrr.ID = &ID
3217			}
3218		}
3219	}
3220
3221	return nil
3222}
3223
3224// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
3225// application gateway.
3226type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
3227	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
3228	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
3229	// Priority - Priority of the request routing rule.
3230	Priority *int32 `json:"priority,omitempty"`
3231	// BackendAddressPool - Backend address pool resource of the application gateway.
3232	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
3233	// BackendHTTPSettings - Backend http settings resource of the application gateway.
3234	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
3235	// HTTPListener - Http listener resource of the application gateway.
3236	HTTPListener *SubResource `json:"httpListener,omitempty"`
3237	// URLPathMap - URL path map resource of the application gateway.
3238	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
3239	// RewriteRuleSet - Rewrite Rule Set resource in Basic rule of the application gateway.
3240	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
3241	// RedirectConfiguration - Redirect configuration resource of the application gateway.
3242	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
3243	// ProvisioningState - READ-ONLY; The provisioning state of the request routing rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3244	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3245}
3246
3247// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRulePropertiesFormat.
3248func (agrrrpf ApplicationGatewayRequestRoutingRulePropertiesFormat) MarshalJSON() ([]byte, error) {
3249	objectMap := make(map[string]interface{})
3250	if agrrrpf.RuleType != "" {
3251		objectMap["ruleType"] = agrrrpf.RuleType
3252	}
3253	if agrrrpf.Priority != nil {
3254		objectMap["priority"] = agrrrpf.Priority
3255	}
3256	if agrrrpf.BackendAddressPool != nil {
3257		objectMap["backendAddressPool"] = agrrrpf.BackendAddressPool
3258	}
3259	if agrrrpf.BackendHTTPSettings != nil {
3260		objectMap["backendHttpSettings"] = agrrrpf.BackendHTTPSettings
3261	}
3262	if agrrrpf.HTTPListener != nil {
3263		objectMap["httpListener"] = agrrrpf.HTTPListener
3264	}
3265	if agrrrpf.URLPathMap != nil {
3266		objectMap["urlPathMap"] = agrrrpf.URLPathMap
3267	}
3268	if agrrrpf.RewriteRuleSet != nil {
3269		objectMap["rewriteRuleSet"] = agrrrpf.RewriteRuleSet
3270	}
3271	if agrrrpf.RedirectConfiguration != nil {
3272		objectMap["redirectConfiguration"] = agrrrpf.RedirectConfiguration
3273	}
3274	return json.Marshal(objectMap)
3275}
3276
3277// ApplicationGatewayRewriteRule rewrite rule of an application gateway.
3278type ApplicationGatewayRewriteRule struct {
3279	// Name - Name of the rewrite rule that is unique within an Application Gateway.
3280	Name *string `json:"name,omitempty"`
3281	// RuleSequence - Rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet.
3282	RuleSequence *int32 `json:"ruleSequence,omitempty"`
3283	// Conditions - Conditions based on which the action set execution will be evaluated.
3284	Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"`
3285	// ActionSet - Set of actions to be done as part of the rewrite Rule.
3286	ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"`
3287}
3288
3289// ApplicationGatewayRewriteRuleActionSet set of actions in the Rewrite Rule in Application Gateway.
3290type ApplicationGatewayRewriteRuleActionSet struct {
3291	// RequestHeaderConfigurations - Request Header Actions in the Action Set.
3292	RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"`
3293	// ResponseHeaderConfigurations - Response Header Actions in the Action Set.
3294	ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"`
3295	// URLConfiguration - Url Configuration Action in the Action Set.
3296	URLConfiguration *ApplicationGatewayURLConfiguration `json:"urlConfiguration,omitempty"`
3297}
3298
3299// ApplicationGatewayRewriteRuleCondition set of conditions in the Rewrite Rule in Application Gateway.
3300type ApplicationGatewayRewriteRuleCondition struct {
3301	// Variable - The condition parameter of the RewriteRuleCondition.
3302	Variable *string `json:"variable,omitempty"`
3303	// Pattern - The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition.
3304	Pattern *string `json:"pattern,omitempty"`
3305	// IgnoreCase - Setting this parameter to truth value with force the pattern to do a case in-sensitive comparison.
3306	IgnoreCase *bool `json:"ignoreCase,omitempty"`
3307	// Negate - Setting this value as truth will force to check the negation of the condition given by the user.
3308	Negate *bool `json:"negate,omitempty"`
3309}
3310
3311// ApplicationGatewayRewriteRuleSet rewrite rule set of an application gateway.
3312type ApplicationGatewayRewriteRuleSet struct {
3313	// ApplicationGatewayRewriteRuleSetPropertiesFormat - Properties of the application gateway rewrite rule set.
3314	*ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"`
3315	// Name - Name of the rewrite rule set that is unique within an Application Gateway.
3316	Name *string `json:"name,omitempty"`
3317	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3318	Etag *string `json:"etag,omitempty"`
3319	// ID - Resource ID.
3320	ID *string `json:"id,omitempty"`
3321}
3322
3323// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSet.
3324func (agrrs ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) {
3325	objectMap := make(map[string]interface{})
3326	if agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat != nil {
3327		objectMap["properties"] = agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat
3328	}
3329	if agrrs.Name != nil {
3330		objectMap["name"] = agrrs.Name
3331	}
3332	if agrrs.ID != nil {
3333		objectMap["id"] = agrrs.ID
3334	}
3335	return json.Marshal(objectMap)
3336}
3337
3338// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRewriteRuleSet struct.
3339func (agrrs *ApplicationGatewayRewriteRuleSet) UnmarshalJSON(body []byte) error {
3340	var m map[string]*json.RawMessage
3341	err := json.Unmarshal(body, &m)
3342	if err != nil {
3343		return err
3344	}
3345	for k, v := range m {
3346		switch k {
3347		case "properties":
3348			if v != nil {
3349				var applicationGatewayRewriteRuleSetPropertiesFormat ApplicationGatewayRewriteRuleSetPropertiesFormat
3350				err = json.Unmarshal(*v, &applicationGatewayRewriteRuleSetPropertiesFormat)
3351				if err != nil {
3352					return err
3353				}
3354				agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat = &applicationGatewayRewriteRuleSetPropertiesFormat
3355			}
3356		case "name":
3357			if v != nil {
3358				var name string
3359				err = json.Unmarshal(*v, &name)
3360				if err != nil {
3361					return err
3362				}
3363				agrrs.Name = &name
3364			}
3365		case "etag":
3366			if v != nil {
3367				var etag string
3368				err = json.Unmarshal(*v, &etag)
3369				if err != nil {
3370					return err
3371				}
3372				agrrs.Etag = &etag
3373			}
3374		case "id":
3375			if v != nil {
3376				var ID string
3377				err = json.Unmarshal(*v, &ID)
3378				if err != nil {
3379					return err
3380				}
3381				agrrs.ID = &ID
3382			}
3383		}
3384	}
3385
3386	return nil
3387}
3388
3389// ApplicationGatewayRewriteRuleSetPropertiesFormat properties of rewrite rule set of the application
3390// gateway.
3391type ApplicationGatewayRewriteRuleSetPropertiesFormat struct {
3392	// RewriteRules - Rewrite rules in the rewrite rule set.
3393	RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"`
3394	// ProvisioningState - READ-ONLY; The provisioning state of the rewrite rule set resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3395	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3396}
3397
3398// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSetPropertiesFormat.
3399func (agrrspf ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) {
3400	objectMap := make(map[string]interface{})
3401	if agrrspf.RewriteRules != nil {
3402		objectMap["rewriteRules"] = agrrspf.RewriteRules
3403	}
3404	return json.Marshal(objectMap)
3405}
3406
3407// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
3408// long-running operation.
3409type ApplicationGatewaysBackendHealthFuture struct {
3410	azure.FutureAPI
3411	// Result returns the result of the asynchronous operation.
3412	// If the operation has not completed it will return an error.
3413	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
3414}
3415
3416// ApplicationGatewaysBackendHealthOnDemandFuture an abstraction for monitoring and retrieving the results
3417// of a long-running operation.
3418type ApplicationGatewaysBackendHealthOnDemandFuture struct {
3419	azure.FutureAPI
3420	// Result returns the result of the asynchronous operation.
3421	// If the operation has not completed it will return an error.
3422	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealthOnDemand, error)
3423}
3424
3425// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
3426// long-running operation.
3427type ApplicationGatewaysCreateOrUpdateFuture struct {
3428	azure.FutureAPI
3429	// Result returns the result of the asynchronous operation.
3430	// If the operation has not completed it will return an error.
3431	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
3432}
3433
3434// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
3435// long-running operation.
3436type ApplicationGatewaysDeleteFuture struct {
3437	azure.FutureAPI
3438	// Result returns the result of the asynchronous operation.
3439	// If the operation has not completed it will return an error.
3440	Result func(ApplicationGatewaysClient) (autorest.Response, error)
3441}
3442
3443// ApplicationGatewaySku SKU of an application gateway.
3444type ApplicationGatewaySku struct {
3445	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
3446	Name ApplicationGatewaySkuName `json:"name,omitempty"`
3447	// Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
3448	Tier ApplicationGatewayTier `json:"tier,omitempty"`
3449	// Capacity - Capacity (instance count) of an application gateway.
3450	Capacity *int32 `json:"capacity,omitempty"`
3451}
3452
3453// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
3454type ApplicationGatewaySslCertificate struct {
3455	// ApplicationGatewaySslCertificatePropertiesFormat - Properties of the application gateway SSL certificate.
3456	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
3457	// Name - Name of the SSL certificate that is unique within an Application Gateway.
3458	Name *string `json:"name,omitempty"`
3459	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3460	Etag *string `json:"etag,omitempty"`
3461	// Type - READ-ONLY; Type of the resource.
3462	Type *string `json:"type,omitempty"`
3463	// ID - Resource ID.
3464	ID *string `json:"id,omitempty"`
3465}
3466
3467// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
3468func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
3469	objectMap := make(map[string]interface{})
3470	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
3471		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
3472	}
3473	if agsc.Name != nil {
3474		objectMap["name"] = agsc.Name
3475	}
3476	if agsc.ID != nil {
3477		objectMap["id"] = agsc.ID
3478	}
3479	return json.Marshal(objectMap)
3480}
3481
3482// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
3483func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
3484	var m map[string]*json.RawMessage
3485	err := json.Unmarshal(body, &m)
3486	if err != nil {
3487		return err
3488	}
3489	for k, v := range m {
3490		switch k {
3491		case "properties":
3492			if v != nil {
3493				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
3494				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
3495				if err != nil {
3496					return err
3497				}
3498				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
3499			}
3500		case "name":
3501			if v != nil {
3502				var name string
3503				err = json.Unmarshal(*v, &name)
3504				if err != nil {
3505					return err
3506				}
3507				agsc.Name = &name
3508			}
3509		case "etag":
3510			if v != nil {
3511				var etag string
3512				err = json.Unmarshal(*v, &etag)
3513				if err != nil {
3514					return err
3515				}
3516				agsc.Etag = &etag
3517			}
3518		case "type":
3519			if v != nil {
3520				var typeVar string
3521				err = json.Unmarshal(*v, &typeVar)
3522				if err != nil {
3523					return err
3524				}
3525				agsc.Type = &typeVar
3526			}
3527		case "id":
3528			if v != nil {
3529				var ID string
3530				err = json.Unmarshal(*v, &ID)
3531				if err != nil {
3532					return err
3533				}
3534				agsc.ID = &ID
3535			}
3536		}
3537	}
3538
3539	return nil
3540}
3541
3542// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
3543// gateway.
3544type ApplicationGatewaySslCertificatePropertiesFormat struct {
3545	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
3546	Data *string `json:"data,omitempty"`
3547	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
3548	Password *string `json:"password,omitempty"`
3549	// PublicCertData - READ-ONLY; Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
3550	PublicCertData *string `json:"publicCertData,omitempty"`
3551	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
3552	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
3553	// ProvisioningState - READ-ONLY; The provisioning state of the SSL certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3554	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3555}
3556
3557// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificatePropertiesFormat.
3558func (agscpf ApplicationGatewaySslCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
3559	objectMap := make(map[string]interface{})
3560	if agscpf.Data != nil {
3561		objectMap["data"] = agscpf.Data
3562	}
3563	if agscpf.Password != nil {
3564		objectMap["password"] = agscpf.Password
3565	}
3566	if agscpf.KeyVaultSecretID != nil {
3567		objectMap["keyVaultSecretId"] = agscpf.KeyVaultSecretID
3568	}
3569	return json.Marshal(objectMap)
3570}
3571
3572// ApplicationGatewaySslPolicy application Gateway Ssl policy.
3573type ApplicationGatewaySslPolicy struct {
3574	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
3575	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
3576	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
3577	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
3578	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
3579	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
3580	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
3581	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
3582	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
3583	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
3584}
3585
3586// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy.
3587type ApplicationGatewaySslPredefinedPolicy struct {
3588	autorest.Response `json:"-"`
3589	// Name - Name of the Ssl predefined policy.
3590	Name *string `json:"name,omitempty"`
3591	// ApplicationGatewaySslPredefinedPolicyPropertiesFormat - Properties of the application gateway SSL predefined policy.
3592	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
3593	// ID - Resource ID.
3594	ID *string `json:"id,omitempty"`
3595}
3596
3597// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
3598func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
3599	objectMap := make(map[string]interface{})
3600	if agspp.Name != nil {
3601		objectMap["name"] = agspp.Name
3602	}
3603	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
3604		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
3605	}
3606	if agspp.ID != nil {
3607		objectMap["id"] = agspp.ID
3608	}
3609	return json.Marshal(objectMap)
3610}
3611
3612// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
3613func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
3614	var m map[string]*json.RawMessage
3615	err := json.Unmarshal(body, &m)
3616	if err != nil {
3617		return err
3618	}
3619	for k, v := range m {
3620		switch k {
3621		case "name":
3622			if v != nil {
3623				var name string
3624				err = json.Unmarshal(*v, &name)
3625				if err != nil {
3626					return err
3627				}
3628				agspp.Name = &name
3629			}
3630		case "properties":
3631			if v != nil {
3632				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
3633				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
3634				if err != nil {
3635					return err
3636				}
3637				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
3638			}
3639		case "id":
3640			if v != nil {
3641				var ID string
3642				err = json.Unmarshal(*v, &ID)
3643				if err != nil {
3644					return err
3645				}
3646				agspp.ID = &ID
3647			}
3648		}
3649	}
3650
3651	return nil
3652}
3653
3654// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
3655// ApplicationGatewaySslPredefinedPolicy.
3656type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
3657	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
3658	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
3659	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
3660	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
3661}
3662
3663// ApplicationGatewaySslProfile SSL profile of an application gateway.
3664type ApplicationGatewaySslProfile struct {
3665	// ApplicationGatewaySslProfilePropertiesFormat - Properties of the application gateway SSL profile.
3666	*ApplicationGatewaySslProfilePropertiesFormat `json:"properties,omitempty"`
3667	// Name - Name of the SSL profile that is unique within an Application Gateway.
3668	Name *string `json:"name,omitempty"`
3669	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3670	Etag *string `json:"etag,omitempty"`
3671	// Type - READ-ONLY; Type of the resource.
3672	Type *string `json:"type,omitempty"`
3673	// ID - Resource ID.
3674	ID *string `json:"id,omitempty"`
3675}
3676
3677// MarshalJSON is the custom marshaler for ApplicationGatewaySslProfile.
3678func (agsp ApplicationGatewaySslProfile) MarshalJSON() ([]byte, error) {
3679	objectMap := make(map[string]interface{})
3680	if agsp.ApplicationGatewaySslProfilePropertiesFormat != nil {
3681		objectMap["properties"] = agsp.ApplicationGatewaySslProfilePropertiesFormat
3682	}
3683	if agsp.Name != nil {
3684		objectMap["name"] = agsp.Name
3685	}
3686	if agsp.ID != nil {
3687		objectMap["id"] = agsp.ID
3688	}
3689	return json.Marshal(objectMap)
3690}
3691
3692// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslProfile struct.
3693func (agsp *ApplicationGatewaySslProfile) UnmarshalJSON(body []byte) error {
3694	var m map[string]*json.RawMessage
3695	err := json.Unmarshal(body, &m)
3696	if err != nil {
3697		return err
3698	}
3699	for k, v := range m {
3700		switch k {
3701		case "properties":
3702			if v != nil {
3703				var applicationGatewaySslProfilePropertiesFormat ApplicationGatewaySslProfilePropertiesFormat
3704				err = json.Unmarshal(*v, &applicationGatewaySslProfilePropertiesFormat)
3705				if err != nil {
3706					return err
3707				}
3708				agsp.ApplicationGatewaySslProfilePropertiesFormat = &applicationGatewaySslProfilePropertiesFormat
3709			}
3710		case "name":
3711			if v != nil {
3712				var name string
3713				err = json.Unmarshal(*v, &name)
3714				if err != nil {
3715					return err
3716				}
3717				agsp.Name = &name
3718			}
3719		case "etag":
3720			if v != nil {
3721				var etag string
3722				err = json.Unmarshal(*v, &etag)
3723				if err != nil {
3724					return err
3725				}
3726				agsp.Etag = &etag
3727			}
3728		case "type":
3729			if v != nil {
3730				var typeVar string
3731				err = json.Unmarshal(*v, &typeVar)
3732				if err != nil {
3733					return err
3734				}
3735				agsp.Type = &typeVar
3736			}
3737		case "id":
3738			if v != nil {
3739				var ID string
3740				err = json.Unmarshal(*v, &ID)
3741				if err != nil {
3742					return err
3743				}
3744				agsp.ID = &ID
3745			}
3746		}
3747	}
3748
3749	return nil
3750}
3751
3752// ApplicationGatewaySslProfilePropertiesFormat properties of SSL profile of an application gateway.
3753type ApplicationGatewaySslProfilePropertiesFormat struct {
3754	// TrustedClientCertificates - Array of references to application gateway trusted client certificates.
3755	TrustedClientCertificates *[]SubResource `json:"trustedClientCertificates,omitempty"`
3756	// SslPolicy - SSL policy of the application gateway resource.
3757	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
3758	// ClientAuthConfiguration - Client authentication configuration of the application gateway resource.
3759	ClientAuthConfiguration *ApplicationGatewayClientAuthConfiguration `json:"clientAuthConfiguration,omitempty"`
3760	// ProvisioningState - READ-ONLY; The provisioning state of the HTTP listener resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3761	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3762}
3763
3764// MarshalJSON is the custom marshaler for ApplicationGatewaySslProfilePropertiesFormat.
3765func (agsppf ApplicationGatewaySslProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
3766	objectMap := make(map[string]interface{})
3767	if agsppf.TrustedClientCertificates != nil {
3768		objectMap["trustedClientCertificates"] = agsppf.TrustedClientCertificates
3769	}
3770	if agsppf.SslPolicy != nil {
3771		objectMap["sslPolicy"] = agsppf.SslPolicy
3772	}
3773	if agsppf.ClientAuthConfiguration != nil {
3774		objectMap["clientAuthConfiguration"] = agsppf.ClientAuthConfiguration
3775	}
3776	return json.Marshal(objectMap)
3777}
3778
3779// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
3780// long-running operation.
3781type ApplicationGatewaysStartFuture struct {
3782	azure.FutureAPI
3783	// Result returns the result of the asynchronous operation.
3784	// If the operation has not completed it will return an error.
3785	Result func(ApplicationGatewaysClient) (autorest.Response, error)
3786}
3787
3788// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
3789// operation.
3790type ApplicationGatewaysStopFuture struct {
3791	azure.FutureAPI
3792	// Result returns the result of the asynchronous operation.
3793	// If the operation has not completed it will return an error.
3794	Result func(ApplicationGatewaysClient) (autorest.Response, error)
3795}
3796
3797// ApplicationGatewayTrustedClientCertificate trusted client certificates of an application gateway.
3798type ApplicationGatewayTrustedClientCertificate struct {
3799	// ApplicationGatewayTrustedClientCertificatePropertiesFormat - Properties of the application gateway trusted client certificate.
3800	*ApplicationGatewayTrustedClientCertificatePropertiesFormat `json:"properties,omitempty"`
3801	// Name - Name of the trusted client certificate that is unique within an Application Gateway.
3802	Name *string `json:"name,omitempty"`
3803	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3804	Etag *string `json:"etag,omitempty"`
3805	// Type - READ-ONLY; Type of the resource.
3806	Type *string `json:"type,omitempty"`
3807	// ID - Resource ID.
3808	ID *string `json:"id,omitempty"`
3809}
3810
3811// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedClientCertificate.
3812func (agtcc ApplicationGatewayTrustedClientCertificate) MarshalJSON() ([]byte, error) {
3813	objectMap := make(map[string]interface{})
3814	if agtcc.ApplicationGatewayTrustedClientCertificatePropertiesFormat != nil {
3815		objectMap["properties"] = agtcc.ApplicationGatewayTrustedClientCertificatePropertiesFormat
3816	}
3817	if agtcc.Name != nil {
3818		objectMap["name"] = agtcc.Name
3819	}
3820	if agtcc.ID != nil {
3821		objectMap["id"] = agtcc.ID
3822	}
3823	return json.Marshal(objectMap)
3824}
3825
3826// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedClientCertificate struct.
3827func (agtcc *ApplicationGatewayTrustedClientCertificate) UnmarshalJSON(body []byte) error {
3828	var m map[string]*json.RawMessage
3829	err := json.Unmarshal(body, &m)
3830	if err != nil {
3831		return err
3832	}
3833	for k, v := range m {
3834		switch k {
3835		case "properties":
3836			if v != nil {
3837				var applicationGatewayTrustedClientCertificatePropertiesFormat ApplicationGatewayTrustedClientCertificatePropertiesFormat
3838				err = json.Unmarshal(*v, &applicationGatewayTrustedClientCertificatePropertiesFormat)
3839				if err != nil {
3840					return err
3841				}
3842				agtcc.ApplicationGatewayTrustedClientCertificatePropertiesFormat = &applicationGatewayTrustedClientCertificatePropertiesFormat
3843			}
3844		case "name":
3845			if v != nil {
3846				var name string
3847				err = json.Unmarshal(*v, &name)
3848				if err != nil {
3849					return err
3850				}
3851				agtcc.Name = &name
3852			}
3853		case "etag":
3854			if v != nil {
3855				var etag string
3856				err = json.Unmarshal(*v, &etag)
3857				if err != nil {
3858					return err
3859				}
3860				agtcc.Etag = &etag
3861			}
3862		case "type":
3863			if v != nil {
3864				var typeVar string
3865				err = json.Unmarshal(*v, &typeVar)
3866				if err != nil {
3867					return err
3868				}
3869				agtcc.Type = &typeVar
3870			}
3871		case "id":
3872			if v != nil {
3873				var ID string
3874				err = json.Unmarshal(*v, &ID)
3875				if err != nil {
3876					return err
3877				}
3878				agtcc.ID = &ID
3879			}
3880		}
3881	}
3882
3883	return nil
3884}
3885
3886// ApplicationGatewayTrustedClientCertificatePropertiesFormat trusted client certificates properties of an
3887// application gateway.
3888type ApplicationGatewayTrustedClientCertificatePropertiesFormat struct {
3889	// Data - Certificate public data.
3890	Data *string `json:"data,omitempty"`
3891	// ProvisioningState - READ-ONLY; The provisioning state of the trusted client certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3892	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3893}
3894
3895// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedClientCertificatePropertiesFormat.
3896func (agtccpf ApplicationGatewayTrustedClientCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
3897	objectMap := make(map[string]interface{})
3898	if agtccpf.Data != nil {
3899		objectMap["data"] = agtccpf.Data
3900	}
3901	return json.Marshal(objectMap)
3902}
3903
3904// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway.
3905type ApplicationGatewayTrustedRootCertificate struct {
3906	// ApplicationGatewayTrustedRootCertificatePropertiesFormat - Properties of the application gateway trusted root certificate.
3907	*ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"`
3908	// Name - Name of the trusted root certificate that is unique within an Application Gateway.
3909	Name *string `json:"name,omitempty"`
3910	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3911	Etag *string `json:"etag,omitempty"`
3912	// Type - READ-ONLY; Type of the resource.
3913	Type *string `json:"type,omitempty"`
3914	// ID - Resource ID.
3915	ID *string `json:"id,omitempty"`
3916}
3917
3918// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificate.
3919func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) {
3920	objectMap := make(map[string]interface{})
3921	if agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat != nil {
3922		objectMap["properties"] = agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat
3923	}
3924	if agtrc.Name != nil {
3925		objectMap["name"] = agtrc.Name
3926	}
3927	if agtrc.ID != nil {
3928		objectMap["id"] = agtrc.ID
3929	}
3930	return json.Marshal(objectMap)
3931}
3932
3933// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedRootCertificate struct.
3934func (agtrc *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(body []byte) error {
3935	var m map[string]*json.RawMessage
3936	err := json.Unmarshal(body, &m)
3937	if err != nil {
3938		return err
3939	}
3940	for k, v := range m {
3941		switch k {
3942		case "properties":
3943			if v != nil {
3944				var applicationGatewayTrustedRootCertificatePropertiesFormat ApplicationGatewayTrustedRootCertificatePropertiesFormat
3945				err = json.Unmarshal(*v, &applicationGatewayTrustedRootCertificatePropertiesFormat)
3946				if err != nil {
3947					return err
3948				}
3949				agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat = &applicationGatewayTrustedRootCertificatePropertiesFormat
3950			}
3951		case "name":
3952			if v != nil {
3953				var name string
3954				err = json.Unmarshal(*v, &name)
3955				if err != nil {
3956					return err
3957				}
3958				agtrc.Name = &name
3959			}
3960		case "etag":
3961			if v != nil {
3962				var etag string
3963				err = json.Unmarshal(*v, &etag)
3964				if err != nil {
3965					return err
3966				}
3967				agtrc.Etag = &etag
3968			}
3969		case "type":
3970			if v != nil {
3971				var typeVar string
3972				err = json.Unmarshal(*v, &typeVar)
3973				if err != nil {
3974					return err
3975				}
3976				agtrc.Type = &typeVar
3977			}
3978		case "id":
3979			if v != nil {
3980				var ID string
3981				err = json.Unmarshal(*v, &ID)
3982				if err != nil {
3983					return err
3984				}
3985				agtrc.ID = &ID
3986			}
3987		}
3988	}
3989
3990	return nil
3991}
3992
3993// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an
3994// application gateway.
3995type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct {
3996	// Data - Certificate public data.
3997	Data *string `json:"data,omitempty"`
3998	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
3999	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
4000	// ProvisioningState - READ-ONLY; The provisioning state of the trusted root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4001	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4002}
4003
4004// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificatePropertiesFormat.
4005func (agtrcpf ApplicationGatewayTrustedRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
4006	objectMap := make(map[string]interface{})
4007	if agtrcpf.Data != nil {
4008		objectMap["data"] = agtrcpf.Data
4009	}
4010	if agtrcpf.KeyVaultSecretID != nil {
4011		objectMap["keyVaultSecretId"] = agtrcpf.KeyVaultSecretID
4012	}
4013	return json.Marshal(objectMap)
4014}
4015
4016// ApplicationGatewayURLConfiguration url configuration of the Actions set in Application Gateway.
4017type ApplicationGatewayURLConfiguration struct {
4018	// ModifiedPath - Url path which user has provided for url rewrite. Null means no path will be updated. Default value is null.
4019	ModifiedPath *string `json:"modifiedPath,omitempty"`
4020	// ModifiedQueryString - Query string which user has provided for url rewrite. Null means no query string will be updated. Default value is null.
4021	ModifiedQueryString *string `json:"modifiedQueryString,omitempty"`
4022	// 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.
4023	Reroute *bool `json:"reroute,omitempty"`
4024}
4025
4026// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
4027// PathBasedRouting.
4028type ApplicationGatewayURLPathMap struct {
4029	// ApplicationGatewayURLPathMapPropertiesFormat - Properties of the application gateway URL path map.
4030	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
4031	// Name - Name of the URL path map that is unique within an Application Gateway.
4032	Name *string `json:"name,omitempty"`
4033	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4034	Etag *string `json:"etag,omitempty"`
4035	// Type - READ-ONLY; Type of the resource.
4036	Type *string `json:"type,omitempty"`
4037	// ID - Resource ID.
4038	ID *string `json:"id,omitempty"`
4039}
4040
4041// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
4042func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
4043	objectMap := make(map[string]interface{})
4044	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
4045		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
4046	}
4047	if agupm.Name != nil {
4048		objectMap["name"] = agupm.Name
4049	}
4050	if agupm.ID != nil {
4051		objectMap["id"] = agupm.ID
4052	}
4053	return json.Marshal(objectMap)
4054}
4055
4056// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
4057func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
4058	var m map[string]*json.RawMessage
4059	err := json.Unmarshal(body, &m)
4060	if err != nil {
4061		return err
4062	}
4063	for k, v := range m {
4064		switch k {
4065		case "properties":
4066			if v != nil {
4067				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
4068				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
4069				if err != nil {
4070					return err
4071				}
4072				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
4073			}
4074		case "name":
4075			if v != nil {
4076				var name string
4077				err = json.Unmarshal(*v, &name)
4078				if err != nil {
4079					return err
4080				}
4081				agupm.Name = &name
4082			}
4083		case "etag":
4084			if v != nil {
4085				var etag string
4086				err = json.Unmarshal(*v, &etag)
4087				if err != nil {
4088					return err
4089				}
4090				agupm.Etag = &etag
4091			}
4092		case "type":
4093			if v != nil {
4094				var typeVar string
4095				err = json.Unmarshal(*v, &typeVar)
4096				if err != nil {
4097					return err
4098				}
4099				agupm.Type = &typeVar
4100			}
4101		case "id":
4102			if v != nil {
4103				var ID string
4104				err = json.Unmarshal(*v, &ID)
4105				if err != nil {
4106					return err
4107				}
4108				agupm.ID = &ID
4109			}
4110		}
4111	}
4112
4113	return nil
4114}
4115
4116// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
4117type ApplicationGatewayURLPathMapPropertiesFormat struct {
4118	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
4119	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
4120	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
4121	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
4122	// DefaultRewriteRuleSet - Default Rewrite rule set resource of URL path map.
4123	DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"`
4124	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
4125	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
4126	// PathRules - Path rule of URL path map resource.
4127	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
4128	// ProvisioningState - READ-ONLY; The provisioning state of the URL path map resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4129	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4130}
4131
4132// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMapPropertiesFormat.
4133func (agupmpf ApplicationGatewayURLPathMapPropertiesFormat) MarshalJSON() ([]byte, error) {
4134	objectMap := make(map[string]interface{})
4135	if agupmpf.DefaultBackendAddressPool != nil {
4136		objectMap["defaultBackendAddressPool"] = agupmpf.DefaultBackendAddressPool
4137	}
4138	if agupmpf.DefaultBackendHTTPSettings != nil {
4139		objectMap["defaultBackendHttpSettings"] = agupmpf.DefaultBackendHTTPSettings
4140	}
4141	if agupmpf.DefaultRewriteRuleSet != nil {
4142		objectMap["defaultRewriteRuleSet"] = agupmpf.DefaultRewriteRuleSet
4143	}
4144	if agupmpf.DefaultRedirectConfiguration != nil {
4145		objectMap["defaultRedirectConfiguration"] = agupmpf.DefaultRedirectConfiguration
4146	}
4147	if agupmpf.PathRules != nil {
4148		objectMap["pathRules"] = agupmpf.PathRules
4149	}
4150	return json.Marshal(objectMap)
4151}
4152
4153// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
4154// configuration.
4155type ApplicationGatewayWebApplicationFirewallConfiguration struct {
4156	// Enabled - Whether the web application firewall is enabled or not.
4157	Enabled *bool `json:"enabled,omitempty"`
4158	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
4159	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
4160	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
4161	RuleSetType *string `json:"ruleSetType,omitempty"`
4162	// RuleSetVersion - The version of the rule set type.
4163	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
4164	// DisabledRuleGroups - The disabled rule groups.
4165	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
4166	// RequestBodyCheck - Whether allow WAF to check request Body.
4167	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
4168	// MaxRequestBodySize - Maximum request body size for WAF.
4169	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
4170	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
4171	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
4172	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
4173	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
4174	// Exclusions - The exclusion list.
4175	Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"`
4176}
4177
4178// ApplicationRule rule of type application.
4179type ApplicationRule struct {
4180	// SourceAddresses - List of source IP addresses for this rule.
4181	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4182	// DestinationAddresses - List of destination IP addresses or Service Tags.
4183	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
4184	// Protocols - Array of Application Protocols.
4185	Protocols *[]FirewallPolicyRuleApplicationProtocol `json:"protocols,omitempty"`
4186	// TargetFqdns - List of FQDNs for this rule.
4187	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
4188	// TargetUrls - List of Urls for this rule condition.
4189	TargetUrls *[]string `json:"targetUrls,omitempty"`
4190	// FqdnTags - List of FQDN Tags for this rule.
4191	FqdnTags *[]string `json:"fqdnTags,omitempty"`
4192	// SourceIPGroups - List of source IpGroups for this rule.
4193	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
4194	// TerminateTLS - Terminate TLS connections for this rule.
4195	TerminateTLS *bool `json:"terminateTLS,omitempty"`
4196	// WebCategories - List of destination azure web categories.
4197	WebCategories *[]string `json:"webCategories,omitempty"`
4198	// Name - Name of the rule.
4199	Name *string `json:"name,omitempty"`
4200	// Description - Description of the rule.
4201	Description *string `json:"description,omitempty"`
4202	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule'
4203	RuleType RuleType `json:"ruleType,omitempty"`
4204}
4205
4206// MarshalJSON is the custom marshaler for ApplicationRule.
4207func (ar ApplicationRule) MarshalJSON() ([]byte, error) {
4208	ar.RuleType = RuleTypeApplicationRule
4209	objectMap := make(map[string]interface{})
4210	if ar.SourceAddresses != nil {
4211		objectMap["sourceAddresses"] = ar.SourceAddresses
4212	}
4213	if ar.DestinationAddresses != nil {
4214		objectMap["destinationAddresses"] = ar.DestinationAddresses
4215	}
4216	if ar.Protocols != nil {
4217		objectMap["protocols"] = ar.Protocols
4218	}
4219	if ar.TargetFqdns != nil {
4220		objectMap["targetFqdns"] = ar.TargetFqdns
4221	}
4222	if ar.TargetUrls != nil {
4223		objectMap["targetUrls"] = ar.TargetUrls
4224	}
4225	if ar.FqdnTags != nil {
4226		objectMap["fqdnTags"] = ar.FqdnTags
4227	}
4228	if ar.SourceIPGroups != nil {
4229		objectMap["sourceIpGroups"] = ar.SourceIPGroups
4230	}
4231	if ar.TerminateTLS != nil {
4232		objectMap["terminateTLS"] = ar.TerminateTLS
4233	}
4234	if ar.WebCategories != nil {
4235		objectMap["webCategories"] = ar.WebCategories
4236	}
4237	if ar.Name != nil {
4238		objectMap["name"] = ar.Name
4239	}
4240	if ar.Description != nil {
4241		objectMap["description"] = ar.Description
4242	}
4243	if ar.RuleType != "" {
4244		objectMap["ruleType"] = ar.RuleType
4245	}
4246	return json.Marshal(objectMap)
4247}
4248
4249// AsApplicationRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
4250func (ar ApplicationRule) AsApplicationRule() (*ApplicationRule, bool) {
4251	return &ar, true
4252}
4253
4254// AsNatRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
4255func (ar ApplicationRule) AsNatRule() (*NatRule, bool) {
4256	return nil, false
4257}
4258
4259// AsRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
4260func (ar ApplicationRule) AsRule() (*Rule, bool) {
4261	return nil, false
4262}
4263
4264// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
4265func (ar ApplicationRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
4266	return nil, false
4267}
4268
4269// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for ApplicationRule.
4270func (ar ApplicationRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
4271	return &ar, true
4272}
4273
4274// ApplicationSecurityGroup an application security group in a resource group.
4275type ApplicationSecurityGroup struct {
4276	autorest.Response `json:"-"`
4277	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
4278	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
4279	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4280	Etag *string `json:"etag,omitempty"`
4281	// ID - Resource ID.
4282	ID *string `json:"id,omitempty"`
4283	// Name - READ-ONLY; Resource name.
4284	Name *string `json:"name,omitempty"`
4285	// Type - READ-ONLY; Resource type.
4286	Type *string `json:"type,omitempty"`
4287	// Location - Resource location.
4288	Location *string `json:"location,omitempty"`
4289	// Tags - Resource tags.
4290	Tags map[string]*string `json:"tags"`
4291}
4292
4293// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
4294func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
4295	objectMap := make(map[string]interface{})
4296	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
4297		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
4298	}
4299	if asg.ID != nil {
4300		objectMap["id"] = asg.ID
4301	}
4302	if asg.Location != nil {
4303		objectMap["location"] = asg.Location
4304	}
4305	if asg.Tags != nil {
4306		objectMap["tags"] = asg.Tags
4307	}
4308	return json.Marshal(objectMap)
4309}
4310
4311// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
4312func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
4313	var m map[string]*json.RawMessage
4314	err := json.Unmarshal(body, &m)
4315	if err != nil {
4316		return err
4317	}
4318	for k, v := range m {
4319		switch k {
4320		case "properties":
4321			if v != nil {
4322				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
4323				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
4324				if err != nil {
4325					return err
4326				}
4327				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
4328			}
4329		case "etag":
4330			if v != nil {
4331				var etag string
4332				err = json.Unmarshal(*v, &etag)
4333				if err != nil {
4334					return err
4335				}
4336				asg.Etag = &etag
4337			}
4338		case "id":
4339			if v != nil {
4340				var ID string
4341				err = json.Unmarshal(*v, &ID)
4342				if err != nil {
4343					return err
4344				}
4345				asg.ID = &ID
4346			}
4347		case "name":
4348			if v != nil {
4349				var name string
4350				err = json.Unmarshal(*v, &name)
4351				if err != nil {
4352					return err
4353				}
4354				asg.Name = &name
4355			}
4356		case "type":
4357			if v != nil {
4358				var typeVar string
4359				err = json.Unmarshal(*v, &typeVar)
4360				if err != nil {
4361					return err
4362				}
4363				asg.Type = &typeVar
4364			}
4365		case "location":
4366			if v != nil {
4367				var location string
4368				err = json.Unmarshal(*v, &location)
4369				if err != nil {
4370					return err
4371				}
4372				asg.Location = &location
4373			}
4374		case "tags":
4375			if v != nil {
4376				var tags map[string]*string
4377				err = json.Unmarshal(*v, &tags)
4378				if err != nil {
4379					return err
4380				}
4381				asg.Tags = tags
4382			}
4383		}
4384	}
4385
4386	return nil
4387}
4388
4389// ApplicationSecurityGroupListResult a list of application security groups.
4390type ApplicationSecurityGroupListResult struct {
4391	autorest.Response `json:"-"`
4392	// Value - A list of application security groups.
4393	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
4394	// NextLink - READ-ONLY; The URL to get the next set of results.
4395	NextLink *string `json:"nextLink,omitempty"`
4396}
4397
4398// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
4399func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
4400	objectMap := make(map[string]interface{})
4401	if asglr.Value != nil {
4402		objectMap["value"] = asglr.Value
4403	}
4404	return json.Marshal(objectMap)
4405}
4406
4407// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
4408// ApplicationSecurityGroup values.
4409type ApplicationSecurityGroupListResultIterator struct {
4410	i    int
4411	page ApplicationSecurityGroupListResultPage
4412}
4413
4414// NextWithContext advances to the next value.  If there was an error making
4415// the request the iterator does not advance and the error is returned.
4416func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
4417	if tracing.IsEnabled() {
4418		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
4419		defer func() {
4420			sc := -1
4421			if iter.Response().Response.Response != nil {
4422				sc = iter.Response().Response.Response.StatusCode
4423			}
4424			tracing.EndSpan(ctx, sc, err)
4425		}()
4426	}
4427	iter.i++
4428	if iter.i < len(iter.page.Values()) {
4429		return nil
4430	}
4431	err = iter.page.NextWithContext(ctx)
4432	if err != nil {
4433		iter.i--
4434		return err
4435	}
4436	iter.i = 0
4437	return nil
4438}
4439
4440// Next advances to the next value.  If there was an error making
4441// the request the iterator does not advance and the error is returned.
4442// Deprecated: Use NextWithContext() instead.
4443func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
4444	return iter.NextWithContext(context.Background())
4445}
4446
4447// NotDone returns true if the enumeration should be started or is not yet complete.
4448func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
4449	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4450}
4451
4452// Response returns the raw server response from the last page request.
4453func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
4454	return iter.page.Response()
4455}
4456
4457// Value returns the current value or a zero-initialized value if the
4458// iterator has advanced beyond the end of the collection.
4459func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
4460	if !iter.page.NotDone() {
4461		return ApplicationSecurityGroup{}
4462	}
4463	return iter.page.Values()[iter.i]
4464}
4465
4466// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
4467func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
4468	return ApplicationSecurityGroupListResultIterator{page: page}
4469}
4470
4471// IsEmpty returns true if the ListResult contains no values.
4472func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
4473	return asglr.Value == nil || len(*asglr.Value) == 0
4474}
4475
4476// hasNextLink returns true if the NextLink is not empty.
4477func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
4478	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
4479}
4480
4481// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
4482// It returns nil if no more results exist.
4483func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
4484	if !asglr.hasNextLink() {
4485		return nil, nil
4486	}
4487	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4488		autorest.AsJSON(),
4489		autorest.AsGet(),
4490		autorest.WithBaseURL(to.String(asglr.NextLink)))
4491}
4492
4493// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
4494type ApplicationSecurityGroupListResultPage struct {
4495	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
4496	asglr ApplicationSecurityGroupListResult
4497}
4498
4499// NextWithContext advances to the next page of values.  If there was an error making
4500// the request the page does not advance and the error is returned.
4501func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
4502	if tracing.IsEnabled() {
4503		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
4504		defer func() {
4505			sc := -1
4506			if page.Response().Response.Response != nil {
4507				sc = page.Response().Response.Response.StatusCode
4508			}
4509			tracing.EndSpan(ctx, sc, err)
4510		}()
4511	}
4512	for {
4513		next, err := page.fn(ctx, page.asglr)
4514		if err != nil {
4515			return err
4516		}
4517		page.asglr = next
4518		if !next.hasNextLink() || !next.IsEmpty() {
4519			break
4520		}
4521	}
4522	return nil
4523}
4524
4525// Next advances to the next page of values.  If there was an error making
4526// the request the page does not advance and the error is returned.
4527// Deprecated: Use NextWithContext() instead.
4528func (page *ApplicationSecurityGroupListResultPage) Next() error {
4529	return page.NextWithContext(context.Background())
4530}
4531
4532// NotDone returns true if the page enumeration should be started or is not yet complete.
4533func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
4534	return !page.asglr.IsEmpty()
4535}
4536
4537// Response returns the raw server response from the last page request.
4538func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
4539	return page.asglr
4540}
4541
4542// Values returns the slice of values for the current page or nil if there are no values.
4543func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
4544	if page.asglr.IsEmpty() {
4545		return nil
4546	}
4547	return *page.asglr.Value
4548}
4549
4550// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
4551func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
4552	return ApplicationSecurityGroupListResultPage{
4553		fn:    getNextPage,
4554		asglr: cur,
4555	}
4556}
4557
4558// ApplicationSecurityGroupPropertiesFormat application security group properties.
4559type ApplicationSecurityGroupPropertiesFormat struct {
4560	// 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.
4561	ResourceGUID *string `json:"resourceGuid,omitempty"`
4562	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4563	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4564}
4565
4566// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
4567// of a long-running operation.
4568type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
4569	azure.FutureAPI
4570	// Result returns the result of the asynchronous operation.
4571	// If the operation has not completed it will return an error.
4572	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
4573}
4574
4575// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
4576// long-running operation.
4577type ApplicationSecurityGroupsDeleteFuture struct {
4578	azure.FutureAPI
4579	// Result returns the result of the asynchronous operation.
4580	// If the operation has not completed it will return an error.
4581	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
4582}
4583
4584// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
4585// that belongs to an ExpressRouteCircuit.
4586type AuthorizationListResult struct {
4587	autorest.Response `json:"-"`
4588	// Value - The authorizations in an ExpressRoute Circuit.
4589	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
4590	// NextLink - The URL to get the next set of results.
4591	NextLink *string `json:"nextLink,omitempty"`
4592}
4593
4594// AuthorizationListResultIterator provides access to a complete listing of
4595// ExpressRouteCircuitAuthorization values.
4596type AuthorizationListResultIterator struct {
4597	i    int
4598	page AuthorizationListResultPage
4599}
4600
4601// NextWithContext advances to the next value.  If there was an error making
4602// the request the iterator does not advance and the error is returned.
4603func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
4604	if tracing.IsEnabled() {
4605		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
4606		defer func() {
4607			sc := -1
4608			if iter.Response().Response.Response != nil {
4609				sc = iter.Response().Response.Response.StatusCode
4610			}
4611			tracing.EndSpan(ctx, sc, err)
4612		}()
4613	}
4614	iter.i++
4615	if iter.i < len(iter.page.Values()) {
4616		return nil
4617	}
4618	err = iter.page.NextWithContext(ctx)
4619	if err != nil {
4620		iter.i--
4621		return err
4622	}
4623	iter.i = 0
4624	return nil
4625}
4626
4627// Next advances to the next value.  If there was an error making
4628// the request the iterator does not advance and the error is returned.
4629// Deprecated: Use NextWithContext() instead.
4630func (iter *AuthorizationListResultIterator) Next() error {
4631	return iter.NextWithContext(context.Background())
4632}
4633
4634// NotDone returns true if the enumeration should be started or is not yet complete.
4635func (iter AuthorizationListResultIterator) NotDone() bool {
4636	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4637}
4638
4639// Response returns the raw server response from the last page request.
4640func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
4641	return iter.page.Response()
4642}
4643
4644// Value returns the current value or a zero-initialized value if the
4645// iterator has advanced beyond the end of the collection.
4646func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
4647	if !iter.page.NotDone() {
4648		return ExpressRouteCircuitAuthorization{}
4649	}
4650	return iter.page.Values()[iter.i]
4651}
4652
4653// Creates a new instance of the AuthorizationListResultIterator type.
4654func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
4655	return AuthorizationListResultIterator{page: page}
4656}
4657
4658// IsEmpty returns true if the ListResult contains no values.
4659func (alr AuthorizationListResult) IsEmpty() bool {
4660	return alr.Value == nil || len(*alr.Value) == 0
4661}
4662
4663// hasNextLink returns true if the NextLink is not empty.
4664func (alr AuthorizationListResult) hasNextLink() bool {
4665	return alr.NextLink != nil && len(*alr.NextLink) != 0
4666}
4667
4668// authorizationListResultPreparer prepares a request to retrieve the next set of results.
4669// It returns nil if no more results exist.
4670func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
4671	if !alr.hasNextLink() {
4672		return nil, nil
4673	}
4674	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4675		autorest.AsJSON(),
4676		autorest.AsGet(),
4677		autorest.WithBaseURL(to.String(alr.NextLink)))
4678}
4679
4680// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
4681type AuthorizationListResultPage struct {
4682	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
4683	alr AuthorizationListResult
4684}
4685
4686// NextWithContext advances to the next page of values.  If there was an error making
4687// the request the page does not advance and the error is returned.
4688func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
4689	if tracing.IsEnabled() {
4690		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
4691		defer func() {
4692			sc := -1
4693			if page.Response().Response.Response != nil {
4694				sc = page.Response().Response.Response.StatusCode
4695			}
4696			tracing.EndSpan(ctx, sc, err)
4697		}()
4698	}
4699	for {
4700		next, err := page.fn(ctx, page.alr)
4701		if err != nil {
4702			return err
4703		}
4704		page.alr = next
4705		if !next.hasNextLink() || !next.IsEmpty() {
4706			break
4707		}
4708	}
4709	return nil
4710}
4711
4712// Next advances to the next page of values.  If there was an error making
4713// the request the page does not advance and the error is returned.
4714// Deprecated: Use NextWithContext() instead.
4715func (page *AuthorizationListResultPage) Next() error {
4716	return page.NextWithContext(context.Background())
4717}
4718
4719// NotDone returns true if the page enumeration should be started or is not yet complete.
4720func (page AuthorizationListResultPage) NotDone() bool {
4721	return !page.alr.IsEmpty()
4722}
4723
4724// Response returns the raw server response from the last page request.
4725func (page AuthorizationListResultPage) Response() AuthorizationListResult {
4726	return page.alr
4727}
4728
4729// Values returns the slice of values for the current page or nil if there are no values.
4730func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
4731	if page.alr.IsEmpty() {
4732		return nil
4733	}
4734	return *page.alr.Value
4735}
4736
4737// Creates a new instance of the AuthorizationListResultPage type.
4738func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
4739	return AuthorizationListResultPage{
4740		fn:  getNextPage,
4741		alr: cur,
4742	}
4743}
4744
4745// AuthorizationPropertiesFormat properties of ExpressRouteCircuitAuthorization.
4746type AuthorizationPropertiesFormat struct {
4747	// AuthorizationKey - The authorization key.
4748	AuthorizationKey *string `json:"authorizationKey,omitempty"`
4749	// AuthorizationUseStatus - The authorization use status. Possible values include: 'Available', 'InUse'
4750	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
4751	// ProvisioningState - READ-ONLY; The provisioning state of the authorization resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4752	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4753}
4754
4755// MarshalJSON is the custom marshaler for AuthorizationPropertiesFormat.
4756func (apf AuthorizationPropertiesFormat) MarshalJSON() ([]byte, error) {
4757	objectMap := make(map[string]interface{})
4758	if apf.AuthorizationKey != nil {
4759		objectMap["authorizationKey"] = apf.AuthorizationKey
4760	}
4761	if apf.AuthorizationUseStatus != "" {
4762		objectMap["authorizationUseStatus"] = apf.AuthorizationUseStatus
4763	}
4764	return json.Marshal(objectMap)
4765}
4766
4767// AutoApprovedPrivateLinkService the information of an AutoApprovedPrivateLinkService.
4768type AutoApprovedPrivateLinkService struct {
4769	// PrivateLinkService - The id of the private link service resource.
4770	PrivateLinkService *string `json:"privateLinkService,omitempty"`
4771}
4772
4773// AutoApprovedPrivateLinkServicesResult an array of private link service id that can be linked to a
4774// private end point with auto approved.
4775type AutoApprovedPrivateLinkServicesResult struct {
4776	autorest.Response `json:"-"`
4777	// Value - An array of auto approved private link service.
4778	Value *[]AutoApprovedPrivateLinkService `json:"value,omitempty"`
4779	// NextLink - READ-ONLY; The URL to get the next set of results.
4780	NextLink *string `json:"nextLink,omitempty"`
4781}
4782
4783// MarshalJSON is the custom marshaler for AutoApprovedPrivateLinkServicesResult.
4784func (aaplsr AutoApprovedPrivateLinkServicesResult) MarshalJSON() ([]byte, error) {
4785	objectMap := make(map[string]interface{})
4786	if aaplsr.Value != nil {
4787		objectMap["value"] = aaplsr.Value
4788	}
4789	return json.Marshal(objectMap)
4790}
4791
4792// AutoApprovedPrivateLinkServicesResultIterator provides access to a complete listing of
4793// AutoApprovedPrivateLinkService values.
4794type AutoApprovedPrivateLinkServicesResultIterator struct {
4795	i    int
4796	page AutoApprovedPrivateLinkServicesResultPage
4797}
4798
4799// NextWithContext advances to the next value.  If there was an error making
4800// the request the iterator does not advance and the error is returned.
4801func (iter *AutoApprovedPrivateLinkServicesResultIterator) NextWithContext(ctx context.Context) (err error) {
4802	if tracing.IsEnabled() {
4803		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultIterator.NextWithContext")
4804		defer func() {
4805			sc := -1
4806			if iter.Response().Response.Response != nil {
4807				sc = iter.Response().Response.Response.StatusCode
4808			}
4809			tracing.EndSpan(ctx, sc, err)
4810		}()
4811	}
4812	iter.i++
4813	if iter.i < len(iter.page.Values()) {
4814		return nil
4815	}
4816	err = iter.page.NextWithContext(ctx)
4817	if err != nil {
4818		iter.i--
4819		return err
4820	}
4821	iter.i = 0
4822	return nil
4823}
4824
4825// Next advances to the next value.  If there was an error making
4826// the request the iterator does not advance and the error is returned.
4827// Deprecated: Use NextWithContext() instead.
4828func (iter *AutoApprovedPrivateLinkServicesResultIterator) Next() error {
4829	return iter.NextWithContext(context.Background())
4830}
4831
4832// NotDone returns true if the enumeration should be started or is not yet complete.
4833func (iter AutoApprovedPrivateLinkServicesResultIterator) NotDone() bool {
4834	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4835}
4836
4837// Response returns the raw server response from the last page request.
4838func (iter AutoApprovedPrivateLinkServicesResultIterator) Response() AutoApprovedPrivateLinkServicesResult {
4839	return iter.page.Response()
4840}
4841
4842// Value returns the current value or a zero-initialized value if the
4843// iterator has advanced beyond the end of the collection.
4844func (iter AutoApprovedPrivateLinkServicesResultIterator) Value() AutoApprovedPrivateLinkService {
4845	if !iter.page.NotDone() {
4846		return AutoApprovedPrivateLinkService{}
4847	}
4848	return iter.page.Values()[iter.i]
4849}
4850
4851// Creates a new instance of the AutoApprovedPrivateLinkServicesResultIterator type.
4852func NewAutoApprovedPrivateLinkServicesResultIterator(page AutoApprovedPrivateLinkServicesResultPage) AutoApprovedPrivateLinkServicesResultIterator {
4853	return AutoApprovedPrivateLinkServicesResultIterator{page: page}
4854}
4855
4856// IsEmpty returns true if the ListResult contains no values.
4857func (aaplsr AutoApprovedPrivateLinkServicesResult) IsEmpty() bool {
4858	return aaplsr.Value == nil || len(*aaplsr.Value) == 0
4859}
4860
4861// hasNextLink returns true if the NextLink is not empty.
4862func (aaplsr AutoApprovedPrivateLinkServicesResult) hasNextLink() bool {
4863	return aaplsr.NextLink != nil && len(*aaplsr.NextLink) != 0
4864}
4865
4866// autoApprovedPrivateLinkServicesResultPreparer prepares a request to retrieve the next set of results.
4867// It returns nil if no more results exist.
4868func (aaplsr AutoApprovedPrivateLinkServicesResult) autoApprovedPrivateLinkServicesResultPreparer(ctx context.Context) (*http.Request, error) {
4869	if !aaplsr.hasNextLink() {
4870		return nil, nil
4871	}
4872	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4873		autorest.AsJSON(),
4874		autorest.AsGet(),
4875		autorest.WithBaseURL(to.String(aaplsr.NextLink)))
4876}
4877
4878// AutoApprovedPrivateLinkServicesResultPage contains a page of AutoApprovedPrivateLinkService values.
4879type AutoApprovedPrivateLinkServicesResultPage struct {
4880	fn     func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)
4881	aaplsr AutoApprovedPrivateLinkServicesResult
4882}
4883
4884// NextWithContext advances to the next page of values.  If there was an error making
4885// the request the page does not advance and the error is returned.
4886func (page *AutoApprovedPrivateLinkServicesResultPage) NextWithContext(ctx context.Context) (err error) {
4887	if tracing.IsEnabled() {
4888		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultPage.NextWithContext")
4889		defer func() {
4890			sc := -1
4891			if page.Response().Response.Response != nil {
4892				sc = page.Response().Response.Response.StatusCode
4893			}
4894			tracing.EndSpan(ctx, sc, err)
4895		}()
4896	}
4897	for {
4898		next, err := page.fn(ctx, page.aaplsr)
4899		if err != nil {
4900			return err
4901		}
4902		page.aaplsr = next
4903		if !next.hasNextLink() || !next.IsEmpty() {
4904			break
4905		}
4906	}
4907	return nil
4908}
4909
4910// Next advances to the next page of values.  If there was an error making
4911// the request the page does not advance and the error is returned.
4912// Deprecated: Use NextWithContext() instead.
4913func (page *AutoApprovedPrivateLinkServicesResultPage) Next() error {
4914	return page.NextWithContext(context.Background())
4915}
4916
4917// NotDone returns true if the page enumeration should be started or is not yet complete.
4918func (page AutoApprovedPrivateLinkServicesResultPage) NotDone() bool {
4919	return !page.aaplsr.IsEmpty()
4920}
4921
4922// Response returns the raw server response from the last page request.
4923func (page AutoApprovedPrivateLinkServicesResultPage) Response() AutoApprovedPrivateLinkServicesResult {
4924	return page.aaplsr
4925}
4926
4927// Values returns the slice of values for the current page or nil if there are no values.
4928func (page AutoApprovedPrivateLinkServicesResultPage) Values() []AutoApprovedPrivateLinkService {
4929	if page.aaplsr.IsEmpty() {
4930		return nil
4931	}
4932	return *page.aaplsr.Value
4933}
4934
4935// Creates a new instance of the AutoApprovedPrivateLinkServicesResultPage type.
4936func NewAutoApprovedPrivateLinkServicesResultPage(cur AutoApprovedPrivateLinkServicesResult, getNextPage func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)) AutoApprovedPrivateLinkServicesResultPage {
4937	return AutoApprovedPrivateLinkServicesResultPage{
4938		fn:     getNextPage,
4939		aaplsr: cur,
4940	}
4941}
4942
4943// Availability availability of the metric.
4944type Availability struct {
4945	// TimeGrain - The time grain of the availability.
4946	TimeGrain *string `json:"timeGrain,omitempty"`
4947	// Retention - The retention of the availability.
4948	Retention *string `json:"retention,omitempty"`
4949	// BlobDuration - Duration of the availability blob.
4950	BlobDuration *string `json:"blobDuration,omitempty"`
4951}
4952
4953// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a
4954// subnet.
4955type AvailableDelegation struct {
4956	// Name - The name of the AvailableDelegation resource.
4957	Name *string `json:"name,omitempty"`
4958	// ID - A unique identifier of the AvailableDelegation resource.
4959	ID *string `json:"id,omitempty"`
4960	// Type - Resource type.
4961	Type *string `json:"type,omitempty"`
4962	// ServiceName - The name of the service and resource.
4963	ServiceName *string `json:"serviceName,omitempty"`
4964	// Actions - The actions permitted to the service upon delegation.
4965	Actions *[]string `json:"actions,omitempty"`
4966}
4967
4968// AvailableDelegationsResult an array of available delegations.
4969type AvailableDelegationsResult struct {
4970	autorest.Response `json:"-"`
4971	// Value - An array of available delegations.
4972	Value *[]AvailableDelegation `json:"value,omitempty"`
4973	// NextLink - READ-ONLY; The URL to get the next set of results.
4974	NextLink *string `json:"nextLink,omitempty"`
4975}
4976
4977// MarshalJSON is the custom marshaler for AvailableDelegationsResult.
4978func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) {
4979	objectMap := make(map[string]interface{})
4980	if adr.Value != nil {
4981		objectMap["value"] = adr.Value
4982	}
4983	return json.Marshal(objectMap)
4984}
4985
4986// AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values.
4987type AvailableDelegationsResultIterator struct {
4988	i    int
4989	page AvailableDelegationsResultPage
4990}
4991
4992// NextWithContext advances to the next value.  If there was an error making
4993// the request the iterator does not advance and the error is returned.
4994func (iter *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) {
4995	if tracing.IsEnabled() {
4996		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.NextWithContext")
4997		defer func() {
4998			sc := -1
4999			if iter.Response().Response.Response != nil {
5000				sc = iter.Response().Response.Response.StatusCode
5001			}
5002			tracing.EndSpan(ctx, sc, err)
5003		}()
5004	}
5005	iter.i++
5006	if iter.i < len(iter.page.Values()) {
5007		return nil
5008	}
5009	err = iter.page.NextWithContext(ctx)
5010	if err != nil {
5011		iter.i--
5012		return err
5013	}
5014	iter.i = 0
5015	return nil
5016}
5017
5018// Next advances to the next value.  If there was an error making
5019// the request the iterator does not advance and the error is returned.
5020// Deprecated: Use NextWithContext() instead.
5021func (iter *AvailableDelegationsResultIterator) Next() error {
5022	return iter.NextWithContext(context.Background())
5023}
5024
5025// NotDone returns true if the enumeration should be started or is not yet complete.
5026func (iter AvailableDelegationsResultIterator) NotDone() bool {
5027	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5028}
5029
5030// Response returns the raw server response from the last page request.
5031func (iter AvailableDelegationsResultIterator) Response() AvailableDelegationsResult {
5032	return iter.page.Response()
5033}
5034
5035// Value returns the current value or a zero-initialized value if the
5036// iterator has advanced beyond the end of the collection.
5037func (iter AvailableDelegationsResultIterator) Value() AvailableDelegation {
5038	if !iter.page.NotDone() {
5039		return AvailableDelegation{}
5040	}
5041	return iter.page.Values()[iter.i]
5042}
5043
5044// Creates a new instance of the AvailableDelegationsResultIterator type.
5045func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator {
5046	return AvailableDelegationsResultIterator{page: page}
5047}
5048
5049// IsEmpty returns true if the ListResult contains no values.
5050func (adr AvailableDelegationsResult) IsEmpty() bool {
5051	return adr.Value == nil || len(*adr.Value) == 0
5052}
5053
5054// hasNextLink returns true if the NextLink is not empty.
5055func (adr AvailableDelegationsResult) hasNextLink() bool {
5056	return adr.NextLink != nil && len(*adr.NextLink) != 0
5057}
5058
5059// availableDelegationsResultPreparer prepares a request to retrieve the next set of results.
5060// It returns nil if no more results exist.
5061func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) {
5062	if !adr.hasNextLink() {
5063		return nil, nil
5064	}
5065	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5066		autorest.AsJSON(),
5067		autorest.AsGet(),
5068		autorest.WithBaseURL(to.String(adr.NextLink)))
5069}
5070
5071// AvailableDelegationsResultPage contains a page of AvailableDelegation values.
5072type AvailableDelegationsResultPage struct {
5073	fn  func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)
5074	adr AvailableDelegationsResult
5075}
5076
5077// NextWithContext advances to the next page of values.  If there was an error making
5078// the request the page does not advance and the error is returned.
5079func (page *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) {
5080	if tracing.IsEnabled() {
5081		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.NextWithContext")
5082		defer func() {
5083			sc := -1
5084			if page.Response().Response.Response != nil {
5085				sc = page.Response().Response.Response.StatusCode
5086			}
5087			tracing.EndSpan(ctx, sc, err)
5088		}()
5089	}
5090	for {
5091		next, err := page.fn(ctx, page.adr)
5092		if err != nil {
5093			return err
5094		}
5095		page.adr = next
5096		if !next.hasNextLink() || !next.IsEmpty() {
5097			break
5098		}
5099	}
5100	return nil
5101}
5102
5103// Next advances to the next page of values.  If there was an error making
5104// the request the page does not advance and the error is returned.
5105// Deprecated: Use NextWithContext() instead.
5106func (page *AvailableDelegationsResultPage) Next() error {
5107	return page.NextWithContext(context.Background())
5108}
5109
5110// NotDone returns true if the page enumeration should be started or is not yet complete.
5111func (page AvailableDelegationsResultPage) NotDone() bool {
5112	return !page.adr.IsEmpty()
5113}
5114
5115// Response returns the raw server response from the last page request.
5116func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult {
5117	return page.adr
5118}
5119
5120// Values returns the slice of values for the current page or nil if there are no values.
5121func (page AvailableDelegationsResultPage) Values() []AvailableDelegation {
5122	if page.adr.IsEmpty() {
5123		return nil
5124	}
5125	return *page.adr.Value
5126}
5127
5128// Creates a new instance of the AvailableDelegationsResultPage type.
5129func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage {
5130	return AvailableDelegationsResultPage{
5131		fn:  getNextPage,
5132		adr: cur,
5133	}
5134}
5135
5136// AvailablePrivateEndpointType the information of an AvailablePrivateEndpointType.
5137type AvailablePrivateEndpointType struct {
5138	// Name - The name of the service and resource.
5139	Name *string `json:"name,omitempty"`
5140	// ID - A unique identifier of the AvailablePrivateEndpoint Type resource.
5141	ID *string `json:"id,omitempty"`
5142	// Type - Resource type.
5143	Type *string `json:"type,omitempty"`
5144	// ResourceName - The name of the service and resource.
5145	ResourceName *string `json:"resourceName,omitempty"`
5146}
5147
5148// AvailablePrivateEndpointTypesResult an array of available PrivateEndpoint types.
5149type AvailablePrivateEndpointTypesResult struct {
5150	autorest.Response `json:"-"`
5151	// Value - An array of available privateEndpoint type.
5152	Value *[]AvailablePrivateEndpointType `json:"value,omitempty"`
5153	// NextLink - READ-ONLY; The URL to get the next set of results.
5154	NextLink *string `json:"nextLink,omitempty"`
5155}
5156
5157// MarshalJSON is the custom marshaler for AvailablePrivateEndpointTypesResult.
5158func (apetr AvailablePrivateEndpointTypesResult) MarshalJSON() ([]byte, error) {
5159	objectMap := make(map[string]interface{})
5160	if apetr.Value != nil {
5161		objectMap["value"] = apetr.Value
5162	}
5163	return json.Marshal(objectMap)
5164}
5165
5166// AvailablePrivateEndpointTypesResultIterator provides access to a complete listing of
5167// AvailablePrivateEndpointType values.
5168type AvailablePrivateEndpointTypesResultIterator struct {
5169	i    int
5170	page AvailablePrivateEndpointTypesResultPage
5171}
5172
5173// NextWithContext advances to the next value.  If there was an error making
5174// the request the iterator does not advance and the error is returned.
5175func (iter *AvailablePrivateEndpointTypesResultIterator) NextWithContext(ctx context.Context) (err error) {
5176	if tracing.IsEnabled() {
5177		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultIterator.NextWithContext")
5178		defer func() {
5179			sc := -1
5180			if iter.Response().Response.Response != nil {
5181				sc = iter.Response().Response.Response.StatusCode
5182			}
5183			tracing.EndSpan(ctx, sc, err)
5184		}()
5185	}
5186	iter.i++
5187	if iter.i < len(iter.page.Values()) {
5188		return nil
5189	}
5190	err = iter.page.NextWithContext(ctx)
5191	if err != nil {
5192		iter.i--
5193		return err
5194	}
5195	iter.i = 0
5196	return nil
5197}
5198
5199// Next advances to the next value.  If there was an error making
5200// the request the iterator does not advance and the error is returned.
5201// Deprecated: Use NextWithContext() instead.
5202func (iter *AvailablePrivateEndpointTypesResultIterator) Next() error {
5203	return iter.NextWithContext(context.Background())
5204}
5205
5206// NotDone returns true if the enumeration should be started or is not yet complete.
5207func (iter AvailablePrivateEndpointTypesResultIterator) NotDone() bool {
5208	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5209}
5210
5211// Response returns the raw server response from the last page request.
5212func (iter AvailablePrivateEndpointTypesResultIterator) Response() AvailablePrivateEndpointTypesResult {
5213	return iter.page.Response()
5214}
5215
5216// Value returns the current value or a zero-initialized value if the
5217// iterator has advanced beyond the end of the collection.
5218func (iter AvailablePrivateEndpointTypesResultIterator) Value() AvailablePrivateEndpointType {
5219	if !iter.page.NotDone() {
5220		return AvailablePrivateEndpointType{}
5221	}
5222	return iter.page.Values()[iter.i]
5223}
5224
5225// Creates a new instance of the AvailablePrivateEndpointTypesResultIterator type.
5226func NewAvailablePrivateEndpointTypesResultIterator(page AvailablePrivateEndpointTypesResultPage) AvailablePrivateEndpointTypesResultIterator {
5227	return AvailablePrivateEndpointTypesResultIterator{page: page}
5228}
5229
5230// IsEmpty returns true if the ListResult contains no values.
5231func (apetr AvailablePrivateEndpointTypesResult) IsEmpty() bool {
5232	return apetr.Value == nil || len(*apetr.Value) == 0
5233}
5234
5235// hasNextLink returns true if the NextLink is not empty.
5236func (apetr AvailablePrivateEndpointTypesResult) hasNextLink() bool {
5237	return apetr.NextLink != nil && len(*apetr.NextLink) != 0
5238}
5239
5240// availablePrivateEndpointTypesResultPreparer prepares a request to retrieve the next set of results.
5241// It returns nil if no more results exist.
5242func (apetr AvailablePrivateEndpointTypesResult) availablePrivateEndpointTypesResultPreparer(ctx context.Context) (*http.Request, error) {
5243	if !apetr.hasNextLink() {
5244		return nil, nil
5245	}
5246	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5247		autorest.AsJSON(),
5248		autorest.AsGet(),
5249		autorest.WithBaseURL(to.String(apetr.NextLink)))
5250}
5251
5252// AvailablePrivateEndpointTypesResultPage contains a page of AvailablePrivateEndpointType values.
5253type AvailablePrivateEndpointTypesResultPage struct {
5254	fn    func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)
5255	apetr AvailablePrivateEndpointTypesResult
5256}
5257
5258// NextWithContext advances to the next page of values.  If there was an error making
5259// the request the page does not advance and the error is returned.
5260func (page *AvailablePrivateEndpointTypesResultPage) NextWithContext(ctx context.Context) (err error) {
5261	if tracing.IsEnabled() {
5262		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultPage.NextWithContext")
5263		defer func() {
5264			sc := -1
5265			if page.Response().Response.Response != nil {
5266				sc = page.Response().Response.Response.StatusCode
5267			}
5268			tracing.EndSpan(ctx, sc, err)
5269		}()
5270	}
5271	for {
5272		next, err := page.fn(ctx, page.apetr)
5273		if err != nil {
5274			return err
5275		}
5276		page.apetr = next
5277		if !next.hasNextLink() || !next.IsEmpty() {
5278			break
5279		}
5280	}
5281	return nil
5282}
5283
5284// Next advances to the next page of values.  If there was an error making
5285// the request the page does not advance and the error is returned.
5286// Deprecated: Use NextWithContext() instead.
5287func (page *AvailablePrivateEndpointTypesResultPage) Next() error {
5288	return page.NextWithContext(context.Background())
5289}
5290
5291// NotDone returns true if the page enumeration should be started or is not yet complete.
5292func (page AvailablePrivateEndpointTypesResultPage) NotDone() bool {
5293	return !page.apetr.IsEmpty()
5294}
5295
5296// Response returns the raw server response from the last page request.
5297func (page AvailablePrivateEndpointTypesResultPage) Response() AvailablePrivateEndpointTypesResult {
5298	return page.apetr
5299}
5300
5301// Values returns the slice of values for the current page or nil if there are no values.
5302func (page AvailablePrivateEndpointTypesResultPage) Values() []AvailablePrivateEndpointType {
5303	if page.apetr.IsEmpty() {
5304		return nil
5305	}
5306	return *page.apetr.Value
5307}
5308
5309// Creates a new instance of the AvailablePrivateEndpointTypesResultPage type.
5310func NewAvailablePrivateEndpointTypesResultPage(cur AvailablePrivateEndpointTypesResult, getNextPage func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)) AvailablePrivateEndpointTypesResultPage {
5311	return AvailablePrivateEndpointTypesResultPage{
5312		fn:    getNextPage,
5313		apetr: cur,
5314	}
5315}
5316
5317// AvailableProvidersList list of available countries with details.
5318type AvailableProvidersList struct {
5319	autorest.Response `json:"-"`
5320	// Countries - List of available countries.
5321	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
5322}
5323
5324// AvailableProvidersListCity city or town details.
5325type AvailableProvidersListCity struct {
5326	// CityName - The city or town name.
5327	CityName *string `json:"cityName,omitempty"`
5328	// Providers - A list of Internet service providers.
5329	Providers *[]string `json:"providers,omitempty"`
5330}
5331
5332// AvailableProvidersListCountry country details.
5333type AvailableProvidersListCountry struct {
5334	// CountryName - The country name.
5335	CountryName *string `json:"countryName,omitempty"`
5336	// Providers - A list of Internet service providers.
5337	Providers *[]string `json:"providers,omitempty"`
5338	// States - List of available states in the country.
5339	States *[]AvailableProvidersListState `json:"states,omitempty"`
5340}
5341
5342// AvailableProvidersListParameters constraints that determine the list of available Internet service
5343// providers.
5344type AvailableProvidersListParameters struct {
5345	// AzureLocations - A list of Azure regions.
5346	AzureLocations *[]string `json:"azureLocations,omitempty"`
5347	// Country - The country for available providers list.
5348	Country *string `json:"country,omitempty"`
5349	// State - The state for available providers list.
5350	State *string `json:"state,omitempty"`
5351	// City - The city or town for available providers list.
5352	City *string `json:"city,omitempty"`
5353}
5354
5355// AvailableProvidersListState state details.
5356type AvailableProvidersListState struct {
5357	// StateName - The state name.
5358	StateName *string `json:"stateName,omitempty"`
5359	// Providers - A list of Internet service providers.
5360	Providers *[]string `json:"providers,omitempty"`
5361	// Cities - List of available cities or towns in the state.
5362	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
5363}
5364
5365// AvailableServiceAlias the available service alias.
5366type AvailableServiceAlias struct {
5367	// Name - The name of the service alias.
5368	Name *string `json:"name,omitempty"`
5369	// ID - The ID of the service alias.
5370	ID *string `json:"id,omitempty"`
5371	// Type - The type of the resource.
5372	Type *string `json:"type,omitempty"`
5373	// ResourceName - The resource name of the service alias.
5374	ResourceName *string `json:"resourceName,omitempty"`
5375}
5376
5377// AvailableServiceAliasesResult an array of available service aliases.
5378type AvailableServiceAliasesResult struct {
5379	autorest.Response `json:"-"`
5380	// Value - An array of available service aliases.
5381	Value *[]AvailableServiceAlias `json:"value,omitempty"`
5382	// NextLink - READ-ONLY; The URL to get the next set of results.
5383	NextLink *string `json:"nextLink,omitempty"`
5384}
5385
5386// MarshalJSON is the custom marshaler for AvailableServiceAliasesResult.
5387func (asar AvailableServiceAliasesResult) MarshalJSON() ([]byte, error) {
5388	objectMap := make(map[string]interface{})
5389	if asar.Value != nil {
5390		objectMap["value"] = asar.Value
5391	}
5392	return json.Marshal(objectMap)
5393}
5394
5395// AvailableServiceAliasesResultIterator provides access to a complete listing of AvailableServiceAlias
5396// values.
5397type AvailableServiceAliasesResultIterator struct {
5398	i    int
5399	page AvailableServiceAliasesResultPage
5400}
5401
5402// NextWithContext advances to the next value.  If there was an error making
5403// the request the iterator does not advance and the error is returned.
5404func (iter *AvailableServiceAliasesResultIterator) NextWithContext(ctx context.Context) (err error) {
5405	if tracing.IsEnabled() {
5406		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesResultIterator.NextWithContext")
5407		defer func() {
5408			sc := -1
5409			if iter.Response().Response.Response != nil {
5410				sc = iter.Response().Response.Response.StatusCode
5411			}
5412			tracing.EndSpan(ctx, sc, err)
5413		}()
5414	}
5415	iter.i++
5416	if iter.i < len(iter.page.Values()) {
5417		return nil
5418	}
5419	err = iter.page.NextWithContext(ctx)
5420	if err != nil {
5421		iter.i--
5422		return err
5423	}
5424	iter.i = 0
5425	return nil
5426}
5427
5428// Next advances to the next value.  If there was an error making
5429// the request the iterator does not advance and the error is returned.
5430// Deprecated: Use NextWithContext() instead.
5431func (iter *AvailableServiceAliasesResultIterator) Next() error {
5432	return iter.NextWithContext(context.Background())
5433}
5434
5435// NotDone returns true if the enumeration should be started or is not yet complete.
5436func (iter AvailableServiceAliasesResultIterator) NotDone() bool {
5437	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5438}
5439
5440// Response returns the raw server response from the last page request.
5441func (iter AvailableServiceAliasesResultIterator) Response() AvailableServiceAliasesResult {
5442	return iter.page.Response()
5443}
5444
5445// Value returns the current value or a zero-initialized value if the
5446// iterator has advanced beyond the end of the collection.
5447func (iter AvailableServiceAliasesResultIterator) Value() AvailableServiceAlias {
5448	if !iter.page.NotDone() {
5449		return AvailableServiceAlias{}
5450	}
5451	return iter.page.Values()[iter.i]
5452}
5453
5454// Creates a new instance of the AvailableServiceAliasesResultIterator type.
5455func NewAvailableServiceAliasesResultIterator(page AvailableServiceAliasesResultPage) AvailableServiceAliasesResultIterator {
5456	return AvailableServiceAliasesResultIterator{page: page}
5457}
5458
5459// IsEmpty returns true if the ListResult contains no values.
5460func (asar AvailableServiceAliasesResult) IsEmpty() bool {
5461	return asar.Value == nil || len(*asar.Value) == 0
5462}
5463
5464// hasNextLink returns true if the NextLink is not empty.
5465func (asar AvailableServiceAliasesResult) hasNextLink() bool {
5466	return asar.NextLink != nil && len(*asar.NextLink) != 0
5467}
5468
5469// availableServiceAliasesResultPreparer prepares a request to retrieve the next set of results.
5470// It returns nil if no more results exist.
5471func (asar AvailableServiceAliasesResult) availableServiceAliasesResultPreparer(ctx context.Context) (*http.Request, error) {
5472	if !asar.hasNextLink() {
5473		return nil, nil
5474	}
5475	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5476		autorest.AsJSON(),
5477		autorest.AsGet(),
5478		autorest.WithBaseURL(to.String(asar.NextLink)))
5479}
5480
5481// AvailableServiceAliasesResultPage contains a page of AvailableServiceAlias values.
5482type AvailableServiceAliasesResultPage struct {
5483	fn   func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error)
5484	asar AvailableServiceAliasesResult
5485}
5486
5487// NextWithContext advances to the next page of values.  If there was an error making
5488// the request the page does not advance and the error is returned.
5489func (page *AvailableServiceAliasesResultPage) NextWithContext(ctx context.Context) (err error) {
5490	if tracing.IsEnabled() {
5491		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesResultPage.NextWithContext")
5492		defer func() {
5493			sc := -1
5494			if page.Response().Response.Response != nil {
5495				sc = page.Response().Response.Response.StatusCode
5496			}
5497			tracing.EndSpan(ctx, sc, err)
5498		}()
5499	}
5500	for {
5501		next, err := page.fn(ctx, page.asar)
5502		if err != nil {
5503			return err
5504		}
5505		page.asar = next
5506		if !next.hasNextLink() || !next.IsEmpty() {
5507			break
5508		}
5509	}
5510	return nil
5511}
5512
5513// Next advances to the next page of values.  If there was an error making
5514// the request the page does not advance and the error is returned.
5515// Deprecated: Use NextWithContext() instead.
5516func (page *AvailableServiceAliasesResultPage) Next() error {
5517	return page.NextWithContext(context.Background())
5518}
5519
5520// NotDone returns true if the page enumeration should be started or is not yet complete.
5521func (page AvailableServiceAliasesResultPage) NotDone() bool {
5522	return !page.asar.IsEmpty()
5523}
5524
5525// Response returns the raw server response from the last page request.
5526func (page AvailableServiceAliasesResultPage) Response() AvailableServiceAliasesResult {
5527	return page.asar
5528}
5529
5530// Values returns the slice of values for the current page or nil if there are no values.
5531func (page AvailableServiceAliasesResultPage) Values() []AvailableServiceAlias {
5532	if page.asar.IsEmpty() {
5533		return nil
5534	}
5535	return *page.asar.Value
5536}
5537
5538// Creates a new instance of the AvailableServiceAliasesResultPage type.
5539func NewAvailableServiceAliasesResultPage(cur AvailableServiceAliasesResult, getNextPage func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error)) AvailableServiceAliasesResultPage {
5540	return AvailableServiceAliasesResultPage{
5541		fn:   getNextPage,
5542		asar: cur,
5543	}
5544}
5545
5546// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
5547// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
5548// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
5549// operation succeeded, the response body includes the HTTP status code for the successful request. If the
5550// asynchronous operation failed, the response body includes the HTTP status code for the failed request
5551// and error information regarding the failure.
5552type AzureAsyncOperationResult struct {
5553	// Status - Status of the Azure async operation. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
5554	Status OperationStatus `json:"status,omitempty"`
5555	// Error - Details of the error occurred during specified asynchronous operation.
5556	Error *Error `json:"error,omitempty"`
5557}
5558
5559// AzureFirewall azure Firewall resource.
5560type AzureFirewall struct {
5561	autorest.Response `json:"-"`
5562	// AzureFirewallPropertiesFormat - Properties of the azure firewall.
5563	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
5564	// Zones - A list of availability zones denoting where the resource needs to come from.
5565	Zones *[]string `json:"zones,omitempty"`
5566	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5567	Etag *string `json:"etag,omitempty"`
5568	// ID - Resource ID.
5569	ID *string `json:"id,omitempty"`
5570	// Name - READ-ONLY; Resource name.
5571	Name *string `json:"name,omitempty"`
5572	// Type - READ-ONLY; Resource type.
5573	Type *string `json:"type,omitempty"`
5574	// Location - Resource location.
5575	Location *string `json:"location,omitempty"`
5576	// Tags - Resource tags.
5577	Tags map[string]*string `json:"tags"`
5578}
5579
5580// MarshalJSON is the custom marshaler for AzureFirewall.
5581func (af AzureFirewall) MarshalJSON() ([]byte, error) {
5582	objectMap := make(map[string]interface{})
5583	if af.AzureFirewallPropertiesFormat != nil {
5584		objectMap["properties"] = af.AzureFirewallPropertiesFormat
5585	}
5586	if af.Zones != nil {
5587		objectMap["zones"] = af.Zones
5588	}
5589	if af.ID != nil {
5590		objectMap["id"] = af.ID
5591	}
5592	if af.Location != nil {
5593		objectMap["location"] = af.Location
5594	}
5595	if af.Tags != nil {
5596		objectMap["tags"] = af.Tags
5597	}
5598	return json.Marshal(objectMap)
5599}
5600
5601// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
5602func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
5603	var m map[string]*json.RawMessage
5604	err := json.Unmarshal(body, &m)
5605	if err != nil {
5606		return err
5607	}
5608	for k, v := range m {
5609		switch k {
5610		case "properties":
5611			if v != nil {
5612				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
5613				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
5614				if err != nil {
5615					return err
5616				}
5617				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
5618			}
5619		case "zones":
5620			if v != nil {
5621				var zones []string
5622				err = json.Unmarshal(*v, &zones)
5623				if err != nil {
5624					return err
5625				}
5626				af.Zones = &zones
5627			}
5628		case "etag":
5629			if v != nil {
5630				var etag string
5631				err = json.Unmarshal(*v, &etag)
5632				if err != nil {
5633					return err
5634				}
5635				af.Etag = &etag
5636			}
5637		case "id":
5638			if v != nil {
5639				var ID string
5640				err = json.Unmarshal(*v, &ID)
5641				if err != nil {
5642					return err
5643				}
5644				af.ID = &ID
5645			}
5646		case "name":
5647			if v != nil {
5648				var name string
5649				err = json.Unmarshal(*v, &name)
5650				if err != nil {
5651					return err
5652				}
5653				af.Name = &name
5654			}
5655		case "type":
5656			if v != nil {
5657				var typeVar string
5658				err = json.Unmarshal(*v, &typeVar)
5659				if err != nil {
5660					return err
5661				}
5662				af.Type = &typeVar
5663			}
5664		case "location":
5665			if v != nil {
5666				var location string
5667				err = json.Unmarshal(*v, &location)
5668				if err != nil {
5669					return err
5670				}
5671				af.Location = &location
5672			}
5673		case "tags":
5674			if v != nil {
5675				var tags map[string]*string
5676				err = json.Unmarshal(*v, &tags)
5677				if err != nil {
5678					return err
5679				}
5680				af.Tags = tags
5681			}
5682		}
5683	}
5684
5685	return nil
5686}
5687
5688// AzureFirewallApplicationRule properties of an application rule.
5689type AzureFirewallApplicationRule struct {
5690	// Name - Name of the application rule.
5691	Name *string `json:"name,omitempty"`
5692	// Description - Description of the rule.
5693	Description *string `json:"description,omitempty"`
5694	// SourceAddresses - List of source IP addresses for this rule.
5695	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
5696	// Protocols - Array of ApplicationRuleProtocols.
5697	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
5698	// TargetFqdns - List of FQDNs for this rule.
5699	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
5700	// FqdnTags - List of FQDN Tags for this rule.
5701	FqdnTags *[]string `json:"fqdnTags,omitempty"`
5702	// SourceIPGroups - List of source IpGroups for this rule.
5703	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
5704}
5705
5706// AzureFirewallApplicationRuleCollection application rule collection resource.
5707type AzureFirewallApplicationRuleCollection struct {
5708	// AzureFirewallApplicationRuleCollectionPropertiesFormat - Properties of the azure firewall application rule collection.
5709	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
5710	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
5711	Name *string `json:"name,omitempty"`
5712	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5713	Etag *string `json:"etag,omitempty"`
5714	// ID - Resource ID.
5715	ID *string `json:"id,omitempty"`
5716}
5717
5718// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
5719func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
5720	objectMap := make(map[string]interface{})
5721	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
5722		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
5723	}
5724	if afarc.Name != nil {
5725		objectMap["name"] = afarc.Name
5726	}
5727	if afarc.ID != nil {
5728		objectMap["id"] = afarc.ID
5729	}
5730	return json.Marshal(objectMap)
5731}
5732
5733// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
5734func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
5735	var m map[string]*json.RawMessage
5736	err := json.Unmarshal(body, &m)
5737	if err != nil {
5738		return err
5739	}
5740	for k, v := range m {
5741		switch k {
5742		case "properties":
5743			if v != nil {
5744				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
5745				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
5746				if err != nil {
5747					return err
5748				}
5749				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
5750			}
5751		case "name":
5752			if v != nil {
5753				var name string
5754				err = json.Unmarshal(*v, &name)
5755				if err != nil {
5756					return err
5757				}
5758				afarc.Name = &name
5759			}
5760		case "etag":
5761			if v != nil {
5762				var etag string
5763				err = json.Unmarshal(*v, &etag)
5764				if err != nil {
5765					return err
5766				}
5767				afarc.Etag = &etag
5768			}
5769		case "id":
5770			if v != nil {
5771				var ID string
5772				err = json.Unmarshal(*v, &ID)
5773				if err != nil {
5774					return err
5775				}
5776				afarc.ID = &ID
5777			}
5778		}
5779	}
5780
5781	return nil
5782}
5783
5784// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
5785type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
5786	// Priority - Priority of the application rule collection resource.
5787	Priority *int32 `json:"priority,omitempty"`
5788	// Action - The action type of a rule collection.
5789	Action *AzureFirewallRCAction `json:"action,omitempty"`
5790	// Rules - Collection of rules used by a application rule collection.
5791	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
5792	// ProvisioningState - READ-ONLY; The provisioning state of the application rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5793	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5794}
5795
5796// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollectionPropertiesFormat.
5797func (afarcpf AzureFirewallApplicationRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) {
5798	objectMap := make(map[string]interface{})
5799	if afarcpf.Priority != nil {
5800		objectMap["priority"] = afarcpf.Priority
5801	}
5802	if afarcpf.Action != nil {
5803		objectMap["action"] = afarcpf.Action
5804	}
5805	if afarcpf.Rules != nil {
5806		objectMap["rules"] = afarcpf.Rules
5807	}
5808	return json.Marshal(objectMap)
5809}
5810
5811// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
5812type AzureFirewallApplicationRuleProtocol struct {
5813	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS', 'AzureFirewallApplicationRuleProtocolTypeMssql'
5814	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
5815	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
5816	Port *int32 `json:"port,omitempty"`
5817}
5818
5819// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource.
5820type AzureFirewallFqdnTag struct {
5821	// AzureFirewallFqdnTagPropertiesFormat - Properties of the azure firewall FQDN tag.
5822	*AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"`
5823	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5824	Etag *string `json:"etag,omitempty"`
5825	// ID - Resource ID.
5826	ID *string `json:"id,omitempty"`
5827	// Name - READ-ONLY; Resource name.
5828	Name *string `json:"name,omitempty"`
5829	// Type - READ-ONLY; Resource type.
5830	Type *string `json:"type,omitempty"`
5831	// Location - Resource location.
5832	Location *string `json:"location,omitempty"`
5833	// Tags - Resource tags.
5834	Tags map[string]*string `json:"tags"`
5835}
5836
5837// MarshalJSON is the custom marshaler for AzureFirewallFqdnTag.
5838func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) {
5839	objectMap := make(map[string]interface{})
5840	if afft.AzureFirewallFqdnTagPropertiesFormat != nil {
5841		objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat
5842	}
5843	if afft.ID != nil {
5844		objectMap["id"] = afft.ID
5845	}
5846	if afft.Location != nil {
5847		objectMap["location"] = afft.Location
5848	}
5849	if afft.Tags != nil {
5850		objectMap["tags"] = afft.Tags
5851	}
5852	return json.Marshal(objectMap)
5853}
5854
5855// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct.
5856func (afft *AzureFirewallFqdnTag) UnmarshalJSON(body []byte) error {
5857	var m map[string]*json.RawMessage
5858	err := json.Unmarshal(body, &m)
5859	if err != nil {
5860		return err
5861	}
5862	for k, v := range m {
5863		switch k {
5864		case "properties":
5865			if v != nil {
5866				var azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat
5867				err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat)
5868				if err != nil {
5869					return err
5870				}
5871				afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat
5872			}
5873		case "etag":
5874			if v != nil {
5875				var etag string
5876				err = json.Unmarshal(*v, &etag)
5877				if err != nil {
5878					return err
5879				}
5880				afft.Etag = &etag
5881			}
5882		case "id":
5883			if v != nil {
5884				var ID string
5885				err = json.Unmarshal(*v, &ID)
5886				if err != nil {
5887					return err
5888				}
5889				afft.ID = &ID
5890			}
5891		case "name":
5892			if v != nil {
5893				var name string
5894				err = json.Unmarshal(*v, &name)
5895				if err != nil {
5896					return err
5897				}
5898				afft.Name = &name
5899			}
5900		case "type":
5901			if v != nil {
5902				var typeVar string
5903				err = json.Unmarshal(*v, &typeVar)
5904				if err != nil {
5905					return err
5906				}
5907				afft.Type = &typeVar
5908			}
5909		case "location":
5910			if v != nil {
5911				var location string
5912				err = json.Unmarshal(*v, &location)
5913				if err != nil {
5914					return err
5915				}
5916				afft.Location = &location
5917			}
5918		case "tags":
5919			if v != nil {
5920				var tags map[string]*string
5921				err = json.Unmarshal(*v, &tags)
5922				if err != nil {
5923					return err
5924				}
5925				afft.Tags = tags
5926			}
5927		}
5928	}
5929
5930	return nil
5931}
5932
5933// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call.
5934type AzureFirewallFqdnTagListResult struct {
5935	autorest.Response `json:"-"`
5936	// Value - List of Azure Firewall FQDN Tags in a resource group.
5937	Value *[]AzureFirewallFqdnTag `json:"value,omitempty"`
5938	// NextLink - URL to get the next set of results.
5939	NextLink *string `json:"nextLink,omitempty"`
5940}
5941
5942// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag
5943// values.
5944type AzureFirewallFqdnTagListResultIterator struct {
5945	i    int
5946	page AzureFirewallFqdnTagListResultPage
5947}
5948
5949// NextWithContext advances to the next value.  If there was an error making
5950// the request the iterator does not advance and the error is returned.
5951func (iter *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) {
5952	if tracing.IsEnabled() {
5953		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.NextWithContext")
5954		defer func() {
5955			sc := -1
5956			if iter.Response().Response.Response != nil {
5957				sc = iter.Response().Response.Response.StatusCode
5958			}
5959			tracing.EndSpan(ctx, sc, err)
5960		}()
5961	}
5962	iter.i++
5963	if iter.i < len(iter.page.Values()) {
5964		return nil
5965	}
5966	err = iter.page.NextWithContext(ctx)
5967	if err != nil {
5968		iter.i--
5969		return err
5970	}
5971	iter.i = 0
5972	return nil
5973}
5974
5975// Next advances to the next value.  If there was an error making
5976// the request the iterator does not advance and the error is returned.
5977// Deprecated: Use NextWithContext() instead.
5978func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
5979	return iter.NextWithContext(context.Background())
5980}
5981
5982// NotDone returns true if the enumeration should be started or is not yet complete.
5983func (iter AzureFirewallFqdnTagListResultIterator) NotDone() bool {
5984	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5985}
5986
5987// Response returns the raw server response from the last page request.
5988func (iter AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult {
5989	return iter.page.Response()
5990}
5991
5992// Value returns the current value or a zero-initialized value if the
5993// iterator has advanced beyond the end of the collection.
5994func (iter AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag {
5995	if !iter.page.NotDone() {
5996		return AzureFirewallFqdnTag{}
5997	}
5998	return iter.page.Values()[iter.i]
5999}
6000
6001// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type.
6002func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator {
6003	return AzureFirewallFqdnTagListResultIterator{page: page}
6004}
6005
6006// IsEmpty returns true if the ListResult contains no values.
6007func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
6008	return afftlr.Value == nil || len(*afftlr.Value) == 0
6009}
6010
6011// hasNextLink returns true if the NextLink is not empty.
6012func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool {
6013	return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0
6014}
6015
6016// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results.
6017// It returns nil if no more results exist.
6018func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) {
6019	if !afftlr.hasNextLink() {
6020		return nil, nil
6021	}
6022	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6023		autorest.AsJSON(),
6024		autorest.AsGet(),
6025		autorest.WithBaseURL(to.String(afftlr.NextLink)))
6026}
6027
6028// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values.
6029type AzureFirewallFqdnTagListResultPage struct {
6030	fn     func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
6031	afftlr AzureFirewallFqdnTagListResult
6032}
6033
6034// NextWithContext advances to the next page of values.  If there was an error making
6035// the request the page does not advance and the error is returned.
6036func (page *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) {
6037	if tracing.IsEnabled() {
6038		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.NextWithContext")
6039		defer func() {
6040			sc := -1
6041			if page.Response().Response.Response != nil {
6042				sc = page.Response().Response.Response.StatusCode
6043			}
6044			tracing.EndSpan(ctx, sc, err)
6045		}()
6046	}
6047	for {
6048		next, err := page.fn(ctx, page.afftlr)
6049		if err != nil {
6050			return err
6051		}
6052		page.afftlr = next
6053		if !next.hasNextLink() || !next.IsEmpty() {
6054			break
6055		}
6056	}
6057	return nil
6058}
6059
6060// Next advances to the next page of values.  If there was an error making
6061// the request the page does not advance and the error is returned.
6062// Deprecated: Use NextWithContext() instead.
6063func (page *AzureFirewallFqdnTagListResultPage) Next() error {
6064	return page.NextWithContext(context.Background())
6065}
6066
6067// NotDone returns true if the page enumeration should be started or is not yet complete.
6068func (page AzureFirewallFqdnTagListResultPage) NotDone() bool {
6069	return !page.afftlr.IsEmpty()
6070}
6071
6072// Response returns the raw server response from the last page request.
6073func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult {
6074	return page.afftlr
6075}
6076
6077// Values returns the slice of values for the current page or nil if there are no values.
6078func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag {
6079	if page.afftlr.IsEmpty() {
6080		return nil
6081	}
6082	return *page.afftlr.Value
6083}
6084
6085// Creates a new instance of the AzureFirewallFqdnTagListResultPage type.
6086func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage {
6087	return AzureFirewallFqdnTagListResultPage{
6088		fn:     getNextPage,
6089		afftlr: cur,
6090	}
6091}
6092
6093// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties.
6094type AzureFirewallFqdnTagPropertiesFormat struct {
6095	// ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall FQDN tag resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6096	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6097	// FqdnTagName - READ-ONLY; The name of this FQDN Tag.
6098	FqdnTagName *string `json:"fqdnTagName,omitempty"`
6099}
6100
6101// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
6102type AzureFirewallIPConfiguration struct {
6103	// AzureFirewallIPConfigurationPropertiesFormat - Properties of the azure firewall IP configuration.
6104	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
6105	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
6106	Name *string `json:"name,omitempty"`
6107	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6108	Etag *string `json:"etag,omitempty"`
6109	// Type - READ-ONLY; Type of the resource.
6110	Type *string `json:"type,omitempty"`
6111	// ID - Resource ID.
6112	ID *string `json:"id,omitempty"`
6113}
6114
6115// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
6116func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
6117	objectMap := make(map[string]interface{})
6118	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
6119		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
6120	}
6121	if afic.Name != nil {
6122		objectMap["name"] = afic.Name
6123	}
6124	if afic.ID != nil {
6125		objectMap["id"] = afic.ID
6126	}
6127	return json.Marshal(objectMap)
6128}
6129
6130// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
6131func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
6132	var m map[string]*json.RawMessage
6133	err := json.Unmarshal(body, &m)
6134	if err != nil {
6135		return err
6136	}
6137	for k, v := range m {
6138		switch k {
6139		case "properties":
6140			if v != nil {
6141				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
6142				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
6143				if err != nil {
6144					return err
6145				}
6146				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
6147			}
6148		case "name":
6149			if v != nil {
6150				var name string
6151				err = json.Unmarshal(*v, &name)
6152				if err != nil {
6153					return err
6154				}
6155				afic.Name = &name
6156			}
6157		case "etag":
6158			if v != nil {
6159				var etag string
6160				err = json.Unmarshal(*v, &etag)
6161				if err != nil {
6162					return err
6163				}
6164				afic.Etag = &etag
6165			}
6166		case "type":
6167			if v != nil {
6168				var typeVar string
6169				err = json.Unmarshal(*v, &typeVar)
6170				if err != nil {
6171					return err
6172				}
6173				afic.Type = &typeVar
6174			}
6175		case "id":
6176			if v != nil {
6177				var ID string
6178				err = json.Unmarshal(*v, &ID)
6179				if err != nil {
6180					return err
6181				}
6182				afic.ID = &ID
6183			}
6184		}
6185	}
6186
6187	return nil
6188}
6189
6190// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
6191type AzureFirewallIPConfigurationPropertiesFormat struct {
6192	// PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
6193	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
6194	// Subnet - Reference to the subnet resource. This resource must be named 'AzureFirewallSubnet' or 'AzureFirewallManagementSubnet'.
6195	Subnet *SubResource `json:"subnet,omitempty"`
6196	// PublicIPAddress - Reference to the PublicIP resource. This field is a mandatory input if subnet is not null.
6197	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
6198	// ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6199	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6200}
6201
6202// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat.
6203func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
6204	objectMap := make(map[string]interface{})
6205	if aficpf.Subnet != nil {
6206		objectMap["subnet"] = aficpf.Subnet
6207	}
6208	if aficpf.PublicIPAddress != nil {
6209		objectMap["publicIPAddress"] = aficpf.PublicIPAddress
6210	}
6211	return json.Marshal(objectMap)
6212}
6213
6214// AzureFirewallIPGroups ipGroups associated with azure firewall.
6215type AzureFirewallIPGroups struct {
6216	// ID - READ-ONLY; Resource ID.
6217	ID *string `json:"id,omitempty"`
6218	// ChangeNumber - READ-ONLY; The iteration number.
6219	ChangeNumber *string `json:"changeNumber,omitempty"`
6220}
6221
6222// AzureFirewallListResult response for ListAzureFirewalls API service call.
6223type AzureFirewallListResult struct {
6224	autorest.Response `json:"-"`
6225	// Value - List of Azure Firewalls in a resource group.
6226	Value *[]AzureFirewall `json:"value,omitempty"`
6227	// NextLink - URL to get the next set of results.
6228	NextLink *string `json:"nextLink,omitempty"`
6229}
6230
6231// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
6232type AzureFirewallListResultIterator struct {
6233	i    int
6234	page AzureFirewallListResultPage
6235}
6236
6237// NextWithContext advances to the next value.  If there was an error making
6238// the request the iterator does not advance and the error is returned.
6239func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
6240	if tracing.IsEnabled() {
6241		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
6242		defer func() {
6243			sc := -1
6244			if iter.Response().Response.Response != nil {
6245				sc = iter.Response().Response.Response.StatusCode
6246			}
6247			tracing.EndSpan(ctx, sc, err)
6248		}()
6249	}
6250	iter.i++
6251	if iter.i < len(iter.page.Values()) {
6252		return nil
6253	}
6254	err = iter.page.NextWithContext(ctx)
6255	if err != nil {
6256		iter.i--
6257		return err
6258	}
6259	iter.i = 0
6260	return nil
6261}
6262
6263// Next advances to the next value.  If there was an error making
6264// the request the iterator does not advance and the error is returned.
6265// Deprecated: Use NextWithContext() instead.
6266func (iter *AzureFirewallListResultIterator) Next() error {
6267	return iter.NextWithContext(context.Background())
6268}
6269
6270// NotDone returns true if the enumeration should be started or is not yet complete.
6271func (iter AzureFirewallListResultIterator) NotDone() bool {
6272	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6273}
6274
6275// Response returns the raw server response from the last page request.
6276func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
6277	return iter.page.Response()
6278}
6279
6280// Value returns the current value or a zero-initialized value if the
6281// iterator has advanced beyond the end of the collection.
6282func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
6283	if !iter.page.NotDone() {
6284		return AzureFirewall{}
6285	}
6286	return iter.page.Values()[iter.i]
6287}
6288
6289// Creates a new instance of the AzureFirewallListResultIterator type.
6290func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
6291	return AzureFirewallListResultIterator{page: page}
6292}
6293
6294// IsEmpty returns true if the ListResult contains no values.
6295func (aflr AzureFirewallListResult) IsEmpty() bool {
6296	return aflr.Value == nil || len(*aflr.Value) == 0
6297}
6298
6299// hasNextLink returns true if the NextLink is not empty.
6300func (aflr AzureFirewallListResult) hasNextLink() bool {
6301	return aflr.NextLink != nil && len(*aflr.NextLink) != 0
6302}
6303
6304// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
6305// It returns nil if no more results exist.
6306func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
6307	if !aflr.hasNextLink() {
6308		return nil, nil
6309	}
6310	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6311		autorest.AsJSON(),
6312		autorest.AsGet(),
6313		autorest.WithBaseURL(to.String(aflr.NextLink)))
6314}
6315
6316// AzureFirewallListResultPage contains a page of AzureFirewall values.
6317type AzureFirewallListResultPage struct {
6318	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
6319	aflr AzureFirewallListResult
6320}
6321
6322// NextWithContext advances to the next page of values.  If there was an error making
6323// the request the page does not advance and the error is returned.
6324func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
6325	if tracing.IsEnabled() {
6326		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
6327		defer func() {
6328			sc := -1
6329			if page.Response().Response.Response != nil {
6330				sc = page.Response().Response.Response.StatusCode
6331			}
6332			tracing.EndSpan(ctx, sc, err)
6333		}()
6334	}
6335	for {
6336		next, err := page.fn(ctx, page.aflr)
6337		if err != nil {
6338			return err
6339		}
6340		page.aflr = next
6341		if !next.hasNextLink() || !next.IsEmpty() {
6342			break
6343		}
6344	}
6345	return nil
6346}
6347
6348// Next advances to the next page of values.  If there was an error making
6349// the request the page does not advance and the error is returned.
6350// Deprecated: Use NextWithContext() instead.
6351func (page *AzureFirewallListResultPage) Next() error {
6352	return page.NextWithContext(context.Background())
6353}
6354
6355// NotDone returns true if the page enumeration should be started or is not yet complete.
6356func (page AzureFirewallListResultPage) NotDone() bool {
6357	return !page.aflr.IsEmpty()
6358}
6359
6360// Response returns the raw server response from the last page request.
6361func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
6362	return page.aflr
6363}
6364
6365// Values returns the slice of values for the current page or nil if there are no values.
6366func (page AzureFirewallListResultPage) Values() []AzureFirewall {
6367	if page.aflr.IsEmpty() {
6368		return nil
6369	}
6370	return *page.aflr.Value
6371}
6372
6373// Creates a new instance of the AzureFirewallListResultPage type.
6374func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
6375	return AzureFirewallListResultPage{
6376		fn:   getNextPage,
6377		aflr: cur,
6378	}
6379}
6380
6381// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action.
6382type AzureFirewallNatRCAction struct {
6383	// Type - The type of action. Possible values include: 'Snat', 'Dnat'
6384	Type AzureFirewallNatRCActionType `json:"type,omitempty"`
6385}
6386
6387// AzureFirewallNatRule properties of a NAT rule.
6388type AzureFirewallNatRule struct {
6389	// Name - Name of the NAT rule.
6390	Name *string `json:"name,omitempty"`
6391	// Description - Description of the rule.
6392	Description *string `json:"description,omitempty"`
6393	// SourceAddresses - List of source IP addresses for this rule.
6394	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
6395	// DestinationAddresses - List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags.
6396	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
6397	// DestinationPorts - List of destination ports.
6398	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
6399	// Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule.
6400	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
6401	// TranslatedAddress - The translated address for this NAT rule.
6402	TranslatedAddress *string `json:"translatedAddress,omitempty"`
6403	// TranslatedPort - The translated port for this NAT rule.
6404	TranslatedPort *string `json:"translatedPort,omitempty"`
6405	// TranslatedFqdn - The translated FQDN for this NAT rule.
6406	TranslatedFqdn *string `json:"translatedFqdn,omitempty"`
6407	// SourceIPGroups - List of source IpGroups for this rule.
6408	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
6409}
6410
6411// AzureFirewallNatRuleCollection NAT rule collection resource.
6412type AzureFirewallNatRuleCollection struct {
6413	// AzureFirewallNatRuleCollectionProperties - Properties of the azure firewall NAT rule collection.
6414	*AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"`
6415	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
6416	Name *string `json:"name,omitempty"`
6417	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6418	Etag *string `json:"etag,omitempty"`
6419	// ID - Resource ID.
6420	ID *string `json:"id,omitempty"`
6421}
6422
6423// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection.
6424func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) {
6425	objectMap := make(map[string]interface{})
6426	if afnrc.AzureFirewallNatRuleCollectionProperties != nil {
6427		objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties
6428	}
6429	if afnrc.Name != nil {
6430		objectMap["name"] = afnrc.Name
6431	}
6432	if afnrc.ID != nil {
6433		objectMap["id"] = afnrc.ID
6434	}
6435	return json.Marshal(objectMap)
6436}
6437
6438// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct.
6439func (afnrc *AzureFirewallNatRuleCollection) UnmarshalJSON(body []byte) error {
6440	var m map[string]*json.RawMessage
6441	err := json.Unmarshal(body, &m)
6442	if err != nil {
6443		return err
6444	}
6445	for k, v := range m {
6446		switch k {
6447		case "properties":
6448			if v != nil {
6449				var azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties
6450				err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties)
6451				if err != nil {
6452					return err
6453				}
6454				afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties
6455			}
6456		case "name":
6457			if v != nil {
6458				var name string
6459				err = json.Unmarshal(*v, &name)
6460				if err != nil {
6461					return err
6462				}
6463				afnrc.Name = &name
6464			}
6465		case "etag":
6466			if v != nil {
6467				var etag string
6468				err = json.Unmarshal(*v, &etag)
6469				if err != nil {
6470					return err
6471				}
6472				afnrc.Etag = &etag
6473			}
6474		case "id":
6475			if v != nil {
6476				var ID string
6477				err = json.Unmarshal(*v, &ID)
6478				if err != nil {
6479					return err
6480				}
6481				afnrc.ID = &ID
6482			}
6483		}
6484	}
6485
6486	return nil
6487}
6488
6489// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection.
6490type AzureFirewallNatRuleCollectionProperties struct {
6491	// Priority - Priority of the NAT rule collection resource.
6492	Priority *int32 `json:"priority,omitempty"`
6493	// Action - The action type of a NAT rule collection.
6494	Action *AzureFirewallNatRCAction `json:"action,omitempty"`
6495	// Rules - Collection of rules used by a NAT rule collection.
6496	Rules *[]AzureFirewallNatRule `json:"rules,omitempty"`
6497	// ProvisioningState - READ-ONLY; The provisioning state of the NAT rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6498	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6499}
6500
6501// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollectionProperties.
6502func (afnrcp AzureFirewallNatRuleCollectionProperties) MarshalJSON() ([]byte, error) {
6503	objectMap := make(map[string]interface{})
6504	if afnrcp.Priority != nil {
6505		objectMap["priority"] = afnrcp.Priority
6506	}
6507	if afnrcp.Action != nil {
6508		objectMap["action"] = afnrcp.Action
6509	}
6510	if afnrcp.Rules != nil {
6511		objectMap["rules"] = afnrcp.Rules
6512	}
6513	return json.Marshal(objectMap)
6514}
6515
6516// AzureFirewallNetworkRule properties of the network rule.
6517type AzureFirewallNetworkRule struct {
6518	// Name - Name of the network rule.
6519	Name *string `json:"name,omitempty"`
6520	// Description - Description of the rule.
6521	Description *string `json:"description,omitempty"`
6522	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
6523	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
6524	// SourceAddresses - List of source IP addresses for this rule.
6525	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
6526	// DestinationAddresses - List of destination IP addresses.
6527	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
6528	// DestinationPorts - List of destination ports.
6529	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
6530	// DestinationFqdns - List of destination FQDNs.
6531	DestinationFqdns *[]string `json:"destinationFqdns,omitempty"`
6532	// SourceIPGroups - List of source IpGroups for this rule.
6533	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
6534	// DestinationIPGroups - List of destination IpGroups for this rule.
6535	DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"`
6536}
6537
6538// AzureFirewallNetworkRuleCollection network rule collection resource.
6539type AzureFirewallNetworkRuleCollection struct {
6540	// AzureFirewallNetworkRuleCollectionPropertiesFormat - Properties of the azure firewall network rule collection.
6541	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
6542	// Name - The name of the resource that is unique within the Azure firewall. This name can be used to access the resource.
6543	Name *string `json:"name,omitempty"`
6544	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6545	Etag *string `json:"etag,omitempty"`
6546	// ID - Resource ID.
6547	ID *string `json:"id,omitempty"`
6548}
6549
6550// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
6551func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
6552	objectMap := make(map[string]interface{})
6553	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
6554		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
6555	}
6556	if afnrc.Name != nil {
6557		objectMap["name"] = afnrc.Name
6558	}
6559	if afnrc.ID != nil {
6560		objectMap["id"] = afnrc.ID
6561	}
6562	return json.Marshal(objectMap)
6563}
6564
6565// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
6566func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
6567	var m map[string]*json.RawMessage
6568	err := json.Unmarshal(body, &m)
6569	if err != nil {
6570		return err
6571	}
6572	for k, v := range m {
6573		switch k {
6574		case "properties":
6575			if v != nil {
6576				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
6577				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
6578				if err != nil {
6579					return err
6580				}
6581				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
6582			}
6583		case "name":
6584			if v != nil {
6585				var name string
6586				err = json.Unmarshal(*v, &name)
6587				if err != nil {
6588					return err
6589				}
6590				afnrc.Name = &name
6591			}
6592		case "etag":
6593			if v != nil {
6594				var etag string
6595				err = json.Unmarshal(*v, &etag)
6596				if err != nil {
6597					return err
6598				}
6599				afnrc.Etag = &etag
6600			}
6601		case "id":
6602			if v != nil {
6603				var ID string
6604				err = json.Unmarshal(*v, &ID)
6605				if err != nil {
6606					return err
6607				}
6608				afnrc.ID = &ID
6609			}
6610		}
6611	}
6612
6613	return nil
6614}
6615
6616// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
6617type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
6618	// Priority - Priority of the network rule collection resource.
6619	Priority *int32 `json:"priority,omitempty"`
6620	// Action - The action type of a rule collection.
6621	Action *AzureFirewallRCAction `json:"action,omitempty"`
6622	// Rules - Collection of rules used by a network rule collection.
6623	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
6624	// ProvisioningState - READ-ONLY; The provisioning state of the network rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6625	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6626}
6627
6628// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollectionPropertiesFormat.
6629func (afnrcpf AzureFirewallNetworkRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) {
6630	objectMap := make(map[string]interface{})
6631	if afnrcpf.Priority != nil {
6632		objectMap["priority"] = afnrcpf.Priority
6633	}
6634	if afnrcpf.Action != nil {
6635		objectMap["action"] = afnrcpf.Action
6636	}
6637	if afnrcpf.Rules != nil {
6638		objectMap["rules"] = afnrcpf.Rules
6639	}
6640	return json.Marshal(objectMap)
6641}
6642
6643// AzureFirewallPropertiesFormat properties of the Azure Firewall.
6644type AzureFirewallPropertiesFormat struct {
6645	// ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall.
6646	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
6647	// NatRuleCollections - Collection of NAT rule collections used by Azure Firewall.
6648	NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"`
6649	// NetworkRuleCollections - Collection of network rule collections used by Azure Firewall.
6650	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
6651	// IPConfigurations - IP configuration of the Azure Firewall resource.
6652	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
6653	// ManagementIPConfiguration - IP configuration of the Azure Firewall used for management traffic.
6654	ManagementIPConfiguration *AzureFirewallIPConfiguration `json:"managementIpConfiguration,omitempty"`
6655	// ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6656	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6657	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
6658	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
6659	// VirtualHub - The virtualHub to which the firewall belongs.
6660	VirtualHub *SubResource `json:"virtualHub,omitempty"`
6661	// FirewallPolicy - The firewallPolicy associated with this azure firewall.
6662	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
6663	// HubIPAddresses - IP addresses associated with AzureFirewall.
6664	HubIPAddresses *HubIPAddresses `json:"hubIPAddresses,omitempty"`
6665	// IPGroups - READ-ONLY; IpGroups associated with AzureFirewall.
6666	IPGroups *[]AzureFirewallIPGroups `json:"ipGroups,omitempty"`
6667	// Sku - The Azure Firewall Resource SKU.
6668	Sku *AzureFirewallSku `json:"sku,omitempty"`
6669	// AdditionalProperties - The additional properties used to further config this azure firewall.
6670	AdditionalProperties map[string]*string `json:"additionalProperties"`
6671}
6672
6673// MarshalJSON is the custom marshaler for AzureFirewallPropertiesFormat.
6674func (afpf AzureFirewallPropertiesFormat) MarshalJSON() ([]byte, error) {
6675	objectMap := make(map[string]interface{})
6676	if afpf.ApplicationRuleCollections != nil {
6677		objectMap["applicationRuleCollections"] = afpf.ApplicationRuleCollections
6678	}
6679	if afpf.NatRuleCollections != nil {
6680		objectMap["natRuleCollections"] = afpf.NatRuleCollections
6681	}
6682	if afpf.NetworkRuleCollections != nil {
6683		objectMap["networkRuleCollections"] = afpf.NetworkRuleCollections
6684	}
6685	if afpf.IPConfigurations != nil {
6686		objectMap["ipConfigurations"] = afpf.IPConfigurations
6687	}
6688	if afpf.ManagementIPConfiguration != nil {
6689		objectMap["managementIpConfiguration"] = afpf.ManagementIPConfiguration
6690	}
6691	if afpf.ThreatIntelMode != "" {
6692		objectMap["threatIntelMode"] = afpf.ThreatIntelMode
6693	}
6694	if afpf.VirtualHub != nil {
6695		objectMap["virtualHub"] = afpf.VirtualHub
6696	}
6697	if afpf.FirewallPolicy != nil {
6698		objectMap["firewallPolicy"] = afpf.FirewallPolicy
6699	}
6700	if afpf.HubIPAddresses != nil {
6701		objectMap["hubIPAddresses"] = afpf.HubIPAddresses
6702	}
6703	if afpf.Sku != nil {
6704		objectMap["sku"] = afpf.Sku
6705	}
6706	if afpf.AdditionalProperties != nil {
6707		objectMap["additionalProperties"] = afpf.AdditionalProperties
6708	}
6709	return json.Marshal(objectMap)
6710}
6711
6712// AzureFirewallPublicIPAddress public IP Address associated with azure firewall.
6713type AzureFirewallPublicIPAddress struct {
6714	// Address - Public IP Address value.
6715	Address *string `json:"address,omitempty"`
6716}
6717
6718// AzureFirewallRCAction properties of the AzureFirewallRCAction.
6719type AzureFirewallRCAction struct {
6720	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
6721	Type AzureFirewallRCActionType `json:"type,omitempty"`
6722}
6723
6724// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6725// long-running operation.
6726type AzureFirewallsCreateOrUpdateFuture struct {
6727	azure.FutureAPI
6728	// Result returns the result of the asynchronous operation.
6729	// If the operation has not completed it will return an error.
6730	Result func(AzureFirewallsClient) (AzureFirewall, error)
6731}
6732
6733// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
6734// operation.
6735type AzureFirewallsDeleteFuture struct {
6736	azure.FutureAPI
6737	// Result returns the result of the asynchronous operation.
6738	// If the operation has not completed it will return an error.
6739	Result func(AzureFirewallsClient) (autorest.Response, error)
6740}
6741
6742// AzureFirewallSku SKU of an Azure Firewall.
6743type AzureFirewallSku struct {
6744	// Name - Name of an Azure Firewall SKU. Possible values include: 'AZFWVNet', 'AZFWHub'
6745	Name AzureFirewallSkuName `json:"name,omitempty"`
6746	// Tier - Tier of an Azure Firewall. Possible values include: 'Standard', 'Premium'
6747	Tier AzureFirewallSkuTier `json:"tier,omitempty"`
6748}
6749
6750// AzureFirewallsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
6751// long-running operation.
6752type AzureFirewallsUpdateTagsFuture struct {
6753	azure.FutureAPI
6754	// Result returns the result of the asynchronous operation.
6755	// If the operation has not completed it will return an error.
6756	Result func(AzureFirewallsClient) (AzureFirewall, error)
6757}
6758
6759// AzureReachabilityReport azure reachability report details.
6760type AzureReachabilityReport struct {
6761	autorest.Response `json:"-"`
6762	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
6763	AggregationLevel *string `json:"aggregationLevel,omitempty"`
6764	// ProviderLocation - Parameters that define a geographic location.
6765	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
6766	// ReachabilityReport - List of Azure reachability report items.
6767	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
6768}
6769
6770// AzureReachabilityReportItem azure reachability report details for a given provider location.
6771type AzureReachabilityReportItem struct {
6772	// Provider - The Internet service provider.
6773	Provider *string `json:"provider,omitempty"`
6774	// AzureLocation - The Azure region.
6775	AzureLocation *string `json:"azureLocation,omitempty"`
6776	// Latencies - List of latency details for each of the time series.
6777	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
6778}
6779
6780// AzureReachabilityReportLatencyInfo details on latency for a time series.
6781type AzureReachabilityReportLatencyInfo struct {
6782	// TimeStamp - The time stamp.
6783	TimeStamp *date.Time `json:"timeStamp,omitempty"`
6784	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
6785	Score *int32 `json:"score,omitempty"`
6786}
6787
6788// AzureReachabilityReportLocation parameters that define a geographic location.
6789type AzureReachabilityReportLocation struct {
6790	// Country - The name of the country.
6791	Country *string `json:"country,omitempty"`
6792	// State - The name of the state.
6793	State *string `json:"state,omitempty"`
6794	// City - The name of the city or town.
6795	City *string `json:"city,omitempty"`
6796}
6797
6798// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
6799type AzureReachabilityReportParameters struct {
6800	// ProviderLocation - Parameters that define a geographic location.
6801	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
6802	// Providers - List of Internet service providers.
6803	Providers *[]string `json:"providers,omitempty"`
6804	// AzureLocations - Optional Azure regions to scope the query to.
6805	AzureLocations *[]string `json:"azureLocations,omitempty"`
6806	// StartTime - The start time for the Azure reachability report.
6807	StartTime *date.Time `json:"startTime,omitempty"`
6808	// EndTime - The end time for the Azure reachability report.
6809	EndTime *date.Time `json:"endTime,omitempty"`
6810}
6811
6812// AzureWebCategory azure Web Category Resource.
6813type AzureWebCategory struct {
6814	autorest.Response `json:"-"`
6815	// AzureWebCategoryPropertiesFormat - Properties of the Azure Web Category.
6816	*AzureWebCategoryPropertiesFormat `json:"properties,omitempty"`
6817	// ID - Resource ID.
6818	ID *string `json:"id,omitempty"`
6819	// Name - READ-ONLY; Resource name.
6820	Name *string `json:"name,omitempty"`
6821	// Type - READ-ONLY; Resource type.
6822	Type *string `json:"type,omitempty"`
6823	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6824	Etag *string `json:"etag,omitempty"`
6825}
6826
6827// MarshalJSON is the custom marshaler for AzureWebCategory.
6828func (awc AzureWebCategory) MarshalJSON() ([]byte, error) {
6829	objectMap := make(map[string]interface{})
6830	if awc.AzureWebCategoryPropertiesFormat != nil {
6831		objectMap["properties"] = awc.AzureWebCategoryPropertiesFormat
6832	}
6833	if awc.ID != nil {
6834		objectMap["id"] = awc.ID
6835	}
6836	return json.Marshal(objectMap)
6837}
6838
6839// UnmarshalJSON is the custom unmarshaler for AzureWebCategory struct.
6840func (awc *AzureWebCategory) UnmarshalJSON(body []byte) error {
6841	var m map[string]*json.RawMessage
6842	err := json.Unmarshal(body, &m)
6843	if err != nil {
6844		return err
6845	}
6846	for k, v := range m {
6847		switch k {
6848		case "properties":
6849			if v != nil {
6850				var azureWebCategoryPropertiesFormat AzureWebCategoryPropertiesFormat
6851				err = json.Unmarshal(*v, &azureWebCategoryPropertiesFormat)
6852				if err != nil {
6853					return err
6854				}
6855				awc.AzureWebCategoryPropertiesFormat = &azureWebCategoryPropertiesFormat
6856			}
6857		case "id":
6858			if v != nil {
6859				var ID string
6860				err = json.Unmarshal(*v, &ID)
6861				if err != nil {
6862					return err
6863				}
6864				awc.ID = &ID
6865			}
6866		case "name":
6867			if v != nil {
6868				var name string
6869				err = json.Unmarshal(*v, &name)
6870				if err != nil {
6871					return err
6872				}
6873				awc.Name = &name
6874			}
6875		case "type":
6876			if v != nil {
6877				var typeVar string
6878				err = json.Unmarshal(*v, &typeVar)
6879				if err != nil {
6880					return err
6881				}
6882				awc.Type = &typeVar
6883			}
6884		case "etag":
6885			if v != nil {
6886				var etag string
6887				err = json.Unmarshal(*v, &etag)
6888				if err != nil {
6889					return err
6890				}
6891				awc.Etag = &etag
6892			}
6893		}
6894	}
6895
6896	return nil
6897}
6898
6899// AzureWebCategoryListResult response for ListAzureWebCategories API service call.
6900type AzureWebCategoryListResult struct {
6901	autorest.Response `json:"-"`
6902	// Value - List of Azure Web Categories for a given Subscription.
6903	Value *[]AzureWebCategory `json:"value,omitempty"`
6904	// NextLink - URL to get the next set of results.
6905	NextLink *string `json:"nextLink,omitempty"`
6906}
6907
6908// AzureWebCategoryListResultIterator provides access to a complete listing of AzureWebCategory values.
6909type AzureWebCategoryListResultIterator struct {
6910	i    int
6911	page AzureWebCategoryListResultPage
6912}
6913
6914// NextWithContext advances to the next value.  If there was an error making
6915// the request the iterator does not advance and the error is returned.
6916func (iter *AzureWebCategoryListResultIterator) NextWithContext(ctx context.Context) (err error) {
6917	if tracing.IsEnabled() {
6918		ctx = tracing.StartSpan(ctx, fqdn+"/AzureWebCategoryListResultIterator.NextWithContext")
6919		defer func() {
6920			sc := -1
6921			if iter.Response().Response.Response != nil {
6922				sc = iter.Response().Response.Response.StatusCode
6923			}
6924			tracing.EndSpan(ctx, sc, err)
6925		}()
6926	}
6927	iter.i++
6928	if iter.i < len(iter.page.Values()) {
6929		return nil
6930	}
6931	err = iter.page.NextWithContext(ctx)
6932	if err != nil {
6933		iter.i--
6934		return err
6935	}
6936	iter.i = 0
6937	return nil
6938}
6939
6940// Next advances to the next value.  If there was an error making
6941// the request the iterator does not advance and the error is returned.
6942// Deprecated: Use NextWithContext() instead.
6943func (iter *AzureWebCategoryListResultIterator) Next() error {
6944	return iter.NextWithContext(context.Background())
6945}
6946
6947// NotDone returns true if the enumeration should be started or is not yet complete.
6948func (iter AzureWebCategoryListResultIterator) NotDone() bool {
6949	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6950}
6951
6952// Response returns the raw server response from the last page request.
6953func (iter AzureWebCategoryListResultIterator) Response() AzureWebCategoryListResult {
6954	return iter.page.Response()
6955}
6956
6957// Value returns the current value or a zero-initialized value if the
6958// iterator has advanced beyond the end of the collection.
6959func (iter AzureWebCategoryListResultIterator) Value() AzureWebCategory {
6960	if !iter.page.NotDone() {
6961		return AzureWebCategory{}
6962	}
6963	return iter.page.Values()[iter.i]
6964}
6965
6966// Creates a new instance of the AzureWebCategoryListResultIterator type.
6967func NewAzureWebCategoryListResultIterator(page AzureWebCategoryListResultPage) AzureWebCategoryListResultIterator {
6968	return AzureWebCategoryListResultIterator{page: page}
6969}
6970
6971// IsEmpty returns true if the ListResult contains no values.
6972func (awclr AzureWebCategoryListResult) IsEmpty() bool {
6973	return awclr.Value == nil || len(*awclr.Value) == 0
6974}
6975
6976// hasNextLink returns true if the NextLink is not empty.
6977func (awclr AzureWebCategoryListResult) hasNextLink() bool {
6978	return awclr.NextLink != nil && len(*awclr.NextLink) != 0
6979}
6980
6981// azureWebCategoryListResultPreparer prepares a request to retrieve the next set of results.
6982// It returns nil if no more results exist.
6983func (awclr AzureWebCategoryListResult) azureWebCategoryListResultPreparer(ctx context.Context) (*http.Request, error) {
6984	if !awclr.hasNextLink() {
6985		return nil, nil
6986	}
6987	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6988		autorest.AsJSON(),
6989		autorest.AsGet(),
6990		autorest.WithBaseURL(to.String(awclr.NextLink)))
6991}
6992
6993// AzureWebCategoryListResultPage contains a page of AzureWebCategory values.
6994type AzureWebCategoryListResultPage struct {
6995	fn    func(context.Context, AzureWebCategoryListResult) (AzureWebCategoryListResult, error)
6996	awclr AzureWebCategoryListResult
6997}
6998
6999// NextWithContext advances to the next page of values.  If there was an error making
7000// the request the page does not advance and the error is returned.
7001func (page *AzureWebCategoryListResultPage) NextWithContext(ctx context.Context) (err error) {
7002	if tracing.IsEnabled() {
7003		ctx = tracing.StartSpan(ctx, fqdn+"/AzureWebCategoryListResultPage.NextWithContext")
7004		defer func() {
7005			sc := -1
7006			if page.Response().Response.Response != nil {
7007				sc = page.Response().Response.Response.StatusCode
7008			}
7009			tracing.EndSpan(ctx, sc, err)
7010		}()
7011	}
7012	for {
7013		next, err := page.fn(ctx, page.awclr)
7014		if err != nil {
7015			return err
7016		}
7017		page.awclr = next
7018		if !next.hasNextLink() || !next.IsEmpty() {
7019			break
7020		}
7021	}
7022	return nil
7023}
7024
7025// Next advances to the next page of values.  If there was an error making
7026// the request the page does not advance and the error is returned.
7027// Deprecated: Use NextWithContext() instead.
7028func (page *AzureWebCategoryListResultPage) Next() error {
7029	return page.NextWithContext(context.Background())
7030}
7031
7032// NotDone returns true if the page enumeration should be started or is not yet complete.
7033func (page AzureWebCategoryListResultPage) NotDone() bool {
7034	return !page.awclr.IsEmpty()
7035}
7036
7037// Response returns the raw server response from the last page request.
7038func (page AzureWebCategoryListResultPage) Response() AzureWebCategoryListResult {
7039	return page.awclr
7040}
7041
7042// Values returns the slice of values for the current page or nil if there are no values.
7043func (page AzureWebCategoryListResultPage) Values() []AzureWebCategory {
7044	if page.awclr.IsEmpty() {
7045		return nil
7046	}
7047	return *page.awclr.Value
7048}
7049
7050// Creates a new instance of the AzureWebCategoryListResultPage type.
7051func NewAzureWebCategoryListResultPage(cur AzureWebCategoryListResult, getNextPage func(context.Context, AzureWebCategoryListResult) (AzureWebCategoryListResult, error)) AzureWebCategoryListResultPage {
7052	return AzureWebCategoryListResultPage{
7053		fn:    getNextPage,
7054		awclr: cur,
7055	}
7056}
7057
7058// AzureWebCategoryPropertiesFormat azure Web Category Properties.
7059type AzureWebCategoryPropertiesFormat struct {
7060	// Group - READ-ONLY; The name of the group that the category belongs to.
7061	Group *string `json:"group,omitempty"`
7062}
7063
7064// BackendAddressPool pool of backend IP addresses.
7065type BackendAddressPool struct {
7066	autorest.Response `json:"-"`
7067	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
7068	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
7069	// 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.
7070	Name *string `json:"name,omitempty"`
7071	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7072	Etag *string `json:"etag,omitempty"`
7073	// Type - READ-ONLY; Type of the resource.
7074	Type *string `json:"type,omitempty"`
7075	// ID - Resource ID.
7076	ID *string `json:"id,omitempty"`
7077}
7078
7079// MarshalJSON is the custom marshaler for BackendAddressPool.
7080func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
7081	objectMap := make(map[string]interface{})
7082	if bap.BackendAddressPoolPropertiesFormat != nil {
7083		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
7084	}
7085	if bap.Name != nil {
7086		objectMap["name"] = bap.Name
7087	}
7088	if bap.ID != nil {
7089		objectMap["id"] = bap.ID
7090	}
7091	return json.Marshal(objectMap)
7092}
7093
7094// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
7095func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
7096	var m map[string]*json.RawMessage
7097	err := json.Unmarshal(body, &m)
7098	if err != nil {
7099		return err
7100	}
7101	for k, v := range m {
7102		switch k {
7103		case "properties":
7104			if v != nil {
7105				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
7106				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
7107				if err != nil {
7108					return err
7109				}
7110				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
7111			}
7112		case "name":
7113			if v != nil {
7114				var name string
7115				err = json.Unmarshal(*v, &name)
7116				if err != nil {
7117					return err
7118				}
7119				bap.Name = &name
7120			}
7121		case "etag":
7122			if v != nil {
7123				var etag string
7124				err = json.Unmarshal(*v, &etag)
7125				if err != nil {
7126					return err
7127				}
7128				bap.Etag = &etag
7129			}
7130		case "type":
7131			if v != nil {
7132				var typeVar string
7133				err = json.Unmarshal(*v, &typeVar)
7134				if err != nil {
7135					return err
7136				}
7137				bap.Type = &typeVar
7138			}
7139		case "id":
7140			if v != nil {
7141				var ID string
7142				err = json.Unmarshal(*v, &ID)
7143				if err != nil {
7144					return err
7145				}
7146				bap.ID = &ID
7147			}
7148		}
7149	}
7150
7151	return nil
7152}
7153
7154// BackendAddressPoolPropertiesFormat properties of the backend address pool.
7155type BackendAddressPoolPropertiesFormat struct {
7156	// Location - The location of the backend address pool.
7157	Location *string `json:"location,omitempty"`
7158	// LoadBalancerBackendAddresses - An array of backend addresses.
7159	LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"`
7160	// BackendIPConfigurations - READ-ONLY; An array of references to IP addresses defined in network interfaces.
7161	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
7162	// LoadBalancingRules - READ-ONLY; An array of references to load balancing rules that use this backend address pool.
7163	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
7164	// OutboundRule - READ-ONLY; A reference to an outbound rule that uses this backend address pool.
7165	OutboundRule *SubResource `json:"outboundRule,omitempty"`
7166	// OutboundRules - READ-ONLY; An array of references to outbound rules that use this backend address pool.
7167	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
7168	// ProvisioningState - READ-ONLY; The provisioning state of the backend address pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
7169	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
7170}
7171
7172// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
7173func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
7174	objectMap := make(map[string]interface{})
7175	if bappf.Location != nil {
7176		objectMap["location"] = bappf.Location
7177	}
7178	if bappf.LoadBalancerBackendAddresses != nil {
7179		objectMap["loadBalancerBackendAddresses"] = bappf.LoadBalancerBackendAddresses
7180	}
7181	return json.Marshal(objectMap)
7182}
7183
7184// BastionActiveSession the session detail for a target.
7185type BastionActiveSession struct {
7186	// SessionID - READ-ONLY; A unique id for the session.
7187	SessionID *string `json:"sessionId,omitempty"`
7188	// StartTime - READ-ONLY; The time when the session started.
7189	StartTime interface{} `json:"startTime,omitempty"`
7190	// TargetSubscriptionID - READ-ONLY; The subscription id for the target virtual machine.
7191	TargetSubscriptionID *string `json:"targetSubscriptionId,omitempty"`
7192	// ResourceType - READ-ONLY; The type of the resource.
7193	ResourceType *string `json:"resourceType,omitempty"`
7194	// TargetHostName - READ-ONLY; The host name of the target.
7195	TargetHostName *string `json:"targetHostName,omitempty"`
7196	// TargetResourceGroup - READ-ONLY; The resource group of the target.
7197	TargetResourceGroup *string `json:"targetResourceGroup,omitempty"`
7198	// UserName - READ-ONLY; The user name who is active on this session.
7199	UserName *string `json:"userName,omitempty"`
7200	// TargetIPAddress - READ-ONLY; The IP Address of the target.
7201	TargetIPAddress *string `json:"targetIpAddress,omitempty"`
7202	// Protocol - READ-ONLY; The protocol used to connect to the target. Possible values include: 'SSH', 'RDP'
7203	Protocol BastionConnectProtocol `json:"protocol,omitempty"`
7204	// TargetResourceID - READ-ONLY; The resource id of the target.
7205	TargetResourceID *string `json:"targetResourceId,omitempty"`
7206	// SessionDurationInMins - READ-ONLY; Duration in mins the session has been active.
7207	SessionDurationInMins *float64 `json:"sessionDurationInMins,omitempty"`
7208}
7209
7210// BastionActiveSessionListResult response for GetActiveSessions.
7211type BastionActiveSessionListResult struct {
7212	autorest.Response `json:"-"`
7213	// Value - List of active sessions on the bastion.
7214	Value *[]BastionActiveSession `json:"value,omitempty"`
7215	// NextLink - The URL to get the next set of results.
7216	NextLink *string `json:"nextLink,omitempty"`
7217}
7218
7219// BastionActiveSessionListResultIterator provides access to a complete listing of BastionActiveSession
7220// values.
7221type BastionActiveSessionListResultIterator struct {
7222	i    int
7223	page BastionActiveSessionListResultPage
7224}
7225
7226// NextWithContext advances to the next value.  If there was an error making
7227// the request the iterator does not advance and the error is returned.
7228func (iter *BastionActiveSessionListResultIterator) NextWithContext(ctx context.Context) (err error) {
7229	if tracing.IsEnabled() {
7230		ctx = tracing.StartSpan(ctx, fqdn+"/BastionActiveSessionListResultIterator.NextWithContext")
7231		defer func() {
7232			sc := -1
7233			if iter.Response().Response.Response != nil {
7234				sc = iter.Response().Response.Response.StatusCode
7235			}
7236			tracing.EndSpan(ctx, sc, err)
7237		}()
7238	}
7239	iter.i++
7240	if iter.i < len(iter.page.Values()) {
7241		return nil
7242	}
7243	err = iter.page.NextWithContext(ctx)
7244	if err != nil {
7245		iter.i--
7246		return err
7247	}
7248	iter.i = 0
7249	return nil
7250}
7251
7252// Next advances to the next value.  If there was an error making
7253// the request the iterator does not advance and the error is returned.
7254// Deprecated: Use NextWithContext() instead.
7255func (iter *BastionActiveSessionListResultIterator) Next() error {
7256	return iter.NextWithContext(context.Background())
7257}
7258
7259// NotDone returns true if the enumeration should be started or is not yet complete.
7260func (iter BastionActiveSessionListResultIterator) NotDone() bool {
7261	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7262}
7263
7264// Response returns the raw server response from the last page request.
7265func (iter BastionActiveSessionListResultIterator) Response() BastionActiveSessionListResult {
7266	return iter.page.Response()
7267}
7268
7269// Value returns the current value or a zero-initialized value if the
7270// iterator has advanced beyond the end of the collection.
7271func (iter BastionActiveSessionListResultIterator) Value() BastionActiveSession {
7272	if !iter.page.NotDone() {
7273		return BastionActiveSession{}
7274	}
7275	return iter.page.Values()[iter.i]
7276}
7277
7278// Creates a new instance of the BastionActiveSessionListResultIterator type.
7279func NewBastionActiveSessionListResultIterator(page BastionActiveSessionListResultPage) BastionActiveSessionListResultIterator {
7280	return BastionActiveSessionListResultIterator{page: page}
7281}
7282
7283// IsEmpty returns true if the ListResult contains no values.
7284func (baslr BastionActiveSessionListResult) IsEmpty() bool {
7285	return baslr.Value == nil || len(*baslr.Value) == 0
7286}
7287
7288// hasNextLink returns true if the NextLink is not empty.
7289func (baslr BastionActiveSessionListResult) hasNextLink() bool {
7290	return baslr.NextLink != nil && len(*baslr.NextLink) != 0
7291}
7292
7293// bastionActiveSessionListResultPreparer prepares a request to retrieve the next set of results.
7294// It returns nil if no more results exist.
7295func (baslr BastionActiveSessionListResult) bastionActiveSessionListResultPreparer(ctx context.Context) (*http.Request, error) {
7296	if !baslr.hasNextLink() {
7297		return nil, nil
7298	}
7299	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7300		autorest.AsJSON(),
7301		autorest.AsGet(),
7302		autorest.WithBaseURL(to.String(baslr.NextLink)))
7303}
7304
7305// BastionActiveSessionListResultPage contains a page of BastionActiveSession values.
7306type BastionActiveSessionListResultPage struct {
7307	fn    func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error)
7308	baslr BastionActiveSessionListResult
7309}
7310
7311// NextWithContext advances to the next page of values.  If there was an error making
7312// the request the page does not advance and the error is returned.
7313func (page *BastionActiveSessionListResultPage) NextWithContext(ctx context.Context) (err error) {
7314	if tracing.IsEnabled() {
7315		ctx = tracing.StartSpan(ctx, fqdn+"/BastionActiveSessionListResultPage.NextWithContext")
7316		defer func() {
7317			sc := -1
7318			if page.Response().Response.Response != nil {
7319				sc = page.Response().Response.Response.StatusCode
7320			}
7321			tracing.EndSpan(ctx, sc, err)
7322		}()
7323	}
7324	for {
7325		next, err := page.fn(ctx, page.baslr)
7326		if err != nil {
7327			return err
7328		}
7329		page.baslr = next
7330		if !next.hasNextLink() || !next.IsEmpty() {
7331			break
7332		}
7333	}
7334	return nil
7335}
7336
7337// Next advances to the next page of values.  If there was an error making
7338// the request the page does not advance and the error is returned.
7339// Deprecated: Use NextWithContext() instead.
7340func (page *BastionActiveSessionListResultPage) Next() error {
7341	return page.NextWithContext(context.Background())
7342}
7343
7344// NotDone returns true if the page enumeration should be started or is not yet complete.
7345func (page BastionActiveSessionListResultPage) NotDone() bool {
7346	return !page.baslr.IsEmpty()
7347}
7348
7349// Response returns the raw server response from the last page request.
7350func (page BastionActiveSessionListResultPage) Response() BastionActiveSessionListResult {
7351	return page.baslr
7352}
7353
7354// Values returns the slice of values for the current page or nil if there are no values.
7355func (page BastionActiveSessionListResultPage) Values() []BastionActiveSession {
7356	if page.baslr.IsEmpty() {
7357		return nil
7358	}
7359	return *page.baslr.Value
7360}
7361
7362// Creates a new instance of the BastionActiveSessionListResultPage type.
7363func NewBastionActiveSessionListResultPage(cur BastionActiveSessionListResult, getNextPage func(context.Context, BastionActiveSessionListResult) (BastionActiveSessionListResult, error)) BastionActiveSessionListResultPage {
7364	return BastionActiveSessionListResultPage{
7365		fn:    getNextPage,
7366		baslr: cur,
7367	}
7368}
7369
7370// BastionHost bastion Host resource.
7371type BastionHost struct {
7372	autorest.Response `json:"-"`
7373	// BastionHostPropertiesFormat - Represents the bastion host resource.
7374	*BastionHostPropertiesFormat `json:"properties,omitempty"`
7375	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7376	Etag *string `json:"etag,omitempty"`
7377	// ID - Resource ID.
7378	ID *string `json:"id,omitempty"`
7379	// Name - READ-ONLY; Resource name.
7380	Name *string `json:"name,omitempty"`
7381	// Type - READ-ONLY; Resource type.
7382	Type *string `json:"type,omitempty"`
7383	// Location - Resource location.
7384	Location *string `json:"location,omitempty"`
7385	// Tags - Resource tags.
7386	Tags map[string]*string `json:"tags"`
7387}
7388
7389// MarshalJSON is the custom marshaler for BastionHost.
7390func (bh BastionHost) MarshalJSON() ([]byte, error) {
7391	objectMap := make(map[string]interface{})
7392	if bh.BastionHostPropertiesFormat != nil {
7393		objectMap["properties"] = bh.BastionHostPropertiesFormat
7394	}
7395	if bh.ID != nil {
7396		objectMap["id"] = bh.ID
7397	}
7398	if bh.Location != nil {
7399		objectMap["location"] = bh.Location
7400	}
7401	if bh.Tags != nil {
7402		objectMap["tags"] = bh.Tags
7403	}
7404	return json.Marshal(objectMap)
7405}
7406
7407// UnmarshalJSON is the custom unmarshaler for BastionHost struct.
7408func (bh *BastionHost) UnmarshalJSON(body []byte) error {
7409	var m map[string]*json.RawMessage
7410	err := json.Unmarshal(body, &m)
7411	if err != nil {
7412		return err
7413	}
7414	for k, v := range m {
7415		switch k {
7416		case "properties":
7417			if v != nil {
7418				var bastionHostPropertiesFormat BastionHostPropertiesFormat
7419				err = json.Unmarshal(*v, &bastionHostPropertiesFormat)
7420				if err != nil {
7421					return err
7422				}
7423				bh.BastionHostPropertiesFormat = &bastionHostPropertiesFormat
7424			}
7425		case "etag":
7426			if v != nil {
7427				var etag string
7428				err = json.Unmarshal(*v, &etag)
7429				if err != nil {
7430					return err
7431				}
7432				bh.Etag = &etag
7433			}
7434		case "id":
7435			if v != nil {
7436				var ID string
7437				err = json.Unmarshal(*v, &ID)
7438				if err != nil {
7439					return err
7440				}
7441				bh.ID = &ID
7442			}
7443		case "name":
7444			if v != nil {
7445				var name string
7446				err = json.Unmarshal(*v, &name)
7447				if err != nil {
7448					return err
7449				}
7450				bh.Name = &name
7451			}
7452		case "type":
7453			if v != nil {
7454				var typeVar string
7455				err = json.Unmarshal(*v, &typeVar)
7456				if err != nil {
7457					return err
7458				}
7459				bh.Type = &typeVar
7460			}
7461		case "location":
7462			if v != nil {
7463				var location string
7464				err = json.Unmarshal(*v, &location)
7465				if err != nil {
7466					return err
7467				}
7468				bh.Location = &location
7469			}
7470		case "tags":
7471			if v != nil {
7472				var tags map[string]*string
7473				err = json.Unmarshal(*v, &tags)
7474				if err != nil {
7475					return err
7476				}
7477				bh.Tags = tags
7478			}
7479		}
7480	}
7481
7482	return nil
7483}
7484
7485// BastionHostIPConfiguration IP configuration of an Bastion Host.
7486type BastionHostIPConfiguration struct {
7487	// BastionHostIPConfigurationPropertiesFormat - Represents the ip configuration associated with the resource.
7488	*BastionHostIPConfigurationPropertiesFormat `json:"properties,omitempty"`
7489	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
7490	Name *string `json:"name,omitempty"`
7491	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7492	Etag *string `json:"etag,omitempty"`
7493	// Type - READ-ONLY; Ip configuration type.
7494	Type *string `json:"type,omitempty"`
7495	// ID - Resource ID.
7496	ID *string `json:"id,omitempty"`
7497}
7498
7499// MarshalJSON is the custom marshaler for BastionHostIPConfiguration.
7500func (bhic BastionHostIPConfiguration) MarshalJSON() ([]byte, error) {
7501	objectMap := make(map[string]interface{})
7502	if bhic.BastionHostIPConfigurationPropertiesFormat != nil {
7503		objectMap["properties"] = bhic.BastionHostIPConfigurationPropertiesFormat
7504	}
7505	if bhic.Name != nil {
7506		objectMap["name"] = bhic.Name
7507	}
7508	if bhic.ID != nil {
7509		objectMap["id"] = bhic.ID
7510	}
7511	return json.Marshal(objectMap)
7512}
7513
7514// UnmarshalJSON is the custom unmarshaler for BastionHostIPConfiguration struct.
7515func (bhic *BastionHostIPConfiguration) UnmarshalJSON(body []byte) error {
7516	var m map[string]*json.RawMessage
7517	err := json.Unmarshal(body, &m)
7518	if err != nil {
7519		return err
7520	}
7521	for k, v := range m {
7522		switch k {
7523		case "properties":
7524			if v != nil {
7525				var bastionHostIPConfigurationPropertiesFormat BastionHostIPConfigurationPropertiesFormat
7526				err = json.Unmarshal(*v, &bastionHostIPConfigurationPropertiesFormat)
7527				if err != nil {
7528					return err
7529				}
7530				bhic.BastionHostIPConfigurationPropertiesFormat = &bastionHostIPConfigurationPropertiesFormat
7531			}
7532		case "name":
7533			if v != nil {
7534				var name string
7535				err = json.Unmarshal(*v, &name)
7536				if err != nil {
7537					return err
7538				}
7539				bhic.Name = &name
7540			}
7541		case "etag":
7542			if v != nil {
7543				var etag string
7544				err = json.Unmarshal(*v, &etag)
7545				if err != nil {
7546					return err
7547				}
7548				bhic.Etag = &etag
7549			}
7550		case "type":
7551			if v != nil {
7552				var typeVar string
7553				err = json.Unmarshal(*v, &typeVar)
7554				if err != nil {
7555					return err
7556				}
7557				bhic.Type = &typeVar
7558			}
7559		case "id":
7560			if v != nil {
7561				var ID string
7562				err = json.Unmarshal(*v, &ID)
7563				if err != nil {
7564					return err
7565				}
7566				bhic.ID = &ID
7567			}
7568		}
7569	}
7570
7571	return nil
7572}
7573
7574// BastionHostIPConfigurationPropertiesFormat properties of IP configuration of an Bastion Host.
7575type BastionHostIPConfigurationPropertiesFormat struct {
7576	// Subnet - Reference of the subnet resource.
7577	Subnet *SubResource `json:"subnet,omitempty"`
7578	// PublicIPAddress - Reference of the PublicIP resource.
7579	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
7580	// ProvisioningState - READ-ONLY; The provisioning state of the bastion host IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
7581	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
7582	// PrivateIPAllocationMethod - Private IP allocation method. Possible values include: 'Static', 'Dynamic'
7583	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
7584}
7585
7586// MarshalJSON is the custom marshaler for BastionHostIPConfigurationPropertiesFormat.
7587func (bhicpf BastionHostIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
7588	objectMap := make(map[string]interface{})
7589	if bhicpf.Subnet != nil {
7590		objectMap["subnet"] = bhicpf.Subnet
7591	}
7592	if bhicpf.PublicIPAddress != nil {
7593		objectMap["publicIPAddress"] = bhicpf.PublicIPAddress
7594	}
7595	if bhicpf.PrivateIPAllocationMethod != "" {
7596		objectMap["privateIPAllocationMethod"] = bhicpf.PrivateIPAllocationMethod
7597	}
7598	return json.Marshal(objectMap)
7599}
7600
7601// BastionHostListResult response for ListBastionHosts API service call.
7602type BastionHostListResult struct {
7603	autorest.Response `json:"-"`
7604	// Value - List of Bastion Hosts in a resource group.
7605	Value *[]BastionHost `json:"value,omitempty"`
7606	// NextLink - URL to get the next set of results.
7607	NextLink *string `json:"nextLink,omitempty"`
7608}
7609
7610// BastionHostListResultIterator provides access to a complete listing of BastionHost values.
7611type BastionHostListResultIterator struct {
7612	i    int
7613	page BastionHostListResultPage
7614}
7615
7616// NextWithContext advances to the next value.  If there was an error making
7617// the request the iterator does not advance and the error is returned.
7618func (iter *BastionHostListResultIterator) NextWithContext(ctx context.Context) (err error) {
7619	if tracing.IsEnabled() {
7620		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultIterator.NextWithContext")
7621		defer func() {
7622			sc := -1
7623			if iter.Response().Response.Response != nil {
7624				sc = iter.Response().Response.Response.StatusCode
7625			}
7626			tracing.EndSpan(ctx, sc, err)
7627		}()
7628	}
7629	iter.i++
7630	if iter.i < len(iter.page.Values()) {
7631		return nil
7632	}
7633	err = iter.page.NextWithContext(ctx)
7634	if err != nil {
7635		iter.i--
7636		return err
7637	}
7638	iter.i = 0
7639	return nil
7640}
7641
7642// Next advances to the next value.  If there was an error making
7643// the request the iterator does not advance and the error is returned.
7644// Deprecated: Use NextWithContext() instead.
7645func (iter *BastionHostListResultIterator) Next() error {
7646	return iter.NextWithContext(context.Background())
7647}
7648
7649// NotDone returns true if the enumeration should be started or is not yet complete.
7650func (iter BastionHostListResultIterator) NotDone() bool {
7651	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7652}
7653
7654// Response returns the raw server response from the last page request.
7655func (iter BastionHostListResultIterator) Response() BastionHostListResult {
7656	return iter.page.Response()
7657}
7658
7659// Value returns the current value or a zero-initialized value if the
7660// iterator has advanced beyond the end of the collection.
7661func (iter BastionHostListResultIterator) Value() BastionHost {
7662	if !iter.page.NotDone() {
7663		return BastionHost{}
7664	}
7665	return iter.page.Values()[iter.i]
7666}
7667
7668// Creates a new instance of the BastionHostListResultIterator type.
7669func NewBastionHostListResultIterator(page BastionHostListResultPage) BastionHostListResultIterator {
7670	return BastionHostListResultIterator{page: page}
7671}
7672
7673// IsEmpty returns true if the ListResult contains no values.
7674func (bhlr BastionHostListResult) IsEmpty() bool {
7675	return bhlr.Value == nil || len(*bhlr.Value) == 0
7676}
7677
7678// hasNextLink returns true if the NextLink is not empty.
7679func (bhlr BastionHostListResult) hasNextLink() bool {
7680	return bhlr.NextLink != nil && len(*bhlr.NextLink) != 0
7681}
7682
7683// bastionHostListResultPreparer prepares a request to retrieve the next set of results.
7684// It returns nil if no more results exist.
7685func (bhlr BastionHostListResult) bastionHostListResultPreparer(ctx context.Context) (*http.Request, error) {
7686	if !bhlr.hasNextLink() {
7687		return nil, nil
7688	}
7689	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7690		autorest.AsJSON(),
7691		autorest.AsGet(),
7692		autorest.WithBaseURL(to.String(bhlr.NextLink)))
7693}
7694
7695// BastionHostListResultPage contains a page of BastionHost values.
7696type BastionHostListResultPage struct {
7697	fn   func(context.Context, BastionHostListResult) (BastionHostListResult, error)
7698	bhlr BastionHostListResult
7699}
7700
7701// NextWithContext advances to the next page of values.  If there was an error making
7702// the request the page does not advance and the error is returned.
7703func (page *BastionHostListResultPage) NextWithContext(ctx context.Context) (err error) {
7704	if tracing.IsEnabled() {
7705		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultPage.NextWithContext")
7706		defer func() {
7707			sc := -1
7708			if page.Response().Response.Response != nil {
7709				sc = page.Response().Response.Response.StatusCode
7710			}
7711			tracing.EndSpan(ctx, sc, err)
7712		}()
7713	}
7714	for {
7715		next, err := page.fn(ctx, page.bhlr)
7716		if err != nil {
7717			return err
7718		}
7719		page.bhlr = next
7720		if !next.hasNextLink() || !next.IsEmpty() {
7721			break
7722		}
7723	}
7724	return nil
7725}
7726
7727// Next advances to the next page of values.  If there was an error making
7728// the request the page does not advance and the error is returned.
7729// Deprecated: Use NextWithContext() instead.
7730func (page *BastionHostListResultPage) Next() error {
7731	return page.NextWithContext(context.Background())
7732}
7733
7734// NotDone returns true if the page enumeration should be started or is not yet complete.
7735func (page BastionHostListResultPage) NotDone() bool {
7736	return !page.bhlr.IsEmpty()
7737}
7738
7739// Response returns the raw server response from the last page request.
7740func (page BastionHostListResultPage) Response() BastionHostListResult {
7741	return page.bhlr
7742}
7743
7744// Values returns the slice of values for the current page or nil if there are no values.
7745func (page BastionHostListResultPage) Values() []BastionHost {
7746	if page.bhlr.IsEmpty() {
7747		return nil
7748	}
7749	return *page.bhlr.Value
7750}
7751
7752// Creates a new instance of the BastionHostListResultPage type.
7753func NewBastionHostListResultPage(cur BastionHostListResult, getNextPage func(context.Context, BastionHostListResult) (BastionHostListResult, error)) BastionHostListResultPage {
7754	return BastionHostListResultPage{
7755		fn:   getNextPage,
7756		bhlr: cur,
7757	}
7758}
7759
7760// BastionHostPropertiesFormat properties of the Bastion Host.
7761type BastionHostPropertiesFormat struct {
7762	// IPConfigurations - IP configuration of the Bastion Host resource.
7763	IPConfigurations *[]BastionHostIPConfiguration `json:"ipConfigurations,omitempty"`
7764	// DNSName - FQDN for the endpoint on which bastion host is accessible.
7765	DNSName *string `json:"dnsName,omitempty"`
7766	// ProvisioningState - READ-ONLY; The provisioning state of the bastion host resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
7767	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
7768}
7769
7770// MarshalJSON is the custom marshaler for BastionHostPropertiesFormat.
7771func (bhpf BastionHostPropertiesFormat) MarshalJSON() ([]byte, error) {
7772	objectMap := make(map[string]interface{})
7773	if bhpf.IPConfigurations != nil {
7774		objectMap["ipConfigurations"] = bhpf.IPConfigurations
7775	}
7776	if bhpf.DNSName != nil {
7777		objectMap["dnsName"] = bhpf.DNSName
7778	}
7779	return json.Marshal(objectMap)
7780}
7781
7782// BastionHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7783// long-running operation.
7784type BastionHostsCreateOrUpdateFuture struct {
7785	azure.FutureAPI
7786	// Result returns the result of the asynchronous operation.
7787	// If the operation has not completed it will return an error.
7788	Result func(BastionHostsClient) (BastionHost, error)
7789}
7790
7791// BastionHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
7792// operation.
7793type BastionHostsDeleteFuture struct {
7794	azure.FutureAPI
7795	// Result returns the result of the asynchronous operation.
7796	// If the operation has not completed it will return an error.
7797	Result func(BastionHostsClient) (autorest.Response, error)
7798}
7799
7800// BastionSessionDeleteResult response for DisconnectActiveSessions.
7801type BastionSessionDeleteResult struct {
7802	autorest.Response `json:"-"`
7803	// Value - List of sessions with their corresponding state.
7804	Value *[]BastionSessionState `json:"value,omitempty"`
7805	// NextLink - The URL to get the next set of results.
7806	NextLink *string `json:"nextLink,omitempty"`
7807}
7808
7809// BastionSessionDeleteResultIterator provides access to a complete listing of BastionSessionState values.
7810type BastionSessionDeleteResultIterator struct {
7811	i    int
7812	page BastionSessionDeleteResultPage
7813}
7814
7815// NextWithContext advances to the next value.  If there was an error making
7816// the request the iterator does not advance and the error is returned.
7817func (iter *BastionSessionDeleteResultIterator) NextWithContext(ctx context.Context) (err error) {
7818	if tracing.IsEnabled() {
7819		ctx = tracing.StartSpan(ctx, fqdn+"/BastionSessionDeleteResultIterator.NextWithContext")
7820		defer func() {
7821			sc := -1
7822			if iter.Response().Response.Response != nil {
7823				sc = iter.Response().Response.Response.StatusCode
7824			}
7825			tracing.EndSpan(ctx, sc, err)
7826		}()
7827	}
7828	iter.i++
7829	if iter.i < len(iter.page.Values()) {
7830		return nil
7831	}
7832	err = iter.page.NextWithContext(ctx)
7833	if err != nil {
7834		iter.i--
7835		return err
7836	}
7837	iter.i = 0
7838	return nil
7839}
7840
7841// Next advances to the next value.  If there was an error making
7842// the request the iterator does not advance and the error is returned.
7843// Deprecated: Use NextWithContext() instead.
7844func (iter *BastionSessionDeleteResultIterator) Next() error {
7845	return iter.NextWithContext(context.Background())
7846}
7847
7848// NotDone returns true if the enumeration should be started or is not yet complete.
7849func (iter BastionSessionDeleteResultIterator) NotDone() bool {
7850	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7851}
7852
7853// Response returns the raw server response from the last page request.
7854func (iter BastionSessionDeleteResultIterator) Response() BastionSessionDeleteResult {
7855	return iter.page.Response()
7856}
7857
7858// Value returns the current value or a zero-initialized value if the
7859// iterator has advanced beyond the end of the collection.
7860func (iter BastionSessionDeleteResultIterator) Value() BastionSessionState {
7861	if !iter.page.NotDone() {
7862		return BastionSessionState{}
7863	}
7864	return iter.page.Values()[iter.i]
7865}
7866
7867// Creates a new instance of the BastionSessionDeleteResultIterator type.
7868func NewBastionSessionDeleteResultIterator(page BastionSessionDeleteResultPage) BastionSessionDeleteResultIterator {
7869	return BastionSessionDeleteResultIterator{page: page}
7870}
7871
7872// IsEmpty returns true if the ListResult contains no values.
7873func (bsdr BastionSessionDeleteResult) IsEmpty() bool {
7874	return bsdr.Value == nil || len(*bsdr.Value) == 0
7875}
7876
7877// hasNextLink returns true if the NextLink is not empty.
7878func (bsdr BastionSessionDeleteResult) hasNextLink() bool {
7879	return bsdr.NextLink != nil && len(*bsdr.NextLink) != 0
7880}
7881
7882// bastionSessionDeleteResultPreparer prepares a request to retrieve the next set of results.
7883// It returns nil if no more results exist.
7884func (bsdr BastionSessionDeleteResult) bastionSessionDeleteResultPreparer(ctx context.Context) (*http.Request, error) {
7885	if !bsdr.hasNextLink() {
7886		return nil, nil
7887	}
7888	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7889		autorest.AsJSON(),
7890		autorest.AsGet(),
7891		autorest.WithBaseURL(to.String(bsdr.NextLink)))
7892}
7893
7894// BastionSessionDeleteResultPage contains a page of BastionSessionState values.
7895type BastionSessionDeleteResultPage struct {
7896	fn   func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error)
7897	bsdr BastionSessionDeleteResult
7898}
7899
7900// NextWithContext advances to the next page of values.  If there was an error making
7901// the request the page does not advance and the error is returned.
7902func (page *BastionSessionDeleteResultPage) NextWithContext(ctx context.Context) (err error) {
7903	if tracing.IsEnabled() {
7904		ctx = tracing.StartSpan(ctx, fqdn+"/BastionSessionDeleteResultPage.NextWithContext")
7905		defer func() {
7906			sc := -1
7907			if page.Response().Response.Response != nil {
7908				sc = page.Response().Response.Response.StatusCode
7909			}
7910			tracing.EndSpan(ctx, sc, err)
7911		}()
7912	}
7913	for {
7914		next, err := page.fn(ctx, page.bsdr)
7915		if err != nil {
7916			return err
7917		}
7918		page.bsdr = next
7919		if !next.hasNextLink() || !next.IsEmpty() {
7920			break
7921		}
7922	}
7923	return nil
7924}
7925
7926// Next advances to the next page of values.  If there was an error making
7927// the request the page does not advance and the error is returned.
7928// Deprecated: Use NextWithContext() instead.
7929func (page *BastionSessionDeleteResultPage) Next() error {
7930	return page.NextWithContext(context.Background())
7931}
7932
7933// NotDone returns true if the page enumeration should be started or is not yet complete.
7934func (page BastionSessionDeleteResultPage) NotDone() bool {
7935	return !page.bsdr.IsEmpty()
7936}
7937
7938// Response returns the raw server response from the last page request.
7939func (page BastionSessionDeleteResultPage) Response() BastionSessionDeleteResult {
7940	return page.bsdr
7941}
7942
7943// Values returns the slice of values for the current page or nil if there are no values.
7944func (page BastionSessionDeleteResultPage) Values() []BastionSessionState {
7945	if page.bsdr.IsEmpty() {
7946		return nil
7947	}
7948	return *page.bsdr.Value
7949}
7950
7951// Creates a new instance of the BastionSessionDeleteResultPage type.
7952func NewBastionSessionDeleteResultPage(cur BastionSessionDeleteResult, getNextPage func(context.Context, BastionSessionDeleteResult) (BastionSessionDeleteResult, error)) BastionSessionDeleteResultPage {
7953	return BastionSessionDeleteResultPage{
7954		fn:   getNextPage,
7955		bsdr: cur,
7956	}
7957}
7958
7959// BastionSessionState the session state detail for a target.
7960type BastionSessionState struct {
7961	// SessionID - READ-ONLY; A unique id for the session.
7962	SessionID *string `json:"sessionId,omitempty"`
7963	// Message - READ-ONLY; Used for extra information.
7964	Message *string `json:"message,omitempty"`
7965	// State - READ-ONLY; The state of the session. Disconnected/Failed/NotFound.
7966	State *string `json:"state,omitempty"`
7967}
7968
7969// BastionShareableLink bastion Shareable Link.
7970type BastionShareableLink struct {
7971	// VM - Reference of the virtual machine resource.
7972	VM *VM `json:"vm,omitempty"`
7973	// Bsl - READ-ONLY; The unique Bastion Shareable Link to the virtual machine.
7974	Bsl *string `json:"bsl,omitempty"`
7975	// CreatedAt - READ-ONLY; The time when the link was created.
7976	CreatedAt *string `json:"createdAt,omitempty"`
7977	// Message - READ-ONLY; Optional field indicating the warning or error message related to the vm in case of partial failure.
7978	Message *string `json:"message,omitempty"`
7979}
7980
7981// MarshalJSON is the custom marshaler for BastionShareableLink.
7982func (bsl BastionShareableLink) MarshalJSON() ([]byte, error) {
7983	objectMap := make(map[string]interface{})
7984	if bsl.VM != nil {
7985		objectMap["vm"] = bsl.VM
7986	}
7987	return json.Marshal(objectMap)
7988}
7989
7990// BastionShareableLinkListRequest post request for all the Bastion Shareable Link endpoints.
7991type BastionShareableLinkListRequest struct {
7992	// Vms - List of VM references.
7993	Vms *[]BastionShareableLink `json:"vms,omitempty"`
7994}
7995
7996// BastionShareableLinkListResult response for all the Bastion Shareable Link endpoints.
7997type BastionShareableLinkListResult struct {
7998	autorest.Response `json:"-"`
7999	// Value - List of Bastion Shareable Links for the request.
8000	Value *[]BastionShareableLink `json:"value,omitempty"`
8001	// NextLink - The URL to get the next set of results.
8002	NextLink *string `json:"nextLink,omitempty"`
8003}
8004
8005// BastionShareableLinkListResultIterator provides access to a complete listing of BastionShareableLink
8006// values.
8007type BastionShareableLinkListResultIterator struct {
8008	i    int
8009	page BastionShareableLinkListResultPage
8010}
8011
8012// NextWithContext advances to the next value.  If there was an error making
8013// the request the iterator does not advance and the error is returned.
8014func (iter *BastionShareableLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
8015	if tracing.IsEnabled() {
8016		ctx = tracing.StartSpan(ctx, fqdn+"/BastionShareableLinkListResultIterator.NextWithContext")
8017		defer func() {
8018			sc := -1
8019			if iter.Response().Response.Response != nil {
8020				sc = iter.Response().Response.Response.StatusCode
8021			}
8022			tracing.EndSpan(ctx, sc, err)
8023		}()
8024	}
8025	iter.i++
8026	if iter.i < len(iter.page.Values()) {
8027		return nil
8028	}
8029	err = iter.page.NextWithContext(ctx)
8030	if err != nil {
8031		iter.i--
8032		return err
8033	}
8034	iter.i = 0
8035	return nil
8036}
8037
8038// Next advances to the next value.  If there was an error making
8039// the request the iterator does not advance and the error is returned.
8040// Deprecated: Use NextWithContext() instead.
8041func (iter *BastionShareableLinkListResultIterator) Next() error {
8042	return iter.NextWithContext(context.Background())
8043}
8044
8045// NotDone returns true if the enumeration should be started or is not yet complete.
8046func (iter BastionShareableLinkListResultIterator) NotDone() bool {
8047	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8048}
8049
8050// Response returns the raw server response from the last page request.
8051func (iter BastionShareableLinkListResultIterator) Response() BastionShareableLinkListResult {
8052	return iter.page.Response()
8053}
8054
8055// Value returns the current value or a zero-initialized value if the
8056// iterator has advanced beyond the end of the collection.
8057func (iter BastionShareableLinkListResultIterator) Value() BastionShareableLink {
8058	if !iter.page.NotDone() {
8059		return BastionShareableLink{}
8060	}
8061	return iter.page.Values()[iter.i]
8062}
8063
8064// Creates a new instance of the BastionShareableLinkListResultIterator type.
8065func NewBastionShareableLinkListResultIterator(page BastionShareableLinkListResultPage) BastionShareableLinkListResultIterator {
8066	return BastionShareableLinkListResultIterator{page: page}
8067}
8068
8069// IsEmpty returns true if the ListResult contains no values.
8070func (bsllr BastionShareableLinkListResult) IsEmpty() bool {
8071	return bsllr.Value == nil || len(*bsllr.Value) == 0
8072}
8073
8074// hasNextLink returns true if the NextLink is not empty.
8075func (bsllr BastionShareableLinkListResult) hasNextLink() bool {
8076	return bsllr.NextLink != nil && len(*bsllr.NextLink) != 0
8077}
8078
8079// bastionShareableLinkListResultPreparer prepares a request to retrieve the next set of results.
8080// It returns nil if no more results exist.
8081func (bsllr BastionShareableLinkListResult) bastionShareableLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
8082	if !bsllr.hasNextLink() {
8083		return nil, nil
8084	}
8085	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8086		autorest.AsJSON(),
8087		autorest.AsGet(),
8088		autorest.WithBaseURL(to.String(bsllr.NextLink)))
8089}
8090
8091// BastionShareableLinkListResultPage contains a page of BastionShareableLink values.
8092type BastionShareableLinkListResultPage struct {
8093	fn    func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error)
8094	bsllr BastionShareableLinkListResult
8095}
8096
8097// NextWithContext advances to the next page of values.  If there was an error making
8098// the request the page does not advance and the error is returned.
8099func (page *BastionShareableLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
8100	if tracing.IsEnabled() {
8101		ctx = tracing.StartSpan(ctx, fqdn+"/BastionShareableLinkListResultPage.NextWithContext")
8102		defer func() {
8103			sc := -1
8104			if page.Response().Response.Response != nil {
8105				sc = page.Response().Response.Response.StatusCode
8106			}
8107			tracing.EndSpan(ctx, sc, err)
8108		}()
8109	}
8110	for {
8111		next, err := page.fn(ctx, page.bsllr)
8112		if err != nil {
8113			return err
8114		}
8115		page.bsllr = next
8116		if !next.hasNextLink() || !next.IsEmpty() {
8117			break
8118		}
8119	}
8120	return nil
8121}
8122
8123// Next advances to the next page of values.  If there was an error making
8124// the request the page does not advance and the error is returned.
8125// Deprecated: Use NextWithContext() instead.
8126func (page *BastionShareableLinkListResultPage) Next() error {
8127	return page.NextWithContext(context.Background())
8128}
8129
8130// NotDone returns true if the page enumeration should be started or is not yet complete.
8131func (page BastionShareableLinkListResultPage) NotDone() bool {
8132	return !page.bsllr.IsEmpty()
8133}
8134
8135// Response returns the raw server response from the last page request.
8136func (page BastionShareableLinkListResultPage) Response() BastionShareableLinkListResult {
8137	return page.bsllr
8138}
8139
8140// Values returns the slice of values for the current page or nil if there are no values.
8141func (page BastionShareableLinkListResultPage) Values() []BastionShareableLink {
8142	if page.bsllr.IsEmpty() {
8143		return nil
8144	}
8145	return *page.bsllr.Value
8146}
8147
8148// Creates a new instance of the BastionShareableLinkListResultPage type.
8149func NewBastionShareableLinkListResultPage(cur BastionShareableLinkListResult, getNextPage func(context.Context, BastionShareableLinkListResult) (BastionShareableLinkListResult, error)) BastionShareableLinkListResultPage {
8150	return BastionShareableLinkListResultPage{
8151		fn:    getNextPage,
8152		bsllr: cur,
8153	}
8154}
8155
8156// BGPCommunity contains bgp community information offered in Service Community resources.
8157type BGPCommunity struct {
8158	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
8159	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
8160	// CommunityName - The name of the bgp community. e.g. Skype.
8161	CommunityName *string `json:"communityName,omitempty"`
8162	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
8163	CommunityValue *string `json:"communityValue,omitempty"`
8164	// CommunityPrefixes - The prefixes that the bgp community contains.
8165	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
8166	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
8167	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
8168	// ServiceGroup - The service group of the bgp community contains.
8169	ServiceGroup *string `json:"serviceGroup,omitempty"`
8170}
8171
8172// BgpConnection virtual Appliance Site resource.
8173type BgpConnection struct {
8174	autorest.Response `json:"-"`
8175	// BgpConnectionProperties - The properties of the Bgp connections.
8176	*BgpConnectionProperties `json:"properties,omitempty"`
8177	// Name - Name of the connection.
8178	Name *string `json:"name,omitempty"`
8179	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8180	Etag *string `json:"etag,omitempty"`
8181	// Type - READ-ONLY; Connection type.
8182	Type *string `json:"type,omitempty"`
8183	// ID - Resource ID.
8184	ID *string `json:"id,omitempty"`
8185}
8186
8187// MarshalJSON is the custom marshaler for BgpConnection.
8188func (bc BgpConnection) MarshalJSON() ([]byte, error) {
8189	objectMap := make(map[string]interface{})
8190	if bc.BgpConnectionProperties != nil {
8191		objectMap["properties"] = bc.BgpConnectionProperties
8192	}
8193	if bc.Name != nil {
8194		objectMap["name"] = bc.Name
8195	}
8196	if bc.ID != nil {
8197		objectMap["id"] = bc.ID
8198	}
8199	return json.Marshal(objectMap)
8200}
8201
8202// UnmarshalJSON is the custom unmarshaler for BgpConnection struct.
8203func (bc *BgpConnection) UnmarshalJSON(body []byte) error {
8204	var m map[string]*json.RawMessage
8205	err := json.Unmarshal(body, &m)
8206	if err != nil {
8207		return err
8208	}
8209	for k, v := range m {
8210		switch k {
8211		case "properties":
8212			if v != nil {
8213				var bgpConnectionProperties BgpConnectionProperties
8214				err = json.Unmarshal(*v, &bgpConnectionProperties)
8215				if err != nil {
8216					return err
8217				}
8218				bc.BgpConnectionProperties = &bgpConnectionProperties
8219			}
8220		case "name":
8221			if v != nil {
8222				var name string
8223				err = json.Unmarshal(*v, &name)
8224				if err != nil {
8225					return err
8226				}
8227				bc.Name = &name
8228			}
8229		case "etag":
8230			if v != nil {
8231				var etag string
8232				err = json.Unmarshal(*v, &etag)
8233				if err != nil {
8234					return err
8235				}
8236				bc.Etag = &etag
8237			}
8238		case "type":
8239			if v != nil {
8240				var typeVar string
8241				err = json.Unmarshal(*v, &typeVar)
8242				if err != nil {
8243					return err
8244				}
8245				bc.Type = &typeVar
8246			}
8247		case "id":
8248			if v != nil {
8249				var ID string
8250				err = json.Unmarshal(*v, &ID)
8251				if err != nil {
8252					return err
8253				}
8254				bc.ID = &ID
8255			}
8256		}
8257	}
8258
8259	return nil
8260}
8261
8262// BgpConnectionProperties properties of the bgp connection.
8263type BgpConnectionProperties struct {
8264	// PeerAsn - Peer ASN.
8265	PeerAsn *int64 `json:"peerAsn,omitempty"`
8266	// PeerIP - Peer IP.
8267	PeerIP *string `json:"peerIp,omitempty"`
8268	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
8269	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8270	// ConnectionState - READ-ONLY; The current state of the VirtualHub to Peer. Possible values include: 'HubBgpConnectionStatusUnknown', 'HubBgpConnectionStatusConnecting', 'HubBgpConnectionStatusConnected', 'HubBgpConnectionStatusNotConnected'
8271	ConnectionState HubBgpConnectionStatus `json:"connectionState,omitempty"`
8272}
8273
8274// MarshalJSON is the custom marshaler for BgpConnectionProperties.
8275func (bcp BgpConnectionProperties) MarshalJSON() ([]byte, error) {
8276	objectMap := make(map[string]interface{})
8277	if bcp.PeerAsn != nil {
8278		objectMap["peerAsn"] = bcp.PeerAsn
8279	}
8280	if bcp.PeerIP != nil {
8281		objectMap["peerIp"] = bcp.PeerIP
8282	}
8283	return json.Marshal(objectMap)
8284}
8285
8286// BgpPeerStatus BGP peer status details.
8287type BgpPeerStatus struct {
8288	// LocalAddress - READ-ONLY; The virtual network gateway's local address.
8289	LocalAddress *string `json:"localAddress,omitempty"`
8290	// Neighbor - READ-ONLY; The remote BGP peer.
8291	Neighbor *string `json:"neighbor,omitempty"`
8292	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer.
8293	Asn *int64 `json:"asn,omitempty"`
8294	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
8295	State BgpPeerState `json:"state,omitempty"`
8296	// ConnectedDuration - READ-ONLY; For how long the peering has been up.
8297	ConnectedDuration *string `json:"connectedDuration,omitempty"`
8298	// RoutesReceived - READ-ONLY; The number of routes learned from this peer.
8299	RoutesReceived *int64 `json:"routesReceived,omitempty"`
8300	// MessagesSent - READ-ONLY; The number of BGP messages sent.
8301	MessagesSent *int64 `json:"messagesSent,omitempty"`
8302	// MessagesReceived - READ-ONLY; The number of BGP messages received.
8303	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
8304}
8305
8306// BgpPeerStatusListResult response for list BGP peer status API service call.
8307type BgpPeerStatusListResult struct {
8308	autorest.Response `json:"-"`
8309	// Value - List of BGP peers.
8310	Value *[]BgpPeerStatus `json:"value,omitempty"`
8311}
8312
8313// BgpServiceCommunity service Community Properties.
8314type BgpServiceCommunity struct {
8315	// BgpServiceCommunityPropertiesFormat - Properties of the BGP service community.
8316	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
8317	// ID - Resource ID.
8318	ID *string `json:"id,omitempty"`
8319	// Name - READ-ONLY; Resource name.
8320	Name *string `json:"name,omitempty"`
8321	// Type - READ-ONLY; Resource type.
8322	Type *string `json:"type,omitempty"`
8323	// Location - Resource location.
8324	Location *string `json:"location,omitempty"`
8325	// Tags - Resource tags.
8326	Tags map[string]*string `json:"tags"`
8327}
8328
8329// MarshalJSON is the custom marshaler for BgpServiceCommunity.
8330func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
8331	objectMap := make(map[string]interface{})
8332	if bsc.BgpServiceCommunityPropertiesFormat != nil {
8333		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
8334	}
8335	if bsc.ID != nil {
8336		objectMap["id"] = bsc.ID
8337	}
8338	if bsc.Location != nil {
8339		objectMap["location"] = bsc.Location
8340	}
8341	if bsc.Tags != nil {
8342		objectMap["tags"] = bsc.Tags
8343	}
8344	return json.Marshal(objectMap)
8345}
8346
8347// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
8348func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
8349	var m map[string]*json.RawMessage
8350	err := json.Unmarshal(body, &m)
8351	if err != nil {
8352		return err
8353	}
8354	for k, v := range m {
8355		switch k {
8356		case "properties":
8357			if v != nil {
8358				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
8359				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
8360				if err != nil {
8361					return err
8362				}
8363				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
8364			}
8365		case "id":
8366			if v != nil {
8367				var ID string
8368				err = json.Unmarshal(*v, &ID)
8369				if err != nil {
8370					return err
8371				}
8372				bsc.ID = &ID
8373			}
8374		case "name":
8375			if v != nil {
8376				var name string
8377				err = json.Unmarshal(*v, &name)
8378				if err != nil {
8379					return err
8380				}
8381				bsc.Name = &name
8382			}
8383		case "type":
8384			if v != nil {
8385				var typeVar string
8386				err = json.Unmarshal(*v, &typeVar)
8387				if err != nil {
8388					return err
8389				}
8390				bsc.Type = &typeVar
8391			}
8392		case "location":
8393			if v != nil {
8394				var location string
8395				err = json.Unmarshal(*v, &location)
8396				if err != nil {
8397					return err
8398				}
8399				bsc.Location = &location
8400			}
8401		case "tags":
8402			if v != nil {
8403				var tags map[string]*string
8404				err = json.Unmarshal(*v, &tags)
8405				if err != nil {
8406					return err
8407				}
8408				bsc.Tags = tags
8409			}
8410		}
8411	}
8412
8413	return nil
8414}
8415
8416// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
8417type BgpServiceCommunityListResult struct {
8418	autorest.Response `json:"-"`
8419	// Value - A list of service community resources.
8420	Value *[]BgpServiceCommunity `json:"value,omitempty"`
8421	// NextLink - The URL to get the next set of results.
8422	NextLink *string `json:"nextLink,omitempty"`
8423}
8424
8425// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
8426// values.
8427type BgpServiceCommunityListResultIterator struct {
8428	i    int
8429	page BgpServiceCommunityListResultPage
8430}
8431
8432// NextWithContext advances to the next value.  If there was an error making
8433// the request the iterator does not advance and the error is returned.
8434func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
8435	if tracing.IsEnabled() {
8436		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
8437		defer func() {
8438			sc := -1
8439			if iter.Response().Response.Response != nil {
8440				sc = iter.Response().Response.Response.StatusCode
8441			}
8442			tracing.EndSpan(ctx, sc, err)
8443		}()
8444	}
8445	iter.i++
8446	if iter.i < len(iter.page.Values()) {
8447		return nil
8448	}
8449	err = iter.page.NextWithContext(ctx)
8450	if err != nil {
8451		iter.i--
8452		return err
8453	}
8454	iter.i = 0
8455	return nil
8456}
8457
8458// Next advances to the next value.  If there was an error making
8459// the request the iterator does not advance and the error is returned.
8460// Deprecated: Use NextWithContext() instead.
8461func (iter *BgpServiceCommunityListResultIterator) Next() error {
8462	return iter.NextWithContext(context.Background())
8463}
8464
8465// NotDone returns true if the enumeration should be started or is not yet complete.
8466func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
8467	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8468}
8469
8470// Response returns the raw server response from the last page request.
8471func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
8472	return iter.page.Response()
8473}
8474
8475// Value returns the current value or a zero-initialized value if the
8476// iterator has advanced beyond the end of the collection.
8477func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
8478	if !iter.page.NotDone() {
8479		return BgpServiceCommunity{}
8480	}
8481	return iter.page.Values()[iter.i]
8482}
8483
8484// Creates a new instance of the BgpServiceCommunityListResultIterator type.
8485func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
8486	return BgpServiceCommunityListResultIterator{page: page}
8487}
8488
8489// IsEmpty returns true if the ListResult contains no values.
8490func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
8491	return bsclr.Value == nil || len(*bsclr.Value) == 0
8492}
8493
8494// hasNextLink returns true if the NextLink is not empty.
8495func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
8496	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
8497}
8498
8499// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
8500// It returns nil if no more results exist.
8501func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
8502	if !bsclr.hasNextLink() {
8503		return nil, nil
8504	}
8505	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8506		autorest.AsJSON(),
8507		autorest.AsGet(),
8508		autorest.WithBaseURL(to.String(bsclr.NextLink)))
8509}
8510
8511// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
8512type BgpServiceCommunityListResultPage struct {
8513	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
8514	bsclr BgpServiceCommunityListResult
8515}
8516
8517// NextWithContext advances to the next page of values.  If there was an error making
8518// the request the page does not advance and the error is returned.
8519func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
8520	if tracing.IsEnabled() {
8521		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
8522		defer func() {
8523			sc := -1
8524			if page.Response().Response.Response != nil {
8525				sc = page.Response().Response.Response.StatusCode
8526			}
8527			tracing.EndSpan(ctx, sc, err)
8528		}()
8529	}
8530	for {
8531		next, err := page.fn(ctx, page.bsclr)
8532		if err != nil {
8533			return err
8534		}
8535		page.bsclr = next
8536		if !next.hasNextLink() || !next.IsEmpty() {
8537			break
8538		}
8539	}
8540	return nil
8541}
8542
8543// Next advances to the next page of values.  If there was an error making
8544// the request the page does not advance and the error is returned.
8545// Deprecated: Use NextWithContext() instead.
8546func (page *BgpServiceCommunityListResultPage) Next() error {
8547	return page.NextWithContext(context.Background())
8548}
8549
8550// NotDone returns true if the page enumeration should be started or is not yet complete.
8551func (page BgpServiceCommunityListResultPage) NotDone() bool {
8552	return !page.bsclr.IsEmpty()
8553}
8554
8555// Response returns the raw server response from the last page request.
8556func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
8557	return page.bsclr
8558}
8559
8560// Values returns the slice of values for the current page or nil if there are no values.
8561func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
8562	if page.bsclr.IsEmpty() {
8563		return nil
8564	}
8565	return *page.bsclr.Value
8566}
8567
8568// Creates a new instance of the BgpServiceCommunityListResultPage type.
8569func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
8570	return BgpServiceCommunityListResultPage{
8571		fn:    getNextPage,
8572		bsclr: cur,
8573	}
8574}
8575
8576// BgpServiceCommunityPropertiesFormat properties of Service Community.
8577type BgpServiceCommunityPropertiesFormat struct {
8578	// ServiceName - The name of the bgp community. e.g. Skype.
8579	ServiceName *string `json:"serviceName,omitempty"`
8580	// BgpCommunities - A list of bgp communities.
8581	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
8582}
8583
8584// BgpSettings BGP settings details.
8585type BgpSettings struct {
8586	// Asn - The BGP speaker's ASN.
8587	Asn *int64 `json:"asn,omitempty"`
8588	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
8589	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
8590	// PeerWeight - The weight added to routes learned from this BGP speaker.
8591	PeerWeight *int32 `json:"peerWeight,omitempty"`
8592	// BgpPeeringAddresses - BGP peering address with IP configuration ID for virtual network gateway.
8593	BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"`
8594}
8595
8596// BreakOutCategoryPolicies network Virtual Appliance Sku Properties.
8597type BreakOutCategoryPolicies struct {
8598	// Allow - Flag to control breakout of o365 allow category.
8599	Allow *bool `json:"allow,omitempty"`
8600	// Optimize - Flag to control breakout of o365 optimize category.
8601	Optimize *bool `json:"optimize,omitempty"`
8602	// Default - Flag to control breakout of o365 default category.
8603	Default *bool `json:"default,omitempty"`
8604}
8605
8606// CheckPrivateLinkServiceVisibilityRequest request body of the CheckPrivateLinkServiceVisibility API
8607// service call.
8608type CheckPrivateLinkServiceVisibilityRequest struct {
8609	// PrivateLinkServiceAlias - The alias of the private link service.
8610	PrivateLinkServiceAlias *string `json:"privateLinkServiceAlias,omitempty"`
8611}
8612
8613// CloudError an error response from the service.
8614type CloudError struct {
8615	// Error - Cloud error body.
8616	Error *CloudErrorBody `json:"error,omitempty"`
8617}
8618
8619// CloudErrorBody an error response from the service.
8620type CloudErrorBody struct {
8621	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
8622	Code *string `json:"code,omitempty"`
8623	// Message - A message describing the error, intended to be suitable for display in a user interface.
8624	Message *string `json:"message,omitempty"`
8625	// Target - The target of the particular error. For example, the name of the property in error.
8626	Target *string `json:"target,omitempty"`
8627	// Details - A list of additional details about the error.
8628	Details *[]CloudErrorBody `json:"details,omitempty"`
8629}
8630
8631// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
8632type ConfigurationDiagnosticParameters struct {
8633	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
8634	TargetResourceID *string `json:"targetResourceId,omitempty"`
8635	// VerbosityLevel - Verbosity level. Possible values include: 'VerbosityLevelNormal', 'VerbosityLevelMinimum', 'VerbosityLevelFull'
8636	VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"`
8637	// Profiles - List of network configuration diagnostic profiles.
8638	Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"`
8639}
8640
8641// ConfigurationDiagnosticProfile parameters to compare with network configuration.
8642type ConfigurationDiagnosticProfile struct {
8643	// Direction - The direction of the traffic. Possible values include: 'Inbound', 'Outbound'
8644	Direction Direction `json:"direction,omitempty"`
8645	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
8646	Protocol *string `json:"protocol,omitempty"`
8647	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
8648	Source *string `json:"source,omitempty"`
8649	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
8650	Destination *string `json:"destination,omitempty"`
8651	// DestinationPort - Traffic destination port. Accepted values are '*' and a single port in the range (0 - 65535).
8652	DestinationPort *string `json:"destinationPort,omitempty"`
8653}
8654
8655// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
8656type ConfigurationDiagnosticResponse struct {
8657	autorest.Response `json:"-"`
8658	// Results - READ-ONLY; List of network configuration diagnostic results.
8659	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
8660}
8661
8662// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
8663// query.
8664type ConfigurationDiagnosticResult struct {
8665	// Profile - Network configuration diagnostic profile.
8666	Profile *ConfigurationDiagnosticProfile `json:"profile,omitempty"`
8667	// NetworkSecurityGroupResult - Network security group result.
8668	NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"`
8669}
8670
8671// ConnectionMonitor parameters that define the operation to create a connection monitor.
8672type ConnectionMonitor struct {
8673	// Location - Connection monitor location.
8674	Location *string `json:"location,omitempty"`
8675	// Tags - Connection monitor tags.
8676	Tags map[string]*string `json:"tags"`
8677	// ConnectionMonitorParameters - Properties of the connection monitor.
8678	*ConnectionMonitorParameters `json:"properties,omitempty"`
8679}
8680
8681// MarshalJSON is the custom marshaler for ConnectionMonitor.
8682func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
8683	objectMap := make(map[string]interface{})
8684	if cm.Location != nil {
8685		objectMap["location"] = cm.Location
8686	}
8687	if cm.Tags != nil {
8688		objectMap["tags"] = cm.Tags
8689	}
8690	if cm.ConnectionMonitorParameters != nil {
8691		objectMap["properties"] = cm.ConnectionMonitorParameters
8692	}
8693	return json.Marshal(objectMap)
8694}
8695
8696// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
8697func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
8698	var m map[string]*json.RawMessage
8699	err := json.Unmarshal(body, &m)
8700	if err != nil {
8701		return err
8702	}
8703	for k, v := range m {
8704		switch k {
8705		case "location":
8706			if v != nil {
8707				var location string
8708				err = json.Unmarshal(*v, &location)
8709				if err != nil {
8710					return err
8711				}
8712				cm.Location = &location
8713			}
8714		case "tags":
8715			if v != nil {
8716				var tags map[string]*string
8717				err = json.Unmarshal(*v, &tags)
8718				if err != nil {
8719					return err
8720				}
8721				cm.Tags = tags
8722			}
8723		case "properties":
8724			if v != nil {
8725				var connectionMonitorParameters ConnectionMonitorParameters
8726				err = json.Unmarshal(*v, &connectionMonitorParameters)
8727				if err != nil {
8728					return err
8729				}
8730				cm.ConnectionMonitorParameters = &connectionMonitorParameters
8731			}
8732		}
8733	}
8734
8735	return nil
8736}
8737
8738// ConnectionMonitorDestination describes the destination of connection monitor.
8739type ConnectionMonitorDestination struct {
8740	// ResourceID - The ID of the resource used as the destination by connection monitor.
8741	ResourceID *string `json:"resourceId,omitempty"`
8742	// Address - Address of the connection monitor destination (IP or domain name).
8743	Address *string `json:"address,omitempty"`
8744	// Port - The destination port used by connection monitor.
8745	Port *int32 `json:"port,omitempty"`
8746}
8747
8748// ConnectionMonitorEndpoint describes the connection monitor endpoint.
8749type ConnectionMonitorEndpoint struct {
8750	// Name - The name of the connection monitor endpoint.
8751	Name *string `json:"name,omitempty"`
8752	// Type - The endpoint type. Possible values include: 'AzureVM', 'AzureVNet', 'AzureSubnet', 'ExternalAddress', 'MMAWorkspaceMachine', 'MMAWorkspaceNetwork'
8753	Type EndpointType `json:"type,omitempty"`
8754	// ResourceID - Resource ID of the connection monitor endpoint.
8755	ResourceID *string `json:"resourceId,omitempty"`
8756	// Address - Address of the connection monitor endpoint (IP or domain name).
8757	Address *string `json:"address,omitempty"`
8758	// Filter - Filter for sub-items within the endpoint.
8759	Filter *ConnectionMonitorEndpointFilter `json:"filter,omitempty"`
8760	// Scope - Endpoint scope.
8761	Scope *ConnectionMonitorEndpointScope `json:"scope,omitempty"`
8762	// CoverageLevel - Test coverage for the endpoint. Possible values include: 'Default', 'Low', 'BelowAverage', 'Average', 'AboveAverage', 'Full'
8763	CoverageLevel CoverageLevel `json:"coverageLevel,omitempty"`
8764}
8765
8766// ConnectionMonitorEndpointFilter describes the connection monitor endpoint filter.
8767type ConnectionMonitorEndpointFilter struct {
8768	// Type - The behavior of the endpoint filter. Currently only 'Include' is supported. Possible values include: 'Include'
8769	Type ConnectionMonitorEndpointFilterType `json:"type,omitempty"`
8770	// Items - List of items in the filter.
8771	Items *[]ConnectionMonitorEndpointFilterItem `json:"items,omitempty"`
8772}
8773
8774// ConnectionMonitorEndpointFilterItem describes the connection monitor endpoint filter item.
8775type ConnectionMonitorEndpointFilterItem struct {
8776	// Type - The type of item included in the filter. Currently only 'AgentAddress' is supported. Possible values include: 'AgentAddress'
8777	Type ConnectionMonitorEndpointFilterItemType `json:"type,omitempty"`
8778	// Address - The address of the filter item.
8779	Address *string `json:"address,omitempty"`
8780}
8781
8782// ConnectionMonitorEndpointScope describes the connection monitor endpoint scope.
8783type ConnectionMonitorEndpointScope struct {
8784	// Include - List of items which needs to be included to the endpoint scope.
8785	Include *[]ConnectionMonitorEndpointScopeItem `json:"include,omitempty"`
8786	// Exclude - List of items which needs to be excluded from the endpoint scope.
8787	Exclude *[]ConnectionMonitorEndpointScopeItem `json:"exclude,omitempty"`
8788}
8789
8790// ConnectionMonitorEndpointScopeItem describes the connection monitor endpoint scope item.
8791type ConnectionMonitorEndpointScopeItem struct {
8792	// Address - The address of the endpoint item. Supported types are IPv4/IPv6 subnet mask or IPv4/IPv6 IP address.
8793	Address *string `json:"address,omitempty"`
8794}
8795
8796// ConnectionMonitorHTTPConfiguration describes the HTTP configuration.
8797type ConnectionMonitorHTTPConfiguration struct {
8798	// Port - The port to connect to.
8799	Port *int32 `json:"port,omitempty"`
8800	// Method - The HTTP method to use. Possible values include: 'Get', 'Post'
8801	Method HTTPConfigurationMethod `json:"method,omitempty"`
8802	// Path - The path component of the URI. For instance, "/dir1/dir2".
8803	Path *string `json:"path,omitempty"`
8804	// RequestHeaders - The HTTP headers to transmit with the request.
8805	RequestHeaders *[]HTTPHeader `json:"requestHeaders,omitempty"`
8806	// ValidStatusCodeRanges - HTTP status codes to consider successful. For instance, "2xx,301-304,418".
8807	ValidStatusCodeRanges *[]string `json:"validStatusCodeRanges,omitempty"`
8808	// PreferHTTPS - Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit.
8809	PreferHTTPS *bool `json:"preferHTTPS,omitempty"`
8810}
8811
8812// ConnectionMonitorIcmpConfiguration describes the ICMP configuration.
8813type ConnectionMonitorIcmpConfiguration struct {
8814	// DisableTraceRoute - Value indicating whether path evaluation with trace route should be disabled.
8815	DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"`
8816}
8817
8818// ConnectionMonitorListResult list of connection monitors.
8819type ConnectionMonitorListResult struct {
8820	autorest.Response `json:"-"`
8821	// Value - Information about connection monitors.
8822	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
8823}
8824
8825// ConnectionMonitorOutput describes a connection monitor output destination.
8826type ConnectionMonitorOutput struct {
8827	// Type - Connection monitor output destination type. Currently, only "Workspace" is supported. Possible values include: 'Workspace'
8828	Type OutputType `json:"type,omitempty"`
8829	// WorkspaceSettings - Describes the settings for producing output into a log analytics workspace.
8830	WorkspaceSettings *ConnectionMonitorWorkspaceSettings `json:"workspaceSettings,omitempty"`
8831}
8832
8833// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
8834type ConnectionMonitorParameters struct {
8835	// Source - Describes the source of connection monitor.
8836	Source *ConnectionMonitorSource `json:"source,omitempty"`
8837	// Destination - Describes the destination of connection monitor.
8838	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
8839	// AutoStart - Determines if the connection monitor will start automatically once created.
8840	AutoStart *bool `json:"autoStart,omitempty"`
8841	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
8842	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
8843	// Endpoints - List of connection monitor endpoints.
8844	Endpoints *[]ConnectionMonitorEndpoint `json:"endpoints,omitempty"`
8845	// TestConfigurations - List of connection monitor test configurations.
8846	TestConfigurations *[]ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"`
8847	// TestGroups - List of connection monitor test groups.
8848	TestGroups *[]ConnectionMonitorTestGroup `json:"testGroups,omitempty"`
8849	// Outputs - List of connection monitor outputs.
8850	Outputs *[]ConnectionMonitorOutput `json:"outputs,omitempty"`
8851	// Notes - Optional notes to be associated with the connection monitor.
8852	Notes *string `json:"notes,omitempty"`
8853}
8854
8855// ConnectionMonitorQueryResult list of connection states snapshots.
8856type ConnectionMonitorQueryResult struct {
8857	autorest.Response `json:"-"`
8858	// SourceStatus - Status of connection monitor source. Possible values include: 'ConnectionMonitorSourceStatusUnknown', 'ConnectionMonitorSourceStatusActive', 'ConnectionMonitorSourceStatusInactive'
8859	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
8860	// States - Information about connection states.
8861	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
8862}
8863
8864// ConnectionMonitorResult information about the connection monitor.
8865type ConnectionMonitorResult struct {
8866	autorest.Response `json:"-"`
8867	// Name - READ-ONLY; Name of the connection monitor.
8868	Name *string `json:"name,omitempty"`
8869	// ID - READ-ONLY; ID of the connection monitor.
8870	ID *string `json:"id,omitempty"`
8871	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8872	Etag *string `json:"etag,omitempty"`
8873	// Type - READ-ONLY; Connection monitor type.
8874	Type *string `json:"type,omitempty"`
8875	// Location - Connection monitor location.
8876	Location *string `json:"location,omitempty"`
8877	// Tags - Connection monitor tags.
8878	Tags map[string]*string `json:"tags"`
8879	// ConnectionMonitorResultProperties - Properties of the connection monitor result.
8880	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
8881}
8882
8883// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
8884func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
8885	objectMap := make(map[string]interface{})
8886	if cmr.Location != nil {
8887		objectMap["location"] = cmr.Location
8888	}
8889	if cmr.Tags != nil {
8890		objectMap["tags"] = cmr.Tags
8891	}
8892	if cmr.ConnectionMonitorResultProperties != nil {
8893		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
8894	}
8895	return json.Marshal(objectMap)
8896}
8897
8898// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
8899func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
8900	var m map[string]*json.RawMessage
8901	err := json.Unmarshal(body, &m)
8902	if err != nil {
8903		return err
8904	}
8905	for k, v := range m {
8906		switch k {
8907		case "name":
8908			if v != nil {
8909				var name string
8910				err = json.Unmarshal(*v, &name)
8911				if err != nil {
8912					return err
8913				}
8914				cmr.Name = &name
8915			}
8916		case "id":
8917			if v != nil {
8918				var ID string
8919				err = json.Unmarshal(*v, &ID)
8920				if err != nil {
8921					return err
8922				}
8923				cmr.ID = &ID
8924			}
8925		case "etag":
8926			if v != nil {
8927				var etag string
8928				err = json.Unmarshal(*v, &etag)
8929				if err != nil {
8930					return err
8931				}
8932				cmr.Etag = &etag
8933			}
8934		case "type":
8935			if v != nil {
8936				var typeVar string
8937				err = json.Unmarshal(*v, &typeVar)
8938				if err != nil {
8939					return err
8940				}
8941				cmr.Type = &typeVar
8942			}
8943		case "location":
8944			if v != nil {
8945				var location string
8946				err = json.Unmarshal(*v, &location)
8947				if err != nil {
8948					return err
8949				}
8950				cmr.Location = &location
8951			}
8952		case "tags":
8953			if v != nil {
8954				var tags map[string]*string
8955				err = json.Unmarshal(*v, &tags)
8956				if err != nil {
8957					return err
8958				}
8959				cmr.Tags = tags
8960			}
8961		case "properties":
8962			if v != nil {
8963				var connectionMonitorResultProperties ConnectionMonitorResultProperties
8964				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
8965				if err != nil {
8966					return err
8967				}
8968				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
8969			}
8970		}
8971	}
8972
8973	return nil
8974}
8975
8976// ConnectionMonitorResultProperties describes the properties of a connection monitor.
8977type ConnectionMonitorResultProperties struct {
8978	// ProvisioningState - READ-ONLY; The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
8979	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8980	// StartTime - READ-ONLY; The date and time when the connection monitor was started.
8981	StartTime *date.Time `json:"startTime,omitempty"`
8982	// MonitoringStatus - READ-ONLY; The monitoring status of the connection monitor.
8983	MonitoringStatus *string `json:"monitoringStatus,omitempty"`
8984	// ConnectionMonitorType - READ-ONLY; Type of connection monitor. Possible values include: 'MultiEndpoint', 'SingleSourceDestination'
8985	ConnectionMonitorType ConnectionMonitorType `json:"connectionMonitorType,omitempty"`
8986	// Source - Describes the source of connection monitor.
8987	Source *ConnectionMonitorSource `json:"source,omitempty"`
8988	// Destination - Describes the destination of connection monitor.
8989	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
8990	// AutoStart - Determines if the connection monitor will start automatically once created.
8991	AutoStart *bool `json:"autoStart,omitempty"`
8992	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
8993	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
8994	// Endpoints - List of connection monitor endpoints.
8995	Endpoints *[]ConnectionMonitorEndpoint `json:"endpoints,omitempty"`
8996	// TestConfigurations - List of connection monitor test configurations.
8997	TestConfigurations *[]ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"`
8998	// TestGroups - List of connection monitor test groups.
8999	TestGroups *[]ConnectionMonitorTestGroup `json:"testGroups,omitempty"`
9000	// Outputs - List of connection monitor outputs.
9001	Outputs *[]ConnectionMonitorOutput `json:"outputs,omitempty"`
9002	// Notes - Optional notes to be associated with the connection monitor.
9003	Notes *string `json:"notes,omitempty"`
9004}
9005
9006// MarshalJSON is the custom marshaler for ConnectionMonitorResultProperties.
9007func (cmrp ConnectionMonitorResultProperties) MarshalJSON() ([]byte, error) {
9008	objectMap := make(map[string]interface{})
9009	if cmrp.Source != nil {
9010		objectMap["source"] = cmrp.Source
9011	}
9012	if cmrp.Destination != nil {
9013		objectMap["destination"] = cmrp.Destination
9014	}
9015	if cmrp.AutoStart != nil {
9016		objectMap["autoStart"] = cmrp.AutoStart
9017	}
9018	if cmrp.MonitoringIntervalInSeconds != nil {
9019		objectMap["monitoringIntervalInSeconds"] = cmrp.MonitoringIntervalInSeconds
9020	}
9021	if cmrp.Endpoints != nil {
9022		objectMap["endpoints"] = cmrp.Endpoints
9023	}
9024	if cmrp.TestConfigurations != nil {
9025		objectMap["testConfigurations"] = cmrp.TestConfigurations
9026	}
9027	if cmrp.TestGroups != nil {
9028		objectMap["testGroups"] = cmrp.TestGroups
9029	}
9030	if cmrp.Outputs != nil {
9031		objectMap["outputs"] = cmrp.Outputs
9032	}
9033	if cmrp.Notes != nil {
9034		objectMap["notes"] = cmrp.Notes
9035	}
9036	return json.Marshal(objectMap)
9037}
9038
9039// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9040// long-running operation.
9041type ConnectionMonitorsCreateOrUpdateFuture struct {
9042	azure.FutureAPI
9043	// Result returns the result of the asynchronous operation.
9044	// If the operation has not completed it will return an error.
9045	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
9046}
9047
9048// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
9049// long-running operation.
9050type ConnectionMonitorsDeleteFuture struct {
9051	azure.FutureAPI
9052	// Result returns the result of the asynchronous operation.
9053	// If the operation has not completed it will return an error.
9054	Result func(ConnectionMonitorsClient) (autorest.Response, error)
9055}
9056
9057// ConnectionMonitorSource describes the source of connection monitor.
9058type ConnectionMonitorSource struct {
9059	// ResourceID - The ID of the resource used as the source by connection monitor.
9060	ResourceID *string `json:"resourceId,omitempty"`
9061	// Port - The source port used by connection monitor.
9062	Port *int32 `json:"port,omitempty"`
9063}
9064
9065// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
9066// operation.
9067type ConnectionMonitorsQueryFuture struct {
9068	azure.FutureAPI
9069	// Result returns the result of the asynchronous operation.
9070	// If the operation has not completed it will return an error.
9071	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
9072}
9073
9074// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
9075// operation.
9076type ConnectionMonitorsStartFuture struct {
9077	azure.FutureAPI
9078	// Result returns the result of the asynchronous operation.
9079	// If the operation has not completed it will return an error.
9080	Result func(ConnectionMonitorsClient) (autorest.Response, error)
9081}
9082
9083// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
9084// operation.
9085type ConnectionMonitorsStopFuture struct {
9086	azure.FutureAPI
9087	// Result returns the result of the asynchronous operation.
9088	// If the operation has not completed it will return an error.
9089	Result func(ConnectionMonitorsClient) (autorest.Response, error)
9090}
9091
9092// ConnectionMonitorSuccessThreshold describes the threshold for declaring a test successful.
9093type ConnectionMonitorSuccessThreshold struct {
9094	// ChecksFailedPercent - The maximum percentage of failed checks permitted for a test to evaluate as successful.
9095	ChecksFailedPercent *int32 `json:"checksFailedPercent,omitempty"`
9096	// RoundTripTimeMs - The maximum round-trip time in milliseconds permitted for a test to evaluate as successful.
9097	RoundTripTimeMs *float64 `json:"roundTripTimeMs,omitempty"`
9098}
9099
9100// ConnectionMonitorTCPConfiguration describes the TCP configuration.
9101type ConnectionMonitorTCPConfiguration struct {
9102	// Port - The port to connect to.
9103	Port *int32 `json:"port,omitempty"`
9104	// DisableTraceRoute - Value indicating whether path evaluation with trace route should be disabled.
9105	DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"`
9106	// DestinationPortBehavior - Destination port behavior. Possible values include: 'None', 'ListenIfAvailable'
9107	DestinationPortBehavior DestinationPortBehavior `json:"destinationPortBehavior,omitempty"`
9108}
9109
9110// ConnectionMonitorTestConfiguration describes a connection monitor test configuration.
9111type ConnectionMonitorTestConfiguration struct {
9112	// Name - The name of the connection monitor test configuration.
9113	Name *string `json:"name,omitempty"`
9114	// TestFrequencySec - The frequency of test evaluation, in seconds.
9115	TestFrequencySec *int32 `json:"testFrequencySec,omitempty"`
9116	// Protocol - The protocol to use in test evaluation. Possible values include: 'ConnectionMonitorTestConfigurationProtocolTCP', 'ConnectionMonitorTestConfigurationProtocolHTTP', 'ConnectionMonitorTestConfigurationProtocolIcmp'
9117	Protocol ConnectionMonitorTestConfigurationProtocol `json:"protocol,omitempty"`
9118	// 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'
9119	PreferredIPVersion PreferredIPVersion `json:"preferredIPVersion,omitempty"`
9120	// HTTPConfiguration - The parameters used to perform test evaluation over HTTP.
9121	HTTPConfiguration *ConnectionMonitorHTTPConfiguration `json:"httpConfiguration,omitempty"`
9122	// TCPConfiguration - The parameters used to perform test evaluation over TCP.
9123	TCPConfiguration *ConnectionMonitorTCPConfiguration `json:"tcpConfiguration,omitempty"`
9124	// IcmpConfiguration - The parameters used to perform test evaluation over ICMP.
9125	IcmpConfiguration *ConnectionMonitorIcmpConfiguration `json:"icmpConfiguration,omitempty"`
9126	// SuccessThreshold - The threshold for declaring a test successful.
9127	SuccessThreshold *ConnectionMonitorSuccessThreshold `json:"successThreshold,omitempty"`
9128}
9129
9130// ConnectionMonitorTestGroup describes the connection monitor test group.
9131type ConnectionMonitorTestGroup struct {
9132	// Name - The name of the connection monitor test group.
9133	Name *string `json:"name,omitempty"`
9134	// Disable - Value indicating whether test group is disabled.
9135	Disable *bool `json:"disable,omitempty"`
9136	// TestConfigurations - List of test configuration names.
9137	TestConfigurations *[]string `json:"testConfigurations,omitempty"`
9138	// Sources - List of source endpoint names.
9139	Sources *[]string `json:"sources,omitempty"`
9140	// Destinations - List of destination endpoint names.
9141	Destinations *[]string `json:"destinations,omitempty"`
9142}
9143
9144// ConnectionMonitorWorkspaceSettings describes the settings for producing output into a log analytics
9145// workspace.
9146type ConnectionMonitorWorkspaceSettings struct {
9147	// WorkspaceResourceID - Log analytics workspace resource ID.
9148	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
9149}
9150
9151// ConnectionResetSharedKey the virtual network connection reset shared key.
9152type ConnectionResetSharedKey struct {
9153	autorest.Response `json:"-"`
9154	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
9155	KeyLength *int32 `json:"keyLength,omitempty"`
9156}
9157
9158// ConnectionSharedKey response for GetConnectionSharedKey API service call.
9159type ConnectionSharedKey struct {
9160	autorest.Response `json:"-"`
9161	// Value - The virtual network connection shared key value.
9162	Value *string `json:"value,omitempty"`
9163	// ID - Resource ID.
9164	ID *string `json:"id,omitempty"`
9165}
9166
9167// ConnectionStateSnapshot connection state snapshot.
9168type ConnectionStateSnapshot struct {
9169	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
9170	ConnectionState ConnectionState `json:"connectionState,omitempty"`
9171	// StartTime - The start time of the connection snapshot.
9172	StartTime *date.Time `json:"startTime,omitempty"`
9173	// EndTime - The end time of the connection snapshot.
9174	EndTime *date.Time `json:"endTime,omitempty"`
9175	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
9176	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
9177	// AvgLatencyInMs - Average latency in ms.
9178	AvgLatencyInMs *int64 `json:"avgLatencyInMs,omitempty"`
9179	// MinLatencyInMs - Minimum latency in ms.
9180	MinLatencyInMs *int64 `json:"minLatencyInMs,omitempty"`
9181	// MaxLatencyInMs - Maximum latency in ms.
9182	MaxLatencyInMs *int64 `json:"maxLatencyInMs,omitempty"`
9183	// ProbesSent - The number of sent probes.
9184	ProbesSent *int64 `json:"probesSent,omitempty"`
9185	// ProbesFailed - The number of failed probes.
9186	ProbesFailed *int64 `json:"probesFailed,omitempty"`
9187	// Hops - READ-ONLY; List of hops between the source and the destination.
9188	Hops *[]ConnectivityHop `json:"hops,omitempty"`
9189}
9190
9191// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
9192func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
9193	objectMap := make(map[string]interface{})
9194	if CSS.ConnectionState != "" {
9195		objectMap["connectionState"] = CSS.ConnectionState
9196	}
9197	if CSS.StartTime != nil {
9198		objectMap["startTime"] = CSS.StartTime
9199	}
9200	if CSS.EndTime != nil {
9201		objectMap["endTime"] = CSS.EndTime
9202	}
9203	if CSS.EvaluationState != "" {
9204		objectMap["evaluationState"] = CSS.EvaluationState
9205	}
9206	if CSS.AvgLatencyInMs != nil {
9207		objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
9208	}
9209	if CSS.MinLatencyInMs != nil {
9210		objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
9211	}
9212	if CSS.MaxLatencyInMs != nil {
9213		objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
9214	}
9215	if CSS.ProbesSent != nil {
9216		objectMap["probesSent"] = CSS.ProbesSent
9217	}
9218	if CSS.ProbesFailed != nil {
9219		objectMap["probesFailed"] = CSS.ProbesFailed
9220	}
9221	return json.Marshal(objectMap)
9222}
9223
9224// ConnectivityDestination parameters that define destination of connection.
9225type ConnectivityDestination struct {
9226	// ResourceID - The ID of the resource to which a connection attempt will be made.
9227	ResourceID *string `json:"resourceId,omitempty"`
9228	// Address - The IP address or URI the resource to which a connection attempt will be made.
9229	Address *string `json:"address,omitempty"`
9230	// Port - Port on which check connectivity will be performed.
9231	Port *int32 `json:"port,omitempty"`
9232}
9233
9234// ConnectivityHop information about a hop between the source and the destination.
9235type ConnectivityHop struct {
9236	// Type - READ-ONLY; The type of the hop.
9237	Type *string `json:"type,omitempty"`
9238	// ID - READ-ONLY; The ID of the hop.
9239	ID *string `json:"id,omitempty"`
9240	// Address - READ-ONLY; The IP address of the hop.
9241	Address *string `json:"address,omitempty"`
9242	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
9243	ResourceID *string `json:"resourceId,omitempty"`
9244	// NextHopIds - READ-ONLY; List of next hop identifiers.
9245	NextHopIds *[]string `json:"nextHopIds,omitempty"`
9246	// PreviousHopIds - READ-ONLY; List of previous hop identifiers.
9247	PreviousHopIds *[]string `json:"previousHopIds,omitempty"`
9248	// Links - READ-ONLY; List of hop links.
9249	Links *[]HopLink `json:"links,omitempty"`
9250	// PreviousLinks - READ-ONLY; List of previous hop links.
9251	PreviousLinks *[]HopLink `json:"previousLinks,omitempty"`
9252	// Issues - READ-ONLY; List of issues.
9253	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
9254}
9255
9256// ConnectivityInformation information on the connectivity status.
9257type ConnectivityInformation struct {
9258	autorest.Response `json:"-"`
9259	// Hops - READ-ONLY; List of hops between the source and the destination.
9260	Hops *[]ConnectivityHop `json:"hops,omitempty"`
9261	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
9262	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
9263	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
9264	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
9265	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
9266	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
9267	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
9268	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
9269	// ProbesSent - READ-ONLY; Total number of probes sent.
9270	ProbesSent *int32 `json:"probesSent,omitempty"`
9271	// ProbesFailed - READ-ONLY; Number of failed probes.
9272	ProbesFailed *int32 `json:"probesFailed,omitempty"`
9273}
9274
9275// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
9276type ConnectivityIssue struct {
9277	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
9278	Origin Origin `json:"origin,omitempty"`
9279	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
9280	Severity Severity `json:"severity,omitempty"`
9281	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
9282	Type IssueType `json:"type,omitempty"`
9283	// Context - READ-ONLY; Provides additional context on the issue.
9284	Context *[]map[string]*string `json:"context,omitempty"`
9285}
9286
9287// ConnectivityParameters parameters that determine how the connectivity check will be performed.
9288type ConnectivityParameters struct {
9289	// Source - The source of the connection.
9290	Source *ConnectivitySource `json:"source,omitempty"`
9291	// Destination - The destination of connection.
9292	Destination *ConnectivityDestination `json:"destination,omitempty"`
9293	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
9294	Protocol Protocol `json:"protocol,omitempty"`
9295	// ProtocolConfiguration - Configuration of the protocol.
9296	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
9297	// PreferredIPVersion - Preferred IP version of the connection. Possible values include: 'IPv4', 'IPv6'
9298	PreferredIPVersion IPVersion `json:"preferredIPVersion,omitempty"`
9299}
9300
9301// ConnectivitySource parameters that define the source of the connection.
9302type ConnectivitySource struct {
9303	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
9304	ResourceID *string `json:"resourceId,omitempty"`
9305	// Port - The source port from which a connectivity check will be performed.
9306	Port *int32 `json:"port,omitempty"`
9307}
9308
9309// Container reference to container resource in remote resource provider.
9310type Container struct {
9311	// ID - Resource ID.
9312	ID *string `json:"id,omitempty"`
9313}
9314
9315// ContainerNetworkInterface container network interface child resource.
9316type ContainerNetworkInterface struct {
9317	// ContainerNetworkInterfacePropertiesFormat - Container network interface properties.
9318	*ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"`
9319	// Name - The name of the resource. This name can be used to access the resource.
9320	Name *string `json:"name,omitempty"`
9321	// Type - READ-ONLY; Sub Resource type.
9322	Type *string `json:"type,omitempty"`
9323	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9324	Etag *string `json:"etag,omitempty"`
9325	// ID - Resource ID.
9326	ID *string `json:"id,omitempty"`
9327}
9328
9329// MarshalJSON is the custom marshaler for ContainerNetworkInterface.
9330func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) {
9331	objectMap := make(map[string]interface{})
9332	if cni.ContainerNetworkInterfacePropertiesFormat != nil {
9333		objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat
9334	}
9335	if cni.Name != nil {
9336		objectMap["name"] = cni.Name
9337	}
9338	if cni.ID != nil {
9339		objectMap["id"] = cni.ID
9340	}
9341	return json.Marshal(objectMap)
9342}
9343
9344// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct.
9345func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error {
9346	var m map[string]*json.RawMessage
9347	err := json.Unmarshal(body, &m)
9348	if err != nil {
9349		return err
9350	}
9351	for k, v := range m {
9352		switch k {
9353		case "properties":
9354			if v != nil {
9355				var containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat
9356				err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat)
9357				if err != nil {
9358					return err
9359				}
9360				cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat
9361			}
9362		case "name":
9363			if v != nil {
9364				var name string
9365				err = json.Unmarshal(*v, &name)
9366				if err != nil {
9367					return err
9368				}
9369				cni.Name = &name
9370			}
9371		case "type":
9372			if v != nil {
9373				var typeVar string
9374				err = json.Unmarshal(*v, &typeVar)
9375				if err != nil {
9376					return err
9377				}
9378				cni.Type = &typeVar
9379			}
9380		case "etag":
9381			if v != nil {
9382				var etag string
9383				err = json.Unmarshal(*v, &etag)
9384				if err != nil {
9385					return err
9386				}
9387				cni.Etag = &etag
9388			}
9389		case "id":
9390			if v != nil {
9391				var ID string
9392				err = json.Unmarshal(*v, &ID)
9393				if err != nil {
9394					return err
9395				}
9396				cni.ID = &ID
9397			}
9398		}
9399	}
9400
9401	return nil
9402}
9403
9404// ContainerNetworkInterfaceConfiguration container network interface configuration child resource.
9405type ContainerNetworkInterfaceConfiguration struct {
9406	// ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties.
9407	*ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"`
9408	// Name - The name of the resource. This name can be used to access the resource.
9409	Name *string `json:"name,omitempty"`
9410	// Type - READ-ONLY; Sub Resource type.
9411	Type *string `json:"type,omitempty"`
9412	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9413	Etag *string `json:"etag,omitempty"`
9414	// ID - Resource ID.
9415	ID *string `json:"id,omitempty"`
9416}
9417
9418// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration.
9419func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
9420	objectMap := make(map[string]interface{})
9421	if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil {
9422		objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat
9423	}
9424	if cnic.Name != nil {
9425		objectMap["name"] = cnic.Name
9426	}
9427	if cnic.ID != nil {
9428		objectMap["id"] = cnic.ID
9429	}
9430	return json.Marshal(objectMap)
9431}
9432
9433// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct.
9434func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error {
9435	var m map[string]*json.RawMessage
9436	err := json.Unmarshal(body, &m)
9437	if err != nil {
9438		return err
9439	}
9440	for k, v := range m {
9441		switch k {
9442		case "properties":
9443			if v != nil {
9444				var containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat
9445				err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat)
9446				if err != nil {
9447					return err
9448				}
9449				cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat
9450			}
9451		case "name":
9452			if v != nil {
9453				var name string
9454				err = json.Unmarshal(*v, &name)
9455				if err != nil {
9456					return err
9457				}
9458				cnic.Name = &name
9459			}
9460		case "type":
9461			if v != nil {
9462				var typeVar string
9463				err = json.Unmarshal(*v, &typeVar)
9464				if err != nil {
9465					return err
9466				}
9467				cnic.Type = &typeVar
9468			}
9469		case "etag":
9470			if v != nil {
9471				var etag string
9472				err = json.Unmarshal(*v, &etag)
9473				if err != nil {
9474					return err
9475				}
9476				cnic.Etag = &etag
9477			}
9478		case "id":
9479			if v != nil {
9480				var ID string
9481				err = json.Unmarshal(*v, &ID)
9482				if err != nil {
9483					return err
9484				}
9485				cnic.ID = &ID
9486			}
9487		}
9488	}
9489
9490	return nil
9491}
9492
9493// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration
9494// properties.
9495type ContainerNetworkInterfaceConfigurationPropertiesFormat struct {
9496	// IPConfigurations - A list of ip configurations of the container network interface configuration.
9497	IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"`
9498	// ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration.
9499	ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"`
9500	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9501	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9502}
9503
9504// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat.
9505func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
9506	objectMap := make(map[string]interface{})
9507	if cnicpf.IPConfigurations != nil {
9508		objectMap["ipConfigurations"] = cnicpf.IPConfigurations
9509	}
9510	if cnicpf.ContainerNetworkInterfaces != nil {
9511		objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces
9512	}
9513	return json.Marshal(objectMap)
9514}
9515
9516// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface.
9517type ContainerNetworkInterfaceIPConfiguration struct {
9518	// ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration.
9519	*ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
9520	// Name - The name of the resource. This name can be used to access the resource.
9521	Name *string `json:"name,omitempty"`
9522	// Type - READ-ONLY; Sub Resource type.
9523	Type *string `json:"type,omitempty"`
9524	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9525	Etag *string `json:"etag,omitempty"`
9526}
9527
9528// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration.
9529func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
9530	objectMap := make(map[string]interface{})
9531	if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil {
9532		objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat
9533	}
9534	if cniic.Name != nil {
9535		objectMap["name"] = cniic.Name
9536	}
9537	return json.Marshal(objectMap)
9538}
9539
9540// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct.
9541func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
9542	var m map[string]*json.RawMessage
9543	err := json.Unmarshal(body, &m)
9544	if err != nil {
9545		return err
9546	}
9547	for k, v := range m {
9548		switch k {
9549		case "properties":
9550			if v != nil {
9551				var containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat
9552				err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat)
9553				if err != nil {
9554					return err
9555				}
9556				cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat
9557			}
9558		case "name":
9559			if v != nil {
9560				var name string
9561				err = json.Unmarshal(*v, &name)
9562				if err != nil {
9563					return err
9564				}
9565				cniic.Name = &name
9566			}
9567		case "type":
9568			if v != nil {
9569				var typeVar string
9570				err = json.Unmarshal(*v, &typeVar)
9571				if err != nil {
9572					return err
9573				}
9574				cniic.Type = &typeVar
9575			}
9576		case "etag":
9577			if v != nil {
9578				var etag string
9579				err = json.Unmarshal(*v, &etag)
9580				if err != nil {
9581					return err
9582				}
9583				cniic.Etag = &etag
9584			}
9585		}
9586	}
9587
9588	return nil
9589}
9590
9591// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface
9592// IP configuration.
9593type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
9594	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9595	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9596}
9597
9598// ContainerNetworkInterfacePropertiesFormat properties of container network interface.
9599type ContainerNetworkInterfacePropertiesFormat struct {
9600	// ContainerNetworkInterfaceConfiguration - READ-ONLY; Container network interface configuration from which this container network interface is created.
9601	ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"`
9602	// Container - Reference to the container to which this container network interface is attached.
9603	Container *Container `json:"container,omitempty"`
9604	// IPConfigurations - READ-ONLY; Reference to the ip configuration on this container nic.
9605	IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
9606	// ProvisioningState - READ-ONLY; The provisioning state of the container network interface resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9607	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9608}
9609
9610// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat.
9611func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
9612	objectMap := make(map[string]interface{})
9613	if cnipf.Container != nil {
9614		objectMap["container"] = cnipf.Container
9615	}
9616	return json.Marshal(objectMap)
9617}
9618
9619// CustomDNSConfigPropertiesFormat contains custom Dns resolution configuration from customer.
9620type CustomDNSConfigPropertiesFormat struct {
9621	// Fqdn - Fqdn that resolves to private endpoint ip address.
9622	Fqdn *string `json:"fqdn,omitempty"`
9623	// IPAddresses - A list of private ip addresses of the private endpoint.
9624	IPAddresses *[]string `json:"ipAddresses,omitempty"`
9625}
9626
9627// CustomIPPrefix custom IP prefix resource.
9628type CustomIPPrefix struct {
9629	autorest.Response `json:"-"`
9630	// ExtendedLocation - The extended location of the custom IP prefix.
9631	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
9632	// CustomIPPrefixPropertiesFormat - Custom IP prefix properties.
9633	*CustomIPPrefixPropertiesFormat `json:"properties,omitempty"`
9634	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9635	Etag *string `json:"etag,omitempty"`
9636	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
9637	Zones *[]string `json:"zones,omitempty"`
9638	// ID - Resource ID.
9639	ID *string `json:"id,omitempty"`
9640	// Name - READ-ONLY; Resource name.
9641	Name *string `json:"name,omitempty"`
9642	// Type - READ-ONLY; Resource type.
9643	Type *string `json:"type,omitempty"`
9644	// Location - Resource location.
9645	Location *string `json:"location,omitempty"`
9646	// Tags - Resource tags.
9647	Tags map[string]*string `json:"tags"`
9648}
9649
9650// MarshalJSON is the custom marshaler for CustomIPPrefix.
9651func (cip CustomIPPrefix) MarshalJSON() ([]byte, error) {
9652	objectMap := make(map[string]interface{})
9653	if cip.ExtendedLocation != nil {
9654		objectMap["extendedLocation"] = cip.ExtendedLocation
9655	}
9656	if cip.CustomIPPrefixPropertiesFormat != nil {
9657		objectMap["properties"] = cip.CustomIPPrefixPropertiesFormat
9658	}
9659	if cip.Zones != nil {
9660		objectMap["zones"] = cip.Zones
9661	}
9662	if cip.ID != nil {
9663		objectMap["id"] = cip.ID
9664	}
9665	if cip.Location != nil {
9666		objectMap["location"] = cip.Location
9667	}
9668	if cip.Tags != nil {
9669		objectMap["tags"] = cip.Tags
9670	}
9671	return json.Marshal(objectMap)
9672}
9673
9674// UnmarshalJSON is the custom unmarshaler for CustomIPPrefix struct.
9675func (cip *CustomIPPrefix) UnmarshalJSON(body []byte) error {
9676	var m map[string]*json.RawMessage
9677	err := json.Unmarshal(body, &m)
9678	if err != nil {
9679		return err
9680	}
9681	for k, v := range m {
9682		switch k {
9683		case "extendedLocation":
9684			if v != nil {
9685				var extendedLocation ExtendedLocation
9686				err = json.Unmarshal(*v, &extendedLocation)
9687				if err != nil {
9688					return err
9689				}
9690				cip.ExtendedLocation = &extendedLocation
9691			}
9692		case "properties":
9693			if v != nil {
9694				var customIPPrefixPropertiesFormat CustomIPPrefixPropertiesFormat
9695				err = json.Unmarshal(*v, &customIPPrefixPropertiesFormat)
9696				if err != nil {
9697					return err
9698				}
9699				cip.CustomIPPrefixPropertiesFormat = &customIPPrefixPropertiesFormat
9700			}
9701		case "etag":
9702			if v != nil {
9703				var etag string
9704				err = json.Unmarshal(*v, &etag)
9705				if err != nil {
9706					return err
9707				}
9708				cip.Etag = &etag
9709			}
9710		case "zones":
9711			if v != nil {
9712				var zones []string
9713				err = json.Unmarshal(*v, &zones)
9714				if err != nil {
9715					return err
9716				}
9717				cip.Zones = &zones
9718			}
9719		case "id":
9720			if v != nil {
9721				var ID string
9722				err = json.Unmarshal(*v, &ID)
9723				if err != nil {
9724					return err
9725				}
9726				cip.ID = &ID
9727			}
9728		case "name":
9729			if v != nil {
9730				var name string
9731				err = json.Unmarshal(*v, &name)
9732				if err != nil {
9733					return err
9734				}
9735				cip.Name = &name
9736			}
9737		case "type":
9738			if v != nil {
9739				var typeVar string
9740				err = json.Unmarshal(*v, &typeVar)
9741				if err != nil {
9742					return err
9743				}
9744				cip.Type = &typeVar
9745			}
9746		case "location":
9747			if v != nil {
9748				var location string
9749				err = json.Unmarshal(*v, &location)
9750				if err != nil {
9751					return err
9752				}
9753				cip.Location = &location
9754			}
9755		case "tags":
9756			if v != nil {
9757				var tags map[string]*string
9758				err = json.Unmarshal(*v, &tags)
9759				if err != nil {
9760					return err
9761				}
9762				cip.Tags = tags
9763			}
9764		}
9765	}
9766
9767	return nil
9768}
9769
9770// CustomIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9771// long-running operation.
9772type CustomIPPrefixesCreateOrUpdateFuture struct {
9773	azure.FutureAPI
9774	// Result returns the result of the asynchronous operation.
9775	// If the operation has not completed it will return an error.
9776	Result func(CustomIPPrefixesClient) (CustomIPPrefix, error)
9777}
9778
9779// CustomIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
9780// operation.
9781type CustomIPPrefixesDeleteFuture struct {
9782	azure.FutureAPI
9783	// Result returns the result of the asynchronous operation.
9784	// If the operation has not completed it will return an error.
9785	Result func(CustomIPPrefixesClient) (autorest.Response, error)
9786}
9787
9788// CustomIPPrefixListResult response for ListCustomIpPrefixes API service call.
9789type CustomIPPrefixListResult struct {
9790	autorest.Response `json:"-"`
9791	// Value - A list of Custom IP prefixes that exists in a resource group.
9792	Value *[]CustomIPPrefix `json:"value,omitempty"`
9793	// NextLink - The URL to get the next set of results.
9794	NextLink *string `json:"nextLink,omitempty"`
9795}
9796
9797// CustomIPPrefixListResultIterator provides access to a complete listing of CustomIPPrefix values.
9798type CustomIPPrefixListResultIterator struct {
9799	i    int
9800	page CustomIPPrefixListResultPage
9801}
9802
9803// NextWithContext advances to the next value.  If there was an error making
9804// the request the iterator does not advance and the error is returned.
9805func (iter *CustomIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
9806	if tracing.IsEnabled() {
9807		ctx = tracing.StartSpan(ctx, fqdn+"/CustomIPPrefixListResultIterator.NextWithContext")
9808		defer func() {
9809			sc := -1
9810			if iter.Response().Response.Response != nil {
9811				sc = iter.Response().Response.Response.StatusCode
9812			}
9813			tracing.EndSpan(ctx, sc, err)
9814		}()
9815	}
9816	iter.i++
9817	if iter.i < len(iter.page.Values()) {
9818		return nil
9819	}
9820	err = iter.page.NextWithContext(ctx)
9821	if err != nil {
9822		iter.i--
9823		return err
9824	}
9825	iter.i = 0
9826	return nil
9827}
9828
9829// Next advances to the next value.  If there was an error making
9830// the request the iterator does not advance and the error is returned.
9831// Deprecated: Use NextWithContext() instead.
9832func (iter *CustomIPPrefixListResultIterator) Next() error {
9833	return iter.NextWithContext(context.Background())
9834}
9835
9836// NotDone returns true if the enumeration should be started or is not yet complete.
9837func (iter CustomIPPrefixListResultIterator) NotDone() bool {
9838	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9839}
9840
9841// Response returns the raw server response from the last page request.
9842func (iter CustomIPPrefixListResultIterator) Response() CustomIPPrefixListResult {
9843	return iter.page.Response()
9844}
9845
9846// Value returns the current value or a zero-initialized value if the
9847// iterator has advanced beyond the end of the collection.
9848func (iter CustomIPPrefixListResultIterator) Value() CustomIPPrefix {
9849	if !iter.page.NotDone() {
9850		return CustomIPPrefix{}
9851	}
9852	return iter.page.Values()[iter.i]
9853}
9854
9855// Creates a new instance of the CustomIPPrefixListResultIterator type.
9856func NewCustomIPPrefixListResultIterator(page CustomIPPrefixListResultPage) CustomIPPrefixListResultIterator {
9857	return CustomIPPrefixListResultIterator{page: page}
9858}
9859
9860// IsEmpty returns true if the ListResult contains no values.
9861func (ciplr CustomIPPrefixListResult) IsEmpty() bool {
9862	return ciplr.Value == nil || len(*ciplr.Value) == 0
9863}
9864
9865// hasNextLink returns true if the NextLink is not empty.
9866func (ciplr CustomIPPrefixListResult) hasNextLink() bool {
9867	return ciplr.NextLink != nil && len(*ciplr.NextLink) != 0
9868}
9869
9870// customIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
9871// It returns nil if no more results exist.
9872func (ciplr CustomIPPrefixListResult) customIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
9873	if !ciplr.hasNextLink() {
9874		return nil, nil
9875	}
9876	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9877		autorest.AsJSON(),
9878		autorest.AsGet(),
9879		autorest.WithBaseURL(to.String(ciplr.NextLink)))
9880}
9881
9882// CustomIPPrefixListResultPage contains a page of CustomIPPrefix values.
9883type CustomIPPrefixListResultPage struct {
9884	fn    func(context.Context, CustomIPPrefixListResult) (CustomIPPrefixListResult, error)
9885	ciplr CustomIPPrefixListResult
9886}
9887
9888// NextWithContext advances to the next page of values.  If there was an error making
9889// the request the page does not advance and the error is returned.
9890func (page *CustomIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
9891	if tracing.IsEnabled() {
9892		ctx = tracing.StartSpan(ctx, fqdn+"/CustomIPPrefixListResultPage.NextWithContext")
9893		defer func() {
9894			sc := -1
9895			if page.Response().Response.Response != nil {
9896				sc = page.Response().Response.Response.StatusCode
9897			}
9898			tracing.EndSpan(ctx, sc, err)
9899		}()
9900	}
9901	for {
9902		next, err := page.fn(ctx, page.ciplr)
9903		if err != nil {
9904			return err
9905		}
9906		page.ciplr = next
9907		if !next.hasNextLink() || !next.IsEmpty() {
9908			break
9909		}
9910	}
9911	return nil
9912}
9913
9914// Next advances to the next page of values.  If there was an error making
9915// the request the page does not advance and the error is returned.
9916// Deprecated: Use NextWithContext() instead.
9917func (page *CustomIPPrefixListResultPage) Next() error {
9918	return page.NextWithContext(context.Background())
9919}
9920
9921// NotDone returns true if the page enumeration should be started or is not yet complete.
9922func (page CustomIPPrefixListResultPage) NotDone() bool {
9923	return !page.ciplr.IsEmpty()
9924}
9925
9926// Response returns the raw server response from the last page request.
9927func (page CustomIPPrefixListResultPage) Response() CustomIPPrefixListResult {
9928	return page.ciplr
9929}
9930
9931// Values returns the slice of values for the current page or nil if there are no values.
9932func (page CustomIPPrefixListResultPage) Values() []CustomIPPrefix {
9933	if page.ciplr.IsEmpty() {
9934		return nil
9935	}
9936	return *page.ciplr.Value
9937}
9938
9939// Creates a new instance of the CustomIPPrefixListResultPage type.
9940func NewCustomIPPrefixListResultPage(cur CustomIPPrefixListResult, getNextPage func(context.Context, CustomIPPrefixListResult) (CustomIPPrefixListResult, error)) CustomIPPrefixListResultPage {
9941	return CustomIPPrefixListResultPage{
9942		fn:    getNextPage,
9943		ciplr: cur,
9944	}
9945}
9946
9947// CustomIPPrefixPropertiesFormat custom IP prefix properties.
9948type CustomIPPrefixPropertiesFormat struct {
9949	// Cidr - The prefix range in CIDR notation. Should include the start address and the prefix length.
9950	Cidr *string `json:"cidr,omitempty"`
9951	// CommissionedState - The commissioned state of the Custom IP Prefix. Possible values include: 'Provisioning', 'Provisioned', 'Commissioning', 'Commissioned', 'Decommissioning', 'Deprovisioning'
9952	CommissionedState CommissionedState `json:"commissionedState,omitempty"`
9953	// PublicIPPrefixes - READ-ONLY; The list of all referenced PublicIpPrefixes.
9954	PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"`
9955	// ResourceGUID - READ-ONLY; The resource GUID property of the custom IP prefix resource.
9956	ResourceGUID *string `json:"resourceGuid,omitempty"`
9957	// ProvisioningState - READ-ONLY; The provisioning state of the custom IP prefix resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9958	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9959}
9960
9961// MarshalJSON is the custom marshaler for CustomIPPrefixPropertiesFormat.
9962func (cippf CustomIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
9963	objectMap := make(map[string]interface{})
9964	if cippf.Cidr != nil {
9965		objectMap["cidr"] = cippf.Cidr
9966	}
9967	if cippf.CommissionedState != "" {
9968		objectMap["commissionedState"] = cippf.CommissionedState
9969	}
9970	return json.Marshal(objectMap)
9971}
9972
9973// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9974// long-running operation.
9975type DdosCustomPoliciesCreateOrUpdateFuture struct {
9976	azure.FutureAPI
9977	// Result returns the result of the asynchronous operation.
9978	// If the operation has not completed it will return an error.
9979	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
9980}
9981
9982// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
9983// long-running operation.
9984type DdosCustomPoliciesDeleteFuture struct {
9985	azure.FutureAPI
9986	// Result returns the result of the asynchronous operation.
9987	// If the operation has not completed it will return an error.
9988	Result func(DdosCustomPoliciesClient) (autorest.Response, error)
9989}
9990
9991// DdosCustomPolicy a DDoS custom policy in a resource group.
9992type DdosCustomPolicy struct {
9993	autorest.Response `json:"-"`
9994	// DdosCustomPolicyPropertiesFormat - Properties of the DDoS custom policy.
9995	*DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"`
9996	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9997	Etag *string `json:"etag,omitempty"`
9998	// ID - Resource ID.
9999	ID *string `json:"id,omitempty"`
10000	// Name - READ-ONLY; Resource name.
10001	Name *string `json:"name,omitempty"`
10002	// Type - READ-ONLY; Resource type.
10003	Type *string `json:"type,omitempty"`
10004	// Location - Resource location.
10005	Location *string `json:"location,omitempty"`
10006	// Tags - Resource tags.
10007	Tags map[string]*string `json:"tags"`
10008}
10009
10010// MarshalJSON is the custom marshaler for DdosCustomPolicy.
10011func (dcp DdosCustomPolicy) MarshalJSON() ([]byte, error) {
10012	objectMap := make(map[string]interface{})
10013	if dcp.DdosCustomPolicyPropertiesFormat != nil {
10014		objectMap["properties"] = dcp.DdosCustomPolicyPropertiesFormat
10015	}
10016	if dcp.ID != nil {
10017		objectMap["id"] = dcp.ID
10018	}
10019	if dcp.Location != nil {
10020		objectMap["location"] = dcp.Location
10021	}
10022	if dcp.Tags != nil {
10023		objectMap["tags"] = dcp.Tags
10024	}
10025	return json.Marshal(objectMap)
10026}
10027
10028// UnmarshalJSON is the custom unmarshaler for DdosCustomPolicy struct.
10029func (dcp *DdosCustomPolicy) UnmarshalJSON(body []byte) error {
10030	var m map[string]*json.RawMessage
10031	err := json.Unmarshal(body, &m)
10032	if err != nil {
10033		return err
10034	}
10035	for k, v := range m {
10036		switch k {
10037		case "properties":
10038			if v != nil {
10039				var ddosCustomPolicyPropertiesFormat DdosCustomPolicyPropertiesFormat
10040				err = json.Unmarshal(*v, &ddosCustomPolicyPropertiesFormat)
10041				if err != nil {
10042					return err
10043				}
10044				dcp.DdosCustomPolicyPropertiesFormat = &ddosCustomPolicyPropertiesFormat
10045			}
10046		case "etag":
10047			if v != nil {
10048				var etag string
10049				err = json.Unmarshal(*v, &etag)
10050				if err != nil {
10051					return err
10052				}
10053				dcp.Etag = &etag
10054			}
10055		case "id":
10056			if v != nil {
10057				var ID string
10058				err = json.Unmarshal(*v, &ID)
10059				if err != nil {
10060					return err
10061				}
10062				dcp.ID = &ID
10063			}
10064		case "name":
10065			if v != nil {
10066				var name string
10067				err = json.Unmarshal(*v, &name)
10068				if err != nil {
10069					return err
10070				}
10071				dcp.Name = &name
10072			}
10073		case "type":
10074			if v != nil {
10075				var typeVar string
10076				err = json.Unmarshal(*v, &typeVar)
10077				if err != nil {
10078					return err
10079				}
10080				dcp.Type = &typeVar
10081			}
10082		case "location":
10083			if v != nil {
10084				var location string
10085				err = json.Unmarshal(*v, &location)
10086				if err != nil {
10087					return err
10088				}
10089				dcp.Location = &location
10090			}
10091		case "tags":
10092			if v != nil {
10093				var tags map[string]*string
10094				err = json.Unmarshal(*v, &tags)
10095				if err != nil {
10096					return err
10097				}
10098				dcp.Tags = tags
10099			}
10100		}
10101	}
10102
10103	return nil
10104}
10105
10106// DdosCustomPolicyPropertiesFormat dDoS custom policy properties.
10107type DdosCustomPolicyPropertiesFormat struct {
10108	// 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.
10109	ResourceGUID *string `json:"resourceGuid,omitempty"`
10110	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS custom policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10111	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10112	// PublicIPAddresses - READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only.
10113	PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"`
10114	// ProtocolCustomSettings - The protocol-specific DDoS policy customization parameters.
10115	ProtocolCustomSettings *[]ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"`
10116}
10117
10118// MarshalJSON is the custom marshaler for DdosCustomPolicyPropertiesFormat.
10119func (dcppf DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
10120	objectMap := make(map[string]interface{})
10121	if dcppf.ProtocolCustomSettings != nil {
10122		objectMap["protocolCustomSettings"] = dcppf.ProtocolCustomSettings
10123	}
10124	return json.Marshal(objectMap)
10125}
10126
10127// DdosProtectionPlan a DDoS protection plan in a resource group.
10128type DdosProtectionPlan struct {
10129	autorest.Response `json:"-"`
10130	// ID - READ-ONLY; Resource ID.
10131	ID *string `json:"id,omitempty"`
10132	// Name - READ-ONLY; Resource name.
10133	Name *string `json:"name,omitempty"`
10134	// Type - READ-ONLY; Resource type.
10135	Type *string `json:"type,omitempty"`
10136	// Location - Resource location.
10137	Location *string `json:"location,omitempty"`
10138	// Tags - Resource tags.
10139	Tags map[string]*string `json:"tags"`
10140	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
10141	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
10142	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10143	Etag *string `json:"etag,omitempty"`
10144}
10145
10146// MarshalJSON is the custom marshaler for DdosProtectionPlan.
10147func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
10148	objectMap := make(map[string]interface{})
10149	if dpp.Location != nil {
10150		objectMap["location"] = dpp.Location
10151	}
10152	if dpp.Tags != nil {
10153		objectMap["tags"] = dpp.Tags
10154	}
10155	if dpp.DdosProtectionPlanPropertiesFormat != nil {
10156		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
10157	}
10158	return json.Marshal(objectMap)
10159}
10160
10161// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
10162func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
10163	var m map[string]*json.RawMessage
10164	err := json.Unmarshal(body, &m)
10165	if err != nil {
10166		return err
10167	}
10168	for k, v := range m {
10169		switch k {
10170		case "id":
10171			if v != nil {
10172				var ID string
10173				err = json.Unmarshal(*v, &ID)
10174				if err != nil {
10175					return err
10176				}
10177				dpp.ID = &ID
10178			}
10179		case "name":
10180			if v != nil {
10181				var name string
10182				err = json.Unmarshal(*v, &name)
10183				if err != nil {
10184					return err
10185				}
10186				dpp.Name = &name
10187			}
10188		case "type":
10189			if v != nil {
10190				var typeVar string
10191				err = json.Unmarshal(*v, &typeVar)
10192				if err != nil {
10193					return err
10194				}
10195				dpp.Type = &typeVar
10196			}
10197		case "location":
10198			if v != nil {
10199				var location string
10200				err = json.Unmarshal(*v, &location)
10201				if err != nil {
10202					return err
10203				}
10204				dpp.Location = &location
10205			}
10206		case "tags":
10207			if v != nil {
10208				var tags map[string]*string
10209				err = json.Unmarshal(*v, &tags)
10210				if err != nil {
10211					return err
10212				}
10213				dpp.Tags = tags
10214			}
10215		case "properties":
10216			if v != nil {
10217				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
10218				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
10219				if err != nil {
10220					return err
10221				}
10222				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
10223			}
10224		case "etag":
10225			if v != nil {
10226				var etag string
10227				err = json.Unmarshal(*v, &etag)
10228				if err != nil {
10229					return err
10230				}
10231				dpp.Etag = &etag
10232			}
10233		}
10234	}
10235
10236	return nil
10237}
10238
10239// DdosProtectionPlanListResult a list of DDoS protection plans.
10240type DdosProtectionPlanListResult struct {
10241	autorest.Response `json:"-"`
10242	// Value - A list of DDoS protection plans.
10243	Value *[]DdosProtectionPlan `json:"value,omitempty"`
10244	// NextLink - READ-ONLY; The URL to get the next set of results.
10245	NextLink *string `json:"nextLink,omitempty"`
10246}
10247
10248// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
10249func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
10250	objectMap := make(map[string]interface{})
10251	if dpplr.Value != nil {
10252		objectMap["value"] = dpplr.Value
10253	}
10254	return json.Marshal(objectMap)
10255}
10256
10257// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
10258type DdosProtectionPlanListResultIterator struct {
10259	i    int
10260	page DdosProtectionPlanListResultPage
10261}
10262
10263// NextWithContext advances to the next value.  If there was an error making
10264// the request the iterator does not advance and the error is returned.
10265func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
10266	if tracing.IsEnabled() {
10267		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
10268		defer func() {
10269			sc := -1
10270			if iter.Response().Response.Response != nil {
10271				sc = iter.Response().Response.Response.StatusCode
10272			}
10273			tracing.EndSpan(ctx, sc, err)
10274		}()
10275	}
10276	iter.i++
10277	if iter.i < len(iter.page.Values()) {
10278		return nil
10279	}
10280	err = iter.page.NextWithContext(ctx)
10281	if err != nil {
10282		iter.i--
10283		return err
10284	}
10285	iter.i = 0
10286	return nil
10287}
10288
10289// Next advances to the next value.  If there was an error making
10290// the request the iterator does not advance and the error is returned.
10291// Deprecated: Use NextWithContext() instead.
10292func (iter *DdosProtectionPlanListResultIterator) Next() error {
10293	return iter.NextWithContext(context.Background())
10294}
10295
10296// NotDone returns true if the enumeration should be started or is not yet complete.
10297func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
10298	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10299}
10300
10301// Response returns the raw server response from the last page request.
10302func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
10303	return iter.page.Response()
10304}
10305
10306// Value returns the current value or a zero-initialized value if the
10307// iterator has advanced beyond the end of the collection.
10308func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
10309	if !iter.page.NotDone() {
10310		return DdosProtectionPlan{}
10311	}
10312	return iter.page.Values()[iter.i]
10313}
10314
10315// Creates a new instance of the DdosProtectionPlanListResultIterator type.
10316func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
10317	return DdosProtectionPlanListResultIterator{page: page}
10318}
10319
10320// IsEmpty returns true if the ListResult contains no values.
10321func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
10322	return dpplr.Value == nil || len(*dpplr.Value) == 0
10323}
10324
10325// hasNextLink returns true if the NextLink is not empty.
10326func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
10327	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
10328}
10329
10330// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
10331// It returns nil if no more results exist.
10332func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
10333	if !dpplr.hasNextLink() {
10334		return nil, nil
10335	}
10336	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10337		autorest.AsJSON(),
10338		autorest.AsGet(),
10339		autorest.WithBaseURL(to.String(dpplr.NextLink)))
10340}
10341
10342// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
10343type DdosProtectionPlanListResultPage struct {
10344	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
10345	dpplr DdosProtectionPlanListResult
10346}
10347
10348// NextWithContext advances to the next page of values.  If there was an error making
10349// the request the page does not advance and the error is returned.
10350func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
10351	if tracing.IsEnabled() {
10352		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
10353		defer func() {
10354			sc := -1
10355			if page.Response().Response.Response != nil {
10356				sc = page.Response().Response.Response.StatusCode
10357			}
10358			tracing.EndSpan(ctx, sc, err)
10359		}()
10360	}
10361	for {
10362		next, err := page.fn(ctx, page.dpplr)
10363		if err != nil {
10364			return err
10365		}
10366		page.dpplr = next
10367		if !next.hasNextLink() || !next.IsEmpty() {
10368			break
10369		}
10370	}
10371	return nil
10372}
10373
10374// Next advances to the next page of values.  If there was an error making
10375// the request the page does not advance and the error is returned.
10376// Deprecated: Use NextWithContext() instead.
10377func (page *DdosProtectionPlanListResultPage) Next() error {
10378	return page.NextWithContext(context.Background())
10379}
10380
10381// NotDone returns true if the page enumeration should be started or is not yet complete.
10382func (page DdosProtectionPlanListResultPage) NotDone() bool {
10383	return !page.dpplr.IsEmpty()
10384}
10385
10386// Response returns the raw server response from the last page request.
10387func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
10388	return page.dpplr
10389}
10390
10391// Values returns the slice of values for the current page or nil if there are no values.
10392func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
10393	if page.dpplr.IsEmpty() {
10394		return nil
10395	}
10396	return *page.dpplr.Value
10397}
10398
10399// Creates a new instance of the DdosProtectionPlanListResultPage type.
10400func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
10401	return DdosProtectionPlanListResultPage{
10402		fn:    getNextPage,
10403		dpplr: cur,
10404	}
10405}
10406
10407// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
10408type DdosProtectionPlanPropertiesFormat struct {
10409	// 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.
10410	ResourceGUID *string `json:"resourceGuid,omitempty"`
10411	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10412	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10413	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
10414	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
10415}
10416
10417// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10418// long-running operation.
10419type DdosProtectionPlansCreateOrUpdateFuture struct {
10420	azure.FutureAPI
10421	// Result returns the result of the asynchronous operation.
10422	// If the operation has not completed it will return an error.
10423	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
10424}
10425
10426// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
10427// long-running operation.
10428type DdosProtectionPlansDeleteFuture struct {
10429	azure.FutureAPI
10430	// Result returns the result of the asynchronous operation.
10431	// If the operation has not completed it will return an error.
10432	Result func(DdosProtectionPlansClient) (autorest.Response, error)
10433}
10434
10435// DdosSettings contains the DDoS protection settings of the public IP.
10436type DdosSettings struct {
10437	// DdosCustomPolicy - The DDoS custom policy associated with the public IP.
10438	DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"`
10439	// 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'
10440	ProtectionCoverage DdosSettingsProtectionCoverage `json:"protectionCoverage,omitempty"`
10441	// ProtectedIP - Enables DDoS protection on the public IP.
10442	ProtectedIP *bool `json:"protectedIP,omitempty"`
10443}
10444
10445// Delegation details the service to which the subnet is delegated.
10446type Delegation struct {
10447	// ServiceDelegationPropertiesFormat - Properties of the subnet.
10448	*ServiceDelegationPropertiesFormat `json:"properties,omitempty"`
10449	// Name - The name of the resource that is unique within a subnet. This name can be used to access the resource.
10450	Name *string `json:"name,omitempty"`
10451	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10452	Etag *string `json:"etag,omitempty"`
10453	// ID - Resource ID.
10454	ID *string `json:"id,omitempty"`
10455}
10456
10457// MarshalJSON is the custom marshaler for Delegation.
10458func (d Delegation) MarshalJSON() ([]byte, error) {
10459	objectMap := make(map[string]interface{})
10460	if d.ServiceDelegationPropertiesFormat != nil {
10461		objectMap["properties"] = d.ServiceDelegationPropertiesFormat
10462	}
10463	if d.Name != nil {
10464		objectMap["name"] = d.Name
10465	}
10466	if d.ID != nil {
10467		objectMap["id"] = d.ID
10468	}
10469	return json.Marshal(objectMap)
10470}
10471
10472// UnmarshalJSON is the custom unmarshaler for Delegation struct.
10473func (d *Delegation) UnmarshalJSON(body []byte) error {
10474	var m map[string]*json.RawMessage
10475	err := json.Unmarshal(body, &m)
10476	if err != nil {
10477		return err
10478	}
10479	for k, v := range m {
10480		switch k {
10481		case "properties":
10482			if v != nil {
10483				var serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat
10484				err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat)
10485				if err != nil {
10486					return err
10487				}
10488				d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat
10489			}
10490		case "name":
10491			if v != nil {
10492				var name string
10493				err = json.Unmarshal(*v, &name)
10494				if err != nil {
10495					return err
10496				}
10497				d.Name = &name
10498			}
10499		case "etag":
10500			if v != nil {
10501				var etag string
10502				err = json.Unmarshal(*v, &etag)
10503				if err != nil {
10504					return err
10505				}
10506				d.Etag = &etag
10507			}
10508		case "id":
10509			if v != nil {
10510				var ID string
10511				err = json.Unmarshal(*v, &ID)
10512				if err != nil {
10513					return err
10514				}
10515				d.ID = &ID
10516			}
10517		}
10518	}
10519
10520	return nil
10521}
10522
10523// DeleteBastionShareableLinkFuture an abstraction for monitoring and retrieving the results of a
10524// long-running operation.
10525type DeleteBastionShareableLinkFuture struct {
10526	azure.FutureAPI
10527	// Result returns the result of the asynchronous operation.
10528	// If the operation has not completed it will return an error.
10529	Result func(BaseClient) (autorest.Response, error)
10530}
10531
10532// DeviceProperties list of properties of the device.
10533type DeviceProperties struct {
10534	// DeviceVendor - Name of the device Vendor.
10535	DeviceVendor *string `json:"deviceVendor,omitempty"`
10536	// DeviceModel - Model of the device.
10537	DeviceModel *string `json:"deviceModel,omitempty"`
10538	// LinkSpeedInMbps - Link speed.
10539	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
10540}
10541
10542// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
10543// network. Standard DHCP option for a subnet overrides VNET DHCP options.
10544type DhcpOptions struct {
10545	// DNSServers - The list of DNS servers IP addresses.
10546	DNSServers *[]string `json:"dnsServers,omitempty"`
10547}
10548
10549// Dimension dimension of the metric.
10550type Dimension struct {
10551	// Name - The name of the dimension.
10552	Name *string `json:"name,omitempty"`
10553	// DisplayName - The display name of the dimension.
10554	DisplayName *string `json:"displayName,omitempty"`
10555	// InternalName - The internal name of the dimension.
10556	InternalName *string `json:"internalName,omitempty"`
10557}
10558
10559// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
10560type DNSNameAvailabilityResult struct {
10561	autorest.Response `json:"-"`
10562	// Available - Domain availability (True/False).
10563	Available *bool `json:"available,omitempty"`
10564}
10565
10566// DNSSettings DNS Proxy Settings in Firewall Policy.
10567type DNSSettings struct {
10568	// Servers - List of Custom DNS Servers.
10569	Servers *[]string `json:"servers,omitempty"`
10570	// EnableProxy - Enable DNS Proxy on Firewalls attached to the Firewall Policy.
10571	EnableProxy *bool `json:"enableProxy,omitempty"`
10572	// RequireProxyForNetworkRules - FQDNs in Network Rules are supported when set to true.
10573	RequireProxyForNetworkRules *bool `json:"requireProxyForNetworkRules,omitempty"`
10574}
10575
10576// DscpConfiguration DSCP Configuration in a resource group.
10577type DscpConfiguration struct {
10578	autorest.Response `json:"-"`
10579	// DscpConfigurationPropertiesFormat - Properties of the network interface.
10580	*DscpConfigurationPropertiesFormat `json:"properties,omitempty"`
10581	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10582	Etag *string `json:"etag,omitempty"`
10583	// ID - Resource ID.
10584	ID *string `json:"id,omitempty"`
10585	// Name - READ-ONLY; Resource name.
10586	Name *string `json:"name,omitempty"`
10587	// Type - READ-ONLY; Resource type.
10588	Type *string `json:"type,omitempty"`
10589	// Location - Resource location.
10590	Location *string `json:"location,omitempty"`
10591	// Tags - Resource tags.
10592	Tags map[string]*string `json:"tags"`
10593}
10594
10595// MarshalJSON is the custom marshaler for DscpConfiguration.
10596func (dc DscpConfiguration) MarshalJSON() ([]byte, error) {
10597	objectMap := make(map[string]interface{})
10598	if dc.DscpConfigurationPropertiesFormat != nil {
10599		objectMap["properties"] = dc.DscpConfigurationPropertiesFormat
10600	}
10601	if dc.ID != nil {
10602		objectMap["id"] = dc.ID
10603	}
10604	if dc.Location != nil {
10605		objectMap["location"] = dc.Location
10606	}
10607	if dc.Tags != nil {
10608		objectMap["tags"] = dc.Tags
10609	}
10610	return json.Marshal(objectMap)
10611}
10612
10613// UnmarshalJSON is the custom unmarshaler for DscpConfiguration struct.
10614func (dc *DscpConfiguration) UnmarshalJSON(body []byte) error {
10615	var m map[string]*json.RawMessage
10616	err := json.Unmarshal(body, &m)
10617	if err != nil {
10618		return err
10619	}
10620	for k, v := range m {
10621		switch k {
10622		case "properties":
10623			if v != nil {
10624				var dscpConfigurationPropertiesFormat DscpConfigurationPropertiesFormat
10625				err = json.Unmarshal(*v, &dscpConfigurationPropertiesFormat)
10626				if err != nil {
10627					return err
10628				}
10629				dc.DscpConfigurationPropertiesFormat = &dscpConfigurationPropertiesFormat
10630			}
10631		case "etag":
10632			if v != nil {
10633				var etag string
10634				err = json.Unmarshal(*v, &etag)
10635				if err != nil {
10636					return err
10637				}
10638				dc.Etag = &etag
10639			}
10640		case "id":
10641			if v != nil {
10642				var ID string
10643				err = json.Unmarshal(*v, &ID)
10644				if err != nil {
10645					return err
10646				}
10647				dc.ID = &ID
10648			}
10649		case "name":
10650			if v != nil {
10651				var name string
10652				err = json.Unmarshal(*v, &name)
10653				if err != nil {
10654					return err
10655				}
10656				dc.Name = &name
10657			}
10658		case "type":
10659			if v != nil {
10660				var typeVar string
10661				err = json.Unmarshal(*v, &typeVar)
10662				if err != nil {
10663					return err
10664				}
10665				dc.Type = &typeVar
10666			}
10667		case "location":
10668			if v != nil {
10669				var location string
10670				err = json.Unmarshal(*v, &location)
10671				if err != nil {
10672					return err
10673				}
10674				dc.Location = &location
10675			}
10676		case "tags":
10677			if v != nil {
10678				var tags map[string]*string
10679				err = json.Unmarshal(*v, &tags)
10680				if err != nil {
10681					return err
10682				}
10683				dc.Tags = tags
10684			}
10685		}
10686	}
10687
10688	return nil
10689}
10690
10691// DscpConfigurationCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10692// long-running operation.
10693type DscpConfigurationCreateOrUpdateFuture struct {
10694	azure.FutureAPI
10695	// Result returns the result of the asynchronous operation.
10696	// If the operation has not completed it will return an error.
10697	Result func(DscpConfigurationClient) (DscpConfiguration, error)
10698}
10699
10700// DscpConfigurationDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10701// operation.
10702type DscpConfigurationDeleteFuture struct {
10703	azure.FutureAPI
10704	// Result returns the result of the asynchronous operation.
10705	// If the operation has not completed it will return an error.
10706	Result func(DscpConfigurationClient) (autorest.Response, error)
10707}
10708
10709// DscpConfigurationListResult response for the DscpConfigurationList API service call.
10710type DscpConfigurationListResult struct {
10711	autorest.Response `json:"-"`
10712	// Value - A list of dscp configurations in a resource group.
10713	Value *[]DscpConfiguration `json:"value,omitempty"`
10714	// NextLink - READ-ONLY; The URL to get the next set of results.
10715	NextLink *string `json:"nextLink,omitempty"`
10716}
10717
10718// MarshalJSON is the custom marshaler for DscpConfigurationListResult.
10719func (dclr DscpConfigurationListResult) MarshalJSON() ([]byte, error) {
10720	objectMap := make(map[string]interface{})
10721	if dclr.Value != nil {
10722		objectMap["value"] = dclr.Value
10723	}
10724	return json.Marshal(objectMap)
10725}
10726
10727// DscpConfigurationListResultIterator provides access to a complete listing of DscpConfiguration values.
10728type DscpConfigurationListResultIterator struct {
10729	i    int
10730	page DscpConfigurationListResultPage
10731}
10732
10733// NextWithContext advances to the next value.  If there was an error making
10734// the request the iterator does not advance and the error is returned.
10735func (iter *DscpConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
10736	if tracing.IsEnabled() {
10737		ctx = tracing.StartSpan(ctx, fqdn+"/DscpConfigurationListResultIterator.NextWithContext")
10738		defer func() {
10739			sc := -1
10740			if iter.Response().Response.Response != nil {
10741				sc = iter.Response().Response.Response.StatusCode
10742			}
10743			tracing.EndSpan(ctx, sc, err)
10744		}()
10745	}
10746	iter.i++
10747	if iter.i < len(iter.page.Values()) {
10748		return nil
10749	}
10750	err = iter.page.NextWithContext(ctx)
10751	if err != nil {
10752		iter.i--
10753		return err
10754	}
10755	iter.i = 0
10756	return nil
10757}
10758
10759// Next advances to the next value.  If there was an error making
10760// the request the iterator does not advance and the error is returned.
10761// Deprecated: Use NextWithContext() instead.
10762func (iter *DscpConfigurationListResultIterator) Next() error {
10763	return iter.NextWithContext(context.Background())
10764}
10765
10766// NotDone returns true if the enumeration should be started or is not yet complete.
10767func (iter DscpConfigurationListResultIterator) NotDone() bool {
10768	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10769}
10770
10771// Response returns the raw server response from the last page request.
10772func (iter DscpConfigurationListResultIterator) Response() DscpConfigurationListResult {
10773	return iter.page.Response()
10774}
10775
10776// Value returns the current value or a zero-initialized value if the
10777// iterator has advanced beyond the end of the collection.
10778func (iter DscpConfigurationListResultIterator) Value() DscpConfiguration {
10779	if !iter.page.NotDone() {
10780		return DscpConfiguration{}
10781	}
10782	return iter.page.Values()[iter.i]
10783}
10784
10785// Creates a new instance of the DscpConfigurationListResultIterator type.
10786func NewDscpConfigurationListResultIterator(page DscpConfigurationListResultPage) DscpConfigurationListResultIterator {
10787	return DscpConfigurationListResultIterator{page: page}
10788}
10789
10790// IsEmpty returns true if the ListResult contains no values.
10791func (dclr DscpConfigurationListResult) IsEmpty() bool {
10792	return dclr.Value == nil || len(*dclr.Value) == 0
10793}
10794
10795// hasNextLink returns true if the NextLink is not empty.
10796func (dclr DscpConfigurationListResult) hasNextLink() bool {
10797	return dclr.NextLink != nil && len(*dclr.NextLink) != 0
10798}
10799
10800// dscpConfigurationListResultPreparer prepares a request to retrieve the next set of results.
10801// It returns nil if no more results exist.
10802func (dclr DscpConfigurationListResult) dscpConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
10803	if !dclr.hasNextLink() {
10804		return nil, nil
10805	}
10806	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10807		autorest.AsJSON(),
10808		autorest.AsGet(),
10809		autorest.WithBaseURL(to.String(dclr.NextLink)))
10810}
10811
10812// DscpConfigurationListResultPage contains a page of DscpConfiguration values.
10813type DscpConfigurationListResultPage struct {
10814	fn   func(context.Context, DscpConfigurationListResult) (DscpConfigurationListResult, error)
10815	dclr DscpConfigurationListResult
10816}
10817
10818// NextWithContext advances to the next page of values.  If there was an error making
10819// the request the page does not advance and the error is returned.
10820func (page *DscpConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
10821	if tracing.IsEnabled() {
10822		ctx = tracing.StartSpan(ctx, fqdn+"/DscpConfigurationListResultPage.NextWithContext")
10823		defer func() {
10824			sc := -1
10825			if page.Response().Response.Response != nil {
10826				sc = page.Response().Response.Response.StatusCode
10827			}
10828			tracing.EndSpan(ctx, sc, err)
10829		}()
10830	}
10831	for {
10832		next, err := page.fn(ctx, page.dclr)
10833		if err != nil {
10834			return err
10835		}
10836		page.dclr = next
10837		if !next.hasNextLink() || !next.IsEmpty() {
10838			break
10839		}
10840	}
10841	return nil
10842}
10843
10844// Next advances to the next page of values.  If there was an error making
10845// the request the page does not advance and the error is returned.
10846// Deprecated: Use NextWithContext() instead.
10847func (page *DscpConfigurationListResultPage) Next() error {
10848	return page.NextWithContext(context.Background())
10849}
10850
10851// NotDone returns true if the page enumeration should be started or is not yet complete.
10852func (page DscpConfigurationListResultPage) NotDone() bool {
10853	return !page.dclr.IsEmpty()
10854}
10855
10856// Response returns the raw server response from the last page request.
10857func (page DscpConfigurationListResultPage) Response() DscpConfigurationListResult {
10858	return page.dclr
10859}
10860
10861// Values returns the slice of values for the current page or nil if there are no values.
10862func (page DscpConfigurationListResultPage) Values() []DscpConfiguration {
10863	if page.dclr.IsEmpty() {
10864		return nil
10865	}
10866	return *page.dclr.Value
10867}
10868
10869// Creates a new instance of the DscpConfigurationListResultPage type.
10870func NewDscpConfigurationListResultPage(cur DscpConfigurationListResult, getNextPage func(context.Context, DscpConfigurationListResult) (DscpConfigurationListResult, error)) DscpConfigurationListResultPage {
10871	return DscpConfigurationListResultPage{
10872		fn:   getNextPage,
10873		dclr: cur,
10874	}
10875}
10876
10877// DscpConfigurationPropertiesFormat DSCP Configuration properties.
10878type DscpConfigurationPropertiesFormat struct {
10879	// Markings - List of markings to be used in the configuration.
10880	Markings *[]int32 `json:"markings,omitempty"`
10881	// SourceIPRanges - Source IP ranges.
10882	SourceIPRanges *[]QosIPRange `json:"sourceIpRanges,omitempty"`
10883	// DestinationIPRanges - Destination IP ranges.
10884	DestinationIPRanges *[]QosIPRange `json:"destinationIpRanges,omitempty"`
10885	// SourcePortRanges - Sources port ranges.
10886	SourcePortRanges *[]QosPortRange `json:"sourcePortRanges,omitempty"`
10887	// DestinationPortRanges - Destination port ranges.
10888	DestinationPortRanges *[]QosPortRange `json:"destinationPortRanges,omitempty"`
10889	// Protocol - RNM supported protocol types. Possible values include: 'ProtocolTypeDoNotUse', 'ProtocolTypeIcmp', 'ProtocolTypeTCP', 'ProtocolTypeUDP', 'ProtocolTypeGre', 'ProtocolTypeEsp', 'ProtocolTypeAh', 'ProtocolTypeVxlan', 'ProtocolTypeAll'
10890	Protocol ProtocolType `json:"protocol,omitempty"`
10891	// QosCollectionID - READ-ONLY; Qos Collection ID generated by RNM.
10892	QosCollectionID *string `json:"qosCollectionId,omitempty"`
10893	// AssociatedNetworkInterfaces - READ-ONLY; Associated Network Interfaces to the DSCP Configuration.
10894	AssociatedNetworkInterfaces *[]Interface `json:"associatedNetworkInterfaces,omitempty"`
10895	// ResourceGUID - READ-ONLY; The resource GUID property of the DSCP Configuration resource.
10896	ResourceGUID *string `json:"resourceGuid,omitempty"`
10897	// ProvisioningState - READ-ONLY; The provisioning state of the DSCP Configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10898	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10899}
10900
10901// MarshalJSON is the custom marshaler for DscpConfigurationPropertiesFormat.
10902func (dcpf DscpConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
10903	objectMap := make(map[string]interface{})
10904	if dcpf.Markings != nil {
10905		objectMap["markings"] = dcpf.Markings
10906	}
10907	if dcpf.SourceIPRanges != nil {
10908		objectMap["sourceIpRanges"] = dcpf.SourceIPRanges
10909	}
10910	if dcpf.DestinationIPRanges != nil {
10911		objectMap["destinationIpRanges"] = dcpf.DestinationIPRanges
10912	}
10913	if dcpf.SourcePortRanges != nil {
10914		objectMap["sourcePortRanges"] = dcpf.SourcePortRanges
10915	}
10916	if dcpf.DestinationPortRanges != nil {
10917		objectMap["destinationPortRanges"] = dcpf.DestinationPortRanges
10918	}
10919	if dcpf.Protocol != "" {
10920		objectMap["protocol"] = dcpf.Protocol
10921	}
10922	return json.Marshal(objectMap)
10923}
10924
10925// EffectiveNetworkSecurityGroup effective network security group.
10926type EffectiveNetworkSecurityGroup struct {
10927	// NetworkSecurityGroup - The ID of network security group that is applied.
10928	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
10929	// Association - Associated resources.
10930	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
10931	// EffectiveSecurityRules - A collection of effective security rules.
10932	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
10933	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
10934	TagMap map[string][]string `json:"tagMap"`
10935}
10936
10937// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
10938func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
10939	objectMap := make(map[string]interface{})
10940	if ensg.NetworkSecurityGroup != nil {
10941		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
10942	}
10943	if ensg.Association != nil {
10944		objectMap["association"] = ensg.Association
10945	}
10946	if ensg.EffectiveSecurityRules != nil {
10947		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
10948	}
10949	if ensg.TagMap != nil {
10950		objectMap["tagMap"] = ensg.TagMap
10951	}
10952	return json.Marshal(objectMap)
10953}
10954
10955// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
10956type EffectiveNetworkSecurityGroupAssociation struct {
10957	// Subnet - The ID of the subnet if assigned.
10958	Subnet *SubResource `json:"subnet,omitempty"`
10959	// NetworkInterface - The ID of the network interface if assigned.
10960	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
10961}
10962
10963// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
10964// call.
10965type EffectiveNetworkSecurityGroupListResult struct {
10966	autorest.Response `json:"-"`
10967	// Value - A list of effective network security groups.
10968	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
10969	// NextLink - READ-ONLY; The URL to get the next set of results.
10970	NextLink *string `json:"nextLink,omitempty"`
10971}
10972
10973// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
10974func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
10975	objectMap := make(map[string]interface{})
10976	if ensglr.Value != nil {
10977		objectMap["value"] = ensglr.Value
10978	}
10979	return json.Marshal(objectMap)
10980}
10981
10982// EffectiveNetworkSecurityRule effective network security rules.
10983type EffectiveNetworkSecurityRule struct {
10984	// Name - The name of the security rule specified by the user (if created by the user).
10985	Name *string `json:"name,omitempty"`
10986	// Protocol - The network protocol this rule applies to. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
10987	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
10988	// SourcePortRange - The source port or range.
10989	SourcePortRange *string `json:"sourcePortRange,omitempty"`
10990	// DestinationPortRange - The destination port or range.
10991	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
10992	// 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 (*).
10993	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
10994	// 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 (*).
10995	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
10996	// SourceAddressPrefix - The source address prefix.
10997	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
10998	// DestinationAddressPrefix - The destination address prefix.
10999	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
11000	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
11001	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
11002	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
11003	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
11004	// ExpandedSourceAddressPrefix - The expanded source address prefix.
11005	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
11006	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
11007	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
11008	// Access - Whether network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
11009	Access SecurityRuleAccess `json:"access,omitempty"`
11010	// Priority - The priority of the rule.
11011	Priority *int32 `json:"priority,omitempty"`
11012	// Direction - The direction of the rule. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
11013	Direction SecurityRuleDirection `json:"direction,omitempty"`
11014}
11015
11016// EffectiveRoute effective Route.
11017type EffectiveRoute struct {
11018	// Name - The name of the user defined route. This is optional.
11019	Name *string `json:"name,omitempty"`
11020	// DisableBgpRoutePropagation - If true, on-premises routes are not propagated to the network interfaces in the subnet.
11021	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
11022	// Source - Who created the route. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
11023	Source EffectiveRouteSource `json:"source,omitempty"`
11024	// State - The value of effective route. Possible values include: 'Active', 'Invalid'
11025	State EffectiveRouteState `json:"state,omitempty"`
11026	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
11027	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
11028	// NextHopIPAddress - The IP address of the next hop of the effective route.
11029	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
11030	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
11031	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
11032}
11033
11034// EffectiveRouteListResult response for list effective route API service call.
11035type EffectiveRouteListResult struct {
11036	autorest.Response `json:"-"`
11037	// Value - A list of effective routes.
11038	Value *[]EffectiveRoute `json:"value,omitempty"`
11039	// NextLink - READ-ONLY; The URL to get the next set of results.
11040	NextLink *string `json:"nextLink,omitempty"`
11041}
11042
11043// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
11044func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
11045	objectMap := make(map[string]interface{})
11046	if erlr.Value != nil {
11047		objectMap["value"] = erlr.Value
11048	}
11049	return json.Marshal(objectMap)
11050}
11051
11052// EffectiveRoutesParameters the parameters specifying the resource whose effective routes are being
11053// requested.
11054type EffectiveRoutesParameters struct {
11055	// ResourceID - The resource whose effective routes are being requested.
11056	ResourceID *string `json:"resourceId,omitempty"`
11057	// VirtualWanResourceType - The type of the specified resource like RouteTable, ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection and P2SConnection.
11058	VirtualWanResourceType *string `json:"virtualWanResourceType,omitempty"`
11059}
11060
11061// EndpointServiceResult endpoint service.
11062type EndpointServiceResult struct {
11063	// Name - READ-ONLY; Name of the endpoint service.
11064	Name *string `json:"name,omitempty"`
11065	// Type - READ-ONLY; Type of the endpoint service.
11066	Type *string `json:"type,omitempty"`
11067	// ID - Resource ID.
11068	ID *string `json:"id,omitempty"`
11069}
11070
11071// MarshalJSON is the custom marshaler for EndpointServiceResult.
11072func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
11073	objectMap := make(map[string]interface{})
11074	if esr.ID != nil {
11075		objectMap["id"] = esr.ID
11076	}
11077	return json.Marshal(objectMap)
11078}
11079
11080// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
11081type EndpointServicesListResult struct {
11082	autorest.Response `json:"-"`
11083	// Value - List of available endpoint services in a region.
11084	Value *[]EndpointServiceResult `json:"value,omitempty"`
11085	// NextLink - The URL to get the next set of results.
11086	NextLink *string `json:"nextLink,omitempty"`
11087}
11088
11089// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
11090// values.
11091type EndpointServicesListResultIterator struct {
11092	i    int
11093	page EndpointServicesListResultPage
11094}
11095
11096// NextWithContext advances to the next value.  If there was an error making
11097// the request the iterator does not advance and the error is returned.
11098func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
11099	if tracing.IsEnabled() {
11100		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
11101		defer func() {
11102			sc := -1
11103			if iter.Response().Response.Response != nil {
11104				sc = iter.Response().Response.Response.StatusCode
11105			}
11106			tracing.EndSpan(ctx, sc, err)
11107		}()
11108	}
11109	iter.i++
11110	if iter.i < len(iter.page.Values()) {
11111		return nil
11112	}
11113	err = iter.page.NextWithContext(ctx)
11114	if err != nil {
11115		iter.i--
11116		return err
11117	}
11118	iter.i = 0
11119	return nil
11120}
11121
11122// Next advances to the next value.  If there was an error making
11123// the request the iterator does not advance and the error is returned.
11124// Deprecated: Use NextWithContext() instead.
11125func (iter *EndpointServicesListResultIterator) Next() error {
11126	return iter.NextWithContext(context.Background())
11127}
11128
11129// NotDone returns true if the enumeration should be started or is not yet complete.
11130func (iter EndpointServicesListResultIterator) NotDone() bool {
11131	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11132}
11133
11134// Response returns the raw server response from the last page request.
11135func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
11136	return iter.page.Response()
11137}
11138
11139// Value returns the current value or a zero-initialized value if the
11140// iterator has advanced beyond the end of the collection.
11141func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
11142	if !iter.page.NotDone() {
11143		return EndpointServiceResult{}
11144	}
11145	return iter.page.Values()[iter.i]
11146}
11147
11148// Creates a new instance of the EndpointServicesListResultIterator type.
11149func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
11150	return EndpointServicesListResultIterator{page: page}
11151}
11152
11153// IsEmpty returns true if the ListResult contains no values.
11154func (eslr EndpointServicesListResult) IsEmpty() bool {
11155	return eslr.Value == nil || len(*eslr.Value) == 0
11156}
11157
11158// hasNextLink returns true if the NextLink is not empty.
11159func (eslr EndpointServicesListResult) hasNextLink() bool {
11160	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
11161}
11162
11163// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
11164// It returns nil if no more results exist.
11165func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
11166	if !eslr.hasNextLink() {
11167		return nil, nil
11168	}
11169	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11170		autorest.AsJSON(),
11171		autorest.AsGet(),
11172		autorest.WithBaseURL(to.String(eslr.NextLink)))
11173}
11174
11175// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
11176type EndpointServicesListResultPage struct {
11177	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
11178	eslr EndpointServicesListResult
11179}
11180
11181// NextWithContext advances to the next page of values.  If there was an error making
11182// the request the page does not advance and the error is returned.
11183func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
11184	if tracing.IsEnabled() {
11185		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
11186		defer func() {
11187			sc := -1
11188			if page.Response().Response.Response != nil {
11189				sc = page.Response().Response.Response.StatusCode
11190			}
11191			tracing.EndSpan(ctx, sc, err)
11192		}()
11193	}
11194	for {
11195		next, err := page.fn(ctx, page.eslr)
11196		if err != nil {
11197			return err
11198		}
11199		page.eslr = next
11200		if !next.hasNextLink() || !next.IsEmpty() {
11201			break
11202		}
11203	}
11204	return nil
11205}
11206
11207// Next advances to the next page of values.  If there was an error making
11208// the request the page does not advance and the error is returned.
11209// Deprecated: Use NextWithContext() instead.
11210func (page *EndpointServicesListResultPage) Next() error {
11211	return page.NextWithContext(context.Background())
11212}
11213
11214// NotDone returns true if the page enumeration should be started or is not yet complete.
11215func (page EndpointServicesListResultPage) NotDone() bool {
11216	return !page.eslr.IsEmpty()
11217}
11218
11219// Response returns the raw server response from the last page request.
11220func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
11221	return page.eslr
11222}
11223
11224// Values returns the slice of values for the current page or nil if there are no values.
11225func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
11226	if page.eslr.IsEmpty() {
11227		return nil
11228	}
11229	return *page.eslr.Value
11230}
11231
11232// Creates a new instance of the EndpointServicesListResultPage type.
11233func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
11234	return EndpointServicesListResultPage{
11235		fn:   getNextPage,
11236		eslr: cur,
11237	}
11238}
11239
11240// Error common error representation.
11241type Error struct {
11242	// Code - Error code.
11243	Code *string `json:"code,omitempty"`
11244	// Message - Error message.
11245	Message *string `json:"message,omitempty"`
11246	// Target - Error target.
11247	Target *string `json:"target,omitempty"`
11248	// Details - Error details.
11249	Details *[]ErrorDetails `json:"details,omitempty"`
11250	// InnerError - Inner error message.
11251	InnerError *string `json:"innerError,omitempty"`
11252}
11253
11254// ErrorDetails common error details representation.
11255type ErrorDetails struct {
11256	// Code - Error code.
11257	Code *string `json:"code,omitempty"`
11258	// Target - Error target.
11259	Target *string `json:"target,omitempty"`
11260	// Message - Error message.
11261	Message *string `json:"message,omitempty"`
11262}
11263
11264// ErrorResponse the error object.
11265type ErrorResponse struct {
11266	// Error - The error details object.
11267	Error *ErrorDetails `json:"error,omitempty"`
11268}
11269
11270// EvaluatedNetworkSecurityGroup results of network security group evaluation.
11271type EvaluatedNetworkSecurityGroup struct {
11272	// NetworkSecurityGroupID - Network security group ID.
11273	NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
11274	// AppliedTo - Resource ID of nic or subnet to which network security group is applied.
11275	AppliedTo *string `json:"appliedTo,omitempty"`
11276	// MatchedRule - Matched network security rule.
11277	MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
11278	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
11279	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
11280}
11281
11282// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
11283func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
11284	objectMap := make(map[string]interface{})
11285	if ensg.NetworkSecurityGroupID != nil {
11286		objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
11287	}
11288	if ensg.AppliedTo != nil {
11289		objectMap["appliedTo"] = ensg.AppliedTo
11290	}
11291	if ensg.MatchedRule != nil {
11292		objectMap["matchedRule"] = ensg.MatchedRule
11293	}
11294	return json.Marshal(objectMap)
11295}
11296
11297// ExpressRouteCircuit expressRouteCircuit resource.
11298type ExpressRouteCircuit struct {
11299	autorest.Response `json:"-"`
11300	// Sku - The SKU.
11301	Sku *ExpressRouteCircuitSku `json:"sku,omitempty"`
11302	// ExpressRouteCircuitPropertiesFormat - Properties of the express route circuit.
11303	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
11304	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11305	Etag *string `json:"etag,omitempty"`
11306	// ID - Resource ID.
11307	ID *string `json:"id,omitempty"`
11308	// Name - READ-ONLY; Resource name.
11309	Name *string `json:"name,omitempty"`
11310	// Type - READ-ONLY; Resource type.
11311	Type *string `json:"type,omitempty"`
11312	// Location - Resource location.
11313	Location *string `json:"location,omitempty"`
11314	// Tags - Resource tags.
11315	Tags map[string]*string `json:"tags"`
11316}
11317
11318// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
11319func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
11320	objectMap := make(map[string]interface{})
11321	if erc.Sku != nil {
11322		objectMap["sku"] = erc.Sku
11323	}
11324	if erc.ExpressRouteCircuitPropertiesFormat != nil {
11325		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
11326	}
11327	if erc.ID != nil {
11328		objectMap["id"] = erc.ID
11329	}
11330	if erc.Location != nil {
11331		objectMap["location"] = erc.Location
11332	}
11333	if erc.Tags != nil {
11334		objectMap["tags"] = erc.Tags
11335	}
11336	return json.Marshal(objectMap)
11337}
11338
11339// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
11340func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
11341	var m map[string]*json.RawMessage
11342	err := json.Unmarshal(body, &m)
11343	if err != nil {
11344		return err
11345	}
11346	for k, v := range m {
11347		switch k {
11348		case "sku":
11349			if v != nil {
11350				var sku ExpressRouteCircuitSku
11351				err = json.Unmarshal(*v, &sku)
11352				if err != nil {
11353					return err
11354				}
11355				erc.Sku = &sku
11356			}
11357		case "properties":
11358			if v != nil {
11359				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
11360				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
11361				if err != nil {
11362					return err
11363				}
11364				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
11365			}
11366		case "etag":
11367			if v != nil {
11368				var etag string
11369				err = json.Unmarshal(*v, &etag)
11370				if err != nil {
11371					return err
11372				}
11373				erc.Etag = &etag
11374			}
11375		case "id":
11376			if v != nil {
11377				var ID string
11378				err = json.Unmarshal(*v, &ID)
11379				if err != nil {
11380					return err
11381				}
11382				erc.ID = &ID
11383			}
11384		case "name":
11385			if v != nil {
11386				var name string
11387				err = json.Unmarshal(*v, &name)
11388				if err != nil {
11389					return err
11390				}
11391				erc.Name = &name
11392			}
11393		case "type":
11394			if v != nil {
11395				var typeVar string
11396				err = json.Unmarshal(*v, &typeVar)
11397				if err != nil {
11398					return err
11399				}
11400				erc.Type = &typeVar
11401			}
11402		case "location":
11403			if v != nil {
11404				var location string
11405				err = json.Unmarshal(*v, &location)
11406				if err != nil {
11407					return err
11408				}
11409				erc.Location = &location
11410			}
11411		case "tags":
11412			if v != nil {
11413				var tags map[string]*string
11414				err = json.Unmarshal(*v, &tags)
11415				if err != nil {
11416					return err
11417				}
11418				erc.Tags = tags
11419			}
11420		}
11421	}
11422
11423	return nil
11424}
11425
11426// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
11427type ExpressRouteCircuitArpTable struct {
11428	// Age - Entry age in minutes.
11429	Age *int32 `json:"age,omitempty"`
11430	// Interface - Interface address.
11431	Interface *string `json:"interface,omitempty"`
11432	// IPAddress - The IP address.
11433	IPAddress *string `json:"ipAddress,omitempty"`
11434	// MacAddress - The MAC address.
11435	MacAddress *string `json:"macAddress,omitempty"`
11436}
11437
11438// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
11439type ExpressRouteCircuitAuthorization struct {
11440	autorest.Response `json:"-"`
11441	// AuthorizationPropertiesFormat - Properties of the express route circuit authorization.
11442	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
11443	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11444	Name *string `json:"name,omitempty"`
11445	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11446	Etag *string `json:"etag,omitempty"`
11447	// Type - READ-ONLY; Type of the resource.
11448	Type *string `json:"type,omitempty"`
11449	// ID - Resource ID.
11450	ID *string `json:"id,omitempty"`
11451}
11452
11453// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
11454func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
11455	objectMap := make(map[string]interface{})
11456	if erca.AuthorizationPropertiesFormat != nil {
11457		objectMap["properties"] = erca.AuthorizationPropertiesFormat
11458	}
11459	if erca.Name != nil {
11460		objectMap["name"] = erca.Name
11461	}
11462	if erca.ID != nil {
11463		objectMap["id"] = erca.ID
11464	}
11465	return json.Marshal(objectMap)
11466}
11467
11468// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
11469func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
11470	var m map[string]*json.RawMessage
11471	err := json.Unmarshal(body, &m)
11472	if err != nil {
11473		return err
11474	}
11475	for k, v := range m {
11476		switch k {
11477		case "properties":
11478			if v != nil {
11479				var authorizationPropertiesFormat AuthorizationPropertiesFormat
11480				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
11481				if err != nil {
11482					return err
11483				}
11484				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
11485			}
11486		case "name":
11487			if v != nil {
11488				var name string
11489				err = json.Unmarshal(*v, &name)
11490				if err != nil {
11491					return err
11492				}
11493				erca.Name = &name
11494			}
11495		case "etag":
11496			if v != nil {
11497				var etag string
11498				err = json.Unmarshal(*v, &etag)
11499				if err != nil {
11500					return err
11501				}
11502				erca.Etag = &etag
11503			}
11504		case "type":
11505			if v != nil {
11506				var typeVar string
11507				err = json.Unmarshal(*v, &typeVar)
11508				if err != nil {
11509					return err
11510				}
11511				erca.Type = &typeVar
11512			}
11513		case "id":
11514			if v != nil {
11515				var ID string
11516				err = json.Unmarshal(*v, &ID)
11517				if err != nil {
11518					return err
11519				}
11520				erca.ID = &ID
11521			}
11522		}
11523	}
11524
11525	return nil
11526}
11527
11528// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
11529// results of a long-running operation.
11530type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
11531	azure.FutureAPI
11532	// Result returns the result of the asynchronous operation.
11533	// If the operation has not completed it will return an error.
11534	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
11535}
11536
11537// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
11538// of a long-running operation.
11539type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
11540	azure.FutureAPI
11541	// Result returns the result of the asynchronous operation.
11542	// If the operation has not completed it will return an error.
11543	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
11544}
11545
11546// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
11547// resource.
11548type ExpressRouteCircuitConnection struct {
11549	autorest.Response `json:"-"`
11550	// ExpressRouteCircuitConnectionPropertiesFormat - Properties of the express route circuit connection.
11551	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
11552	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11553	Name *string `json:"name,omitempty"`
11554	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11555	Etag *string `json:"etag,omitempty"`
11556	// Type - READ-ONLY; Type of the resource.
11557	Type *string `json:"type,omitempty"`
11558	// ID - Resource ID.
11559	ID *string `json:"id,omitempty"`
11560}
11561
11562// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
11563func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
11564	objectMap := make(map[string]interface{})
11565	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
11566		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
11567	}
11568	if ercc.Name != nil {
11569		objectMap["name"] = ercc.Name
11570	}
11571	if ercc.ID != nil {
11572		objectMap["id"] = ercc.ID
11573	}
11574	return json.Marshal(objectMap)
11575}
11576
11577// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
11578func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
11579	var m map[string]*json.RawMessage
11580	err := json.Unmarshal(body, &m)
11581	if err != nil {
11582		return err
11583	}
11584	for k, v := range m {
11585		switch k {
11586		case "properties":
11587			if v != nil {
11588				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
11589				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
11590				if err != nil {
11591					return err
11592				}
11593				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
11594			}
11595		case "name":
11596			if v != nil {
11597				var name string
11598				err = json.Unmarshal(*v, &name)
11599				if err != nil {
11600					return err
11601				}
11602				ercc.Name = &name
11603			}
11604		case "etag":
11605			if v != nil {
11606				var etag string
11607				err = json.Unmarshal(*v, &etag)
11608				if err != nil {
11609					return err
11610				}
11611				ercc.Etag = &etag
11612			}
11613		case "type":
11614			if v != nil {
11615				var typeVar string
11616				err = json.Unmarshal(*v, &typeVar)
11617				if err != nil {
11618					return err
11619				}
11620				ercc.Type = &typeVar
11621			}
11622		case "id":
11623			if v != nil {
11624				var ID string
11625				err = json.Unmarshal(*v, &ID)
11626				if err != nil {
11627					return err
11628				}
11629				ercc.ID = &ID
11630			}
11631		}
11632	}
11633
11634	return nil
11635}
11636
11637// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all
11638// global reach connections that belongs to a Private Peering for an ExpressRouteCircuit.
11639type ExpressRouteCircuitConnectionListResult struct {
11640	autorest.Response `json:"-"`
11641	// Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit.
11642	Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"`
11643	// NextLink - The URL to get the next set of results.
11644	NextLink *string `json:"nextLink,omitempty"`
11645}
11646
11647// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
11648// ExpressRouteCircuitConnection values.
11649type ExpressRouteCircuitConnectionListResultIterator struct {
11650	i    int
11651	page ExpressRouteCircuitConnectionListResultPage
11652}
11653
11654// NextWithContext advances to the next value.  If there was an error making
11655// the request the iterator does not advance and the error is returned.
11656func (iter *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
11657	if tracing.IsEnabled() {
11658		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.NextWithContext")
11659		defer func() {
11660			sc := -1
11661			if iter.Response().Response.Response != nil {
11662				sc = iter.Response().Response.Response.StatusCode
11663			}
11664			tracing.EndSpan(ctx, sc, err)
11665		}()
11666	}
11667	iter.i++
11668	if iter.i < len(iter.page.Values()) {
11669		return nil
11670	}
11671	err = iter.page.NextWithContext(ctx)
11672	if err != nil {
11673		iter.i--
11674		return err
11675	}
11676	iter.i = 0
11677	return nil
11678}
11679
11680// Next advances to the next value.  If there was an error making
11681// the request the iterator does not advance and the error is returned.
11682// Deprecated: Use NextWithContext() instead.
11683func (iter *ExpressRouteCircuitConnectionListResultIterator) Next() error {
11684	return iter.NextWithContext(context.Background())
11685}
11686
11687// NotDone returns true if the enumeration should be started or is not yet complete.
11688func (iter ExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
11689	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11690}
11691
11692// Response returns the raw server response from the last page request.
11693func (iter ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult {
11694	return iter.page.Response()
11695}
11696
11697// Value returns the current value or a zero-initialized value if the
11698// iterator has advanced beyond the end of the collection.
11699func (iter ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection {
11700	if !iter.page.NotDone() {
11701		return ExpressRouteCircuitConnection{}
11702	}
11703	return iter.page.Values()[iter.i]
11704}
11705
11706// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type.
11707func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator {
11708	return ExpressRouteCircuitConnectionListResultIterator{page: page}
11709}
11710
11711// IsEmpty returns true if the ListResult contains no values.
11712func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool {
11713	return ercclr.Value == nil || len(*ercclr.Value) == 0
11714}
11715
11716// hasNextLink returns true if the NextLink is not empty.
11717func (ercclr ExpressRouteCircuitConnectionListResult) hasNextLink() bool {
11718	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
11719}
11720
11721// expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
11722// It returns nil if no more results exist.
11723func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
11724	if !ercclr.hasNextLink() {
11725		return nil, nil
11726	}
11727	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11728		autorest.AsJSON(),
11729		autorest.AsGet(),
11730		autorest.WithBaseURL(to.String(ercclr.NextLink)))
11731}
11732
11733// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values.
11734type ExpressRouteCircuitConnectionListResultPage struct {
11735	fn     func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)
11736	ercclr ExpressRouteCircuitConnectionListResult
11737}
11738
11739// NextWithContext advances to the next page of values.  If there was an error making
11740// the request the page does not advance and the error is returned.
11741func (page *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
11742	if tracing.IsEnabled() {
11743		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.NextWithContext")
11744		defer func() {
11745			sc := -1
11746			if page.Response().Response.Response != nil {
11747				sc = page.Response().Response.Response.StatusCode
11748			}
11749			tracing.EndSpan(ctx, sc, err)
11750		}()
11751	}
11752	for {
11753		next, err := page.fn(ctx, page.ercclr)
11754		if err != nil {
11755			return err
11756		}
11757		page.ercclr = next
11758		if !next.hasNextLink() || !next.IsEmpty() {
11759			break
11760		}
11761	}
11762	return nil
11763}
11764
11765// Next advances to the next page of values.  If there was an error making
11766// the request the page does not advance and the error is returned.
11767// Deprecated: Use NextWithContext() instead.
11768func (page *ExpressRouteCircuitConnectionListResultPage) Next() error {
11769	return page.NextWithContext(context.Background())
11770}
11771
11772// NotDone returns true if the page enumeration should be started or is not yet complete.
11773func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool {
11774	return !page.ercclr.IsEmpty()
11775}
11776
11777// Response returns the raw server response from the last page request.
11778func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult {
11779	return page.ercclr
11780}
11781
11782// Values returns the slice of values for the current page or nil if there are no values.
11783func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection {
11784	if page.ercclr.IsEmpty() {
11785		return nil
11786	}
11787	return *page.ercclr.Value
11788}
11789
11790// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type.
11791func NewExpressRouteCircuitConnectionListResultPage(cur ExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage {
11792	return ExpressRouteCircuitConnectionListResultPage{
11793		fn:     getNextPage,
11794		ercclr: cur,
11795	}
11796}
11797
11798// ExpressRouteCircuitConnectionPropertiesFormat properties of the express route circuit connection.
11799type ExpressRouteCircuitConnectionPropertiesFormat struct {
11800	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
11801	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
11802	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
11803	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
11804	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
11805	AddressPrefix *string `json:"addressPrefix,omitempty"`
11806	// AuthorizationKey - The authorization key.
11807	AuthorizationKey *string `json:"authorizationKey,omitempty"`
11808	// Ipv6CircuitConnectionConfig - IPv6 Address PrefixProperties of the express route circuit connection.
11809	Ipv6CircuitConnectionConfig *Ipv6CircuitConnectionConfig `json:"ipv6CircuitConnectionConfig,omitempty"`
11810	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
11811	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
11812	// ProvisioningState - READ-ONLY; The provisioning state of the express route circuit connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
11813	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11814}
11815
11816// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
11817func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
11818	objectMap := make(map[string]interface{})
11819	if erccpf.ExpressRouteCircuitPeering != nil {
11820		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
11821	}
11822	if erccpf.PeerExpressRouteCircuitPeering != nil {
11823		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
11824	}
11825	if erccpf.AddressPrefix != nil {
11826		objectMap["addressPrefix"] = erccpf.AddressPrefix
11827	}
11828	if erccpf.AuthorizationKey != nil {
11829		objectMap["authorizationKey"] = erccpf.AuthorizationKey
11830	}
11831	if erccpf.Ipv6CircuitConnectionConfig != nil {
11832		objectMap["ipv6CircuitConnectionConfig"] = erccpf.Ipv6CircuitConnectionConfig
11833	}
11834	if erccpf.CircuitConnectionStatus != "" {
11835		objectMap["circuitConnectionStatus"] = erccpf.CircuitConnectionStatus
11836	}
11837	return json.Marshal(objectMap)
11838}
11839
11840// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
11841// results of a long-running operation.
11842type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
11843	azure.FutureAPI
11844	// Result returns the result of the asynchronous operation.
11845	// If the operation has not completed it will return an error.
11846	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
11847}
11848
11849// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
11850// long-running operation.
11851type ExpressRouteCircuitConnectionsDeleteFuture struct {
11852	azure.FutureAPI
11853	// Result returns the result of the asynchronous operation.
11854	// If the operation has not completed it will return an error.
11855	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
11856}
11857
11858// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
11859type ExpressRouteCircuitListResult struct {
11860	autorest.Response `json:"-"`
11861	// Value - A list of ExpressRouteCircuits in a resource group.
11862	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
11863	// NextLink - The URL to get the next set of results.
11864	NextLink *string `json:"nextLink,omitempty"`
11865}
11866
11867// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
11868// values.
11869type ExpressRouteCircuitListResultIterator struct {
11870	i    int
11871	page ExpressRouteCircuitListResultPage
11872}
11873
11874// NextWithContext advances to the next value.  If there was an error making
11875// the request the iterator does not advance and the error is returned.
11876func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
11877	if tracing.IsEnabled() {
11878		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
11879		defer func() {
11880			sc := -1
11881			if iter.Response().Response.Response != nil {
11882				sc = iter.Response().Response.Response.StatusCode
11883			}
11884			tracing.EndSpan(ctx, sc, err)
11885		}()
11886	}
11887	iter.i++
11888	if iter.i < len(iter.page.Values()) {
11889		return nil
11890	}
11891	err = iter.page.NextWithContext(ctx)
11892	if err != nil {
11893		iter.i--
11894		return err
11895	}
11896	iter.i = 0
11897	return nil
11898}
11899
11900// Next advances to the next value.  If there was an error making
11901// the request the iterator does not advance and the error is returned.
11902// Deprecated: Use NextWithContext() instead.
11903func (iter *ExpressRouteCircuitListResultIterator) Next() error {
11904	return iter.NextWithContext(context.Background())
11905}
11906
11907// NotDone returns true if the enumeration should be started or is not yet complete.
11908func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
11909	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11910}
11911
11912// Response returns the raw server response from the last page request.
11913func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
11914	return iter.page.Response()
11915}
11916
11917// Value returns the current value or a zero-initialized value if the
11918// iterator has advanced beyond the end of the collection.
11919func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
11920	if !iter.page.NotDone() {
11921		return ExpressRouteCircuit{}
11922	}
11923	return iter.page.Values()[iter.i]
11924}
11925
11926// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
11927func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
11928	return ExpressRouteCircuitListResultIterator{page: page}
11929}
11930
11931// IsEmpty returns true if the ListResult contains no values.
11932func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
11933	return erclr.Value == nil || len(*erclr.Value) == 0
11934}
11935
11936// hasNextLink returns true if the NextLink is not empty.
11937func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
11938	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
11939}
11940
11941// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
11942// It returns nil if no more results exist.
11943func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
11944	if !erclr.hasNextLink() {
11945		return nil, nil
11946	}
11947	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11948		autorest.AsJSON(),
11949		autorest.AsGet(),
11950		autorest.WithBaseURL(to.String(erclr.NextLink)))
11951}
11952
11953// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
11954type ExpressRouteCircuitListResultPage struct {
11955	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
11956	erclr ExpressRouteCircuitListResult
11957}
11958
11959// NextWithContext advances to the next page of values.  If there was an error making
11960// the request the page does not advance and the error is returned.
11961func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
11962	if tracing.IsEnabled() {
11963		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
11964		defer func() {
11965			sc := -1
11966			if page.Response().Response.Response != nil {
11967				sc = page.Response().Response.Response.StatusCode
11968			}
11969			tracing.EndSpan(ctx, sc, err)
11970		}()
11971	}
11972	for {
11973		next, err := page.fn(ctx, page.erclr)
11974		if err != nil {
11975			return err
11976		}
11977		page.erclr = next
11978		if !next.hasNextLink() || !next.IsEmpty() {
11979			break
11980		}
11981	}
11982	return nil
11983}
11984
11985// Next advances to the next page of values.  If there was an error making
11986// the request the page does not advance and the error is returned.
11987// Deprecated: Use NextWithContext() instead.
11988func (page *ExpressRouteCircuitListResultPage) Next() error {
11989	return page.NextWithContext(context.Background())
11990}
11991
11992// NotDone returns true if the page enumeration should be started or is not yet complete.
11993func (page ExpressRouteCircuitListResultPage) NotDone() bool {
11994	return !page.erclr.IsEmpty()
11995}
11996
11997// Response returns the raw server response from the last page request.
11998func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
11999	return page.erclr
12000}
12001
12002// Values returns the slice of values for the current page or nil if there are no values.
12003func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
12004	if page.erclr.IsEmpty() {
12005		return nil
12006	}
12007	return *page.erclr.Value
12008}
12009
12010// Creates a new instance of the ExpressRouteCircuitListResultPage type.
12011func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
12012	return ExpressRouteCircuitListResultPage{
12013		fn:    getNextPage,
12014		erclr: cur,
12015	}
12016}
12017
12018// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
12019type ExpressRouteCircuitPeering struct {
12020	autorest.Response `json:"-"`
12021	// ExpressRouteCircuitPeeringPropertiesFormat - Properties of the express route circuit peering.
12022	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
12023	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12024	Name *string `json:"name,omitempty"`
12025	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12026	Etag *string `json:"etag,omitempty"`
12027	// Type - READ-ONLY; Type of the resource.
12028	Type *string `json:"type,omitempty"`
12029	// ID - Resource ID.
12030	ID *string `json:"id,omitempty"`
12031}
12032
12033// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
12034func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
12035	objectMap := make(map[string]interface{})
12036	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
12037		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
12038	}
12039	if ercp.Name != nil {
12040		objectMap["name"] = ercp.Name
12041	}
12042	if ercp.ID != nil {
12043		objectMap["id"] = ercp.ID
12044	}
12045	return json.Marshal(objectMap)
12046}
12047
12048// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
12049func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
12050	var m map[string]*json.RawMessage
12051	err := json.Unmarshal(body, &m)
12052	if err != nil {
12053		return err
12054	}
12055	for k, v := range m {
12056		switch k {
12057		case "properties":
12058			if v != nil {
12059				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
12060				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
12061				if err != nil {
12062					return err
12063				}
12064				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
12065			}
12066		case "name":
12067			if v != nil {
12068				var name string
12069				err = json.Unmarshal(*v, &name)
12070				if err != nil {
12071					return err
12072				}
12073				ercp.Name = &name
12074			}
12075		case "etag":
12076			if v != nil {
12077				var etag string
12078				err = json.Unmarshal(*v, &etag)
12079				if err != nil {
12080					return err
12081				}
12082				ercp.Etag = &etag
12083			}
12084		case "type":
12085			if v != nil {
12086				var typeVar string
12087				err = json.Unmarshal(*v, &typeVar)
12088				if err != nil {
12089					return err
12090				}
12091				ercp.Type = &typeVar
12092			}
12093		case "id":
12094			if v != nil {
12095				var ID string
12096				err = json.Unmarshal(*v, &ID)
12097				if err != nil {
12098					return err
12099				}
12100				ercp.ID = &ID
12101			}
12102		}
12103	}
12104
12105	return nil
12106}
12107
12108// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
12109type ExpressRouteCircuitPeeringConfig struct {
12110	// AdvertisedPublicPrefixes - The reference to AdvertisedPublicPrefixes.
12111	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
12112	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering.
12113	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
12114	// AdvertisedPublicPrefixesState - READ-ONLY; The advertised public prefix state of the Peering resource. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
12115	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
12116	// LegacyMode - The legacy mode of the peering.
12117	LegacyMode *int32 `json:"legacyMode,omitempty"`
12118	// CustomerASN - The CustomerASN of the peering.
12119	CustomerASN *int32 `json:"customerASN,omitempty"`
12120	// RoutingRegistryName - The RoutingRegistryName of the configuration.
12121	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
12122}
12123
12124// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringConfig.
12125func (ercpc ExpressRouteCircuitPeeringConfig) MarshalJSON() ([]byte, error) {
12126	objectMap := make(map[string]interface{})
12127	if ercpc.AdvertisedPublicPrefixes != nil {
12128		objectMap["advertisedPublicPrefixes"] = ercpc.AdvertisedPublicPrefixes
12129	}
12130	if ercpc.AdvertisedCommunities != nil {
12131		objectMap["advertisedCommunities"] = ercpc.AdvertisedCommunities
12132	}
12133	if ercpc.LegacyMode != nil {
12134		objectMap["legacyMode"] = ercpc.LegacyMode
12135	}
12136	if ercpc.CustomerASN != nil {
12137		objectMap["customerASN"] = ercpc.CustomerASN
12138	}
12139	if ercpc.RoutingRegistryName != nil {
12140		objectMap["routingRegistryName"] = ercpc.RoutingRegistryName
12141	}
12142	return json.Marshal(objectMap)
12143}
12144
12145// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier.
12146type ExpressRouteCircuitPeeringID struct {
12147	// ID - The ID of the ExpressRoute circuit peering.
12148	ID *string `json:"id,omitempty"`
12149}
12150
12151// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
12152// that belong to an ExpressRouteCircuit.
12153type ExpressRouteCircuitPeeringListResult struct {
12154	autorest.Response `json:"-"`
12155	// Value - The peerings in an express route circuit.
12156	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
12157	// NextLink - The URL to get the next set of results.
12158	NextLink *string `json:"nextLink,omitempty"`
12159}
12160
12161// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
12162// ExpressRouteCircuitPeering values.
12163type ExpressRouteCircuitPeeringListResultIterator struct {
12164	i    int
12165	page ExpressRouteCircuitPeeringListResultPage
12166}
12167
12168// NextWithContext advances to the next value.  If there was an error making
12169// the request the iterator does not advance and the error is returned.
12170func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
12171	if tracing.IsEnabled() {
12172		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
12173		defer func() {
12174			sc := -1
12175			if iter.Response().Response.Response != nil {
12176				sc = iter.Response().Response.Response.StatusCode
12177			}
12178			tracing.EndSpan(ctx, sc, err)
12179		}()
12180	}
12181	iter.i++
12182	if iter.i < len(iter.page.Values()) {
12183		return nil
12184	}
12185	err = iter.page.NextWithContext(ctx)
12186	if err != nil {
12187		iter.i--
12188		return err
12189	}
12190	iter.i = 0
12191	return nil
12192}
12193
12194// Next advances to the next value.  If there was an error making
12195// the request the iterator does not advance and the error is returned.
12196// Deprecated: Use NextWithContext() instead.
12197func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
12198	return iter.NextWithContext(context.Background())
12199}
12200
12201// NotDone returns true if the enumeration should be started or is not yet complete.
12202func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
12203	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12204}
12205
12206// Response returns the raw server response from the last page request.
12207func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
12208	return iter.page.Response()
12209}
12210
12211// Value returns the current value or a zero-initialized value if the
12212// iterator has advanced beyond the end of the collection.
12213func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
12214	if !iter.page.NotDone() {
12215		return ExpressRouteCircuitPeering{}
12216	}
12217	return iter.page.Values()[iter.i]
12218}
12219
12220// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
12221func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
12222	return ExpressRouteCircuitPeeringListResultIterator{page: page}
12223}
12224
12225// IsEmpty returns true if the ListResult contains no values.
12226func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
12227	return ercplr.Value == nil || len(*ercplr.Value) == 0
12228}
12229
12230// hasNextLink returns true if the NextLink is not empty.
12231func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
12232	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
12233}
12234
12235// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
12236// It returns nil if no more results exist.
12237func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
12238	if !ercplr.hasNextLink() {
12239		return nil, nil
12240	}
12241	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12242		autorest.AsJSON(),
12243		autorest.AsGet(),
12244		autorest.WithBaseURL(to.String(ercplr.NextLink)))
12245}
12246
12247// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
12248type ExpressRouteCircuitPeeringListResultPage struct {
12249	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
12250	ercplr ExpressRouteCircuitPeeringListResult
12251}
12252
12253// NextWithContext advances to the next page of values.  If there was an error making
12254// the request the page does not advance and the error is returned.
12255func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
12256	if tracing.IsEnabled() {
12257		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
12258		defer func() {
12259			sc := -1
12260			if page.Response().Response.Response != nil {
12261				sc = page.Response().Response.Response.StatusCode
12262			}
12263			tracing.EndSpan(ctx, sc, err)
12264		}()
12265	}
12266	for {
12267		next, err := page.fn(ctx, page.ercplr)
12268		if err != nil {
12269			return err
12270		}
12271		page.ercplr = next
12272		if !next.hasNextLink() || !next.IsEmpty() {
12273			break
12274		}
12275	}
12276	return nil
12277}
12278
12279// Next advances to the next page of values.  If there was an error making
12280// the request the page does not advance and the error is returned.
12281// Deprecated: Use NextWithContext() instead.
12282func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
12283	return page.NextWithContext(context.Background())
12284}
12285
12286// NotDone returns true if the page enumeration should be started or is not yet complete.
12287func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
12288	return !page.ercplr.IsEmpty()
12289}
12290
12291// Response returns the raw server response from the last page request.
12292func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
12293	return page.ercplr
12294}
12295
12296// Values returns the slice of values for the current page or nil if there are no values.
12297func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
12298	if page.ercplr.IsEmpty() {
12299		return nil
12300	}
12301	return *page.ercplr.Value
12302}
12303
12304// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
12305func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
12306	return ExpressRouteCircuitPeeringListResultPage{
12307		fn:     getNextPage,
12308		ercplr: cur,
12309	}
12310}
12311
12312// ExpressRouteCircuitPeeringPropertiesFormat properties of the express route circuit peering.
12313type ExpressRouteCircuitPeeringPropertiesFormat struct {
12314	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
12315	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
12316	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
12317	State ExpressRoutePeeringState `json:"state,omitempty"`
12318	// AzureASN - The Azure ASN.
12319	AzureASN *int32 `json:"azureASN,omitempty"`
12320	// PeerASN - The peer ASN.
12321	PeerASN *int64 `json:"peerASN,omitempty"`
12322	// PrimaryPeerAddressPrefix - The primary address prefix.
12323	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
12324	// SecondaryPeerAddressPrefix - The secondary address prefix.
12325	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
12326	// PrimaryAzurePort - The primary port.
12327	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
12328	// SecondaryAzurePort - The secondary port.
12329	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
12330	// SharedKey - The shared key.
12331	SharedKey *string `json:"sharedKey,omitempty"`
12332	// VlanID - The VLAN ID.
12333	VlanID *int32 `json:"vlanId,omitempty"`
12334	// MicrosoftPeeringConfig - The Microsoft peering configuration.
12335	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
12336	// Stats - The peering stats of express route circuit.
12337	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
12338	// ProvisioningState - READ-ONLY; The provisioning state of the express route circuit peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12339	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12340	// GatewayManagerEtag - The GatewayManager Etag.
12341	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
12342	// LastModifiedBy - READ-ONLY; Who was the last to modify the peering.
12343	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
12344	// RouteFilter - The reference to the RouteFilter resource.
12345	RouteFilter *SubResource `json:"routeFilter,omitempty"`
12346	// Ipv6PeeringConfig - The IPv6 peering configuration.
12347	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
12348	// ExpressRouteConnection - The ExpressRoute connection.
12349	ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"`
12350	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
12351	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
12352	// PeeredConnections - READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit.
12353	PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"`
12354}
12355
12356// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringPropertiesFormat.
12357func (ercppf ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
12358	objectMap := make(map[string]interface{})
12359	if ercppf.PeeringType != "" {
12360		objectMap["peeringType"] = ercppf.PeeringType
12361	}
12362	if ercppf.State != "" {
12363		objectMap["state"] = ercppf.State
12364	}
12365	if ercppf.AzureASN != nil {
12366		objectMap["azureASN"] = ercppf.AzureASN
12367	}
12368	if ercppf.PeerASN != nil {
12369		objectMap["peerASN"] = ercppf.PeerASN
12370	}
12371	if ercppf.PrimaryPeerAddressPrefix != nil {
12372		objectMap["primaryPeerAddressPrefix"] = ercppf.PrimaryPeerAddressPrefix
12373	}
12374	if ercppf.SecondaryPeerAddressPrefix != nil {
12375		objectMap["secondaryPeerAddressPrefix"] = ercppf.SecondaryPeerAddressPrefix
12376	}
12377	if ercppf.PrimaryAzurePort != nil {
12378		objectMap["primaryAzurePort"] = ercppf.PrimaryAzurePort
12379	}
12380	if ercppf.SecondaryAzurePort != nil {
12381		objectMap["secondaryAzurePort"] = ercppf.SecondaryAzurePort
12382	}
12383	if ercppf.SharedKey != nil {
12384		objectMap["sharedKey"] = ercppf.SharedKey
12385	}
12386	if ercppf.VlanID != nil {
12387		objectMap["vlanId"] = ercppf.VlanID
12388	}
12389	if ercppf.MicrosoftPeeringConfig != nil {
12390		objectMap["microsoftPeeringConfig"] = ercppf.MicrosoftPeeringConfig
12391	}
12392	if ercppf.Stats != nil {
12393		objectMap["stats"] = ercppf.Stats
12394	}
12395	if ercppf.GatewayManagerEtag != nil {
12396		objectMap["gatewayManagerEtag"] = ercppf.GatewayManagerEtag
12397	}
12398	if ercppf.RouteFilter != nil {
12399		objectMap["routeFilter"] = ercppf.RouteFilter
12400	}
12401	if ercppf.Ipv6PeeringConfig != nil {
12402		objectMap["ipv6PeeringConfig"] = ercppf.Ipv6PeeringConfig
12403	}
12404	if ercppf.ExpressRouteConnection != nil {
12405		objectMap["expressRouteConnection"] = ercppf.ExpressRouteConnection
12406	}
12407	if ercppf.Connections != nil {
12408		objectMap["connections"] = ercppf.Connections
12409	}
12410	return json.Marshal(objectMap)
12411}
12412
12413// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
12414// of a long-running operation.
12415type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
12416	azure.FutureAPI
12417	// Result returns the result of the asynchronous operation.
12418	// If the operation has not completed it will return an error.
12419	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
12420}
12421
12422// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
12423// long-running operation.
12424type ExpressRouteCircuitPeeringsDeleteFuture struct {
12425	azure.FutureAPI
12426	// Result returns the result of the asynchronous operation.
12427	// If the operation has not completed it will return an error.
12428	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
12429}
12430
12431// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
12432type ExpressRouteCircuitPropertiesFormat struct {
12433	// AllowClassicOperations - Allow classic operations.
12434	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
12435	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
12436	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
12437	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values include: 'ServiceProviderProvisioningStateNotProvisioned', 'ServiceProviderProvisioningStateProvisioning', 'ServiceProviderProvisioningStateProvisioned', 'ServiceProviderProvisioningStateDeprovisioning'
12438	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
12439	// Authorizations - The list of authorizations.
12440	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
12441	// Peerings - The list of peerings.
12442	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
12443	// ServiceKey - The ServiceKey.
12444	ServiceKey *string `json:"serviceKey,omitempty"`
12445	// ServiceProviderNotes - The ServiceProviderNotes.
12446	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
12447	// ServiceProviderProperties - The ServiceProviderProperties.
12448	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
12449	// ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.
12450	ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"`
12451	// BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.
12452	BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"`
12453	// Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation.
12454	Stag *int32 `json:"stag,omitempty"`
12455	// ProvisioningState - READ-ONLY; The provisioning state of the express route circuit resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12456	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12457	// GatewayManagerEtag - The GatewayManager Etag.
12458	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
12459	// GlobalReachEnabled - Flag denoting global reach status.
12460	GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"`
12461}
12462
12463// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat.
12464func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) {
12465	objectMap := make(map[string]interface{})
12466	if ercpf.AllowClassicOperations != nil {
12467		objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations
12468	}
12469	if ercpf.CircuitProvisioningState != nil {
12470		objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState
12471	}
12472	if ercpf.ServiceProviderProvisioningState != "" {
12473		objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState
12474	}
12475	if ercpf.Authorizations != nil {
12476		objectMap["authorizations"] = ercpf.Authorizations
12477	}
12478	if ercpf.Peerings != nil {
12479		objectMap["peerings"] = ercpf.Peerings
12480	}
12481	if ercpf.ServiceKey != nil {
12482		objectMap["serviceKey"] = ercpf.ServiceKey
12483	}
12484	if ercpf.ServiceProviderNotes != nil {
12485		objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes
12486	}
12487	if ercpf.ServiceProviderProperties != nil {
12488		objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties
12489	}
12490	if ercpf.ExpressRoutePort != nil {
12491		objectMap["expressRoutePort"] = ercpf.ExpressRoutePort
12492	}
12493	if ercpf.BandwidthInGbps != nil {
12494		objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps
12495	}
12496	if ercpf.GatewayManagerEtag != nil {
12497		objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag
12498	}
12499	if ercpf.GlobalReachEnabled != nil {
12500		objectMap["globalReachEnabled"] = ercpf.GlobalReachEnabled
12501	}
12502	return json.Marshal(objectMap)
12503}
12504
12505// ExpressRouteCircuitReference reference to an express route circuit.
12506type ExpressRouteCircuitReference struct {
12507	// ID - Corresponding Express Route Circuit Id.
12508	ID *string `json:"id,omitempty"`
12509}
12510
12511// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit.
12512type ExpressRouteCircuitRoutesTable struct {
12513	// NetworkProperty - IP address of a network entity.
12514	NetworkProperty *string `json:"network,omitempty"`
12515	// NextHop - NextHop address.
12516	NextHop *string `json:"nextHop,omitempty"`
12517	// LocPrf - Local preference value as set with the set local-preference route-map configuration command.
12518	LocPrf *string `json:"locPrf,omitempty"`
12519	// Weight - Route Weight.
12520	Weight *int32 `json:"weight,omitempty"`
12521	// Path - Autonomous system paths to the destination network.
12522	Path *string `json:"path,omitempty"`
12523}
12524
12525// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
12526type ExpressRouteCircuitRoutesTableSummary struct {
12527	// Neighbor - IP address of the neighbor.
12528	Neighbor *string `json:"neighbor,omitempty"`
12529	// V - BGP version number spoken to the neighbor.
12530	V *int32 `json:"v,omitempty"`
12531	// As - Autonomous system number.
12532	As *int32 `json:"as,omitempty"`
12533	// 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.
12534	UpDown *string `json:"upDown,omitempty"`
12535	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
12536	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
12537}
12538
12539// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
12540// Circuits API.
12541type ExpressRouteCircuitsArpTableListResult struct {
12542	autorest.Response `json:"-"`
12543	// Value - A list of the ARP tables.
12544	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
12545	// NextLink - The URL to get the next set of results.
12546	NextLink *string `json:"nextLink,omitempty"`
12547}
12548
12549// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12550// long-running operation.
12551type ExpressRouteCircuitsCreateOrUpdateFuture struct {
12552	azure.FutureAPI
12553	// Result returns the result of the asynchronous operation.
12554	// If the operation has not completed it will return an error.
12555	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
12556}
12557
12558// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
12559// long-running operation.
12560type ExpressRouteCircuitsDeleteFuture struct {
12561	azure.FutureAPI
12562	// Result returns the result of the asynchronous operation.
12563	// If the operation has not completed it will return an error.
12564	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
12565}
12566
12567// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
12568// ExpressRouteCircuit.
12569type ExpressRouteCircuitServiceProviderProperties struct {
12570	// ServiceProviderName - The serviceProviderName.
12571	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
12572	// PeeringLocation - The peering location.
12573	PeeringLocation *string `json:"peeringLocation,omitempty"`
12574	// BandwidthInMbps - The BandwidthInMbps.
12575	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
12576}
12577
12578// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
12579type ExpressRouteCircuitSku struct {
12580	// Name - The name of the SKU.
12581	Name *string `json:"name,omitempty"`
12582	// Tier - The tier of the SKU. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic', 'ExpressRouteCircuitSkuTierLocal'
12583	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
12584	// Family - The family of the SKU. Possible values include: 'UnlimitedData', 'MeteredData'
12585	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
12586}
12587
12588// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
12589// long-running operation.
12590type ExpressRouteCircuitsListArpTableFuture struct {
12591	azure.FutureAPI
12592	// Result returns the result of the asynchronous operation.
12593	// If the operation has not completed it will return an error.
12594	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
12595}
12596
12597// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
12598// long-running operation.
12599type ExpressRouteCircuitsListRoutesTableFuture struct {
12600	azure.FutureAPI
12601	// Result returns the result of the asynchronous operation.
12602	// If the operation has not completed it will return an error.
12603	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
12604}
12605
12606// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
12607// results of a long-running operation.
12608type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
12609	azure.FutureAPI
12610	// Result returns the result of the asynchronous operation.
12611	// If the operation has not completed it will return an error.
12612	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
12613}
12614
12615// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
12616// Circuits API.
12617type ExpressRouteCircuitsRoutesTableListResult struct {
12618	autorest.Response `json:"-"`
12619	// Value - The list of routes table.
12620	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
12621	// NextLink - The URL to get the next set of results.
12622	NextLink *string `json:"nextLink,omitempty"`
12623}
12624
12625// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
12626// Express Route Circuits API.
12627type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
12628	autorest.Response `json:"-"`
12629	// Value - A list of the routes table.
12630	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
12631	// NextLink - The URL to get the next set of results.
12632	NextLink *string `json:"nextLink,omitempty"`
12633}
12634
12635// ExpressRouteCircuitStats contains stats associated with the peering.
12636type ExpressRouteCircuitStats struct {
12637	autorest.Response `json:"-"`
12638	// PrimarybytesIn - The Primary BytesIn of the peering.
12639	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
12640	// PrimarybytesOut - The primary BytesOut of the peering.
12641	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
12642	// SecondarybytesIn - The secondary BytesIn of the peering.
12643	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
12644	// SecondarybytesOut - The secondary BytesOut of the peering.
12645	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
12646}
12647
12648// ExpressRouteConnection expressRouteConnection resource.
12649type ExpressRouteConnection struct {
12650	autorest.Response `json:"-"`
12651	// ExpressRouteConnectionProperties - Properties of the express route connection.
12652	*ExpressRouteConnectionProperties `json:"properties,omitempty"`
12653	// Name - The name of the resource.
12654	Name *string `json:"name,omitempty"`
12655	// ID - Resource ID.
12656	ID *string `json:"id,omitempty"`
12657}
12658
12659// MarshalJSON is the custom marshaler for ExpressRouteConnection.
12660func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) {
12661	objectMap := make(map[string]interface{})
12662	if erc.ExpressRouteConnectionProperties != nil {
12663		objectMap["properties"] = erc.ExpressRouteConnectionProperties
12664	}
12665	if erc.Name != nil {
12666		objectMap["name"] = erc.Name
12667	}
12668	if erc.ID != nil {
12669		objectMap["id"] = erc.ID
12670	}
12671	return json.Marshal(objectMap)
12672}
12673
12674// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct.
12675func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error {
12676	var m map[string]*json.RawMessage
12677	err := json.Unmarshal(body, &m)
12678	if err != nil {
12679		return err
12680	}
12681	for k, v := range m {
12682		switch k {
12683		case "properties":
12684			if v != nil {
12685				var expressRouteConnectionProperties ExpressRouteConnectionProperties
12686				err = json.Unmarshal(*v, &expressRouteConnectionProperties)
12687				if err != nil {
12688					return err
12689				}
12690				erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties
12691			}
12692		case "name":
12693			if v != nil {
12694				var name string
12695				err = json.Unmarshal(*v, &name)
12696				if err != nil {
12697					return err
12698				}
12699				erc.Name = &name
12700			}
12701		case "id":
12702			if v != nil {
12703				var ID string
12704				err = json.Unmarshal(*v, &ID)
12705				if err != nil {
12706					return err
12707				}
12708				erc.ID = &ID
12709			}
12710		}
12711	}
12712
12713	return nil
12714}
12715
12716// ExpressRouteConnectionID the ID of the ExpressRouteConnection.
12717type ExpressRouteConnectionID struct {
12718	// ID - READ-ONLY; The ID of the ExpressRouteConnection.
12719	ID *string `json:"id,omitempty"`
12720}
12721
12722// ExpressRouteConnectionList expressRouteConnection list.
12723type ExpressRouteConnectionList struct {
12724	autorest.Response `json:"-"`
12725	// Value - The list of ExpressRoute connections.
12726	Value *[]ExpressRouteConnection `json:"value,omitempty"`
12727}
12728
12729// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource.
12730type ExpressRouteConnectionProperties struct {
12731	// ProvisioningState - READ-ONLY; The provisioning state of the express route connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12732	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12733	// ExpressRouteCircuitPeering - The ExpressRoute circuit peering.
12734	ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"`
12735	// AuthorizationKey - Authorization key to establish the connection.
12736	AuthorizationKey *string `json:"authorizationKey,omitempty"`
12737	// RoutingWeight - The routing weight associated to the connection.
12738	RoutingWeight *int32 `json:"routingWeight,omitempty"`
12739	// EnableInternetSecurity - Enable internet security.
12740	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
12741	// ExpressRouteGatewayBypass - Enable FastPath to vWan Firewall hub.
12742	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
12743	// RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection.
12744	RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"`
12745}
12746
12747// MarshalJSON is the custom marshaler for ExpressRouteConnectionProperties.
12748func (ercp ExpressRouteConnectionProperties) MarshalJSON() ([]byte, error) {
12749	objectMap := make(map[string]interface{})
12750	if ercp.ExpressRouteCircuitPeering != nil {
12751		objectMap["expressRouteCircuitPeering"] = ercp.ExpressRouteCircuitPeering
12752	}
12753	if ercp.AuthorizationKey != nil {
12754		objectMap["authorizationKey"] = ercp.AuthorizationKey
12755	}
12756	if ercp.RoutingWeight != nil {
12757		objectMap["routingWeight"] = ercp.RoutingWeight
12758	}
12759	if ercp.EnableInternetSecurity != nil {
12760		objectMap["enableInternetSecurity"] = ercp.EnableInternetSecurity
12761	}
12762	if ercp.ExpressRouteGatewayBypass != nil {
12763		objectMap["expressRouteGatewayBypass"] = ercp.ExpressRouteGatewayBypass
12764	}
12765	if ercp.RoutingConfiguration != nil {
12766		objectMap["routingConfiguration"] = ercp.RoutingConfiguration
12767	}
12768	return json.Marshal(objectMap)
12769}
12770
12771// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
12772// a long-running operation.
12773type ExpressRouteConnectionsCreateOrUpdateFuture struct {
12774	azure.FutureAPI
12775	// Result returns the result of the asynchronous operation.
12776	// If the operation has not completed it will return an error.
12777	Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error)
12778}
12779
12780// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
12781// long-running operation.
12782type ExpressRouteConnectionsDeleteFuture struct {
12783	azure.FutureAPI
12784	// Result returns the result of the asynchronous operation.
12785	// If the operation has not completed it will return an error.
12786	Result func(ExpressRouteConnectionsClient) (autorest.Response, error)
12787}
12788
12789// ExpressRouteCrossConnection expressRouteCrossConnection resource.
12790type ExpressRouteCrossConnection struct {
12791	autorest.Response `json:"-"`
12792	// ExpressRouteCrossConnectionProperties - Properties of the express route cross connection.
12793	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
12794	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12795	Etag *string `json:"etag,omitempty"`
12796	// ID - Resource ID.
12797	ID *string `json:"id,omitempty"`
12798	// Name - READ-ONLY; Resource name.
12799	Name *string `json:"name,omitempty"`
12800	// Type - READ-ONLY; Resource type.
12801	Type *string `json:"type,omitempty"`
12802	// Location - Resource location.
12803	Location *string `json:"location,omitempty"`
12804	// Tags - Resource tags.
12805	Tags map[string]*string `json:"tags"`
12806}
12807
12808// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
12809func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
12810	objectMap := make(map[string]interface{})
12811	if ercc.ExpressRouteCrossConnectionProperties != nil {
12812		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
12813	}
12814	if ercc.ID != nil {
12815		objectMap["id"] = ercc.ID
12816	}
12817	if ercc.Location != nil {
12818		objectMap["location"] = ercc.Location
12819	}
12820	if ercc.Tags != nil {
12821		objectMap["tags"] = ercc.Tags
12822	}
12823	return json.Marshal(objectMap)
12824}
12825
12826// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
12827func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
12828	var m map[string]*json.RawMessage
12829	err := json.Unmarshal(body, &m)
12830	if err != nil {
12831		return err
12832	}
12833	for k, v := range m {
12834		switch k {
12835		case "properties":
12836			if v != nil {
12837				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
12838				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
12839				if err != nil {
12840					return err
12841				}
12842				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
12843			}
12844		case "etag":
12845			if v != nil {
12846				var etag string
12847				err = json.Unmarshal(*v, &etag)
12848				if err != nil {
12849					return err
12850				}
12851				ercc.Etag = &etag
12852			}
12853		case "id":
12854			if v != nil {
12855				var ID string
12856				err = json.Unmarshal(*v, &ID)
12857				if err != nil {
12858					return err
12859				}
12860				ercc.ID = &ID
12861			}
12862		case "name":
12863			if v != nil {
12864				var name string
12865				err = json.Unmarshal(*v, &name)
12866				if err != nil {
12867					return err
12868				}
12869				ercc.Name = &name
12870			}
12871		case "type":
12872			if v != nil {
12873				var typeVar string
12874				err = json.Unmarshal(*v, &typeVar)
12875				if err != nil {
12876					return err
12877				}
12878				ercc.Type = &typeVar
12879			}
12880		case "location":
12881			if v != nil {
12882				var location string
12883				err = json.Unmarshal(*v, &location)
12884				if err != nil {
12885					return err
12886				}
12887				ercc.Location = &location
12888			}
12889		case "tags":
12890			if v != nil {
12891				var tags map[string]*string
12892				err = json.Unmarshal(*v, &tags)
12893				if err != nil {
12894					return err
12895				}
12896				ercc.Tags = tags
12897			}
12898		}
12899	}
12900
12901	return nil
12902}
12903
12904// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
12905type ExpressRouteCrossConnectionListResult struct {
12906	autorest.Response `json:"-"`
12907	// Value - A list of ExpressRouteCrossConnection resources.
12908	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
12909	// NextLink - READ-ONLY; The URL to get the next set of results.
12910	NextLink *string `json:"nextLink,omitempty"`
12911}
12912
12913// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
12914func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
12915	objectMap := make(map[string]interface{})
12916	if ercclr.Value != nil {
12917		objectMap["value"] = ercclr.Value
12918	}
12919	return json.Marshal(objectMap)
12920}
12921
12922// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
12923// ExpressRouteCrossConnection values.
12924type ExpressRouteCrossConnectionListResultIterator struct {
12925	i    int
12926	page ExpressRouteCrossConnectionListResultPage
12927}
12928
12929// NextWithContext advances to the next value.  If there was an error making
12930// the request the iterator does not advance and the error is returned.
12931func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
12932	if tracing.IsEnabled() {
12933		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
12934		defer func() {
12935			sc := -1
12936			if iter.Response().Response.Response != nil {
12937				sc = iter.Response().Response.Response.StatusCode
12938			}
12939			tracing.EndSpan(ctx, sc, err)
12940		}()
12941	}
12942	iter.i++
12943	if iter.i < len(iter.page.Values()) {
12944		return nil
12945	}
12946	err = iter.page.NextWithContext(ctx)
12947	if err != nil {
12948		iter.i--
12949		return err
12950	}
12951	iter.i = 0
12952	return nil
12953}
12954
12955// Next advances to the next value.  If there was an error making
12956// the request the iterator does not advance and the error is returned.
12957// Deprecated: Use NextWithContext() instead.
12958func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
12959	return iter.NextWithContext(context.Background())
12960}
12961
12962// NotDone returns true if the enumeration should be started or is not yet complete.
12963func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
12964	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12965}
12966
12967// Response returns the raw server response from the last page request.
12968func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
12969	return iter.page.Response()
12970}
12971
12972// Value returns the current value or a zero-initialized value if the
12973// iterator has advanced beyond the end of the collection.
12974func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
12975	if !iter.page.NotDone() {
12976		return ExpressRouteCrossConnection{}
12977	}
12978	return iter.page.Values()[iter.i]
12979}
12980
12981// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
12982func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
12983	return ExpressRouteCrossConnectionListResultIterator{page: page}
12984}
12985
12986// IsEmpty returns true if the ListResult contains no values.
12987func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
12988	return ercclr.Value == nil || len(*ercclr.Value) == 0
12989}
12990
12991// hasNextLink returns true if the NextLink is not empty.
12992func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
12993	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
12994}
12995
12996// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
12997// It returns nil if no more results exist.
12998func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
12999	if !ercclr.hasNextLink() {
13000		return nil, nil
13001	}
13002	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13003		autorest.AsJSON(),
13004		autorest.AsGet(),
13005		autorest.WithBaseURL(to.String(ercclr.NextLink)))
13006}
13007
13008// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
13009type ExpressRouteCrossConnectionListResultPage struct {
13010	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
13011	ercclr ExpressRouteCrossConnectionListResult
13012}
13013
13014// NextWithContext advances to the next page of values.  If there was an error making
13015// the request the page does not advance and the error is returned.
13016func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
13017	if tracing.IsEnabled() {
13018		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
13019		defer func() {
13020			sc := -1
13021			if page.Response().Response.Response != nil {
13022				sc = page.Response().Response.Response.StatusCode
13023			}
13024			tracing.EndSpan(ctx, sc, err)
13025		}()
13026	}
13027	for {
13028		next, err := page.fn(ctx, page.ercclr)
13029		if err != nil {
13030			return err
13031		}
13032		page.ercclr = next
13033		if !next.hasNextLink() || !next.IsEmpty() {
13034			break
13035		}
13036	}
13037	return nil
13038}
13039
13040// Next advances to the next page of values.  If there was an error making
13041// the request the page does not advance and the error is returned.
13042// Deprecated: Use NextWithContext() instead.
13043func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
13044	return page.NextWithContext(context.Background())
13045}
13046
13047// NotDone returns true if the page enumeration should be started or is not yet complete.
13048func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
13049	return !page.ercclr.IsEmpty()
13050}
13051
13052// Response returns the raw server response from the last page request.
13053func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
13054	return page.ercclr
13055}
13056
13057// Values returns the slice of values for the current page or nil if there are no values.
13058func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
13059	if page.ercclr.IsEmpty() {
13060		return nil
13061	}
13062	return *page.ercclr.Value
13063}
13064
13065// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
13066func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
13067	return ExpressRouteCrossConnectionListResultPage{
13068		fn:     getNextPage,
13069		ercclr: cur,
13070	}
13071}
13072
13073// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
13074type ExpressRouteCrossConnectionPeering struct {
13075	autorest.Response `json:"-"`
13076	// ExpressRouteCrossConnectionPeeringProperties - Properties of the express route cross connection peering.
13077	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
13078	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13079	Name *string `json:"name,omitempty"`
13080	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
13081	Etag *string `json:"etag,omitempty"`
13082	// ID - Resource ID.
13083	ID *string `json:"id,omitempty"`
13084}
13085
13086// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
13087func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
13088	objectMap := make(map[string]interface{})
13089	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
13090		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
13091	}
13092	if erccp.Name != nil {
13093		objectMap["name"] = erccp.Name
13094	}
13095	if erccp.ID != nil {
13096		objectMap["id"] = erccp.ID
13097	}
13098	return json.Marshal(objectMap)
13099}
13100
13101// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
13102func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
13103	var m map[string]*json.RawMessage
13104	err := json.Unmarshal(body, &m)
13105	if err != nil {
13106		return err
13107	}
13108	for k, v := range m {
13109		switch k {
13110		case "properties":
13111			if v != nil {
13112				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
13113				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
13114				if err != nil {
13115					return err
13116				}
13117				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
13118			}
13119		case "name":
13120			if v != nil {
13121				var name string
13122				err = json.Unmarshal(*v, &name)
13123				if err != nil {
13124					return err
13125				}
13126				erccp.Name = &name
13127			}
13128		case "etag":
13129			if v != nil {
13130				var etag string
13131				err = json.Unmarshal(*v, &etag)
13132				if err != nil {
13133					return err
13134				}
13135				erccp.Etag = &etag
13136			}
13137		case "id":
13138			if v != nil {
13139				var ID string
13140				err = json.Unmarshal(*v, &ID)
13141				if err != nil {
13142					return err
13143				}
13144				erccp.ID = &ID
13145			}
13146		}
13147	}
13148
13149	return nil
13150}
13151
13152// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
13153// that belong to an ExpressRouteCrossConnection.
13154type ExpressRouteCrossConnectionPeeringList struct {
13155	autorest.Response `json:"-"`
13156	// Value - The peerings in an express route cross connection.
13157	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
13158	// NextLink - READ-ONLY; The URL to get the next set of results.
13159	NextLink *string `json:"nextLink,omitempty"`
13160}
13161
13162// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
13163func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
13164	objectMap := make(map[string]interface{})
13165	if erccpl.Value != nil {
13166		objectMap["value"] = erccpl.Value
13167	}
13168	return json.Marshal(objectMap)
13169}
13170
13171// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
13172// ExpressRouteCrossConnectionPeering values.
13173type ExpressRouteCrossConnectionPeeringListIterator struct {
13174	i    int
13175	page ExpressRouteCrossConnectionPeeringListPage
13176}
13177
13178// NextWithContext advances to the next value.  If there was an error making
13179// the request the iterator does not advance and the error is returned.
13180func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
13181	if tracing.IsEnabled() {
13182		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
13183		defer func() {
13184			sc := -1
13185			if iter.Response().Response.Response != nil {
13186				sc = iter.Response().Response.Response.StatusCode
13187			}
13188			tracing.EndSpan(ctx, sc, err)
13189		}()
13190	}
13191	iter.i++
13192	if iter.i < len(iter.page.Values()) {
13193		return nil
13194	}
13195	err = iter.page.NextWithContext(ctx)
13196	if err != nil {
13197		iter.i--
13198		return err
13199	}
13200	iter.i = 0
13201	return nil
13202}
13203
13204// Next advances to the next value.  If there was an error making
13205// the request the iterator does not advance and the error is returned.
13206// Deprecated: Use NextWithContext() instead.
13207func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
13208	return iter.NextWithContext(context.Background())
13209}
13210
13211// NotDone returns true if the enumeration should be started or is not yet complete.
13212func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
13213	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13214}
13215
13216// Response returns the raw server response from the last page request.
13217func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
13218	return iter.page.Response()
13219}
13220
13221// Value returns the current value or a zero-initialized value if the
13222// iterator has advanced beyond the end of the collection.
13223func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
13224	if !iter.page.NotDone() {
13225		return ExpressRouteCrossConnectionPeering{}
13226	}
13227	return iter.page.Values()[iter.i]
13228}
13229
13230// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
13231func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
13232	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
13233}
13234
13235// IsEmpty returns true if the ListResult contains no values.
13236func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
13237	return erccpl.Value == nil || len(*erccpl.Value) == 0
13238}
13239
13240// hasNextLink returns true if the NextLink is not empty.
13241func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
13242	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
13243}
13244
13245// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
13246// It returns nil if no more results exist.
13247func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
13248	if !erccpl.hasNextLink() {
13249		return nil, nil
13250	}
13251	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13252		autorest.AsJSON(),
13253		autorest.AsGet(),
13254		autorest.WithBaseURL(to.String(erccpl.NextLink)))
13255}
13256
13257// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
13258type ExpressRouteCrossConnectionPeeringListPage struct {
13259	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
13260	erccpl ExpressRouteCrossConnectionPeeringList
13261}
13262
13263// NextWithContext advances to the next page of values.  If there was an error making
13264// the request the page does not advance and the error is returned.
13265func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
13266	if tracing.IsEnabled() {
13267		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
13268		defer func() {
13269			sc := -1
13270			if page.Response().Response.Response != nil {
13271				sc = page.Response().Response.Response.StatusCode
13272			}
13273			tracing.EndSpan(ctx, sc, err)
13274		}()
13275	}
13276	for {
13277		next, err := page.fn(ctx, page.erccpl)
13278		if err != nil {
13279			return err
13280		}
13281		page.erccpl = next
13282		if !next.hasNextLink() || !next.IsEmpty() {
13283			break
13284		}
13285	}
13286	return nil
13287}
13288
13289// Next advances to the next page of values.  If there was an error making
13290// the request the page does not advance and the error is returned.
13291// Deprecated: Use NextWithContext() instead.
13292func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
13293	return page.NextWithContext(context.Background())
13294}
13295
13296// NotDone returns true if the page enumeration should be started or is not yet complete.
13297func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
13298	return !page.erccpl.IsEmpty()
13299}
13300
13301// Response returns the raw server response from the last page request.
13302func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
13303	return page.erccpl
13304}
13305
13306// Values returns the slice of values for the current page or nil if there are no values.
13307func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
13308	if page.erccpl.IsEmpty() {
13309		return nil
13310	}
13311	return *page.erccpl.Value
13312}
13313
13314// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
13315func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
13316	return ExpressRouteCrossConnectionPeeringListPage{
13317		fn:     getNextPage,
13318		erccpl: cur,
13319	}
13320}
13321
13322// ExpressRouteCrossConnectionPeeringProperties properties of express route cross connection peering.
13323type ExpressRouteCrossConnectionPeeringProperties struct {
13324	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
13325	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
13326	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
13327	State ExpressRoutePeeringState `json:"state,omitempty"`
13328	// AzureASN - READ-ONLY; The Azure ASN.
13329	AzureASN *int32 `json:"azureASN,omitempty"`
13330	// PeerASN - The peer ASN.
13331	PeerASN *int64 `json:"peerASN,omitempty"`
13332	// PrimaryPeerAddressPrefix - The primary address prefix.
13333	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
13334	// SecondaryPeerAddressPrefix - The secondary address prefix.
13335	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
13336	// PrimaryAzurePort - READ-ONLY; The primary port.
13337	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
13338	// SecondaryAzurePort - READ-ONLY; The secondary port.
13339	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
13340	// SharedKey - The shared key.
13341	SharedKey *string `json:"sharedKey,omitempty"`
13342	// VlanID - The VLAN ID.
13343	VlanID *int32 `json:"vlanId,omitempty"`
13344	// MicrosoftPeeringConfig - The Microsoft peering configuration.
13345	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
13346	// ProvisioningState - READ-ONLY; The provisioning state of the express route cross connection peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
13347	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13348	// GatewayManagerEtag - The GatewayManager Etag.
13349	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
13350	// LastModifiedBy - READ-ONLY; Who was the last to modify the peering.
13351	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
13352	// Ipv6PeeringConfig - The IPv6 peering configuration.
13353	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
13354}
13355
13356// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
13357func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
13358	objectMap := make(map[string]interface{})
13359	if erccpp.PeeringType != "" {
13360		objectMap["peeringType"] = erccpp.PeeringType
13361	}
13362	if erccpp.State != "" {
13363		objectMap["state"] = erccpp.State
13364	}
13365	if erccpp.PeerASN != nil {
13366		objectMap["peerASN"] = erccpp.PeerASN
13367	}
13368	if erccpp.PrimaryPeerAddressPrefix != nil {
13369		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
13370	}
13371	if erccpp.SecondaryPeerAddressPrefix != nil {
13372		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
13373	}
13374	if erccpp.SharedKey != nil {
13375		objectMap["sharedKey"] = erccpp.SharedKey
13376	}
13377	if erccpp.VlanID != nil {
13378		objectMap["vlanId"] = erccpp.VlanID
13379	}
13380	if erccpp.MicrosoftPeeringConfig != nil {
13381		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
13382	}
13383	if erccpp.GatewayManagerEtag != nil {
13384		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
13385	}
13386	if erccpp.Ipv6PeeringConfig != nil {
13387		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
13388	}
13389	return json.Marshal(objectMap)
13390}
13391
13392// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
13393// results of a long-running operation.
13394type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
13395	azure.FutureAPI
13396	// Result returns the result of the asynchronous operation.
13397	// If the operation has not completed it will return an error.
13398	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
13399}
13400
13401// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
13402// of a long-running operation.
13403type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
13404	azure.FutureAPI
13405	// Result returns the result of the asynchronous operation.
13406	// If the operation has not completed it will return an error.
13407	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
13408}
13409
13410// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
13411type ExpressRouteCrossConnectionProperties struct {
13412	// PrimaryAzurePort - READ-ONLY; The name of the primary port.
13413	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
13414	// SecondaryAzurePort - READ-ONLY; The name of the secondary port.
13415	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
13416	// STag - READ-ONLY; The identifier of the circuit traffic.
13417	STag *int32 `json:"sTag,omitempty"`
13418	// PeeringLocation - READ-ONLY; The peering location of the ExpressRoute circuit.
13419	PeeringLocation *string `json:"peeringLocation,omitempty"`
13420	// BandwidthInMbps - READ-ONLY; The circuit bandwidth In Mbps.
13421	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
13422	// ExpressRouteCircuit - The ExpressRouteCircuit.
13423	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
13424	// ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values include: 'ServiceProviderProvisioningStateNotProvisioned', 'ServiceProviderProvisioningStateProvisioning', 'ServiceProviderProvisioningStateProvisioned', 'ServiceProviderProvisioningStateDeprovisioning'
13425	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
13426	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
13427	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
13428	// ProvisioningState - READ-ONLY; The provisioning state of the express route cross connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
13429	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13430	// Peerings - The list of peerings.
13431	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
13432}
13433
13434// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
13435func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
13436	objectMap := make(map[string]interface{})
13437	if erccp.ExpressRouteCircuit != nil {
13438		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
13439	}
13440	if erccp.ServiceProviderProvisioningState != "" {
13441		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
13442	}
13443	if erccp.ServiceProviderNotes != nil {
13444		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
13445	}
13446	if erccp.Peerings != nil {
13447		objectMap["peerings"] = erccp.Peerings
13448	}
13449	return json.Marshal(objectMap)
13450}
13451
13452// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
13453type ExpressRouteCrossConnectionRoutesTableSummary struct {
13454	// Neighbor - IP address of Neighbor router.
13455	Neighbor *string `json:"neighbor,omitempty"`
13456	// Asn - Autonomous system number.
13457	Asn *int32 `json:"asn,omitempty"`
13458	// 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.
13459	UpDown *string `json:"upDown,omitempty"`
13460	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
13461	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
13462}
13463
13464// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
13465// results of a long-running operation.
13466type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
13467	azure.FutureAPI
13468	// Result returns the result of the asynchronous operation.
13469	// If the operation has not completed it will return an error.
13470	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
13471}
13472
13473// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
13474// of a long-running operation.
13475type ExpressRouteCrossConnectionsListArpTableFuture struct {
13476	azure.FutureAPI
13477	// Result returns the result of the asynchronous operation.
13478	// If the operation has not completed it will return an error.
13479	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
13480}
13481
13482// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
13483// results of a long-running operation.
13484type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
13485	azure.FutureAPI
13486	// Result returns the result of the asynchronous operation.
13487	// If the operation has not completed it will return an error.
13488	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
13489}
13490
13491// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
13492// the results of a long-running operation.
13493type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
13494	azure.FutureAPI
13495	// Result returns the result of the asynchronous operation.
13496	// If the operation has not completed it will return an error.
13497	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
13498}
13499
13500// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
13501// the Express Route Cross Connections.
13502type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
13503	autorest.Response `json:"-"`
13504	// Value - A list of the routes table.
13505	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
13506	// NextLink - READ-ONLY; The URL to get the next set of results.
13507	NextLink *string `json:"nextLink,omitempty"`
13508}
13509
13510// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
13511func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
13512	objectMap := make(map[string]interface{})
13513	if erccrtslr.Value != nil {
13514		objectMap["value"] = erccrtslr.Value
13515	}
13516	return json.Marshal(objectMap)
13517}
13518
13519// ExpressRouteGateway expressRoute gateway resource.
13520type ExpressRouteGateway struct {
13521	autorest.Response `json:"-"`
13522	// ExpressRouteGatewayProperties - Properties of the express route gateway.
13523	*ExpressRouteGatewayProperties `json:"properties,omitempty"`
13524	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
13525	Etag *string `json:"etag,omitempty"`
13526	// ID - Resource ID.
13527	ID *string `json:"id,omitempty"`
13528	// Name - READ-ONLY; Resource name.
13529	Name *string `json:"name,omitempty"`
13530	// Type - READ-ONLY; Resource type.
13531	Type *string `json:"type,omitempty"`
13532	// Location - Resource location.
13533	Location *string `json:"location,omitempty"`
13534	// Tags - Resource tags.
13535	Tags map[string]*string `json:"tags"`
13536}
13537
13538// MarshalJSON is the custom marshaler for ExpressRouteGateway.
13539func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) {
13540	objectMap := make(map[string]interface{})
13541	if erg.ExpressRouteGatewayProperties != nil {
13542		objectMap["properties"] = erg.ExpressRouteGatewayProperties
13543	}
13544	if erg.ID != nil {
13545		objectMap["id"] = erg.ID
13546	}
13547	if erg.Location != nil {
13548		objectMap["location"] = erg.Location
13549	}
13550	if erg.Tags != nil {
13551		objectMap["tags"] = erg.Tags
13552	}
13553	return json.Marshal(objectMap)
13554}
13555
13556// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct.
13557func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error {
13558	var m map[string]*json.RawMessage
13559	err := json.Unmarshal(body, &m)
13560	if err != nil {
13561		return err
13562	}
13563	for k, v := range m {
13564		switch k {
13565		case "properties":
13566			if v != nil {
13567				var expressRouteGatewayProperties ExpressRouteGatewayProperties
13568				err = json.Unmarshal(*v, &expressRouteGatewayProperties)
13569				if err != nil {
13570					return err
13571				}
13572				erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties
13573			}
13574		case "etag":
13575			if v != nil {
13576				var etag string
13577				err = json.Unmarshal(*v, &etag)
13578				if err != nil {
13579					return err
13580				}
13581				erg.Etag = &etag
13582			}
13583		case "id":
13584			if v != nil {
13585				var ID string
13586				err = json.Unmarshal(*v, &ID)
13587				if err != nil {
13588					return err
13589				}
13590				erg.ID = &ID
13591			}
13592		case "name":
13593			if v != nil {
13594				var name string
13595				err = json.Unmarshal(*v, &name)
13596				if err != nil {
13597					return err
13598				}
13599				erg.Name = &name
13600			}
13601		case "type":
13602			if v != nil {
13603				var typeVar string
13604				err = json.Unmarshal(*v, &typeVar)
13605				if err != nil {
13606					return err
13607				}
13608				erg.Type = &typeVar
13609			}
13610		case "location":
13611			if v != nil {
13612				var location string
13613				err = json.Unmarshal(*v, &location)
13614				if err != nil {
13615					return err
13616				}
13617				erg.Location = &location
13618			}
13619		case "tags":
13620			if v != nil {
13621				var tags map[string]*string
13622				err = json.Unmarshal(*v, &tags)
13623				if err != nil {
13624					return err
13625				}
13626				erg.Tags = tags
13627			}
13628		}
13629	}
13630
13631	return nil
13632}
13633
13634// ExpressRouteGatewayList list of ExpressRoute gateways.
13635type ExpressRouteGatewayList struct {
13636	autorest.Response `json:"-"`
13637	// Value - List of ExpressRoute gateways.
13638	Value *[]ExpressRouteGateway `json:"value,omitempty"`
13639}
13640
13641// ExpressRouteGatewayProperties expressRoute gateway resource properties.
13642type ExpressRouteGatewayProperties struct {
13643	// AutoScaleConfiguration - Configuration for auto scaling.
13644	AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"`
13645	// ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway.
13646	ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"`
13647	// ProvisioningState - READ-ONLY; The provisioning state of the express route gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
13648	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13649	// VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed.
13650	VirtualHub *VirtualHubID `json:"virtualHub,omitempty"`
13651}
13652
13653// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties.
13654func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) {
13655	objectMap := make(map[string]interface{})
13656	if ergp.AutoScaleConfiguration != nil {
13657		objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration
13658	}
13659	if ergp.VirtualHub != nil {
13660		objectMap["virtualHub"] = ergp.VirtualHub
13661	}
13662	return json.Marshal(objectMap)
13663}
13664
13665// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling.
13666type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct {
13667	// Bounds - Minimum and maximum number of scale units to deploy.
13668	Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"`
13669}
13670
13671// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to
13672// deploy.
13673type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct {
13674	// Min - Minimum number of scale units deployed for ExpressRoute gateway.
13675	Min *int32 `json:"min,omitempty"`
13676	// Max - Maximum number of scale units deployed for ExpressRoute gateway.
13677	Max *int32 `json:"max,omitempty"`
13678}
13679
13680// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13681// long-running operation.
13682type ExpressRouteGatewaysCreateOrUpdateFuture struct {
13683	azure.FutureAPI
13684	// Result returns the result of the asynchronous operation.
13685	// If the operation has not completed it will return an error.
13686	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
13687}
13688
13689// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
13690// long-running operation.
13691type ExpressRouteGatewaysDeleteFuture struct {
13692	azure.FutureAPI
13693	// Result returns the result of the asynchronous operation.
13694	// If the operation has not completed it will return an error.
13695	Result func(ExpressRouteGatewaysClient) (autorest.Response, error)
13696}
13697
13698// ExpressRouteGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
13699// long-running operation.
13700type ExpressRouteGatewaysUpdateTagsFuture struct {
13701	azure.FutureAPI
13702	// Result returns the result of the asynchronous operation.
13703	// If the operation has not completed it will return an error.
13704	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
13705}
13706
13707// ExpressRouteLink expressRouteLink child resource definition.
13708type ExpressRouteLink struct {
13709	autorest.Response `json:"-"`
13710	// ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties.
13711	*ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"`
13712	// Name - Name of child port resource that is unique among child port resources of the parent.
13713	Name *string `json:"name,omitempty"`
13714	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
13715	Etag *string `json:"etag,omitempty"`
13716	// ID - Resource ID.
13717	ID *string `json:"id,omitempty"`
13718}
13719
13720// MarshalJSON is the custom marshaler for ExpressRouteLink.
13721func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) {
13722	objectMap := make(map[string]interface{})
13723	if erl.ExpressRouteLinkPropertiesFormat != nil {
13724		objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat
13725	}
13726	if erl.Name != nil {
13727		objectMap["name"] = erl.Name
13728	}
13729	if erl.ID != nil {
13730		objectMap["id"] = erl.ID
13731	}
13732	return json.Marshal(objectMap)
13733}
13734
13735// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct.
13736func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error {
13737	var m map[string]*json.RawMessage
13738	err := json.Unmarshal(body, &m)
13739	if err != nil {
13740		return err
13741	}
13742	for k, v := range m {
13743		switch k {
13744		case "properties":
13745			if v != nil {
13746				var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat
13747				err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat)
13748				if err != nil {
13749					return err
13750				}
13751				erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat
13752			}
13753		case "name":
13754			if v != nil {
13755				var name string
13756				err = json.Unmarshal(*v, &name)
13757				if err != nil {
13758					return err
13759				}
13760				erl.Name = &name
13761			}
13762		case "etag":
13763			if v != nil {
13764				var etag string
13765				err = json.Unmarshal(*v, &etag)
13766				if err != nil {
13767					return err
13768				}
13769				erl.Etag = &etag
13770			}
13771		case "id":
13772			if v != nil {
13773				var ID string
13774				err = json.Unmarshal(*v, &ID)
13775				if err != nil {
13776					return err
13777				}
13778				erl.ID = &ID
13779			}
13780		}
13781	}
13782
13783	return nil
13784}
13785
13786// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call.
13787type ExpressRouteLinkListResult struct {
13788	autorest.Response `json:"-"`
13789	// Value - The list of ExpressRouteLink sub-resources.
13790	Value *[]ExpressRouteLink `json:"value,omitempty"`
13791	// NextLink - The URL to get the next set of results.
13792	NextLink *string `json:"nextLink,omitempty"`
13793}
13794
13795// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values.
13796type ExpressRouteLinkListResultIterator struct {
13797	i    int
13798	page ExpressRouteLinkListResultPage
13799}
13800
13801// NextWithContext advances to the next value.  If there was an error making
13802// the request the iterator does not advance and the error is returned.
13803func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
13804	if tracing.IsEnabled() {
13805		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext")
13806		defer func() {
13807			sc := -1
13808			if iter.Response().Response.Response != nil {
13809				sc = iter.Response().Response.Response.StatusCode
13810			}
13811			tracing.EndSpan(ctx, sc, err)
13812		}()
13813	}
13814	iter.i++
13815	if iter.i < len(iter.page.Values()) {
13816		return nil
13817	}
13818	err = iter.page.NextWithContext(ctx)
13819	if err != nil {
13820		iter.i--
13821		return err
13822	}
13823	iter.i = 0
13824	return nil
13825}
13826
13827// Next advances to the next value.  If there was an error making
13828// the request the iterator does not advance and the error is returned.
13829// Deprecated: Use NextWithContext() instead.
13830func (iter *ExpressRouteLinkListResultIterator) Next() error {
13831	return iter.NextWithContext(context.Background())
13832}
13833
13834// NotDone returns true if the enumeration should be started or is not yet complete.
13835func (iter ExpressRouteLinkListResultIterator) NotDone() bool {
13836	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13837}
13838
13839// Response returns the raw server response from the last page request.
13840func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult {
13841	return iter.page.Response()
13842}
13843
13844// Value returns the current value or a zero-initialized value if the
13845// iterator has advanced beyond the end of the collection.
13846func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink {
13847	if !iter.page.NotDone() {
13848		return ExpressRouteLink{}
13849	}
13850	return iter.page.Values()[iter.i]
13851}
13852
13853// Creates a new instance of the ExpressRouteLinkListResultIterator type.
13854func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator {
13855	return ExpressRouteLinkListResultIterator{page: page}
13856}
13857
13858// IsEmpty returns true if the ListResult contains no values.
13859func (erllr ExpressRouteLinkListResult) IsEmpty() bool {
13860	return erllr.Value == nil || len(*erllr.Value) == 0
13861}
13862
13863// hasNextLink returns true if the NextLink is not empty.
13864func (erllr ExpressRouteLinkListResult) hasNextLink() bool {
13865	return erllr.NextLink != nil && len(*erllr.NextLink) != 0
13866}
13867
13868// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results.
13869// It returns nil if no more results exist.
13870func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
13871	if !erllr.hasNextLink() {
13872		return nil, nil
13873	}
13874	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13875		autorest.AsJSON(),
13876		autorest.AsGet(),
13877		autorest.WithBaseURL(to.String(erllr.NextLink)))
13878}
13879
13880// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values.
13881type ExpressRouteLinkListResultPage struct {
13882	fn    func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)
13883	erllr ExpressRouteLinkListResult
13884}
13885
13886// NextWithContext advances to the next page of values.  If there was an error making
13887// the request the page does not advance and the error is returned.
13888func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
13889	if tracing.IsEnabled() {
13890		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext")
13891		defer func() {
13892			sc := -1
13893			if page.Response().Response.Response != nil {
13894				sc = page.Response().Response.Response.StatusCode
13895			}
13896			tracing.EndSpan(ctx, sc, err)
13897		}()
13898	}
13899	for {
13900		next, err := page.fn(ctx, page.erllr)
13901		if err != nil {
13902			return err
13903		}
13904		page.erllr = next
13905		if !next.hasNextLink() || !next.IsEmpty() {
13906			break
13907		}
13908	}
13909	return nil
13910}
13911
13912// Next advances to the next page of values.  If there was an error making
13913// the request the page does not advance and the error is returned.
13914// Deprecated: Use NextWithContext() instead.
13915func (page *ExpressRouteLinkListResultPage) Next() error {
13916	return page.NextWithContext(context.Background())
13917}
13918
13919// NotDone returns true if the page enumeration should be started or is not yet complete.
13920func (page ExpressRouteLinkListResultPage) NotDone() bool {
13921	return !page.erllr.IsEmpty()
13922}
13923
13924// Response returns the raw server response from the last page request.
13925func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult {
13926	return page.erllr
13927}
13928
13929// Values returns the slice of values for the current page or nil if there are no values.
13930func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink {
13931	if page.erllr.IsEmpty() {
13932		return nil
13933	}
13934	return *page.erllr.Value
13935}
13936
13937// Creates a new instance of the ExpressRouteLinkListResultPage type.
13938func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage {
13939	return ExpressRouteLinkListResultPage{
13940		fn:    getNextPage,
13941		erllr: cur,
13942	}
13943}
13944
13945// ExpressRouteLinkMacSecConfig expressRouteLink Mac Security Configuration.
13946type ExpressRouteLinkMacSecConfig struct {
13947	// CknSecretIdentifier - Keyvault Secret Identifier URL containing Mac security CKN key.
13948	CknSecretIdentifier *string `json:"cknSecretIdentifier,omitempty"`
13949	// CakSecretIdentifier - Keyvault Secret Identifier URL containing Mac security CAK key.
13950	CakSecretIdentifier *string `json:"cakSecretIdentifier,omitempty"`
13951	// Cipher - Mac security cipher. Possible values include: 'GcmAes256', 'GcmAes128', 'GcmAesXpn128', 'GcmAesXpn256'
13952	Cipher ExpressRouteLinkMacSecCipher `json:"cipher,omitempty"`
13953	// SciState - Sci mode enabled/disabled. Possible values include: 'ExpressRouteLinkMacSecSciStateDisabled', 'ExpressRouteLinkMacSecSciStateEnabled'
13954	SciState ExpressRouteLinkMacSecSciState `json:"sciState,omitempty"`
13955}
13956
13957// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources.
13958type ExpressRouteLinkPropertiesFormat struct {
13959	// RouterName - READ-ONLY; Name of Azure router associated with physical port.
13960	RouterName *string `json:"routerName,omitempty"`
13961	// InterfaceName - READ-ONLY; Name of Azure router interface.
13962	InterfaceName *string `json:"interfaceName,omitempty"`
13963	// PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port.
13964	PatchPanelID *string `json:"patchPanelId,omitempty"`
13965	// RackID - READ-ONLY; Mapping of physical patch panel to rack.
13966	RackID *string `json:"rackId,omitempty"`
13967	// ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'LC', 'SC'
13968	ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"`
13969	// AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled'
13970	AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"`
13971	// ProvisioningState - READ-ONLY; The provisioning state of the express route link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
13972	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13973	// MacSecConfig - MacSec configuration.
13974	MacSecConfig *ExpressRouteLinkMacSecConfig `json:"macSecConfig,omitempty"`
13975}
13976
13977// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat.
13978func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
13979	objectMap := make(map[string]interface{})
13980	if erlpf.AdminState != "" {
13981		objectMap["adminState"] = erlpf.AdminState
13982	}
13983	if erlpf.MacSecConfig != nil {
13984		objectMap["macSecConfig"] = erlpf.MacSecConfig
13985	}
13986	return json.Marshal(objectMap)
13987}
13988
13989// ExpressRoutePort expressRoutePort resource definition.
13990type ExpressRoutePort struct {
13991	autorest.Response `json:"-"`
13992	// ExpressRoutePortPropertiesFormat - ExpressRoutePort properties.
13993	*ExpressRoutePortPropertiesFormat `json:"properties,omitempty"`
13994	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
13995	Etag *string `json:"etag,omitempty"`
13996	// Identity - The identity of ExpressRoutePort, if configured.
13997	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
13998	// ID - Resource ID.
13999	ID *string `json:"id,omitempty"`
14000	// Name - READ-ONLY; Resource name.
14001	Name *string `json:"name,omitempty"`
14002	// Type - READ-ONLY; Resource type.
14003	Type *string `json:"type,omitempty"`
14004	// Location - Resource location.
14005	Location *string `json:"location,omitempty"`
14006	// Tags - Resource tags.
14007	Tags map[string]*string `json:"tags"`
14008}
14009
14010// MarshalJSON is the custom marshaler for ExpressRoutePort.
14011func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) {
14012	objectMap := make(map[string]interface{})
14013	if erp.ExpressRoutePortPropertiesFormat != nil {
14014		objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat
14015	}
14016	if erp.Identity != nil {
14017		objectMap["identity"] = erp.Identity
14018	}
14019	if erp.ID != nil {
14020		objectMap["id"] = erp.ID
14021	}
14022	if erp.Location != nil {
14023		objectMap["location"] = erp.Location
14024	}
14025	if erp.Tags != nil {
14026		objectMap["tags"] = erp.Tags
14027	}
14028	return json.Marshal(objectMap)
14029}
14030
14031// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct.
14032func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error {
14033	var m map[string]*json.RawMessage
14034	err := json.Unmarshal(body, &m)
14035	if err != nil {
14036		return err
14037	}
14038	for k, v := range m {
14039		switch k {
14040		case "properties":
14041			if v != nil {
14042				var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat
14043				err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat)
14044				if err != nil {
14045					return err
14046				}
14047				erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat
14048			}
14049		case "etag":
14050			if v != nil {
14051				var etag string
14052				err = json.Unmarshal(*v, &etag)
14053				if err != nil {
14054					return err
14055				}
14056				erp.Etag = &etag
14057			}
14058		case "identity":
14059			if v != nil {
14060				var identity ManagedServiceIdentity
14061				err = json.Unmarshal(*v, &identity)
14062				if err != nil {
14063					return err
14064				}
14065				erp.Identity = &identity
14066			}
14067		case "id":
14068			if v != nil {
14069				var ID string
14070				err = json.Unmarshal(*v, &ID)
14071				if err != nil {
14072					return err
14073				}
14074				erp.ID = &ID
14075			}
14076		case "name":
14077			if v != nil {
14078				var name string
14079				err = json.Unmarshal(*v, &name)
14080				if err != nil {
14081					return err
14082				}
14083				erp.Name = &name
14084			}
14085		case "type":
14086			if v != nil {
14087				var typeVar string
14088				err = json.Unmarshal(*v, &typeVar)
14089				if err != nil {
14090					return err
14091				}
14092				erp.Type = &typeVar
14093			}
14094		case "location":
14095			if v != nil {
14096				var location string
14097				err = json.Unmarshal(*v, &location)
14098				if err != nil {
14099					return err
14100				}
14101				erp.Location = &location
14102			}
14103		case "tags":
14104			if v != nil {
14105				var tags map[string]*string
14106				err = json.Unmarshal(*v, &tags)
14107				if err != nil {
14108					return err
14109				}
14110				erp.Tags = tags
14111			}
14112		}
14113	}
14114
14115	return nil
14116}
14117
14118// ExpressRoutePortListResult response for ListExpressRoutePorts API service call.
14119type ExpressRoutePortListResult struct {
14120	autorest.Response `json:"-"`
14121	// Value - A list of ExpressRoutePort resources.
14122	Value *[]ExpressRoutePort `json:"value,omitempty"`
14123	// NextLink - The URL to get the next set of results.
14124	NextLink *string `json:"nextLink,omitempty"`
14125}
14126
14127// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values.
14128type ExpressRoutePortListResultIterator struct {
14129	i    int
14130	page ExpressRoutePortListResultPage
14131}
14132
14133// NextWithContext advances to the next value.  If there was an error making
14134// the request the iterator does not advance and the error is returned.
14135func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) {
14136	if tracing.IsEnabled() {
14137		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext")
14138		defer func() {
14139			sc := -1
14140			if iter.Response().Response.Response != nil {
14141				sc = iter.Response().Response.Response.StatusCode
14142			}
14143			tracing.EndSpan(ctx, sc, err)
14144		}()
14145	}
14146	iter.i++
14147	if iter.i < len(iter.page.Values()) {
14148		return nil
14149	}
14150	err = iter.page.NextWithContext(ctx)
14151	if err != nil {
14152		iter.i--
14153		return err
14154	}
14155	iter.i = 0
14156	return nil
14157}
14158
14159// Next advances to the next value.  If there was an error making
14160// the request the iterator does not advance and the error is returned.
14161// Deprecated: Use NextWithContext() instead.
14162func (iter *ExpressRoutePortListResultIterator) Next() error {
14163	return iter.NextWithContext(context.Background())
14164}
14165
14166// NotDone returns true if the enumeration should be started or is not yet complete.
14167func (iter ExpressRoutePortListResultIterator) NotDone() bool {
14168	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14169}
14170
14171// Response returns the raw server response from the last page request.
14172func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult {
14173	return iter.page.Response()
14174}
14175
14176// Value returns the current value or a zero-initialized value if the
14177// iterator has advanced beyond the end of the collection.
14178func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort {
14179	if !iter.page.NotDone() {
14180		return ExpressRoutePort{}
14181	}
14182	return iter.page.Values()[iter.i]
14183}
14184
14185// Creates a new instance of the ExpressRoutePortListResultIterator type.
14186func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator {
14187	return ExpressRoutePortListResultIterator{page: page}
14188}
14189
14190// IsEmpty returns true if the ListResult contains no values.
14191func (erplr ExpressRoutePortListResult) IsEmpty() bool {
14192	return erplr.Value == nil || len(*erplr.Value) == 0
14193}
14194
14195// hasNextLink returns true if the NextLink is not empty.
14196func (erplr ExpressRoutePortListResult) hasNextLink() bool {
14197	return erplr.NextLink != nil && len(*erplr.NextLink) != 0
14198}
14199
14200// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results.
14201// It returns nil if no more results exist.
14202func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) {
14203	if !erplr.hasNextLink() {
14204		return nil, nil
14205	}
14206	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14207		autorest.AsJSON(),
14208		autorest.AsGet(),
14209		autorest.WithBaseURL(to.String(erplr.NextLink)))
14210}
14211
14212// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values.
14213type ExpressRoutePortListResultPage struct {
14214	fn    func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)
14215	erplr ExpressRoutePortListResult
14216}
14217
14218// NextWithContext advances to the next page of values.  If there was an error making
14219// the request the page does not advance and the error is returned.
14220func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) {
14221	if tracing.IsEnabled() {
14222		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext")
14223		defer func() {
14224			sc := -1
14225			if page.Response().Response.Response != nil {
14226				sc = page.Response().Response.Response.StatusCode
14227			}
14228			tracing.EndSpan(ctx, sc, err)
14229		}()
14230	}
14231	for {
14232		next, err := page.fn(ctx, page.erplr)
14233		if err != nil {
14234			return err
14235		}
14236		page.erplr = next
14237		if !next.hasNextLink() || !next.IsEmpty() {
14238			break
14239		}
14240	}
14241	return nil
14242}
14243
14244// Next advances to the next page of values.  If there was an error making
14245// the request the page does not advance and the error is returned.
14246// Deprecated: Use NextWithContext() instead.
14247func (page *ExpressRoutePortListResultPage) Next() error {
14248	return page.NextWithContext(context.Background())
14249}
14250
14251// NotDone returns true if the page enumeration should be started or is not yet complete.
14252func (page ExpressRoutePortListResultPage) NotDone() bool {
14253	return !page.erplr.IsEmpty()
14254}
14255
14256// Response returns the raw server response from the last page request.
14257func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult {
14258	return page.erplr
14259}
14260
14261// Values returns the slice of values for the current page or nil if there are no values.
14262func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort {
14263	if page.erplr.IsEmpty() {
14264		return nil
14265	}
14266	return *page.erplr.Value
14267}
14268
14269// Creates a new instance of the ExpressRoutePortListResultPage type.
14270func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage {
14271	return ExpressRoutePortListResultPage{
14272		fn:    getNextPage,
14273		erplr: cur,
14274	}
14275}
14276
14277// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources.
14278type ExpressRoutePortPropertiesFormat struct {
14279	// PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically.
14280	PeeringLocation *string `json:"peeringLocation,omitempty"`
14281	// BandwidthInGbps - Bandwidth of procured ports in Gbps.
14282	BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"`
14283	// ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths.
14284	ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"`
14285	// Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s).
14286	Mtu *string `json:"mtu,omitempty"`
14287	// Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ'
14288	Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"`
14289	// EtherType - READ-ONLY; Ether type of the physical port.
14290	EtherType *string `json:"etherType,omitempty"`
14291	// AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization.
14292	AllocationDate *string `json:"allocationDate,omitempty"`
14293	// Links - The set of physical links of the ExpressRoutePort resource.
14294	Links *[]ExpressRouteLink `json:"links,omitempty"`
14295	// Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource.
14296	Circuits *[]SubResource `json:"circuits,omitempty"`
14297	// ProvisioningState - READ-ONLY; The provisioning state of the express route port resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
14298	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14299	// ResourceGUID - READ-ONLY; The resource GUID property of the express route port resource.
14300	ResourceGUID *string `json:"resourceGuid,omitempty"`
14301}
14302
14303// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat.
14304func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) {
14305	objectMap := make(map[string]interface{})
14306	if erppf.PeeringLocation != nil {
14307		objectMap["peeringLocation"] = erppf.PeeringLocation
14308	}
14309	if erppf.BandwidthInGbps != nil {
14310		objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps
14311	}
14312	if erppf.Encapsulation != "" {
14313		objectMap["encapsulation"] = erppf.Encapsulation
14314	}
14315	if erppf.Links != nil {
14316		objectMap["links"] = erppf.Links
14317	}
14318	return json.Marshal(objectMap)
14319}
14320
14321// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14322// long-running operation.
14323type ExpressRoutePortsCreateOrUpdateFuture struct {
14324	azure.FutureAPI
14325	// Result returns the result of the asynchronous operation.
14326	// If the operation has not completed it will return an error.
14327	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
14328}
14329
14330// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14331// operation.
14332type ExpressRoutePortsDeleteFuture struct {
14333	azure.FutureAPI
14334	// Result returns the result of the asynchronous operation.
14335	// If the operation has not completed it will return an error.
14336	Result func(ExpressRoutePortsClient) (autorest.Response, error)
14337}
14338
14339// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
14340type ExpressRoutePortsLocation struct {
14341	autorest.Response `json:"-"`
14342	// ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties.
14343	*ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"`
14344	// ID - Resource ID.
14345	ID *string `json:"id,omitempty"`
14346	// Name - READ-ONLY; Resource name.
14347	Name *string `json:"name,omitempty"`
14348	// Type - READ-ONLY; Resource type.
14349	Type *string `json:"type,omitempty"`
14350	// Location - Resource location.
14351	Location *string `json:"location,omitempty"`
14352	// Tags - Resource tags.
14353	Tags map[string]*string `json:"tags"`
14354}
14355
14356// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation.
14357func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) {
14358	objectMap := make(map[string]interface{})
14359	if erpl.ExpressRoutePortsLocationPropertiesFormat != nil {
14360		objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat
14361	}
14362	if erpl.ID != nil {
14363		objectMap["id"] = erpl.ID
14364	}
14365	if erpl.Location != nil {
14366		objectMap["location"] = erpl.Location
14367	}
14368	if erpl.Tags != nil {
14369		objectMap["tags"] = erpl.Tags
14370	}
14371	return json.Marshal(objectMap)
14372}
14373
14374// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct.
14375func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error {
14376	var m map[string]*json.RawMessage
14377	err := json.Unmarshal(body, &m)
14378	if err != nil {
14379		return err
14380	}
14381	for k, v := range m {
14382		switch k {
14383		case "properties":
14384			if v != nil {
14385				var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat
14386				err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat)
14387				if err != nil {
14388					return err
14389				}
14390				erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat
14391			}
14392		case "id":
14393			if v != nil {
14394				var ID string
14395				err = json.Unmarshal(*v, &ID)
14396				if err != nil {
14397					return err
14398				}
14399				erpl.ID = &ID
14400			}
14401		case "name":
14402			if v != nil {
14403				var name string
14404				err = json.Unmarshal(*v, &name)
14405				if err != nil {
14406					return err
14407				}
14408				erpl.Name = &name
14409			}
14410		case "type":
14411			if v != nil {
14412				var typeVar string
14413				err = json.Unmarshal(*v, &typeVar)
14414				if err != nil {
14415					return err
14416				}
14417				erpl.Type = &typeVar
14418			}
14419		case "location":
14420			if v != nil {
14421				var location string
14422				err = json.Unmarshal(*v, &location)
14423				if err != nil {
14424					return err
14425				}
14426				erpl.Location = &location
14427			}
14428		case "tags":
14429			if v != nil {
14430				var tags map[string]*string
14431				err = json.Unmarshal(*v, &tags)
14432				if err != nil {
14433					return err
14434				}
14435				erpl.Tags = tags
14436			}
14437		}
14438	}
14439
14440	return nil
14441}
14442
14443// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths.
14444type ExpressRoutePortsLocationBandwidths struct {
14445	// OfferName - READ-ONLY; Bandwidth descriptive name.
14446	OfferName *string `json:"offerName,omitempty"`
14447	// ValueInGbps - READ-ONLY; Bandwidth value in Gbps.
14448	ValueInGbps *int32 `json:"valueInGbps,omitempty"`
14449}
14450
14451// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
14452type ExpressRoutePortsLocationListResult struct {
14453	autorest.Response `json:"-"`
14454	// Value - The list of all ExpressRoutePort peering locations.
14455	Value *[]ExpressRoutePortsLocation `json:"value,omitempty"`
14456	// NextLink - The URL to get the next set of results.
14457	NextLink *string `json:"nextLink,omitempty"`
14458}
14459
14460// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of
14461// ExpressRoutePortsLocation values.
14462type ExpressRoutePortsLocationListResultIterator struct {
14463	i    int
14464	page ExpressRoutePortsLocationListResultPage
14465}
14466
14467// NextWithContext advances to the next value.  If there was an error making
14468// the request the iterator does not advance and the error is returned.
14469func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
14470	if tracing.IsEnabled() {
14471		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext")
14472		defer func() {
14473			sc := -1
14474			if iter.Response().Response.Response != nil {
14475				sc = iter.Response().Response.Response.StatusCode
14476			}
14477			tracing.EndSpan(ctx, sc, err)
14478		}()
14479	}
14480	iter.i++
14481	if iter.i < len(iter.page.Values()) {
14482		return nil
14483	}
14484	err = iter.page.NextWithContext(ctx)
14485	if err != nil {
14486		iter.i--
14487		return err
14488	}
14489	iter.i = 0
14490	return nil
14491}
14492
14493// Next advances to the next value.  If there was an error making
14494// the request the iterator does not advance and the error is returned.
14495// Deprecated: Use NextWithContext() instead.
14496func (iter *ExpressRoutePortsLocationListResultIterator) Next() error {
14497	return iter.NextWithContext(context.Background())
14498}
14499
14500// NotDone returns true if the enumeration should be started or is not yet complete.
14501func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool {
14502	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14503}
14504
14505// Response returns the raw server response from the last page request.
14506func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult {
14507	return iter.page.Response()
14508}
14509
14510// Value returns the current value or a zero-initialized value if the
14511// iterator has advanced beyond the end of the collection.
14512func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation {
14513	if !iter.page.NotDone() {
14514		return ExpressRoutePortsLocation{}
14515	}
14516	return iter.page.Values()[iter.i]
14517}
14518
14519// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type.
14520func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator {
14521	return ExpressRoutePortsLocationListResultIterator{page: page}
14522}
14523
14524// IsEmpty returns true if the ListResult contains no values.
14525func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool {
14526	return erpllr.Value == nil || len(*erpllr.Value) == 0
14527}
14528
14529// hasNextLink returns true if the NextLink is not empty.
14530func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool {
14531	return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0
14532}
14533
14534// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results.
14535// It returns nil if no more results exist.
14536func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) {
14537	if !erpllr.hasNextLink() {
14538		return nil, nil
14539	}
14540	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14541		autorest.AsJSON(),
14542		autorest.AsGet(),
14543		autorest.WithBaseURL(to.String(erpllr.NextLink)))
14544}
14545
14546// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values.
14547type ExpressRoutePortsLocationListResultPage struct {
14548	fn     func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)
14549	erpllr ExpressRoutePortsLocationListResult
14550}
14551
14552// NextWithContext advances to the next page of values.  If there was an error making
14553// the request the page does not advance and the error is returned.
14554func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) {
14555	if tracing.IsEnabled() {
14556		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext")
14557		defer func() {
14558			sc := -1
14559			if page.Response().Response.Response != nil {
14560				sc = page.Response().Response.Response.StatusCode
14561			}
14562			tracing.EndSpan(ctx, sc, err)
14563		}()
14564	}
14565	for {
14566		next, err := page.fn(ctx, page.erpllr)
14567		if err != nil {
14568			return err
14569		}
14570		page.erpllr = next
14571		if !next.hasNextLink() || !next.IsEmpty() {
14572			break
14573		}
14574	}
14575	return nil
14576}
14577
14578// Next advances to the next page of values.  If there was an error making
14579// the request the page does not advance and the error is returned.
14580// Deprecated: Use NextWithContext() instead.
14581func (page *ExpressRoutePortsLocationListResultPage) Next() error {
14582	return page.NextWithContext(context.Background())
14583}
14584
14585// NotDone returns true if the page enumeration should be started or is not yet complete.
14586func (page ExpressRoutePortsLocationListResultPage) NotDone() bool {
14587	return !page.erpllr.IsEmpty()
14588}
14589
14590// Response returns the raw server response from the last page request.
14591func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult {
14592	return page.erpllr
14593}
14594
14595// Values returns the slice of values for the current page or nil if there are no values.
14596func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation {
14597	if page.erpllr.IsEmpty() {
14598		return nil
14599	}
14600	return *page.erpllr.Value
14601}
14602
14603// Creates a new instance of the ExpressRoutePortsLocationListResultPage type.
14604func NewExpressRoutePortsLocationListResultPage(cur ExpressRoutePortsLocationListResult, getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage {
14605	return ExpressRoutePortsLocationListResultPage{
14606		fn:     getNextPage,
14607		erpllr: cur,
14608	}
14609}
14610
14611// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location
14612// resources.
14613type ExpressRoutePortsLocationPropertiesFormat struct {
14614	// Address - READ-ONLY; Address of peering location.
14615	Address *string `json:"address,omitempty"`
14616	// Contact - READ-ONLY; Contact details of peering locations.
14617	Contact *string `json:"contact,omitempty"`
14618	// AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths.
14619	AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"`
14620	// ProvisioningState - READ-ONLY; The provisioning state of the express route port location resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
14621	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14622}
14623
14624// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat.
14625func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) {
14626	objectMap := make(map[string]interface{})
14627	if erplpf.AvailableBandwidths != nil {
14628		objectMap["availableBandwidths"] = erplpf.AvailableBandwidths
14629	}
14630	return json.Marshal(objectMap)
14631}
14632
14633// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
14634type ExpressRouteServiceProvider struct {
14635	// ExpressRouteServiceProviderPropertiesFormat - Properties of the express route service provider.
14636	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
14637	// ID - Resource ID.
14638	ID *string `json:"id,omitempty"`
14639	// Name - READ-ONLY; Resource name.
14640	Name *string `json:"name,omitempty"`
14641	// Type - READ-ONLY; Resource type.
14642	Type *string `json:"type,omitempty"`
14643	// Location - Resource location.
14644	Location *string `json:"location,omitempty"`
14645	// Tags - Resource tags.
14646	Tags map[string]*string `json:"tags"`
14647}
14648
14649// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
14650func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
14651	objectMap := make(map[string]interface{})
14652	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
14653		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
14654	}
14655	if ersp.ID != nil {
14656		objectMap["id"] = ersp.ID
14657	}
14658	if ersp.Location != nil {
14659		objectMap["location"] = ersp.Location
14660	}
14661	if ersp.Tags != nil {
14662		objectMap["tags"] = ersp.Tags
14663	}
14664	return json.Marshal(objectMap)
14665}
14666
14667// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
14668func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
14669	var m map[string]*json.RawMessage
14670	err := json.Unmarshal(body, &m)
14671	if err != nil {
14672		return err
14673	}
14674	for k, v := range m {
14675		switch k {
14676		case "properties":
14677			if v != nil {
14678				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
14679				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
14680				if err != nil {
14681					return err
14682				}
14683				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
14684			}
14685		case "id":
14686			if v != nil {
14687				var ID string
14688				err = json.Unmarshal(*v, &ID)
14689				if err != nil {
14690					return err
14691				}
14692				ersp.ID = &ID
14693			}
14694		case "name":
14695			if v != nil {
14696				var name string
14697				err = json.Unmarshal(*v, &name)
14698				if err != nil {
14699					return err
14700				}
14701				ersp.Name = &name
14702			}
14703		case "type":
14704			if v != nil {
14705				var typeVar string
14706				err = json.Unmarshal(*v, &typeVar)
14707				if err != nil {
14708					return err
14709				}
14710				ersp.Type = &typeVar
14711			}
14712		case "location":
14713			if v != nil {
14714				var location string
14715				err = json.Unmarshal(*v, &location)
14716				if err != nil {
14717					return err
14718				}
14719				ersp.Location = &location
14720			}
14721		case "tags":
14722			if v != nil {
14723				var tags map[string]*string
14724				err = json.Unmarshal(*v, &tags)
14725				if err != nil {
14726					return err
14727				}
14728				ersp.Tags = tags
14729			}
14730		}
14731	}
14732
14733	return nil
14734}
14735
14736// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
14737// resources.
14738type ExpressRouteServiceProviderBandwidthsOffered struct {
14739	// OfferName - The OfferName.
14740	OfferName *string `json:"offerName,omitempty"`
14741	// ValueInMbps - The ValueInMbps.
14742	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
14743}
14744
14745// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
14746type ExpressRouteServiceProviderListResult struct {
14747	autorest.Response `json:"-"`
14748	// Value - A list of ExpressRouteResourceProvider resources.
14749	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
14750	// NextLink - The URL to get the next set of results.
14751	NextLink *string `json:"nextLink,omitempty"`
14752}
14753
14754// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
14755// ExpressRouteServiceProvider values.
14756type ExpressRouteServiceProviderListResultIterator struct {
14757	i    int
14758	page ExpressRouteServiceProviderListResultPage
14759}
14760
14761// NextWithContext advances to the next value.  If there was an error making
14762// the request the iterator does not advance and the error is returned.
14763func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
14764	if tracing.IsEnabled() {
14765		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
14766		defer func() {
14767			sc := -1
14768			if iter.Response().Response.Response != nil {
14769				sc = iter.Response().Response.Response.StatusCode
14770			}
14771			tracing.EndSpan(ctx, sc, err)
14772		}()
14773	}
14774	iter.i++
14775	if iter.i < len(iter.page.Values()) {
14776		return nil
14777	}
14778	err = iter.page.NextWithContext(ctx)
14779	if err != nil {
14780		iter.i--
14781		return err
14782	}
14783	iter.i = 0
14784	return nil
14785}
14786
14787// Next advances to the next value.  If there was an error making
14788// the request the iterator does not advance and the error is returned.
14789// Deprecated: Use NextWithContext() instead.
14790func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
14791	return iter.NextWithContext(context.Background())
14792}
14793
14794// NotDone returns true if the enumeration should be started or is not yet complete.
14795func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
14796	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14797}
14798
14799// Response returns the raw server response from the last page request.
14800func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
14801	return iter.page.Response()
14802}
14803
14804// Value returns the current value or a zero-initialized value if the
14805// iterator has advanced beyond the end of the collection.
14806func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
14807	if !iter.page.NotDone() {
14808		return ExpressRouteServiceProvider{}
14809	}
14810	return iter.page.Values()[iter.i]
14811}
14812
14813// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
14814func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
14815	return ExpressRouteServiceProviderListResultIterator{page: page}
14816}
14817
14818// IsEmpty returns true if the ListResult contains no values.
14819func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
14820	return ersplr.Value == nil || len(*ersplr.Value) == 0
14821}
14822
14823// hasNextLink returns true if the NextLink is not empty.
14824func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
14825	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
14826}
14827
14828// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
14829// It returns nil if no more results exist.
14830func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
14831	if !ersplr.hasNextLink() {
14832		return nil, nil
14833	}
14834	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14835		autorest.AsJSON(),
14836		autorest.AsGet(),
14837		autorest.WithBaseURL(to.String(ersplr.NextLink)))
14838}
14839
14840// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
14841type ExpressRouteServiceProviderListResultPage struct {
14842	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
14843	ersplr ExpressRouteServiceProviderListResult
14844}
14845
14846// NextWithContext advances to the next page of values.  If there was an error making
14847// the request the page does not advance and the error is returned.
14848func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
14849	if tracing.IsEnabled() {
14850		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
14851		defer func() {
14852			sc := -1
14853			if page.Response().Response.Response != nil {
14854				sc = page.Response().Response.Response.StatusCode
14855			}
14856			tracing.EndSpan(ctx, sc, err)
14857		}()
14858	}
14859	for {
14860		next, err := page.fn(ctx, page.ersplr)
14861		if err != nil {
14862			return err
14863		}
14864		page.ersplr = next
14865		if !next.hasNextLink() || !next.IsEmpty() {
14866			break
14867		}
14868	}
14869	return nil
14870}
14871
14872// Next advances to the next page of values.  If there was an error making
14873// the request the page does not advance and the error is returned.
14874// Deprecated: Use NextWithContext() instead.
14875func (page *ExpressRouteServiceProviderListResultPage) Next() error {
14876	return page.NextWithContext(context.Background())
14877}
14878
14879// NotDone returns true if the page enumeration should be started or is not yet complete.
14880func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
14881	return !page.ersplr.IsEmpty()
14882}
14883
14884// Response returns the raw server response from the last page request.
14885func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
14886	return page.ersplr
14887}
14888
14889// Values returns the slice of values for the current page or nil if there are no values.
14890func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
14891	if page.ersplr.IsEmpty() {
14892		return nil
14893	}
14894	return *page.ersplr.Value
14895}
14896
14897// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
14898func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
14899	return ExpressRouteServiceProviderListResultPage{
14900		fn:     getNextPage,
14901		ersplr: cur,
14902	}
14903}
14904
14905// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
14906type ExpressRouteServiceProviderPropertiesFormat struct {
14907	// PeeringLocations - A list of peering locations.
14908	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
14909	// BandwidthsOffered - A list of bandwidths offered.
14910	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
14911	// ProvisioningState - READ-ONLY; The provisioning state of the express route service provider resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
14912	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
14913}
14914
14915// MarshalJSON is the custom marshaler for ExpressRouteServiceProviderPropertiesFormat.
14916func (ersppf ExpressRouteServiceProviderPropertiesFormat) MarshalJSON() ([]byte, error) {
14917	objectMap := make(map[string]interface{})
14918	if ersppf.PeeringLocations != nil {
14919		objectMap["peeringLocations"] = ersppf.PeeringLocations
14920	}
14921	if ersppf.BandwidthsOffered != nil {
14922		objectMap["bandwidthsOffered"] = ersppf.BandwidthsOffered
14923	}
14924	return json.Marshal(objectMap)
14925}
14926
14927// ExtendedLocation extendedLocation complex type.
14928type ExtendedLocation struct {
14929	// Name - The name of the extended location.
14930	Name *string `json:"name,omitempty"`
14931	// Type - The type of the extended location.
14932	Type *string `json:"type,omitempty"`
14933}
14934
14935// FirewallPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14936// long-running operation.
14937type FirewallPoliciesCreateOrUpdateFuture struct {
14938	azure.FutureAPI
14939	// Result returns the result of the asynchronous operation.
14940	// If the operation has not completed it will return an error.
14941	Result func(FirewallPoliciesClient) (FirewallPolicy, error)
14942}
14943
14944// FirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14945// operation.
14946type FirewallPoliciesDeleteFuture struct {
14947	azure.FutureAPI
14948	// Result returns the result of the asynchronous operation.
14949	// If the operation has not completed it will return an error.
14950	Result func(FirewallPoliciesClient) (autorest.Response, error)
14951}
14952
14953// FirewallPolicy firewallPolicy Resource.
14954type FirewallPolicy struct {
14955	autorest.Response `json:"-"`
14956	// FirewallPolicyPropertiesFormat - Properties of the firewall policy.
14957	*FirewallPolicyPropertiesFormat `json:"properties,omitempty"`
14958	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
14959	Etag *string `json:"etag,omitempty"`
14960	// Identity - The identity of the firewall policy.
14961	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
14962	// ID - Resource ID.
14963	ID *string `json:"id,omitempty"`
14964	// Name - READ-ONLY; Resource name.
14965	Name *string `json:"name,omitempty"`
14966	// Type - READ-ONLY; Resource type.
14967	Type *string `json:"type,omitempty"`
14968	// Location - Resource location.
14969	Location *string `json:"location,omitempty"`
14970	// Tags - Resource tags.
14971	Tags map[string]*string `json:"tags"`
14972}
14973
14974// MarshalJSON is the custom marshaler for FirewallPolicy.
14975func (fp FirewallPolicy) MarshalJSON() ([]byte, error) {
14976	objectMap := make(map[string]interface{})
14977	if fp.FirewallPolicyPropertiesFormat != nil {
14978		objectMap["properties"] = fp.FirewallPolicyPropertiesFormat
14979	}
14980	if fp.Identity != nil {
14981		objectMap["identity"] = fp.Identity
14982	}
14983	if fp.ID != nil {
14984		objectMap["id"] = fp.ID
14985	}
14986	if fp.Location != nil {
14987		objectMap["location"] = fp.Location
14988	}
14989	if fp.Tags != nil {
14990		objectMap["tags"] = fp.Tags
14991	}
14992	return json.Marshal(objectMap)
14993}
14994
14995// UnmarshalJSON is the custom unmarshaler for FirewallPolicy struct.
14996func (fp *FirewallPolicy) UnmarshalJSON(body []byte) error {
14997	var m map[string]*json.RawMessage
14998	err := json.Unmarshal(body, &m)
14999	if err != nil {
15000		return err
15001	}
15002	for k, v := range m {
15003		switch k {
15004		case "properties":
15005			if v != nil {
15006				var firewallPolicyPropertiesFormat FirewallPolicyPropertiesFormat
15007				err = json.Unmarshal(*v, &firewallPolicyPropertiesFormat)
15008				if err != nil {
15009					return err
15010				}
15011				fp.FirewallPolicyPropertiesFormat = &firewallPolicyPropertiesFormat
15012			}
15013		case "etag":
15014			if v != nil {
15015				var etag string
15016				err = json.Unmarshal(*v, &etag)
15017				if err != nil {
15018					return err
15019				}
15020				fp.Etag = &etag
15021			}
15022		case "identity":
15023			if v != nil {
15024				var identity ManagedServiceIdentity
15025				err = json.Unmarshal(*v, &identity)
15026				if err != nil {
15027					return err
15028				}
15029				fp.Identity = &identity
15030			}
15031		case "id":
15032			if v != nil {
15033				var ID string
15034				err = json.Unmarshal(*v, &ID)
15035				if err != nil {
15036					return err
15037				}
15038				fp.ID = &ID
15039			}
15040		case "name":
15041			if v != nil {
15042				var name string
15043				err = json.Unmarshal(*v, &name)
15044				if err != nil {
15045					return err
15046				}
15047				fp.Name = &name
15048			}
15049		case "type":
15050			if v != nil {
15051				var typeVar string
15052				err = json.Unmarshal(*v, &typeVar)
15053				if err != nil {
15054					return err
15055				}
15056				fp.Type = &typeVar
15057			}
15058		case "location":
15059			if v != nil {
15060				var location string
15061				err = json.Unmarshal(*v, &location)
15062				if err != nil {
15063					return err
15064				}
15065				fp.Location = &location
15066			}
15067		case "tags":
15068			if v != nil {
15069				var tags map[string]*string
15070				err = json.Unmarshal(*v, &tags)
15071				if err != nil {
15072					return err
15073				}
15074				fp.Tags = tags
15075			}
15076		}
15077	}
15078
15079	return nil
15080}
15081
15082// FirewallPolicyCertificateAuthority trusted Root certificates properties for tls.
15083type FirewallPolicyCertificateAuthority struct {
15084	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
15085	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
15086	// Name - Name of the CA certificate.
15087	Name *string `json:"name,omitempty"`
15088}
15089
15090// FirewallPolicyFilterRuleCollection firewall Policy Filter Rule Collection.
15091type FirewallPolicyFilterRuleCollection struct {
15092	// Action - The action type of a Filter rule collection.
15093	Action *FirewallPolicyFilterRuleCollectionAction `json:"action,omitempty"`
15094	// Rules - List of rules included in a rule collection.
15095	Rules *[]BasicFirewallPolicyRule `json:"rules,omitempty"`
15096	// Name - The name of the rule collection.
15097	Name *string `json:"name,omitempty"`
15098	// Priority - Priority of the Firewall Policy Rule Collection resource.
15099	Priority *int32 `json:"priority,omitempty"`
15100	// RuleCollectionType - Possible values include: 'RuleCollectionTypeFirewallPolicyRuleCollection', 'RuleCollectionTypeFirewallPolicyNatRuleCollection', 'RuleCollectionTypeFirewallPolicyFilterRuleCollection'
15101	RuleCollectionType RuleCollectionType `json:"ruleCollectionType,omitempty"`
15102}
15103
15104// MarshalJSON is the custom marshaler for FirewallPolicyFilterRuleCollection.
15105func (fpfrc FirewallPolicyFilterRuleCollection) MarshalJSON() ([]byte, error) {
15106	fpfrc.RuleCollectionType = RuleCollectionTypeFirewallPolicyFilterRuleCollection
15107	objectMap := make(map[string]interface{})
15108	if fpfrc.Action != nil {
15109		objectMap["action"] = fpfrc.Action
15110	}
15111	if fpfrc.Rules != nil {
15112		objectMap["rules"] = fpfrc.Rules
15113	}
15114	if fpfrc.Name != nil {
15115		objectMap["name"] = fpfrc.Name
15116	}
15117	if fpfrc.Priority != nil {
15118		objectMap["priority"] = fpfrc.Priority
15119	}
15120	if fpfrc.RuleCollectionType != "" {
15121		objectMap["ruleCollectionType"] = fpfrc.RuleCollectionType
15122	}
15123	return json.Marshal(objectMap)
15124}
15125
15126// AsFirewallPolicyNatRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection.
15127func (fpfrc FirewallPolicyFilterRuleCollection) AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool) {
15128	return nil, false
15129}
15130
15131// AsFirewallPolicyFilterRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection.
15132func (fpfrc FirewallPolicyFilterRuleCollection) AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool) {
15133	return &fpfrc, true
15134}
15135
15136// AsFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection.
15137func (fpfrc FirewallPolicyFilterRuleCollection) AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool) {
15138	return nil, false
15139}
15140
15141// AsBasicFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyFilterRuleCollection.
15142func (fpfrc FirewallPolicyFilterRuleCollection) AsBasicFirewallPolicyRuleCollection() (BasicFirewallPolicyRuleCollection, bool) {
15143	return &fpfrc, true
15144}
15145
15146// UnmarshalJSON is the custom unmarshaler for FirewallPolicyFilterRuleCollection struct.
15147func (fpfrc *FirewallPolicyFilterRuleCollection) UnmarshalJSON(body []byte) error {
15148	var m map[string]*json.RawMessage
15149	err := json.Unmarshal(body, &m)
15150	if err != nil {
15151		return err
15152	}
15153	for k, v := range m {
15154		switch k {
15155		case "action":
15156			if v != nil {
15157				var action FirewallPolicyFilterRuleCollectionAction
15158				err = json.Unmarshal(*v, &action)
15159				if err != nil {
15160					return err
15161				}
15162				fpfrc.Action = &action
15163			}
15164		case "rules":
15165			if v != nil {
15166				rules, err := unmarshalBasicFirewallPolicyRuleArray(*v)
15167				if err != nil {
15168					return err
15169				}
15170				fpfrc.Rules = &rules
15171			}
15172		case "name":
15173			if v != nil {
15174				var name string
15175				err = json.Unmarshal(*v, &name)
15176				if err != nil {
15177					return err
15178				}
15179				fpfrc.Name = &name
15180			}
15181		case "priority":
15182			if v != nil {
15183				var priority int32
15184				err = json.Unmarshal(*v, &priority)
15185				if err != nil {
15186					return err
15187				}
15188				fpfrc.Priority = &priority
15189			}
15190		case "ruleCollectionType":
15191			if v != nil {
15192				var ruleCollectionType RuleCollectionType
15193				err = json.Unmarshal(*v, &ruleCollectionType)
15194				if err != nil {
15195					return err
15196				}
15197				fpfrc.RuleCollectionType = ruleCollectionType
15198			}
15199		}
15200	}
15201
15202	return nil
15203}
15204
15205// FirewallPolicyFilterRuleCollectionAction properties of the FirewallPolicyFilterRuleCollectionAction.
15206type FirewallPolicyFilterRuleCollectionAction struct {
15207	// Type - The type of action. Possible values include: 'FirewallPolicyFilterRuleCollectionActionTypeAllow', 'FirewallPolicyFilterRuleCollectionActionTypeDeny'
15208	Type FirewallPolicyFilterRuleCollectionActionType `json:"type,omitempty"`
15209}
15210
15211// FirewallPolicyInsights firewall Policy Insights.
15212type FirewallPolicyInsights struct {
15213	// IsEnabled - A flag to indicate if the insights are enabled on the policy.
15214	IsEnabled *bool `json:"isEnabled,omitempty"`
15215	// RetentionDays - Number of days the insights should be enabled on the policy.
15216	RetentionDays *int32 `json:"retentionDays,omitempty"`
15217	// LogAnalyticsResources - Workspaces needed to configure the Firewall Policy Insights.
15218	LogAnalyticsResources *FirewallPolicyLogAnalyticsResources `json:"logAnalyticsResources,omitempty"`
15219}
15220
15221// FirewallPolicyIntrusionDetection configuration for intrusion detection mode and rules.
15222type FirewallPolicyIntrusionDetection struct {
15223	// Mode - Intrusion detection general state. Possible values include: 'FirewallPolicyIntrusionDetectionStateTypeOff', 'FirewallPolicyIntrusionDetectionStateTypeAlert', 'FirewallPolicyIntrusionDetectionStateTypeDeny'
15224	Mode FirewallPolicyIntrusionDetectionStateType `json:"mode,omitempty"`
15225	// Configuration - Intrusion detection configuration properties.
15226	Configuration *FirewallPolicyIntrusionDetectionConfiguration `json:"configuration,omitempty"`
15227}
15228
15229// FirewallPolicyIntrusionDetectionBypassTrafficSpecifications intrusion detection bypass traffic
15230// specification.
15231type FirewallPolicyIntrusionDetectionBypassTrafficSpecifications struct {
15232	// Name - Name of the bypass traffic rule.
15233	Name *string `json:"name,omitempty"`
15234	// Description - Description of the bypass traffic rule.
15235	Description *string `json:"description,omitempty"`
15236	// Protocol - The rule bypass protocol. Possible values include: 'FirewallPolicyIntrusionDetectionProtocolTCP', 'FirewallPolicyIntrusionDetectionProtocolUDP', 'FirewallPolicyIntrusionDetectionProtocolICMP', 'FirewallPolicyIntrusionDetectionProtocolANY'
15237	Protocol FirewallPolicyIntrusionDetectionProtocol `json:"protocol,omitempty"`
15238	// SourceAddresses - List of source IP addresses or ranges for this rule.
15239	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
15240	// DestinationAddresses - List of destination IP addresses or ranges for this rule.
15241	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
15242	// DestinationPorts - List of destination ports or ranges.
15243	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
15244	// SourceIPGroups - List of source IpGroups for this rule.
15245	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
15246	// DestinationIPGroups - List of destination IpGroups for this rule.
15247	DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"`
15248}
15249
15250// FirewallPolicyIntrusionDetectionConfiguration the operation for configuring intrusion detection.
15251type FirewallPolicyIntrusionDetectionConfiguration struct {
15252	// SignatureOverrides - List of specific signatures states.
15253	SignatureOverrides *[]FirewallPolicyIntrusionDetectionSignatureSpecification `json:"signatureOverrides,omitempty"`
15254	// BypassTrafficSettings - List of rules for traffic to bypass.
15255	BypassTrafficSettings *[]FirewallPolicyIntrusionDetectionBypassTrafficSpecifications `json:"bypassTrafficSettings,omitempty"`
15256}
15257
15258// FirewallPolicyIntrusionDetectionSignatureSpecification intrusion detection signatures specification
15259// states.
15260type FirewallPolicyIntrusionDetectionSignatureSpecification struct {
15261	// ID - Signature id.
15262	ID *string `json:"id,omitempty"`
15263	// Mode - The signature state. Possible values include: 'FirewallPolicyIntrusionDetectionStateTypeOff', 'FirewallPolicyIntrusionDetectionStateTypeAlert', 'FirewallPolicyIntrusionDetectionStateTypeDeny'
15264	Mode FirewallPolicyIntrusionDetectionStateType `json:"mode,omitempty"`
15265}
15266
15267// FirewallPolicyListResult response for ListFirewallPolicies API service call.
15268type FirewallPolicyListResult struct {
15269	autorest.Response `json:"-"`
15270	// Value - List of Firewall Policies in a resource group.
15271	Value *[]FirewallPolicy `json:"value,omitempty"`
15272	// NextLink - URL to get the next set of results.
15273	NextLink *string `json:"nextLink,omitempty"`
15274}
15275
15276// FirewallPolicyListResultIterator provides access to a complete listing of FirewallPolicy values.
15277type FirewallPolicyListResultIterator struct {
15278	i    int
15279	page FirewallPolicyListResultPage
15280}
15281
15282// NextWithContext advances to the next value.  If there was an error making
15283// the request the iterator does not advance and the error is returned.
15284func (iter *FirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
15285	if tracing.IsEnabled() {
15286		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultIterator.NextWithContext")
15287		defer func() {
15288			sc := -1
15289			if iter.Response().Response.Response != nil {
15290				sc = iter.Response().Response.Response.StatusCode
15291			}
15292			tracing.EndSpan(ctx, sc, err)
15293		}()
15294	}
15295	iter.i++
15296	if iter.i < len(iter.page.Values()) {
15297		return nil
15298	}
15299	err = iter.page.NextWithContext(ctx)
15300	if err != nil {
15301		iter.i--
15302		return err
15303	}
15304	iter.i = 0
15305	return nil
15306}
15307
15308// Next advances to the next value.  If there was an error making
15309// the request the iterator does not advance and the error is returned.
15310// Deprecated: Use NextWithContext() instead.
15311func (iter *FirewallPolicyListResultIterator) Next() error {
15312	return iter.NextWithContext(context.Background())
15313}
15314
15315// NotDone returns true if the enumeration should be started or is not yet complete.
15316func (iter FirewallPolicyListResultIterator) NotDone() bool {
15317	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15318}
15319
15320// Response returns the raw server response from the last page request.
15321func (iter FirewallPolicyListResultIterator) Response() FirewallPolicyListResult {
15322	return iter.page.Response()
15323}
15324
15325// Value returns the current value or a zero-initialized value if the
15326// iterator has advanced beyond the end of the collection.
15327func (iter FirewallPolicyListResultIterator) Value() FirewallPolicy {
15328	if !iter.page.NotDone() {
15329		return FirewallPolicy{}
15330	}
15331	return iter.page.Values()[iter.i]
15332}
15333
15334// Creates a new instance of the FirewallPolicyListResultIterator type.
15335func NewFirewallPolicyListResultIterator(page FirewallPolicyListResultPage) FirewallPolicyListResultIterator {
15336	return FirewallPolicyListResultIterator{page: page}
15337}
15338
15339// IsEmpty returns true if the ListResult contains no values.
15340func (fplr FirewallPolicyListResult) IsEmpty() bool {
15341	return fplr.Value == nil || len(*fplr.Value) == 0
15342}
15343
15344// hasNextLink returns true if the NextLink is not empty.
15345func (fplr FirewallPolicyListResult) hasNextLink() bool {
15346	return fplr.NextLink != nil && len(*fplr.NextLink) != 0
15347}
15348
15349// firewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
15350// It returns nil if no more results exist.
15351func (fplr FirewallPolicyListResult) firewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
15352	if !fplr.hasNextLink() {
15353		return nil, nil
15354	}
15355	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15356		autorest.AsJSON(),
15357		autorest.AsGet(),
15358		autorest.WithBaseURL(to.String(fplr.NextLink)))
15359}
15360
15361// FirewallPolicyListResultPage contains a page of FirewallPolicy values.
15362type FirewallPolicyListResultPage struct {
15363	fn   func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)
15364	fplr FirewallPolicyListResult
15365}
15366
15367// NextWithContext advances to the next page of values.  If there was an error making
15368// the request the page does not advance and the error is returned.
15369func (page *FirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
15370	if tracing.IsEnabled() {
15371		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultPage.NextWithContext")
15372		defer func() {
15373			sc := -1
15374			if page.Response().Response.Response != nil {
15375				sc = page.Response().Response.Response.StatusCode
15376			}
15377			tracing.EndSpan(ctx, sc, err)
15378		}()
15379	}
15380	for {
15381		next, err := page.fn(ctx, page.fplr)
15382		if err != nil {
15383			return err
15384		}
15385		page.fplr = next
15386		if !next.hasNextLink() || !next.IsEmpty() {
15387			break
15388		}
15389	}
15390	return nil
15391}
15392
15393// Next advances to the next page of values.  If there was an error making
15394// the request the page does not advance and the error is returned.
15395// Deprecated: Use NextWithContext() instead.
15396func (page *FirewallPolicyListResultPage) Next() error {
15397	return page.NextWithContext(context.Background())
15398}
15399
15400// NotDone returns true if the page enumeration should be started or is not yet complete.
15401func (page FirewallPolicyListResultPage) NotDone() bool {
15402	return !page.fplr.IsEmpty()
15403}
15404
15405// Response returns the raw server response from the last page request.
15406func (page FirewallPolicyListResultPage) Response() FirewallPolicyListResult {
15407	return page.fplr
15408}
15409
15410// Values returns the slice of values for the current page or nil if there are no values.
15411func (page FirewallPolicyListResultPage) Values() []FirewallPolicy {
15412	if page.fplr.IsEmpty() {
15413		return nil
15414	}
15415	return *page.fplr.Value
15416}
15417
15418// Creates a new instance of the FirewallPolicyListResultPage type.
15419func NewFirewallPolicyListResultPage(cur FirewallPolicyListResult, getNextPage func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)) FirewallPolicyListResultPage {
15420	return FirewallPolicyListResultPage{
15421		fn:   getNextPage,
15422		fplr: cur,
15423	}
15424}
15425
15426// FirewallPolicyLogAnalyticsResources log Analytics Resources for Firewall Policy Insights.
15427type FirewallPolicyLogAnalyticsResources struct {
15428	// Workspaces - List of workspaces for Firewall Policy Insights.
15429	Workspaces *[]FirewallPolicyLogAnalyticsWorkspace `json:"workspaces,omitempty"`
15430	// DefaultWorkspaceID - The default workspace Id for Firewall Policy Insights.
15431	DefaultWorkspaceID *SubResource `json:"defaultWorkspaceId,omitempty"`
15432}
15433
15434// FirewallPolicyLogAnalyticsWorkspace log Analytics Workspace for Firewall Policy Insights.
15435type FirewallPolicyLogAnalyticsWorkspace struct {
15436	// Region - Region to configure the Workspace.
15437	Region *string `json:"region,omitempty"`
15438	// WorkspaceID - The workspace Id for Firewall Policy Insights.
15439	WorkspaceID *SubResource `json:"workspaceId,omitempty"`
15440}
15441
15442// FirewallPolicyNatRuleCollection firewall Policy NAT Rule Collection.
15443type FirewallPolicyNatRuleCollection struct {
15444	// Action - The action type of a Nat rule collection.
15445	Action *FirewallPolicyNatRuleCollectionAction `json:"action,omitempty"`
15446	// Rules - List of rules included in a rule collection.
15447	Rules *[]BasicFirewallPolicyRule `json:"rules,omitempty"`
15448	// Name - The name of the rule collection.
15449	Name *string `json:"name,omitempty"`
15450	// Priority - Priority of the Firewall Policy Rule Collection resource.
15451	Priority *int32 `json:"priority,omitempty"`
15452	// RuleCollectionType - Possible values include: 'RuleCollectionTypeFirewallPolicyRuleCollection', 'RuleCollectionTypeFirewallPolicyNatRuleCollection', 'RuleCollectionTypeFirewallPolicyFilterRuleCollection'
15453	RuleCollectionType RuleCollectionType `json:"ruleCollectionType,omitempty"`
15454}
15455
15456// MarshalJSON is the custom marshaler for FirewallPolicyNatRuleCollection.
15457func (fpnrc FirewallPolicyNatRuleCollection) MarshalJSON() ([]byte, error) {
15458	fpnrc.RuleCollectionType = RuleCollectionTypeFirewallPolicyNatRuleCollection
15459	objectMap := make(map[string]interface{})
15460	if fpnrc.Action != nil {
15461		objectMap["action"] = fpnrc.Action
15462	}
15463	if fpnrc.Rules != nil {
15464		objectMap["rules"] = fpnrc.Rules
15465	}
15466	if fpnrc.Name != nil {
15467		objectMap["name"] = fpnrc.Name
15468	}
15469	if fpnrc.Priority != nil {
15470		objectMap["priority"] = fpnrc.Priority
15471	}
15472	if fpnrc.RuleCollectionType != "" {
15473		objectMap["ruleCollectionType"] = fpnrc.RuleCollectionType
15474	}
15475	return json.Marshal(objectMap)
15476}
15477
15478// AsFirewallPolicyNatRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection.
15479func (fpnrc FirewallPolicyNatRuleCollection) AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool) {
15480	return &fpnrc, true
15481}
15482
15483// AsFirewallPolicyFilterRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection.
15484func (fpnrc FirewallPolicyNatRuleCollection) AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool) {
15485	return nil, false
15486}
15487
15488// AsFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection.
15489func (fpnrc FirewallPolicyNatRuleCollection) AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool) {
15490	return nil, false
15491}
15492
15493// AsBasicFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyNatRuleCollection.
15494func (fpnrc FirewallPolicyNatRuleCollection) AsBasicFirewallPolicyRuleCollection() (BasicFirewallPolicyRuleCollection, bool) {
15495	return &fpnrc, true
15496}
15497
15498// UnmarshalJSON is the custom unmarshaler for FirewallPolicyNatRuleCollection struct.
15499func (fpnrc *FirewallPolicyNatRuleCollection) UnmarshalJSON(body []byte) error {
15500	var m map[string]*json.RawMessage
15501	err := json.Unmarshal(body, &m)
15502	if err != nil {
15503		return err
15504	}
15505	for k, v := range m {
15506		switch k {
15507		case "action":
15508			if v != nil {
15509				var action FirewallPolicyNatRuleCollectionAction
15510				err = json.Unmarshal(*v, &action)
15511				if err != nil {
15512					return err
15513				}
15514				fpnrc.Action = &action
15515			}
15516		case "rules":
15517			if v != nil {
15518				rules, err := unmarshalBasicFirewallPolicyRuleArray(*v)
15519				if err != nil {
15520					return err
15521				}
15522				fpnrc.Rules = &rules
15523			}
15524		case "name":
15525			if v != nil {
15526				var name string
15527				err = json.Unmarshal(*v, &name)
15528				if err != nil {
15529					return err
15530				}
15531				fpnrc.Name = &name
15532			}
15533		case "priority":
15534			if v != nil {
15535				var priority int32
15536				err = json.Unmarshal(*v, &priority)
15537				if err != nil {
15538					return err
15539				}
15540				fpnrc.Priority = &priority
15541			}
15542		case "ruleCollectionType":
15543			if v != nil {
15544				var ruleCollectionType RuleCollectionType
15545				err = json.Unmarshal(*v, &ruleCollectionType)
15546				if err != nil {
15547					return err
15548				}
15549				fpnrc.RuleCollectionType = ruleCollectionType
15550			}
15551		}
15552	}
15553
15554	return nil
15555}
15556
15557// FirewallPolicyNatRuleCollectionAction properties of the FirewallPolicyNatRuleCollectionAction.
15558type FirewallPolicyNatRuleCollectionAction struct {
15559	// Type - The type of action. Possible values include: 'DNAT'
15560	Type FirewallPolicyNatRuleCollectionActionType `json:"type,omitempty"`
15561}
15562
15563// FirewallPolicyPropertiesFormat firewall Policy definition.
15564type FirewallPolicyPropertiesFormat struct {
15565	// RuleCollectionGroups - READ-ONLY; List of references to FirewallPolicyRuleCollectionGroups.
15566	RuleCollectionGroups *[]SubResource `json:"ruleCollectionGroups,omitempty"`
15567	// ProvisioningState - READ-ONLY; The provisioning state of the firewall policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
15568	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15569	// BasePolicy - The parent firewall policy from which rules are inherited.
15570	BasePolicy *SubResource `json:"basePolicy,omitempty"`
15571	// Firewalls - READ-ONLY; List of references to Azure Firewalls that this Firewall Policy is associated with.
15572	Firewalls *[]SubResource `json:"firewalls,omitempty"`
15573	// ChildPolicies - READ-ONLY; List of references to Child Firewall Policies.
15574	ChildPolicies *[]SubResource `json:"childPolicies,omitempty"`
15575	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
15576	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
15577	// ThreatIntelWhitelist - ThreatIntel Whitelist for Firewall Policy.
15578	ThreatIntelWhitelist *FirewallPolicyThreatIntelWhitelist `json:"threatIntelWhitelist,omitempty"`
15579	// Insights - Insights on Firewall Policy.
15580	Insights *FirewallPolicyInsights `json:"insights,omitempty"`
15581	// Snat - The private IP addresses/IP ranges to which traffic will not be SNAT.
15582	Snat *FirewallPolicySNAT `json:"snat,omitempty"`
15583	// DNSSettings - DNS Proxy Settings definition.
15584	DNSSettings *DNSSettings `json:"dnsSettings,omitempty"`
15585	// IntrusionDetection - The configuration for Intrusion detection.
15586	IntrusionDetection *FirewallPolicyIntrusionDetection `json:"intrusionDetection,omitempty"`
15587	// TransportSecurity - TLS Configuration definition.
15588	TransportSecurity *FirewallPolicyTransportSecurity `json:"transportSecurity,omitempty"`
15589	// Sku - The Firewall Policy SKU.
15590	Sku *FirewallPolicySku `json:"sku,omitempty"`
15591}
15592
15593// MarshalJSON is the custom marshaler for FirewallPolicyPropertiesFormat.
15594func (fppf FirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
15595	objectMap := make(map[string]interface{})
15596	if fppf.BasePolicy != nil {
15597		objectMap["basePolicy"] = fppf.BasePolicy
15598	}
15599	if fppf.ThreatIntelMode != "" {
15600		objectMap["threatIntelMode"] = fppf.ThreatIntelMode
15601	}
15602	if fppf.ThreatIntelWhitelist != nil {
15603		objectMap["threatIntelWhitelist"] = fppf.ThreatIntelWhitelist
15604	}
15605	if fppf.Insights != nil {
15606		objectMap["insights"] = fppf.Insights
15607	}
15608	if fppf.Snat != nil {
15609		objectMap["snat"] = fppf.Snat
15610	}
15611	if fppf.DNSSettings != nil {
15612		objectMap["dnsSettings"] = fppf.DNSSettings
15613	}
15614	if fppf.IntrusionDetection != nil {
15615		objectMap["intrusionDetection"] = fppf.IntrusionDetection
15616	}
15617	if fppf.TransportSecurity != nil {
15618		objectMap["transportSecurity"] = fppf.TransportSecurity
15619	}
15620	if fppf.Sku != nil {
15621		objectMap["sku"] = fppf.Sku
15622	}
15623	return json.Marshal(objectMap)
15624}
15625
15626// BasicFirewallPolicyRule properties of a rule.
15627type BasicFirewallPolicyRule interface {
15628	AsApplicationRule() (*ApplicationRule, bool)
15629	AsNatRule() (*NatRule, bool)
15630	AsRule() (*Rule, bool)
15631	AsFirewallPolicyRule() (*FirewallPolicyRule, bool)
15632}
15633
15634// FirewallPolicyRule properties of a rule.
15635type FirewallPolicyRule struct {
15636	// Name - Name of the rule.
15637	Name *string `json:"name,omitempty"`
15638	// Description - Description of the rule.
15639	Description *string `json:"description,omitempty"`
15640	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule'
15641	RuleType RuleType `json:"ruleType,omitempty"`
15642}
15643
15644func unmarshalBasicFirewallPolicyRule(body []byte) (BasicFirewallPolicyRule, error) {
15645	var m map[string]interface{}
15646	err := json.Unmarshal(body, &m)
15647	if err != nil {
15648		return nil, err
15649	}
15650
15651	switch m["ruleType"] {
15652	case string(RuleTypeApplicationRule):
15653		var ar ApplicationRule
15654		err := json.Unmarshal(body, &ar)
15655		return ar, err
15656	case string(RuleTypeNatRule):
15657		var nr NatRule
15658		err := json.Unmarshal(body, &nr)
15659		return nr, err
15660	case string(RuleTypeNetworkRule):
15661		var r Rule
15662		err := json.Unmarshal(body, &r)
15663		return r, err
15664	default:
15665		var fpr FirewallPolicyRule
15666		err := json.Unmarshal(body, &fpr)
15667		return fpr, err
15668	}
15669}
15670func unmarshalBasicFirewallPolicyRuleArray(body []byte) ([]BasicFirewallPolicyRule, error) {
15671	var rawMessages []*json.RawMessage
15672	err := json.Unmarshal(body, &rawMessages)
15673	if err != nil {
15674		return nil, err
15675	}
15676
15677	fprArray := make([]BasicFirewallPolicyRule, len(rawMessages))
15678
15679	for index, rawMessage := range rawMessages {
15680		fpr, err := unmarshalBasicFirewallPolicyRule(*rawMessage)
15681		if err != nil {
15682			return nil, err
15683		}
15684		fprArray[index] = fpr
15685	}
15686	return fprArray, nil
15687}
15688
15689// MarshalJSON is the custom marshaler for FirewallPolicyRule.
15690func (fpr FirewallPolicyRule) MarshalJSON() ([]byte, error) {
15691	fpr.RuleType = RuleTypeFirewallPolicyRule
15692	objectMap := make(map[string]interface{})
15693	if fpr.Name != nil {
15694		objectMap["name"] = fpr.Name
15695	}
15696	if fpr.Description != nil {
15697		objectMap["description"] = fpr.Description
15698	}
15699	if fpr.RuleType != "" {
15700		objectMap["ruleType"] = fpr.RuleType
15701	}
15702	return json.Marshal(objectMap)
15703}
15704
15705// AsApplicationRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
15706func (fpr FirewallPolicyRule) AsApplicationRule() (*ApplicationRule, bool) {
15707	return nil, false
15708}
15709
15710// AsNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
15711func (fpr FirewallPolicyRule) AsNatRule() (*NatRule, bool) {
15712	return nil, false
15713}
15714
15715// AsRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
15716func (fpr FirewallPolicyRule) AsRule() (*Rule, bool) {
15717	return nil, false
15718}
15719
15720// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
15721func (fpr FirewallPolicyRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
15722	return &fpr, true
15723}
15724
15725// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
15726func (fpr FirewallPolicyRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
15727	return &fpr, true
15728}
15729
15730// FirewallPolicyRuleApplicationProtocol properties of the application rule protocol.
15731type FirewallPolicyRuleApplicationProtocol struct {
15732	// ProtocolType - Protocol type. Possible values include: 'FirewallPolicyRuleApplicationProtocolTypeHTTP', 'FirewallPolicyRuleApplicationProtocolTypeHTTPS'
15733	ProtocolType FirewallPolicyRuleApplicationProtocolType `json:"protocolType,omitempty"`
15734	// Port - Port number for the protocol, cannot be greater than 64000.
15735	Port *int32 `json:"port,omitempty"`
15736}
15737
15738// BasicFirewallPolicyRuleCollection properties of the rule collection.
15739type BasicFirewallPolicyRuleCollection interface {
15740	AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool)
15741	AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool)
15742	AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool)
15743}
15744
15745// FirewallPolicyRuleCollection properties of the rule collection.
15746type FirewallPolicyRuleCollection struct {
15747	// Name - The name of the rule collection.
15748	Name *string `json:"name,omitempty"`
15749	// Priority - Priority of the Firewall Policy Rule Collection resource.
15750	Priority *int32 `json:"priority,omitempty"`
15751	// RuleCollectionType - Possible values include: 'RuleCollectionTypeFirewallPolicyRuleCollection', 'RuleCollectionTypeFirewallPolicyNatRuleCollection', 'RuleCollectionTypeFirewallPolicyFilterRuleCollection'
15752	RuleCollectionType RuleCollectionType `json:"ruleCollectionType,omitempty"`
15753}
15754
15755func unmarshalBasicFirewallPolicyRuleCollection(body []byte) (BasicFirewallPolicyRuleCollection, error) {
15756	var m map[string]interface{}
15757	err := json.Unmarshal(body, &m)
15758	if err != nil {
15759		return nil, err
15760	}
15761
15762	switch m["ruleCollectionType"] {
15763	case string(RuleCollectionTypeFirewallPolicyNatRuleCollection):
15764		var fpnrc FirewallPolicyNatRuleCollection
15765		err := json.Unmarshal(body, &fpnrc)
15766		return fpnrc, err
15767	case string(RuleCollectionTypeFirewallPolicyFilterRuleCollection):
15768		var fpfrc FirewallPolicyFilterRuleCollection
15769		err := json.Unmarshal(body, &fpfrc)
15770		return fpfrc, err
15771	default:
15772		var fprc FirewallPolicyRuleCollection
15773		err := json.Unmarshal(body, &fprc)
15774		return fprc, err
15775	}
15776}
15777func unmarshalBasicFirewallPolicyRuleCollectionArray(body []byte) ([]BasicFirewallPolicyRuleCollection, error) {
15778	var rawMessages []*json.RawMessage
15779	err := json.Unmarshal(body, &rawMessages)
15780	if err != nil {
15781		return nil, err
15782	}
15783
15784	fprcArray := make([]BasicFirewallPolicyRuleCollection, len(rawMessages))
15785
15786	for index, rawMessage := range rawMessages {
15787		fprc, err := unmarshalBasicFirewallPolicyRuleCollection(*rawMessage)
15788		if err != nil {
15789			return nil, err
15790		}
15791		fprcArray[index] = fprc
15792	}
15793	return fprcArray, nil
15794}
15795
15796// MarshalJSON is the custom marshaler for FirewallPolicyRuleCollection.
15797func (fprc FirewallPolicyRuleCollection) MarshalJSON() ([]byte, error) {
15798	fprc.RuleCollectionType = RuleCollectionTypeFirewallPolicyRuleCollection
15799	objectMap := make(map[string]interface{})
15800	if fprc.Name != nil {
15801		objectMap["name"] = fprc.Name
15802	}
15803	if fprc.Priority != nil {
15804		objectMap["priority"] = fprc.Priority
15805	}
15806	if fprc.RuleCollectionType != "" {
15807		objectMap["ruleCollectionType"] = fprc.RuleCollectionType
15808	}
15809	return json.Marshal(objectMap)
15810}
15811
15812// AsFirewallPolicyNatRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection.
15813func (fprc FirewallPolicyRuleCollection) AsFirewallPolicyNatRuleCollection() (*FirewallPolicyNatRuleCollection, bool) {
15814	return nil, false
15815}
15816
15817// AsFirewallPolicyFilterRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection.
15818func (fprc FirewallPolicyRuleCollection) AsFirewallPolicyFilterRuleCollection() (*FirewallPolicyFilterRuleCollection, bool) {
15819	return nil, false
15820}
15821
15822// AsFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection.
15823func (fprc FirewallPolicyRuleCollection) AsFirewallPolicyRuleCollection() (*FirewallPolicyRuleCollection, bool) {
15824	return &fprc, true
15825}
15826
15827// AsBasicFirewallPolicyRuleCollection is the BasicFirewallPolicyRuleCollection implementation for FirewallPolicyRuleCollection.
15828func (fprc FirewallPolicyRuleCollection) AsBasicFirewallPolicyRuleCollection() (BasicFirewallPolicyRuleCollection, bool) {
15829	return &fprc, true
15830}
15831
15832// FirewallPolicyRuleCollectionGroup rule Collection Group resource.
15833type FirewallPolicyRuleCollectionGroup struct {
15834	autorest.Response `json:"-"`
15835	// FirewallPolicyRuleCollectionGroupProperties - The properties of the firewall policy rule collection group.
15836	*FirewallPolicyRuleCollectionGroupProperties `json:"properties,omitempty"`
15837	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15838	Name *string `json:"name,omitempty"`
15839	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15840	Etag *string `json:"etag,omitempty"`
15841	// Type - READ-ONLY; Rule Group type.
15842	Type *string `json:"type,omitempty"`
15843	// ID - Resource ID.
15844	ID *string `json:"id,omitempty"`
15845}
15846
15847// MarshalJSON is the custom marshaler for FirewallPolicyRuleCollectionGroup.
15848func (fprcg FirewallPolicyRuleCollectionGroup) MarshalJSON() ([]byte, error) {
15849	objectMap := make(map[string]interface{})
15850	if fprcg.FirewallPolicyRuleCollectionGroupProperties != nil {
15851		objectMap["properties"] = fprcg.FirewallPolicyRuleCollectionGroupProperties
15852	}
15853	if fprcg.Name != nil {
15854		objectMap["name"] = fprcg.Name
15855	}
15856	if fprcg.ID != nil {
15857		objectMap["id"] = fprcg.ID
15858	}
15859	return json.Marshal(objectMap)
15860}
15861
15862// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleCollectionGroup struct.
15863func (fprcg *FirewallPolicyRuleCollectionGroup) UnmarshalJSON(body []byte) error {
15864	var m map[string]*json.RawMessage
15865	err := json.Unmarshal(body, &m)
15866	if err != nil {
15867		return err
15868	}
15869	for k, v := range m {
15870		switch k {
15871		case "properties":
15872			if v != nil {
15873				var firewallPolicyRuleCollectionGroupProperties FirewallPolicyRuleCollectionGroupProperties
15874				err = json.Unmarshal(*v, &firewallPolicyRuleCollectionGroupProperties)
15875				if err != nil {
15876					return err
15877				}
15878				fprcg.FirewallPolicyRuleCollectionGroupProperties = &firewallPolicyRuleCollectionGroupProperties
15879			}
15880		case "name":
15881			if v != nil {
15882				var name string
15883				err = json.Unmarshal(*v, &name)
15884				if err != nil {
15885					return err
15886				}
15887				fprcg.Name = &name
15888			}
15889		case "etag":
15890			if v != nil {
15891				var etag string
15892				err = json.Unmarshal(*v, &etag)
15893				if err != nil {
15894					return err
15895				}
15896				fprcg.Etag = &etag
15897			}
15898		case "type":
15899			if v != nil {
15900				var typeVar string
15901				err = json.Unmarshal(*v, &typeVar)
15902				if err != nil {
15903					return err
15904				}
15905				fprcg.Type = &typeVar
15906			}
15907		case "id":
15908			if v != nil {
15909				var ID string
15910				err = json.Unmarshal(*v, &ID)
15911				if err != nil {
15912					return err
15913				}
15914				fprcg.ID = &ID
15915			}
15916		}
15917	}
15918
15919	return nil
15920}
15921
15922// FirewallPolicyRuleCollectionGroupListResult response for ListFirewallPolicyRuleCollectionGroups API
15923// service call.
15924type FirewallPolicyRuleCollectionGroupListResult struct {
15925	autorest.Response `json:"-"`
15926	// Value - List of FirewallPolicyRuleCollectionGroups in a FirewallPolicy.
15927	Value *[]FirewallPolicyRuleCollectionGroup `json:"value,omitempty"`
15928	// NextLink - URL to get the next set of results.
15929	NextLink *string `json:"nextLink,omitempty"`
15930}
15931
15932// FirewallPolicyRuleCollectionGroupListResultIterator provides access to a complete listing of
15933// FirewallPolicyRuleCollectionGroup values.
15934type FirewallPolicyRuleCollectionGroupListResultIterator struct {
15935	i    int
15936	page FirewallPolicyRuleCollectionGroupListResultPage
15937}
15938
15939// NextWithContext advances to the next value.  If there was an error making
15940// the request the iterator does not advance and the error is returned.
15941func (iter *FirewallPolicyRuleCollectionGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
15942	if tracing.IsEnabled() {
15943		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleCollectionGroupListResultIterator.NextWithContext")
15944		defer func() {
15945			sc := -1
15946			if iter.Response().Response.Response != nil {
15947				sc = iter.Response().Response.Response.StatusCode
15948			}
15949			tracing.EndSpan(ctx, sc, err)
15950		}()
15951	}
15952	iter.i++
15953	if iter.i < len(iter.page.Values()) {
15954		return nil
15955	}
15956	err = iter.page.NextWithContext(ctx)
15957	if err != nil {
15958		iter.i--
15959		return err
15960	}
15961	iter.i = 0
15962	return nil
15963}
15964
15965// Next advances to the next value.  If there was an error making
15966// the request the iterator does not advance and the error is returned.
15967// Deprecated: Use NextWithContext() instead.
15968func (iter *FirewallPolicyRuleCollectionGroupListResultIterator) Next() error {
15969	return iter.NextWithContext(context.Background())
15970}
15971
15972// NotDone returns true if the enumeration should be started or is not yet complete.
15973func (iter FirewallPolicyRuleCollectionGroupListResultIterator) NotDone() bool {
15974	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15975}
15976
15977// Response returns the raw server response from the last page request.
15978func (iter FirewallPolicyRuleCollectionGroupListResultIterator) Response() FirewallPolicyRuleCollectionGroupListResult {
15979	return iter.page.Response()
15980}
15981
15982// Value returns the current value or a zero-initialized value if the
15983// iterator has advanced beyond the end of the collection.
15984func (iter FirewallPolicyRuleCollectionGroupListResultIterator) Value() FirewallPolicyRuleCollectionGroup {
15985	if !iter.page.NotDone() {
15986		return FirewallPolicyRuleCollectionGroup{}
15987	}
15988	return iter.page.Values()[iter.i]
15989}
15990
15991// Creates a new instance of the FirewallPolicyRuleCollectionGroupListResultIterator type.
15992func NewFirewallPolicyRuleCollectionGroupListResultIterator(page FirewallPolicyRuleCollectionGroupListResultPage) FirewallPolicyRuleCollectionGroupListResultIterator {
15993	return FirewallPolicyRuleCollectionGroupListResultIterator{page: page}
15994}
15995
15996// IsEmpty returns true if the ListResult contains no values.
15997func (fprcglr FirewallPolicyRuleCollectionGroupListResult) IsEmpty() bool {
15998	return fprcglr.Value == nil || len(*fprcglr.Value) == 0
15999}
16000
16001// hasNextLink returns true if the NextLink is not empty.
16002func (fprcglr FirewallPolicyRuleCollectionGroupListResult) hasNextLink() bool {
16003	return fprcglr.NextLink != nil && len(*fprcglr.NextLink) != 0
16004}
16005
16006// firewallPolicyRuleCollectionGroupListResultPreparer prepares a request to retrieve the next set of results.
16007// It returns nil if no more results exist.
16008func (fprcglr FirewallPolicyRuleCollectionGroupListResult) firewallPolicyRuleCollectionGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
16009	if !fprcglr.hasNextLink() {
16010		return nil, nil
16011	}
16012	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16013		autorest.AsJSON(),
16014		autorest.AsGet(),
16015		autorest.WithBaseURL(to.String(fprcglr.NextLink)))
16016}
16017
16018// FirewallPolicyRuleCollectionGroupListResultPage contains a page of FirewallPolicyRuleCollectionGroup
16019// values.
16020type FirewallPolicyRuleCollectionGroupListResultPage struct {
16021	fn      func(context.Context, FirewallPolicyRuleCollectionGroupListResult) (FirewallPolicyRuleCollectionGroupListResult, error)
16022	fprcglr FirewallPolicyRuleCollectionGroupListResult
16023}
16024
16025// NextWithContext advances to the next page of values.  If there was an error making
16026// the request the page does not advance and the error is returned.
16027func (page *FirewallPolicyRuleCollectionGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
16028	if tracing.IsEnabled() {
16029		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleCollectionGroupListResultPage.NextWithContext")
16030		defer func() {
16031			sc := -1
16032			if page.Response().Response.Response != nil {
16033				sc = page.Response().Response.Response.StatusCode
16034			}
16035			tracing.EndSpan(ctx, sc, err)
16036		}()
16037	}
16038	for {
16039		next, err := page.fn(ctx, page.fprcglr)
16040		if err != nil {
16041			return err
16042		}
16043		page.fprcglr = next
16044		if !next.hasNextLink() || !next.IsEmpty() {
16045			break
16046		}
16047	}
16048	return nil
16049}
16050
16051// Next advances to the next page of values.  If there was an error making
16052// the request the page does not advance and the error is returned.
16053// Deprecated: Use NextWithContext() instead.
16054func (page *FirewallPolicyRuleCollectionGroupListResultPage) Next() error {
16055	return page.NextWithContext(context.Background())
16056}
16057
16058// NotDone returns true if the page enumeration should be started or is not yet complete.
16059func (page FirewallPolicyRuleCollectionGroupListResultPage) NotDone() bool {
16060	return !page.fprcglr.IsEmpty()
16061}
16062
16063// Response returns the raw server response from the last page request.
16064func (page FirewallPolicyRuleCollectionGroupListResultPage) Response() FirewallPolicyRuleCollectionGroupListResult {
16065	return page.fprcglr
16066}
16067
16068// Values returns the slice of values for the current page or nil if there are no values.
16069func (page FirewallPolicyRuleCollectionGroupListResultPage) Values() []FirewallPolicyRuleCollectionGroup {
16070	if page.fprcglr.IsEmpty() {
16071		return nil
16072	}
16073	return *page.fprcglr.Value
16074}
16075
16076// Creates a new instance of the FirewallPolicyRuleCollectionGroupListResultPage type.
16077func NewFirewallPolicyRuleCollectionGroupListResultPage(cur FirewallPolicyRuleCollectionGroupListResult, getNextPage func(context.Context, FirewallPolicyRuleCollectionGroupListResult) (FirewallPolicyRuleCollectionGroupListResult, error)) FirewallPolicyRuleCollectionGroupListResultPage {
16078	return FirewallPolicyRuleCollectionGroupListResultPage{
16079		fn:      getNextPage,
16080		fprcglr: cur,
16081	}
16082}
16083
16084// FirewallPolicyRuleCollectionGroupProperties properties of the rule collection group.
16085type FirewallPolicyRuleCollectionGroupProperties struct {
16086	// Priority - Priority of the Firewall Policy Rule Collection Group resource.
16087	Priority *int32 `json:"priority,omitempty"`
16088	// RuleCollections - Group of Firewall Policy rule collections.
16089	RuleCollections *[]BasicFirewallPolicyRuleCollection `json:"ruleCollections,omitempty"`
16090	// ProvisioningState - READ-ONLY; The provisioning state of the firewall policy rule collection group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
16091	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16092}
16093
16094// MarshalJSON is the custom marshaler for FirewallPolicyRuleCollectionGroupProperties.
16095func (fprcgp FirewallPolicyRuleCollectionGroupProperties) MarshalJSON() ([]byte, error) {
16096	objectMap := make(map[string]interface{})
16097	if fprcgp.Priority != nil {
16098		objectMap["priority"] = fprcgp.Priority
16099	}
16100	if fprcgp.RuleCollections != nil {
16101		objectMap["ruleCollections"] = fprcgp.RuleCollections
16102	}
16103	return json.Marshal(objectMap)
16104}
16105
16106// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleCollectionGroupProperties struct.
16107func (fprcgp *FirewallPolicyRuleCollectionGroupProperties) UnmarshalJSON(body []byte) error {
16108	var m map[string]*json.RawMessage
16109	err := json.Unmarshal(body, &m)
16110	if err != nil {
16111		return err
16112	}
16113	for k, v := range m {
16114		switch k {
16115		case "priority":
16116			if v != nil {
16117				var priority int32
16118				err = json.Unmarshal(*v, &priority)
16119				if err != nil {
16120					return err
16121				}
16122				fprcgp.Priority = &priority
16123			}
16124		case "ruleCollections":
16125			if v != nil {
16126				ruleCollections, err := unmarshalBasicFirewallPolicyRuleCollectionArray(*v)
16127				if err != nil {
16128					return err
16129				}
16130				fprcgp.RuleCollections = &ruleCollections
16131			}
16132		case "provisioningState":
16133			if v != nil {
16134				var provisioningState ProvisioningState
16135				err = json.Unmarshal(*v, &provisioningState)
16136				if err != nil {
16137					return err
16138				}
16139				fprcgp.ProvisioningState = provisioningState
16140			}
16141		}
16142	}
16143
16144	return nil
16145}
16146
16147// FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
16148// results of a long-running operation.
16149type FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture struct {
16150	azure.FutureAPI
16151	// Result returns the result of the asynchronous operation.
16152	// If the operation has not completed it will return an error.
16153	Result func(FirewallPolicyRuleCollectionGroupsClient) (FirewallPolicyRuleCollectionGroup, error)
16154}
16155
16156// FirewallPolicyRuleCollectionGroupsDeleteFuture an abstraction for monitoring and retrieving the results
16157// of a long-running operation.
16158type FirewallPolicyRuleCollectionGroupsDeleteFuture struct {
16159	azure.FutureAPI
16160	// Result returns the result of the asynchronous operation.
16161	// If the operation has not completed it will return an error.
16162	Result func(FirewallPolicyRuleCollectionGroupsClient) (autorest.Response, error)
16163}
16164
16165// FirewallPolicySku SKU of Firewall policy.
16166type FirewallPolicySku struct {
16167	// Tier - Tier of Firewall Policy. Possible values include: 'FirewallPolicySkuTierStandard', 'FirewallPolicySkuTierPremium'
16168	Tier FirewallPolicySkuTier `json:"tier,omitempty"`
16169}
16170
16171// FirewallPolicySNAT the private IP addresses/IP ranges to which traffic will not be SNAT.
16172type FirewallPolicySNAT struct {
16173	// PrivateRanges - List of private IP addresses/IP address ranges to not be SNAT.
16174	PrivateRanges *[]string `json:"privateRanges,omitempty"`
16175}
16176
16177// FirewallPolicyThreatIntelWhitelist threatIntel Whitelist for Firewall Policy.
16178type FirewallPolicyThreatIntelWhitelist struct {
16179	// IPAddresses - List of IP addresses for the ThreatIntel Whitelist.
16180	IPAddresses *[]string `json:"ipAddresses,omitempty"`
16181	// Fqdns - List of FQDNs for the ThreatIntel Whitelist.
16182	Fqdns *[]string `json:"fqdns,omitempty"`
16183}
16184
16185// FirewallPolicyTransportSecurity configuration needed to perform TLS termination & initiation.
16186type FirewallPolicyTransportSecurity struct {
16187	// CertificateAuthority - The CA used for intermediate CA generation.
16188	CertificateAuthority *FirewallPolicyCertificateAuthority `json:"certificateAuthority,omitempty"`
16189}
16190
16191// FlowLog a flow log resource.
16192type FlowLog struct {
16193	autorest.Response `json:"-"`
16194	// FlowLogPropertiesFormat - Properties of the flow log.
16195	*FlowLogPropertiesFormat `json:"properties,omitempty"`
16196	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
16197	Etag *string `json:"etag,omitempty"`
16198	// ID - Resource ID.
16199	ID *string `json:"id,omitempty"`
16200	// Name - READ-ONLY; Resource name.
16201	Name *string `json:"name,omitempty"`
16202	// Type - READ-ONLY; Resource type.
16203	Type *string `json:"type,omitempty"`
16204	// Location - Resource location.
16205	Location *string `json:"location,omitempty"`
16206	// Tags - Resource tags.
16207	Tags map[string]*string `json:"tags"`
16208}
16209
16210// MarshalJSON is the custom marshaler for FlowLog.
16211func (fl FlowLog) MarshalJSON() ([]byte, error) {
16212	objectMap := make(map[string]interface{})
16213	if fl.FlowLogPropertiesFormat != nil {
16214		objectMap["properties"] = fl.FlowLogPropertiesFormat
16215	}
16216	if fl.ID != nil {
16217		objectMap["id"] = fl.ID
16218	}
16219	if fl.Location != nil {
16220		objectMap["location"] = fl.Location
16221	}
16222	if fl.Tags != nil {
16223		objectMap["tags"] = fl.Tags
16224	}
16225	return json.Marshal(objectMap)
16226}
16227
16228// UnmarshalJSON is the custom unmarshaler for FlowLog struct.
16229func (fl *FlowLog) UnmarshalJSON(body []byte) error {
16230	var m map[string]*json.RawMessage
16231	err := json.Unmarshal(body, &m)
16232	if err != nil {
16233		return err
16234	}
16235	for k, v := range m {
16236		switch k {
16237		case "properties":
16238			if v != nil {
16239				var flowLogPropertiesFormat FlowLogPropertiesFormat
16240				err = json.Unmarshal(*v, &flowLogPropertiesFormat)
16241				if err != nil {
16242					return err
16243				}
16244				fl.FlowLogPropertiesFormat = &flowLogPropertiesFormat
16245			}
16246		case "etag":
16247			if v != nil {
16248				var etag string
16249				err = json.Unmarshal(*v, &etag)
16250				if err != nil {
16251					return err
16252				}
16253				fl.Etag = &etag
16254			}
16255		case "id":
16256			if v != nil {
16257				var ID string
16258				err = json.Unmarshal(*v, &ID)
16259				if err != nil {
16260					return err
16261				}
16262				fl.ID = &ID
16263			}
16264		case "name":
16265			if v != nil {
16266				var name string
16267				err = json.Unmarshal(*v, &name)
16268				if err != nil {
16269					return err
16270				}
16271				fl.Name = &name
16272			}
16273		case "type":
16274			if v != nil {
16275				var typeVar string
16276				err = json.Unmarshal(*v, &typeVar)
16277				if err != nil {
16278					return err
16279				}
16280				fl.Type = &typeVar
16281			}
16282		case "location":
16283			if v != nil {
16284				var location string
16285				err = json.Unmarshal(*v, &location)
16286				if err != nil {
16287					return err
16288				}
16289				fl.Location = &location
16290			}
16291		case "tags":
16292			if v != nil {
16293				var tags map[string]*string
16294				err = json.Unmarshal(*v, &tags)
16295				if err != nil {
16296					return err
16297				}
16298				fl.Tags = tags
16299			}
16300		}
16301	}
16302
16303	return nil
16304}
16305
16306// FlowLogFormatParameters parameters that define the flow log format.
16307type FlowLogFormatParameters struct {
16308	// Type - The file type of flow log. Possible values include: 'JSON'
16309	Type FlowLogFormatType `json:"type,omitempty"`
16310	// Version - The version (revision) of the flow log.
16311	Version *int32 `json:"version,omitempty"`
16312}
16313
16314// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
16315type FlowLogInformation struct {
16316	autorest.Response `json:"-"`
16317	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
16318	TargetResourceID *string `json:"targetResourceId,omitempty"`
16319	// FlowLogProperties - Properties of the flow log.
16320	*FlowLogProperties `json:"properties,omitempty"`
16321	// FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
16322	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
16323}
16324
16325// MarshalJSON is the custom marshaler for FlowLogInformation.
16326func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
16327	objectMap := make(map[string]interface{})
16328	if fli.TargetResourceID != nil {
16329		objectMap["targetResourceId"] = fli.TargetResourceID
16330	}
16331	if fli.FlowLogProperties != nil {
16332		objectMap["properties"] = fli.FlowLogProperties
16333	}
16334	if fli.FlowAnalyticsConfiguration != nil {
16335		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
16336	}
16337	return json.Marshal(objectMap)
16338}
16339
16340// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
16341func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
16342	var m map[string]*json.RawMessage
16343	err := json.Unmarshal(body, &m)
16344	if err != nil {
16345		return err
16346	}
16347	for k, v := range m {
16348		switch k {
16349		case "targetResourceId":
16350			if v != nil {
16351				var targetResourceID string
16352				err = json.Unmarshal(*v, &targetResourceID)
16353				if err != nil {
16354					return err
16355				}
16356				fli.TargetResourceID = &targetResourceID
16357			}
16358		case "properties":
16359			if v != nil {
16360				var flowLogProperties FlowLogProperties
16361				err = json.Unmarshal(*v, &flowLogProperties)
16362				if err != nil {
16363					return err
16364				}
16365				fli.FlowLogProperties = &flowLogProperties
16366			}
16367		case "flowAnalyticsConfiguration":
16368			if v != nil {
16369				var flowAnalyticsConfiguration TrafficAnalyticsProperties
16370				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
16371				if err != nil {
16372					return err
16373				}
16374				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
16375			}
16376		}
16377	}
16378
16379	return nil
16380}
16381
16382// FlowLogListResult list of flow logs.
16383type FlowLogListResult struct {
16384	autorest.Response `json:"-"`
16385	// Value - Information about flow log resource.
16386	Value *[]FlowLog `json:"value,omitempty"`
16387	// NextLink - READ-ONLY; The URL to get the next set of results.
16388	NextLink *string `json:"nextLink,omitempty"`
16389}
16390
16391// MarshalJSON is the custom marshaler for FlowLogListResult.
16392func (fllr FlowLogListResult) MarshalJSON() ([]byte, error) {
16393	objectMap := make(map[string]interface{})
16394	if fllr.Value != nil {
16395		objectMap["value"] = fllr.Value
16396	}
16397	return json.Marshal(objectMap)
16398}
16399
16400// FlowLogListResultIterator provides access to a complete listing of FlowLog values.
16401type FlowLogListResultIterator struct {
16402	i    int
16403	page FlowLogListResultPage
16404}
16405
16406// NextWithContext advances to the next value.  If there was an error making
16407// the request the iterator does not advance and the error is returned.
16408func (iter *FlowLogListResultIterator) NextWithContext(ctx context.Context) (err error) {
16409	if tracing.IsEnabled() {
16410		ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogListResultIterator.NextWithContext")
16411		defer func() {
16412			sc := -1
16413			if iter.Response().Response.Response != nil {
16414				sc = iter.Response().Response.Response.StatusCode
16415			}
16416			tracing.EndSpan(ctx, sc, err)
16417		}()
16418	}
16419	iter.i++
16420	if iter.i < len(iter.page.Values()) {
16421		return nil
16422	}
16423	err = iter.page.NextWithContext(ctx)
16424	if err != nil {
16425		iter.i--
16426		return err
16427	}
16428	iter.i = 0
16429	return nil
16430}
16431
16432// Next advances to the next value.  If there was an error making
16433// the request the iterator does not advance and the error is returned.
16434// Deprecated: Use NextWithContext() instead.
16435func (iter *FlowLogListResultIterator) Next() error {
16436	return iter.NextWithContext(context.Background())
16437}
16438
16439// NotDone returns true if the enumeration should be started or is not yet complete.
16440func (iter FlowLogListResultIterator) NotDone() bool {
16441	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16442}
16443
16444// Response returns the raw server response from the last page request.
16445func (iter FlowLogListResultIterator) Response() FlowLogListResult {
16446	return iter.page.Response()
16447}
16448
16449// Value returns the current value or a zero-initialized value if the
16450// iterator has advanced beyond the end of the collection.
16451func (iter FlowLogListResultIterator) Value() FlowLog {
16452	if !iter.page.NotDone() {
16453		return FlowLog{}
16454	}
16455	return iter.page.Values()[iter.i]
16456}
16457
16458// Creates a new instance of the FlowLogListResultIterator type.
16459func NewFlowLogListResultIterator(page FlowLogListResultPage) FlowLogListResultIterator {
16460	return FlowLogListResultIterator{page: page}
16461}
16462
16463// IsEmpty returns true if the ListResult contains no values.
16464func (fllr FlowLogListResult) IsEmpty() bool {
16465	return fllr.Value == nil || len(*fllr.Value) == 0
16466}
16467
16468// hasNextLink returns true if the NextLink is not empty.
16469func (fllr FlowLogListResult) hasNextLink() bool {
16470	return fllr.NextLink != nil && len(*fllr.NextLink) != 0
16471}
16472
16473// flowLogListResultPreparer prepares a request to retrieve the next set of results.
16474// It returns nil if no more results exist.
16475func (fllr FlowLogListResult) flowLogListResultPreparer(ctx context.Context) (*http.Request, error) {
16476	if !fllr.hasNextLink() {
16477		return nil, nil
16478	}
16479	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16480		autorest.AsJSON(),
16481		autorest.AsGet(),
16482		autorest.WithBaseURL(to.String(fllr.NextLink)))
16483}
16484
16485// FlowLogListResultPage contains a page of FlowLog values.
16486type FlowLogListResultPage struct {
16487	fn   func(context.Context, FlowLogListResult) (FlowLogListResult, error)
16488	fllr FlowLogListResult
16489}
16490
16491// NextWithContext advances to the next page of values.  If there was an error making
16492// the request the page does not advance and the error is returned.
16493func (page *FlowLogListResultPage) NextWithContext(ctx context.Context) (err error) {
16494	if tracing.IsEnabled() {
16495		ctx = tracing.StartSpan(ctx, fqdn+"/FlowLogListResultPage.NextWithContext")
16496		defer func() {
16497			sc := -1
16498			if page.Response().Response.Response != nil {
16499				sc = page.Response().Response.Response.StatusCode
16500			}
16501			tracing.EndSpan(ctx, sc, err)
16502		}()
16503	}
16504	for {
16505		next, err := page.fn(ctx, page.fllr)
16506		if err != nil {
16507			return err
16508		}
16509		page.fllr = next
16510		if !next.hasNextLink() || !next.IsEmpty() {
16511			break
16512		}
16513	}
16514	return nil
16515}
16516
16517// Next advances to the next page of values.  If there was an error making
16518// the request the page does not advance and the error is returned.
16519// Deprecated: Use NextWithContext() instead.
16520func (page *FlowLogListResultPage) Next() error {
16521	return page.NextWithContext(context.Background())
16522}
16523
16524// NotDone returns true if the page enumeration should be started or is not yet complete.
16525func (page FlowLogListResultPage) NotDone() bool {
16526	return !page.fllr.IsEmpty()
16527}
16528
16529// Response returns the raw server response from the last page request.
16530func (page FlowLogListResultPage) Response() FlowLogListResult {
16531	return page.fllr
16532}
16533
16534// Values returns the slice of values for the current page or nil if there are no values.
16535func (page FlowLogListResultPage) Values() []FlowLog {
16536	if page.fllr.IsEmpty() {
16537		return nil
16538	}
16539	return *page.fllr.Value
16540}
16541
16542// Creates a new instance of the FlowLogListResultPage type.
16543func NewFlowLogListResultPage(cur FlowLogListResult, getNextPage func(context.Context, FlowLogListResult) (FlowLogListResult, error)) FlowLogListResultPage {
16544	return FlowLogListResultPage{
16545		fn:   getNextPage,
16546		fllr: cur,
16547	}
16548}
16549
16550// FlowLogProperties parameters that define the configuration of flow log.
16551type FlowLogProperties struct {
16552	// StorageID - ID of the storage account which is used to store the flow log.
16553	StorageID *string `json:"storageId,omitempty"`
16554	// Enabled - Flag to enable/disable flow logging.
16555	Enabled *bool `json:"enabled,omitempty"`
16556	// RetentionPolicy - Parameters that define the retention policy for flow log.
16557	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
16558	// Format - Parameters that define the flow log format.
16559	Format *FlowLogFormatParameters `json:"format,omitempty"`
16560}
16561
16562// FlowLogPropertiesFormat parameters that define the configuration of flow log.
16563type FlowLogPropertiesFormat struct {
16564	// TargetResourceID - ID of network security group to which flow log will be applied.
16565	TargetResourceID *string `json:"targetResourceId,omitempty"`
16566	// TargetResourceGUID - READ-ONLY; Guid of network security group to which flow log will be applied.
16567	TargetResourceGUID *string `json:"targetResourceGuid,omitempty"`
16568	// StorageID - ID of the storage account which is used to store the flow log.
16569	StorageID *string `json:"storageId,omitempty"`
16570	// Enabled - Flag to enable/disable flow logging.
16571	Enabled *bool `json:"enabled,omitempty"`
16572	// RetentionPolicy - Parameters that define the retention policy for flow log.
16573	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
16574	// Format - Parameters that define the flow log format.
16575	Format *FlowLogFormatParameters `json:"format,omitempty"`
16576	// FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
16577	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
16578	// ProvisioningState - READ-ONLY; The provisioning state of the flow log. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
16579	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16580}
16581
16582// MarshalJSON is the custom marshaler for FlowLogPropertiesFormat.
16583func (flpf FlowLogPropertiesFormat) MarshalJSON() ([]byte, error) {
16584	objectMap := make(map[string]interface{})
16585	if flpf.TargetResourceID != nil {
16586		objectMap["targetResourceId"] = flpf.TargetResourceID
16587	}
16588	if flpf.StorageID != nil {
16589		objectMap["storageId"] = flpf.StorageID
16590	}
16591	if flpf.Enabled != nil {
16592		objectMap["enabled"] = flpf.Enabled
16593	}
16594	if flpf.RetentionPolicy != nil {
16595		objectMap["retentionPolicy"] = flpf.RetentionPolicy
16596	}
16597	if flpf.Format != nil {
16598		objectMap["format"] = flpf.Format
16599	}
16600	if flpf.FlowAnalyticsConfiguration != nil {
16601		objectMap["flowAnalyticsConfiguration"] = flpf.FlowAnalyticsConfiguration
16602	}
16603	return json.Marshal(objectMap)
16604}
16605
16606// FlowLogsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
16607// operation.
16608type FlowLogsCreateOrUpdateFuture struct {
16609	azure.FutureAPI
16610	// Result returns the result of the asynchronous operation.
16611	// If the operation has not completed it will return an error.
16612	Result func(FlowLogsClient) (FlowLog, error)
16613}
16614
16615// FlowLogsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16616// operation.
16617type FlowLogsDeleteFuture struct {
16618	azure.FutureAPI
16619	// Result returns the result of the asynchronous operation.
16620	// If the operation has not completed it will return an error.
16621	Result func(FlowLogsClient) (autorest.Response, error)
16622}
16623
16624// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
16625// (optional) status.
16626type FlowLogStatusParameters struct {
16627	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
16628	TargetResourceID *string `json:"targetResourceId,omitempty"`
16629}
16630
16631// FrontendIPConfiguration frontend IP address of the load balancer.
16632type FrontendIPConfiguration struct {
16633	autorest.Response `json:"-"`
16634	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
16635	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
16636	// 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.
16637	Name *string `json:"name,omitempty"`
16638	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
16639	Etag *string `json:"etag,omitempty"`
16640	// Type - READ-ONLY; Type of the resource.
16641	Type *string `json:"type,omitempty"`
16642	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
16643	Zones *[]string `json:"zones,omitempty"`
16644	// ID - Resource ID.
16645	ID *string `json:"id,omitempty"`
16646}
16647
16648// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
16649func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
16650	objectMap := make(map[string]interface{})
16651	if fic.FrontendIPConfigurationPropertiesFormat != nil {
16652		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
16653	}
16654	if fic.Name != nil {
16655		objectMap["name"] = fic.Name
16656	}
16657	if fic.Zones != nil {
16658		objectMap["zones"] = fic.Zones
16659	}
16660	if fic.ID != nil {
16661		objectMap["id"] = fic.ID
16662	}
16663	return json.Marshal(objectMap)
16664}
16665
16666// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
16667func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
16668	var m map[string]*json.RawMessage
16669	err := json.Unmarshal(body, &m)
16670	if err != nil {
16671		return err
16672	}
16673	for k, v := range m {
16674		switch k {
16675		case "properties":
16676			if v != nil {
16677				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
16678				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
16679				if err != nil {
16680					return err
16681				}
16682				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
16683			}
16684		case "name":
16685			if v != nil {
16686				var name string
16687				err = json.Unmarshal(*v, &name)
16688				if err != nil {
16689					return err
16690				}
16691				fic.Name = &name
16692			}
16693		case "etag":
16694			if v != nil {
16695				var etag string
16696				err = json.Unmarshal(*v, &etag)
16697				if err != nil {
16698					return err
16699				}
16700				fic.Etag = &etag
16701			}
16702		case "type":
16703			if v != nil {
16704				var typeVar string
16705				err = json.Unmarshal(*v, &typeVar)
16706				if err != nil {
16707					return err
16708				}
16709				fic.Type = &typeVar
16710			}
16711		case "zones":
16712			if v != nil {
16713				var zones []string
16714				err = json.Unmarshal(*v, &zones)
16715				if err != nil {
16716					return err
16717				}
16718				fic.Zones = &zones
16719			}
16720		case "id":
16721			if v != nil {
16722				var ID string
16723				err = json.Unmarshal(*v, &ID)
16724				if err != nil {
16725					return err
16726				}
16727				fic.ID = &ID
16728			}
16729		}
16730	}
16731
16732	return nil
16733}
16734
16735// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
16736type FrontendIPConfigurationPropertiesFormat struct {
16737	// InboundNatRules - READ-ONLY; An array of references to inbound rules that use this frontend IP.
16738	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
16739	// InboundNatPools - READ-ONLY; An array of references to inbound pools that use this frontend IP.
16740	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
16741	// OutboundRules - READ-ONLY; An array of references to outbound rules that use this frontend IP.
16742	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
16743	// LoadBalancingRules - READ-ONLY; An array of references to load balancing rules that use this frontend IP.
16744	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
16745	// PrivateIPAddress - The private IP address of the IP configuration.
16746	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
16747	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values include: 'Static', 'Dynamic'
16748	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
16749	// PrivateIPAddressVersion - Whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPv4', 'IPv6'
16750	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
16751	// Subnet - The reference to the subnet resource.
16752	Subnet *Subnet `json:"subnet,omitempty"`
16753	// PublicIPAddress - The reference to the Public IP resource.
16754	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
16755	// PublicIPPrefix - The reference to the Public IP Prefix resource.
16756	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
16757	// ProvisioningState - READ-ONLY; The provisioning state of the frontend IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
16758	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16759}
16760
16761// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
16762func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
16763	objectMap := make(map[string]interface{})
16764	if ficpf.PrivateIPAddress != nil {
16765		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
16766	}
16767	if ficpf.PrivateIPAllocationMethod != "" {
16768		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
16769	}
16770	if ficpf.PrivateIPAddressVersion != "" {
16771		objectMap["privateIPAddressVersion"] = ficpf.PrivateIPAddressVersion
16772	}
16773	if ficpf.Subnet != nil {
16774		objectMap["subnet"] = ficpf.Subnet
16775	}
16776	if ficpf.PublicIPAddress != nil {
16777		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
16778	}
16779	if ficpf.PublicIPPrefix != nil {
16780		objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix
16781	}
16782	return json.Marshal(objectMap)
16783}
16784
16785// GatewayRoute gateway routing details.
16786type GatewayRoute struct {
16787	// LocalAddress - READ-ONLY; The gateway's local address.
16788	LocalAddress *string `json:"localAddress,omitempty"`
16789	// NetworkProperty - READ-ONLY; The route's network prefix.
16790	NetworkProperty *string `json:"network,omitempty"`
16791	// NextHop - READ-ONLY; The route's next hop.
16792	NextHop *string `json:"nextHop,omitempty"`
16793	// SourcePeer - READ-ONLY; The peer this route was learned from.
16794	SourcePeer *string `json:"sourcePeer,omitempty"`
16795	// Origin - READ-ONLY; The source this route was learned from.
16796	Origin *string `json:"origin,omitempty"`
16797	// AsPath - READ-ONLY; The route's AS path sequence.
16798	AsPath *string `json:"asPath,omitempty"`
16799	// Weight - READ-ONLY; The route's weight.
16800	Weight *int32 `json:"weight,omitempty"`
16801}
16802
16803// GatewayRouteListResult list of virtual network gateway routes.
16804type GatewayRouteListResult struct {
16805	autorest.Response `json:"-"`
16806	// Value - List of gateway routes.
16807	Value *[]GatewayRoute `json:"value,omitempty"`
16808}
16809
16810// GenerateExpressRoutePortsLOARequest the customer name to be printed on a letter of authorization.
16811type GenerateExpressRoutePortsLOARequest struct {
16812	// CustomerName - The customer name.
16813	CustomerName *string `json:"customerName,omitempty"`
16814}
16815
16816// GenerateExpressRoutePortsLOAResult response for GenerateExpressRoutePortsLOA API service call.
16817type GenerateExpressRoutePortsLOAResult struct {
16818	autorest.Response `json:"-"`
16819	// EncodedContent - The content as a base64 encoded string.
16820	EncodedContent *string `json:"encodedContent,omitempty"`
16821}
16822
16823// GeneratevirtualwanvpnserverconfigurationvpnprofileFuture an abstraction for monitoring and retrieving
16824// the results of a long-running operation.
16825type GeneratevirtualwanvpnserverconfigurationvpnprofileFuture struct {
16826	azure.FutureAPI
16827	// Result returns the result of the asynchronous operation.
16828	// If the operation has not completed it will return an error.
16829	Result func(BaseClient) (VpnProfileResponse, error)
16830}
16831
16832// GetActiveSessionsAllFuture an abstraction for monitoring and retrieving the results of a long-running
16833// operation.
16834type GetActiveSessionsAllFuture struct {
16835	azure.FutureAPI
16836	// Result returns the result of the asynchronous operation.
16837	// If the operation has not completed it will return an error.
16838	Result func(BaseClient) (BastionActiveSessionListResultPage, error)
16839}
16840
16841// GetActiveSessionsFuture an abstraction for monitoring and retrieving the results of a long-running
16842// operation.
16843type GetActiveSessionsFuture struct {
16844	azure.FutureAPI
16845	// Result returns the result of the asynchronous operation.
16846	// If the operation has not completed it will return an error.
16847	Result func(BaseClient) (BastionActiveSessionListResultPage, error)
16848}
16849
16850// GetVpnSitesConfigurationRequest list of Vpn-Sites.
16851type GetVpnSitesConfigurationRequest struct {
16852	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
16853	VpnSites *[]string `json:"vpnSites,omitempty"`
16854	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites.
16855	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
16856}
16857
16858// HopLink hop link.
16859type HopLink struct {
16860	// NextHopID - READ-ONLY; The ID of the next hop.
16861	NextHopID *string `json:"nextHopId,omitempty"`
16862	// LinkType - READ-ONLY; Link type.
16863	LinkType *string `json:"linkType,omitempty"`
16864	// HopLinkProperties - Hop link properties.
16865	*HopLinkProperties `json:"properties,omitempty"`
16866	// Issues - READ-ONLY; List of issues.
16867	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
16868	// Context - READ-ONLY; Provides additional context on links.
16869	Context map[string]*string `json:"context"`
16870	// ResourceID - READ-ONLY; Resource ID.
16871	ResourceID *string `json:"resourceId,omitempty"`
16872}
16873
16874// MarshalJSON is the custom marshaler for HopLink.
16875func (hl HopLink) MarshalJSON() ([]byte, error) {
16876	objectMap := make(map[string]interface{})
16877	if hl.HopLinkProperties != nil {
16878		objectMap["properties"] = hl.HopLinkProperties
16879	}
16880	return json.Marshal(objectMap)
16881}
16882
16883// UnmarshalJSON is the custom unmarshaler for HopLink struct.
16884func (hl *HopLink) UnmarshalJSON(body []byte) error {
16885	var m map[string]*json.RawMessage
16886	err := json.Unmarshal(body, &m)
16887	if err != nil {
16888		return err
16889	}
16890	for k, v := range m {
16891		switch k {
16892		case "nextHopId":
16893			if v != nil {
16894				var nextHopID string
16895				err = json.Unmarshal(*v, &nextHopID)
16896				if err != nil {
16897					return err
16898				}
16899				hl.NextHopID = &nextHopID
16900			}
16901		case "linkType":
16902			if v != nil {
16903				var linkType string
16904				err = json.Unmarshal(*v, &linkType)
16905				if err != nil {
16906					return err
16907				}
16908				hl.LinkType = &linkType
16909			}
16910		case "properties":
16911			if v != nil {
16912				var hopLinkProperties HopLinkProperties
16913				err = json.Unmarshal(*v, &hopLinkProperties)
16914				if err != nil {
16915					return err
16916				}
16917				hl.HopLinkProperties = &hopLinkProperties
16918			}
16919		case "issues":
16920			if v != nil {
16921				var issues []ConnectivityIssue
16922				err = json.Unmarshal(*v, &issues)
16923				if err != nil {
16924					return err
16925				}
16926				hl.Issues = &issues
16927			}
16928		case "context":
16929			if v != nil {
16930				var context map[string]*string
16931				err = json.Unmarshal(*v, &context)
16932				if err != nil {
16933					return err
16934				}
16935				hl.Context = context
16936			}
16937		case "resourceId":
16938			if v != nil {
16939				var resourceID string
16940				err = json.Unmarshal(*v, &resourceID)
16941				if err != nil {
16942					return err
16943				}
16944				hl.ResourceID = &resourceID
16945			}
16946		}
16947	}
16948
16949	return nil
16950}
16951
16952// HopLinkProperties hop link properties.
16953type HopLinkProperties struct {
16954	// RoundTripTimeMin - READ-ONLY; Minimum roundtrip time in milliseconds.
16955	RoundTripTimeMin *int64 `json:"roundTripTimeMin,omitempty"`
16956	// RoundTripTimeAvg - READ-ONLY; Average roundtrip time in milliseconds.
16957	RoundTripTimeAvg *int64 `json:"roundTripTimeAvg,omitempty"`
16958	// RoundTripTimeMax - READ-ONLY; Maximum roundtrip time in milliseconds.
16959	RoundTripTimeMax *int64 `json:"roundTripTimeMax,omitempty"`
16960}
16961
16962// HTTPConfiguration HTTP configuration of the connectivity check.
16963type HTTPConfiguration struct {
16964	// Method - HTTP method. Possible values include: 'HTTPMethodGet'
16965	Method HTTPMethod `json:"method,omitempty"`
16966	// Headers - List of HTTP headers.
16967	Headers *[]HTTPHeader `json:"headers,omitempty"`
16968	// ValidStatusCodes - Valid status codes.
16969	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
16970}
16971
16972// HTTPHeader the HTTP header.
16973type HTTPHeader struct {
16974	// Name - The name in HTTP header.
16975	Name *string `json:"name,omitempty"`
16976	// Value - The value in HTTP header.
16977	Value *string `json:"value,omitempty"`
16978}
16979
16980// HubIPAddresses IP addresses associated with azure firewall.
16981type HubIPAddresses struct {
16982	// PublicIPs - Public IP addresses associated with azure firewall.
16983	PublicIPs *HubPublicIPAddresses `json:"publicIPs,omitempty"`
16984	// PrivateIPAddress - Private IP Address associated with azure firewall.
16985	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
16986}
16987
16988// HubIPConfiguration ipConfigurations.
16989type HubIPConfiguration struct {
16990	autorest.Response `json:"-"`
16991	// HubIPConfigurationPropertiesFormat - The properties of the Virtual Hub IPConfigurations.
16992	*HubIPConfigurationPropertiesFormat `json:"properties,omitempty"`
16993	// Name - Name of the Ip Configuration.
16994	Name *string `json:"name,omitempty"`
16995	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
16996	Etag *string `json:"etag,omitempty"`
16997	// Type - READ-ONLY; Ipconfiguration type.
16998	Type *string `json:"type,omitempty"`
16999	// ID - Resource ID.
17000	ID *string `json:"id,omitempty"`
17001}
17002
17003// MarshalJSON is the custom marshaler for HubIPConfiguration.
17004func (hic HubIPConfiguration) MarshalJSON() ([]byte, error) {
17005	objectMap := make(map[string]interface{})
17006	if hic.HubIPConfigurationPropertiesFormat != nil {
17007		objectMap["properties"] = hic.HubIPConfigurationPropertiesFormat
17008	}
17009	if hic.Name != nil {
17010		objectMap["name"] = hic.Name
17011	}
17012	if hic.ID != nil {
17013		objectMap["id"] = hic.ID
17014	}
17015	return json.Marshal(objectMap)
17016}
17017
17018// UnmarshalJSON is the custom unmarshaler for HubIPConfiguration struct.
17019func (hic *HubIPConfiguration) UnmarshalJSON(body []byte) error {
17020	var m map[string]*json.RawMessage
17021	err := json.Unmarshal(body, &m)
17022	if err != nil {
17023		return err
17024	}
17025	for k, v := range m {
17026		switch k {
17027		case "properties":
17028			if v != nil {
17029				var hubIPConfigurationPropertiesFormat HubIPConfigurationPropertiesFormat
17030				err = json.Unmarshal(*v, &hubIPConfigurationPropertiesFormat)
17031				if err != nil {
17032					return err
17033				}
17034				hic.HubIPConfigurationPropertiesFormat = &hubIPConfigurationPropertiesFormat
17035			}
17036		case "name":
17037			if v != nil {
17038				var name string
17039				err = json.Unmarshal(*v, &name)
17040				if err != nil {
17041					return err
17042				}
17043				hic.Name = &name
17044			}
17045		case "etag":
17046			if v != nil {
17047				var etag string
17048				err = json.Unmarshal(*v, &etag)
17049				if err != nil {
17050					return err
17051				}
17052				hic.Etag = &etag
17053			}
17054		case "type":
17055			if v != nil {
17056				var typeVar string
17057				err = json.Unmarshal(*v, &typeVar)
17058				if err != nil {
17059					return err
17060				}
17061				hic.Type = &typeVar
17062			}
17063		case "id":
17064			if v != nil {
17065				var ID string
17066				err = json.Unmarshal(*v, &ID)
17067				if err != nil {
17068					return err
17069				}
17070				hic.ID = &ID
17071			}
17072		}
17073	}
17074
17075	return nil
17076}
17077
17078// HubIPConfigurationPropertiesFormat properties of IP configuration.
17079type HubIPConfigurationPropertiesFormat struct {
17080	// PrivateIPAddress - The private IP address of the IP configuration.
17081	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
17082	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
17083	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
17084	// Subnet - The reference to the subnet resource.
17085	Subnet *Subnet `json:"subnet,omitempty"`
17086	// PublicIPAddress - The reference to the public IP resource.
17087	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
17088	// ProvisioningState - READ-ONLY; The provisioning state of the IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17089	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17090}
17091
17092// MarshalJSON is the custom marshaler for HubIPConfigurationPropertiesFormat.
17093func (hicpf HubIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
17094	objectMap := make(map[string]interface{})
17095	if hicpf.PrivateIPAddress != nil {
17096		objectMap["privateIPAddress"] = hicpf.PrivateIPAddress
17097	}
17098	if hicpf.PrivateIPAllocationMethod != "" {
17099		objectMap["privateIPAllocationMethod"] = hicpf.PrivateIPAllocationMethod
17100	}
17101	if hicpf.Subnet != nil {
17102		objectMap["subnet"] = hicpf.Subnet
17103	}
17104	if hicpf.PublicIPAddress != nil {
17105		objectMap["publicIPAddress"] = hicpf.PublicIPAddress
17106	}
17107	return json.Marshal(objectMap)
17108}
17109
17110// HubPublicIPAddresses public IP addresses associated with azure firewall.
17111type HubPublicIPAddresses struct {
17112	// Addresses - The list of Public IP addresses associated with azure firewall or IP addresses to be retained.
17113	Addresses *[]AzureFirewallPublicIPAddress `json:"addresses,omitempty"`
17114	// Count - The number of Public IP addresses associated with azure firewall.
17115	Count *int32 `json:"count,omitempty"`
17116}
17117
17118// HubRoute routeTable route.
17119type HubRoute struct {
17120	// Name - The name of the Route that is unique within a RouteTable. This name can be used to access this route.
17121	Name *string `json:"name,omitempty"`
17122	// DestinationType - The type of destinations (eg: CIDR, ResourceId, Service).
17123	DestinationType *string `json:"destinationType,omitempty"`
17124	// Destinations - List of all destinations.
17125	Destinations *[]string `json:"destinations,omitempty"`
17126	// NextHopType - The type of next hop (eg: ResourceId).
17127	NextHopType *string `json:"nextHopType,omitempty"`
17128	// NextHop - NextHop resource ID.
17129	NextHop *string `json:"nextHop,omitempty"`
17130}
17131
17132// HubRouteTable routeTable resource in a virtual hub.
17133type HubRouteTable struct {
17134	autorest.Response `json:"-"`
17135	// HubRouteTableProperties - Properties of the RouteTable resource.
17136	*HubRouteTableProperties `json:"properties,omitempty"`
17137	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17138	Name *string `json:"name,omitempty"`
17139	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
17140	Etag *string `json:"etag,omitempty"`
17141	// Type - READ-ONLY; Resource type.
17142	Type *string `json:"type,omitempty"`
17143	// ID - Resource ID.
17144	ID *string `json:"id,omitempty"`
17145}
17146
17147// MarshalJSON is the custom marshaler for HubRouteTable.
17148func (hrt HubRouteTable) MarshalJSON() ([]byte, error) {
17149	objectMap := make(map[string]interface{})
17150	if hrt.HubRouteTableProperties != nil {
17151		objectMap["properties"] = hrt.HubRouteTableProperties
17152	}
17153	if hrt.Name != nil {
17154		objectMap["name"] = hrt.Name
17155	}
17156	if hrt.ID != nil {
17157		objectMap["id"] = hrt.ID
17158	}
17159	return json.Marshal(objectMap)
17160}
17161
17162// UnmarshalJSON is the custom unmarshaler for HubRouteTable struct.
17163func (hrt *HubRouteTable) UnmarshalJSON(body []byte) error {
17164	var m map[string]*json.RawMessage
17165	err := json.Unmarshal(body, &m)
17166	if err != nil {
17167		return err
17168	}
17169	for k, v := range m {
17170		switch k {
17171		case "properties":
17172			if v != nil {
17173				var hubRouteTableProperties HubRouteTableProperties
17174				err = json.Unmarshal(*v, &hubRouteTableProperties)
17175				if err != nil {
17176					return err
17177				}
17178				hrt.HubRouteTableProperties = &hubRouteTableProperties
17179			}
17180		case "name":
17181			if v != nil {
17182				var name string
17183				err = json.Unmarshal(*v, &name)
17184				if err != nil {
17185					return err
17186				}
17187				hrt.Name = &name
17188			}
17189		case "etag":
17190			if v != nil {
17191				var etag string
17192				err = json.Unmarshal(*v, &etag)
17193				if err != nil {
17194					return err
17195				}
17196				hrt.Etag = &etag
17197			}
17198		case "type":
17199			if v != nil {
17200				var typeVar string
17201				err = json.Unmarshal(*v, &typeVar)
17202				if err != nil {
17203					return err
17204				}
17205				hrt.Type = &typeVar
17206			}
17207		case "id":
17208			if v != nil {
17209				var ID string
17210				err = json.Unmarshal(*v, &ID)
17211				if err != nil {
17212					return err
17213				}
17214				hrt.ID = &ID
17215			}
17216		}
17217	}
17218
17219	return nil
17220}
17221
17222// HubRouteTableProperties parameters for RouteTable.
17223type HubRouteTableProperties struct {
17224	// Routes - List of all routes.
17225	Routes *[]HubRoute `json:"routes,omitempty"`
17226	// Labels - List of labels associated with this route table.
17227	Labels *[]string `json:"labels,omitempty"`
17228	// AssociatedConnections - READ-ONLY; List of all connections associated with this route table.
17229	AssociatedConnections *[]string `json:"associatedConnections,omitempty"`
17230	// PropagatingConnections - READ-ONLY; List of all connections that advertise to this route table.
17231	PropagatingConnections *[]string `json:"propagatingConnections,omitempty"`
17232	// ProvisioningState - READ-ONLY; The provisioning state of the RouteTable resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17233	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17234}
17235
17236// MarshalJSON is the custom marshaler for HubRouteTableProperties.
17237func (hrtp HubRouteTableProperties) MarshalJSON() ([]byte, error) {
17238	objectMap := make(map[string]interface{})
17239	if hrtp.Routes != nil {
17240		objectMap["routes"] = hrtp.Routes
17241	}
17242	if hrtp.Labels != nil {
17243		objectMap["labels"] = hrtp.Labels
17244	}
17245	return json.Marshal(objectMap)
17246}
17247
17248// HubRouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17249// long-running operation.
17250type HubRouteTablesCreateOrUpdateFuture struct {
17251	azure.FutureAPI
17252	// Result returns the result of the asynchronous operation.
17253	// If the operation has not completed it will return an error.
17254	Result func(HubRouteTablesClient) (HubRouteTable, error)
17255}
17256
17257// HubRouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17258// operation.
17259type HubRouteTablesDeleteFuture struct {
17260	azure.FutureAPI
17261	// Result returns the result of the asynchronous operation.
17262	// If the operation has not completed it will return an error.
17263	Result func(HubRouteTablesClient) (autorest.Response, error)
17264}
17265
17266// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
17267type HubVirtualNetworkConnection struct {
17268	autorest.Response `json:"-"`
17269	// HubVirtualNetworkConnectionProperties - Properties of the hub virtual network connection.
17270	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
17271	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17272	Name *string `json:"name,omitempty"`
17273	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
17274	Etag *string `json:"etag,omitempty"`
17275	// ID - Resource ID.
17276	ID *string `json:"id,omitempty"`
17277}
17278
17279// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
17280func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
17281	objectMap := make(map[string]interface{})
17282	if hvnc.HubVirtualNetworkConnectionProperties != nil {
17283		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
17284	}
17285	if hvnc.Name != nil {
17286		objectMap["name"] = hvnc.Name
17287	}
17288	if hvnc.ID != nil {
17289		objectMap["id"] = hvnc.ID
17290	}
17291	return json.Marshal(objectMap)
17292}
17293
17294// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
17295func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
17296	var m map[string]*json.RawMessage
17297	err := json.Unmarshal(body, &m)
17298	if err != nil {
17299		return err
17300	}
17301	for k, v := range m {
17302		switch k {
17303		case "properties":
17304			if v != nil {
17305				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
17306				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
17307				if err != nil {
17308					return err
17309				}
17310				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
17311			}
17312		case "name":
17313			if v != nil {
17314				var name string
17315				err = json.Unmarshal(*v, &name)
17316				if err != nil {
17317					return err
17318				}
17319				hvnc.Name = &name
17320			}
17321		case "etag":
17322			if v != nil {
17323				var etag string
17324				err = json.Unmarshal(*v, &etag)
17325				if err != nil {
17326					return err
17327				}
17328				hvnc.Etag = &etag
17329			}
17330		case "id":
17331			if v != nil {
17332				var ID string
17333				err = json.Unmarshal(*v, &ID)
17334				if err != nil {
17335					return err
17336				}
17337				hvnc.ID = &ID
17338			}
17339		}
17340	}
17341
17342	return nil
17343}
17344
17345// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection.
17346type HubVirtualNetworkConnectionProperties struct {
17347	// RemoteVirtualNetwork - Reference to the remote virtual network.
17348	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
17349	// AllowHubToRemoteVnetTransit - Deprecated: VirtualHub to RemoteVnet transit to enabled or not.
17350	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
17351	// AllowRemoteVnetToUseHubVnetGateways - Deprecated: Allow RemoteVnet to use Virtual Hub's gateways.
17352	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
17353	// EnableInternetSecurity - Enable internet security.
17354	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
17355	// RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection.
17356	RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"`
17357	// ProvisioningState - READ-ONLY; The provisioning state of the hub virtual network connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17358	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17359}
17360
17361// MarshalJSON is the custom marshaler for HubVirtualNetworkConnectionProperties.
17362func (hvncp HubVirtualNetworkConnectionProperties) MarshalJSON() ([]byte, error) {
17363	objectMap := make(map[string]interface{})
17364	if hvncp.RemoteVirtualNetwork != nil {
17365		objectMap["remoteVirtualNetwork"] = hvncp.RemoteVirtualNetwork
17366	}
17367	if hvncp.AllowHubToRemoteVnetTransit != nil {
17368		objectMap["allowHubToRemoteVnetTransit"] = hvncp.AllowHubToRemoteVnetTransit
17369	}
17370	if hvncp.AllowRemoteVnetToUseHubVnetGateways != nil {
17371		objectMap["allowRemoteVnetToUseHubVnetGateways"] = hvncp.AllowRemoteVnetToUseHubVnetGateways
17372	}
17373	if hvncp.EnableInternetSecurity != nil {
17374		objectMap["enableInternetSecurity"] = hvncp.EnableInternetSecurity
17375	}
17376	if hvncp.RoutingConfiguration != nil {
17377		objectMap["routingConfiguration"] = hvncp.RoutingConfiguration
17378	}
17379	return json.Marshal(objectMap)
17380}
17381
17382// HubVirtualNetworkConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
17383// results of a long-running operation.
17384type HubVirtualNetworkConnectionsCreateOrUpdateFuture struct {
17385	azure.FutureAPI
17386	// Result returns the result of the asynchronous operation.
17387	// If the operation has not completed it will return an error.
17388	Result func(HubVirtualNetworkConnectionsClient) (HubVirtualNetworkConnection, error)
17389}
17390
17391// HubVirtualNetworkConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
17392// long-running operation.
17393type HubVirtualNetworkConnectionsDeleteFuture struct {
17394	azure.FutureAPI
17395	// Result returns the result of the asynchronous operation.
17396	// If the operation has not completed it will return an error.
17397	Result func(HubVirtualNetworkConnectionsClient) (autorest.Response, error)
17398}
17399
17400// InboundNatPool inbound NAT pool of the load balancer.
17401type InboundNatPool struct {
17402	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
17403	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
17404	// 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.
17405	Name *string `json:"name,omitempty"`
17406	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
17407	Etag *string `json:"etag,omitempty"`
17408	// Type - READ-ONLY; Type of the resource.
17409	Type *string `json:"type,omitempty"`
17410	// ID - Resource ID.
17411	ID *string `json:"id,omitempty"`
17412}
17413
17414// MarshalJSON is the custom marshaler for InboundNatPool.
17415func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
17416	objectMap := make(map[string]interface{})
17417	if inp.InboundNatPoolPropertiesFormat != nil {
17418		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
17419	}
17420	if inp.Name != nil {
17421		objectMap["name"] = inp.Name
17422	}
17423	if inp.ID != nil {
17424		objectMap["id"] = inp.ID
17425	}
17426	return json.Marshal(objectMap)
17427}
17428
17429// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
17430func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
17431	var m map[string]*json.RawMessage
17432	err := json.Unmarshal(body, &m)
17433	if err != nil {
17434		return err
17435	}
17436	for k, v := range m {
17437		switch k {
17438		case "properties":
17439			if v != nil {
17440				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
17441				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
17442				if err != nil {
17443					return err
17444				}
17445				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
17446			}
17447		case "name":
17448			if v != nil {
17449				var name string
17450				err = json.Unmarshal(*v, &name)
17451				if err != nil {
17452					return err
17453				}
17454				inp.Name = &name
17455			}
17456		case "etag":
17457			if v != nil {
17458				var etag string
17459				err = json.Unmarshal(*v, &etag)
17460				if err != nil {
17461					return err
17462				}
17463				inp.Etag = &etag
17464			}
17465		case "type":
17466			if v != nil {
17467				var typeVar string
17468				err = json.Unmarshal(*v, &typeVar)
17469				if err != nil {
17470					return err
17471				}
17472				inp.Type = &typeVar
17473			}
17474		case "id":
17475			if v != nil {
17476				var ID string
17477				err = json.Unmarshal(*v, &ID)
17478				if err != nil {
17479					return err
17480				}
17481				inp.ID = &ID
17482			}
17483		}
17484	}
17485
17486	return nil
17487}
17488
17489// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
17490type InboundNatPoolPropertiesFormat struct {
17491	// FrontendIPConfiguration - A reference to frontend IP addresses.
17492	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
17493	// Protocol - The reference to the transport protocol used by the inbound NAT pool. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
17494	Protocol TransportProtocol `json:"protocol,omitempty"`
17495	// 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.
17496	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
17497	// 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.
17498	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
17499	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
17500	BackendPort *int32 `json:"backendPort,omitempty"`
17501	// 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.
17502	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
17503	// 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.
17504	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
17505	// 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.
17506	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
17507	// ProvisioningState - READ-ONLY; The provisioning state of the inbound NAT pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17508	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17509}
17510
17511// MarshalJSON is the custom marshaler for InboundNatPoolPropertiesFormat.
17512func (inppf InboundNatPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
17513	objectMap := make(map[string]interface{})
17514	if inppf.FrontendIPConfiguration != nil {
17515		objectMap["frontendIPConfiguration"] = inppf.FrontendIPConfiguration
17516	}
17517	if inppf.Protocol != "" {
17518		objectMap["protocol"] = inppf.Protocol
17519	}
17520	if inppf.FrontendPortRangeStart != nil {
17521		objectMap["frontendPortRangeStart"] = inppf.FrontendPortRangeStart
17522	}
17523	if inppf.FrontendPortRangeEnd != nil {
17524		objectMap["frontendPortRangeEnd"] = inppf.FrontendPortRangeEnd
17525	}
17526	if inppf.BackendPort != nil {
17527		objectMap["backendPort"] = inppf.BackendPort
17528	}
17529	if inppf.IdleTimeoutInMinutes != nil {
17530		objectMap["idleTimeoutInMinutes"] = inppf.IdleTimeoutInMinutes
17531	}
17532	if inppf.EnableFloatingIP != nil {
17533		objectMap["enableFloatingIP"] = inppf.EnableFloatingIP
17534	}
17535	if inppf.EnableTCPReset != nil {
17536		objectMap["enableTcpReset"] = inppf.EnableTCPReset
17537	}
17538	return json.Marshal(objectMap)
17539}
17540
17541// InboundNatRule inbound NAT rule of the load balancer.
17542type InboundNatRule struct {
17543	autorest.Response `json:"-"`
17544	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
17545	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
17546	// 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.
17547	Name *string `json:"name,omitempty"`
17548	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
17549	Etag *string `json:"etag,omitempty"`
17550	// Type - READ-ONLY; Type of the resource.
17551	Type *string `json:"type,omitempty"`
17552	// ID - Resource ID.
17553	ID *string `json:"id,omitempty"`
17554}
17555
17556// MarshalJSON is the custom marshaler for InboundNatRule.
17557func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
17558	objectMap := make(map[string]interface{})
17559	if inr.InboundNatRulePropertiesFormat != nil {
17560		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
17561	}
17562	if inr.Name != nil {
17563		objectMap["name"] = inr.Name
17564	}
17565	if inr.ID != nil {
17566		objectMap["id"] = inr.ID
17567	}
17568	return json.Marshal(objectMap)
17569}
17570
17571// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
17572func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
17573	var m map[string]*json.RawMessage
17574	err := json.Unmarshal(body, &m)
17575	if err != nil {
17576		return err
17577	}
17578	for k, v := range m {
17579		switch k {
17580		case "properties":
17581			if v != nil {
17582				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
17583				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
17584				if err != nil {
17585					return err
17586				}
17587				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
17588			}
17589		case "name":
17590			if v != nil {
17591				var name string
17592				err = json.Unmarshal(*v, &name)
17593				if err != nil {
17594					return err
17595				}
17596				inr.Name = &name
17597			}
17598		case "etag":
17599			if v != nil {
17600				var etag string
17601				err = json.Unmarshal(*v, &etag)
17602				if err != nil {
17603					return err
17604				}
17605				inr.Etag = &etag
17606			}
17607		case "type":
17608			if v != nil {
17609				var typeVar string
17610				err = json.Unmarshal(*v, &typeVar)
17611				if err != nil {
17612					return err
17613				}
17614				inr.Type = &typeVar
17615			}
17616		case "id":
17617			if v != nil {
17618				var ID string
17619				err = json.Unmarshal(*v, &ID)
17620				if err != nil {
17621					return err
17622				}
17623				inr.ID = &ID
17624			}
17625		}
17626	}
17627
17628	return nil
17629}
17630
17631// InboundNatRuleListResult response for ListInboundNatRule API service call.
17632type InboundNatRuleListResult struct {
17633	autorest.Response `json:"-"`
17634	// Value - A list of inbound nat rules in a load balancer.
17635	Value *[]InboundNatRule `json:"value,omitempty"`
17636	// NextLink - READ-ONLY; The URL to get the next set of results.
17637	NextLink *string `json:"nextLink,omitempty"`
17638}
17639
17640// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
17641func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
17642	objectMap := make(map[string]interface{})
17643	if inrlr.Value != nil {
17644		objectMap["value"] = inrlr.Value
17645	}
17646	return json.Marshal(objectMap)
17647}
17648
17649// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
17650type InboundNatRuleListResultIterator struct {
17651	i    int
17652	page InboundNatRuleListResultPage
17653}
17654
17655// NextWithContext advances to the next value.  If there was an error making
17656// the request the iterator does not advance and the error is returned.
17657func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
17658	if tracing.IsEnabled() {
17659		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
17660		defer func() {
17661			sc := -1
17662			if iter.Response().Response.Response != nil {
17663				sc = iter.Response().Response.Response.StatusCode
17664			}
17665			tracing.EndSpan(ctx, sc, err)
17666		}()
17667	}
17668	iter.i++
17669	if iter.i < len(iter.page.Values()) {
17670		return nil
17671	}
17672	err = iter.page.NextWithContext(ctx)
17673	if err != nil {
17674		iter.i--
17675		return err
17676	}
17677	iter.i = 0
17678	return nil
17679}
17680
17681// Next advances to the next value.  If there was an error making
17682// the request the iterator does not advance and the error is returned.
17683// Deprecated: Use NextWithContext() instead.
17684func (iter *InboundNatRuleListResultIterator) Next() error {
17685	return iter.NextWithContext(context.Background())
17686}
17687
17688// NotDone returns true if the enumeration should be started or is not yet complete.
17689func (iter InboundNatRuleListResultIterator) NotDone() bool {
17690	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17691}
17692
17693// Response returns the raw server response from the last page request.
17694func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
17695	return iter.page.Response()
17696}
17697
17698// Value returns the current value or a zero-initialized value if the
17699// iterator has advanced beyond the end of the collection.
17700func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
17701	if !iter.page.NotDone() {
17702		return InboundNatRule{}
17703	}
17704	return iter.page.Values()[iter.i]
17705}
17706
17707// Creates a new instance of the InboundNatRuleListResultIterator type.
17708func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
17709	return InboundNatRuleListResultIterator{page: page}
17710}
17711
17712// IsEmpty returns true if the ListResult contains no values.
17713func (inrlr InboundNatRuleListResult) IsEmpty() bool {
17714	return inrlr.Value == nil || len(*inrlr.Value) == 0
17715}
17716
17717// hasNextLink returns true if the NextLink is not empty.
17718func (inrlr InboundNatRuleListResult) hasNextLink() bool {
17719	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
17720}
17721
17722// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
17723// It returns nil if no more results exist.
17724func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
17725	if !inrlr.hasNextLink() {
17726		return nil, nil
17727	}
17728	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17729		autorest.AsJSON(),
17730		autorest.AsGet(),
17731		autorest.WithBaseURL(to.String(inrlr.NextLink)))
17732}
17733
17734// InboundNatRuleListResultPage contains a page of InboundNatRule values.
17735type InboundNatRuleListResultPage struct {
17736	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
17737	inrlr InboundNatRuleListResult
17738}
17739
17740// NextWithContext advances to the next page of values.  If there was an error making
17741// the request the page does not advance and the error is returned.
17742func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
17743	if tracing.IsEnabled() {
17744		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
17745		defer func() {
17746			sc := -1
17747			if page.Response().Response.Response != nil {
17748				sc = page.Response().Response.Response.StatusCode
17749			}
17750			tracing.EndSpan(ctx, sc, err)
17751		}()
17752	}
17753	for {
17754		next, err := page.fn(ctx, page.inrlr)
17755		if err != nil {
17756			return err
17757		}
17758		page.inrlr = next
17759		if !next.hasNextLink() || !next.IsEmpty() {
17760			break
17761		}
17762	}
17763	return nil
17764}
17765
17766// Next advances to the next page of values.  If there was an error making
17767// the request the page does not advance and the error is returned.
17768// Deprecated: Use NextWithContext() instead.
17769func (page *InboundNatRuleListResultPage) Next() error {
17770	return page.NextWithContext(context.Background())
17771}
17772
17773// NotDone returns true if the page enumeration should be started or is not yet complete.
17774func (page InboundNatRuleListResultPage) NotDone() bool {
17775	return !page.inrlr.IsEmpty()
17776}
17777
17778// Response returns the raw server response from the last page request.
17779func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
17780	return page.inrlr
17781}
17782
17783// Values returns the slice of values for the current page or nil if there are no values.
17784func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
17785	if page.inrlr.IsEmpty() {
17786		return nil
17787	}
17788	return *page.inrlr.Value
17789}
17790
17791// Creates a new instance of the InboundNatRuleListResultPage type.
17792func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
17793	return InboundNatRuleListResultPage{
17794		fn:    getNextPage,
17795		inrlr: cur,
17796	}
17797}
17798
17799// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
17800type InboundNatRulePropertiesFormat struct {
17801	// FrontendIPConfiguration - A reference to frontend IP addresses.
17802	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
17803	// 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.
17804	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
17805	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
17806	Protocol TransportProtocol `json:"protocol,omitempty"`
17807	// 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.
17808	FrontendPort *int32 `json:"frontendPort,omitempty"`
17809	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
17810	BackendPort *int32 `json:"backendPort,omitempty"`
17811	// 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.
17812	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
17813	// 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.
17814	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
17815	// 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.
17816	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
17817	// ProvisioningState - READ-ONLY; The provisioning state of the inbound NAT rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17818	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17819}
17820
17821// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
17822func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
17823	objectMap := make(map[string]interface{})
17824	if inrpf.FrontendIPConfiguration != nil {
17825		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
17826	}
17827	if inrpf.Protocol != "" {
17828		objectMap["protocol"] = inrpf.Protocol
17829	}
17830	if inrpf.FrontendPort != nil {
17831		objectMap["frontendPort"] = inrpf.FrontendPort
17832	}
17833	if inrpf.BackendPort != nil {
17834		objectMap["backendPort"] = inrpf.BackendPort
17835	}
17836	if inrpf.IdleTimeoutInMinutes != nil {
17837		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
17838	}
17839	if inrpf.EnableFloatingIP != nil {
17840		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
17841	}
17842	if inrpf.EnableTCPReset != nil {
17843		objectMap["enableTcpReset"] = inrpf.EnableTCPReset
17844	}
17845	return json.Marshal(objectMap)
17846}
17847
17848// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17849// long-running operation.
17850type InboundNatRulesCreateOrUpdateFuture struct {
17851	azure.FutureAPI
17852	// Result returns the result of the asynchronous operation.
17853	// If the operation has not completed it will return an error.
17854	Result func(InboundNatRulesClient) (InboundNatRule, error)
17855}
17856
17857// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17858// operation.
17859type InboundNatRulesDeleteFuture struct {
17860	azure.FutureAPI
17861	// Result returns the result of the asynchronous operation.
17862	// If the operation has not completed it will return an error.
17863	Result func(InboundNatRulesClient) (autorest.Response, error)
17864}
17865
17866// InboundSecurityRule NVA Inbound Security Rule resource.
17867type InboundSecurityRule struct {
17868	autorest.Response `json:"-"`
17869	// InboundSecurityRuleProperties - The properties of the Inbound Security Rules.
17870	*InboundSecurityRuleProperties `json:"properties,omitempty"`
17871	// Name - Name of security rule collection.
17872	Name *string `json:"name,omitempty"`
17873	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
17874	Etag *string `json:"etag,omitempty"`
17875	// Type - READ-ONLY; NVA inbound security rule type.
17876	Type *string `json:"type,omitempty"`
17877	// ID - Resource ID.
17878	ID *string `json:"id,omitempty"`
17879}
17880
17881// MarshalJSON is the custom marshaler for InboundSecurityRule.
17882func (isr InboundSecurityRule) MarshalJSON() ([]byte, error) {
17883	objectMap := make(map[string]interface{})
17884	if isr.InboundSecurityRuleProperties != nil {
17885		objectMap["properties"] = isr.InboundSecurityRuleProperties
17886	}
17887	if isr.Name != nil {
17888		objectMap["name"] = isr.Name
17889	}
17890	if isr.ID != nil {
17891		objectMap["id"] = isr.ID
17892	}
17893	return json.Marshal(objectMap)
17894}
17895
17896// UnmarshalJSON is the custom unmarshaler for InboundSecurityRule struct.
17897func (isr *InboundSecurityRule) UnmarshalJSON(body []byte) error {
17898	var m map[string]*json.RawMessage
17899	err := json.Unmarshal(body, &m)
17900	if err != nil {
17901		return err
17902	}
17903	for k, v := range m {
17904		switch k {
17905		case "properties":
17906			if v != nil {
17907				var inboundSecurityRuleProperties InboundSecurityRuleProperties
17908				err = json.Unmarshal(*v, &inboundSecurityRuleProperties)
17909				if err != nil {
17910					return err
17911				}
17912				isr.InboundSecurityRuleProperties = &inboundSecurityRuleProperties
17913			}
17914		case "name":
17915			if v != nil {
17916				var name string
17917				err = json.Unmarshal(*v, &name)
17918				if err != nil {
17919					return err
17920				}
17921				isr.Name = &name
17922			}
17923		case "etag":
17924			if v != nil {
17925				var etag string
17926				err = json.Unmarshal(*v, &etag)
17927				if err != nil {
17928					return err
17929				}
17930				isr.Etag = &etag
17931			}
17932		case "type":
17933			if v != nil {
17934				var typeVar string
17935				err = json.Unmarshal(*v, &typeVar)
17936				if err != nil {
17937					return err
17938				}
17939				isr.Type = &typeVar
17940			}
17941		case "id":
17942			if v != nil {
17943				var ID string
17944				err = json.Unmarshal(*v, &ID)
17945				if err != nil {
17946					return err
17947				}
17948				isr.ID = &ID
17949			}
17950		}
17951	}
17952
17953	return nil
17954}
17955
17956// InboundSecurityRuleCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17957// long-running operation.
17958type InboundSecurityRuleCreateOrUpdateFuture struct {
17959	azure.FutureAPI
17960	// Result returns the result of the asynchronous operation.
17961	// If the operation has not completed it will return an error.
17962	Result func(InboundSecurityRuleClient) (InboundSecurityRule, error)
17963}
17964
17965// InboundSecurityRuleProperties properties of the Inbound Security Rules resource.
17966type InboundSecurityRuleProperties struct {
17967	// Rules - List of allowed rules.
17968	Rules *[]InboundSecurityRules `json:"rules,omitempty"`
17969	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17970	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17971}
17972
17973// MarshalJSON is the custom marshaler for InboundSecurityRuleProperties.
17974func (isrp InboundSecurityRuleProperties) MarshalJSON() ([]byte, error) {
17975	objectMap := make(map[string]interface{})
17976	if isrp.Rules != nil {
17977		objectMap["rules"] = isrp.Rules
17978	}
17979	return json.Marshal(objectMap)
17980}
17981
17982// InboundSecurityRules properties of the Inbound Security Rules resource.
17983type InboundSecurityRules struct {
17984	// Protocol - Protocol. This should be either TCP or UDP. Possible values include: 'InboundSecurityRulesProtocolTCP', 'InboundSecurityRulesProtocolUDP'
17985	Protocol InboundSecurityRulesProtocol `json:"protocol,omitempty"`
17986	// SourceAddressPrefix - The CIDR or source IP range. Only /30, /31 and /32 Ip ranges are allowed.
17987	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
17988	// DestinationPortRange - NVA port ranges to be opened up. One needs to provide specific ports.
17989	DestinationPortRange *int32 `json:"destinationPortRange,omitempty"`
17990}
17991
17992// IntentPolicy network Intent Policy resource.
17993type IntentPolicy struct {
17994	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
17995	Etag *string `json:"etag,omitempty"`
17996	// ID - Resource ID.
17997	ID *string `json:"id,omitempty"`
17998	// Name - READ-ONLY; Resource name.
17999	Name *string `json:"name,omitempty"`
18000	// Type - READ-ONLY; Resource type.
18001	Type *string `json:"type,omitempty"`
18002	// Location - Resource location.
18003	Location *string `json:"location,omitempty"`
18004	// Tags - Resource tags.
18005	Tags map[string]*string `json:"tags"`
18006}
18007
18008// MarshalJSON is the custom marshaler for IntentPolicy.
18009func (IP IntentPolicy) MarshalJSON() ([]byte, error) {
18010	objectMap := make(map[string]interface{})
18011	if IP.ID != nil {
18012		objectMap["id"] = IP.ID
18013	}
18014	if IP.Location != nil {
18015		objectMap["location"] = IP.Location
18016	}
18017	if IP.Tags != nil {
18018		objectMap["tags"] = IP.Tags
18019	}
18020	return json.Marshal(objectMap)
18021}
18022
18023// IntentPolicyConfiguration details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest.
18024type IntentPolicyConfiguration struct {
18025	// NetworkIntentPolicyName - The name of the Network Intent Policy for storing in target subscription.
18026	NetworkIntentPolicyName *string `json:"networkIntentPolicyName,omitempty"`
18027	// SourceNetworkIntentPolicy - Source network intent policy.
18028	SourceNetworkIntentPolicy *IntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"`
18029}
18030
18031// Interface a network interface in a resource group.
18032type Interface struct {
18033	autorest.Response `json:"-"`
18034	// ExtendedLocation - The extended location of the network interface.
18035	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
18036	// InterfacePropertiesFormat - Properties of the network interface.
18037	*InterfacePropertiesFormat `json:"properties,omitempty"`
18038	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
18039	Etag *string `json:"etag,omitempty"`
18040	// ID - Resource ID.
18041	ID *string `json:"id,omitempty"`
18042	// Name - READ-ONLY; Resource name.
18043	Name *string `json:"name,omitempty"`
18044	// Type - READ-ONLY; Resource type.
18045	Type *string `json:"type,omitempty"`
18046	// Location - Resource location.
18047	Location *string `json:"location,omitempty"`
18048	// Tags - Resource tags.
18049	Tags map[string]*string `json:"tags"`
18050}
18051
18052// MarshalJSON is the custom marshaler for Interface.
18053func (i Interface) MarshalJSON() ([]byte, error) {
18054	objectMap := make(map[string]interface{})
18055	if i.ExtendedLocation != nil {
18056		objectMap["extendedLocation"] = i.ExtendedLocation
18057	}
18058	if i.InterfacePropertiesFormat != nil {
18059		objectMap["properties"] = i.InterfacePropertiesFormat
18060	}
18061	if i.ID != nil {
18062		objectMap["id"] = i.ID
18063	}
18064	if i.Location != nil {
18065		objectMap["location"] = i.Location
18066	}
18067	if i.Tags != nil {
18068		objectMap["tags"] = i.Tags
18069	}
18070	return json.Marshal(objectMap)
18071}
18072
18073// UnmarshalJSON is the custom unmarshaler for Interface struct.
18074func (i *Interface) UnmarshalJSON(body []byte) error {
18075	var m map[string]*json.RawMessage
18076	err := json.Unmarshal(body, &m)
18077	if err != nil {
18078		return err
18079	}
18080	for k, v := range m {
18081		switch k {
18082		case "extendedLocation":
18083			if v != nil {
18084				var extendedLocation ExtendedLocation
18085				err = json.Unmarshal(*v, &extendedLocation)
18086				if err != nil {
18087					return err
18088				}
18089				i.ExtendedLocation = &extendedLocation
18090			}
18091		case "properties":
18092			if v != nil {
18093				var interfacePropertiesFormat InterfacePropertiesFormat
18094				err = json.Unmarshal(*v, &interfacePropertiesFormat)
18095				if err != nil {
18096					return err
18097				}
18098				i.InterfacePropertiesFormat = &interfacePropertiesFormat
18099			}
18100		case "etag":
18101			if v != nil {
18102				var etag string
18103				err = json.Unmarshal(*v, &etag)
18104				if err != nil {
18105					return err
18106				}
18107				i.Etag = &etag
18108			}
18109		case "id":
18110			if v != nil {
18111				var ID string
18112				err = json.Unmarshal(*v, &ID)
18113				if err != nil {
18114					return err
18115				}
18116				i.ID = &ID
18117			}
18118		case "name":
18119			if v != nil {
18120				var name string
18121				err = json.Unmarshal(*v, &name)
18122				if err != nil {
18123					return err
18124				}
18125				i.Name = &name
18126			}
18127		case "type":
18128			if v != nil {
18129				var typeVar string
18130				err = json.Unmarshal(*v, &typeVar)
18131				if err != nil {
18132					return err
18133				}
18134				i.Type = &typeVar
18135			}
18136		case "location":
18137			if v != nil {
18138				var location string
18139				err = json.Unmarshal(*v, &location)
18140				if err != nil {
18141					return err
18142				}
18143				i.Location = &location
18144			}
18145		case "tags":
18146			if v != nil {
18147				var tags map[string]*string
18148				err = json.Unmarshal(*v, &tags)
18149				if err != nil {
18150					return err
18151				}
18152				i.Tags = tags
18153			}
18154		}
18155	}
18156
18157	return nil
18158}
18159
18160// InterfaceAssociation network interface and its custom security rules.
18161type InterfaceAssociation struct {
18162	// ID - READ-ONLY; Network interface ID.
18163	ID *string `json:"id,omitempty"`
18164	// SecurityRules - Collection of custom security rules.
18165	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
18166}
18167
18168// MarshalJSON is the custom marshaler for InterfaceAssociation.
18169func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
18170	objectMap := make(map[string]interface{})
18171	if ia.SecurityRules != nil {
18172		objectMap["securityRules"] = ia.SecurityRules
18173	}
18174	return json.Marshal(objectMap)
18175}
18176
18177// InterfaceDNSSettings DNS settings of a network interface.
18178type InterfaceDNSSettings struct {
18179	// 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.
18180	DNSServers *[]string `json:"dnsServers,omitempty"`
18181	// 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.
18182	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
18183	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
18184	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
18185	// InternalFqdn - READ-ONLY; Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
18186	InternalFqdn *string `json:"internalFqdn,omitempty"`
18187	// 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.
18188	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
18189}
18190
18191// MarshalJSON is the custom marshaler for InterfaceDNSSettings.
18192func (ids InterfaceDNSSettings) MarshalJSON() ([]byte, error) {
18193	objectMap := make(map[string]interface{})
18194	if ids.DNSServers != nil {
18195		objectMap["dnsServers"] = ids.DNSServers
18196	}
18197	if ids.InternalDNSNameLabel != nil {
18198		objectMap["internalDnsNameLabel"] = ids.InternalDNSNameLabel
18199	}
18200	return json.Marshal(objectMap)
18201}
18202
18203// InterfaceIPConfiguration iPConfiguration in a network interface.
18204type InterfaceIPConfiguration struct {
18205	autorest.Response `json:"-"`
18206	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
18207	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
18208	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18209	Name *string `json:"name,omitempty"`
18210	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
18211	Etag *string `json:"etag,omitempty"`
18212	// ID - Resource ID.
18213	ID *string `json:"id,omitempty"`
18214}
18215
18216// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
18217func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
18218	objectMap := make(map[string]interface{})
18219	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
18220		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
18221	}
18222	if iic.Name != nil {
18223		objectMap["name"] = iic.Name
18224	}
18225	if iic.ID != nil {
18226		objectMap["id"] = iic.ID
18227	}
18228	return json.Marshal(objectMap)
18229}
18230
18231// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
18232func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
18233	var m map[string]*json.RawMessage
18234	err := json.Unmarshal(body, &m)
18235	if err != nil {
18236		return err
18237	}
18238	for k, v := range m {
18239		switch k {
18240		case "properties":
18241			if v != nil {
18242				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
18243				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
18244				if err != nil {
18245					return err
18246				}
18247				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
18248			}
18249		case "name":
18250			if v != nil {
18251				var name string
18252				err = json.Unmarshal(*v, &name)
18253				if err != nil {
18254					return err
18255				}
18256				iic.Name = &name
18257			}
18258		case "etag":
18259			if v != nil {
18260				var etag string
18261				err = json.Unmarshal(*v, &etag)
18262				if err != nil {
18263					return err
18264				}
18265				iic.Etag = &etag
18266			}
18267		case "id":
18268			if v != nil {
18269				var ID string
18270				err = json.Unmarshal(*v, &ID)
18271				if err != nil {
18272					return err
18273				}
18274				iic.ID = &ID
18275			}
18276		}
18277	}
18278
18279	return nil
18280}
18281
18282// InterfaceIPConfigurationListResult response for list ip configurations API service call.
18283type InterfaceIPConfigurationListResult struct {
18284	autorest.Response `json:"-"`
18285	// Value - A list of ip configurations.
18286	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
18287	// NextLink - READ-ONLY; The URL to get the next set of results.
18288	NextLink *string `json:"nextLink,omitempty"`
18289}
18290
18291// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
18292func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
18293	objectMap := make(map[string]interface{})
18294	if iiclr.Value != nil {
18295		objectMap["value"] = iiclr.Value
18296	}
18297	return json.Marshal(objectMap)
18298}
18299
18300// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
18301// InterfaceIPConfiguration values.
18302type InterfaceIPConfigurationListResultIterator struct {
18303	i    int
18304	page InterfaceIPConfigurationListResultPage
18305}
18306
18307// NextWithContext advances to the next value.  If there was an error making
18308// the request the iterator does not advance and the error is returned.
18309func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
18310	if tracing.IsEnabled() {
18311		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
18312		defer func() {
18313			sc := -1
18314			if iter.Response().Response.Response != nil {
18315				sc = iter.Response().Response.Response.StatusCode
18316			}
18317			tracing.EndSpan(ctx, sc, err)
18318		}()
18319	}
18320	iter.i++
18321	if iter.i < len(iter.page.Values()) {
18322		return nil
18323	}
18324	err = iter.page.NextWithContext(ctx)
18325	if err != nil {
18326		iter.i--
18327		return err
18328	}
18329	iter.i = 0
18330	return nil
18331}
18332
18333// Next advances to the next value.  If there was an error making
18334// the request the iterator does not advance and the error is returned.
18335// Deprecated: Use NextWithContext() instead.
18336func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
18337	return iter.NextWithContext(context.Background())
18338}
18339
18340// NotDone returns true if the enumeration should be started or is not yet complete.
18341func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
18342	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18343}
18344
18345// Response returns the raw server response from the last page request.
18346func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
18347	return iter.page.Response()
18348}
18349
18350// Value returns the current value or a zero-initialized value if the
18351// iterator has advanced beyond the end of the collection.
18352func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
18353	if !iter.page.NotDone() {
18354		return InterfaceIPConfiguration{}
18355	}
18356	return iter.page.Values()[iter.i]
18357}
18358
18359// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
18360func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
18361	return InterfaceIPConfigurationListResultIterator{page: page}
18362}
18363
18364// IsEmpty returns true if the ListResult contains no values.
18365func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
18366	return iiclr.Value == nil || len(*iiclr.Value) == 0
18367}
18368
18369// hasNextLink returns true if the NextLink is not empty.
18370func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
18371	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
18372}
18373
18374// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
18375// It returns nil if no more results exist.
18376func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
18377	if !iiclr.hasNextLink() {
18378		return nil, nil
18379	}
18380	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18381		autorest.AsJSON(),
18382		autorest.AsGet(),
18383		autorest.WithBaseURL(to.String(iiclr.NextLink)))
18384}
18385
18386// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
18387type InterfaceIPConfigurationListResultPage struct {
18388	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
18389	iiclr InterfaceIPConfigurationListResult
18390}
18391
18392// NextWithContext advances to the next page of values.  If there was an error making
18393// the request the page does not advance and the error is returned.
18394func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
18395	if tracing.IsEnabled() {
18396		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
18397		defer func() {
18398			sc := -1
18399			if page.Response().Response.Response != nil {
18400				sc = page.Response().Response.Response.StatusCode
18401			}
18402			tracing.EndSpan(ctx, sc, err)
18403		}()
18404	}
18405	for {
18406		next, err := page.fn(ctx, page.iiclr)
18407		if err != nil {
18408			return err
18409		}
18410		page.iiclr = next
18411		if !next.hasNextLink() || !next.IsEmpty() {
18412			break
18413		}
18414	}
18415	return nil
18416}
18417
18418// Next advances to the next page of values.  If there was an error making
18419// the request the page does not advance and the error is returned.
18420// Deprecated: Use NextWithContext() instead.
18421func (page *InterfaceIPConfigurationListResultPage) Next() error {
18422	return page.NextWithContext(context.Background())
18423}
18424
18425// NotDone returns true if the page enumeration should be started or is not yet complete.
18426func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
18427	return !page.iiclr.IsEmpty()
18428}
18429
18430// Response returns the raw server response from the last page request.
18431func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
18432	return page.iiclr
18433}
18434
18435// Values returns the slice of values for the current page or nil if there are no values.
18436func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
18437	if page.iiclr.IsEmpty() {
18438		return nil
18439	}
18440	return *page.iiclr.Value
18441}
18442
18443// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
18444func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
18445	return InterfaceIPConfigurationListResultPage{
18446		fn:    getNextPage,
18447		iiclr: cur,
18448	}
18449}
18450
18451// InterfaceIPConfigurationPrivateLinkConnectionProperties privateLinkConnection properties for the network
18452// interface.
18453type InterfaceIPConfigurationPrivateLinkConnectionProperties struct {
18454	// GroupID - READ-ONLY; The group ID for current private link connection.
18455	GroupID *string `json:"groupId,omitempty"`
18456	// RequiredMemberName - READ-ONLY; The required member name for current private link connection.
18457	RequiredMemberName *string `json:"requiredMemberName,omitempty"`
18458	// Fqdns - READ-ONLY; List of FQDNs for current private link connection.
18459	Fqdns *[]string `json:"fqdns,omitempty"`
18460}
18461
18462// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
18463type InterfaceIPConfigurationPropertiesFormat struct {
18464	// VirtualNetworkTaps - The reference to Virtual Network Taps.
18465	VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"`
18466	// ApplicationGatewayBackendAddressPools - The reference to ApplicationGatewayBackendAddressPool resource.
18467	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
18468	// LoadBalancerBackendAddressPools - The reference to LoadBalancerBackendAddressPool resource.
18469	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
18470	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
18471	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
18472	// PrivateIPAddress - Private IP address of the IP configuration.
18473	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
18474	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
18475	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
18476	// PrivateIPAddressVersion - Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPv4', 'IPv6'
18477	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
18478	// Subnet - Subnet bound to the IP configuration.
18479	Subnet *Subnet `json:"subnet,omitempty"`
18480	// Primary - Whether this is a primary customer address on the network interface.
18481	Primary *bool `json:"primary,omitempty"`
18482	// PublicIPAddress - Public IP address bound to the IP configuration.
18483	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
18484	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
18485	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
18486	// ProvisioningState - READ-ONLY; The provisioning state of the network interface IP configuration. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
18487	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
18488	// PrivateLinkConnectionProperties - READ-ONLY; PrivateLinkConnection properties for the network interface.
18489	PrivateLinkConnectionProperties *InterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"`
18490}
18491
18492// MarshalJSON is the custom marshaler for InterfaceIPConfigurationPropertiesFormat.
18493func (iicpf InterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
18494	objectMap := make(map[string]interface{})
18495	if iicpf.VirtualNetworkTaps != nil {
18496		objectMap["virtualNetworkTaps"] = iicpf.VirtualNetworkTaps
18497	}
18498	if iicpf.ApplicationGatewayBackendAddressPools != nil {
18499		objectMap["applicationGatewayBackendAddressPools"] = iicpf.ApplicationGatewayBackendAddressPools
18500	}
18501	if iicpf.LoadBalancerBackendAddressPools != nil {
18502		objectMap["loadBalancerBackendAddressPools"] = iicpf.LoadBalancerBackendAddressPools
18503	}
18504	if iicpf.LoadBalancerInboundNatRules != nil {
18505		objectMap["loadBalancerInboundNatRules"] = iicpf.LoadBalancerInboundNatRules
18506	}
18507	if iicpf.PrivateIPAddress != nil {
18508		objectMap["privateIPAddress"] = iicpf.PrivateIPAddress
18509	}
18510	if iicpf.PrivateIPAllocationMethod != "" {
18511		objectMap["privateIPAllocationMethod"] = iicpf.PrivateIPAllocationMethod
18512	}
18513	if iicpf.PrivateIPAddressVersion != "" {
18514		objectMap["privateIPAddressVersion"] = iicpf.PrivateIPAddressVersion
18515	}
18516	if iicpf.Subnet != nil {
18517		objectMap["subnet"] = iicpf.Subnet
18518	}
18519	if iicpf.Primary != nil {
18520		objectMap["primary"] = iicpf.Primary
18521	}
18522	if iicpf.PublicIPAddress != nil {
18523		objectMap["publicIPAddress"] = iicpf.PublicIPAddress
18524	}
18525	if iicpf.ApplicationSecurityGroups != nil {
18526		objectMap["applicationSecurityGroups"] = iicpf.ApplicationSecurityGroups
18527	}
18528	return json.Marshal(objectMap)
18529}
18530
18531// InterfaceListResult response for the ListNetworkInterface API service call.
18532type InterfaceListResult struct {
18533	autorest.Response `json:"-"`
18534	// Value - A list of network interfaces in a resource group.
18535	Value *[]Interface `json:"value,omitempty"`
18536	// NextLink - READ-ONLY; The URL to get the next set of results.
18537	NextLink *string `json:"nextLink,omitempty"`
18538}
18539
18540// MarshalJSON is the custom marshaler for InterfaceListResult.
18541func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
18542	objectMap := make(map[string]interface{})
18543	if ilr.Value != nil {
18544		objectMap["value"] = ilr.Value
18545	}
18546	return json.Marshal(objectMap)
18547}
18548
18549// InterfaceListResultIterator provides access to a complete listing of Interface values.
18550type InterfaceListResultIterator struct {
18551	i    int
18552	page InterfaceListResultPage
18553}
18554
18555// NextWithContext advances to the next value.  If there was an error making
18556// the request the iterator does not advance and the error is returned.
18557func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
18558	if tracing.IsEnabled() {
18559		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
18560		defer func() {
18561			sc := -1
18562			if iter.Response().Response.Response != nil {
18563				sc = iter.Response().Response.Response.StatusCode
18564			}
18565			tracing.EndSpan(ctx, sc, err)
18566		}()
18567	}
18568	iter.i++
18569	if iter.i < len(iter.page.Values()) {
18570		return nil
18571	}
18572	err = iter.page.NextWithContext(ctx)
18573	if err != nil {
18574		iter.i--
18575		return err
18576	}
18577	iter.i = 0
18578	return nil
18579}
18580
18581// Next advances to the next value.  If there was an error making
18582// the request the iterator does not advance and the error is returned.
18583// Deprecated: Use NextWithContext() instead.
18584func (iter *InterfaceListResultIterator) Next() error {
18585	return iter.NextWithContext(context.Background())
18586}
18587
18588// NotDone returns true if the enumeration should be started or is not yet complete.
18589func (iter InterfaceListResultIterator) NotDone() bool {
18590	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18591}
18592
18593// Response returns the raw server response from the last page request.
18594func (iter InterfaceListResultIterator) Response() InterfaceListResult {
18595	return iter.page.Response()
18596}
18597
18598// Value returns the current value or a zero-initialized value if the
18599// iterator has advanced beyond the end of the collection.
18600func (iter InterfaceListResultIterator) Value() Interface {
18601	if !iter.page.NotDone() {
18602		return Interface{}
18603	}
18604	return iter.page.Values()[iter.i]
18605}
18606
18607// Creates a new instance of the InterfaceListResultIterator type.
18608func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
18609	return InterfaceListResultIterator{page: page}
18610}
18611
18612// IsEmpty returns true if the ListResult contains no values.
18613func (ilr InterfaceListResult) IsEmpty() bool {
18614	return ilr.Value == nil || len(*ilr.Value) == 0
18615}
18616
18617// hasNextLink returns true if the NextLink is not empty.
18618func (ilr InterfaceListResult) hasNextLink() bool {
18619	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
18620}
18621
18622// interfaceListResultPreparer prepares a request to retrieve the next set of results.
18623// It returns nil if no more results exist.
18624func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
18625	if !ilr.hasNextLink() {
18626		return nil, nil
18627	}
18628	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18629		autorest.AsJSON(),
18630		autorest.AsGet(),
18631		autorest.WithBaseURL(to.String(ilr.NextLink)))
18632}
18633
18634// InterfaceListResultPage contains a page of Interface values.
18635type InterfaceListResultPage struct {
18636	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
18637	ilr InterfaceListResult
18638}
18639
18640// NextWithContext advances to the next page of values.  If there was an error making
18641// the request the page does not advance and the error is returned.
18642func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
18643	if tracing.IsEnabled() {
18644		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
18645		defer func() {
18646			sc := -1
18647			if page.Response().Response.Response != nil {
18648				sc = page.Response().Response.Response.StatusCode
18649			}
18650			tracing.EndSpan(ctx, sc, err)
18651		}()
18652	}
18653	for {
18654		next, err := page.fn(ctx, page.ilr)
18655		if err != nil {
18656			return err
18657		}
18658		page.ilr = next
18659		if !next.hasNextLink() || !next.IsEmpty() {
18660			break
18661		}
18662	}
18663	return nil
18664}
18665
18666// Next advances to the next page of values.  If there was an error making
18667// the request the page does not advance and the error is returned.
18668// Deprecated: Use NextWithContext() instead.
18669func (page *InterfaceListResultPage) Next() error {
18670	return page.NextWithContext(context.Background())
18671}
18672
18673// NotDone returns true if the page enumeration should be started or is not yet complete.
18674func (page InterfaceListResultPage) NotDone() bool {
18675	return !page.ilr.IsEmpty()
18676}
18677
18678// Response returns the raw server response from the last page request.
18679func (page InterfaceListResultPage) Response() InterfaceListResult {
18680	return page.ilr
18681}
18682
18683// Values returns the slice of values for the current page or nil if there are no values.
18684func (page InterfaceListResultPage) Values() []Interface {
18685	if page.ilr.IsEmpty() {
18686		return nil
18687	}
18688	return *page.ilr.Value
18689}
18690
18691// Creates a new instance of the InterfaceListResultPage type.
18692func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
18693	return InterfaceListResultPage{
18694		fn:  getNextPage,
18695		ilr: cur,
18696	}
18697}
18698
18699// InterfaceLoadBalancerListResult response for list ip configurations API service call.
18700type InterfaceLoadBalancerListResult struct {
18701	autorest.Response `json:"-"`
18702	// Value - A list of load balancers.
18703	Value *[]LoadBalancer `json:"value,omitempty"`
18704	// NextLink - READ-ONLY; The URL to get the next set of results.
18705	NextLink *string `json:"nextLink,omitempty"`
18706}
18707
18708// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
18709func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
18710	objectMap := make(map[string]interface{})
18711	if ilblr.Value != nil {
18712		objectMap["value"] = ilblr.Value
18713	}
18714	return json.Marshal(objectMap)
18715}
18716
18717// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
18718type InterfaceLoadBalancerListResultIterator struct {
18719	i    int
18720	page InterfaceLoadBalancerListResultPage
18721}
18722
18723// NextWithContext advances to the next value.  If there was an error making
18724// the request the iterator does not advance and the error is returned.
18725func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
18726	if tracing.IsEnabled() {
18727		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
18728		defer func() {
18729			sc := -1
18730			if iter.Response().Response.Response != nil {
18731				sc = iter.Response().Response.Response.StatusCode
18732			}
18733			tracing.EndSpan(ctx, sc, err)
18734		}()
18735	}
18736	iter.i++
18737	if iter.i < len(iter.page.Values()) {
18738		return nil
18739	}
18740	err = iter.page.NextWithContext(ctx)
18741	if err != nil {
18742		iter.i--
18743		return err
18744	}
18745	iter.i = 0
18746	return nil
18747}
18748
18749// Next advances to the next value.  If there was an error making
18750// the request the iterator does not advance and the error is returned.
18751// Deprecated: Use NextWithContext() instead.
18752func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
18753	return iter.NextWithContext(context.Background())
18754}
18755
18756// NotDone returns true if the enumeration should be started or is not yet complete.
18757func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
18758	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18759}
18760
18761// Response returns the raw server response from the last page request.
18762func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
18763	return iter.page.Response()
18764}
18765
18766// Value returns the current value or a zero-initialized value if the
18767// iterator has advanced beyond the end of the collection.
18768func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
18769	if !iter.page.NotDone() {
18770		return LoadBalancer{}
18771	}
18772	return iter.page.Values()[iter.i]
18773}
18774
18775// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
18776func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
18777	return InterfaceLoadBalancerListResultIterator{page: page}
18778}
18779
18780// IsEmpty returns true if the ListResult contains no values.
18781func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
18782	return ilblr.Value == nil || len(*ilblr.Value) == 0
18783}
18784
18785// hasNextLink returns true if the NextLink is not empty.
18786func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
18787	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
18788}
18789
18790// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
18791// It returns nil if no more results exist.
18792func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
18793	if !ilblr.hasNextLink() {
18794		return nil, nil
18795	}
18796	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18797		autorest.AsJSON(),
18798		autorest.AsGet(),
18799		autorest.WithBaseURL(to.String(ilblr.NextLink)))
18800}
18801
18802// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
18803type InterfaceLoadBalancerListResultPage struct {
18804	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
18805	ilblr InterfaceLoadBalancerListResult
18806}
18807
18808// NextWithContext advances to the next page of values.  If there was an error making
18809// the request the page does not advance and the error is returned.
18810func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
18811	if tracing.IsEnabled() {
18812		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
18813		defer func() {
18814			sc := -1
18815			if page.Response().Response.Response != nil {
18816				sc = page.Response().Response.Response.StatusCode
18817			}
18818			tracing.EndSpan(ctx, sc, err)
18819		}()
18820	}
18821	for {
18822		next, err := page.fn(ctx, page.ilblr)
18823		if err != nil {
18824			return err
18825		}
18826		page.ilblr = next
18827		if !next.hasNextLink() || !next.IsEmpty() {
18828			break
18829		}
18830	}
18831	return nil
18832}
18833
18834// Next advances to the next page of values.  If there was an error making
18835// the request the page does not advance and the error is returned.
18836// Deprecated: Use NextWithContext() instead.
18837func (page *InterfaceLoadBalancerListResultPage) Next() error {
18838	return page.NextWithContext(context.Background())
18839}
18840
18841// NotDone returns true if the page enumeration should be started or is not yet complete.
18842func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
18843	return !page.ilblr.IsEmpty()
18844}
18845
18846// Response returns the raw server response from the last page request.
18847func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
18848	return page.ilblr
18849}
18850
18851// Values returns the slice of values for the current page or nil if there are no values.
18852func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
18853	if page.ilblr.IsEmpty() {
18854		return nil
18855	}
18856	return *page.ilblr.Value
18857}
18858
18859// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
18860func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
18861	return InterfaceLoadBalancerListResultPage{
18862		fn:    getNextPage,
18863		ilblr: cur,
18864	}
18865}
18866
18867// InterfacePropertiesFormat networkInterface properties.
18868type InterfacePropertiesFormat struct {
18869	// VirtualMachine - READ-ONLY; The reference to a virtual machine.
18870	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
18871	// NetworkSecurityGroup - The reference to the NetworkSecurityGroup resource.
18872	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
18873	// PrivateEndpoint - READ-ONLY; A reference to the private endpoint to which the network interface is linked.
18874	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
18875	// IPConfigurations - A list of IPConfigurations of the network interface.
18876	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
18877	// TapConfigurations - READ-ONLY; A list of TapConfigurations of the network interface.
18878	TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"`
18879	// DNSSettings - The DNS settings in network interface.
18880	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
18881	// MacAddress - READ-ONLY; The MAC address of the network interface.
18882	MacAddress *string `json:"macAddress,omitempty"`
18883	// Primary - READ-ONLY; Whether this is a primary network interface on a virtual machine.
18884	Primary *bool `json:"primary,omitempty"`
18885	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
18886	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
18887	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
18888	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
18889	// HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources.
18890	HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"`
18891	// DscpConfiguration - READ-ONLY; A reference to the dscp configuration to which the network interface is linked.
18892	DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"`
18893	// ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource.
18894	ResourceGUID *string `json:"resourceGuid,omitempty"`
18895	// ProvisioningState - READ-ONLY; The provisioning state of the network interface resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
18896	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
18897}
18898
18899// MarshalJSON is the custom marshaler for InterfacePropertiesFormat.
18900func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
18901	objectMap := make(map[string]interface{})
18902	if ipf.NetworkSecurityGroup != nil {
18903		objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup
18904	}
18905	if ipf.IPConfigurations != nil {
18906		objectMap["ipConfigurations"] = ipf.IPConfigurations
18907	}
18908	if ipf.DNSSettings != nil {
18909		objectMap["dnsSettings"] = ipf.DNSSettings
18910	}
18911	if ipf.EnableAcceleratedNetworking != nil {
18912		objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking
18913	}
18914	if ipf.EnableIPForwarding != nil {
18915		objectMap["enableIPForwarding"] = ipf.EnableIPForwarding
18916	}
18917	return json.Marshal(objectMap)
18918}
18919
18920// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18921// long-running operation.
18922type InterfacesCreateOrUpdateFuture struct {
18923	azure.FutureAPI
18924	// Result returns the result of the asynchronous operation.
18925	// If the operation has not completed it will return an error.
18926	Result func(InterfacesClient) (Interface, error)
18927}
18928
18929// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18930// operation.
18931type InterfacesDeleteFuture struct {
18932	azure.FutureAPI
18933	// Result returns the result of the asynchronous operation.
18934	// If the operation has not completed it will return an error.
18935	Result func(InterfacesClient) (autorest.Response, error)
18936}
18937
18938// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
18939// long-running operation.
18940type InterfacesGetEffectiveRouteTableFuture struct {
18941	azure.FutureAPI
18942	// Result returns the result of the asynchronous operation.
18943	// If the operation has not completed it will return an error.
18944	Result func(InterfacesClient) (EffectiveRouteListResult, error)
18945}
18946
18947// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
18948// results of a long-running operation.
18949type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
18950	azure.FutureAPI
18951	// Result returns the result of the asynchronous operation.
18952	// If the operation has not completed it will return an error.
18953	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
18954}
18955
18956// InterfaceTapConfiguration tap configuration in a Network Interface.
18957type InterfaceTapConfiguration struct {
18958	autorest.Response `json:"-"`
18959	// InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration.
18960	*InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"`
18961	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18962	Name *string `json:"name,omitempty"`
18963	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
18964	Etag *string `json:"etag,omitempty"`
18965	// Type - READ-ONLY; Sub Resource type.
18966	Type *string `json:"type,omitempty"`
18967	// ID - Resource ID.
18968	ID *string `json:"id,omitempty"`
18969}
18970
18971// MarshalJSON is the custom marshaler for InterfaceTapConfiguration.
18972func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) {
18973	objectMap := make(map[string]interface{})
18974	if itc.InterfaceTapConfigurationPropertiesFormat != nil {
18975		objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat
18976	}
18977	if itc.Name != nil {
18978		objectMap["name"] = itc.Name
18979	}
18980	if itc.ID != nil {
18981		objectMap["id"] = itc.ID
18982	}
18983	return json.Marshal(objectMap)
18984}
18985
18986// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct.
18987func (itc *InterfaceTapConfiguration) UnmarshalJSON(body []byte) error {
18988	var m map[string]*json.RawMessage
18989	err := json.Unmarshal(body, &m)
18990	if err != nil {
18991		return err
18992	}
18993	for k, v := range m {
18994		switch k {
18995		case "properties":
18996			if v != nil {
18997				var interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat
18998				err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat)
18999				if err != nil {
19000					return err
19001				}
19002				itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat
19003			}
19004		case "name":
19005			if v != nil {
19006				var name string
19007				err = json.Unmarshal(*v, &name)
19008				if err != nil {
19009					return err
19010				}
19011				itc.Name = &name
19012			}
19013		case "etag":
19014			if v != nil {
19015				var etag string
19016				err = json.Unmarshal(*v, &etag)
19017				if err != nil {
19018					return err
19019				}
19020				itc.Etag = &etag
19021			}
19022		case "type":
19023			if v != nil {
19024				var typeVar string
19025				err = json.Unmarshal(*v, &typeVar)
19026				if err != nil {
19027					return err
19028				}
19029				itc.Type = &typeVar
19030			}
19031		case "id":
19032			if v != nil {
19033				var ID string
19034				err = json.Unmarshal(*v, &ID)
19035				if err != nil {
19036					return err
19037				}
19038				itc.ID = &ID
19039			}
19040		}
19041	}
19042
19043	return nil
19044}
19045
19046// InterfaceTapConfigurationListResult response for list tap configurations API service call.
19047type InterfaceTapConfigurationListResult struct {
19048	autorest.Response `json:"-"`
19049	// Value - A list of tap configurations.
19050	Value *[]InterfaceTapConfiguration `json:"value,omitempty"`
19051	// NextLink - READ-ONLY; The URL to get the next set of results.
19052	NextLink *string `json:"nextLink,omitempty"`
19053}
19054
19055// MarshalJSON is the custom marshaler for InterfaceTapConfigurationListResult.
19056func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) {
19057	objectMap := make(map[string]interface{})
19058	if itclr.Value != nil {
19059		objectMap["value"] = itclr.Value
19060	}
19061	return json.Marshal(objectMap)
19062}
19063
19064// InterfaceTapConfigurationListResultIterator provides access to a complete listing of
19065// InterfaceTapConfiguration values.
19066type InterfaceTapConfigurationListResultIterator struct {
19067	i    int
19068	page InterfaceTapConfigurationListResultPage
19069}
19070
19071// NextWithContext advances to the next value.  If there was an error making
19072// the request the iterator does not advance and the error is returned.
19073func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
19074	if tracing.IsEnabled() {
19075		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.NextWithContext")
19076		defer func() {
19077			sc := -1
19078			if iter.Response().Response.Response != nil {
19079				sc = iter.Response().Response.Response.StatusCode
19080			}
19081			tracing.EndSpan(ctx, sc, err)
19082		}()
19083	}
19084	iter.i++
19085	if iter.i < len(iter.page.Values()) {
19086		return nil
19087	}
19088	err = iter.page.NextWithContext(ctx)
19089	if err != nil {
19090		iter.i--
19091		return err
19092	}
19093	iter.i = 0
19094	return nil
19095}
19096
19097// Next advances to the next value.  If there was an error making
19098// the request the iterator does not advance and the error is returned.
19099// Deprecated: Use NextWithContext() instead.
19100func (iter *InterfaceTapConfigurationListResultIterator) Next() error {
19101	return iter.NextWithContext(context.Background())
19102}
19103
19104// NotDone returns true if the enumeration should be started or is not yet complete.
19105func (iter InterfaceTapConfigurationListResultIterator) NotDone() bool {
19106	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19107}
19108
19109// Response returns the raw server response from the last page request.
19110func (iter InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult {
19111	return iter.page.Response()
19112}
19113
19114// Value returns the current value or a zero-initialized value if the
19115// iterator has advanced beyond the end of the collection.
19116func (iter InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration {
19117	if !iter.page.NotDone() {
19118		return InterfaceTapConfiguration{}
19119	}
19120	return iter.page.Values()[iter.i]
19121}
19122
19123// Creates a new instance of the InterfaceTapConfigurationListResultIterator type.
19124func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator {
19125	return InterfaceTapConfigurationListResultIterator{page: page}
19126}
19127
19128// IsEmpty returns true if the ListResult contains no values.
19129func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
19130	return itclr.Value == nil || len(*itclr.Value) == 0
19131}
19132
19133// hasNextLink returns true if the NextLink is not empty.
19134func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool {
19135	return itclr.NextLink != nil && len(*itclr.NextLink) != 0
19136}
19137
19138// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results.
19139// It returns nil if no more results exist.
19140func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
19141	if !itclr.hasNextLink() {
19142		return nil, nil
19143	}
19144	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19145		autorest.AsJSON(),
19146		autorest.AsGet(),
19147		autorest.WithBaseURL(to.String(itclr.NextLink)))
19148}
19149
19150// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values.
19151type InterfaceTapConfigurationListResultPage struct {
19152	fn    func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
19153	itclr InterfaceTapConfigurationListResult
19154}
19155
19156// NextWithContext advances to the next page of values.  If there was an error making
19157// the request the page does not advance and the error is returned.
19158func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
19159	if tracing.IsEnabled() {
19160		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext")
19161		defer func() {
19162			sc := -1
19163			if page.Response().Response.Response != nil {
19164				sc = page.Response().Response.Response.StatusCode
19165			}
19166			tracing.EndSpan(ctx, sc, err)
19167		}()
19168	}
19169	for {
19170		next, err := page.fn(ctx, page.itclr)
19171		if err != nil {
19172			return err
19173		}
19174		page.itclr = next
19175		if !next.hasNextLink() || !next.IsEmpty() {
19176			break
19177		}
19178	}
19179	return nil
19180}
19181
19182// Next advances to the next page of values.  If there was an error making
19183// the request the page does not advance and the error is returned.
19184// Deprecated: Use NextWithContext() instead.
19185func (page *InterfaceTapConfigurationListResultPage) Next() error {
19186	return page.NextWithContext(context.Background())
19187}
19188
19189// NotDone returns true if the page enumeration should be started or is not yet complete.
19190func (page InterfaceTapConfigurationListResultPage) NotDone() bool {
19191	return !page.itclr.IsEmpty()
19192}
19193
19194// Response returns the raw server response from the last page request.
19195func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult {
19196	return page.itclr
19197}
19198
19199// Values returns the slice of values for the current page or nil if there are no values.
19200func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration {
19201	if page.itclr.IsEmpty() {
19202		return nil
19203	}
19204	return *page.itclr.Value
19205}
19206
19207// Creates a new instance of the InterfaceTapConfigurationListResultPage type.
19208func NewInterfaceTapConfigurationListResultPage(cur InterfaceTapConfigurationListResult, getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage {
19209	return InterfaceTapConfigurationListResultPage{
19210		fn:    getNextPage,
19211		itclr: cur,
19212	}
19213}
19214
19215// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration.
19216type InterfaceTapConfigurationPropertiesFormat struct {
19217	// VirtualNetworkTap - The reference to the Virtual Network Tap resource.
19218	VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"`
19219	// ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
19220	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19221}
19222
19223// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat.
19224func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
19225	objectMap := make(map[string]interface{})
19226	if itcpf.VirtualNetworkTap != nil {
19227		objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap
19228	}
19229	return json.Marshal(objectMap)
19230}
19231
19232// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
19233// of a long-running operation.
19234type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
19235	azure.FutureAPI
19236	// Result returns the result of the asynchronous operation.
19237	// If the operation has not completed it will return an error.
19238	Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error)
19239}
19240
19241// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
19242// long-running operation.
19243type InterfaceTapConfigurationsDeleteFuture struct {
19244	azure.FutureAPI
19245	// Result returns the result of the asynchronous operation.
19246	// If the operation has not completed it will return an error.
19247	Result func(InterfaceTapConfigurationsClient) (autorest.Response, error)
19248}
19249
19250// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call.
19251type IPAddressAvailabilityResult struct {
19252	autorest.Response `json:"-"`
19253	// Available - Private IP address availability.
19254	Available *bool `json:"available,omitempty"`
19255	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
19256	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
19257}
19258
19259// IPAllocation ipAllocation resource.
19260type IPAllocation struct {
19261	autorest.Response `json:"-"`
19262	// IPAllocationPropertiesFormat - Properties of the IpAllocation.
19263	*IPAllocationPropertiesFormat `json:"properties,omitempty"`
19264	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19265	Etag *string `json:"etag,omitempty"`
19266	// ID - Resource ID.
19267	ID *string `json:"id,omitempty"`
19268	// Name - READ-ONLY; Resource name.
19269	Name *string `json:"name,omitempty"`
19270	// Type - READ-ONLY; Resource type.
19271	Type *string `json:"type,omitempty"`
19272	// Location - Resource location.
19273	Location *string `json:"location,omitempty"`
19274	// Tags - Resource tags.
19275	Tags map[string]*string `json:"tags"`
19276}
19277
19278// MarshalJSON is the custom marshaler for IPAllocation.
19279func (ia IPAllocation) MarshalJSON() ([]byte, error) {
19280	objectMap := make(map[string]interface{})
19281	if ia.IPAllocationPropertiesFormat != nil {
19282		objectMap["properties"] = ia.IPAllocationPropertiesFormat
19283	}
19284	if ia.ID != nil {
19285		objectMap["id"] = ia.ID
19286	}
19287	if ia.Location != nil {
19288		objectMap["location"] = ia.Location
19289	}
19290	if ia.Tags != nil {
19291		objectMap["tags"] = ia.Tags
19292	}
19293	return json.Marshal(objectMap)
19294}
19295
19296// UnmarshalJSON is the custom unmarshaler for IPAllocation struct.
19297func (ia *IPAllocation) UnmarshalJSON(body []byte) error {
19298	var m map[string]*json.RawMessage
19299	err := json.Unmarshal(body, &m)
19300	if err != nil {
19301		return err
19302	}
19303	for k, v := range m {
19304		switch k {
19305		case "properties":
19306			if v != nil {
19307				var IPAllocationPropertiesFormat IPAllocationPropertiesFormat
19308				err = json.Unmarshal(*v, &IPAllocationPropertiesFormat)
19309				if err != nil {
19310					return err
19311				}
19312				ia.IPAllocationPropertiesFormat = &IPAllocationPropertiesFormat
19313			}
19314		case "etag":
19315			if v != nil {
19316				var etag string
19317				err = json.Unmarshal(*v, &etag)
19318				if err != nil {
19319					return err
19320				}
19321				ia.Etag = &etag
19322			}
19323		case "id":
19324			if v != nil {
19325				var ID string
19326				err = json.Unmarshal(*v, &ID)
19327				if err != nil {
19328					return err
19329				}
19330				ia.ID = &ID
19331			}
19332		case "name":
19333			if v != nil {
19334				var name string
19335				err = json.Unmarshal(*v, &name)
19336				if err != nil {
19337					return err
19338				}
19339				ia.Name = &name
19340			}
19341		case "type":
19342			if v != nil {
19343				var typeVar string
19344				err = json.Unmarshal(*v, &typeVar)
19345				if err != nil {
19346					return err
19347				}
19348				ia.Type = &typeVar
19349			}
19350		case "location":
19351			if v != nil {
19352				var location string
19353				err = json.Unmarshal(*v, &location)
19354				if err != nil {
19355					return err
19356				}
19357				ia.Location = &location
19358			}
19359		case "tags":
19360			if v != nil {
19361				var tags map[string]*string
19362				err = json.Unmarshal(*v, &tags)
19363				if err != nil {
19364					return err
19365				}
19366				ia.Tags = tags
19367			}
19368		}
19369	}
19370
19371	return nil
19372}
19373
19374// IPAllocationListResult response for the ListIpAllocations API service call.
19375type IPAllocationListResult struct {
19376	autorest.Response `json:"-"`
19377	// Value - A list of IpAllocation resources.
19378	Value *[]IPAllocation `json:"value,omitempty"`
19379	// NextLink - The URL to get the next set of results.
19380	NextLink *string `json:"nextLink,omitempty"`
19381}
19382
19383// IPAllocationListResultIterator provides access to a complete listing of IPAllocation values.
19384type IPAllocationListResultIterator struct {
19385	i    int
19386	page IPAllocationListResultPage
19387}
19388
19389// NextWithContext advances to the next value.  If there was an error making
19390// the request the iterator does not advance and the error is returned.
19391func (iter *IPAllocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
19392	if tracing.IsEnabled() {
19393		ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationListResultIterator.NextWithContext")
19394		defer func() {
19395			sc := -1
19396			if iter.Response().Response.Response != nil {
19397				sc = iter.Response().Response.Response.StatusCode
19398			}
19399			tracing.EndSpan(ctx, sc, err)
19400		}()
19401	}
19402	iter.i++
19403	if iter.i < len(iter.page.Values()) {
19404		return nil
19405	}
19406	err = iter.page.NextWithContext(ctx)
19407	if err != nil {
19408		iter.i--
19409		return err
19410	}
19411	iter.i = 0
19412	return nil
19413}
19414
19415// Next advances to the next value.  If there was an error making
19416// the request the iterator does not advance and the error is returned.
19417// Deprecated: Use NextWithContext() instead.
19418func (iter *IPAllocationListResultIterator) Next() error {
19419	return iter.NextWithContext(context.Background())
19420}
19421
19422// NotDone returns true if the enumeration should be started or is not yet complete.
19423func (iter IPAllocationListResultIterator) NotDone() bool {
19424	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19425}
19426
19427// Response returns the raw server response from the last page request.
19428func (iter IPAllocationListResultIterator) Response() IPAllocationListResult {
19429	return iter.page.Response()
19430}
19431
19432// Value returns the current value or a zero-initialized value if the
19433// iterator has advanced beyond the end of the collection.
19434func (iter IPAllocationListResultIterator) Value() IPAllocation {
19435	if !iter.page.NotDone() {
19436		return IPAllocation{}
19437	}
19438	return iter.page.Values()[iter.i]
19439}
19440
19441// Creates a new instance of the IPAllocationListResultIterator type.
19442func NewIPAllocationListResultIterator(page IPAllocationListResultPage) IPAllocationListResultIterator {
19443	return IPAllocationListResultIterator{page: page}
19444}
19445
19446// IsEmpty returns true if the ListResult contains no values.
19447func (ialr IPAllocationListResult) IsEmpty() bool {
19448	return ialr.Value == nil || len(*ialr.Value) == 0
19449}
19450
19451// hasNextLink returns true if the NextLink is not empty.
19452func (ialr IPAllocationListResult) hasNextLink() bool {
19453	return ialr.NextLink != nil && len(*ialr.NextLink) != 0
19454}
19455
19456// iPAllocationListResultPreparer prepares a request to retrieve the next set of results.
19457// It returns nil if no more results exist.
19458func (ialr IPAllocationListResult) iPAllocationListResultPreparer(ctx context.Context) (*http.Request, error) {
19459	if !ialr.hasNextLink() {
19460		return nil, nil
19461	}
19462	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19463		autorest.AsJSON(),
19464		autorest.AsGet(),
19465		autorest.WithBaseURL(to.String(ialr.NextLink)))
19466}
19467
19468// IPAllocationListResultPage contains a page of IPAllocation values.
19469type IPAllocationListResultPage struct {
19470	fn   func(context.Context, IPAllocationListResult) (IPAllocationListResult, error)
19471	ialr IPAllocationListResult
19472}
19473
19474// NextWithContext advances to the next page of values.  If there was an error making
19475// the request the page does not advance and the error is returned.
19476func (page *IPAllocationListResultPage) NextWithContext(ctx context.Context) (err error) {
19477	if tracing.IsEnabled() {
19478		ctx = tracing.StartSpan(ctx, fqdn+"/IPAllocationListResultPage.NextWithContext")
19479		defer func() {
19480			sc := -1
19481			if page.Response().Response.Response != nil {
19482				sc = page.Response().Response.Response.StatusCode
19483			}
19484			tracing.EndSpan(ctx, sc, err)
19485		}()
19486	}
19487	for {
19488		next, err := page.fn(ctx, page.ialr)
19489		if err != nil {
19490			return err
19491		}
19492		page.ialr = next
19493		if !next.hasNextLink() || !next.IsEmpty() {
19494			break
19495		}
19496	}
19497	return nil
19498}
19499
19500// Next advances to the next page of values.  If there was an error making
19501// the request the page does not advance and the error is returned.
19502// Deprecated: Use NextWithContext() instead.
19503func (page *IPAllocationListResultPage) Next() error {
19504	return page.NextWithContext(context.Background())
19505}
19506
19507// NotDone returns true if the page enumeration should be started or is not yet complete.
19508func (page IPAllocationListResultPage) NotDone() bool {
19509	return !page.ialr.IsEmpty()
19510}
19511
19512// Response returns the raw server response from the last page request.
19513func (page IPAllocationListResultPage) Response() IPAllocationListResult {
19514	return page.ialr
19515}
19516
19517// Values returns the slice of values for the current page or nil if there are no values.
19518func (page IPAllocationListResultPage) Values() []IPAllocation {
19519	if page.ialr.IsEmpty() {
19520		return nil
19521	}
19522	return *page.ialr.Value
19523}
19524
19525// Creates a new instance of the IPAllocationListResultPage type.
19526func NewIPAllocationListResultPage(cur IPAllocationListResult, getNextPage func(context.Context, IPAllocationListResult) (IPAllocationListResult, error)) IPAllocationListResultPage {
19527	return IPAllocationListResultPage{
19528		fn:   getNextPage,
19529		ialr: cur,
19530	}
19531}
19532
19533// IPAllocationPropertiesFormat properties of the IpAllocation.
19534type IPAllocationPropertiesFormat struct {
19535	// Subnet - READ-ONLY; The Subnet that using the prefix of this IpAllocation resource.
19536	Subnet *SubResource `json:"subnet,omitempty"`
19537	// VirtualNetwork - READ-ONLY; The VirtualNetwork that using the prefix of this IpAllocation resource.
19538	VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"`
19539	// Type - The type for the IpAllocation. Possible values include: 'Undefined', 'Hypernet'
19540	Type IPAllocationType `json:"type,omitempty"`
19541	// Prefix - The address prefix for the IpAllocation.
19542	Prefix *string `json:"prefix,omitempty"`
19543	// PrefixLength - The address prefix length for the IpAllocation.
19544	PrefixLength *int32 `json:"prefixLength,omitempty"`
19545	// PrefixType - The address prefix Type for the IpAllocation. Possible values include: 'IPv4', 'IPv6'
19546	PrefixType IPVersion `json:"prefixType,omitempty"`
19547	// IpamAllocationID - The IPAM allocation ID.
19548	IpamAllocationID *string `json:"ipamAllocationId,omitempty"`
19549	// AllocationTags - IpAllocation tags.
19550	AllocationTags map[string]*string `json:"allocationTags"`
19551}
19552
19553// MarshalJSON is the custom marshaler for IPAllocationPropertiesFormat.
19554func (iapf IPAllocationPropertiesFormat) MarshalJSON() ([]byte, error) {
19555	objectMap := make(map[string]interface{})
19556	if iapf.Type != "" {
19557		objectMap["type"] = iapf.Type
19558	}
19559	if iapf.Prefix != nil {
19560		objectMap["prefix"] = iapf.Prefix
19561	}
19562	if iapf.PrefixLength != nil {
19563		objectMap["prefixLength"] = iapf.PrefixLength
19564	}
19565	if iapf.PrefixType != "" {
19566		objectMap["prefixType"] = iapf.PrefixType
19567	}
19568	if iapf.IpamAllocationID != nil {
19569		objectMap["ipamAllocationId"] = iapf.IpamAllocationID
19570	}
19571	if iapf.AllocationTags != nil {
19572		objectMap["allocationTags"] = iapf.AllocationTags
19573	}
19574	return json.Marshal(objectMap)
19575}
19576
19577// IPAllocationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
19578// long-running operation.
19579type IPAllocationsCreateOrUpdateFuture struct {
19580	azure.FutureAPI
19581	// Result returns the result of the asynchronous operation.
19582	// If the operation has not completed it will return an error.
19583	Result func(IPAllocationsClient) (IPAllocation, error)
19584}
19585
19586// IPAllocationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19587// operation.
19588type IPAllocationsDeleteFuture struct {
19589	azure.FutureAPI
19590	// Result returns the result of the asynchronous operation.
19591	// If the operation has not completed it will return an error.
19592	Result func(IPAllocationsClient) (autorest.Response, error)
19593}
19594
19595// IPConfiguration IP configuration.
19596type IPConfiguration struct {
19597	// IPConfigurationPropertiesFormat - Properties of the IP configuration.
19598	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
19599	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19600	Name *string `json:"name,omitempty"`
19601	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19602	Etag *string `json:"etag,omitempty"`
19603	// ID - Resource ID.
19604	ID *string `json:"id,omitempty"`
19605}
19606
19607// MarshalJSON is the custom marshaler for IPConfiguration.
19608func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
19609	objectMap := make(map[string]interface{})
19610	if ic.IPConfigurationPropertiesFormat != nil {
19611		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
19612	}
19613	if ic.Name != nil {
19614		objectMap["name"] = ic.Name
19615	}
19616	if ic.ID != nil {
19617		objectMap["id"] = ic.ID
19618	}
19619	return json.Marshal(objectMap)
19620}
19621
19622// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
19623func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
19624	var m map[string]*json.RawMessage
19625	err := json.Unmarshal(body, &m)
19626	if err != nil {
19627		return err
19628	}
19629	for k, v := range m {
19630		switch k {
19631		case "properties":
19632			if v != nil {
19633				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
19634				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
19635				if err != nil {
19636					return err
19637				}
19638				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
19639			}
19640		case "name":
19641			if v != nil {
19642				var name string
19643				err = json.Unmarshal(*v, &name)
19644				if err != nil {
19645					return err
19646				}
19647				ic.Name = &name
19648			}
19649		case "etag":
19650			if v != nil {
19651				var etag string
19652				err = json.Unmarshal(*v, &etag)
19653				if err != nil {
19654					return err
19655				}
19656				ic.Etag = &etag
19657			}
19658		case "id":
19659			if v != nil {
19660				var ID string
19661				err = json.Unmarshal(*v, &ID)
19662				if err != nil {
19663					return err
19664				}
19665				ic.ID = &ID
19666			}
19667		}
19668	}
19669
19670	return nil
19671}
19672
19673// IPConfigurationBgpPeeringAddress properties of IPConfigurationBgpPeeringAddress.
19674type IPConfigurationBgpPeeringAddress struct {
19675	// IpconfigurationID - The ID of IP configuration which belongs to gateway.
19676	IpconfigurationID *string `json:"ipconfigurationId,omitempty"`
19677	// DefaultBgpIPAddresses - READ-ONLY; The list of default BGP peering addresses which belong to IP configuration.
19678	DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"`
19679	// CustomBgpIPAddresses - The list of custom BGP peering addresses which belong to IP configuration.
19680	CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"`
19681	// TunnelIPAddresses - READ-ONLY; The list of tunnel public IP addresses which belong to IP configuration.
19682	TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"`
19683}
19684
19685// MarshalJSON is the custom marshaler for IPConfigurationBgpPeeringAddress.
19686func (icbpa IPConfigurationBgpPeeringAddress) MarshalJSON() ([]byte, error) {
19687	objectMap := make(map[string]interface{})
19688	if icbpa.IpconfigurationID != nil {
19689		objectMap["ipconfigurationId"] = icbpa.IpconfigurationID
19690	}
19691	if icbpa.CustomBgpIPAddresses != nil {
19692		objectMap["customBgpIpAddresses"] = icbpa.CustomBgpIPAddresses
19693	}
19694	return json.Marshal(objectMap)
19695}
19696
19697// IPConfigurationProfile IP configuration profile child resource.
19698type IPConfigurationProfile struct {
19699	// IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile.
19700	*IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"`
19701	// Name - The name of the resource. This name can be used to access the resource.
19702	Name *string `json:"name,omitempty"`
19703	// Type - READ-ONLY; Sub Resource type.
19704	Type *string `json:"type,omitempty"`
19705	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19706	Etag *string `json:"etag,omitempty"`
19707	// ID - Resource ID.
19708	ID *string `json:"id,omitempty"`
19709}
19710
19711// MarshalJSON is the custom marshaler for IPConfigurationProfile.
19712func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) {
19713	objectMap := make(map[string]interface{})
19714	if icp.IPConfigurationProfilePropertiesFormat != nil {
19715		objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat
19716	}
19717	if icp.Name != nil {
19718		objectMap["name"] = icp.Name
19719	}
19720	if icp.ID != nil {
19721		objectMap["id"] = icp.ID
19722	}
19723	return json.Marshal(objectMap)
19724}
19725
19726// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct.
19727func (icp *IPConfigurationProfile) UnmarshalJSON(body []byte) error {
19728	var m map[string]*json.RawMessage
19729	err := json.Unmarshal(body, &m)
19730	if err != nil {
19731		return err
19732	}
19733	for k, v := range m {
19734		switch k {
19735		case "properties":
19736			if v != nil {
19737				var IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat
19738				err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat)
19739				if err != nil {
19740					return err
19741				}
19742				icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat
19743			}
19744		case "name":
19745			if v != nil {
19746				var name string
19747				err = json.Unmarshal(*v, &name)
19748				if err != nil {
19749					return err
19750				}
19751				icp.Name = &name
19752			}
19753		case "type":
19754			if v != nil {
19755				var typeVar string
19756				err = json.Unmarshal(*v, &typeVar)
19757				if err != nil {
19758					return err
19759				}
19760				icp.Type = &typeVar
19761			}
19762		case "etag":
19763			if v != nil {
19764				var etag string
19765				err = json.Unmarshal(*v, &etag)
19766				if err != nil {
19767					return err
19768				}
19769				icp.Etag = &etag
19770			}
19771		case "id":
19772			if v != nil {
19773				var ID string
19774				err = json.Unmarshal(*v, &ID)
19775				if err != nil {
19776					return err
19777				}
19778				icp.ID = &ID
19779			}
19780		}
19781	}
19782
19783	return nil
19784}
19785
19786// IPConfigurationProfilePropertiesFormat IP configuration profile properties.
19787type IPConfigurationProfilePropertiesFormat struct {
19788	// Subnet - The reference to the subnet resource to create a container network interface ip configuration.
19789	Subnet *Subnet `json:"subnet,omitempty"`
19790	// ProvisioningState - READ-ONLY; The provisioning state of the IP configuration profile resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
19791	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19792}
19793
19794// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat.
19795func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
19796	objectMap := make(map[string]interface{})
19797	if icppf.Subnet != nil {
19798		objectMap["subnet"] = icppf.Subnet
19799	}
19800	return json.Marshal(objectMap)
19801}
19802
19803// IPConfigurationPropertiesFormat properties of IP configuration.
19804type IPConfigurationPropertiesFormat struct {
19805	// PrivateIPAddress - The private IP address of the IP configuration.
19806	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
19807	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
19808	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
19809	// Subnet - The reference to the subnet resource.
19810	Subnet *Subnet `json:"subnet,omitempty"`
19811	// PublicIPAddress - The reference to the public IP resource.
19812	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
19813	// ProvisioningState - READ-ONLY; The provisioning state of the IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
19814	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19815}
19816
19817// MarshalJSON is the custom marshaler for IPConfigurationPropertiesFormat.
19818func (icpf IPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
19819	objectMap := make(map[string]interface{})
19820	if icpf.PrivateIPAddress != nil {
19821		objectMap["privateIPAddress"] = icpf.PrivateIPAddress
19822	}
19823	if icpf.PrivateIPAllocationMethod != "" {
19824		objectMap["privateIPAllocationMethod"] = icpf.PrivateIPAllocationMethod
19825	}
19826	if icpf.Subnet != nil {
19827		objectMap["subnet"] = icpf.Subnet
19828	}
19829	if icpf.PublicIPAddress != nil {
19830		objectMap["publicIPAddress"] = icpf.PublicIPAddress
19831	}
19832	return json.Marshal(objectMap)
19833}
19834
19835// IPGroup the IpGroups resource information.
19836type IPGroup struct {
19837	autorest.Response `json:"-"`
19838	// IPGroupPropertiesFormat - Properties of the IpGroups.
19839	*IPGroupPropertiesFormat `json:"properties,omitempty"`
19840	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19841	Etag *string `json:"etag,omitempty"`
19842	// ID - Resource ID.
19843	ID *string `json:"id,omitempty"`
19844	// Name - READ-ONLY; Resource name.
19845	Name *string `json:"name,omitempty"`
19846	// Type - READ-ONLY; Resource type.
19847	Type *string `json:"type,omitempty"`
19848	// Location - Resource location.
19849	Location *string `json:"location,omitempty"`
19850	// Tags - Resource tags.
19851	Tags map[string]*string `json:"tags"`
19852}
19853
19854// MarshalJSON is the custom marshaler for IPGroup.
19855func (ig IPGroup) MarshalJSON() ([]byte, error) {
19856	objectMap := make(map[string]interface{})
19857	if ig.IPGroupPropertiesFormat != nil {
19858		objectMap["properties"] = ig.IPGroupPropertiesFormat
19859	}
19860	if ig.ID != nil {
19861		objectMap["id"] = ig.ID
19862	}
19863	if ig.Location != nil {
19864		objectMap["location"] = ig.Location
19865	}
19866	if ig.Tags != nil {
19867		objectMap["tags"] = ig.Tags
19868	}
19869	return json.Marshal(objectMap)
19870}
19871
19872// UnmarshalJSON is the custom unmarshaler for IPGroup struct.
19873func (ig *IPGroup) UnmarshalJSON(body []byte) error {
19874	var m map[string]*json.RawMessage
19875	err := json.Unmarshal(body, &m)
19876	if err != nil {
19877		return err
19878	}
19879	for k, v := range m {
19880		switch k {
19881		case "properties":
19882			if v != nil {
19883				var IPGroupPropertiesFormat IPGroupPropertiesFormat
19884				err = json.Unmarshal(*v, &IPGroupPropertiesFormat)
19885				if err != nil {
19886					return err
19887				}
19888				ig.IPGroupPropertiesFormat = &IPGroupPropertiesFormat
19889			}
19890		case "etag":
19891			if v != nil {
19892				var etag string
19893				err = json.Unmarshal(*v, &etag)
19894				if err != nil {
19895					return err
19896				}
19897				ig.Etag = &etag
19898			}
19899		case "id":
19900			if v != nil {
19901				var ID string
19902				err = json.Unmarshal(*v, &ID)
19903				if err != nil {
19904					return err
19905				}
19906				ig.ID = &ID
19907			}
19908		case "name":
19909			if v != nil {
19910				var name string
19911				err = json.Unmarshal(*v, &name)
19912				if err != nil {
19913					return err
19914				}
19915				ig.Name = &name
19916			}
19917		case "type":
19918			if v != nil {
19919				var typeVar string
19920				err = json.Unmarshal(*v, &typeVar)
19921				if err != nil {
19922					return err
19923				}
19924				ig.Type = &typeVar
19925			}
19926		case "location":
19927			if v != nil {
19928				var location string
19929				err = json.Unmarshal(*v, &location)
19930				if err != nil {
19931					return err
19932				}
19933				ig.Location = &location
19934			}
19935		case "tags":
19936			if v != nil {
19937				var tags map[string]*string
19938				err = json.Unmarshal(*v, &tags)
19939				if err != nil {
19940					return err
19941				}
19942				ig.Tags = tags
19943			}
19944		}
19945	}
19946
19947	return nil
19948}
19949
19950// IPGroupListResult response for the ListIpGroups API service call.
19951type IPGroupListResult struct {
19952	autorest.Response `json:"-"`
19953	// Value - The list of IpGroups information resources.
19954	Value *[]IPGroup `json:"value,omitempty"`
19955	// NextLink - URL to get the next set of results.
19956	NextLink *string `json:"nextLink,omitempty"`
19957}
19958
19959// IPGroupListResultIterator provides access to a complete listing of IPGroup values.
19960type IPGroupListResultIterator struct {
19961	i    int
19962	page IPGroupListResultPage
19963}
19964
19965// NextWithContext advances to the next value.  If there was an error making
19966// the request the iterator does not advance and the error is returned.
19967func (iter *IPGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
19968	if tracing.IsEnabled() {
19969		ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupListResultIterator.NextWithContext")
19970		defer func() {
19971			sc := -1
19972			if iter.Response().Response.Response != nil {
19973				sc = iter.Response().Response.Response.StatusCode
19974			}
19975			tracing.EndSpan(ctx, sc, err)
19976		}()
19977	}
19978	iter.i++
19979	if iter.i < len(iter.page.Values()) {
19980		return nil
19981	}
19982	err = iter.page.NextWithContext(ctx)
19983	if err != nil {
19984		iter.i--
19985		return err
19986	}
19987	iter.i = 0
19988	return nil
19989}
19990
19991// Next advances to the next value.  If there was an error making
19992// the request the iterator does not advance and the error is returned.
19993// Deprecated: Use NextWithContext() instead.
19994func (iter *IPGroupListResultIterator) Next() error {
19995	return iter.NextWithContext(context.Background())
19996}
19997
19998// NotDone returns true if the enumeration should be started or is not yet complete.
19999func (iter IPGroupListResultIterator) NotDone() bool {
20000	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20001}
20002
20003// Response returns the raw server response from the last page request.
20004func (iter IPGroupListResultIterator) Response() IPGroupListResult {
20005	return iter.page.Response()
20006}
20007
20008// Value returns the current value or a zero-initialized value if the
20009// iterator has advanced beyond the end of the collection.
20010func (iter IPGroupListResultIterator) Value() IPGroup {
20011	if !iter.page.NotDone() {
20012		return IPGroup{}
20013	}
20014	return iter.page.Values()[iter.i]
20015}
20016
20017// Creates a new instance of the IPGroupListResultIterator type.
20018func NewIPGroupListResultIterator(page IPGroupListResultPage) IPGroupListResultIterator {
20019	return IPGroupListResultIterator{page: page}
20020}
20021
20022// IsEmpty returns true if the ListResult contains no values.
20023func (iglr IPGroupListResult) IsEmpty() bool {
20024	return iglr.Value == nil || len(*iglr.Value) == 0
20025}
20026
20027// hasNextLink returns true if the NextLink is not empty.
20028func (iglr IPGroupListResult) hasNextLink() bool {
20029	return iglr.NextLink != nil && len(*iglr.NextLink) != 0
20030}
20031
20032// iPGroupListResultPreparer prepares a request to retrieve the next set of results.
20033// It returns nil if no more results exist.
20034func (iglr IPGroupListResult) iPGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
20035	if !iglr.hasNextLink() {
20036		return nil, nil
20037	}
20038	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20039		autorest.AsJSON(),
20040		autorest.AsGet(),
20041		autorest.WithBaseURL(to.String(iglr.NextLink)))
20042}
20043
20044// IPGroupListResultPage contains a page of IPGroup values.
20045type IPGroupListResultPage struct {
20046	fn   func(context.Context, IPGroupListResult) (IPGroupListResult, error)
20047	iglr IPGroupListResult
20048}
20049
20050// NextWithContext advances to the next page of values.  If there was an error making
20051// the request the page does not advance and the error is returned.
20052func (page *IPGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
20053	if tracing.IsEnabled() {
20054		ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupListResultPage.NextWithContext")
20055		defer func() {
20056			sc := -1
20057			if page.Response().Response.Response != nil {
20058				sc = page.Response().Response.Response.StatusCode
20059			}
20060			tracing.EndSpan(ctx, sc, err)
20061		}()
20062	}
20063	for {
20064		next, err := page.fn(ctx, page.iglr)
20065		if err != nil {
20066			return err
20067		}
20068		page.iglr = next
20069		if !next.hasNextLink() || !next.IsEmpty() {
20070			break
20071		}
20072	}
20073	return nil
20074}
20075
20076// Next advances to the next page of values.  If there was an error making
20077// the request the page does not advance and the error is returned.
20078// Deprecated: Use NextWithContext() instead.
20079func (page *IPGroupListResultPage) Next() error {
20080	return page.NextWithContext(context.Background())
20081}
20082
20083// NotDone returns true if the page enumeration should be started or is not yet complete.
20084func (page IPGroupListResultPage) NotDone() bool {
20085	return !page.iglr.IsEmpty()
20086}
20087
20088// Response returns the raw server response from the last page request.
20089func (page IPGroupListResultPage) Response() IPGroupListResult {
20090	return page.iglr
20091}
20092
20093// Values returns the slice of values for the current page or nil if there are no values.
20094func (page IPGroupListResultPage) Values() []IPGroup {
20095	if page.iglr.IsEmpty() {
20096		return nil
20097	}
20098	return *page.iglr.Value
20099}
20100
20101// Creates a new instance of the IPGroupListResultPage type.
20102func NewIPGroupListResultPage(cur IPGroupListResult, getNextPage func(context.Context, IPGroupListResult) (IPGroupListResult, error)) IPGroupListResultPage {
20103	return IPGroupListResultPage{
20104		fn:   getNextPage,
20105		iglr: cur,
20106	}
20107}
20108
20109// IPGroupPropertiesFormat the IpGroups property information.
20110type IPGroupPropertiesFormat struct {
20111	// ProvisioningState - READ-ONLY; The provisioning state of the IpGroups resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
20112	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20113	// IPAddresses - IpAddresses/IpAddressPrefixes in the IpGroups resource.
20114	IPAddresses *[]string `json:"ipAddresses,omitempty"`
20115	// Firewalls - READ-ONLY; List of references to Firewall resources that this IpGroups is associated with.
20116	Firewalls *[]SubResource `json:"firewalls,omitempty"`
20117	// FirewallPolicies - READ-ONLY; List of references to Firewall Policies resources that this IpGroups is associated with.
20118	FirewallPolicies *[]SubResource `json:"firewallPolicies,omitempty"`
20119}
20120
20121// MarshalJSON is the custom marshaler for IPGroupPropertiesFormat.
20122func (igpf IPGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
20123	objectMap := make(map[string]interface{})
20124	if igpf.IPAddresses != nil {
20125		objectMap["ipAddresses"] = igpf.IPAddresses
20126	}
20127	return json.Marshal(objectMap)
20128}
20129
20130// IPGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
20131// operation.
20132type IPGroupsCreateOrUpdateFuture struct {
20133	azure.FutureAPI
20134	// Result returns the result of the asynchronous operation.
20135	// If the operation has not completed it will return an error.
20136	Result func(IPGroupsClient) (IPGroup, error)
20137}
20138
20139// IPGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20140// operation.
20141type IPGroupsDeleteFuture struct {
20142	azure.FutureAPI
20143	// Result returns the result of the asynchronous operation.
20144	// If the operation has not completed it will return an error.
20145	Result func(IPGroupsClient) (autorest.Response, error)
20146}
20147
20148// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection.
20149type IpsecPolicy struct {
20150	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
20151	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
20152	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
20153	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
20154	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
20155	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
20156	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
20157	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
20158	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
20159	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
20160	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
20161	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
20162	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'DhGroupNone', 'DhGroupDHGroup1', 'DhGroupDHGroup2', 'DhGroupDHGroup14', 'DhGroupDHGroup2048', 'DhGroupECP256', 'DhGroupECP384', 'DhGroupDHGroup24'
20163	DhGroup DhGroup `json:"dhGroup,omitempty"`
20164	// 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'
20165	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
20166}
20167
20168// IPTag contains the IpTag associated with the object.
20169type IPTag struct {
20170	// IPTagType - The IP tag type. Example: FirstPartyUsage.
20171	IPTagType *string `json:"ipTagType,omitempty"`
20172	// Tag - The value of the IP tag associated with the public IP. Example: SQL.
20173	Tag *string `json:"tag,omitempty"`
20174}
20175
20176// Ipv6CircuitConnectionConfig iPv6 Circuit Connection properties for global reach.
20177type Ipv6CircuitConnectionConfig struct {
20178	// AddressPrefix - /125 IP address space to carve out customer addresses for global reach.
20179	AddressPrefix *string `json:"addressPrefix,omitempty"`
20180	// CircuitConnectionStatus - READ-ONLY; Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
20181	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
20182}
20183
20184// MarshalJSON is the custom marshaler for Ipv6CircuitConnectionConfig.
20185func (i6ccc Ipv6CircuitConnectionConfig) MarshalJSON() ([]byte, error) {
20186	objectMap := make(map[string]interface{})
20187	if i6ccc.AddressPrefix != nil {
20188		objectMap["addressPrefix"] = i6ccc.AddressPrefix
20189	}
20190	return json.Marshal(objectMap)
20191}
20192
20193// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
20194type Ipv6ExpressRouteCircuitPeeringConfig struct {
20195	// PrimaryPeerAddressPrefix - The primary address prefix.
20196	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
20197	// SecondaryPeerAddressPrefix - The secondary address prefix.
20198	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
20199	// MicrosoftPeeringConfig - The Microsoft peering configuration.
20200	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
20201	// RouteFilter - The reference to the RouteFilter resource.
20202	RouteFilter *SubResource `json:"routeFilter,omitempty"`
20203	// State - The state of peering. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
20204	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
20205}
20206
20207// ListHubRouteTablesResult list of RouteTables and a URL nextLink to get the next set of results.
20208type ListHubRouteTablesResult struct {
20209	autorest.Response `json:"-"`
20210	// Value - List of RouteTables.
20211	Value *[]HubRouteTable `json:"value,omitempty"`
20212	// NextLink - URL to get the next set of operation list results if there are any.
20213	NextLink *string `json:"nextLink,omitempty"`
20214}
20215
20216// ListHubRouteTablesResultIterator provides access to a complete listing of HubRouteTable values.
20217type ListHubRouteTablesResultIterator struct {
20218	i    int
20219	page ListHubRouteTablesResultPage
20220}
20221
20222// NextWithContext advances to the next value.  If there was an error making
20223// the request the iterator does not advance and the error is returned.
20224func (iter *ListHubRouteTablesResultIterator) NextWithContext(ctx context.Context) (err error) {
20225	if tracing.IsEnabled() {
20226		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubRouteTablesResultIterator.NextWithContext")
20227		defer func() {
20228			sc := -1
20229			if iter.Response().Response.Response != nil {
20230				sc = iter.Response().Response.Response.StatusCode
20231			}
20232			tracing.EndSpan(ctx, sc, err)
20233		}()
20234	}
20235	iter.i++
20236	if iter.i < len(iter.page.Values()) {
20237		return nil
20238	}
20239	err = iter.page.NextWithContext(ctx)
20240	if err != nil {
20241		iter.i--
20242		return err
20243	}
20244	iter.i = 0
20245	return nil
20246}
20247
20248// Next advances to the next value.  If there was an error making
20249// the request the iterator does not advance and the error is returned.
20250// Deprecated: Use NextWithContext() instead.
20251func (iter *ListHubRouteTablesResultIterator) Next() error {
20252	return iter.NextWithContext(context.Background())
20253}
20254
20255// NotDone returns true if the enumeration should be started or is not yet complete.
20256func (iter ListHubRouteTablesResultIterator) NotDone() bool {
20257	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20258}
20259
20260// Response returns the raw server response from the last page request.
20261func (iter ListHubRouteTablesResultIterator) Response() ListHubRouteTablesResult {
20262	return iter.page.Response()
20263}
20264
20265// Value returns the current value or a zero-initialized value if the
20266// iterator has advanced beyond the end of the collection.
20267func (iter ListHubRouteTablesResultIterator) Value() HubRouteTable {
20268	if !iter.page.NotDone() {
20269		return HubRouteTable{}
20270	}
20271	return iter.page.Values()[iter.i]
20272}
20273
20274// Creates a new instance of the ListHubRouteTablesResultIterator type.
20275func NewListHubRouteTablesResultIterator(page ListHubRouteTablesResultPage) ListHubRouteTablesResultIterator {
20276	return ListHubRouteTablesResultIterator{page: page}
20277}
20278
20279// IsEmpty returns true if the ListResult contains no values.
20280func (lhrtr ListHubRouteTablesResult) IsEmpty() bool {
20281	return lhrtr.Value == nil || len(*lhrtr.Value) == 0
20282}
20283
20284// hasNextLink returns true if the NextLink is not empty.
20285func (lhrtr ListHubRouteTablesResult) hasNextLink() bool {
20286	return lhrtr.NextLink != nil && len(*lhrtr.NextLink) != 0
20287}
20288
20289// listHubRouteTablesResultPreparer prepares a request to retrieve the next set of results.
20290// It returns nil if no more results exist.
20291func (lhrtr ListHubRouteTablesResult) listHubRouteTablesResultPreparer(ctx context.Context) (*http.Request, error) {
20292	if !lhrtr.hasNextLink() {
20293		return nil, nil
20294	}
20295	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20296		autorest.AsJSON(),
20297		autorest.AsGet(),
20298		autorest.WithBaseURL(to.String(lhrtr.NextLink)))
20299}
20300
20301// ListHubRouteTablesResultPage contains a page of HubRouteTable values.
20302type ListHubRouteTablesResultPage struct {
20303	fn    func(context.Context, ListHubRouteTablesResult) (ListHubRouteTablesResult, error)
20304	lhrtr ListHubRouteTablesResult
20305}
20306
20307// NextWithContext advances to the next page of values.  If there was an error making
20308// the request the page does not advance and the error is returned.
20309func (page *ListHubRouteTablesResultPage) NextWithContext(ctx context.Context) (err error) {
20310	if tracing.IsEnabled() {
20311		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubRouteTablesResultPage.NextWithContext")
20312		defer func() {
20313			sc := -1
20314			if page.Response().Response.Response != nil {
20315				sc = page.Response().Response.Response.StatusCode
20316			}
20317			tracing.EndSpan(ctx, sc, err)
20318		}()
20319	}
20320	for {
20321		next, err := page.fn(ctx, page.lhrtr)
20322		if err != nil {
20323			return err
20324		}
20325		page.lhrtr = next
20326		if !next.hasNextLink() || !next.IsEmpty() {
20327			break
20328		}
20329	}
20330	return nil
20331}
20332
20333// Next advances to the next page of values.  If there was an error making
20334// the request the page does not advance and the error is returned.
20335// Deprecated: Use NextWithContext() instead.
20336func (page *ListHubRouteTablesResultPage) Next() error {
20337	return page.NextWithContext(context.Background())
20338}
20339
20340// NotDone returns true if the page enumeration should be started or is not yet complete.
20341func (page ListHubRouteTablesResultPage) NotDone() bool {
20342	return !page.lhrtr.IsEmpty()
20343}
20344
20345// Response returns the raw server response from the last page request.
20346func (page ListHubRouteTablesResultPage) Response() ListHubRouteTablesResult {
20347	return page.lhrtr
20348}
20349
20350// Values returns the slice of values for the current page or nil if there are no values.
20351func (page ListHubRouteTablesResultPage) Values() []HubRouteTable {
20352	if page.lhrtr.IsEmpty() {
20353		return nil
20354	}
20355	return *page.lhrtr.Value
20356}
20357
20358// Creates a new instance of the ListHubRouteTablesResultPage type.
20359func NewListHubRouteTablesResultPage(cur ListHubRouteTablesResult, getNextPage func(context.Context, ListHubRouteTablesResult) (ListHubRouteTablesResult, error)) ListHubRouteTablesResultPage {
20360	return ListHubRouteTablesResultPage{
20361		fn:    getNextPage,
20362		lhrtr: cur,
20363	}
20364}
20365
20366// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
20367// the next set of results.
20368type ListHubVirtualNetworkConnectionsResult struct {
20369	autorest.Response `json:"-"`
20370	// Value - List of HubVirtualNetworkConnections.
20371	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
20372	// NextLink - URL to get the next set of operation list results if there are any.
20373	NextLink *string `json:"nextLink,omitempty"`
20374}
20375
20376// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
20377// HubVirtualNetworkConnection values.
20378type ListHubVirtualNetworkConnectionsResultIterator struct {
20379	i    int
20380	page ListHubVirtualNetworkConnectionsResultPage
20381}
20382
20383// NextWithContext advances to the next value.  If there was an error making
20384// the request the iterator does not advance and the error is returned.
20385func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
20386	if tracing.IsEnabled() {
20387		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
20388		defer func() {
20389			sc := -1
20390			if iter.Response().Response.Response != nil {
20391				sc = iter.Response().Response.Response.StatusCode
20392			}
20393			tracing.EndSpan(ctx, sc, err)
20394		}()
20395	}
20396	iter.i++
20397	if iter.i < len(iter.page.Values()) {
20398		return nil
20399	}
20400	err = iter.page.NextWithContext(ctx)
20401	if err != nil {
20402		iter.i--
20403		return err
20404	}
20405	iter.i = 0
20406	return nil
20407}
20408
20409// Next advances to the next value.  If there was an error making
20410// the request the iterator does not advance and the error is returned.
20411// Deprecated: Use NextWithContext() instead.
20412func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
20413	return iter.NextWithContext(context.Background())
20414}
20415
20416// NotDone returns true if the enumeration should be started or is not yet complete.
20417func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
20418	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20419}
20420
20421// Response returns the raw server response from the last page request.
20422func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
20423	return iter.page.Response()
20424}
20425
20426// Value returns the current value or a zero-initialized value if the
20427// iterator has advanced beyond the end of the collection.
20428func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
20429	if !iter.page.NotDone() {
20430		return HubVirtualNetworkConnection{}
20431	}
20432	return iter.page.Values()[iter.i]
20433}
20434
20435// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
20436func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
20437	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
20438}
20439
20440// IsEmpty returns true if the ListResult contains no values.
20441func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
20442	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
20443}
20444
20445// hasNextLink returns true if the NextLink is not empty.
20446func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
20447	return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
20448}
20449
20450// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
20451// It returns nil if no more results exist.
20452func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
20453	if !lhvncr.hasNextLink() {
20454		return nil, nil
20455	}
20456	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20457		autorest.AsJSON(),
20458		autorest.AsGet(),
20459		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
20460}
20461
20462// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
20463type ListHubVirtualNetworkConnectionsResultPage struct {
20464	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
20465	lhvncr ListHubVirtualNetworkConnectionsResult
20466}
20467
20468// NextWithContext advances to the next page of values.  If there was an error making
20469// the request the page does not advance and the error is returned.
20470func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
20471	if tracing.IsEnabled() {
20472		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
20473		defer func() {
20474			sc := -1
20475			if page.Response().Response.Response != nil {
20476				sc = page.Response().Response.Response.StatusCode
20477			}
20478			tracing.EndSpan(ctx, sc, err)
20479		}()
20480	}
20481	for {
20482		next, err := page.fn(ctx, page.lhvncr)
20483		if err != nil {
20484			return err
20485		}
20486		page.lhvncr = next
20487		if !next.hasNextLink() || !next.IsEmpty() {
20488			break
20489		}
20490	}
20491	return nil
20492}
20493
20494// Next advances to the next page of values.  If there was an error making
20495// the request the page does not advance and the error is returned.
20496// Deprecated: Use NextWithContext() instead.
20497func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
20498	return page.NextWithContext(context.Background())
20499}
20500
20501// NotDone returns true if the page enumeration should be started or is not yet complete.
20502func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
20503	return !page.lhvncr.IsEmpty()
20504}
20505
20506// Response returns the raw server response from the last page request.
20507func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
20508	return page.lhvncr
20509}
20510
20511// Values returns the slice of values for the current page or nil if there are no values.
20512func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
20513	if page.lhvncr.IsEmpty() {
20514		return nil
20515	}
20516	return *page.lhvncr.Value
20517}
20518
20519// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
20520func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
20521	return ListHubVirtualNetworkConnectionsResultPage{
20522		fn:     getNextPage,
20523		lhvncr: cur,
20524	}
20525}
20526
20527// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of
20528// P2SVpnGateways and a URL nextLink to get the next set of results.
20529type ListP2SVpnGatewaysResult struct {
20530	autorest.Response `json:"-"`
20531	// Value - List of P2SVpnGateways.
20532	Value *[]P2SVpnGateway `json:"value,omitempty"`
20533	// NextLink - URL to get the next set of operation list results if there are any.
20534	NextLink *string `json:"nextLink,omitempty"`
20535}
20536
20537// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values.
20538type ListP2SVpnGatewaysResultIterator struct {
20539	i    int
20540	page ListP2SVpnGatewaysResultPage
20541}
20542
20543// NextWithContext advances to the next value.  If there was an error making
20544// the request the iterator does not advance and the error is returned.
20545func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
20546	if tracing.IsEnabled() {
20547		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.NextWithContext")
20548		defer func() {
20549			sc := -1
20550			if iter.Response().Response.Response != nil {
20551				sc = iter.Response().Response.Response.StatusCode
20552			}
20553			tracing.EndSpan(ctx, sc, err)
20554		}()
20555	}
20556	iter.i++
20557	if iter.i < len(iter.page.Values()) {
20558		return nil
20559	}
20560	err = iter.page.NextWithContext(ctx)
20561	if err != nil {
20562		iter.i--
20563		return err
20564	}
20565	iter.i = 0
20566	return nil
20567}
20568
20569// Next advances to the next value.  If there was an error making
20570// the request the iterator does not advance and the error is returned.
20571// Deprecated: Use NextWithContext() instead.
20572func (iter *ListP2SVpnGatewaysResultIterator) Next() error {
20573	return iter.NextWithContext(context.Background())
20574}
20575
20576// NotDone returns true if the enumeration should be started or is not yet complete.
20577func (iter ListP2SVpnGatewaysResultIterator) NotDone() bool {
20578	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20579}
20580
20581// Response returns the raw server response from the last page request.
20582func (iter ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult {
20583	return iter.page.Response()
20584}
20585
20586// Value returns the current value or a zero-initialized value if the
20587// iterator has advanced beyond the end of the collection.
20588func (iter ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway {
20589	if !iter.page.NotDone() {
20590		return P2SVpnGateway{}
20591	}
20592	return iter.page.Values()[iter.i]
20593}
20594
20595// Creates a new instance of the ListP2SVpnGatewaysResultIterator type.
20596func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator {
20597	return ListP2SVpnGatewaysResultIterator{page: page}
20598}
20599
20600// IsEmpty returns true if the ListResult contains no values.
20601func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
20602	return lpvgr.Value == nil || len(*lpvgr.Value) == 0
20603}
20604
20605// hasNextLink returns true if the NextLink is not empty.
20606func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool {
20607	return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0
20608}
20609
20610// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
20611// It returns nil if no more results exist.
20612func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
20613	if !lpvgr.hasNextLink() {
20614		return nil, nil
20615	}
20616	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20617		autorest.AsJSON(),
20618		autorest.AsGet(),
20619		autorest.WithBaseURL(to.String(lpvgr.NextLink)))
20620}
20621
20622// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values.
20623type ListP2SVpnGatewaysResultPage struct {
20624	fn    func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
20625	lpvgr ListP2SVpnGatewaysResult
20626}
20627
20628// NextWithContext advances to the next page of values.  If there was an error making
20629// the request the page does not advance and the error is returned.
20630func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
20631	if tracing.IsEnabled() {
20632		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext")
20633		defer func() {
20634			sc := -1
20635			if page.Response().Response.Response != nil {
20636				sc = page.Response().Response.Response.StatusCode
20637			}
20638			tracing.EndSpan(ctx, sc, err)
20639		}()
20640	}
20641	for {
20642		next, err := page.fn(ctx, page.lpvgr)
20643		if err != nil {
20644			return err
20645		}
20646		page.lpvgr = next
20647		if !next.hasNextLink() || !next.IsEmpty() {
20648			break
20649		}
20650	}
20651	return nil
20652}
20653
20654// Next advances to the next page of values.  If there was an error making
20655// the request the page does not advance and the error is returned.
20656// Deprecated: Use NextWithContext() instead.
20657func (page *ListP2SVpnGatewaysResultPage) Next() error {
20658	return page.NextWithContext(context.Background())
20659}
20660
20661// NotDone returns true if the page enumeration should be started or is not yet complete.
20662func (page ListP2SVpnGatewaysResultPage) NotDone() bool {
20663	return !page.lpvgr.IsEmpty()
20664}
20665
20666// Response returns the raw server response from the last page request.
20667func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult {
20668	return page.lpvgr
20669}
20670
20671// Values returns the slice of values for the current page or nil if there are no values.
20672func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway {
20673	if page.lpvgr.IsEmpty() {
20674		return nil
20675	}
20676	return *page.lpvgr.Value
20677}
20678
20679// Creates a new instance of the ListP2SVpnGatewaysResultPage type.
20680func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage {
20681	return ListP2SVpnGatewaysResultPage{
20682		fn:    getNextPage,
20683		lpvgr: cur,
20684	}
20685}
20686
20687// ListString ...
20688type ListString struct {
20689	autorest.Response `json:"-"`
20690	Value             *[]string `json:"value,omitempty"`
20691}
20692
20693// ListVirtualHubBgpConnectionResults virtualHubBgpConnections list.
20694type ListVirtualHubBgpConnectionResults struct {
20695	autorest.Response `json:"-"`
20696	// Value - The list of VirtualHubBgpConnections.
20697	Value *[]BgpConnection `json:"value,omitempty"`
20698	// NextLink - URL to get the next set of results.
20699	NextLink *string `json:"nextLink,omitempty"`
20700}
20701
20702// ListVirtualHubBgpConnectionResultsIterator provides access to a complete listing of BgpConnection
20703// values.
20704type ListVirtualHubBgpConnectionResultsIterator struct {
20705	i    int
20706	page ListVirtualHubBgpConnectionResultsPage
20707}
20708
20709// NextWithContext advances to the next value.  If there was an error making
20710// the request the iterator does not advance and the error is returned.
20711func (iter *ListVirtualHubBgpConnectionResultsIterator) NextWithContext(ctx context.Context) (err error) {
20712	if tracing.IsEnabled() {
20713		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubBgpConnectionResultsIterator.NextWithContext")
20714		defer func() {
20715			sc := -1
20716			if iter.Response().Response.Response != nil {
20717				sc = iter.Response().Response.Response.StatusCode
20718			}
20719			tracing.EndSpan(ctx, sc, err)
20720		}()
20721	}
20722	iter.i++
20723	if iter.i < len(iter.page.Values()) {
20724		return nil
20725	}
20726	err = iter.page.NextWithContext(ctx)
20727	if err != nil {
20728		iter.i--
20729		return err
20730	}
20731	iter.i = 0
20732	return nil
20733}
20734
20735// Next advances to the next value.  If there was an error making
20736// the request the iterator does not advance and the error is returned.
20737// Deprecated: Use NextWithContext() instead.
20738func (iter *ListVirtualHubBgpConnectionResultsIterator) Next() error {
20739	return iter.NextWithContext(context.Background())
20740}
20741
20742// NotDone returns true if the enumeration should be started or is not yet complete.
20743func (iter ListVirtualHubBgpConnectionResultsIterator) NotDone() bool {
20744	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20745}
20746
20747// Response returns the raw server response from the last page request.
20748func (iter ListVirtualHubBgpConnectionResultsIterator) Response() ListVirtualHubBgpConnectionResults {
20749	return iter.page.Response()
20750}
20751
20752// Value returns the current value or a zero-initialized value if the
20753// iterator has advanced beyond the end of the collection.
20754func (iter ListVirtualHubBgpConnectionResultsIterator) Value() BgpConnection {
20755	if !iter.page.NotDone() {
20756		return BgpConnection{}
20757	}
20758	return iter.page.Values()[iter.i]
20759}
20760
20761// Creates a new instance of the ListVirtualHubBgpConnectionResultsIterator type.
20762func NewListVirtualHubBgpConnectionResultsIterator(page ListVirtualHubBgpConnectionResultsPage) ListVirtualHubBgpConnectionResultsIterator {
20763	return ListVirtualHubBgpConnectionResultsIterator{page: page}
20764}
20765
20766// IsEmpty returns true if the ListResult contains no values.
20767func (lvhbcr ListVirtualHubBgpConnectionResults) IsEmpty() bool {
20768	return lvhbcr.Value == nil || len(*lvhbcr.Value) == 0
20769}
20770
20771// hasNextLink returns true if the NextLink is not empty.
20772func (lvhbcr ListVirtualHubBgpConnectionResults) hasNextLink() bool {
20773	return lvhbcr.NextLink != nil && len(*lvhbcr.NextLink) != 0
20774}
20775
20776// listVirtualHubBgpConnectionResultsPreparer prepares a request to retrieve the next set of results.
20777// It returns nil if no more results exist.
20778func (lvhbcr ListVirtualHubBgpConnectionResults) listVirtualHubBgpConnectionResultsPreparer(ctx context.Context) (*http.Request, error) {
20779	if !lvhbcr.hasNextLink() {
20780		return nil, nil
20781	}
20782	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20783		autorest.AsJSON(),
20784		autorest.AsGet(),
20785		autorest.WithBaseURL(to.String(lvhbcr.NextLink)))
20786}
20787
20788// ListVirtualHubBgpConnectionResultsPage contains a page of BgpConnection values.
20789type ListVirtualHubBgpConnectionResultsPage struct {
20790	fn     func(context.Context, ListVirtualHubBgpConnectionResults) (ListVirtualHubBgpConnectionResults, error)
20791	lvhbcr ListVirtualHubBgpConnectionResults
20792}
20793
20794// NextWithContext advances to the next page of values.  If there was an error making
20795// the request the page does not advance and the error is returned.
20796func (page *ListVirtualHubBgpConnectionResultsPage) NextWithContext(ctx context.Context) (err error) {
20797	if tracing.IsEnabled() {
20798		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubBgpConnectionResultsPage.NextWithContext")
20799		defer func() {
20800			sc := -1
20801			if page.Response().Response.Response != nil {
20802				sc = page.Response().Response.Response.StatusCode
20803			}
20804			tracing.EndSpan(ctx, sc, err)
20805		}()
20806	}
20807	for {
20808		next, err := page.fn(ctx, page.lvhbcr)
20809		if err != nil {
20810			return err
20811		}
20812		page.lvhbcr = next
20813		if !next.hasNextLink() || !next.IsEmpty() {
20814			break
20815		}
20816	}
20817	return nil
20818}
20819
20820// Next advances to the next page of values.  If there was an error making
20821// the request the page does not advance and the error is returned.
20822// Deprecated: Use NextWithContext() instead.
20823func (page *ListVirtualHubBgpConnectionResultsPage) Next() error {
20824	return page.NextWithContext(context.Background())
20825}
20826
20827// NotDone returns true if the page enumeration should be started or is not yet complete.
20828func (page ListVirtualHubBgpConnectionResultsPage) NotDone() bool {
20829	return !page.lvhbcr.IsEmpty()
20830}
20831
20832// Response returns the raw server response from the last page request.
20833func (page ListVirtualHubBgpConnectionResultsPage) Response() ListVirtualHubBgpConnectionResults {
20834	return page.lvhbcr
20835}
20836
20837// Values returns the slice of values for the current page or nil if there are no values.
20838func (page ListVirtualHubBgpConnectionResultsPage) Values() []BgpConnection {
20839	if page.lvhbcr.IsEmpty() {
20840		return nil
20841	}
20842	return *page.lvhbcr.Value
20843}
20844
20845// Creates a new instance of the ListVirtualHubBgpConnectionResultsPage type.
20846func NewListVirtualHubBgpConnectionResultsPage(cur ListVirtualHubBgpConnectionResults, getNextPage func(context.Context, ListVirtualHubBgpConnectionResults) (ListVirtualHubBgpConnectionResults, error)) ListVirtualHubBgpConnectionResultsPage {
20847	return ListVirtualHubBgpConnectionResultsPage{
20848		fn:     getNextPage,
20849		lvhbcr: cur,
20850	}
20851}
20852
20853// ListVirtualHubIPConfigurationResults virtualHubIpConfigurations list.
20854type ListVirtualHubIPConfigurationResults struct {
20855	autorest.Response `json:"-"`
20856	// Value - The list of VirtualHubIpConfigurations.
20857	Value *[]HubIPConfiguration `json:"value,omitempty"`
20858	// NextLink - URL to get the next set of results.
20859	NextLink *string `json:"nextLink,omitempty"`
20860}
20861
20862// ListVirtualHubIPConfigurationResultsIterator provides access to a complete listing of HubIPConfiguration
20863// values.
20864type ListVirtualHubIPConfigurationResultsIterator struct {
20865	i    int
20866	page ListVirtualHubIPConfigurationResultsPage
20867}
20868
20869// NextWithContext advances to the next value.  If there was an error making
20870// the request the iterator does not advance and the error is returned.
20871func (iter *ListVirtualHubIPConfigurationResultsIterator) NextWithContext(ctx context.Context) (err error) {
20872	if tracing.IsEnabled() {
20873		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubIPConfigurationResultsIterator.NextWithContext")
20874		defer func() {
20875			sc := -1
20876			if iter.Response().Response.Response != nil {
20877				sc = iter.Response().Response.Response.StatusCode
20878			}
20879			tracing.EndSpan(ctx, sc, err)
20880		}()
20881	}
20882	iter.i++
20883	if iter.i < len(iter.page.Values()) {
20884		return nil
20885	}
20886	err = iter.page.NextWithContext(ctx)
20887	if err != nil {
20888		iter.i--
20889		return err
20890	}
20891	iter.i = 0
20892	return nil
20893}
20894
20895// Next advances to the next value.  If there was an error making
20896// the request the iterator does not advance and the error is returned.
20897// Deprecated: Use NextWithContext() instead.
20898func (iter *ListVirtualHubIPConfigurationResultsIterator) Next() error {
20899	return iter.NextWithContext(context.Background())
20900}
20901
20902// NotDone returns true if the enumeration should be started or is not yet complete.
20903func (iter ListVirtualHubIPConfigurationResultsIterator) NotDone() bool {
20904	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20905}
20906
20907// Response returns the raw server response from the last page request.
20908func (iter ListVirtualHubIPConfigurationResultsIterator) Response() ListVirtualHubIPConfigurationResults {
20909	return iter.page.Response()
20910}
20911
20912// Value returns the current value or a zero-initialized value if the
20913// iterator has advanced beyond the end of the collection.
20914func (iter ListVirtualHubIPConfigurationResultsIterator) Value() HubIPConfiguration {
20915	if !iter.page.NotDone() {
20916		return HubIPConfiguration{}
20917	}
20918	return iter.page.Values()[iter.i]
20919}
20920
20921// Creates a new instance of the ListVirtualHubIPConfigurationResultsIterator type.
20922func NewListVirtualHubIPConfigurationResultsIterator(page ListVirtualHubIPConfigurationResultsPage) ListVirtualHubIPConfigurationResultsIterator {
20923	return ListVirtualHubIPConfigurationResultsIterator{page: page}
20924}
20925
20926// IsEmpty returns true if the ListResult contains no values.
20927func (lvhicr ListVirtualHubIPConfigurationResults) IsEmpty() bool {
20928	return lvhicr.Value == nil || len(*lvhicr.Value) == 0
20929}
20930
20931// hasNextLink returns true if the NextLink is not empty.
20932func (lvhicr ListVirtualHubIPConfigurationResults) hasNextLink() bool {
20933	return lvhicr.NextLink != nil && len(*lvhicr.NextLink) != 0
20934}
20935
20936// listVirtualHubIPConfigurationResultsPreparer prepares a request to retrieve the next set of results.
20937// It returns nil if no more results exist.
20938func (lvhicr ListVirtualHubIPConfigurationResults) listVirtualHubIPConfigurationResultsPreparer(ctx context.Context) (*http.Request, error) {
20939	if !lvhicr.hasNextLink() {
20940		return nil, nil
20941	}
20942	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20943		autorest.AsJSON(),
20944		autorest.AsGet(),
20945		autorest.WithBaseURL(to.String(lvhicr.NextLink)))
20946}
20947
20948// ListVirtualHubIPConfigurationResultsPage contains a page of HubIPConfiguration values.
20949type ListVirtualHubIPConfigurationResultsPage struct {
20950	fn     func(context.Context, ListVirtualHubIPConfigurationResults) (ListVirtualHubIPConfigurationResults, error)
20951	lvhicr ListVirtualHubIPConfigurationResults
20952}
20953
20954// NextWithContext advances to the next page of values.  If there was an error making
20955// the request the page does not advance and the error is returned.
20956func (page *ListVirtualHubIPConfigurationResultsPage) NextWithContext(ctx context.Context) (err error) {
20957	if tracing.IsEnabled() {
20958		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubIPConfigurationResultsPage.NextWithContext")
20959		defer func() {
20960			sc := -1
20961			if page.Response().Response.Response != nil {
20962				sc = page.Response().Response.Response.StatusCode
20963			}
20964			tracing.EndSpan(ctx, sc, err)
20965		}()
20966	}
20967	for {
20968		next, err := page.fn(ctx, page.lvhicr)
20969		if err != nil {
20970			return err
20971		}
20972		page.lvhicr = next
20973		if !next.hasNextLink() || !next.IsEmpty() {
20974			break
20975		}
20976	}
20977	return nil
20978}
20979
20980// Next advances to the next page of values.  If there was an error making
20981// the request the page does not advance and the error is returned.
20982// Deprecated: Use NextWithContext() instead.
20983func (page *ListVirtualHubIPConfigurationResultsPage) Next() error {
20984	return page.NextWithContext(context.Background())
20985}
20986
20987// NotDone returns true if the page enumeration should be started or is not yet complete.
20988func (page ListVirtualHubIPConfigurationResultsPage) NotDone() bool {
20989	return !page.lvhicr.IsEmpty()
20990}
20991
20992// Response returns the raw server response from the last page request.
20993func (page ListVirtualHubIPConfigurationResultsPage) Response() ListVirtualHubIPConfigurationResults {
20994	return page.lvhicr
20995}
20996
20997// Values returns the slice of values for the current page or nil if there are no values.
20998func (page ListVirtualHubIPConfigurationResultsPage) Values() []HubIPConfiguration {
20999	if page.lvhicr.IsEmpty() {
21000		return nil
21001	}
21002	return *page.lvhicr.Value
21003}
21004
21005// Creates a new instance of the ListVirtualHubIPConfigurationResultsPage type.
21006func NewListVirtualHubIPConfigurationResultsPage(cur ListVirtualHubIPConfigurationResults, getNextPage func(context.Context, ListVirtualHubIPConfigurationResults) (ListVirtualHubIPConfigurationResults, error)) ListVirtualHubIPConfigurationResultsPage {
21007	return ListVirtualHubIPConfigurationResultsPage{
21008		fn:     getNextPage,
21009		lvhicr: cur,
21010	}
21011}
21012
21013// ListVirtualHubRouteTableV2sResult list of VirtualHubRouteTableV2s and a URL nextLink to get the next set
21014// of results.
21015type ListVirtualHubRouteTableV2sResult struct {
21016	autorest.Response `json:"-"`
21017	// Value - List of VirtualHubRouteTableV2s.
21018	Value *[]VirtualHubRouteTableV2 `json:"value,omitempty"`
21019	// NextLink - URL to get the next set of operation list results if there are any.
21020	NextLink *string `json:"nextLink,omitempty"`
21021}
21022
21023// ListVirtualHubRouteTableV2sResultIterator provides access to a complete listing of
21024// VirtualHubRouteTableV2 values.
21025type ListVirtualHubRouteTableV2sResultIterator struct {
21026	i    int
21027	page ListVirtualHubRouteTableV2sResultPage
21028}
21029
21030// NextWithContext advances to the next value.  If there was an error making
21031// the request the iterator does not advance and the error is returned.
21032func (iter *ListVirtualHubRouteTableV2sResultIterator) NextWithContext(ctx context.Context) (err error) {
21033	if tracing.IsEnabled() {
21034		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubRouteTableV2sResultIterator.NextWithContext")
21035		defer func() {
21036			sc := -1
21037			if iter.Response().Response.Response != nil {
21038				sc = iter.Response().Response.Response.StatusCode
21039			}
21040			tracing.EndSpan(ctx, sc, err)
21041		}()
21042	}
21043	iter.i++
21044	if iter.i < len(iter.page.Values()) {
21045		return nil
21046	}
21047	err = iter.page.NextWithContext(ctx)
21048	if err != nil {
21049		iter.i--
21050		return err
21051	}
21052	iter.i = 0
21053	return nil
21054}
21055
21056// Next advances to the next value.  If there was an error making
21057// the request the iterator does not advance and the error is returned.
21058// Deprecated: Use NextWithContext() instead.
21059func (iter *ListVirtualHubRouteTableV2sResultIterator) Next() error {
21060	return iter.NextWithContext(context.Background())
21061}
21062
21063// NotDone returns true if the enumeration should be started or is not yet complete.
21064func (iter ListVirtualHubRouteTableV2sResultIterator) NotDone() bool {
21065	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21066}
21067
21068// Response returns the raw server response from the last page request.
21069func (iter ListVirtualHubRouteTableV2sResultIterator) Response() ListVirtualHubRouteTableV2sResult {
21070	return iter.page.Response()
21071}
21072
21073// Value returns the current value or a zero-initialized value if the
21074// iterator has advanced beyond the end of the collection.
21075func (iter ListVirtualHubRouteTableV2sResultIterator) Value() VirtualHubRouteTableV2 {
21076	if !iter.page.NotDone() {
21077		return VirtualHubRouteTableV2{}
21078	}
21079	return iter.page.Values()[iter.i]
21080}
21081
21082// Creates a new instance of the ListVirtualHubRouteTableV2sResultIterator type.
21083func NewListVirtualHubRouteTableV2sResultIterator(page ListVirtualHubRouteTableV2sResultPage) ListVirtualHubRouteTableV2sResultIterator {
21084	return ListVirtualHubRouteTableV2sResultIterator{page: page}
21085}
21086
21087// IsEmpty returns true if the ListResult contains no values.
21088func (lvhrtvr ListVirtualHubRouteTableV2sResult) IsEmpty() bool {
21089	return lvhrtvr.Value == nil || len(*lvhrtvr.Value) == 0
21090}
21091
21092// hasNextLink returns true if the NextLink is not empty.
21093func (lvhrtvr ListVirtualHubRouteTableV2sResult) hasNextLink() bool {
21094	return lvhrtvr.NextLink != nil && len(*lvhrtvr.NextLink) != 0
21095}
21096
21097// listVirtualHubRouteTableV2sResultPreparer prepares a request to retrieve the next set of results.
21098// It returns nil if no more results exist.
21099func (lvhrtvr ListVirtualHubRouteTableV2sResult) listVirtualHubRouteTableV2sResultPreparer(ctx context.Context) (*http.Request, error) {
21100	if !lvhrtvr.hasNextLink() {
21101		return nil, nil
21102	}
21103	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21104		autorest.AsJSON(),
21105		autorest.AsGet(),
21106		autorest.WithBaseURL(to.String(lvhrtvr.NextLink)))
21107}
21108
21109// ListVirtualHubRouteTableV2sResultPage contains a page of VirtualHubRouteTableV2 values.
21110type ListVirtualHubRouteTableV2sResultPage struct {
21111	fn      func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error)
21112	lvhrtvr ListVirtualHubRouteTableV2sResult
21113}
21114
21115// NextWithContext advances to the next page of values.  If there was an error making
21116// the request the page does not advance and the error is returned.
21117func (page *ListVirtualHubRouteTableV2sResultPage) NextWithContext(ctx context.Context) (err error) {
21118	if tracing.IsEnabled() {
21119		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubRouteTableV2sResultPage.NextWithContext")
21120		defer func() {
21121			sc := -1
21122			if page.Response().Response.Response != nil {
21123				sc = page.Response().Response.Response.StatusCode
21124			}
21125			tracing.EndSpan(ctx, sc, err)
21126		}()
21127	}
21128	for {
21129		next, err := page.fn(ctx, page.lvhrtvr)
21130		if err != nil {
21131			return err
21132		}
21133		page.lvhrtvr = next
21134		if !next.hasNextLink() || !next.IsEmpty() {
21135			break
21136		}
21137	}
21138	return nil
21139}
21140
21141// Next advances to the next page of values.  If there was an error making
21142// the request the page does not advance and the error is returned.
21143// Deprecated: Use NextWithContext() instead.
21144func (page *ListVirtualHubRouteTableV2sResultPage) Next() error {
21145	return page.NextWithContext(context.Background())
21146}
21147
21148// NotDone returns true if the page enumeration should be started or is not yet complete.
21149func (page ListVirtualHubRouteTableV2sResultPage) NotDone() bool {
21150	return !page.lvhrtvr.IsEmpty()
21151}
21152
21153// Response returns the raw server response from the last page request.
21154func (page ListVirtualHubRouteTableV2sResultPage) Response() ListVirtualHubRouteTableV2sResult {
21155	return page.lvhrtvr
21156}
21157
21158// Values returns the slice of values for the current page or nil if there are no values.
21159func (page ListVirtualHubRouteTableV2sResultPage) Values() []VirtualHubRouteTableV2 {
21160	if page.lvhrtvr.IsEmpty() {
21161		return nil
21162	}
21163	return *page.lvhrtvr.Value
21164}
21165
21166// Creates a new instance of the ListVirtualHubRouteTableV2sResultPage type.
21167func NewListVirtualHubRouteTableV2sResultPage(cur ListVirtualHubRouteTableV2sResult, getNextPage func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error)) ListVirtualHubRouteTableV2sResultPage {
21168	return ListVirtualHubRouteTableV2sResultPage{
21169		fn:      getNextPage,
21170		lvhrtvr: cur,
21171	}
21172}
21173
21174// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
21175// URL nextLink to get the next set of results.
21176type ListVirtualHubsResult struct {
21177	autorest.Response `json:"-"`
21178	// Value - List of VirtualHubs.
21179	Value *[]VirtualHub `json:"value,omitempty"`
21180	// NextLink - URL to get the next set of operation list results if there are any.
21181	NextLink *string `json:"nextLink,omitempty"`
21182}
21183
21184// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
21185type ListVirtualHubsResultIterator struct {
21186	i    int
21187	page ListVirtualHubsResultPage
21188}
21189
21190// NextWithContext advances to the next value.  If there was an error making
21191// the request the iterator does not advance and the error is returned.
21192func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
21193	if tracing.IsEnabled() {
21194		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
21195		defer func() {
21196			sc := -1
21197			if iter.Response().Response.Response != nil {
21198				sc = iter.Response().Response.Response.StatusCode
21199			}
21200			tracing.EndSpan(ctx, sc, err)
21201		}()
21202	}
21203	iter.i++
21204	if iter.i < len(iter.page.Values()) {
21205		return nil
21206	}
21207	err = iter.page.NextWithContext(ctx)
21208	if err != nil {
21209		iter.i--
21210		return err
21211	}
21212	iter.i = 0
21213	return nil
21214}
21215
21216// Next advances to the next value.  If there was an error making
21217// the request the iterator does not advance and the error is returned.
21218// Deprecated: Use NextWithContext() instead.
21219func (iter *ListVirtualHubsResultIterator) Next() error {
21220	return iter.NextWithContext(context.Background())
21221}
21222
21223// NotDone returns true if the enumeration should be started or is not yet complete.
21224func (iter ListVirtualHubsResultIterator) NotDone() bool {
21225	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21226}
21227
21228// Response returns the raw server response from the last page request.
21229func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
21230	return iter.page.Response()
21231}
21232
21233// Value returns the current value or a zero-initialized value if the
21234// iterator has advanced beyond the end of the collection.
21235func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
21236	if !iter.page.NotDone() {
21237		return VirtualHub{}
21238	}
21239	return iter.page.Values()[iter.i]
21240}
21241
21242// Creates a new instance of the ListVirtualHubsResultIterator type.
21243func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
21244	return ListVirtualHubsResultIterator{page: page}
21245}
21246
21247// IsEmpty returns true if the ListResult contains no values.
21248func (lvhr ListVirtualHubsResult) IsEmpty() bool {
21249	return lvhr.Value == nil || len(*lvhr.Value) == 0
21250}
21251
21252// hasNextLink returns true if the NextLink is not empty.
21253func (lvhr ListVirtualHubsResult) hasNextLink() bool {
21254	return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
21255}
21256
21257// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
21258// It returns nil if no more results exist.
21259func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
21260	if !lvhr.hasNextLink() {
21261		return nil, nil
21262	}
21263	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21264		autorest.AsJSON(),
21265		autorest.AsGet(),
21266		autorest.WithBaseURL(to.String(lvhr.NextLink)))
21267}
21268
21269// ListVirtualHubsResultPage contains a page of VirtualHub values.
21270type ListVirtualHubsResultPage struct {
21271	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
21272	lvhr ListVirtualHubsResult
21273}
21274
21275// NextWithContext advances to the next page of values.  If there was an error making
21276// the request the page does not advance and the error is returned.
21277func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
21278	if tracing.IsEnabled() {
21279		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
21280		defer func() {
21281			sc := -1
21282			if page.Response().Response.Response != nil {
21283				sc = page.Response().Response.Response.StatusCode
21284			}
21285			tracing.EndSpan(ctx, sc, err)
21286		}()
21287	}
21288	for {
21289		next, err := page.fn(ctx, page.lvhr)
21290		if err != nil {
21291			return err
21292		}
21293		page.lvhr = next
21294		if !next.hasNextLink() || !next.IsEmpty() {
21295			break
21296		}
21297	}
21298	return nil
21299}
21300
21301// Next advances to the next page of values.  If there was an error making
21302// the request the page does not advance and the error is returned.
21303// Deprecated: Use NextWithContext() instead.
21304func (page *ListVirtualHubsResultPage) Next() error {
21305	return page.NextWithContext(context.Background())
21306}
21307
21308// NotDone returns true if the page enumeration should be started or is not yet complete.
21309func (page ListVirtualHubsResultPage) NotDone() bool {
21310	return !page.lvhr.IsEmpty()
21311}
21312
21313// Response returns the raw server response from the last page request.
21314func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
21315	return page.lvhr
21316}
21317
21318// Values returns the slice of values for the current page or nil if there are no values.
21319func (page ListVirtualHubsResultPage) Values() []VirtualHub {
21320	if page.lvhr.IsEmpty() {
21321		return nil
21322	}
21323	return *page.lvhr.Value
21324}
21325
21326// Creates a new instance of the ListVirtualHubsResultPage type.
21327func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
21328	return ListVirtualHubsResultPage{
21329		fn:   getNextPage,
21330		lvhr: cur,
21331	}
21332}
21333
21334// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
21335// URL nextLink to get the next set of results.
21336type ListVirtualWANsResult struct {
21337	autorest.Response `json:"-"`
21338	// Value - List of VirtualWANs.
21339	Value *[]VirtualWAN `json:"value,omitempty"`
21340	// NextLink - URL to get the next set of operation list results if there are any.
21341	NextLink *string `json:"nextLink,omitempty"`
21342}
21343
21344// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
21345type ListVirtualWANsResultIterator struct {
21346	i    int
21347	page ListVirtualWANsResultPage
21348}
21349
21350// NextWithContext advances to the next value.  If there was an error making
21351// the request the iterator does not advance and the error is returned.
21352func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
21353	if tracing.IsEnabled() {
21354		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
21355		defer func() {
21356			sc := -1
21357			if iter.Response().Response.Response != nil {
21358				sc = iter.Response().Response.Response.StatusCode
21359			}
21360			tracing.EndSpan(ctx, sc, err)
21361		}()
21362	}
21363	iter.i++
21364	if iter.i < len(iter.page.Values()) {
21365		return nil
21366	}
21367	err = iter.page.NextWithContext(ctx)
21368	if err != nil {
21369		iter.i--
21370		return err
21371	}
21372	iter.i = 0
21373	return nil
21374}
21375
21376// Next advances to the next value.  If there was an error making
21377// the request the iterator does not advance and the error is returned.
21378// Deprecated: Use NextWithContext() instead.
21379func (iter *ListVirtualWANsResultIterator) Next() error {
21380	return iter.NextWithContext(context.Background())
21381}
21382
21383// NotDone returns true if the enumeration should be started or is not yet complete.
21384func (iter ListVirtualWANsResultIterator) NotDone() bool {
21385	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21386}
21387
21388// Response returns the raw server response from the last page request.
21389func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
21390	return iter.page.Response()
21391}
21392
21393// Value returns the current value or a zero-initialized value if the
21394// iterator has advanced beyond the end of the collection.
21395func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
21396	if !iter.page.NotDone() {
21397		return VirtualWAN{}
21398	}
21399	return iter.page.Values()[iter.i]
21400}
21401
21402// Creates a new instance of the ListVirtualWANsResultIterator type.
21403func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
21404	return ListVirtualWANsResultIterator{page: page}
21405}
21406
21407// IsEmpty returns true if the ListResult contains no values.
21408func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
21409	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
21410}
21411
21412// hasNextLink returns true if the NextLink is not empty.
21413func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
21414	return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
21415}
21416
21417// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
21418// It returns nil if no more results exist.
21419func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
21420	if !lvwnr.hasNextLink() {
21421		return nil, nil
21422	}
21423	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21424		autorest.AsJSON(),
21425		autorest.AsGet(),
21426		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
21427}
21428
21429// ListVirtualWANsResultPage contains a page of VirtualWAN values.
21430type ListVirtualWANsResultPage struct {
21431	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
21432	lvwnr ListVirtualWANsResult
21433}
21434
21435// NextWithContext advances to the next page of values.  If there was an error making
21436// the request the page does not advance and the error is returned.
21437func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
21438	if tracing.IsEnabled() {
21439		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
21440		defer func() {
21441			sc := -1
21442			if page.Response().Response.Response != nil {
21443				sc = page.Response().Response.Response.StatusCode
21444			}
21445			tracing.EndSpan(ctx, sc, err)
21446		}()
21447	}
21448	for {
21449		next, err := page.fn(ctx, page.lvwnr)
21450		if err != nil {
21451			return err
21452		}
21453		page.lvwnr = next
21454		if !next.hasNextLink() || !next.IsEmpty() {
21455			break
21456		}
21457	}
21458	return nil
21459}
21460
21461// Next advances to the next page of values.  If there was an error making
21462// the request the page does not advance and the error is returned.
21463// Deprecated: Use NextWithContext() instead.
21464func (page *ListVirtualWANsResultPage) Next() error {
21465	return page.NextWithContext(context.Background())
21466}
21467
21468// NotDone returns true if the page enumeration should be started or is not yet complete.
21469func (page ListVirtualWANsResultPage) NotDone() bool {
21470	return !page.lvwnr.IsEmpty()
21471}
21472
21473// Response returns the raw server response from the last page request.
21474func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
21475	return page.lvwnr
21476}
21477
21478// Values returns the slice of values for the current page or nil if there are no values.
21479func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
21480	if page.lvwnr.IsEmpty() {
21481		return nil
21482	}
21483	return *page.lvwnr.Value
21484}
21485
21486// Creates a new instance of the ListVirtualWANsResultPage type.
21487func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
21488	return ListVirtualWANsResultPage{
21489		fn:    getNextPage,
21490		lvwnr: cur,
21491	}
21492}
21493
21494// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
21495// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
21496type ListVpnConnectionsResult struct {
21497	autorest.Response `json:"-"`
21498	// Value - List of Vpn Connections.
21499	Value *[]VpnConnection `json:"value,omitempty"`
21500	// NextLink - URL to get the next set of operation list results if there are any.
21501	NextLink *string `json:"nextLink,omitempty"`
21502}
21503
21504// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
21505type ListVpnConnectionsResultIterator struct {
21506	i    int
21507	page ListVpnConnectionsResultPage
21508}
21509
21510// NextWithContext advances to the next value.  If there was an error making
21511// the request the iterator does not advance and the error is returned.
21512func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
21513	if tracing.IsEnabled() {
21514		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
21515		defer func() {
21516			sc := -1
21517			if iter.Response().Response.Response != nil {
21518				sc = iter.Response().Response.Response.StatusCode
21519			}
21520			tracing.EndSpan(ctx, sc, err)
21521		}()
21522	}
21523	iter.i++
21524	if iter.i < len(iter.page.Values()) {
21525		return nil
21526	}
21527	err = iter.page.NextWithContext(ctx)
21528	if err != nil {
21529		iter.i--
21530		return err
21531	}
21532	iter.i = 0
21533	return nil
21534}
21535
21536// Next advances to the next value.  If there was an error making
21537// the request the iterator does not advance and the error is returned.
21538// Deprecated: Use NextWithContext() instead.
21539func (iter *ListVpnConnectionsResultIterator) Next() error {
21540	return iter.NextWithContext(context.Background())
21541}
21542
21543// NotDone returns true if the enumeration should be started or is not yet complete.
21544func (iter ListVpnConnectionsResultIterator) NotDone() bool {
21545	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21546}
21547
21548// Response returns the raw server response from the last page request.
21549func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
21550	return iter.page.Response()
21551}
21552
21553// Value returns the current value or a zero-initialized value if the
21554// iterator has advanced beyond the end of the collection.
21555func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
21556	if !iter.page.NotDone() {
21557		return VpnConnection{}
21558	}
21559	return iter.page.Values()[iter.i]
21560}
21561
21562// Creates a new instance of the ListVpnConnectionsResultIterator type.
21563func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
21564	return ListVpnConnectionsResultIterator{page: page}
21565}
21566
21567// IsEmpty returns true if the ListResult contains no values.
21568func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
21569	return lvcr.Value == nil || len(*lvcr.Value) == 0
21570}
21571
21572// hasNextLink returns true if the NextLink is not empty.
21573func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
21574	return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
21575}
21576
21577// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
21578// It returns nil if no more results exist.
21579func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
21580	if !lvcr.hasNextLink() {
21581		return nil, nil
21582	}
21583	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21584		autorest.AsJSON(),
21585		autorest.AsGet(),
21586		autorest.WithBaseURL(to.String(lvcr.NextLink)))
21587}
21588
21589// ListVpnConnectionsResultPage contains a page of VpnConnection values.
21590type ListVpnConnectionsResultPage struct {
21591	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
21592	lvcr ListVpnConnectionsResult
21593}
21594
21595// NextWithContext advances to the next page of values.  If there was an error making
21596// the request the page does not advance and the error is returned.
21597func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
21598	if tracing.IsEnabled() {
21599		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
21600		defer func() {
21601			sc := -1
21602			if page.Response().Response.Response != nil {
21603				sc = page.Response().Response.Response.StatusCode
21604			}
21605			tracing.EndSpan(ctx, sc, err)
21606		}()
21607	}
21608	for {
21609		next, err := page.fn(ctx, page.lvcr)
21610		if err != nil {
21611			return err
21612		}
21613		page.lvcr = next
21614		if !next.hasNextLink() || !next.IsEmpty() {
21615			break
21616		}
21617	}
21618	return nil
21619}
21620
21621// Next advances to the next page of values.  If there was an error making
21622// the request the page does not advance and the error is returned.
21623// Deprecated: Use NextWithContext() instead.
21624func (page *ListVpnConnectionsResultPage) Next() error {
21625	return page.NextWithContext(context.Background())
21626}
21627
21628// NotDone returns true if the page enumeration should be started or is not yet complete.
21629func (page ListVpnConnectionsResultPage) NotDone() bool {
21630	return !page.lvcr.IsEmpty()
21631}
21632
21633// Response returns the raw server response from the last page request.
21634func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
21635	return page.lvcr
21636}
21637
21638// Values returns the slice of values for the current page or nil if there are no values.
21639func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
21640	if page.lvcr.IsEmpty() {
21641		return nil
21642	}
21643	return *page.lvcr.Value
21644}
21645
21646// Creates a new instance of the ListVpnConnectionsResultPage type.
21647func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
21648	return ListVpnConnectionsResultPage{
21649		fn:   getNextPage,
21650		lvcr: cur,
21651	}
21652}
21653
21654// ListVpnGatewayNatRulesResult result of the request to list all nat rules to a virtual wan vpn gateway.
21655// It contains a list of Nat rules and a URL nextLink to get the next set of results.
21656type ListVpnGatewayNatRulesResult struct {
21657	autorest.Response `json:"-"`
21658	// Value - List of Nat Rules.
21659	Value *[]VpnGatewayNatRule `json:"value,omitempty"`
21660	// NextLink - URL to get the next set of operation list results if there are any.
21661	NextLink *string `json:"nextLink,omitempty"`
21662}
21663
21664// ListVpnGatewayNatRulesResultIterator provides access to a complete listing of VpnGatewayNatRule values.
21665type ListVpnGatewayNatRulesResultIterator struct {
21666	i    int
21667	page ListVpnGatewayNatRulesResultPage
21668}
21669
21670// NextWithContext advances to the next value.  If there was an error making
21671// the request the iterator does not advance and the error is returned.
21672func (iter *ListVpnGatewayNatRulesResultIterator) NextWithContext(ctx context.Context) (err error) {
21673	if tracing.IsEnabled() {
21674		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewayNatRulesResultIterator.NextWithContext")
21675		defer func() {
21676			sc := -1
21677			if iter.Response().Response.Response != nil {
21678				sc = iter.Response().Response.Response.StatusCode
21679			}
21680			tracing.EndSpan(ctx, sc, err)
21681		}()
21682	}
21683	iter.i++
21684	if iter.i < len(iter.page.Values()) {
21685		return nil
21686	}
21687	err = iter.page.NextWithContext(ctx)
21688	if err != nil {
21689		iter.i--
21690		return err
21691	}
21692	iter.i = 0
21693	return nil
21694}
21695
21696// Next advances to the next value.  If there was an error making
21697// the request the iterator does not advance and the error is returned.
21698// Deprecated: Use NextWithContext() instead.
21699func (iter *ListVpnGatewayNatRulesResultIterator) Next() error {
21700	return iter.NextWithContext(context.Background())
21701}
21702
21703// NotDone returns true if the enumeration should be started or is not yet complete.
21704func (iter ListVpnGatewayNatRulesResultIterator) NotDone() bool {
21705	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21706}
21707
21708// Response returns the raw server response from the last page request.
21709func (iter ListVpnGatewayNatRulesResultIterator) Response() ListVpnGatewayNatRulesResult {
21710	return iter.page.Response()
21711}
21712
21713// Value returns the current value or a zero-initialized value if the
21714// iterator has advanced beyond the end of the collection.
21715func (iter ListVpnGatewayNatRulesResultIterator) Value() VpnGatewayNatRule {
21716	if !iter.page.NotDone() {
21717		return VpnGatewayNatRule{}
21718	}
21719	return iter.page.Values()[iter.i]
21720}
21721
21722// Creates a new instance of the ListVpnGatewayNatRulesResultIterator type.
21723func NewListVpnGatewayNatRulesResultIterator(page ListVpnGatewayNatRulesResultPage) ListVpnGatewayNatRulesResultIterator {
21724	return ListVpnGatewayNatRulesResultIterator{page: page}
21725}
21726
21727// IsEmpty returns true if the ListResult contains no values.
21728func (lvgnrr ListVpnGatewayNatRulesResult) IsEmpty() bool {
21729	return lvgnrr.Value == nil || len(*lvgnrr.Value) == 0
21730}
21731
21732// hasNextLink returns true if the NextLink is not empty.
21733func (lvgnrr ListVpnGatewayNatRulesResult) hasNextLink() bool {
21734	return lvgnrr.NextLink != nil && len(*lvgnrr.NextLink) != 0
21735}
21736
21737// listVpnGatewayNatRulesResultPreparer prepares a request to retrieve the next set of results.
21738// It returns nil if no more results exist.
21739func (lvgnrr ListVpnGatewayNatRulesResult) listVpnGatewayNatRulesResultPreparer(ctx context.Context) (*http.Request, error) {
21740	if !lvgnrr.hasNextLink() {
21741		return nil, nil
21742	}
21743	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21744		autorest.AsJSON(),
21745		autorest.AsGet(),
21746		autorest.WithBaseURL(to.String(lvgnrr.NextLink)))
21747}
21748
21749// ListVpnGatewayNatRulesResultPage contains a page of VpnGatewayNatRule values.
21750type ListVpnGatewayNatRulesResultPage struct {
21751	fn     func(context.Context, ListVpnGatewayNatRulesResult) (ListVpnGatewayNatRulesResult, error)
21752	lvgnrr ListVpnGatewayNatRulesResult
21753}
21754
21755// NextWithContext advances to the next page of values.  If there was an error making
21756// the request the page does not advance and the error is returned.
21757func (page *ListVpnGatewayNatRulesResultPage) NextWithContext(ctx context.Context) (err error) {
21758	if tracing.IsEnabled() {
21759		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewayNatRulesResultPage.NextWithContext")
21760		defer func() {
21761			sc := -1
21762			if page.Response().Response.Response != nil {
21763				sc = page.Response().Response.Response.StatusCode
21764			}
21765			tracing.EndSpan(ctx, sc, err)
21766		}()
21767	}
21768	for {
21769		next, err := page.fn(ctx, page.lvgnrr)
21770		if err != nil {
21771			return err
21772		}
21773		page.lvgnrr = next
21774		if !next.hasNextLink() || !next.IsEmpty() {
21775			break
21776		}
21777	}
21778	return nil
21779}
21780
21781// Next advances to the next page of values.  If there was an error making
21782// the request the page does not advance and the error is returned.
21783// Deprecated: Use NextWithContext() instead.
21784func (page *ListVpnGatewayNatRulesResultPage) Next() error {
21785	return page.NextWithContext(context.Background())
21786}
21787
21788// NotDone returns true if the page enumeration should be started or is not yet complete.
21789func (page ListVpnGatewayNatRulesResultPage) NotDone() bool {
21790	return !page.lvgnrr.IsEmpty()
21791}
21792
21793// Response returns the raw server response from the last page request.
21794func (page ListVpnGatewayNatRulesResultPage) Response() ListVpnGatewayNatRulesResult {
21795	return page.lvgnrr
21796}
21797
21798// Values returns the slice of values for the current page or nil if there are no values.
21799func (page ListVpnGatewayNatRulesResultPage) Values() []VpnGatewayNatRule {
21800	if page.lvgnrr.IsEmpty() {
21801		return nil
21802	}
21803	return *page.lvgnrr.Value
21804}
21805
21806// Creates a new instance of the ListVpnGatewayNatRulesResultPage type.
21807func NewListVpnGatewayNatRulesResultPage(cur ListVpnGatewayNatRulesResult, getNextPage func(context.Context, ListVpnGatewayNatRulesResult) (ListVpnGatewayNatRulesResult, error)) ListVpnGatewayNatRulesResultPage {
21808	return ListVpnGatewayNatRulesResultPage{
21809		fn:     getNextPage,
21810		lvgnrr: cur,
21811	}
21812}
21813
21814// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
21815// URL nextLink to get the next set of results.
21816type ListVpnGatewaysResult struct {
21817	autorest.Response `json:"-"`
21818	// Value - List of VpnGateways.
21819	Value *[]VpnGateway `json:"value,omitempty"`
21820	// NextLink - URL to get the next set of operation list results if there are any.
21821	NextLink *string `json:"nextLink,omitempty"`
21822}
21823
21824// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
21825type ListVpnGatewaysResultIterator struct {
21826	i    int
21827	page ListVpnGatewaysResultPage
21828}
21829
21830// NextWithContext advances to the next value.  If there was an error making
21831// the request the iterator does not advance and the error is returned.
21832func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
21833	if tracing.IsEnabled() {
21834		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
21835		defer func() {
21836			sc := -1
21837			if iter.Response().Response.Response != nil {
21838				sc = iter.Response().Response.Response.StatusCode
21839			}
21840			tracing.EndSpan(ctx, sc, err)
21841		}()
21842	}
21843	iter.i++
21844	if iter.i < len(iter.page.Values()) {
21845		return nil
21846	}
21847	err = iter.page.NextWithContext(ctx)
21848	if err != nil {
21849		iter.i--
21850		return err
21851	}
21852	iter.i = 0
21853	return nil
21854}
21855
21856// Next advances to the next value.  If there was an error making
21857// the request the iterator does not advance and the error is returned.
21858// Deprecated: Use NextWithContext() instead.
21859func (iter *ListVpnGatewaysResultIterator) Next() error {
21860	return iter.NextWithContext(context.Background())
21861}
21862
21863// NotDone returns true if the enumeration should be started or is not yet complete.
21864func (iter ListVpnGatewaysResultIterator) NotDone() bool {
21865	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21866}
21867
21868// Response returns the raw server response from the last page request.
21869func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
21870	return iter.page.Response()
21871}
21872
21873// Value returns the current value or a zero-initialized value if the
21874// iterator has advanced beyond the end of the collection.
21875func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
21876	if !iter.page.NotDone() {
21877		return VpnGateway{}
21878	}
21879	return iter.page.Values()[iter.i]
21880}
21881
21882// Creates a new instance of the ListVpnGatewaysResultIterator type.
21883func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
21884	return ListVpnGatewaysResultIterator{page: page}
21885}
21886
21887// IsEmpty returns true if the ListResult contains no values.
21888func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
21889	return lvgr.Value == nil || len(*lvgr.Value) == 0
21890}
21891
21892// hasNextLink returns true if the NextLink is not empty.
21893func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
21894	return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
21895}
21896
21897// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
21898// It returns nil if no more results exist.
21899func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
21900	if !lvgr.hasNextLink() {
21901		return nil, nil
21902	}
21903	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21904		autorest.AsJSON(),
21905		autorest.AsGet(),
21906		autorest.WithBaseURL(to.String(lvgr.NextLink)))
21907}
21908
21909// ListVpnGatewaysResultPage contains a page of VpnGateway values.
21910type ListVpnGatewaysResultPage struct {
21911	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
21912	lvgr ListVpnGatewaysResult
21913}
21914
21915// NextWithContext advances to the next page of values.  If there was an error making
21916// the request the page does not advance and the error is returned.
21917func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
21918	if tracing.IsEnabled() {
21919		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
21920		defer func() {
21921			sc := -1
21922			if page.Response().Response.Response != nil {
21923				sc = page.Response().Response.Response.StatusCode
21924			}
21925			tracing.EndSpan(ctx, sc, err)
21926		}()
21927	}
21928	for {
21929		next, err := page.fn(ctx, page.lvgr)
21930		if err != nil {
21931			return err
21932		}
21933		page.lvgr = next
21934		if !next.hasNextLink() || !next.IsEmpty() {
21935			break
21936		}
21937	}
21938	return nil
21939}
21940
21941// Next advances to the next page of values.  If there was an error making
21942// the request the page does not advance and the error is returned.
21943// Deprecated: Use NextWithContext() instead.
21944func (page *ListVpnGatewaysResultPage) Next() error {
21945	return page.NextWithContext(context.Background())
21946}
21947
21948// NotDone returns true if the page enumeration should be started or is not yet complete.
21949func (page ListVpnGatewaysResultPage) NotDone() bool {
21950	return !page.lvgr.IsEmpty()
21951}
21952
21953// Response returns the raw server response from the last page request.
21954func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
21955	return page.lvgr
21956}
21957
21958// Values returns the slice of values for the current page or nil if there are no values.
21959func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
21960	if page.lvgr.IsEmpty() {
21961		return nil
21962	}
21963	return *page.lvgr.Value
21964}
21965
21966// Creates a new instance of the ListVpnGatewaysResultPage type.
21967func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
21968	return ListVpnGatewaysResultPage{
21969		fn:   getNextPage,
21970		lvgr: cur,
21971	}
21972}
21973
21974// ListVpnServerConfigurationsResult result of the request to list all VpnServerConfigurations. It contains
21975// a list of VpnServerConfigurations and a URL nextLink to get the next set of results.
21976type ListVpnServerConfigurationsResult struct {
21977	autorest.Response `json:"-"`
21978	// Value - List of VpnServerConfigurations.
21979	Value *[]VpnServerConfiguration `json:"value,omitempty"`
21980	// NextLink - URL to get the next set of operation list results if there are any.
21981	NextLink *string `json:"nextLink,omitempty"`
21982}
21983
21984// ListVpnServerConfigurationsResultIterator provides access to a complete listing of
21985// VpnServerConfiguration values.
21986type ListVpnServerConfigurationsResultIterator struct {
21987	i    int
21988	page ListVpnServerConfigurationsResultPage
21989}
21990
21991// NextWithContext advances to the next value.  If there was an error making
21992// the request the iterator does not advance and the error is returned.
21993func (iter *ListVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) {
21994	if tracing.IsEnabled() {
21995		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnServerConfigurationsResultIterator.NextWithContext")
21996		defer func() {
21997			sc := -1
21998			if iter.Response().Response.Response != nil {
21999				sc = iter.Response().Response.Response.StatusCode
22000			}
22001			tracing.EndSpan(ctx, sc, err)
22002		}()
22003	}
22004	iter.i++
22005	if iter.i < len(iter.page.Values()) {
22006		return nil
22007	}
22008	err = iter.page.NextWithContext(ctx)
22009	if err != nil {
22010		iter.i--
22011		return err
22012	}
22013	iter.i = 0
22014	return nil
22015}
22016
22017// Next advances to the next value.  If there was an error making
22018// the request the iterator does not advance and the error is returned.
22019// Deprecated: Use NextWithContext() instead.
22020func (iter *ListVpnServerConfigurationsResultIterator) Next() error {
22021	return iter.NextWithContext(context.Background())
22022}
22023
22024// NotDone returns true if the enumeration should be started or is not yet complete.
22025func (iter ListVpnServerConfigurationsResultIterator) NotDone() bool {
22026	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22027}
22028
22029// Response returns the raw server response from the last page request.
22030func (iter ListVpnServerConfigurationsResultIterator) Response() ListVpnServerConfigurationsResult {
22031	return iter.page.Response()
22032}
22033
22034// Value returns the current value or a zero-initialized value if the
22035// iterator has advanced beyond the end of the collection.
22036func (iter ListVpnServerConfigurationsResultIterator) Value() VpnServerConfiguration {
22037	if !iter.page.NotDone() {
22038		return VpnServerConfiguration{}
22039	}
22040	return iter.page.Values()[iter.i]
22041}
22042
22043// Creates a new instance of the ListVpnServerConfigurationsResultIterator type.
22044func NewListVpnServerConfigurationsResultIterator(page ListVpnServerConfigurationsResultPage) ListVpnServerConfigurationsResultIterator {
22045	return ListVpnServerConfigurationsResultIterator{page: page}
22046}
22047
22048// IsEmpty returns true if the ListResult contains no values.
22049func (lvscr ListVpnServerConfigurationsResult) IsEmpty() bool {
22050	return lvscr.Value == nil || len(*lvscr.Value) == 0
22051}
22052
22053// hasNextLink returns true if the NextLink is not empty.
22054func (lvscr ListVpnServerConfigurationsResult) hasNextLink() bool {
22055	return lvscr.NextLink != nil && len(*lvscr.NextLink) != 0
22056}
22057
22058// listVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results.
22059// It returns nil if no more results exist.
22060func (lvscr ListVpnServerConfigurationsResult) listVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) {
22061	if !lvscr.hasNextLink() {
22062		return nil, nil
22063	}
22064	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22065		autorest.AsJSON(),
22066		autorest.AsGet(),
22067		autorest.WithBaseURL(to.String(lvscr.NextLink)))
22068}
22069
22070// ListVpnServerConfigurationsResultPage contains a page of VpnServerConfiguration values.
22071type ListVpnServerConfigurationsResultPage struct {
22072	fn    func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error)
22073	lvscr ListVpnServerConfigurationsResult
22074}
22075
22076// NextWithContext advances to the next page of values.  If there was an error making
22077// the request the page does not advance and the error is returned.
22078func (page *ListVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) {
22079	if tracing.IsEnabled() {
22080		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnServerConfigurationsResultPage.NextWithContext")
22081		defer func() {
22082			sc := -1
22083			if page.Response().Response.Response != nil {
22084				sc = page.Response().Response.Response.StatusCode
22085			}
22086			tracing.EndSpan(ctx, sc, err)
22087		}()
22088	}
22089	for {
22090		next, err := page.fn(ctx, page.lvscr)
22091		if err != nil {
22092			return err
22093		}
22094		page.lvscr = next
22095		if !next.hasNextLink() || !next.IsEmpty() {
22096			break
22097		}
22098	}
22099	return nil
22100}
22101
22102// Next advances to the next page of values.  If there was an error making
22103// the request the page does not advance and the error is returned.
22104// Deprecated: Use NextWithContext() instead.
22105func (page *ListVpnServerConfigurationsResultPage) Next() error {
22106	return page.NextWithContext(context.Background())
22107}
22108
22109// NotDone returns true if the page enumeration should be started or is not yet complete.
22110func (page ListVpnServerConfigurationsResultPage) NotDone() bool {
22111	return !page.lvscr.IsEmpty()
22112}
22113
22114// Response returns the raw server response from the last page request.
22115func (page ListVpnServerConfigurationsResultPage) Response() ListVpnServerConfigurationsResult {
22116	return page.lvscr
22117}
22118
22119// Values returns the slice of values for the current page or nil if there are no values.
22120func (page ListVpnServerConfigurationsResultPage) Values() []VpnServerConfiguration {
22121	if page.lvscr.IsEmpty() {
22122		return nil
22123	}
22124	return *page.lvscr.Value
22125}
22126
22127// Creates a new instance of the ListVpnServerConfigurationsResultPage type.
22128func NewListVpnServerConfigurationsResultPage(cur ListVpnServerConfigurationsResult, getNextPage func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error)) ListVpnServerConfigurationsResultPage {
22129	return ListVpnServerConfigurationsResultPage{
22130		fn:    getNextPage,
22131		lvscr: cur,
22132	}
22133}
22134
22135// ListVpnSiteLinkConnectionsResult result of the request to list all vpn connections to a virtual wan vpn
22136// gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
22137type ListVpnSiteLinkConnectionsResult struct {
22138	autorest.Response `json:"-"`
22139	// Value - List of VpnSiteLinkConnections.
22140	Value *[]VpnSiteLinkConnection `json:"value,omitempty"`
22141	// NextLink - URL to get the next set of operation list results if there are any.
22142	NextLink *string `json:"nextLink,omitempty"`
22143}
22144
22145// ListVpnSiteLinkConnectionsResultIterator provides access to a complete listing of VpnSiteLinkConnection
22146// values.
22147type ListVpnSiteLinkConnectionsResultIterator struct {
22148	i    int
22149	page ListVpnSiteLinkConnectionsResultPage
22150}
22151
22152// NextWithContext advances to the next value.  If there was an error making
22153// the request the iterator does not advance and the error is returned.
22154func (iter *ListVpnSiteLinkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
22155	if tracing.IsEnabled() {
22156		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultIterator.NextWithContext")
22157		defer func() {
22158			sc := -1
22159			if iter.Response().Response.Response != nil {
22160				sc = iter.Response().Response.Response.StatusCode
22161			}
22162			tracing.EndSpan(ctx, sc, err)
22163		}()
22164	}
22165	iter.i++
22166	if iter.i < len(iter.page.Values()) {
22167		return nil
22168	}
22169	err = iter.page.NextWithContext(ctx)
22170	if err != nil {
22171		iter.i--
22172		return err
22173	}
22174	iter.i = 0
22175	return nil
22176}
22177
22178// Next advances to the next value.  If there was an error making
22179// the request the iterator does not advance and the error is returned.
22180// Deprecated: Use NextWithContext() instead.
22181func (iter *ListVpnSiteLinkConnectionsResultIterator) Next() error {
22182	return iter.NextWithContext(context.Background())
22183}
22184
22185// NotDone returns true if the enumeration should be started or is not yet complete.
22186func (iter ListVpnSiteLinkConnectionsResultIterator) NotDone() bool {
22187	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22188}
22189
22190// Response returns the raw server response from the last page request.
22191func (iter ListVpnSiteLinkConnectionsResultIterator) Response() ListVpnSiteLinkConnectionsResult {
22192	return iter.page.Response()
22193}
22194
22195// Value returns the current value or a zero-initialized value if the
22196// iterator has advanced beyond the end of the collection.
22197func (iter ListVpnSiteLinkConnectionsResultIterator) Value() VpnSiteLinkConnection {
22198	if !iter.page.NotDone() {
22199		return VpnSiteLinkConnection{}
22200	}
22201	return iter.page.Values()[iter.i]
22202}
22203
22204// Creates a new instance of the ListVpnSiteLinkConnectionsResultIterator type.
22205func NewListVpnSiteLinkConnectionsResultIterator(page ListVpnSiteLinkConnectionsResultPage) ListVpnSiteLinkConnectionsResultIterator {
22206	return ListVpnSiteLinkConnectionsResultIterator{page: page}
22207}
22208
22209// IsEmpty returns true if the ListResult contains no values.
22210func (lvslcr ListVpnSiteLinkConnectionsResult) IsEmpty() bool {
22211	return lvslcr.Value == nil || len(*lvslcr.Value) == 0
22212}
22213
22214// hasNextLink returns true if the NextLink is not empty.
22215func (lvslcr ListVpnSiteLinkConnectionsResult) hasNextLink() bool {
22216	return lvslcr.NextLink != nil && len(*lvslcr.NextLink) != 0
22217}
22218
22219// listVpnSiteLinkConnectionsResultPreparer prepares a request to retrieve the next set of results.
22220// It returns nil if no more results exist.
22221func (lvslcr ListVpnSiteLinkConnectionsResult) listVpnSiteLinkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
22222	if !lvslcr.hasNextLink() {
22223		return nil, nil
22224	}
22225	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22226		autorest.AsJSON(),
22227		autorest.AsGet(),
22228		autorest.WithBaseURL(to.String(lvslcr.NextLink)))
22229}
22230
22231// ListVpnSiteLinkConnectionsResultPage contains a page of VpnSiteLinkConnection values.
22232type ListVpnSiteLinkConnectionsResultPage struct {
22233	fn     func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)
22234	lvslcr ListVpnSiteLinkConnectionsResult
22235}
22236
22237// NextWithContext advances to the next page of values.  If there was an error making
22238// the request the page does not advance and the error is returned.
22239func (page *ListVpnSiteLinkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
22240	if tracing.IsEnabled() {
22241		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultPage.NextWithContext")
22242		defer func() {
22243			sc := -1
22244			if page.Response().Response.Response != nil {
22245				sc = page.Response().Response.Response.StatusCode
22246			}
22247			tracing.EndSpan(ctx, sc, err)
22248		}()
22249	}
22250	for {
22251		next, err := page.fn(ctx, page.lvslcr)
22252		if err != nil {
22253			return err
22254		}
22255		page.lvslcr = next
22256		if !next.hasNextLink() || !next.IsEmpty() {
22257			break
22258		}
22259	}
22260	return nil
22261}
22262
22263// Next advances to the next page of values.  If there was an error making
22264// the request the page does not advance and the error is returned.
22265// Deprecated: Use NextWithContext() instead.
22266func (page *ListVpnSiteLinkConnectionsResultPage) Next() error {
22267	return page.NextWithContext(context.Background())
22268}
22269
22270// NotDone returns true if the page enumeration should be started or is not yet complete.
22271func (page ListVpnSiteLinkConnectionsResultPage) NotDone() bool {
22272	return !page.lvslcr.IsEmpty()
22273}
22274
22275// Response returns the raw server response from the last page request.
22276func (page ListVpnSiteLinkConnectionsResultPage) Response() ListVpnSiteLinkConnectionsResult {
22277	return page.lvslcr
22278}
22279
22280// Values returns the slice of values for the current page or nil if there are no values.
22281func (page ListVpnSiteLinkConnectionsResultPage) Values() []VpnSiteLinkConnection {
22282	if page.lvslcr.IsEmpty() {
22283		return nil
22284	}
22285	return *page.lvslcr.Value
22286}
22287
22288// Creates a new instance of the ListVpnSiteLinkConnectionsResultPage type.
22289func NewListVpnSiteLinkConnectionsResultPage(cur ListVpnSiteLinkConnectionsResult, getNextPage func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)) ListVpnSiteLinkConnectionsResultPage {
22290	return ListVpnSiteLinkConnectionsResultPage{
22291		fn:     getNextPage,
22292		lvslcr: cur,
22293	}
22294}
22295
22296// ListVpnSiteLinksResult result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks
22297// and a URL nextLink to get the next set of results.
22298type ListVpnSiteLinksResult struct {
22299	autorest.Response `json:"-"`
22300	// Value - List of VpnSitesLinks.
22301	Value *[]VpnSiteLink `json:"value,omitempty"`
22302	// NextLink - URL to get the next set of operation list results if there are any.
22303	NextLink *string `json:"nextLink,omitempty"`
22304}
22305
22306// ListVpnSiteLinksResultIterator provides access to a complete listing of VpnSiteLink values.
22307type ListVpnSiteLinksResultIterator struct {
22308	i    int
22309	page ListVpnSiteLinksResultPage
22310}
22311
22312// NextWithContext advances to the next value.  If there was an error making
22313// the request the iterator does not advance and the error is returned.
22314func (iter *ListVpnSiteLinksResultIterator) NextWithContext(ctx context.Context) (err error) {
22315	if tracing.IsEnabled() {
22316		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultIterator.NextWithContext")
22317		defer func() {
22318			sc := -1
22319			if iter.Response().Response.Response != nil {
22320				sc = iter.Response().Response.Response.StatusCode
22321			}
22322			tracing.EndSpan(ctx, sc, err)
22323		}()
22324	}
22325	iter.i++
22326	if iter.i < len(iter.page.Values()) {
22327		return nil
22328	}
22329	err = iter.page.NextWithContext(ctx)
22330	if err != nil {
22331		iter.i--
22332		return err
22333	}
22334	iter.i = 0
22335	return nil
22336}
22337
22338// Next advances to the next value.  If there was an error making
22339// the request the iterator does not advance and the error is returned.
22340// Deprecated: Use NextWithContext() instead.
22341func (iter *ListVpnSiteLinksResultIterator) Next() error {
22342	return iter.NextWithContext(context.Background())
22343}
22344
22345// NotDone returns true if the enumeration should be started or is not yet complete.
22346func (iter ListVpnSiteLinksResultIterator) NotDone() bool {
22347	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22348}
22349
22350// Response returns the raw server response from the last page request.
22351func (iter ListVpnSiteLinksResultIterator) Response() ListVpnSiteLinksResult {
22352	return iter.page.Response()
22353}
22354
22355// Value returns the current value or a zero-initialized value if the
22356// iterator has advanced beyond the end of the collection.
22357func (iter ListVpnSiteLinksResultIterator) Value() VpnSiteLink {
22358	if !iter.page.NotDone() {
22359		return VpnSiteLink{}
22360	}
22361	return iter.page.Values()[iter.i]
22362}
22363
22364// Creates a new instance of the ListVpnSiteLinksResultIterator type.
22365func NewListVpnSiteLinksResultIterator(page ListVpnSiteLinksResultPage) ListVpnSiteLinksResultIterator {
22366	return ListVpnSiteLinksResultIterator{page: page}
22367}
22368
22369// IsEmpty returns true if the ListResult contains no values.
22370func (lvslr ListVpnSiteLinksResult) IsEmpty() bool {
22371	return lvslr.Value == nil || len(*lvslr.Value) == 0
22372}
22373
22374// hasNextLink returns true if the NextLink is not empty.
22375func (lvslr ListVpnSiteLinksResult) hasNextLink() bool {
22376	return lvslr.NextLink != nil && len(*lvslr.NextLink) != 0
22377}
22378
22379// listVpnSiteLinksResultPreparer prepares a request to retrieve the next set of results.
22380// It returns nil if no more results exist.
22381func (lvslr ListVpnSiteLinksResult) listVpnSiteLinksResultPreparer(ctx context.Context) (*http.Request, error) {
22382	if !lvslr.hasNextLink() {
22383		return nil, nil
22384	}
22385	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22386		autorest.AsJSON(),
22387		autorest.AsGet(),
22388		autorest.WithBaseURL(to.String(lvslr.NextLink)))
22389}
22390
22391// ListVpnSiteLinksResultPage contains a page of VpnSiteLink values.
22392type ListVpnSiteLinksResultPage struct {
22393	fn    func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)
22394	lvslr ListVpnSiteLinksResult
22395}
22396
22397// NextWithContext advances to the next page of values.  If there was an error making
22398// the request the page does not advance and the error is returned.
22399func (page *ListVpnSiteLinksResultPage) NextWithContext(ctx context.Context) (err error) {
22400	if tracing.IsEnabled() {
22401		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultPage.NextWithContext")
22402		defer func() {
22403			sc := -1
22404			if page.Response().Response.Response != nil {
22405				sc = page.Response().Response.Response.StatusCode
22406			}
22407			tracing.EndSpan(ctx, sc, err)
22408		}()
22409	}
22410	for {
22411		next, err := page.fn(ctx, page.lvslr)
22412		if err != nil {
22413			return err
22414		}
22415		page.lvslr = next
22416		if !next.hasNextLink() || !next.IsEmpty() {
22417			break
22418		}
22419	}
22420	return nil
22421}
22422
22423// Next advances to the next page of values.  If there was an error making
22424// the request the page does not advance and the error is returned.
22425// Deprecated: Use NextWithContext() instead.
22426func (page *ListVpnSiteLinksResultPage) Next() error {
22427	return page.NextWithContext(context.Background())
22428}
22429
22430// NotDone returns true if the page enumeration should be started or is not yet complete.
22431func (page ListVpnSiteLinksResultPage) NotDone() bool {
22432	return !page.lvslr.IsEmpty()
22433}
22434
22435// Response returns the raw server response from the last page request.
22436func (page ListVpnSiteLinksResultPage) Response() ListVpnSiteLinksResult {
22437	return page.lvslr
22438}
22439
22440// Values returns the slice of values for the current page or nil if there are no values.
22441func (page ListVpnSiteLinksResultPage) Values() []VpnSiteLink {
22442	if page.lvslr.IsEmpty() {
22443		return nil
22444	}
22445	return *page.lvslr.Value
22446}
22447
22448// Creates a new instance of the ListVpnSiteLinksResultPage type.
22449func NewListVpnSiteLinksResultPage(cur ListVpnSiteLinksResult, getNextPage func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)) ListVpnSiteLinksResultPage {
22450	return ListVpnSiteLinksResultPage{
22451		fn:    getNextPage,
22452		lvslr: cur,
22453	}
22454}
22455
22456// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
22457// nextLink to get the next set of results.
22458type ListVpnSitesResult struct {
22459	autorest.Response `json:"-"`
22460	// Value - List of VpnSites.
22461	Value *[]VpnSite `json:"value,omitempty"`
22462	// NextLink - URL to get the next set of operation list results if there are any.
22463	NextLink *string `json:"nextLink,omitempty"`
22464}
22465
22466// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
22467type ListVpnSitesResultIterator struct {
22468	i    int
22469	page ListVpnSitesResultPage
22470}
22471
22472// NextWithContext advances to the next value.  If there was an error making
22473// the request the iterator does not advance and the error is returned.
22474func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
22475	if tracing.IsEnabled() {
22476		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
22477		defer func() {
22478			sc := -1
22479			if iter.Response().Response.Response != nil {
22480				sc = iter.Response().Response.Response.StatusCode
22481			}
22482			tracing.EndSpan(ctx, sc, err)
22483		}()
22484	}
22485	iter.i++
22486	if iter.i < len(iter.page.Values()) {
22487		return nil
22488	}
22489	err = iter.page.NextWithContext(ctx)
22490	if err != nil {
22491		iter.i--
22492		return err
22493	}
22494	iter.i = 0
22495	return nil
22496}
22497
22498// Next advances to the next value.  If there was an error making
22499// the request the iterator does not advance and the error is returned.
22500// Deprecated: Use NextWithContext() instead.
22501func (iter *ListVpnSitesResultIterator) Next() error {
22502	return iter.NextWithContext(context.Background())
22503}
22504
22505// NotDone returns true if the enumeration should be started or is not yet complete.
22506func (iter ListVpnSitesResultIterator) NotDone() bool {
22507	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22508}
22509
22510// Response returns the raw server response from the last page request.
22511func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
22512	return iter.page.Response()
22513}
22514
22515// Value returns the current value or a zero-initialized value if the
22516// iterator has advanced beyond the end of the collection.
22517func (iter ListVpnSitesResultIterator) Value() VpnSite {
22518	if !iter.page.NotDone() {
22519		return VpnSite{}
22520	}
22521	return iter.page.Values()[iter.i]
22522}
22523
22524// Creates a new instance of the ListVpnSitesResultIterator type.
22525func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
22526	return ListVpnSitesResultIterator{page: page}
22527}
22528
22529// IsEmpty returns true if the ListResult contains no values.
22530func (lvsr ListVpnSitesResult) IsEmpty() bool {
22531	return lvsr.Value == nil || len(*lvsr.Value) == 0
22532}
22533
22534// hasNextLink returns true if the NextLink is not empty.
22535func (lvsr ListVpnSitesResult) hasNextLink() bool {
22536	return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
22537}
22538
22539// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
22540// It returns nil if no more results exist.
22541func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
22542	if !lvsr.hasNextLink() {
22543		return nil, nil
22544	}
22545	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22546		autorest.AsJSON(),
22547		autorest.AsGet(),
22548		autorest.WithBaseURL(to.String(lvsr.NextLink)))
22549}
22550
22551// ListVpnSitesResultPage contains a page of VpnSite values.
22552type ListVpnSitesResultPage struct {
22553	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
22554	lvsr ListVpnSitesResult
22555}
22556
22557// NextWithContext advances to the next page of values.  If there was an error making
22558// the request the page does not advance and the error is returned.
22559func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
22560	if tracing.IsEnabled() {
22561		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
22562		defer func() {
22563			sc := -1
22564			if page.Response().Response.Response != nil {
22565				sc = page.Response().Response.Response.StatusCode
22566			}
22567			tracing.EndSpan(ctx, sc, err)
22568		}()
22569	}
22570	for {
22571		next, err := page.fn(ctx, page.lvsr)
22572		if err != nil {
22573			return err
22574		}
22575		page.lvsr = next
22576		if !next.hasNextLink() || !next.IsEmpty() {
22577			break
22578		}
22579	}
22580	return nil
22581}
22582
22583// Next advances to the next page of values.  If there was an error making
22584// the request the page does not advance and the error is returned.
22585// Deprecated: Use NextWithContext() instead.
22586func (page *ListVpnSitesResultPage) Next() error {
22587	return page.NextWithContext(context.Background())
22588}
22589
22590// NotDone returns true if the page enumeration should be started or is not yet complete.
22591func (page ListVpnSitesResultPage) NotDone() bool {
22592	return !page.lvsr.IsEmpty()
22593}
22594
22595// Response returns the raw server response from the last page request.
22596func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
22597	return page.lvsr
22598}
22599
22600// Values returns the slice of values for the current page or nil if there are no values.
22601func (page ListVpnSitesResultPage) Values() []VpnSite {
22602	if page.lvsr.IsEmpty() {
22603		return nil
22604	}
22605	return *page.lvsr.Value
22606}
22607
22608// Creates a new instance of the ListVpnSitesResultPage type.
22609func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
22610	return ListVpnSitesResultPage{
22611		fn:   getNextPage,
22612		lvsr: cur,
22613	}
22614}
22615
22616// LoadBalancer loadBalancer resource.
22617type LoadBalancer struct {
22618	autorest.Response `json:"-"`
22619	// ExtendedLocation - The extended location of the load balancer.
22620	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
22621	// Sku - The load balancer SKU.
22622	Sku *LoadBalancerSku `json:"sku,omitempty"`
22623	// LoadBalancerPropertiesFormat - Properties of load balancer.
22624	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
22625	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22626	Etag *string `json:"etag,omitempty"`
22627	// ID - Resource ID.
22628	ID *string `json:"id,omitempty"`
22629	// Name - READ-ONLY; Resource name.
22630	Name *string `json:"name,omitempty"`
22631	// Type - READ-ONLY; Resource type.
22632	Type *string `json:"type,omitempty"`
22633	// Location - Resource location.
22634	Location *string `json:"location,omitempty"`
22635	// Tags - Resource tags.
22636	Tags map[string]*string `json:"tags"`
22637}
22638
22639// MarshalJSON is the custom marshaler for LoadBalancer.
22640func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
22641	objectMap := make(map[string]interface{})
22642	if lb.ExtendedLocation != nil {
22643		objectMap["extendedLocation"] = lb.ExtendedLocation
22644	}
22645	if lb.Sku != nil {
22646		objectMap["sku"] = lb.Sku
22647	}
22648	if lb.LoadBalancerPropertiesFormat != nil {
22649		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
22650	}
22651	if lb.ID != nil {
22652		objectMap["id"] = lb.ID
22653	}
22654	if lb.Location != nil {
22655		objectMap["location"] = lb.Location
22656	}
22657	if lb.Tags != nil {
22658		objectMap["tags"] = lb.Tags
22659	}
22660	return json.Marshal(objectMap)
22661}
22662
22663// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
22664func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
22665	var m map[string]*json.RawMessage
22666	err := json.Unmarshal(body, &m)
22667	if err != nil {
22668		return err
22669	}
22670	for k, v := range m {
22671		switch k {
22672		case "extendedLocation":
22673			if v != nil {
22674				var extendedLocation ExtendedLocation
22675				err = json.Unmarshal(*v, &extendedLocation)
22676				if err != nil {
22677					return err
22678				}
22679				lb.ExtendedLocation = &extendedLocation
22680			}
22681		case "sku":
22682			if v != nil {
22683				var sku LoadBalancerSku
22684				err = json.Unmarshal(*v, &sku)
22685				if err != nil {
22686					return err
22687				}
22688				lb.Sku = &sku
22689			}
22690		case "properties":
22691			if v != nil {
22692				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
22693				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
22694				if err != nil {
22695					return err
22696				}
22697				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
22698			}
22699		case "etag":
22700			if v != nil {
22701				var etag string
22702				err = json.Unmarshal(*v, &etag)
22703				if err != nil {
22704					return err
22705				}
22706				lb.Etag = &etag
22707			}
22708		case "id":
22709			if v != nil {
22710				var ID string
22711				err = json.Unmarshal(*v, &ID)
22712				if err != nil {
22713					return err
22714				}
22715				lb.ID = &ID
22716			}
22717		case "name":
22718			if v != nil {
22719				var name string
22720				err = json.Unmarshal(*v, &name)
22721				if err != nil {
22722					return err
22723				}
22724				lb.Name = &name
22725			}
22726		case "type":
22727			if v != nil {
22728				var typeVar string
22729				err = json.Unmarshal(*v, &typeVar)
22730				if err != nil {
22731					return err
22732				}
22733				lb.Type = &typeVar
22734			}
22735		case "location":
22736			if v != nil {
22737				var location string
22738				err = json.Unmarshal(*v, &location)
22739				if err != nil {
22740					return err
22741				}
22742				lb.Location = &location
22743			}
22744		case "tags":
22745			if v != nil {
22746				var tags map[string]*string
22747				err = json.Unmarshal(*v, &tags)
22748				if err != nil {
22749					return err
22750				}
22751				lb.Tags = tags
22752			}
22753		}
22754	}
22755
22756	return nil
22757}
22758
22759// LoadBalancerBackendAddress load balancer backend addresses.
22760type LoadBalancerBackendAddress struct {
22761	// LoadBalancerBackendAddressPropertiesFormat - Properties of load balancer backend address pool.
22762	*LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"`
22763	// Name - Name of the backend address.
22764	Name *string `json:"name,omitempty"`
22765}
22766
22767// MarshalJSON is the custom marshaler for LoadBalancerBackendAddress.
22768func (lbba LoadBalancerBackendAddress) MarshalJSON() ([]byte, error) {
22769	objectMap := make(map[string]interface{})
22770	if lbba.LoadBalancerBackendAddressPropertiesFormat != nil {
22771		objectMap["properties"] = lbba.LoadBalancerBackendAddressPropertiesFormat
22772	}
22773	if lbba.Name != nil {
22774		objectMap["name"] = lbba.Name
22775	}
22776	return json.Marshal(objectMap)
22777}
22778
22779// UnmarshalJSON is the custom unmarshaler for LoadBalancerBackendAddress struct.
22780func (lbba *LoadBalancerBackendAddress) UnmarshalJSON(body []byte) error {
22781	var m map[string]*json.RawMessage
22782	err := json.Unmarshal(body, &m)
22783	if err != nil {
22784		return err
22785	}
22786	for k, v := range m {
22787		switch k {
22788		case "properties":
22789			if v != nil {
22790				var loadBalancerBackendAddressPropertiesFormat LoadBalancerBackendAddressPropertiesFormat
22791				err = json.Unmarshal(*v, &loadBalancerBackendAddressPropertiesFormat)
22792				if err != nil {
22793					return err
22794				}
22795				lbba.LoadBalancerBackendAddressPropertiesFormat = &loadBalancerBackendAddressPropertiesFormat
22796			}
22797		case "name":
22798			if v != nil {
22799				var name string
22800				err = json.Unmarshal(*v, &name)
22801				if err != nil {
22802					return err
22803				}
22804				lbba.Name = &name
22805			}
22806		}
22807	}
22808
22809	return nil
22810}
22811
22812// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
22813type LoadBalancerBackendAddressPoolListResult struct {
22814	autorest.Response `json:"-"`
22815	// Value - A list of backend address pools in a load balancer.
22816	Value *[]BackendAddressPool `json:"value,omitempty"`
22817	// NextLink - READ-ONLY; The URL to get the next set of results.
22818	NextLink *string `json:"nextLink,omitempty"`
22819}
22820
22821// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
22822func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
22823	objectMap := make(map[string]interface{})
22824	if lbbaplr.Value != nil {
22825		objectMap["value"] = lbbaplr.Value
22826	}
22827	return json.Marshal(objectMap)
22828}
22829
22830// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
22831// BackendAddressPool values.
22832type LoadBalancerBackendAddressPoolListResultIterator struct {
22833	i    int
22834	page LoadBalancerBackendAddressPoolListResultPage
22835}
22836
22837// NextWithContext advances to the next value.  If there was an error making
22838// the request the iterator does not advance and the error is returned.
22839func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
22840	if tracing.IsEnabled() {
22841		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
22842		defer func() {
22843			sc := -1
22844			if iter.Response().Response.Response != nil {
22845				sc = iter.Response().Response.Response.StatusCode
22846			}
22847			tracing.EndSpan(ctx, sc, err)
22848		}()
22849	}
22850	iter.i++
22851	if iter.i < len(iter.page.Values()) {
22852		return nil
22853	}
22854	err = iter.page.NextWithContext(ctx)
22855	if err != nil {
22856		iter.i--
22857		return err
22858	}
22859	iter.i = 0
22860	return nil
22861}
22862
22863// Next advances to the next value.  If there was an error making
22864// the request the iterator does not advance and the error is returned.
22865// Deprecated: Use NextWithContext() instead.
22866func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
22867	return iter.NextWithContext(context.Background())
22868}
22869
22870// NotDone returns true if the enumeration should be started or is not yet complete.
22871func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
22872	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22873}
22874
22875// Response returns the raw server response from the last page request.
22876func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
22877	return iter.page.Response()
22878}
22879
22880// Value returns the current value or a zero-initialized value if the
22881// iterator has advanced beyond the end of the collection.
22882func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
22883	if !iter.page.NotDone() {
22884		return BackendAddressPool{}
22885	}
22886	return iter.page.Values()[iter.i]
22887}
22888
22889// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
22890func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
22891	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
22892}
22893
22894// IsEmpty returns true if the ListResult contains no values.
22895func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
22896	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
22897}
22898
22899// hasNextLink returns true if the NextLink is not empty.
22900func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
22901	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
22902}
22903
22904// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
22905// It returns nil if no more results exist.
22906func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
22907	if !lbbaplr.hasNextLink() {
22908		return nil, nil
22909	}
22910	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22911		autorest.AsJSON(),
22912		autorest.AsGet(),
22913		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
22914}
22915
22916// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
22917type LoadBalancerBackendAddressPoolListResultPage struct {
22918	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
22919	lbbaplr LoadBalancerBackendAddressPoolListResult
22920}
22921
22922// NextWithContext advances to the next page of values.  If there was an error making
22923// the request the page does not advance and the error is returned.
22924func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
22925	if tracing.IsEnabled() {
22926		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
22927		defer func() {
22928			sc := -1
22929			if page.Response().Response.Response != nil {
22930				sc = page.Response().Response.Response.StatusCode
22931			}
22932			tracing.EndSpan(ctx, sc, err)
22933		}()
22934	}
22935	for {
22936		next, err := page.fn(ctx, page.lbbaplr)
22937		if err != nil {
22938			return err
22939		}
22940		page.lbbaplr = next
22941		if !next.hasNextLink() || !next.IsEmpty() {
22942			break
22943		}
22944	}
22945	return nil
22946}
22947
22948// Next advances to the next page of values.  If there was an error making
22949// the request the page does not advance and the error is returned.
22950// Deprecated: Use NextWithContext() instead.
22951func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
22952	return page.NextWithContext(context.Background())
22953}
22954
22955// NotDone returns true if the page enumeration should be started or is not yet complete.
22956func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
22957	return !page.lbbaplr.IsEmpty()
22958}
22959
22960// Response returns the raw server response from the last page request.
22961func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
22962	return page.lbbaplr
22963}
22964
22965// Values returns the slice of values for the current page or nil if there are no values.
22966func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
22967	if page.lbbaplr.IsEmpty() {
22968		return nil
22969	}
22970	return *page.lbbaplr.Value
22971}
22972
22973// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
22974func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
22975	return LoadBalancerBackendAddressPoolListResultPage{
22976		fn:      getNextPage,
22977		lbbaplr: cur,
22978	}
22979}
22980
22981// LoadBalancerBackendAddressPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
22982// results of a long-running operation.
22983type LoadBalancerBackendAddressPoolsCreateOrUpdateFuture struct {
22984	azure.FutureAPI
22985	// Result returns the result of the asynchronous operation.
22986	// If the operation has not completed it will return an error.
22987	Result func(LoadBalancerBackendAddressPoolsClient) (BackendAddressPool, error)
22988}
22989
22990// LoadBalancerBackendAddressPoolsDeleteFuture an abstraction for monitoring and retrieving the results of
22991// a long-running operation.
22992type LoadBalancerBackendAddressPoolsDeleteFuture struct {
22993	azure.FutureAPI
22994	// Result returns the result of the asynchronous operation.
22995	// If the operation has not completed it will return an error.
22996	Result func(LoadBalancerBackendAddressPoolsClient) (autorest.Response, error)
22997}
22998
22999// LoadBalancerBackendAddressPropertiesFormat properties of the load balancer backend addresses.
23000type LoadBalancerBackendAddressPropertiesFormat struct {
23001	// VirtualNetwork - Reference to an existing virtual network.
23002	VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"`
23003	// Subnet - Reference to an existing subnet.
23004	Subnet *SubResource `json:"subnet,omitempty"`
23005	// IPAddress - IP Address belonging to the referenced virtual network.
23006	IPAddress *string `json:"ipAddress,omitempty"`
23007	// NetworkInterfaceIPConfiguration - READ-ONLY; Reference to IP address defined in network interfaces.
23008	NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"`
23009	// LoadBalancerFrontendIPConfiguration - Reference to the frontend ip address configuration defined in regional loadbalancer.
23010	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"`
23011}
23012
23013// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPropertiesFormat.
23014func (lbbapf LoadBalancerBackendAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
23015	objectMap := make(map[string]interface{})
23016	if lbbapf.VirtualNetwork != nil {
23017		objectMap["virtualNetwork"] = lbbapf.VirtualNetwork
23018	}
23019	if lbbapf.Subnet != nil {
23020		objectMap["subnet"] = lbbapf.Subnet
23021	}
23022	if lbbapf.IPAddress != nil {
23023		objectMap["ipAddress"] = lbbapf.IPAddress
23024	}
23025	if lbbapf.LoadBalancerFrontendIPConfiguration != nil {
23026		objectMap["loadBalancerFrontendIPConfiguration"] = lbbapf.LoadBalancerFrontendIPConfiguration
23027	}
23028	return json.Marshal(objectMap)
23029}
23030
23031// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
23032type LoadBalancerFrontendIPConfigurationListResult struct {
23033	autorest.Response `json:"-"`
23034	// Value - A list of frontend IP configurations in a load balancer.
23035	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
23036	// NextLink - READ-ONLY; The URL to get the next set of results.
23037	NextLink *string `json:"nextLink,omitempty"`
23038}
23039
23040// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
23041func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
23042	objectMap := make(map[string]interface{})
23043	if lbficlr.Value != nil {
23044		objectMap["value"] = lbficlr.Value
23045	}
23046	return json.Marshal(objectMap)
23047}
23048
23049// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
23050// FrontendIPConfiguration values.
23051type LoadBalancerFrontendIPConfigurationListResultIterator struct {
23052	i    int
23053	page LoadBalancerFrontendIPConfigurationListResultPage
23054}
23055
23056// NextWithContext advances to the next value.  If there was an error making
23057// the request the iterator does not advance and the error is returned.
23058func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
23059	if tracing.IsEnabled() {
23060		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
23061		defer func() {
23062			sc := -1
23063			if iter.Response().Response.Response != nil {
23064				sc = iter.Response().Response.Response.StatusCode
23065			}
23066			tracing.EndSpan(ctx, sc, err)
23067		}()
23068	}
23069	iter.i++
23070	if iter.i < len(iter.page.Values()) {
23071		return nil
23072	}
23073	err = iter.page.NextWithContext(ctx)
23074	if err != nil {
23075		iter.i--
23076		return err
23077	}
23078	iter.i = 0
23079	return nil
23080}
23081
23082// Next advances to the next value.  If there was an error making
23083// the request the iterator does not advance and the error is returned.
23084// Deprecated: Use NextWithContext() instead.
23085func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
23086	return iter.NextWithContext(context.Background())
23087}
23088
23089// NotDone returns true if the enumeration should be started or is not yet complete.
23090func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
23091	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23092}
23093
23094// Response returns the raw server response from the last page request.
23095func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
23096	return iter.page.Response()
23097}
23098
23099// Value returns the current value or a zero-initialized value if the
23100// iterator has advanced beyond the end of the collection.
23101func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
23102	if !iter.page.NotDone() {
23103		return FrontendIPConfiguration{}
23104	}
23105	return iter.page.Values()[iter.i]
23106}
23107
23108// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
23109func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
23110	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
23111}
23112
23113// IsEmpty returns true if the ListResult contains no values.
23114func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
23115	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
23116}
23117
23118// hasNextLink returns true if the NextLink is not empty.
23119func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
23120	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
23121}
23122
23123// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
23124// It returns nil if no more results exist.
23125func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
23126	if !lbficlr.hasNextLink() {
23127		return nil, nil
23128	}
23129	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23130		autorest.AsJSON(),
23131		autorest.AsGet(),
23132		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
23133}
23134
23135// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
23136type LoadBalancerFrontendIPConfigurationListResultPage struct {
23137	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
23138	lbficlr LoadBalancerFrontendIPConfigurationListResult
23139}
23140
23141// NextWithContext advances to the next page of values.  If there was an error making
23142// the request the page does not advance and the error is returned.
23143func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
23144	if tracing.IsEnabled() {
23145		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
23146		defer func() {
23147			sc := -1
23148			if page.Response().Response.Response != nil {
23149				sc = page.Response().Response.Response.StatusCode
23150			}
23151			tracing.EndSpan(ctx, sc, err)
23152		}()
23153	}
23154	for {
23155		next, err := page.fn(ctx, page.lbficlr)
23156		if err != nil {
23157			return err
23158		}
23159		page.lbficlr = next
23160		if !next.hasNextLink() || !next.IsEmpty() {
23161			break
23162		}
23163	}
23164	return nil
23165}
23166
23167// Next advances to the next page of values.  If there was an error making
23168// the request the page does not advance and the error is returned.
23169// Deprecated: Use NextWithContext() instead.
23170func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
23171	return page.NextWithContext(context.Background())
23172}
23173
23174// NotDone returns true if the page enumeration should be started or is not yet complete.
23175func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
23176	return !page.lbficlr.IsEmpty()
23177}
23178
23179// Response returns the raw server response from the last page request.
23180func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
23181	return page.lbficlr
23182}
23183
23184// Values returns the slice of values for the current page or nil if there are no values.
23185func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
23186	if page.lbficlr.IsEmpty() {
23187		return nil
23188	}
23189	return *page.lbficlr.Value
23190}
23191
23192// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
23193func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
23194	return LoadBalancerFrontendIPConfigurationListResultPage{
23195		fn:      getNextPage,
23196		lbficlr: cur,
23197	}
23198}
23199
23200// LoadBalancerListResult response for ListLoadBalancers API service call.
23201type LoadBalancerListResult struct {
23202	autorest.Response `json:"-"`
23203	// Value - A list of load balancers in a resource group.
23204	Value *[]LoadBalancer `json:"value,omitempty"`
23205	// NextLink - READ-ONLY; The URL to get the next set of results.
23206	NextLink *string `json:"nextLink,omitempty"`
23207}
23208
23209// MarshalJSON is the custom marshaler for LoadBalancerListResult.
23210func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
23211	objectMap := make(map[string]interface{})
23212	if lblr.Value != nil {
23213		objectMap["value"] = lblr.Value
23214	}
23215	return json.Marshal(objectMap)
23216}
23217
23218// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
23219type LoadBalancerListResultIterator struct {
23220	i    int
23221	page LoadBalancerListResultPage
23222}
23223
23224// NextWithContext advances to the next value.  If there was an error making
23225// the request the iterator does not advance and the error is returned.
23226func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
23227	if tracing.IsEnabled() {
23228		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
23229		defer func() {
23230			sc := -1
23231			if iter.Response().Response.Response != nil {
23232				sc = iter.Response().Response.Response.StatusCode
23233			}
23234			tracing.EndSpan(ctx, sc, err)
23235		}()
23236	}
23237	iter.i++
23238	if iter.i < len(iter.page.Values()) {
23239		return nil
23240	}
23241	err = iter.page.NextWithContext(ctx)
23242	if err != nil {
23243		iter.i--
23244		return err
23245	}
23246	iter.i = 0
23247	return nil
23248}
23249
23250// Next advances to the next value.  If there was an error making
23251// the request the iterator does not advance and the error is returned.
23252// Deprecated: Use NextWithContext() instead.
23253func (iter *LoadBalancerListResultIterator) Next() error {
23254	return iter.NextWithContext(context.Background())
23255}
23256
23257// NotDone returns true if the enumeration should be started or is not yet complete.
23258func (iter LoadBalancerListResultIterator) NotDone() bool {
23259	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23260}
23261
23262// Response returns the raw server response from the last page request.
23263func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
23264	return iter.page.Response()
23265}
23266
23267// Value returns the current value or a zero-initialized value if the
23268// iterator has advanced beyond the end of the collection.
23269func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
23270	if !iter.page.NotDone() {
23271		return LoadBalancer{}
23272	}
23273	return iter.page.Values()[iter.i]
23274}
23275
23276// Creates a new instance of the LoadBalancerListResultIterator type.
23277func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
23278	return LoadBalancerListResultIterator{page: page}
23279}
23280
23281// IsEmpty returns true if the ListResult contains no values.
23282func (lblr LoadBalancerListResult) IsEmpty() bool {
23283	return lblr.Value == nil || len(*lblr.Value) == 0
23284}
23285
23286// hasNextLink returns true if the NextLink is not empty.
23287func (lblr LoadBalancerListResult) hasNextLink() bool {
23288	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
23289}
23290
23291// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
23292// It returns nil if no more results exist.
23293func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
23294	if !lblr.hasNextLink() {
23295		return nil, nil
23296	}
23297	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23298		autorest.AsJSON(),
23299		autorest.AsGet(),
23300		autorest.WithBaseURL(to.String(lblr.NextLink)))
23301}
23302
23303// LoadBalancerListResultPage contains a page of LoadBalancer values.
23304type LoadBalancerListResultPage struct {
23305	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
23306	lblr LoadBalancerListResult
23307}
23308
23309// NextWithContext advances to the next page of values.  If there was an error making
23310// the request the page does not advance and the error is returned.
23311func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
23312	if tracing.IsEnabled() {
23313		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
23314		defer func() {
23315			sc := -1
23316			if page.Response().Response.Response != nil {
23317				sc = page.Response().Response.Response.StatusCode
23318			}
23319			tracing.EndSpan(ctx, sc, err)
23320		}()
23321	}
23322	for {
23323		next, err := page.fn(ctx, page.lblr)
23324		if err != nil {
23325			return err
23326		}
23327		page.lblr = next
23328		if !next.hasNextLink() || !next.IsEmpty() {
23329			break
23330		}
23331	}
23332	return nil
23333}
23334
23335// Next advances to the next page of values.  If there was an error making
23336// the request the page does not advance and the error is returned.
23337// Deprecated: Use NextWithContext() instead.
23338func (page *LoadBalancerListResultPage) Next() error {
23339	return page.NextWithContext(context.Background())
23340}
23341
23342// NotDone returns true if the page enumeration should be started or is not yet complete.
23343func (page LoadBalancerListResultPage) NotDone() bool {
23344	return !page.lblr.IsEmpty()
23345}
23346
23347// Response returns the raw server response from the last page request.
23348func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
23349	return page.lblr
23350}
23351
23352// Values returns the slice of values for the current page or nil if there are no values.
23353func (page LoadBalancerListResultPage) Values() []LoadBalancer {
23354	if page.lblr.IsEmpty() {
23355		return nil
23356	}
23357	return *page.lblr.Value
23358}
23359
23360// Creates a new instance of the LoadBalancerListResultPage type.
23361func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
23362	return LoadBalancerListResultPage{
23363		fn:   getNextPage,
23364		lblr: cur,
23365	}
23366}
23367
23368// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
23369type LoadBalancerLoadBalancingRuleListResult struct {
23370	autorest.Response `json:"-"`
23371	// Value - A list of load balancing rules in a load balancer.
23372	Value *[]LoadBalancingRule `json:"value,omitempty"`
23373	// NextLink - READ-ONLY; The URL to get the next set of results.
23374	NextLink *string `json:"nextLink,omitempty"`
23375}
23376
23377// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
23378func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
23379	objectMap := make(map[string]interface{})
23380	if lblbrlr.Value != nil {
23381		objectMap["value"] = lblbrlr.Value
23382	}
23383	return json.Marshal(objectMap)
23384}
23385
23386// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
23387// LoadBalancingRule values.
23388type LoadBalancerLoadBalancingRuleListResultIterator struct {
23389	i    int
23390	page LoadBalancerLoadBalancingRuleListResultPage
23391}
23392
23393// NextWithContext advances to the next value.  If there was an error making
23394// the request the iterator does not advance and the error is returned.
23395func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
23396	if tracing.IsEnabled() {
23397		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
23398		defer func() {
23399			sc := -1
23400			if iter.Response().Response.Response != nil {
23401				sc = iter.Response().Response.Response.StatusCode
23402			}
23403			tracing.EndSpan(ctx, sc, err)
23404		}()
23405	}
23406	iter.i++
23407	if iter.i < len(iter.page.Values()) {
23408		return nil
23409	}
23410	err = iter.page.NextWithContext(ctx)
23411	if err != nil {
23412		iter.i--
23413		return err
23414	}
23415	iter.i = 0
23416	return nil
23417}
23418
23419// Next advances to the next value.  If there was an error making
23420// the request the iterator does not advance and the error is returned.
23421// Deprecated: Use NextWithContext() instead.
23422func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
23423	return iter.NextWithContext(context.Background())
23424}
23425
23426// NotDone returns true if the enumeration should be started or is not yet complete.
23427func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
23428	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23429}
23430
23431// Response returns the raw server response from the last page request.
23432func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
23433	return iter.page.Response()
23434}
23435
23436// Value returns the current value or a zero-initialized value if the
23437// iterator has advanced beyond the end of the collection.
23438func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
23439	if !iter.page.NotDone() {
23440		return LoadBalancingRule{}
23441	}
23442	return iter.page.Values()[iter.i]
23443}
23444
23445// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
23446func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
23447	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
23448}
23449
23450// IsEmpty returns true if the ListResult contains no values.
23451func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
23452	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
23453}
23454
23455// hasNextLink returns true if the NextLink is not empty.
23456func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
23457	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
23458}
23459
23460// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
23461// It returns nil if no more results exist.
23462func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
23463	if !lblbrlr.hasNextLink() {
23464		return nil, nil
23465	}
23466	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23467		autorest.AsJSON(),
23468		autorest.AsGet(),
23469		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
23470}
23471
23472// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
23473type LoadBalancerLoadBalancingRuleListResultPage struct {
23474	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
23475	lblbrlr LoadBalancerLoadBalancingRuleListResult
23476}
23477
23478// NextWithContext advances to the next page of values.  If there was an error making
23479// the request the page does not advance and the error is returned.
23480func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
23481	if tracing.IsEnabled() {
23482		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
23483		defer func() {
23484			sc := -1
23485			if page.Response().Response.Response != nil {
23486				sc = page.Response().Response.Response.StatusCode
23487			}
23488			tracing.EndSpan(ctx, sc, err)
23489		}()
23490	}
23491	for {
23492		next, err := page.fn(ctx, page.lblbrlr)
23493		if err != nil {
23494			return err
23495		}
23496		page.lblbrlr = next
23497		if !next.hasNextLink() || !next.IsEmpty() {
23498			break
23499		}
23500	}
23501	return nil
23502}
23503
23504// Next advances to the next page of values.  If there was an error making
23505// the request the page does not advance and the error is returned.
23506// Deprecated: Use NextWithContext() instead.
23507func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
23508	return page.NextWithContext(context.Background())
23509}
23510
23511// NotDone returns true if the page enumeration should be started or is not yet complete.
23512func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
23513	return !page.lblbrlr.IsEmpty()
23514}
23515
23516// Response returns the raw server response from the last page request.
23517func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
23518	return page.lblbrlr
23519}
23520
23521// Values returns the slice of values for the current page or nil if there are no values.
23522func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
23523	if page.lblbrlr.IsEmpty() {
23524		return nil
23525	}
23526	return *page.lblbrlr.Value
23527}
23528
23529// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
23530func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
23531	return LoadBalancerLoadBalancingRuleListResultPage{
23532		fn:      getNextPage,
23533		lblbrlr: cur,
23534	}
23535}
23536
23537// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call.
23538type LoadBalancerOutboundRuleListResult struct {
23539	autorest.Response `json:"-"`
23540	// Value - A list of outbound rules in a load balancer.
23541	Value *[]OutboundRule `json:"value,omitempty"`
23542	// NextLink - READ-ONLY; The URL to get the next set of results.
23543	NextLink *string `json:"nextLink,omitempty"`
23544}
23545
23546// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult.
23547func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) {
23548	objectMap := make(map[string]interface{})
23549	if lborlr.Value != nil {
23550		objectMap["value"] = lborlr.Value
23551	}
23552	return json.Marshal(objectMap)
23553}
23554
23555// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values.
23556type LoadBalancerOutboundRuleListResultIterator struct {
23557	i    int
23558	page LoadBalancerOutboundRuleListResultPage
23559}
23560
23561// NextWithContext advances to the next value.  If there was an error making
23562// the request the iterator does not advance and the error is returned.
23563func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
23564	if tracing.IsEnabled() {
23565		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext")
23566		defer func() {
23567			sc := -1
23568			if iter.Response().Response.Response != nil {
23569				sc = iter.Response().Response.Response.StatusCode
23570			}
23571			tracing.EndSpan(ctx, sc, err)
23572		}()
23573	}
23574	iter.i++
23575	if iter.i < len(iter.page.Values()) {
23576		return nil
23577	}
23578	err = iter.page.NextWithContext(ctx)
23579	if err != nil {
23580		iter.i--
23581		return err
23582	}
23583	iter.i = 0
23584	return nil
23585}
23586
23587// Next advances to the next value.  If there was an error making
23588// the request the iterator does not advance and the error is returned.
23589// Deprecated: Use NextWithContext() instead.
23590func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error {
23591	return iter.NextWithContext(context.Background())
23592}
23593
23594// NotDone returns true if the enumeration should be started or is not yet complete.
23595func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool {
23596	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23597}
23598
23599// Response returns the raw server response from the last page request.
23600func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult {
23601	return iter.page.Response()
23602}
23603
23604// Value returns the current value or a zero-initialized value if the
23605// iterator has advanced beyond the end of the collection.
23606func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule {
23607	if !iter.page.NotDone() {
23608		return OutboundRule{}
23609	}
23610	return iter.page.Values()[iter.i]
23611}
23612
23613// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type.
23614func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator {
23615	return LoadBalancerOutboundRuleListResultIterator{page: page}
23616}
23617
23618// IsEmpty returns true if the ListResult contains no values.
23619func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool {
23620	return lborlr.Value == nil || len(*lborlr.Value) == 0
23621}
23622
23623// hasNextLink returns true if the NextLink is not empty.
23624func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool {
23625	return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0
23626}
23627
23628// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results.
23629// It returns nil if no more results exist.
23630func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
23631	if !lborlr.hasNextLink() {
23632		return nil, nil
23633	}
23634	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23635		autorest.AsJSON(),
23636		autorest.AsGet(),
23637		autorest.WithBaseURL(to.String(lborlr.NextLink)))
23638}
23639
23640// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values.
23641type LoadBalancerOutboundRuleListResultPage struct {
23642	fn     func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)
23643	lborlr LoadBalancerOutboundRuleListResult
23644}
23645
23646// NextWithContext advances to the next page of values.  If there was an error making
23647// the request the page does not advance and the error is returned.
23648func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
23649	if tracing.IsEnabled() {
23650		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext")
23651		defer func() {
23652			sc := -1
23653			if page.Response().Response.Response != nil {
23654				sc = page.Response().Response.Response.StatusCode
23655			}
23656			tracing.EndSpan(ctx, sc, err)
23657		}()
23658	}
23659	for {
23660		next, err := page.fn(ctx, page.lborlr)
23661		if err != nil {
23662			return err
23663		}
23664		page.lborlr = next
23665		if !next.hasNextLink() || !next.IsEmpty() {
23666			break
23667		}
23668	}
23669	return nil
23670}
23671
23672// Next advances to the next page of values.  If there was an error making
23673// the request the page does not advance and the error is returned.
23674// Deprecated: Use NextWithContext() instead.
23675func (page *LoadBalancerOutboundRuleListResultPage) Next() error {
23676	return page.NextWithContext(context.Background())
23677}
23678
23679// NotDone returns true if the page enumeration should be started or is not yet complete.
23680func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool {
23681	return !page.lborlr.IsEmpty()
23682}
23683
23684// Response returns the raw server response from the last page request.
23685func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult {
23686	return page.lborlr
23687}
23688
23689// Values returns the slice of values for the current page or nil if there are no values.
23690func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule {
23691	if page.lborlr.IsEmpty() {
23692		return nil
23693	}
23694	return *page.lborlr.Value
23695}
23696
23697// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type.
23698func NewLoadBalancerOutboundRuleListResultPage(cur LoadBalancerOutboundRuleListResult, getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage {
23699	return LoadBalancerOutboundRuleListResultPage{
23700		fn:     getNextPage,
23701		lborlr: cur,
23702	}
23703}
23704
23705// LoadBalancerProbeListResult response for ListProbe API service call.
23706type LoadBalancerProbeListResult struct {
23707	autorest.Response `json:"-"`
23708	// Value - A list of probes in a load balancer.
23709	Value *[]Probe `json:"value,omitempty"`
23710	// NextLink - READ-ONLY; The URL to get the next set of results.
23711	NextLink *string `json:"nextLink,omitempty"`
23712}
23713
23714// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
23715func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
23716	objectMap := make(map[string]interface{})
23717	if lbplr.Value != nil {
23718		objectMap["value"] = lbplr.Value
23719	}
23720	return json.Marshal(objectMap)
23721}
23722
23723// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
23724type LoadBalancerProbeListResultIterator struct {
23725	i    int
23726	page LoadBalancerProbeListResultPage
23727}
23728
23729// NextWithContext advances to the next value.  If there was an error making
23730// the request the iterator does not advance and the error is returned.
23731func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
23732	if tracing.IsEnabled() {
23733		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
23734		defer func() {
23735			sc := -1
23736			if iter.Response().Response.Response != nil {
23737				sc = iter.Response().Response.Response.StatusCode
23738			}
23739			tracing.EndSpan(ctx, sc, err)
23740		}()
23741	}
23742	iter.i++
23743	if iter.i < len(iter.page.Values()) {
23744		return nil
23745	}
23746	err = iter.page.NextWithContext(ctx)
23747	if err != nil {
23748		iter.i--
23749		return err
23750	}
23751	iter.i = 0
23752	return nil
23753}
23754
23755// Next advances to the next value.  If there was an error making
23756// the request the iterator does not advance and the error is returned.
23757// Deprecated: Use NextWithContext() instead.
23758func (iter *LoadBalancerProbeListResultIterator) Next() error {
23759	return iter.NextWithContext(context.Background())
23760}
23761
23762// NotDone returns true if the enumeration should be started or is not yet complete.
23763func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
23764	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23765}
23766
23767// Response returns the raw server response from the last page request.
23768func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
23769	return iter.page.Response()
23770}
23771
23772// Value returns the current value or a zero-initialized value if the
23773// iterator has advanced beyond the end of the collection.
23774func (iter LoadBalancerProbeListResultIterator) Value() Probe {
23775	if !iter.page.NotDone() {
23776		return Probe{}
23777	}
23778	return iter.page.Values()[iter.i]
23779}
23780
23781// Creates a new instance of the LoadBalancerProbeListResultIterator type.
23782func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
23783	return LoadBalancerProbeListResultIterator{page: page}
23784}
23785
23786// IsEmpty returns true if the ListResult contains no values.
23787func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
23788	return lbplr.Value == nil || len(*lbplr.Value) == 0
23789}
23790
23791// hasNextLink returns true if the NextLink is not empty.
23792func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
23793	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
23794}
23795
23796// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
23797// It returns nil if no more results exist.
23798func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
23799	if !lbplr.hasNextLink() {
23800		return nil, nil
23801	}
23802	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23803		autorest.AsJSON(),
23804		autorest.AsGet(),
23805		autorest.WithBaseURL(to.String(lbplr.NextLink)))
23806}
23807
23808// LoadBalancerProbeListResultPage contains a page of Probe values.
23809type LoadBalancerProbeListResultPage struct {
23810	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
23811	lbplr LoadBalancerProbeListResult
23812}
23813
23814// NextWithContext advances to the next page of values.  If there was an error making
23815// the request the page does not advance and the error is returned.
23816func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
23817	if tracing.IsEnabled() {
23818		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
23819		defer func() {
23820			sc := -1
23821			if page.Response().Response.Response != nil {
23822				sc = page.Response().Response.Response.StatusCode
23823			}
23824			tracing.EndSpan(ctx, sc, err)
23825		}()
23826	}
23827	for {
23828		next, err := page.fn(ctx, page.lbplr)
23829		if err != nil {
23830			return err
23831		}
23832		page.lbplr = next
23833		if !next.hasNextLink() || !next.IsEmpty() {
23834			break
23835		}
23836	}
23837	return nil
23838}
23839
23840// Next advances to the next page of values.  If there was an error making
23841// the request the page does not advance and the error is returned.
23842// Deprecated: Use NextWithContext() instead.
23843func (page *LoadBalancerProbeListResultPage) Next() error {
23844	return page.NextWithContext(context.Background())
23845}
23846
23847// NotDone returns true if the page enumeration should be started or is not yet complete.
23848func (page LoadBalancerProbeListResultPage) NotDone() bool {
23849	return !page.lbplr.IsEmpty()
23850}
23851
23852// Response returns the raw server response from the last page request.
23853func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
23854	return page.lbplr
23855}
23856
23857// Values returns the slice of values for the current page or nil if there are no values.
23858func (page LoadBalancerProbeListResultPage) Values() []Probe {
23859	if page.lbplr.IsEmpty() {
23860		return nil
23861	}
23862	return *page.lbplr.Value
23863}
23864
23865// Creates a new instance of the LoadBalancerProbeListResultPage type.
23866func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
23867	return LoadBalancerProbeListResultPage{
23868		fn:    getNextPage,
23869		lbplr: cur,
23870	}
23871}
23872
23873// LoadBalancerPropertiesFormat properties of the load balancer.
23874type LoadBalancerPropertiesFormat struct {
23875	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer.
23876	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
23877	// BackendAddressPools - Collection of backend address pools used by a load balancer.
23878	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
23879	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning.
23880	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
23881	// Probes - Collection of probe objects used in the load balancer.
23882	Probes *[]Probe `json:"probes,omitempty"`
23883	// 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.
23884	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
23885	// 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.
23886	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
23887	// OutboundRules - The outbound rules.
23888	OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
23889	// ResourceGUID - READ-ONLY; The resource GUID property of the load balancer resource.
23890	ResourceGUID *string `json:"resourceGuid,omitempty"`
23891	// ProvisioningState - READ-ONLY; The provisioning state of the load balancer resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
23892	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
23893}
23894
23895// MarshalJSON is the custom marshaler for LoadBalancerPropertiesFormat.
23896func (lbpf LoadBalancerPropertiesFormat) MarshalJSON() ([]byte, error) {
23897	objectMap := make(map[string]interface{})
23898	if lbpf.FrontendIPConfigurations != nil {
23899		objectMap["frontendIPConfigurations"] = lbpf.FrontendIPConfigurations
23900	}
23901	if lbpf.BackendAddressPools != nil {
23902		objectMap["backendAddressPools"] = lbpf.BackendAddressPools
23903	}
23904	if lbpf.LoadBalancingRules != nil {
23905		objectMap["loadBalancingRules"] = lbpf.LoadBalancingRules
23906	}
23907	if lbpf.Probes != nil {
23908		objectMap["probes"] = lbpf.Probes
23909	}
23910	if lbpf.InboundNatRules != nil {
23911		objectMap["inboundNatRules"] = lbpf.InboundNatRules
23912	}
23913	if lbpf.InboundNatPools != nil {
23914		objectMap["inboundNatPools"] = lbpf.InboundNatPools
23915	}
23916	if lbpf.OutboundRules != nil {
23917		objectMap["outboundRules"] = lbpf.OutboundRules
23918	}
23919	return json.Marshal(objectMap)
23920}
23921
23922// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23923// long-running operation.
23924type LoadBalancersCreateOrUpdateFuture struct {
23925	azure.FutureAPI
23926	// Result returns the result of the asynchronous operation.
23927	// If the operation has not completed it will return an error.
23928	Result func(LoadBalancersClient) (LoadBalancer, error)
23929}
23930
23931// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23932// operation.
23933type LoadBalancersDeleteFuture struct {
23934	azure.FutureAPI
23935	// Result returns the result of the asynchronous operation.
23936	// If the operation has not completed it will return an error.
23937	Result func(LoadBalancersClient) (autorest.Response, error)
23938}
23939
23940// LoadBalancerSku SKU of a load balancer.
23941type LoadBalancerSku struct {
23942	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
23943	Name LoadBalancerSkuName `json:"name,omitempty"`
23944	// Tier - Tier of a load balancer SKU. Possible values include: 'Regional', 'Global'
23945	Tier LoadBalancerSkuTier `json:"tier,omitempty"`
23946}
23947
23948// LoadBalancingRule a load balancing rule for a load balancer.
23949type LoadBalancingRule struct {
23950	autorest.Response `json:"-"`
23951	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
23952	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
23953	// 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.
23954	Name *string `json:"name,omitempty"`
23955	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
23956	Etag *string `json:"etag,omitempty"`
23957	// Type - READ-ONLY; Type of the resource.
23958	Type *string `json:"type,omitempty"`
23959	// ID - Resource ID.
23960	ID *string `json:"id,omitempty"`
23961}
23962
23963// MarshalJSON is the custom marshaler for LoadBalancingRule.
23964func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
23965	objectMap := make(map[string]interface{})
23966	if lbr.LoadBalancingRulePropertiesFormat != nil {
23967		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
23968	}
23969	if lbr.Name != nil {
23970		objectMap["name"] = lbr.Name
23971	}
23972	if lbr.ID != nil {
23973		objectMap["id"] = lbr.ID
23974	}
23975	return json.Marshal(objectMap)
23976}
23977
23978// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
23979func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
23980	var m map[string]*json.RawMessage
23981	err := json.Unmarshal(body, &m)
23982	if err != nil {
23983		return err
23984	}
23985	for k, v := range m {
23986		switch k {
23987		case "properties":
23988			if v != nil {
23989				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
23990				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
23991				if err != nil {
23992					return err
23993				}
23994				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
23995			}
23996		case "name":
23997			if v != nil {
23998				var name string
23999				err = json.Unmarshal(*v, &name)
24000				if err != nil {
24001					return err
24002				}
24003				lbr.Name = &name
24004			}
24005		case "etag":
24006			if v != nil {
24007				var etag string
24008				err = json.Unmarshal(*v, &etag)
24009				if err != nil {
24010					return err
24011				}
24012				lbr.Etag = &etag
24013			}
24014		case "type":
24015			if v != nil {
24016				var typeVar string
24017				err = json.Unmarshal(*v, &typeVar)
24018				if err != nil {
24019					return err
24020				}
24021				lbr.Type = &typeVar
24022			}
24023		case "id":
24024			if v != nil {
24025				var ID string
24026				err = json.Unmarshal(*v, &ID)
24027				if err != nil {
24028					return err
24029				}
24030				lbr.ID = &ID
24031			}
24032		}
24033	}
24034
24035	return nil
24036}
24037
24038// LoadBalancingRulePropertiesFormat properties of the load balancer.
24039type LoadBalancingRulePropertiesFormat struct {
24040	// FrontendIPConfiguration - A reference to frontend IP addresses.
24041	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
24042	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
24043	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
24044	// Probe - The reference to the load balancer probe used by the load balancing rule.
24045	Probe *SubResource `json:"probe,omitempty"`
24046	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
24047	Protocol TransportProtocol `json:"protocol,omitempty"`
24048	// LoadDistribution - The load distribution policy for this rule. Possible values include: 'LoadDistributionDefault', 'LoadDistributionSourceIP', 'LoadDistributionSourceIPProtocol'
24049	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
24050	// 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".
24051	FrontendPort *int32 `json:"frontendPort,omitempty"`
24052	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port".
24053	BackendPort *int32 `json:"backendPort,omitempty"`
24054	// 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.
24055	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
24056	// 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.
24057	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
24058	// 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.
24059	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
24060	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
24061	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
24062	// ProvisioningState - READ-ONLY; The provisioning state of the load balancing rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24063	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24064}
24065
24066// MarshalJSON is the custom marshaler for LoadBalancingRulePropertiesFormat.
24067func (lbrpf LoadBalancingRulePropertiesFormat) MarshalJSON() ([]byte, error) {
24068	objectMap := make(map[string]interface{})
24069	if lbrpf.FrontendIPConfiguration != nil {
24070		objectMap["frontendIPConfiguration"] = lbrpf.FrontendIPConfiguration
24071	}
24072	if lbrpf.BackendAddressPool != nil {
24073		objectMap["backendAddressPool"] = lbrpf.BackendAddressPool
24074	}
24075	if lbrpf.Probe != nil {
24076		objectMap["probe"] = lbrpf.Probe
24077	}
24078	if lbrpf.Protocol != "" {
24079		objectMap["protocol"] = lbrpf.Protocol
24080	}
24081	if lbrpf.LoadDistribution != "" {
24082		objectMap["loadDistribution"] = lbrpf.LoadDistribution
24083	}
24084	if lbrpf.FrontendPort != nil {
24085		objectMap["frontendPort"] = lbrpf.FrontendPort
24086	}
24087	if lbrpf.BackendPort != nil {
24088		objectMap["backendPort"] = lbrpf.BackendPort
24089	}
24090	if lbrpf.IdleTimeoutInMinutes != nil {
24091		objectMap["idleTimeoutInMinutes"] = lbrpf.IdleTimeoutInMinutes
24092	}
24093	if lbrpf.EnableFloatingIP != nil {
24094		objectMap["enableFloatingIP"] = lbrpf.EnableFloatingIP
24095	}
24096	if lbrpf.EnableTCPReset != nil {
24097		objectMap["enableTcpReset"] = lbrpf.EnableTCPReset
24098	}
24099	if lbrpf.DisableOutboundSnat != nil {
24100		objectMap["disableOutboundSnat"] = lbrpf.DisableOutboundSnat
24101	}
24102	return json.Marshal(objectMap)
24103}
24104
24105// LocalNetworkGateway a common class for general resource information.
24106type LocalNetworkGateway struct {
24107	autorest.Response `json:"-"`
24108	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
24109	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
24110	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24111	Etag *string `json:"etag,omitempty"`
24112	// ID - Resource ID.
24113	ID *string `json:"id,omitempty"`
24114	// Name - READ-ONLY; Resource name.
24115	Name *string `json:"name,omitempty"`
24116	// Type - READ-ONLY; Resource type.
24117	Type *string `json:"type,omitempty"`
24118	// Location - Resource location.
24119	Location *string `json:"location,omitempty"`
24120	// Tags - Resource tags.
24121	Tags map[string]*string `json:"tags"`
24122}
24123
24124// MarshalJSON is the custom marshaler for LocalNetworkGateway.
24125func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
24126	objectMap := make(map[string]interface{})
24127	if lng.LocalNetworkGatewayPropertiesFormat != nil {
24128		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
24129	}
24130	if lng.ID != nil {
24131		objectMap["id"] = lng.ID
24132	}
24133	if lng.Location != nil {
24134		objectMap["location"] = lng.Location
24135	}
24136	if lng.Tags != nil {
24137		objectMap["tags"] = lng.Tags
24138	}
24139	return json.Marshal(objectMap)
24140}
24141
24142// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
24143func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
24144	var m map[string]*json.RawMessage
24145	err := json.Unmarshal(body, &m)
24146	if err != nil {
24147		return err
24148	}
24149	for k, v := range m {
24150		switch k {
24151		case "properties":
24152			if v != nil {
24153				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
24154				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
24155				if err != nil {
24156					return err
24157				}
24158				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
24159			}
24160		case "etag":
24161			if v != nil {
24162				var etag string
24163				err = json.Unmarshal(*v, &etag)
24164				if err != nil {
24165					return err
24166				}
24167				lng.Etag = &etag
24168			}
24169		case "id":
24170			if v != nil {
24171				var ID string
24172				err = json.Unmarshal(*v, &ID)
24173				if err != nil {
24174					return err
24175				}
24176				lng.ID = &ID
24177			}
24178		case "name":
24179			if v != nil {
24180				var name string
24181				err = json.Unmarshal(*v, &name)
24182				if err != nil {
24183					return err
24184				}
24185				lng.Name = &name
24186			}
24187		case "type":
24188			if v != nil {
24189				var typeVar string
24190				err = json.Unmarshal(*v, &typeVar)
24191				if err != nil {
24192					return err
24193				}
24194				lng.Type = &typeVar
24195			}
24196		case "location":
24197			if v != nil {
24198				var location string
24199				err = json.Unmarshal(*v, &location)
24200				if err != nil {
24201					return err
24202				}
24203				lng.Location = &location
24204			}
24205		case "tags":
24206			if v != nil {
24207				var tags map[string]*string
24208				err = json.Unmarshal(*v, &tags)
24209				if err != nil {
24210					return err
24211				}
24212				lng.Tags = tags
24213			}
24214		}
24215	}
24216
24217	return nil
24218}
24219
24220// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
24221type LocalNetworkGatewayListResult struct {
24222	autorest.Response `json:"-"`
24223	// Value - A list of local network gateways that exists in a resource group.
24224	Value *[]LocalNetworkGateway `json:"value,omitempty"`
24225	// NextLink - READ-ONLY; The URL to get the next set of results.
24226	NextLink *string `json:"nextLink,omitempty"`
24227}
24228
24229// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
24230func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
24231	objectMap := make(map[string]interface{})
24232	if lnglr.Value != nil {
24233		objectMap["value"] = lnglr.Value
24234	}
24235	return json.Marshal(objectMap)
24236}
24237
24238// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
24239// values.
24240type LocalNetworkGatewayListResultIterator struct {
24241	i    int
24242	page LocalNetworkGatewayListResultPage
24243}
24244
24245// NextWithContext advances to the next value.  If there was an error making
24246// the request the iterator does not advance and the error is returned.
24247func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
24248	if tracing.IsEnabled() {
24249		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
24250		defer func() {
24251			sc := -1
24252			if iter.Response().Response.Response != nil {
24253				sc = iter.Response().Response.Response.StatusCode
24254			}
24255			tracing.EndSpan(ctx, sc, err)
24256		}()
24257	}
24258	iter.i++
24259	if iter.i < len(iter.page.Values()) {
24260		return nil
24261	}
24262	err = iter.page.NextWithContext(ctx)
24263	if err != nil {
24264		iter.i--
24265		return err
24266	}
24267	iter.i = 0
24268	return nil
24269}
24270
24271// Next advances to the next value.  If there was an error making
24272// the request the iterator does not advance and the error is returned.
24273// Deprecated: Use NextWithContext() instead.
24274func (iter *LocalNetworkGatewayListResultIterator) Next() error {
24275	return iter.NextWithContext(context.Background())
24276}
24277
24278// NotDone returns true if the enumeration should be started or is not yet complete.
24279func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
24280	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24281}
24282
24283// Response returns the raw server response from the last page request.
24284func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
24285	return iter.page.Response()
24286}
24287
24288// Value returns the current value or a zero-initialized value if the
24289// iterator has advanced beyond the end of the collection.
24290func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
24291	if !iter.page.NotDone() {
24292		return LocalNetworkGateway{}
24293	}
24294	return iter.page.Values()[iter.i]
24295}
24296
24297// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
24298func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
24299	return LocalNetworkGatewayListResultIterator{page: page}
24300}
24301
24302// IsEmpty returns true if the ListResult contains no values.
24303func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
24304	return lnglr.Value == nil || len(*lnglr.Value) == 0
24305}
24306
24307// hasNextLink returns true if the NextLink is not empty.
24308func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
24309	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
24310}
24311
24312// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
24313// It returns nil if no more results exist.
24314func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
24315	if !lnglr.hasNextLink() {
24316		return nil, nil
24317	}
24318	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24319		autorest.AsJSON(),
24320		autorest.AsGet(),
24321		autorest.WithBaseURL(to.String(lnglr.NextLink)))
24322}
24323
24324// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
24325type LocalNetworkGatewayListResultPage struct {
24326	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
24327	lnglr LocalNetworkGatewayListResult
24328}
24329
24330// NextWithContext advances to the next page of values.  If there was an error making
24331// the request the page does not advance and the error is returned.
24332func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
24333	if tracing.IsEnabled() {
24334		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
24335		defer func() {
24336			sc := -1
24337			if page.Response().Response.Response != nil {
24338				sc = page.Response().Response.Response.StatusCode
24339			}
24340			tracing.EndSpan(ctx, sc, err)
24341		}()
24342	}
24343	for {
24344		next, err := page.fn(ctx, page.lnglr)
24345		if err != nil {
24346			return err
24347		}
24348		page.lnglr = next
24349		if !next.hasNextLink() || !next.IsEmpty() {
24350			break
24351		}
24352	}
24353	return nil
24354}
24355
24356// Next advances to the next page of values.  If there was an error making
24357// the request the page does not advance and the error is returned.
24358// Deprecated: Use NextWithContext() instead.
24359func (page *LocalNetworkGatewayListResultPage) Next() error {
24360	return page.NextWithContext(context.Background())
24361}
24362
24363// NotDone returns true if the page enumeration should be started or is not yet complete.
24364func (page LocalNetworkGatewayListResultPage) NotDone() bool {
24365	return !page.lnglr.IsEmpty()
24366}
24367
24368// Response returns the raw server response from the last page request.
24369func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
24370	return page.lnglr
24371}
24372
24373// Values returns the slice of values for the current page or nil if there are no values.
24374func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
24375	if page.lnglr.IsEmpty() {
24376		return nil
24377	}
24378	return *page.lnglr.Value
24379}
24380
24381// Creates a new instance of the LocalNetworkGatewayListResultPage type.
24382func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
24383	return LocalNetworkGatewayListResultPage{
24384		fn:    getNextPage,
24385		lnglr: cur,
24386	}
24387}
24388
24389// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties.
24390type LocalNetworkGatewayPropertiesFormat struct {
24391	// LocalNetworkAddressSpace - Local network site address space.
24392	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
24393	// GatewayIPAddress - IP address of local network gateway.
24394	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
24395	// Fqdn - FQDN of local network gateway.
24396	Fqdn *string `json:"fqdn,omitempty"`
24397	// BgpSettings - Local network gateway's BGP speaker settings.
24398	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
24399	// ResourceGUID - READ-ONLY; The resource GUID property of the local network gateway resource.
24400	ResourceGUID *string `json:"resourceGuid,omitempty"`
24401	// ProvisioningState - READ-ONLY; The provisioning state of the local network gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24402	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24403}
24404
24405// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
24406func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
24407	objectMap := make(map[string]interface{})
24408	if lngpf.LocalNetworkAddressSpace != nil {
24409		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
24410	}
24411	if lngpf.GatewayIPAddress != nil {
24412		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
24413	}
24414	if lngpf.Fqdn != nil {
24415		objectMap["fqdn"] = lngpf.Fqdn
24416	}
24417	if lngpf.BgpSettings != nil {
24418		objectMap["bgpSettings"] = lngpf.BgpSettings
24419	}
24420	return json.Marshal(objectMap)
24421}
24422
24423// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
24424// long-running operation.
24425type LocalNetworkGatewaysCreateOrUpdateFuture struct {
24426	azure.FutureAPI
24427	// Result returns the result of the asynchronous operation.
24428	// If the operation has not completed it will return an error.
24429	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
24430}
24431
24432// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
24433// long-running operation.
24434type LocalNetworkGatewaysDeleteFuture struct {
24435	azure.FutureAPI
24436	// Result returns the result of the asynchronous operation.
24437	// If the operation has not completed it will return an error.
24438	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
24439}
24440
24441// LogSpecification description of logging specification.
24442type LogSpecification struct {
24443	// Name - The name of the specification.
24444	Name *string `json:"name,omitempty"`
24445	// DisplayName - The display name of the specification.
24446	DisplayName *string `json:"displayName,omitempty"`
24447	// BlobDuration - Duration of the blob.
24448	BlobDuration *string `json:"blobDuration,omitempty"`
24449}
24450
24451// ManagedRuleGroupOverride defines a managed rule group override setting.
24452type ManagedRuleGroupOverride struct {
24453	// RuleGroupName - The managed rule group to override.
24454	RuleGroupName *string `json:"ruleGroupName,omitempty"`
24455	// Rules - List of rules that will be disabled. If none specified, all rules in the group will be disabled.
24456	Rules *[]ManagedRuleOverride `json:"rules,omitempty"`
24457}
24458
24459// ManagedRuleOverride defines a managed rule group override setting.
24460type ManagedRuleOverride struct {
24461	// RuleID - Identifier for the managed rule.
24462	RuleID *string `json:"ruleId,omitempty"`
24463	// State - The state of the managed rule. Defaults to Disabled if not specified. Possible values include: 'ManagedRuleEnabledStateDisabled'
24464	State ManagedRuleEnabledState `json:"state,omitempty"`
24465}
24466
24467// ManagedRulesDefinition allow to exclude some variable satisfy the condition for the WAF check.
24468type ManagedRulesDefinition struct {
24469	// Exclusions - The Exclusions that are applied on the policy.
24470	Exclusions *[]OwaspCrsExclusionEntry `json:"exclusions,omitempty"`
24471	// ManagedRuleSets - The managed rule sets that are associated with the policy.
24472	ManagedRuleSets *[]ManagedRuleSet `json:"managedRuleSets,omitempty"`
24473}
24474
24475// ManagedRuleSet defines a managed rule set.
24476type ManagedRuleSet struct {
24477	// RuleSetType - Defines the rule set type to use.
24478	RuleSetType *string `json:"ruleSetType,omitempty"`
24479	// RuleSetVersion - Defines the version of the rule set to use.
24480	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
24481	// RuleGroupOverrides - Defines the rule group overrides to apply to the rule set.
24482	RuleGroupOverrides *[]ManagedRuleGroupOverride `json:"ruleGroupOverrides,omitempty"`
24483}
24484
24485// ManagedServiceIdentity identity for the resource.
24486type ManagedServiceIdentity struct {
24487	// PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
24488	PrincipalID *string `json:"principalId,omitempty"`
24489	// TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
24490	TenantID *string `json:"tenantId,omitempty"`
24491	// 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'
24492	Type ResourceIdentityType `json:"type,omitempty"`
24493	// 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}'.
24494	UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
24495}
24496
24497// MarshalJSON is the custom marshaler for ManagedServiceIdentity.
24498func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
24499	objectMap := make(map[string]interface{})
24500	if msi.Type != "" {
24501		objectMap["type"] = msi.Type
24502	}
24503	if msi.UserAssignedIdentities != nil {
24504		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
24505	}
24506	return json.Marshal(objectMap)
24507}
24508
24509// ManagedServiceIdentityUserAssignedIdentitiesValue ...
24510type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
24511	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
24512	PrincipalID *string `json:"principalId,omitempty"`
24513	// ClientID - READ-ONLY; The client id of user assigned identity.
24514	ClientID *string `json:"clientId,omitempty"`
24515}
24516
24517// MatchCondition define match conditions.
24518type MatchCondition struct {
24519	// MatchVariables - List of match variables.
24520	MatchVariables *[]MatchVariable `json:"matchVariables,omitempty"`
24521	// Operator - The operator to be matched. Possible values include: 'WebApplicationFirewallOperatorIPMatch', 'WebApplicationFirewallOperatorEqual', 'WebApplicationFirewallOperatorContains', 'WebApplicationFirewallOperatorLessThan', 'WebApplicationFirewallOperatorGreaterThan', 'WebApplicationFirewallOperatorLessThanOrEqual', 'WebApplicationFirewallOperatorGreaterThanOrEqual', 'WebApplicationFirewallOperatorBeginsWith', 'WebApplicationFirewallOperatorEndsWith', 'WebApplicationFirewallOperatorRegex', 'WebApplicationFirewallOperatorGeoMatch'
24522	Operator WebApplicationFirewallOperator `json:"operator,omitempty"`
24523	// NegationConditon - Whether this is negate condition or not.
24524	NegationConditon *bool `json:"negationConditon,omitempty"`
24525	// MatchValues - Match value.
24526	MatchValues *[]string `json:"matchValues,omitempty"`
24527	// Transforms - List of transforms.
24528	Transforms *[]WebApplicationFirewallTransform `json:"transforms,omitempty"`
24529}
24530
24531// MatchedRule matched rule.
24532type MatchedRule struct {
24533	// RuleName - Name of the matched network security rule.
24534	RuleName *string `json:"ruleName,omitempty"`
24535	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
24536	Action *string `json:"action,omitempty"`
24537}
24538
24539// MatchVariable define match variables.
24540type MatchVariable struct {
24541	// VariableName - Match Variable. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestURI', 'RequestHeaders', 'RequestBody', 'RequestCookies'
24542	VariableName WebApplicationFirewallMatchVariable `json:"variableName,omitempty"`
24543	// Selector - The selector of match variable.
24544	Selector *string `json:"selector,omitempty"`
24545}
24546
24547// MetricSpecification description of metrics specification.
24548type MetricSpecification struct {
24549	// Name - The name of the metric.
24550	Name *string `json:"name,omitempty"`
24551	// DisplayName - The display name of the metric.
24552	DisplayName *string `json:"displayName,omitempty"`
24553	// DisplayDescription - The description of the metric.
24554	DisplayDescription *string `json:"displayDescription,omitempty"`
24555	// Unit - Units the metric to be displayed in.
24556	Unit *string `json:"unit,omitempty"`
24557	// AggregationType - The aggregation type.
24558	AggregationType *string `json:"aggregationType,omitempty"`
24559	// Availabilities - List of availability.
24560	Availabilities *[]Availability `json:"availabilities,omitempty"`
24561	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
24562	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
24563	// FillGapWithZero - Whether gaps would be filled with zeros.
24564	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
24565	// MetricFilterPattern - Pattern for the filter of the metric.
24566	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
24567	// Dimensions - List of dimensions.
24568	Dimensions *[]Dimension `json:"dimensions,omitempty"`
24569	// IsInternal - Whether the metric is internal.
24570	IsInternal *bool `json:"isInternal,omitempty"`
24571	// SourceMdmAccount - The source MDM account.
24572	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
24573	// SourceMdmNamespace - The source MDM namespace.
24574	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
24575	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
24576	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
24577}
24578
24579// NatGateway nat Gateway resource.
24580type NatGateway struct {
24581	autorest.Response `json:"-"`
24582	// Sku - The nat gateway SKU.
24583	Sku *NatGatewaySku `json:"sku,omitempty"`
24584	// NatGatewayPropertiesFormat - Nat Gateway properties.
24585	*NatGatewayPropertiesFormat `json:"properties,omitempty"`
24586	// Zones - A list of availability zones denoting the zone in which Nat Gateway should be deployed.
24587	Zones *[]string `json:"zones,omitempty"`
24588	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24589	Etag *string `json:"etag,omitempty"`
24590	// ID - Resource ID.
24591	ID *string `json:"id,omitempty"`
24592	// Name - READ-ONLY; Resource name.
24593	Name *string `json:"name,omitempty"`
24594	// Type - READ-ONLY; Resource type.
24595	Type *string `json:"type,omitempty"`
24596	// Location - Resource location.
24597	Location *string `json:"location,omitempty"`
24598	// Tags - Resource tags.
24599	Tags map[string]*string `json:"tags"`
24600}
24601
24602// MarshalJSON is the custom marshaler for NatGateway.
24603func (ng NatGateway) MarshalJSON() ([]byte, error) {
24604	objectMap := make(map[string]interface{})
24605	if ng.Sku != nil {
24606		objectMap["sku"] = ng.Sku
24607	}
24608	if ng.NatGatewayPropertiesFormat != nil {
24609		objectMap["properties"] = ng.NatGatewayPropertiesFormat
24610	}
24611	if ng.Zones != nil {
24612		objectMap["zones"] = ng.Zones
24613	}
24614	if ng.ID != nil {
24615		objectMap["id"] = ng.ID
24616	}
24617	if ng.Location != nil {
24618		objectMap["location"] = ng.Location
24619	}
24620	if ng.Tags != nil {
24621		objectMap["tags"] = ng.Tags
24622	}
24623	return json.Marshal(objectMap)
24624}
24625
24626// UnmarshalJSON is the custom unmarshaler for NatGateway struct.
24627func (ng *NatGateway) UnmarshalJSON(body []byte) error {
24628	var m map[string]*json.RawMessage
24629	err := json.Unmarshal(body, &m)
24630	if err != nil {
24631		return err
24632	}
24633	for k, v := range m {
24634		switch k {
24635		case "sku":
24636			if v != nil {
24637				var sku NatGatewaySku
24638				err = json.Unmarshal(*v, &sku)
24639				if err != nil {
24640					return err
24641				}
24642				ng.Sku = &sku
24643			}
24644		case "properties":
24645			if v != nil {
24646				var natGatewayPropertiesFormat NatGatewayPropertiesFormat
24647				err = json.Unmarshal(*v, &natGatewayPropertiesFormat)
24648				if err != nil {
24649					return err
24650				}
24651				ng.NatGatewayPropertiesFormat = &natGatewayPropertiesFormat
24652			}
24653		case "zones":
24654			if v != nil {
24655				var zones []string
24656				err = json.Unmarshal(*v, &zones)
24657				if err != nil {
24658					return err
24659				}
24660				ng.Zones = &zones
24661			}
24662		case "etag":
24663			if v != nil {
24664				var etag string
24665				err = json.Unmarshal(*v, &etag)
24666				if err != nil {
24667					return err
24668				}
24669				ng.Etag = &etag
24670			}
24671		case "id":
24672			if v != nil {
24673				var ID string
24674				err = json.Unmarshal(*v, &ID)
24675				if err != nil {
24676					return err
24677				}
24678				ng.ID = &ID
24679			}
24680		case "name":
24681			if v != nil {
24682				var name string
24683				err = json.Unmarshal(*v, &name)
24684				if err != nil {
24685					return err
24686				}
24687				ng.Name = &name
24688			}
24689		case "type":
24690			if v != nil {
24691				var typeVar string
24692				err = json.Unmarshal(*v, &typeVar)
24693				if err != nil {
24694					return err
24695				}
24696				ng.Type = &typeVar
24697			}
24698		case "location":
24699			if v != nil {
24700				var location string
24701				err = json.Unmarshal(*v, &location)
24702				if err != nil {
24703					return err
24704				}
24705				ng.Location = &location
24706			}
24707		case "tags":
24708			if v != nil {
24709				var tags map[string]*string
24710				err = json.Unmarshal(*v, &tags)
24711				if err != nil {
24712					return err
24713				}
24714				ng.Tags = tags
24715			}
24716		}
24717	}
24718
24719	return nil
24720}
24721
24722// NatGatewayListResult response for ListNatGateways API service call.
24723type NatGatewayListResult struct {
24724	autorest.Response `json:"-"`
24725	// Value - A list of Nat Gateways that exists in a resource group.
24726	Value *[]NatGateway `json:"value,omitempty"`
24727	// NextLink - The URL to get the next set of results.
24728	NextLink *string `json:"nextLink,omitempty"`
24729}
24730
24731// NatGatewayListResultIterator provides access to a complete listing of NatGateway values.
24732type NatGatewayListResultIterator struct {
24733	i    int
24734	page NatGatewayListResultPage
24735}
24736
24737// NextWithContext advances to the next value.  If there was an error making
24738// the request the iterator does not advance and the error is returned.
24739func (iter *NatGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
24740	if tracing.IsEnabled() {
24741		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultIterator.NextWithContext")
24742		defer func() {
24743			sc := -1
24744			if iter.Response().Response.Response != nil {
24745				sc = iter.Response().Response.Response.StatusCode
24746			}
24747			tracing.EndSpan(ctx, sc, err)
24748		}()
24749	}
24750	iter.i++
24751	if iter.i < len(iter.page.Values()) {
24752		return nil
24753	}
24754	err = iter.page.NextWithContext(ctx)
24755	if err != nil {
24756		iter.i--
24757		return err
24758	}
24759	iter.i = 0
24760	return nil
24761}
24762
24763// Next advances to the next value.  If there was an error making
24764// the request the iterator does not advance and the error is returned.
24765// Deprecated: Use NextWithContext() instead.
24766func (iter *NatGatewayListResultIterator) Next() error {
24767	return iter.NextWithContext(context.Background())
24768}
24769
24770// NotDone returns true if the enumeration should be started or is not yet complete.
24771func (iter NatGatewayListResultIterator) NotDone() bool {
24772	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24773}
24774
24775// Response returns the raw server response from the last page request.
24776func (iter NatGatewayListResultIterator) Response() NatGatewayListResult {
24777	return iter.page.Response()
24778}
24779
24780// Value returns the current value or a zero-initialized value if the
24781// iterator has advanced beyond the end of the collection.
24782func (iter NatGatewayListResultIterator) Value() NatGateway {
24783	if !iter.page.NotDone() {
24784		return NatGateway{}
24785	}
24786	return iter.page.Values()[iter.i]
24787}
24788
24789// Creates a new instance of the NatGatewayListResultIterator type.
24790func NewNatGatewayListResultIterator(page NatGatewayListResultPage) NatGatewayListResultIterator {
24791	return NatGatewayListResultIterator{page: page}
24792}
24793
24794// IsEmpty returns true if the ListResult contains no values.
24795func (nglr NatGatewayListResult) IsEmpty() bool {
24796	return nglr.Value == nil || len(*nglr.Value) == 0
24797}
24798
24799// hasNextLink returns true if the NextLink is not empty.
24800func (nglr NatGatewayListResult) hasNextLink() bool {
24801	return nglr.NextLink != nil && len(*nglr.NextLink) != 0
24802}
24803
24804// natGatewayListResultPreparer prepares a request to retrieve the next set of results.
24805// It returns nil if no more results exist.
24806func (nglr NatGatewayListResult) natGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
24807	if !nglr.hasNextLink() {
24808		return nil, nil
24809	}
24810	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24811		autorest.AsJSON(),
24812		autorest.AsGet(),
24813		autorest.WithBaseURL(to.String(nglr.NextLink)))
24814}
24815
24816// NatGatewayListResultPage contains a page of NatGateway values.
24817type NatGatewayListResultPage struct {
24818	fn   func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)
24819	nglr NatGatewayListResult
24820}
24821
24822// NextWithContext advances to the next page of values.  If there was an error making
24823// the request the page does not advance and the error is returned.
24824func (page *NatGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
24825	if tracing.IsEnabled() {
24826		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultPage.NextWithContext")
24827		defer func() {
24828			sc := -1
24829			if page.Response().Response.Response != nil {
24830				sc = page.Response().Response.Response.StatusCode
24831			}
24832			tracing.EndSpan(ctx, sc, err)
24833		}()
24834	}
24835	for {
24836		next, err := page.fn(ctx, page.nglr)
24837		if err != nil {
24838			return err
24839		}
24840		page.nglr = next
24841		if !next.hasNextLink() || !next.IsEmpty() {
24842			break
24843		}
24844	}
24845	return nil
24846}
24847
24848// Next advances to the next page of values.  If there was an error making
24849// the request the page does not advance and the error is returned.
24850// Deprecated: Use NextWithContext() instead.
24851func (page *NatGatewayListResultPage) Next() error {
24852	return page.NextWithContext(context.Background())
24853}
24854
24855// NotDone returns true if the page enumeration should be started or is not yet complete.
24856func (page NatGatewayListResultPage) NotDone() bool {
24857	return !page.nglr.IsEmpty()
24858}
24859
24860// Response returns the raw server response from the last page request.
24861func (page NatGatewayListResultPage) Response() NatGatewayListResult {
24862	return page.nglr
24863}
24864
24865// Values returns the slice of values for the current page or nil if there are no values.
24866func (page NatGatewayListResultPage) Values() []NatGateway {
24867	if page.nglr.IsEmpty() {
24868		return nil
24869	}
24870	return *page.nglr.Value
24871}
24872
24873// Creates a new instance of the NatGatewayListResultPage type.
24874func NewNatGatewayListResultPage(cur NatGatewayListResult, getNextPage func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)) NatGatewayListResultPage {
24875	return NatGatewayListResultPage{
24876		fn:   getNextPage,
24877		nglr: cur,
24878	}
24879}
24880
24881// NatGatewayPropertiesFormat nat Gateway properties.
24882type NatGatewayPropertiesFormat struct {
24883	// IdleTimeoutInMinutes - The idle timeout of the nat gateway.
24884	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
24885	// PublicIPAddresses - An array of public ip addresses associated with the nat gateway resource.
24886	PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"`
24887	// PublicIPPrefixes - An array of public ip prefixes associated with the nat gateway resource.
24888	PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"`
24889	// Subnets - READ-ONLY; An array of references to the subnets using this nat gateway resource.
24890	Subnets *[]SubResource `json:"subnets,omitempty"`
24891	// ResourceGUID - READ-ONLY; The resource GUID property of the NAT gateway resource.
24892	ResourceGUID *string `json:"resourceGuid,omitempty"`
24893	// ProvisioningState - READ-ONLY; The provisioning state of the NAT gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
24894	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
24895}
24896
24897// MarshalJSON is the custom marshaler for NatGatewayPropertiesFormat.
24898func (ngpf NatGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
24899	objectMap := make(map[string]interface{})
24900	if ngpf.IdleTimeoutInMinutes != nil {
24901		objectMap["idleTimeoutInMinutes"] = ngpf.IdleTimeoutInMinutes
24902	}
24903	if ngpf.PublicIPAddresses != nil {
24904		objectMap["publicIpAddresses"] = ngpf.PublicIPAddresses
24905	}
24906	if ngpf.PublicIPPrefixes != nil {
24907		objectMap["publicIpPrefixes"] = ngpf.PublicIPPrefixes
24908	}
24909	return json.Marshal(objectMap)
24910}
24911
24912// NatGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
24913// long-running operation.
24914type NatGatewaysCreateOrUpdateFuture struct {
24915	azure.FutureAPI
24916	// Result returns the result of the asynchronous operation.
24917	// If the operation has not completed it will return an error.
24918	Result func(NatGatewaysClient) (NatGateway, error)
24919}
24920
24921// NatGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
24922// operation.
24923type NatGatewaysDeleteFuture struct {
24924	azure.FutureAPI
24925	// Result returns the result of the asynchronous operation.
24926	// If the operation has not completed it will return an error.
24927	Result func(NatGatewaysClient) (autorest.Response, error)
24928}
24929
24930// NatGatewaySku SKU of nat gateway.
24931type NatGatewaySku struct {
24932	// Name - Name of Nat Gateway SKU. Possible values include: 'NatGatewaySkuNameStandard'
24933	Name NatGatewaySkuName `json:"name,omitempty"`
24934}
24935
24936// NatRule rule of type nat.
24937type NatRule struct {
24938	// IPProtocols - Array of FirewallPolicyRuleNetworkProtocols.
24939	IPProtocols *[]FirewallPolicyRuleNetworkProtocol `json:"ipProtocols,omitempty"`
24940	// SourceAddresses - List of source IP addresses for this rule.
24941	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
24942	// DestinationAddresses - List of destination IP addresses or Service Tags.
24943	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
24944	// DestinationPorts - List of destination ports.
24945	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
24946	// TranslatedAddress - The translated address for this NAT rule.
24947	TranslatedAddress *string `json:"translatedAddress,omitempty"`
24948	// TranslatedPort - The translated port for this NAT rule.
24949	TranslatedPort *string `json:"translatedPort,omitempty"`
24950	// SourceIPGroups - List of source IpGroups for this rule.
24951	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
24952	// TranslatedFqdn - The translated FQDN for this NAT rule.
24953	TranslatedFqdn *string `json:"translatedFqdn,omitempty"`
24954	// Name - Name of the rule.
24955	Name *string `json:"name,omitempty"`
24956	// Description - Description of the rule.
24957	Description *string `json:"description,omitempty"`
24958	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule'
24959	RuleType RuleType `json:"ruleType,omitempty"`
24960}
24961
24962// MarshalJSON is the custom marshaler for NatRule.
24963func (nr NatRule) MarshalJSON() ([]byte, error) {
24964	nr.RuleType = RuleTypeNatRule
24965	objectMap := make(map[string]interface{})
24966	if nr.IPProtocols != nil {
24967		objectMap["ipProtocols"] = nr.IPProtocols
24968	}
24969	if nr.SourceAddresses != nil {
24970		objectMap["sourceAddresses"] = nr.SourceAddresses
24971	}
24972	if nr.DestinationAddresses != nil {
24973		objectMap["destinationAddresses"] = nr.DestinationAddresses
24974	}
24975	if nr.DestinationPorts != nil {
24976		objectMap["destinationPorts"] = nr.DestinationPorts
24977	}
24978	if nr.TranslatedAddress != nil {
24979		objectMap["translatedAddress"] = nr.TranslatedAddress
24980	}
24981	if nr.TranslatedPort != nil {
24982		objectMap["translatedPort"] = nr.TranslatedPort
24983	}
24984	if nr.SourceIPGroups != nil {
24985		objectMap["sourceIpGroups"] = nr.SourceIPGroups
24986	}
24987	if nr.TranslatedFqdn != nil {
24988		objectMap["translatedFqdn"] = nr.TranslatedFqdn
24989	}
24990	if nr.Name != nil {
24991		objectMap["name"] = nr.Name
24992	}
24993	if nr.Description != nil {
24994		objectMap["description"] = nr.Description
24995	}
24996	if nr.RuleType != "" {
24997		objectMap["ruleType"] = nr.RuleType
24998	}
24999	return json.Marshal(objectMap)
25000}
25001
25002// AsApplicationRule is the BasicFirewallPolicyRule implementation for NatRule.
25003func (nr NatRule) AsApplicationRule() (*ApplicationRule, bool) {
25004	return nil, false
25005}
25006
25007// AsNatRule is the BasicFirewallPolicyRule implementation for NatRule.
25008func (nr NatRule) AsNatRule() (*NatRule, bool) {
25009	return &nr, true
25010}
25011
25012// AsRule is the BasicFirewallPolicyRule implementation for NatRule.
25013func (nr NatRule) AsRule() (*Rule, bool) {
25014	return nil, false
25015}
25016
25017// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for NatRule.
25018func (nr NatRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
25019	return nil, false
25020}
25021
25022// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for NatRule.
25023func (nr NatRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
25024	return &nr, true
25025}
25026
25027// NatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
25028// operation.
25029type NatRulesCreateOrUpdateFuture struct {
25030	azure.FutureAPI
25031	// Result returns the result of the asynchronous operation.
25032	// If the operation has not completed it will return an error.
25033	Result func(NatRulesClient) (VpnGatewayNatRule, error)
25034}
25035
25036// NatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25037// operation.
25038type NatRulesDeleteFuture struct {
25039	azure.FutureAPI
25040	// Result returns the result of the asynchronous operation.
25041	// If the operation has not completed it will return an error.
25042	Result func(NatRulesClient) (autorest.Response, error)
25043}
25044
25045// NextHopParameters parameters that define the source and destination endpoint.
25046type NextHopParameters struct {
25047	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
25048	TargetResourceID *string `json:"targetResourceId,omitempty"`
25049	// SourceIPAddress - The source IP address.
25050	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
25051	// DestinationIPAddress - The destination IP address.
25052	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
25053	// 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).
25054	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
25055}
25056
25057// NextHopResult the information about next hop from the specified VM.
25058type NextHopResult struct {
25059	autorest.Response `json:"-"`
25060	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
25061	NextHopType NextHopType `json:"nextHopType,omitempty"`
25062	// NextHopIPAddress - Next hop IP Address.
25063	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
25064	// 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'.
25065	RouteTableID *string `json:"routeTableId,omitempty"`
25066}
25067
25068// O365BreakOutCategoryPolicies office365 breakout categories.
25069type O365BreakOutCategoryPolicies struct {
25070	// Allow - Flag to control allow category.
25071	Allow *bool `json:"allow,omitempty"`
25072	// Optimize - Flag to control optimize category.
25073	Optimize *bool `json:"optimize,omitempty"`
25074	// Default - Flag to control default category.
25075	Default *bool `json:"default,omitempty"`
25076}
25077
25078// O365PolicyProperties the Office365 breakout policy.
25079type O365PolicyProperties struct {
25080	// BreakOutCategories - Office365 breakout categories.
25081	BreakOutCategories *O365BreakOutCategoryPolicies `json:"breakOutCategories,omitempty"`
25082}
25083
25084// Office365PolicyProperties network Virtual Appliance Sku Properties.
25085type Office365PolicyProperties struct {
25086	// BreakOutCategories - Office 365 breakout categories.
25087	BreakOutCategories *BreakOutCategoryPolicies `json:"breakOutCategories,omitempty"`
25088}
25089
25090// Operation network REST API operation definition.
25091type Operation struct {
25092	// Name - Operation name: {provider}/{resource}/{operation}.
25093	Name *string `json:"name,omitempty"`
25094	// Display - Display metadata associated with the operation.
25095	Display *OperationDisplay `json:"display,omitempty"`
25096	// Origin - Origin of the operation.
25097	Origin *string `json:"origin,omitempty"`
25098	// OperationPropertiesFormat - Operation properties format.
25099	*OperationPropertiesFormat `json:"properties,omitempty"`
25100}
25101
25102// MarshalJSON is the custom marshaler for Operation.
25103func (o Operation) MarshalJSON() ([]byte, error) {
25104	objectMap := make(map[string]interface{})
25105	if o.Name != nil {
25106		objectMap["name"] = o.Name
25107	}
25108	if o.Display != nil {
25109		objectMap["display"] = o.Display
25110	}
25111	if o.Origin != nil {
25112		objectMap["origin"] = o.Origin
25113	}
25114	if o.OperationPropertiesFormat != nil {
25115		objectMap["properties"] = o.OperationPropertiesFormat
25116	}
25117	return json.Marshal(objectMap)
25118}
25119
25120// UnmarshalJSON is the custom unmarshaler for Operation struct.
25121func (o *Operation) UnmarshalJSON(body []byte) error {
25122	var m map[string]*json.RawMessage
25123	err := json.Unmarshal(body, &m)
25124	if err != nil {
25125		return err
25126	}
25127	for k, v := range m {
25128		switch k {
25129		case "name":
25130			if v != nil {
25131				var name string
25132				err = json.Unmarshal(*v, &name)
25133				if err != nil {
25134					return err
25135				}
25136				o.Name = &name
25137			}
25138		case "display":
25139			if v != nil {
25140				var display OperationDisplay
25141				err = json.Unmarshal(*v, &display)
25142				if err != nil {
25143					return err
25144				}
25145				o.Display = &display
25146			}
25147		case "origin":
25148			if v != nil {
25149				var origin string
25150				err = json.Unmarshal(*v, &origin)
25151				if err != nil {
25152					return err
25153				}
25154				o.Origin = &origin
25155			}
25156		case "properties":
25157			if v != nil {
25158				var operationPropertiesFormat OperationPropertiesFormat
25159				err = json.Unmarshal(*v, &operationPropertiesFormat)
25160				if err != nil {
25161					return err
25162				}
25163				o.OperationPropertiesFormat = &operationPropertiesFormat
25164			}
25165		}
25166	}
25167
25168	return nil
25169}
25170
25171// OperationDisplay display metadata associated with the operation.
25172type OperationDisplay struct {
25173	// Provider - Service provider: Microsoft Network.
25174	Provider *string `json:"provider,omitempty"`
25175	// Resource - Resource on which the operation is performed.
25176	Resource *string `json:"resource,omitempty"`
25177	// Operation - Type of the operation: get, read, delete, etc.
25178	Operation *string `json:"operation,omitempty"`
25179	// Description - Description of the operation.
25180	Description *string `json:"description,omitempty"`
25181}
25182
25183// OperationListResult result of the request to list Network operations. It contains a list of operations
25184// and a URL link to get the next set of results.
25185type OperationListResult struct {
25186	autorest.Response `json:"-"`
25187	// Value - List of Network operations supported by the Network resource provider.
25188	Value *[]Operation `json:"value,omitempty"`
25189	// NextLink - URL to get the next set of operation list results if there are any.
25190	NextLink *string `json:"nextLink,omitempty"`
25191}
25192
25193// OperationListResultIterator provides access to a complete listing of Operation values.
25194type OperationListResultIterator struct {
25195	i    int
25196	page OperationListResultPage
25197}
25198
25199// NextWithContext advances to the next value.  If there was an error making
25200// the request the iterator does not advance and the error is returned.
25201func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
25202	if tracing.IsEnabled() {
25203		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
25204		defer func() {
25205			sc := -1
25206			if iter.Response().Response.Response != nil {
25207				sc = iter.Response().Response.Response.StatusCode
25208			}
25209			tracing.EndSpan(ctx, sc, err)
25210		}()
25211	}
25212	iter.i++
25213	if iter.i < len(iter.page.Values()) {
25214		return nil
25215	}
25216	err = iter.page.NextWithContext(ctx)
25217	if err != nil {
25218		iter.i--
25219		return err
25220	}
25221	iter.i = 0
25222	return nil
25223}
25224
25225// Next advances to the next value.  If there was an error making
25226// the request the iterator does not advance and the error is returned.
25227// Deprecated: Use NextWithContext() instead.
25228func (iter *OperationListResultIterator) Next() error {
25229	return iter.NextWithContext(context.Background())
25230}
25231
25232// NotDone returns true if the enumeration should be started or is not yet complete.
25233func (iter OperationListResultIterator) NotDone() bool {
25234	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25235}
25236
25237// Response returns the raw server response from the last page request.
25238func (iter OperationListResultIterator) Response() OperationListResult {
25239	return iter.page.Response()
25240}
25241
25242// Value returns the current value or a zero-initialized value if the
25243// iterator has advanced beyond the end of the collection.
25244func (iter OperationListResultIterator) Value() Operation {
25245	if !iter.page.NotDone() {
25246		return Operation{}
25247	}
25248	return iter.page.Values()[iter.i]
25249}
25250
25251// Creates a new instance of the OperationListResultIterator type.
25252func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
25253	return OperationListResultIterator{page: page}
25254}
25255
25256// IsEmpty returns true if the ListResult contains no values.
25257func (olr OperationListResult) IsEmpty() bool {
25258	return olr.Value == nil || len(*olr.Value) == 0
25259}
25260
25261// hasNextLink returns true if the NextLink is not empty.
25262func (olr OperationListResult) hasNextLink() bool {
25263	return olr.NextLink != nil && len(*olr.NextLink) != 0
25264}
25265
25266// operationListResultPreparer prepares a request to retrieve the next set of results.
25267// It returns nil if no more results exist.
25268func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
25269	if !olr.hasNextLink() {
25270		return nil, nil
25271	}
25272	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25273		autorest.AsJSON(),
25274		autorest.AsGet(),
25275		autorest.WithBaseURL(to.String(olr.NextLink)))
25276}
25277
25278// OperationListResultPage contains a page of Operation values.
25279type OperationListResultPage struct {
25280	fn  func(context.Context, OperationListResult) (OperationListResult, error)
25281	olr OperationListResult
25282}
25283
25284// NextWithContext advances to the next page of values.  If there was an error making
25285// the request the page does not advance and the error is returned.
25286func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
25287	if tracing.IsEnabled() {
25288		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
25289		defer func() {
25290			sc := -1
25291			if page.Response().Response.Response != nil {
25292				sc = page.Response().Response.Response.StatusCode
25293			}
25294			tracing.EndSpan(ctx, sc, err)
25295		}()
25296	}
25297	for {
25298		next, err := page.fn(ctx, page.olr)
25299		if err != nil {
25300			return err
25301		}
25302		page.olr = next
25303		if !next.hasNextLink() || !next.IsEmpty() {
25304			break
25305		}
25306	}
25307	return nil
25308}
25309
25310// Next advances to the next page of values.  If there was an error making
25311// the request the page does not advance and the error is returned.
25312// Deprecated: Use NextWithContext() instead.
25313func (page *OperationListResultPage) Next() error {
25314	return page.NextWithContext(context.Background())
25315}
25316
25317// NotDone returns true if the page enumeration should be started or is not yet complete.
25318func (page OperationListResultPage) NotDone() bool {
25319	return !page.olr.IsEmpty()
25320}
25321
25322// Response returns the raw server response from the last page request.
25323func (page OperationListResultPage) Response() OperationListResult {
25324	return page.olr
25325}
25326
25327// Values returns the slice of values for the current page or nil if there are no values.
25328func (page OperationListResultPage) Values() []Operation {
25329	if page.olr.IsEmpty() {
25330		return nil
25331	}
25332	return *page.olr.Value
25333}
25334
25335// Creates a new instance of the OperationListResultPage type.
25336func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
25337	return OperationListResultPage{
25338		fn:  getNextPage,
25339		olr: cur,
25340	}
25341}
25342
25343// OperationPropertiesFormat description of operation properties format.
25344type OperationPropertiesFormat struct {
25345	// ServiceSpecification - Specification of the service.
25346	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
25347}
25348
25349// OperationPropertiesFormatServiceSpecification specification of the service.
25350type OperationPropertiesFormatServiceSpecification struct {
25351	// MetricSpecifications - Operation service specification.
25352	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
25353	// LogSpecifications - Operation log specification.
25354	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
25355}
25356
25357// OutboundRule outbound rule of the load balancer.
25358type OutboundRule struct {
25359	autorest.Response `json:"-"`
25360	// OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
25361	*OutboundRulePropertiesFormat `json:"properties,omitempty"`
25362	// 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.
25363	Name *string `json:"name,omitempty"`
25364	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
25365	Etag *string `json:"etag,omitempty"`
25366	// Type - READ-ONLY; Type of the resource.
25367	Type *string `json:"type,omitempty"`
25368	// ID - Resource ID.
25369	ID *string `json:"id,omitempty"`
25370}
25371
25372// MarshalJSON is the custom marshaler for OutboundRule.
25373func (or OutboundRule) MarshalJSON() ([]byte, error) {
25374	objectMap := make(map[string]interface{})
25375	if or.OutboundRulePropertiesFormat != nil {
25376		objectMap["properties"] = or.OutboundRulePropertiesFormat
25377	}
25378	if or.Name != nil {
25379		objectMap["name"] = or.Name
25380	}
25381	if or.ID != nil {
25382		objectMap["id"] = or.ID
25383	}
25384	return json.Marshal(objectMap)
25385}
25386
25387// UnmarshalJSON is the custom unmarshaler for OutboundRule struct.
25388func (or *OutboundRule) UnmarshalJSON(body []byte) error {
25389	var m map[string]*json.RawMessage
25390	err := json.Unmarshal(body, &m)
25391	if err != nil {
25392		return err
25393	}
25394	for k, v := range m {
25395		switch k {
25396		case "properties":
25397			if v != nil {
25398				var outboundRulePropertiesFormat OutboundRulePropertiesFormat
25399				err = json.Unmarshal(*v, &outboundRulePropertiesFormat)
25400				if err != nil {
25401					return err
25402				}
25403				or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat
25404			}
25405		case "name":
25406			if v != nil {
25407				var name string
25408				err = json.Unmarshal(*v, &name)
25409				if err != nil {
25410					return err
25411				}
25412				or.Name = &name
25413			}
25414		case "etag":
25415			if v != nil {
25416				var etag string
25417				err = json.Unmarshal(*v, &etag)
25418				if err != nil {
25419					return err
25420				}
25421				or.Etag = &etag
25422			}
25423		case "type":
25424			if v != nil {
25425				var typeVar string
25426				err = json.Unmarshal(*v, &typeVar)
25427				if err != nil {
25428					return err
25429				}
25430				or.Type = &typeVar
25431			}
25432		case "id":
25433			if v != nil {
25434				var ID string
25435				err = json.Unmarshal(*v, &ID)
25436				if err != nil {
25437					return err
25438				}
25439				or.ID = &ID
25440			}
25441		}
25442	}
25443
25444	return nil
25445}
25446
25447// OutboundRulePropertiesFormat outbound rule of the load balancer.
25448type OutboundRulePropertiesFormat struct {
25449	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
25450	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
25451	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
25452	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
25453	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
25454	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
25455	// ProvisioningState - READ-ONLY; The provisioning state of the outbound rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25456	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25457	// Protocol - The protocol for the outbound rule in load balancer. Possible values include: 'LoadBalancerOutboundRuleProtocolTCP', 'LoadBalancerOutboundRuleProtocolUDP', 'LoadBalancerOutboundRuleProtocolAll'
25458	Protocol LoadBalancerOutboundRuleProtocol `json:"protocol,omitempty"`
25459	// 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.
25460	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
25461	// IdleTimeoutInMinutes - The timeout for the TCP idle connection.
25462	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
25463}
25464
25465// MarshalJSON is the custom marshaler for OutboundRulePropertiesFormat.
25466func (orpf OutboundRulePropertiesFormat) MarshalJSON() ([]byte, error) {
25467	objectMap := make(map[string]interface{})
25468	if orpf.AllocatedOutboundPorts != nil {
25469		objectMap["allocatedOutboundPorts"] = orpf.AllocatedOutboundPorts
25470	}
25471	if orpf.FrontendIPConfigurations != nil {
25472		objectMap["frontendIPConfigurations"] = orpf.FrontendIPConfigurations
25473	}
25474	if orpf.BackendAddressPool != nil {
25475		objectMap["backendAddressPool"] = orpf.BackendAddressPool
25476	}
25477	if orpf.Protocol != "" {
25478		objectMap["protocol"] = orpf.Protocol
25479	}
25480	if orpf.EnableTCPReset != nil {
25481		objectMap["enableTcpReset"] = orpf.EnableTCPReset
25482	}
25483	if orpf.IdleTimeoutInMinutes != nil {
25484		objectMap["idleTimeoutInMinutes"] = orpf.IdleTimeoutInMinutes
25485	}
25486	return json.Marshal(objectMap)
25487}
25488
25489// OwaspCrsExclusionEntry allow to exclude some variable satisfy the condition for the WAF check.
25490type OwaspCrsExclusionEntry struct {
25491	// MatchVariable - The variable to be excluded. Possible values include: 'RequestHeaderNames', 'RequestCookieNames', 'RequestArgNames'
25492	MatchVariable OwaspCrsExclusionEntryMatchVariable `json:"matchVariable,omitempty"`
25493	// 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'
25494	SelectorMatchOperator OwaspCrsExclusionEntrySelectorMatchOperator `json:"selectorMatchOperator,omitempty"`
25495	// Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
25496	Selector *string `json:"selector,omitempty"`
25497}
25498
25499// P2SConnectionConfiguration p2SConnectionConfiguration Resource.
25500type P2SConnectionConfiguration struct {
25501	// P2SConnectionConfigurationProperties - Properties of the P2S connection configuration.
25502	*P2SConnectionConfigurationProperties `json:"properties,omitempty"`
25503	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
25504	Name *string `json:"name,omitempty"`
25505	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
25506	Etag *string `json:"etag,omitempty"`
25507	// ID - Resource ID.
25508	ID *string `json:"id,omitempty"`
25509}
25510
25511// MarshalJSON is the custom marshaler for P2SConnectionConfiguration.
25512func (pcc P2SConnectionConfiguration) MarshalJSON() ([]byte, error) {
25513	objectMap := make(map[string]interface{})
25514	if pcc.P2SConnectionConfigurationProperties != nil {
25515		objectMap["properties"] = pcc.P2SConnectionConfigurationProperties
25516	}
25517	if pcc.Name != nil {
25518		objectMap["name"] = pcc.Name
25519	}
25520	if pcc.ID != nil {
25521		objectMap["id"] = pcc.ID
25522	}
25523	return json.Marshal(objectMap)
25524}
25525
25526// UnmarshalJSON is the custom unmarshaler for P2SConnectionConfiguration struct.
25527func (pcc *P2SConnectionConfiguration) UnmarshalJSON(body []byte) error {
25528	var m map[string]*json.RawMessage
25529	err := json.Unmarshal(body, &m)
25530	if err != nil {
25531		return err
25532	}
25533	for k, v := range m {
25534		switch k {
25535		case "properties":
25536			if v != nil {
25537				var p2SConnectionConfigurationProperties P2SConnectionConfigurationProperties
25538				err = json.Unmarshal(*v, &p2SConnectionConfigurationProperties)
25539				if err != nil {
25540					return err
25541				}
25542				pcc.P2SConnectionConfigurationProperties = &p2SConnectionConfigurationProperties
25543			}
25544		case "name":
25545			if v != nil {
25546				var name string
25547				err = json.Unmarshal(*v, &name)
25548				if err != nil {
25549					return err
25550				}
25551				pcc.Name = &name
25552			}
25553		case "etag":
25554			if v != nil {
25555				var etag string
25556				err = json.Unmarshal(*v, &etag)
25557				if err != nil {
25558					return err
25559				}
25560				pcc.Etag = &etag
25561			}
25562		case "id":
25563			if v != nil {
25564				var ID string
25565				err = json.Unmarshal(*v, &ID)
25566				if err != nil {
25567					return err
25568				}
25569				pcc.ID = &ID
25570			}
25571		}
25572	}
25573
25574	return nil
25575}
25576
25577// P2SConnectionConfigurationProperties parameters for P2SConnectionConfiguration.
25578type P2SConnectionConfigurationProperties struct {
25579	// VpnClientAddressPool - The reference to the address space resource which represents Address space for P2S VpnClient.
25580	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
25581	// RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection.
25582	RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"`
25583	// EnableInternetSecurity - Flag indicating whether the enable internet security flag is turned on for the P2S Connections or not.
25584	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
25585	// ProvisioningState - READ-ONLY; The provisioning state of the P2SConnectionConfiguration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25586	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25587}
25588
25589// MarshalJSON is the custom marshaler for P2SConnectionConfigurationProperties.
25590func (pccp P2SConnectionConfigurationProperties) MarshalJSON() ([]byte, error) {
25591	objectMap := make(map[string]interface{})
25592	if pccp.VpnClientAddressPool != nil {
25593		objectMap["vpnClientAddressPool"] = pccp.VpnClientAddressPool
25594	}
25595	if pccp.RoutingConfiguration != nil {
25596		objectMap["routingConfiguration"] = pccp.RoutingConfiguration
25597	}
25598	if pccp.EnableInternetSecurity != nil {
25599		objectMap["enableInternetSecurity"] = pccp.EnableInternetSecurity
25600	}
25601	return json.Marshal(objectMap)
25602}
25603
25604// P2SVpnConnectionHealth p2S Vpn connection detailed health written to sas url.
25605type P2SVpnConnectionHealth struct {
25606	autorest.Response `json:"-"`
25607	// SasURL - Returned sas url of the blob to which the p2s vpn connection detailed health will be written.
25608	SasURL *string `json:"sasUrl,omitempty"`
25609}
25610
25611// P2SVpnConnectionHealthRequest list of P2S Vpn connection health request.
25612type P2SVpnConnectionHealthRequest struct {
25613	// VpnUserNamesFilter - The list of p2s vpn user names whose p2s vpn connection detailed health to retrieve for.
25614	VpnUserNamesFilter *[]string `json:"vpnUserNamesFilter,omitempty"`
25615	// OutputBlobSasURL - The sas-url to download the P2S Vpn connection health detail.
25616	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
25617}
25618
25619// P2SVpnConnectionRequest list of p2s vpn connections to be disconnected.
25620type P2SVpnConnectionRequest struct {
25621	// VpnConnectionIds - List of p2s vpn connection Ids.
25622	VpnConnectionIds *[]string `json:"vpnConnectionIds,omitempty"`
25623}
25624
25625// P2SVpnGateway p2SVpnGateway Resource.
25626type P2SVpnGateway struct {
25627	autorest.Response `json:"-"`
25628	// P2SVpnGatewayProperties - Properties of the P2SVpnGateway.
25629	*P2SVpnGatewayProperties `json:"properties,omitempty"`
25630	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
25631	Etag *string `json:"etag,omitempty"`
25632	// ID - Resource ID.
25633	ID *string `json:"id,omitempty"`
25634	// Name - READ-ONLY; Resource name.
25635	Name *string `json:"name,omitempty"`
25636	// Type - READ-ONLY; Resource type.
25637	Type *string `json:"type,omitempty"`
25638	// Location - Resource location.
25639	Location *string `json:"location,omitempty"`
25640	// Tags - Resource tags.
25641	Tags map[string]*string `json:"tags"`
25642}
25643
25644// MarshalJSON is the custom marshaler for P2SVpnGateway.
25645func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) {
25646	objectMap := make(map[string]interface{})
25647	if pvg.P2SVpnGatewayProperties != nil {
25648		objectMap["properties"] = pvg.P2SVpnGatewayProperties
25649	}
25650	if pvg.ID != nil {
25651		objectMap["id"] = pvg.ID
25652	}
25653	if pvg.Location != nil {
25654		objectMap["location"] = pvg.Location
25655	}
25656	if pvg.Tags != nil {
25657		objectMap["tags"] = pvg.Tags
25658	}
25659	return json.Marshal(objectMap)
25660}
25661
25662// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct.
25663func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error {
25664	var m map[string]*json.RawMessage
25665	err := json.Unmarshal(body, &m)
25666	if err != nil {
25667		return err
25668	}
25669	for k, v := range m {
25670		switch k {
25671		case "properties":
25672			if v != nil {
25673				var p2SVpnGatewayProperties P2SVpnGatewayProperties
25674				err = json.Unmarshal(*v, &p2SVpnGatewayProperties)
25675				if err != nil {
25676					return err
25677				}
25678				pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties
25679			}
25680		case "etag":
25681			if v != nil {
25682				var etag string
25683				err = json.Unmarshal(*v, &etag)
25684				if err != nil {
25685					return err
25686				}
25687				pvg.Etag = &etag
25688			}
25689		case "id":
25690			if v != nil {
25691				var ID string
25692				err = json.Unmarshal(*v, &ID)
25693				if err != nil {
25694					return err
25695				}
25696				pvg.ID = &ID
25697			}
25698		case "name":
25699			if v != nil {
25700				var name string
25701				err = json.Unmarshal(*v, &name)
25702				if err != nil {
25703					return err
25704				}
25705				pvg.Name = &name
25706			}
25707		case "type":
25708			if v != nil {
25709				var typeVar string
25710				err = json.Unmarshal(*v, &typeVar)
25711				if err != nil {
25712					return err
25713				}
25714				pvg.Type = &typeVar
25715			}
25716		case "location":
25717			if v != nil {
25718				var location string
25719				err = json.Unmarshal(*v, &location)
25720				if err != nil {
25721					return err
25722				}
25723				pvg.Location = &location
25724			}
25725		case "tags":
25726			if v != nil {
25727				var tags map[string]*string
25728				err = json.Unmarshal(*v, &tags)
25729				if err != nil {
25730					return err
25731				}
25732				pvg.Tags = tags
25733			}
25734		}
25735	}
25736
25737	return nil
25738}
25739
25740// P2SVpnGatewayProperties parameters for P2SVpnGateway.
25741type P2SVpnGatewayProperties struct {
25742	// VirtualHub - The VirtualHub to which the gateway belongs.
25743	VirtualHub *SubResource `json:"virtualHub,omitempty"`
25744	// P2SConnectionConfigurations - List of all p2s connection configurations of the gateway.
25745	P2SConnectionConfigurations *[]P2SConnectionConfiguration `json:"p2SConnectionConfigurations,omitempty"`
25746	// ProvisioningState - READ-ONLY; The provisioning state of the P2S VPN gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25747	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25748	// VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway.
25749	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
25750	// VpnServerConfiguration - The VpnServerConfiguration to which the p2sVpnGateway is attached to.
25751	VpnServerConfiguration *SubResource `json:"vpnServerConfiguration,omitempty"`
25752	// VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status.
25753	VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"`
25754	// CustomDNSServers - List of all customer specified DNS servers IP addresses.
25755	CustomDNSServers *[]string `json:"customDnsServers,omitempty"`
25756	// IsRoutingPreferenceInternet - Enable Routing Preference property for the Public IP Interface of the P2SVpnGateway.
25757	IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"`
25758}
25759
25760// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties.
25761func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) {
25762	objectMap := make(map[string]interface{})
25763	if pvgp.VirtualHub != nil {
25764		objectMap["virtualHub"] = pvgp.VirtualHub
25765	}
25766	if pvgp.P2SConnectionConfigurations != nil {
25767		objectMap["p2SConnectionConfigurations"] = pvgp.P2SConnectionConfigurations
25768	}
25769	if pvgp.VpnGatewayScaleUnit != nil {
25770		objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit
25771	}
25772	if pvgp.VpnServerConfiguration != nil {
25773		objectMap["vpnServerConfiguration"] = pvgp.VpnServerConfiguration
25774	}
25775	if pvgp.CustomDNSServers != nil {
25776		objectMap["customDnsServers"] = pvgp.CustomDNSServers
25777	}
25778	if pvgp.IsRoutingPreferenceInternet != nil {
25779		objectMap["isRoutingPreferenceInternet"] = pvgp.IsRoutingPreferenceInternet
25780	}
25781	return json.Marshal(objectMap)
25782}
25783
25784// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25785// long-running operation.
25786type P2sVpnGatewaysCreateOrUpdateFuture struct {
25787	azure.FutureAPI
25788	// Result returns the result of the asynchronous operation.
25789	// If the operation has not completed it will return an error.
25790	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
25791}
25792
25793// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25794// operation.
25795type P2sVpnGatewaysDeleteFuture struct {
25796	azure.FutureAPI
25797	// Result returns the result of the asynchronous operation.
25798	// If the operation has not completed it will return an error.
25799	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
25800}
25801
25802// P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture an abstraction for monitoring and retrieving the results
25803// of a long-running operation.
25804type P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture struct {
25805	azure.FutureAPI
25806	// Result returns the result of the asynchronous operation.
25807	// If the operation has not completed it will return an error.
25808	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
25809}
25810
25811// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
25812// long-running operation.
25813type P2sVpnGatewaysGenerateVpnProfileFuture struct {
25814	azure.FutureAPI
25815	// Result returns the result of the asynchronous operation.
25816	// If the operation has not completed it will return an error.
25817	Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error)
25818}
25819
25820// P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture an abstraction for monitoring and retrieving the
25821// results of a long-running operation.
25822type P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture struct {
25823	azure.FutureAPI
25824	// Result returns the result of the asynchronous operation.
25825	// If the operation has not completed it will return an error.
25826	Result func(P2sVpnGatewaysClient) (P2SVpnConnectionHealth, error)
25827}
25828
25829// P2sVpnGatewaysGetP2sVpnConnectionHealthFuture an abstraction for monitoring and retrieving the results
25830// of a long-running operation.
25831type P2sVpnGatewaysGetP2sVpnConnectionHealthFuture struct {
25832	azure.FutureAPI
25833	// Result returns the result of the asynchronous operation.
25834	// If the operation has not completed it will return an error.
25835	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
25836}
25837
25838// P2SVpnGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running
25839// operation.
25840type P2SVpnGatewaysResetFuture struct {
25841	azure.FutureAPI
25842	// Result returns the result of the asynchronous operation.
25843	// If the operation has not completed it will return an error.
25844	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
25845}
25846
25847// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
25848// long-running operation.
25849type P2sVpnGatewaysUpdateTagsFuture struct {
25850	azure.FutureAPI
25851	// Result returns the result of the asynchronous operation.
25852	// If the operation has not completed it will return an error.
25853	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
25854}
25855
25856// P2SVpnProfileParameters vpn Client Parameters for package generation.
25857type P2SVpnProfileParameters struct {
25858	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
25859	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
25860}
25861
25862// PacketCapture parameters that define the create packet capture operation.
25863type PacketCapture struct {
25864	// PacketCaptureParameters - Properties of the packet capture.
25865	*PacketCaptureParameters `json:"properties,omitempty"`
25866}
25867
25868// MarshalJSON is the custom marshaler for PacketCapture.
25869func (pc PacketCapture) MarshalJSON() ([]byte, error) {
25870	objectMap := make(map[string]interface{})
25871	if pc.PacketCaptureParameters != nil {
25872		objectMap["properties"] = pc.PacketCaptureParameters
25873	}
25874	return json.Marshal(objectMap)
25875}
25876
25877// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
25878func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
25879	var m map[string]*json.RawMessage
25880	err := json.Unmarshal(body, &m)
25881	if err != nil {
25882		return err
25883	}
25884	for k, v := range m {
25885		switch k {
25886		case "properties":
25887			if v != nil {
25888				var packetCaptureParameters PacketCaptureParameters
25889				err = json.Unmarshal(*v, &packetCaptureParameters)
25890				if err != nil {
25891					return err
25892				}
25893				pc.PacketCaptureParameters = &packetCaptureParameters
25894			}
25895		}
25896	}
25897
25898	return nil
25899}
25900
25901// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
25902type PacketCaptureFilter struct {
25903	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
25904	Protocol PcProtocol `json:"protocol,omitempty"`
25905	// 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.
25906	LocalIPAddress *string `json:"localIPAddress,omitempty"`
25907	// 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.
25908	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
25909	// 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.
25910	LocalPort *string `json:"localPort,omitempty"`
25911	// 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.
25912	RemotePort *string `json:"remotePort,omitempty"`
25913}
25914
25915// PacketCaptureListResult list of packet capture sessions.
25916type PacketCaptureListResult struct {
25917	autorest.Response `json:"-"`
25918	// Value - Information about packet capture sessions.
25919	Value *[]PacketCaptureResult `json:"value,omitempty"`
25920}
25921
25922// PacketCaptureParameters parameters that define the create packet capture operation.
25923type PacketCaptureParameters struct {
25924	// Target - The ID of the targeted resource, only VM is currently supported.
25925	Target *string `json:"target,omitempty"`
25926	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
25927	BytesToCapturePerPacket *int64 `json:"bytesToCapturePerPacket,omitempty"`
25928	// TotalBytesPerSession - Maximum size of the capture output.
25929	TotalBytesPerSession *int64 `json:"totalBytesPerSession,omitempty"`
25930	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
25931	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
25932	// StorageLocation - The storage location for a packet capture session.
25933	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
25934	// Filters - A list of packet capture filters.
25935	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
25936}
25937
25938// PacketCaptureQueryStatusResult status of packet capture session.
25939type PacketCaptureQueryStatusResult struct {
25940	autorest.Response `json:"-"`
25941	// Name - The name of the packet capture resource.
25942	Name *string `json:"name,omitempty"`
25943	// ID - The ID of the packet capture resource.
25944	ID *string `json:"id,omitempty"`
25945	// CaptureStartTime - The start time of the packet capture session.
25946	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
25947	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
25948	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
25949	// StopReason - The reason the current packet capture session was stopped.
25950	StopReason *string `json:"stopReason,omitempty"`
25951	// PacketCaptureError - List of errors of packet capture session.
25952	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
25953}
25954
25955// PacketCaptureResult information about packet capture session.
25956type PacketCaptureResult struct {
25957	autorest.Response `json:"-"`
25958	// Name - READ-ONLY; Name of the packet capture session.
25959	Name *string `json:"name,omitempty"`
25960	// ID - READ-ONLY; ID of the packet capture operation.
25961	ID *string `json:"id,omitempty"`
25962	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
25963	Etag *string `json:"etag,omitempty"`
25964	// PacketCaptureResultProperties - Properties of the packet capture result.
25965	*PacketCaptureResultProperties `json:"properties,omitempty"`
25966}
25967
25968// MarshalJSON is the custom marshaler for PacketCaptureResult.
25969func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
25970	objectMap := make(map[string]interface{})
25971	if pcr.PacketCaptureResultProperties != nil {
25972		objectMap["properties"] = pcr.PacketCaptureResultProperties
25973	}
25974	return json.Marshal(objectMap)
25975}
25976
25977// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
25978func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
25979	var m map[string]*json.RawMessage
25980	err := json.Unmarshal(body, &m)
25981	if err != nil {
25982		return err
25983	}
25984	for k, v := range m {
25985		switch k {
25986		case "name":
25987			if v != nil {
25988				var name string
25989				err = json.Unmarshal(*v, &name)
25990				if err != nil {
25991					return err
25992				}
25993				pcr.Name = &name
25994			}
25995		case "id":
25996			if v != nil {
25997				var ID string
25998				err = json.Unmarshal(*v, &ID)
25999				if err != nil {
26000					return err
26001				}
26002				pcr.ID = &ID
26003			}
26004		case "etag":
26005			if v != nil {
26006				var etag string
26007				err = json.Unmarshal(*v, &etag)
26008				if err != nil {
26009					return err
26010				}
26011				pcr.Etag = &etag
26012			}
26013		case "properties":
26014			if v != nil {
26015				var packetCaptureResultProperties PacketCaptureResultProperties
26016				err = json.Unmarshal(*v, &packetCaptureResultProperties)
26017				if err != nil {
26018					return err
26019				}
26020				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
26021			}
26022		}
26023	}
26024
26025	return nil
26026}
26027
26028// PacketCaptureResultProperties the properties of a packet capture session.
26029type PacketCaptureResultProperties struct {
26030	// ProvisioningState - READ-ONLY; The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26031	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26032	// Target - The ID of the targeted resource, only VM is currently supported.
26033	Target *string `json:"target,omitempty"`
26034	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
26035	BytesToCapturePerPacket *int64 `json:"bytesToCapturePerPacket,omitempty"`
26036	// TotalBytesPerSession - Maximum size of the capture output.
26037	TotalBytesPerSession *int64 `json:"totalBytesPerSession,omitempty"`
26038	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
26039	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
26040	// StorageLocation - The storage location for a packet capture session.
26041	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
26042	// Filters - A list of packet capture filters.
26043	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
26044}
26045
26046// MarshalJSON is the custom marshaler for PacketCaptureResultProperties.
26047func (pcrp PacketCaptureResultProperties) MarshalJSON() ([]byte, error) {
26048	objectMap := make(map[string]interface{})
26049	if pcrp.Target != nil {
26050		objectMap["target"] = pcrp.Target
26051	}
26052	if pcrp.BytesToCapturePerPacket != nil {
26053		objectMap["bytesToCapturePerPacket"] = pcrp.BytesToCapturePerPacket
26054	}
26055	if pcrp.TotalBytesPerSession != nil {
26056		objectMap["totalBytesPerSession"] = pcrp.TotalBytesPerSession
26057	}
26058	if pcrp.TimeLimitInSeconds != nil {
26059		objectMap["timeLimitInSeconds"] = pcrp.TimeLimitInSeconds
26060	}
26061	if pcrp.StorageLocation != nil {
26062		objectMap["storageLocation"] = pcrp.StorageLocation
26063	}
26064	if pcrp.Filters != nil {
26065		objectMap["filters"] = pcrp.Filters
26066	}
26067	return json.Marshal(objectMap)
26068}
26069
26070// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
26071// operation.
26072type PacketCapturesCreateFuture struct {
26073	azure.FutureAPI
26074	// Result returns the result of the asynchronous operation.
26075	// If the operation has not completed it will return an error.
26076	Result func(PacketCapturesClient) (PacketCaptureResult, error)
26077}
26078
26079// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26080// operation.
26081type PacketCapturesDeleteFuture struct {
26082	azure.FutureAPI
26083	// Result returns the result of the asynchronous operation.
26084	// If the operation has not completed it will return an error.
26085	Result func(PacketCapturesClient) (autorest.Response, error)
26086}
26087
26088// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
26089// operation.
26090type PacketCapturesGetStatusFuture struct {
26091	azure.FutureAPI
26092	// Result returns the result of the asynchronous operation.
26093	// If the operation has not completed it will return an error.
26094	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
26095}
26096
26097// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
26098// operation.
26099type PacketCapturesStopFuture struct {
26100	azure.FutureAPI
26101	// Result returns the result of the asynchronous operation.
26102	// If the operation has not completed it will return an error.
26103	Result func(PacketCapturesClient) (autorest.Response, error)
26104}
26105
26106// PacketCaptureStorageLocation the storage location for a packet capture session.
26107type PacketCaptureStorageLocation struct {
26108	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
26109	StorageID *string `json:"storageId,omitempty"`
26110	// 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.
26111	StoragePath *string `json:"storagePath,omitempty"`
26112	// 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.
26113	FilePath *string `json:"filePath,omitempty"`
26114}
26115
26116// PatchRouteFilter route Filter Resource.
26117type PatchRouteFilter struct {
26118	// RouteFilterPropertiesFormat - Properties of the route filter.
26119	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
26120	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
26121	Name *string `json:"name,omitempty"`
26122	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26123	Etag *string `json:"etag,omitempty"`
26124	// Type - READ-ONLY; Resource type.
26125	Type *string `json:"type,omitempty"`
26126	// Tags - Resource tags.
26127	Tags map[string]*string `json:"tags"`
26128	// ID - Resource ID.
26129	ID *string `json:"id,omitempty"`
26130}
26131
26132// MarshalJSON is the custom marshaler for PatchRouteFilter.
26133func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
26134	objectMap := make(map[string]interface{})
26135	if prf.RouteFilterPropertiesFormat != nil {
26136		objectMap["properties"] = prf.RouteFilterPropertiesFormat
26137	}
26138	if prf.Tags != nil {
26139		objectMap["tags"] = prf.Tags
26140	}
26141	if prf.ID != nil {
26142		objectMap["id"] = prf.ID
26143	}
26144	return json.Marshal(objectMap)
26145}
26146
26147// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
26148func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
26149	var m map[string]*json.RawMessage
26150	err := json.Unmarshal(body, &m)
26151	if err != nil {
26152		return err
26153	}
26154	for k, v := range m {
26155		switch k {
26156		case "properties":
26157			if v != nil {
26158				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
26159				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
26160				if err != nil {
26161					return err
26162				}
26163				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
26164			}
26165		case "name":
26166			if v != nil {
26167				var name string
26168				err = json.Unmarshal(*v, &name)
26169				if err != nil {
26170					return err
26171				}
26172				prf.Name = &name
26173			}
26174		case "etag":
26175			if v != nil {
26176				var etag string
26177				err = json.Unmarshal(*v, &etag)
26178				if err != nil {
26179					return err
26180				}
26181				prf.Etag = &etag
26182			}
26183		case "type":
26184			if v != nil {
26185				var typeVar string
26186				err = json.Unmarshal(*v, &typeVar)
26187				if err != nil {
26188					return err
26189				}
26190				prf.Type = &typeVar
26191			}
26192		case "tags":
26193			if v != nil {
26194				var tags map[string]*string
26195				err = json.Unmarshal(*v, &tags)
26196				if err != nil {
26197					return err
26198				}
26199				prf.Tags = tags
26200			}
26201		case "id":
26202			if v != nil {
26203				var ID string
26204				err = json.Unmarshal(*v, &ID)
26205				if err != nil {
26206					return err
26207				}
26208				prf.ID = &ID
26209			}
26210		}
26211	}
26212
26213	return nil
26214}
26215
26216// PatchRouteFilterRule route Filter Rule Resource.
26217type PatchRouteFilterRule struct {
26218	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
26219	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
26220	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
26221	Name *string `json:"name,omitempty"`
26222	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26223	Etag *string `json:"etag,omitempty"`
26224	// ID - Resource ID.
26225	ID *string `json:"id,omitempty"`
26226}
26227
26228// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
26229func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
26230	objectMap := make(map[string]interface{})
26231	if prfr.RouteFilterRulePropertiesFormat != nil {
26232		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
26233	}
26234	if prfr.ID != nil {
26235		objectMap["id"] = prfr.ID
26236	}
26237	return json.Marshal(objectMap)
26238}
26239
26240// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
26241func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
26242	var m map[string]*json.RawMessage
26243	err := json.Unmarshal(body, &m)
26244	if err != nil {
26245		return err
26246	}
26247	for k, v := range m {
26248		switch k {
26249		case "properties":
26250			if v != nil {
26251				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
26252				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
26253				if err != nil {
26254					return err
26255				}
26256				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
26257			}
26258		case "name":
26259			if v != nil {
26260				var name string
26261				err = json.Unmarshal(*v, &name)
26262				if err != nil {
26263					return err
26264				}
26265				prfr.Name = &name
26266			}
26267		case "etag":
26268			if v != nil {
26269				var etag string
26270				err = json.Unmarshal(*v, &etag)
26271				if err != nil {
26272					return err
26273				}
26274				prfr.Etag = &etag
26275			}
26276		case "id":
26277			if v != nil {
26278				var ID string
26279				err = json.Unmarshal(*v, &ID)
26280				if err != nil {
26281					return err
26282				}
26283				prfr.ID = &ID
26284			}
26285		}
26286	}
26287
26288	return nil
26289}
26290
26291// PeerExpressRouteCircuitConnection peer Express Route Circuit Connection in an ExpressRouteCircuitPeering
26292// resource.
26293type PeerExpressRouteCircuitConnection struct {
26294	autorest.Response `json:"-"`
26295	// PeerExpressRouteCircuitConnectionPropertiesFormat - Properties of the peer express route circuit connection.
26296	*PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
26297	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
26298	Name *string `json:"name,omitempty"`
26299	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26300	Etag *string `json:"etag,omitempty"`
26301	// Type - READ-ONLY; Type of the resource.
26302	Type *string `json:"type,omitempty"`
26303	// ID - Resource ID.
26304	ID *string `json:"id,omitempty"`
26305}
26306
26307// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnection.
26308func (percc PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
26309	objectMap := make(map[string]interface{})
26310	if percc.PeerExpressRouteCircuitConnectionPropertiesFormat != nil {
26311		objectMap["properties"] = percc.PeerExpressRouteCircuitConnectionPropertiesFormat
26312	}
26313	if percc.Name != nil {
26314		objectMap["name"] = percc.Name
26315	}
26316	if percc.ID != nil {
26317		objectMap["id"] = percc.ID
26318	}
26319	return json.Marshal(objectMap)
26320}
26321
26322// UnmarshalJSON is the custom unmarshaler for PeerExpressRouteCircuitConnection struct.
26323func (percc *PeerExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
26324	var m map[string]*json.RawMessage
26325	err := json.Unmarshal(body, &m)
26326	if err != nil {
26327		return err
26328	}
26329	for k, v := range m {
26330		switch k {
26331		case "properties":
26332			if v != nil {
26333				var peerExpressRouteCircuitConnectionPropertiesFormat PeerExpressRouteCircuitConnectionPropertiesFormat
26334				err = json.Unmarshal(*v, &peerExpressRouteCircuitConnectionPropertiesFormat)
26335				if err != nil {
26336					return err
26337				}
26338				percc.PeerExpressRouteCircuitConnectionPropertiesFormat = &peerExpressRouteCircuitConnectionPropertiesFormat
26339			}
26340		case "name":
26341			if v != nil {
26342				var name string
26343				err = json.Unmarshal(*v, &name)
26344				if err != nil {
26345					return err
26346				}
26347				percc.Name = &name
26348			}
26349		case "etag":
26350			if v != nil {
26351				var etag string
26352				err = json.Unmarshal(*v, &etag)
26353				if err != nil {
26354					return err
26355				}
26356				percc.Etag = &etag
26357			}
26358		case "type":
26359			if v != nil {
26360				var typeVar string
26361				err = json.Unmarshal(*v, &typeVar)
26362				if err != nil {
26363					return err
26364				}
26365				percc.Type = &typeVar
26366			}
26367		case "id":
26368			if v != nil {
26369				var ID string
26370				err = json.Unmarshal(*v, &ID)
26371				if err != nil {
26372					return err
26373				}
26374				percc.ID = &ID
26375			}
26376		}
26377	}
26378
26379	return nil
26380}
26381
26382// PeerExpressRouteCircuitConnectionListResult response for ListPeeredConnections API service call
26383// retrieves all global reach peer circuit connections that belongs to a Private Peering for an
26384// ExpressRouteCircuit.
26385type PeerExpressRouteCircuitConnectionListResult struct {
26386	autorest.Response `json:"-"`
26387	// Value - The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit.
26388	Value *[]PeerExpressRouteCircuitConnection `json:"value,omitempty"`
26389	// NextLink - The URL to get the next set of results.
26390	NextLink *string `json:"nextLink,omitempty"`
26391}
26392
26393// PeerExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
26394// PeerExpressRouteCircuitConnection values.
26395type PeerExpressRouteCircuitConnectionListResultIterator struct {
26396	i    int
26397	page PeerExpressRouteCircuitConnectionListResultPage
26398}
26399
26400// NextWithContext advances to the next value.  If there was an error making
26401// the request the iterator does not advance and the error is returned.
26402func (iter *PeerExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
26403	if tracing.IsEnabled() {
26404		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultIterator.NextWithContext")
26405		defer func() {
26406			sc := -1
26407			if iter.Response().Response.Response != nil {
26408				sc = iter.Response().Response.Response.StatusCode
26409			}
26410			tracing.EndSpan(ctx, sc, err)
26411		}()
26412	}
26413	iter.i++
26414	if iter.i < len(iter.page.Values()) {
26415		return nil
26416	}
26417	err = iter.page.NextWithContext(ctx)
26418	if err != nil {
26419		iter.i--
26420		return err
26421	}
26422	iter.i = 0
26423	return nil
26424}
26425
26426// Next advances to the next value.  If there was an error making
26427// the request the iterator does not advance and the error is returned.
26428// Deprecated: Use NextWithContext() instead.
26429func (iter *PeerExpressRouteCircuitConnectionListResultIterator) Next() error {
26430	return iter.NextWithContext(context.Background())
26431}
26432
26433// NotDone returns true if the enumeration should be started or is not yet complete.
26434func (iter PeerExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
26435	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26436}
26437
26438// Response returns the raw server response from the last page request.
26439func (iter PeerExpressRouteCircuitConnectionListResultIterator) Response() PeerExpressRouteCircuitConnectionListResult {
26440	return iter.page.Response()
26441}
26442
26443// Value returns the current value or a zero-initialized value if the
26444// iterator has advanced beyond the end of the collection.
26445func (iter PeerExpressRouteCircuitConnectionListResultIterator) Value() PeerExpressRouteCircuitConnection {
26446	if !iter.page.NotDone() {
26447		return PeerExpressRouteCircuitConnection{}
26448	}
26449	return iter.page.Values()[iter.i]
26450}
26451
26452// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultIterator type.
26453func NewPeerExpressRouteCircuitConnectionListResultIterator(page PeerExpressRouteCircuitConnectionListResultPage) PeerExpressRouteCircuitConnectionListResultIterator {
26454	return PeerExpressRouteCircuitConnectionListResultIterator{page: page}
26455}
26456
26457// IsEmpty returns true if the ListResult contains no values.
26458func (percclr PeerExpressRouteCircuitConnectionListResult) IsEmpty() bool {
26459	return percclr.Value == nil || len(*percclr.Value) == 0
26460}
26461
26462// hasNextLink returns true if the NextLink is not empty.
26463func (percclr PeerExpressRouteCircuitConnectionListResult) hasNextLink() bool {
26464	return percclr.NextLink != nil && len(*percclr.NextLink) != 0
26465}
26466
26467// peerExpressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
26468// It returns nil if no more results exist.
26469func (percclr PeerExpressRouteCircuitConnectionListResult) peerExpressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
26470	if !percclr.hasNextLink() {
26471		return nil, nil
26472	}
26473	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26474		autorest.AsJSON(),
26475		autorest.AsGet(),
26476		autorest.WithBaseURL(to.String(percclr.NextLink)))
26477}
26478
26479// PeerExpressRouteCircuitConnectionListResultPage contains a page of PeerExpressRouteCircuitConnection
26480// values.
26481type PeerExpressRouteCircuitConnectionListResultPage struct {
26482	fn      func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)
26483	percclr PeerExpressRouteCircuitConnectionListResult
26484}
26485
26486// NextWithContext advances to the next page of values.  If there was an error making
26487// the request the page does not advance and the error is returned.
26488func (page *PeerExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
26489	if tracing.IsEnabled() {
26490		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultPage.NextWithContext")
26491		defer func() {
26492			sc := -1
26493			if page.Response().Response.Response != nil {
26494				sc = page.Response().Response.Response.StatusCode
26495			}
26496			tracing.EndSpan(ctx, sc, err)
26497		}()
26498	}
26499	for {
26500		next, err := page.fn(ctx, page.percclr)
26501		if err != nil {
26502			return err
26503		}
26504		page.percclr = next
26505		if !next.hasNextLink() || !next.IsEmpty() {
26506			break
26507		}
26508	}
26509	return nil
26510}
26511
26512// Next advances to the next page of values.  If there was an error making
26513// the request the page does not advance and the error is returned.
26514// Deprecated: Use NextWithContext() instead.
26515func (page *PeerExpressRouteCircuitConnectionListResultPage) Next() error {
26516	return page.NextWithContext(context.Background())
26517}
26518
26519// NotDone returns true if the page enumeration should be started or is not yet complete.
26520func (page PeerExpressRouteCircuitConnectionListResultPage) NotDone() bool {
26521	return !page.percclr.IsEmpty()
26522}
26523
26524// Response returns the raw server response from the last page request.
26525func (page PeerExpressRouteCircuitConnectionListResultPage) Response() PeerExpressRouteCircuitConnectionListResult {
26526	return page.percclr
26527}
26528
26529// Values returns the slice of values for the current page or nil if there are no values.
26530func (page PeerExpressRouteCircuitConnectionListResultPage) Values() []PeerExpressRouteCircuitConnection {
26531	if page.percclr.IsEmpty() {
26532		return nil
26533	}
26534	return *page.percclr.Value
26535}
26536
26537// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultPage type.
26538func NewPeerExpressRouteCircuitConnectionListResultPage(cur PeerExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)) PeerExpressRouteCircuitConnectionListResultPage {
26539	return PeerExpressRouteCircuitConnectionListResultPage{
26540		fn:      getNextPage,
26541		percclr: cur,
26542	}
26543}
26544
26545// PeerExpressRouteCircuitConnectionPropertiesFormat properties of the peer express route circuit
26546// connection.
26547type PeerExpressRouteCircuitConnectionPropertiesFormat struct {
26548	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit.
26549	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
26550	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
26551	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
26552	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
26553	AddressPrefix *string `json:"addressPrefix,omitempty"`
26554	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
26555	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
26556	// ConnectionName - The name of the express route circuit connection resource.
26557	ConnectionName *string `json:"connectionName,omitempty"`
26558	// AuthResourceGUID - The resource guid of the authorization used for the express route circuit connection.
26559	AuthResourceGUID *string `json:"authResourceGuid,omitempty"`
26560	// ProvisioningState - READ-ONLY; The provisioning state of the peer express route circuit connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26561	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26562}
26563
26564// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnectionPropertiesFormat.
26565func (perccpf PeerExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
26566	objectMap := make(map[string]interface{})
26567	if perccpf.ExpressRouteCircuitPeering != nil {
26568		objectMap["expressRouteCircuitPeering"] = perccpf.ExpressRouteCircuitPeering
26569	}
26570	if perccpf.PeerExpressRouteCircuitPeering != nil {
26571		objectMap["peerExpressRouteCircuitPeering"] = perccpf.PeerExpressRouteCircuitPeering
26572	}
26573	if perccpf.AddressPrefix != nil {
26574		objectMap["addressPrefix"] = perccpf.AddressPrefix
26575	}
26576	if perccpf.CircuitConnectionStatus != "" {
26577		objectMap["circuitConnectionStatus"] = perccpf.CircuitConnectionStatus
26578	}
26579	if perccpf.ConnectionName != nil {
26580		objectMap["connectionName"] = perccpf.ConnectionName
26581	}
26582	if perccpf.AuthResourceGUID != nil {
26583		objectMap["authResourceGuid"] = perccpf.AuthResourceGUID
26584	}
26585	return json.Marshal(objectMap)
26586}
26587
26588// PeerRoute peer routing details.
26589type PeerRoute struct {
26590	// LocalAddress - READ-ONLY; The peer's local address.
26591	LocalAddress *string `json:"localAddress,omitempty"`
26592	// NetworkProperty - READ-ONLY; The route's network prefix.
26593	NetworkProperty *string `json:"network,omitempty"`
26594	// NextHop - READ-ONLY; The route's next hop.
26595	NextHop *string `json:"nextHop,omitempty"`
26596	// SourcePeer - READ-ONLY; The peer this route was learned from.
26597	SourcePeer *string `json:"sourcePeer,omitempty"`
26598	// Origin - READ-ONLY; The source this route was learned from.
26599	Origin *string `json:"origin,omitempty"`
26600	// AsPath - READ-ONLY; The route's AS path sequence.
26601	AsPath *string `json:"asPath,omitempty"`
26602	// Weight - READ-ONLY; The route's weight.
26603	Weight *int32 `json:"weight,omitempty"`
26604}
26605
26606// PeerRouteList list of virtual router peer routes.
26607type PeerRouteList struct {
26608	autorest.Response `json:"-"`
26609	// Value - List of peer routes.
26610	Value *[]PeerRoute `json:"value,omitempty"`
26611}
26612
26613// PolicySettings defines contents of a web application firewall global configuration.
26614type PolicySettings struct {
26615	// State - The state of the policy. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled'
26616	State WebApplicationFirewallEnabledState `json:"state,omitempty"`
26617	// Mode - The mode of the policy. Possible values include: 'WebApplicationFirewallModePrevention', 'WebApplicationFirewallModeDetection'
26618	Mode WebApplicationFirewallMode `json:"mode,omitempty"`
26619	// RequestBodyCheck - Whether to allow WAF to check request Body.
26620	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
26621	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
26622	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
26623	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
26624	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
26625}
26626
26627// PrepareNetworkPoliciesRequest details of PrepareNetworkPolicies for Subnet.
26628type PrepareNetworkPoliciesRequest struct {
26629	// ServiceName - The name of the service for which subnet is being prepared for.
26630	ServiceName *string `json:"serviceName,omitempty"`
26631	// NetworkIntentPolicyConfigurations - A list of NetworkIntentPolicyConfiguration.
26632	NetworkIntentPolicyConfigurations *[]IntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"`
26633}
26634
26635// PrivateDNSZoneConfig privateDnsZoneConfig resource.
26636type PrivateDNSZoneConfig struct {
26637	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
26638	Name *string `json:"name,omitempty"`
26639	// PrivateDNSZonePropertiesFormat - Properties of the private dns zone configuration.
26640	*PrivateDNSZonePropertiesFormat `json:"properties,omitempty"`
26641}
26642
26643// MarshalJSON is the custom marshaler for PrivateDNSZoneConfig.
26644func (pdzc PrivateDNSZoneConfig) MarshalJSON() ([]byte, error) {
26645	objectMap := make(map[string]interface{})
26646	if pdzc.Name != nil {
26647		objectMap["name"] = pdzc.Name
26648	}
26649	if pdzc.PrivateDNSZonePropertiesFormat != nil {
26650		objectMap["properties"] = pdzc.PrivateDNSZonePropertiesFormat
26651	}
26652	return json.Marshal(objectMap)
26653}
26654
26655// UnmarshalJSON is the custom unmarshaler for PrivateDNSZoneConfig struct.
26656func (pdzc *PrivateDNSZoneConfig) UnmarshalJSON(body []byte) error {
26657	var m map[string]*json.RawMessage
26658	err := json.Unmarshal(body, &m)
26659	if err != nil {
26660		return err
26661	}
26662	for k, v := range m {
26663		switch k {
26664		case "name":
26665			if v != nil {
26666				var name string
26667				err = json.Unmarshal(*v, &name)
26668				if err != nil {
26669					return err
26670				}
26671				pdzc.Name = &name
26672			}
26673		case "properties":
26674			if v != nil {
26675				var privateDNSZonePropertiesFormat PrivateDNSZonePropertiesFormat
26676				err = json.Unmarshal(*v, &privateDNSZonePropertiesFormat)
26677				if err != nil {
26678					return err
26679				}
26680				pdzc.PrivateDNSZonePropertiesFormat = &privateDNSZonePropertiesFormat
26681			}
26682		}
26683	}
26684
26685	return nil
26686}
26687
26688// PrivateDNSZoneGroup private dns zone group resource.
26689type PrivateDNSZoneGroup struct {
26690	autorest.Response `json:"-"`
26691	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
26692	Name *string `json:"name,omitempty"`
26693	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26694	Etag *string `json:"etag,omitempty"`
26695	// PrivateDNSZoneGroupPropertiesFormat - Properties of the private dns zone group.
26696	*PrivateDNSZoneGroupPropertiesFormat `json:"properties,omitempty"`
26697	// ID - Resource ID.
26698	ID *string `json:"id,omitempty"`
26699}
26700
26701// MarshalJSON is the custom marshaler for PrivateDNSZoneGroup.
26702func (pdzg PrivateDNSZoneGroup) MarshalJSON() ([]byte, error) {
26703	objectMap := make(map[string]interface{})
26704	if pdzg.Name != nil {
26705		objectMap["name"] = pdzg.Name
26706	}
26707	if pdzg.PrivateDNSZoneGroupPropertiesFormat != nil {
26708		objectMap["properties"] = pdzg.PrivateDNSZoneGroupPropertiesFormat
26709	}
26710	if pdzg.ID != nil {
26711		objectMap["id"] = pdzg.ID
26712	}
26713	return json.Marshal(objectMap)
26714}
26715
26716// UnmarshalJSON is the custom unmarshaler for PrivateDNSZoneGroup struct.
26717func (pdzg *PrivateDNSZoneGroup) UnmarshalJSON(body []byte) error {
26718	var m map[string]*json.RawMessage
26719	err := json.Unmarshal(body, &m)
26720	if err != nil {
26721		return err
26722	}
26723	for k, v := range m {
26724		switch k {
26725		case "name":
26726			if v != nil {
26727				var name string
26728				err = json.Unmarshal(*v, &name)
26729				if err != nil {
26730					return err
26731				}
26732				pdzg.Name = &name
26733			}
26734		case "etag":
26735			if v != nil {
26736				var etag string
26737				err = json.Unmarshal(*v, &etag)
26738				if err != nil {
26739					return err
26740				}
26741				pdzg.Etag = &etag
26742			}
26743		case "properties":
26744			if v != nil {
26745				var privateDNSZoneGroupPropertiesFormat PrivateDNSZoneGroupPropertiesFormat
26746				err = json.Unmarshal(*v, &privateDNSZoneGroupPropertiesFormat)
26747				if err != nil {
26748					return err
26749				}
26750				pdzg.PrivateDNSZoneGroupPropertiesFormat = &privateDNSZoneGroupPropertiesFormat
26751			}
26752		case "id":
26753			if v != nil {
26754				var ID string
26755				err = json.Unmarshal(*v, &ID)
26756				if err != nil {
26757					return err
26758				}
26759				pdzg.ID = &ID
26760			}
26761		}
26762	}
26763
26764	return nil
26765}
26766
26767// PrivateDNSZoneGroupListResult response for the ListPrivateDnsZoneGroups API service call.
26768type PrivateDNSZoneGroupListResult struct {
26769	autorest.Response `json:"-"`
26770	// Value - A list of private dns zone group resources in a private endpoint.
26771	Value *[]PrivateDNSZoneGroup `json:"value,omitempty"`
26772	// NextLink - READ-ONLY; The URL to get the next set of results.
26773	NextLink *string `json:"nextLink,omitempty"`
26774}
26775
26776// MarshalJSON is the custom marshaler for PrivateDNSZoneGroupListResult.
26777func (pdzglr PrivateDNSZoneGroupListResult) MarshalJSON() ([]byte, error) {
26778	objectMap := make(map[string]interface{})
26779	if pdzglr.Value != nil {
26780		objectMap["value"] = pdzglr.Value
26781	}
26782	return json.Marshal(objectMap)
26783}
26784
26785// PrivateDNSZoneGroupListResultIterator provides access to a complete listing of PrivateDNSZoneGroup
26786// values.
26787type PrivateDNSZoneGroupListResultIterator struct {
26788	i    int
26789	page PrivateDNSZoneGroupListResultPage
26790}
26791
26792// NextWithContext advances to the next value.  If there was an error making
26793// the request the iterator does not advance and the error is returned.
26794func (iter *PrivateDNSZoneGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
26795	if tracing.IsEnabled() {
26796		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateDNSZoneGroupListResultIterator.NextWithContext")
26797		defer func() {
26798			sc := -1
26799			if iter.Response().Response.Response != nil {
26800				sc = iter.Response().Response.Response.StatusCode
26801			}
26802			tracing.EndSpan(ctx, sc, err)
26803		}()
26804	}
26805	iter.i++
26806	if iter.i < len(iter.page.Values()) {
26807		return nil
26808	}
26809	err = iter.page.NextWithContext(ctx)
26810	if err != nil {
26811		iter.i--
26812		return err
26813	}
26814	iter.i = 0
26815	return nil
26816}
26817
26818// Next advances to the next value.  If there was an error making
26819// the request the iterator does not advance and the error is returned.
26820// Deprecated: Use NextWithContext() instead.
26821func (iter *PrivateDNSZoneGroupListResultIterator) Next() error {
26822	return iter.NextWithContext(context.Background())
26823}
26824
26825// NotDone returns true if the enumeration should be started or is not yet complete.
26826func (iter PrivateDNSZoneGroupListResultIterator) NotDone() bool {
26827	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26828}
26829
26830// Response returns the raw server response from the last page request.
26831func (iter PrivateDNSZoneGroupListResultIterator) Response() PrivateDNSZoneGroupListResult {
26832	return iter.page.Response()
26833}
26834
26835// Value returns the current value or a zero-initialized value if the
26836// iterator has advanced beyond the end of the collection.
26837func (iter PrivateDNSZoneGroupListResultIterator) Value() PrivateDNSZoneGroup {
26838	if !iter.page.NotDone() {
26839		return PrivateDNSZoneGroup{}
26840	}
26841	return iter.page.Values()[iter.i]
26842}
26843
26844// Creates a new instance of the PrivateDNSZoneGroupListResultIterator type.
26845func NewPrivateDNSZoneGroupListResultIterator(page PrivateDNSZoneGroupListResultPage) PrivateDNSZoneGroupListResultIterator {
26846	return PrivateDNSZoneGroupListResultIterator{page: page}
26847}
26848
26849// IsEmpty returns true if the ListResult contains no values.
26850func (pdzglr PrivateDNSZoneGroupListResult) IsEmpty() bool {
26851	return pdzglr.Value == nil || len(*pdzglr.Value) == 0
26852}
26853
26854// hasNextLink returns true if the NextLink is not empty.
26855func (pdzglr PrivateDNSZoneGroupListResult) hasNextLink() bool {
26856	return pdzglr.NextLink != nil && len(*pdzglr.NextLink) != 0
26857}
26858
26859// privateDNSZoneGroupListResultPreparer prepares a request to retrieve the next set of results.
26860// It returns nil if no more results exist.
26861func (pdzglr PrivateDNSZoneGroupListResult) privateDNSZoneGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
26862	if !pdzglr.hasNextLink() {
26863		return nil, nil
26864	}
26865	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26866		autorest.AsJSON(),
26867		autorest.AsGet(),
26868		autorest.WithBaseURL(to.String(pdzglr.NextLink)))
26869}
26870
26871// PrivateDNSZoneGroupListResultPage contains a page of PrivateDNSZoneGroup values.
26872type PrivateDNSZoneGroupListResultPage struct {
26873	fn     func(context.Context, PrivateDNSZoneGroupListResult) (PrivateDNSZoneGroupListResult, error)
26874	pdzglr PrivateDNSZoneGroupListResult
26875}
26876
26877// NextWithContext advances to the next page of values.  If there was an error making
26878// the request the page does not advance and the error is returned.
26879func (page *PrivateDNSZoneGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
26880	if tracing.IsEnabled() {
26881		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateDNSZoneGroupListResultPage.NextWithContext")
26882		defer func() {
26883			sc := -1
26884			if page.Response().Response.Response != nil {
26885				sc = page.Response().Response.Response.StatusCode
26886			}
26887			tracing.EndSpan(ctx, sc, err)
26888		}()
26889	}
26890	for {
26891		next, err := page.fn(ctx, page.pdzglr)
26892		if err != nil {
26893			return err
26894		}
26895		page.pdzglr = next
26896		if !next.hasNextLink() || !next.IsEmpty() {
26897			break
26898		}
26899	}
26900	return nil
26901}
26902
26903// Next advances to the next page of values.  If there was an error making
26904// the request the page does not advance and the error is returned.
26905// Deprecated: Use NextWithContext() instead.
26906func (page *PrivateDNSZoneGroupListResultPage) Next() error {
26907	return page.NextWithContext(context.Background())
26908}
26909
26910// NotDone returns true if the page enumeration should be started or is not yet complete.
26911func (page PrivateDNSZoneGroupListResultPage) NotDone() bool {
26912	return !page.pdzglr.IsEmpty()
26913}
26914
26915// Response returns the raw server response from the last page request.
26916func (page PrivateDNSZoneGroupListResultPage) Response() PrivateDNSZoneGroupListResult {
26917	return page.pdzglr
26918}
26919
26920// Values returns the slice of values for the current page or nil if there are no values.
26921func (page PrivateDNSZoneGroupListResultPage) Values() []PrivateDNSZoneGroup {
26922	if page.pdzglr.IsEmpty() {
26923		return nil
26924	}
26925	return *page.pdzglr.Value
26926}
26927
26928// Creates a new instance of the PrivateDNSZoneGroupListResultPage type.
26929func NewPrivateDNSZoneGroupListResultPage(cur PrivateDNSZoneGroupListResult, getNextPage func(context.Context, PrivateDNSZoneGroupListResult) (PrivateDNSZoneGroupListResult, error)) PrivateDNSZoneGroupListResultPage {
26930	return PrivateDNSZoneGroupListResultPage{
26931		fn:     getNextPage,
26932		pdzglr: cur,
26933	}
26934}
26935
26936// PrivateDNSZoneGroupPropertiesFormat properties of the private dns zone group.
26937type PrivateDNSZoneGroupPropertiesFormat struct {
26938	// ProvisioningState - READ-ONLY; The provisioning state of the private dns zone group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26939	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26940	// PrivateDNSZoneConfigs - A collection of private dns zone configurations of the private dns zone group.
26941	PrivateDNSZoneConfigs *[]PrivateDNSZoneConfig `json:"privateDnsZoneConfigs,omitempty"`
26942}
26943
26944// MarshalJSON is the custom marshaler for PrivateDNSZoneGroupPropertiesFormat.
26945func (pdzgpf PrivateDNSZoneGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
26946	objectMap := make(map[string]interface{})
26947	if pdzgpf.PrivateDNSZoneConfigs != nil {
26948		objectMap["privateDnsZoneConfigs"] = pdzgpf.PrivateDNSZoneConfigs
26949	}
26950	return json.Marshal(objectMap)
26951}
26952
26953// PrivateDNSZoneGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
26954// long-running operation.
26955type PrivateDNSZoneGroupsCreateOrUpdateFuture struct {
26956	azure.FutureAPI
26957	// Result returns the result of the asynchronous operation.
26958	// If the operation has not completed it will return an error.
26959	Result func(PrivateDNSZoneGroupsClient) (PrivateDNSZoneGroup, error)
26960}
26961
26962// PrivateDNSZoneGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
26963// long-running operation.
26964type PrivateDNSZoneGroupsDeleteFuture struct {
26965	azure.FutureAPI
26966	// Result returns the result of the asynchronous operation.
26967	// If the operation has not completed it will return an error.
26968	Result func(PrivateDNSZoneGroupsClient) (autorest.Response, error)
26969}
26970
26971// PrivateDNSZonePropertiesFormat properties of the private dns zone configuration resource.
26972type PrivateDNSZonePropertiesFormat struct {
26973	// PrivateDNSZoneID - The resource id of the private dns zone.
26974	PrivateDNSZoneID *string `json:"privateDnsZoneId,omitempty"`
26975	// RecordSets - READ-ONLY; A collection of information regarding a recordSet, holding information to identify private resources.
26976	RecordSets *[]RecordSet `json:"recordSets,omitempty"`
26977}
26978
26979// MarshalJSON is the custom marshaler for PrivateDNSZonePropertiesFormat.
26980func (pdzpf PrivateDNSZonePropertiesFormat) MarshalJSON() ([]byte, error) {
26981	objectMap := make(map[string]interface{})
26982	if pdzpf.PrivateDNSZoneID != nil {
26983		objectMap["privateDnsZoneId"] = pdzpf.PrivateDNSZoneID
26984	}
26985	return json.Marshal(objectMap)
26986}
26987
26988// PrivateEndpoint private endpoint resource.
26989type PrivateEndpoint struct {
26990	autorest.Response `json:"-"`
26991	// ExtendedLocation - The extended location of the load balancer.
26992	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
26993	// PrivateEndpointProperties - Properties of the private endpoint.
26994	*PrivateEndpointProperties `json:"properties,omitempty"`
26995	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26996	Etag *string `json:"etag,omitempty"`
26997	// ID - Resource ID.
26998	ID *string `json:"id,omitempty"`
26999	// Name - READ-ONLY; Resource name.
27000	Name *string `json:"name,omitempty"`
27001	// Type - READ-ONLY; Resource type.
27002	Type *string `json:"type,omitempty"`
27003	// Location - Resource location.
27004	Location *string `json:"location,omitempty"`
27005	// Tags - Resource tags.
27006	Tags map[string]*string `json:"tags"`
27007}
27008
27009// MarshalJSON is the custom marshaler for PrivateEndpoint.
27010func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
27011	objectMap := make(map[string]interface{})
27012	if peVar.ExtendedLocation != nil {
27013		objectMap["extendedLocation"] = peVar.ExtendedLocation
27014	}
27015	if peVar.PrivateEndpointProperties != nil {
27016		objectMap["properties"] = peVar.PrivateEndpointProperties
27017	}
27018	if peVar.ID != nil {
27019		objectMap["id"] = peVar.ID
27020	}
27021	if peVar.Location != nil {
27022		objectMap["location"] = peVar.Location
27023	}
27024	if peVar.Tags != nil {
27025		objectMap["tags"] = peVar.Tags
27026	}
27027	return json.Marshal(objectMap)
27028}
27029
27030// UnmarshalJSON is the custom unmarshaler for PrivateEndpoint struct.
27031func (peVar *PrivateEndpoint) UnmarshalJSON(body []byte) error {
27032	var m map[string]*json.RawMessage
27033	err := json.Unmarshal(body, &m)
27034	if err != nil {
27035		return err
27036	}
27037	for k, v := range m {
27038		switch k {
27039		case "extendedLocation":
27040			if v != nil {
27041				var extendedLocation ExtendedLocation
27042				err = json.Unmarshal(*v, &extendedLocation)
27043				if err != nil {
27044					return err
27045				}
27046				peVar.ExtendedLocation = &extendedLocation
27047			}
27048		case "properties":
27049			if v != nil {
27050				var privateEndpointProperties PrivateEndpointProperties
27051				err = json.Unmarshal(*v, &privateEndpointProperties)
27052				if err != nil {
27053					return err
27054				}
27055				peVar.PrivateEndpointProperties = &privateEndpointProperties
27056			}
27057		case "etag":
27058			if v != nil {
27059				var etag string
27060				err = json.Unmarshal(*v, &etag)
27061				if err != nil {
27062					return err
27063				}
27064				peVar.Etag = &etag
27065			}
27066		case "id":
27067			if v != nil {
27068				var ID string
27069				err = json.Unmarshal(*v, &ID)
27070				if err != nil {
27071					return err
27072				}
27073				peVar.ID = &ID
27074			}
27075		case "name":
27076			if v != nil {
27077				var name string
27078				err = json.Unmarshal(*v, &name)
27079				if err != nil {
27080					return err
27081				}
27082				peVar.Name = &name
27083			}
27084		case "type":
27085			if v != nil {
27086				var typeVar string
27087				err = json.Unmarshal(*v, &typeVar)
27088				if err != nil {
27089					return err
27090				}
27091				peVar.Type = &typeVar
27092			}
27093		case "location":
27094			if v != nil {
27095				var location string
27096				err = json.Unmarshal(*v, &location)
27097				if err != nil {
27098					return err
27099				}
27100				peVar.Location = &location
27101			}
27102		case "tags":
27103			if v != nil {
27104				var tags map[string]*string
27105				err = json.Unmarshal(*v, &tags)
27106				if err != nil {
27107					return err
27108				}
27109				peVar.Tags = tags
27110			}
27111		}
27112	}
27113
27114	return nil
27115}
27116
27117// PrivateEndpointConnection privateEndpointConnection resource.
27118type PrivateEndpointConnection struct {
27119	autorest.Response `json:"-"`
27120	// PrivateEndpointConnectionProperties - Properties of the private end point connection.
27121	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
27122	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
27123	Name *string `json:"name,omitempty"`
27124	// Type - READ-ONLY; The resource type.
27125	Type *string `json:"type,omitempty"`
27126	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
27127	Etag *string `json:"etag,omitempty"`
27128	// ID - Resource ID.
27129	ID *string `json:"id,omitempty"`
27130}
27131
27132// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
27133func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
27134	objectMap := make(map[string]interface{})
27135	if pec.PrivateEndpointConnectionProperties != nil {
27136		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
27137	}
27138	if pec.Name != nil {
27139		objectMap["name"] = pec.Name
27140	}
27141	if pec.ID != nil {
27142		objectMap["id"] = pec.ID
27143	}
27144	return json.Marshal(objectMap)
27145}
27146
27147// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
27148func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
27149	var m map[string]*json.RawMessage
27150	err := json.Unmarshal(body, &m)
27151	if err != nil {
27152		return err
27153	}
27154	for k, v := range m {
27155		switch k {
27156		case "properties":
27157			if v != nil {
27158				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
27159				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
27160				if err != nil {
27161					return err
27162				}
27163				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
27164			}
27165		case "name":
27166			if v != nil {
27167				var name string
27168				err = json.Unmarshal(*v, &name)
27169				if err != nil {
27170					return err
27171				}
27172				pec.Name = &name
27173			}
27174		case "type":
27175			if v != nil {
27176				var typeVar string
27177				err = json.Unmarshal(*v, &typeVar)
27178				if err != nil {
27179					return err
27180				}
27181				pec.Type = &typeVar
27182			}
27183		case "etag":
27184			if v != nil {
27185				var etag string
27186				err = json.Unmarshal(*v, &etag)
27187				if err != nil {
27188					return err
27189				}
27190				pec.Etag = &etag
27191			}
27192		case "id":
27193			if v != nil {
27194				var ID string
27195				err = json.Unmarshal(*v, &ID)
27196				if err != nil {
27197					return err
27198				}
27199				pec.ID = &ID
27200			}
27201		}
27202	}
27203
27204	return nil
27205}
27206
27207// PrivateEndpointConnectionListResult response for the ListPrivateEndpointConnection API service call.
27208type PrivateEndpointConnectionListResult struct {
27209	autorest.Response `json:"-"`
27210	// Value - A list of PrivateEndpointConnection resources for a specific private link service.
27211	Value *[]PrivateEndpointConnection `json:"value,omitempty"`
27212	// NextLink - READ-ONLY; The URL to get the next set of results.
27213	NextLink *string `json:"nextLink,omitempty"`
27214}
27215
27216// MarshalJSON is the custom marshaler for PrivateEndpointConnectionListResult.
27217func (peclr PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) {
27218	objectMap := make(map[string]interface{})
27219	if peclr.Value != nil {
27220		objectMap["value"] = peclr.Value
27221	}
27222	return json.Marshal(objectMap)
27223}
27224
27225// PrivateEndpointConnectionListResultIterator provides access to a complete listing of
27226// PrivateEndpointConnection values.
27227type PrivateEndpointConnectionListResultIterator struct {
27228	i    int
27229	page PrivateEndpointConnectionListResultPage
27230}
27231
27232// NextWithContext advances to the next value.  If there was an error making
27233// the request the iterator does not advance and the error is returned.
27234func (iter *PrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
27235	if tracing.IsEnabled() {
27236		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultIterator.NextWithContext")
27237		defer func() {
27238			sc := -1
27239			if iter.Response().Response.Response != nil {
27240				sc = iter.Response().Response.Response.StatusCode
27241			}
27242			tracing.EndSpan(ctx, sc, err)
27243		}()
27244	}
27245	iter.i++
27246	if iter.i < len(iter.page.Values()) {
27247		return nil
27248	}
27249	err = iter.page.NextWithContext(ctx)
27250	if err != nil {
27251		iter.i--
27252		return err
27253	}
27254	iter.i = 0
27255	return nil
27256}
27257
27258// Next advances to the next value.  If there was an error making
27259// the request the iterator does not advance and the error is returned.
27260// Deprecated: Use NextWithContext() instead.
27261func (iter *PrivateEndpointConnectionListResultIterator) Next() error {
27262	return iter.NextWithContext(context.Background())
27263}
27264
27265// NotDone returns true if the enumeration should be started or is not yet complete.
27266func (iter PrivateEndpointConnectionListResultIterator) NotDone() bool {
27267	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27268}
27269
27270// Response returns the raw server response from the last page request.
27271func (iter PrivateEndpointConnectionListResultIterator) Response() PrivateEndpointConnectionListResult {
27272	return iter.page.Response()
27273}
27274
27275// Value returns the current value or a zero-initialized value if the
27276// iterator has advanced beyond the end of the collection.
27277func (iter PrivateEndpointConnectionListResultIterator) Value() PrivateEndpointConnection {
27278	if !iter.page.NotDone() {
27279		return PrivateEndpointConnection{}
27280	}
27281	return iter.page.Values()[iter.i]
27282}
27283
27284// Creates a new instance of the PrivateEndpointConnectionListResultIterator type.
27285func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator {
27286	return PrivateEndpointConnectionListResultIterator{page: page}
27287}
27288
27289// IsEmpty returns true if the ListResult contains no values.
27290func (peclr PrivateEndpointConnectionListResult) IsEmpty() bool {
27291	return peclr.Value == nil || len(*peclr.Value) == 0
27292}
27293
27294// hasNextLink returns true if the NextLink is not empty.
27295func (peclr PrivateEndpointConnectionListResult) hasNextLink() bool {
27296	return peclr.NextLink != nil && len(*peclr.NextLink) != 0
27297}
27298
27299// privateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results.
27300// It returns nil if no more results exist.
27301func (peclr PrivateEndpointConnectionListResult) privateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
27302	if !peclr.hasNextLink() {
27303		return nil, nil
27304	}
27305	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27306		autorest.AsJSON(),
27307		autorest.AsGet(),
27308		autorest.WithBaseURL(to.String(peclr.NextLink)))
27309}
27310
27311// PrivateEndpointConnectionListResultPage contains a page of PrivateEndpointConnection values.
27312type PrivateEndpointConnectionListResultPage struct {
27313	fn    func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)
27314	peclr PrivateEndpointConnectionListResult
27315}
27316
27317// NextWithContext advances to the next page of values.  If there was an error making
27318// the request the page does not advance and the error is returned.
27319func (page *PrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
27320	if tracing.IsEnabled() {
27321		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultPage.NextWithContext")
27322		defer func() {
27323			sc := -1
27324			if page.Response().Response.Response != nil {
27325				sc = page.Response().Response.Response.StatusCode
27326			}
27327			tracing.EndSpan(ctx, sc, err)
27328		}()
27329	}
27330	for {
27331		next, err := page.fn(ctx, page.peclr)
27332		if err != nil {
27333			return err
27334		}
27335		page.peclr = next
27336		if !next.hasNextLink() || !next.IsEmpty() {
27337			break
27338		}
27339	}
27340	return nil
27341}
27342
27343// Next advances to the next page of values.  If there was an error making
27344// the request the page does not advance and the error is returned.
27345// Deprecated: Use NextWithContext() instead.
27346func (page *PrivateEndpointConnectionListResultPage) Next() error {
27347	return page.NextWithContext(context.Background())
27348}
27349
27350// NotDone returns true if the page enumeration should be started or is not yet complete.
27351func (page PrivateEndpointConnectionListResultPage) NotDone() bool {
27352	return !page.peclr.IsEmpty()
27353}
27354
27355// Response returns the raw server response from the last page request.
27356func (page PrivateEndpointConnectionListResultPage) Response() PrivateEndpointConnectionListResult {
27357	return page.peclr
27358}
27359
27360// Values returns the slice of values for the current page or nil if there are no values.
27361func (page PrivateEndpointConnectionListResultPage) Values() []PrivateEndpointConnection {
27362	if page.peclr.IsEmpty() {
27363		return nil
27364	}
27365	return *page.peclr.Value
27366}
27367
27368// Creates a new instance of the PrivateEndpointConnectionListResultPage type.
27369func NewPrivateEndpointConnectionListResultPage(cur PrivateEndpointConnectionListResult, getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage {
27370	return PrivateEndpointConnectionListResultPage{
27371		fn:    getNextPage,
27372		peclr: cur,
27373	}
27374}
27375
27376// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
27377type PrivateEndpointConnectionProperties struct {
27378	// PrivateEndpoint - READ-ONLY; The resource of private end point.
27379	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
27380	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
27381	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
27382	// ProvisioningState - READ-ONLY; The provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
27383	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27384	// LinkIdentifier - READ-ONLY; The consumer link id.
27385	LinkIdentifier *string `json:"linkIdentifier,omitempty"`
27386}
27387
27388// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties.
27389func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) {
27390	objectMap := make(map[string]interface{})
27391	if pecp.PrivateLinkServiceConnectionState != nil {
27392		objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState
27393	}
27394	return json.Marshal(objectMap)
27395}
27396
27397// PrivateEndpointListResult response for the ListPrivateEndpoints API service call.
27398type PrivateEndpointListResult struct {
27399	autorest.Response `json:"-"`
27400	// Value - A list of private endpoint resources in a resource group.
27401	Value *[]PrivateEndpoint `json:"value,omitempty"`
27402	// NextLink - READ-ONLY; The URL to get the next set of results.
27403	NextLink *string `json:"nextLink,omitempty"`
27404}
27405
27406// MarshalJSON is the custom marshaler for PrivateEndpointListResult.
27407func (pelr PrivateEndpointListResult) MarshalJSON() ([]byte, error) {
27408	objectMap := make(map[string]interface{})
27409	if pelr.Value != nil {
27410		objectMap["value"] = pelr.Value
27411	}
27412	return json.Marshal(objectMap)
27413}
27414
27415// PrivateEndpointListResultIterator provides access to a complete listing of PrivateEndpoint values.
27416type PrivateEndpointListResultIterator struct {
27417	i    int
27418	page PrivateEndpointListResultPage
27419}
27420
27421// NextWithContext advances to the next value.  If there was an error making
27422// the request the iterator does not advance and the error is returned.
27423func (iter *PrivateEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
27424	if tracing.IsEnabled() {
27425		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultIterator.NextWithContext")
27426		defer func() {
27427			sc := -1
27428			if iter.Response().Response.Response != nil {
27429				sc = iter.Response().Response.Response.StatusCode
27430			}
27431			tracing.EndSpan(ctx, sc, err)
27432		}()
27433	}
27434	iter.i++
27435	if iter.i < len(iter.page.Values()) {
27436		return nil
27437	}
27438	err = iter.page.NextWithContext(ctx)
27439	if err != nil {
27440		iter.i--
27441		return err
27442	}
27443	iter.i = 0
27444	return nil
27445}
27446
27447// Next advances to the next value.  If there was an error making
27448// the request the iterator does not advance and the error is returned.
27449// Deprecated: Use NextWithContext() instead.
27450func (iter *PrivateEndpointListResultIterator) Next() error {
27451	return iter.NextWithContext(context.Background())
27452}
27453
27454// NotDone returns true if the enumeration should be started or is not yet complete.
27455func (iter PrivateEndpointListResultIterator) NotDone() bool {
27456	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27457}
27458
27459// Response returns the raw server response from the last page request.
27460func (iter PrivateEndpointListResultIterator) Response() PrivateEndpointListResult {
27461	return iter.page.Response()
27462}
27463
27464// Value returns the current value or a zero-initialized value if the
27465// iterator has advanced beyond the end of the collection.
27466func (iter PrivateEndpointListResultIterator) Value() PrivateEndpoint {
27467	if !iter.page.NotDone() {
27468		return PrivateEndpoint{}
27469	}
27470	return iter.page.Values()[iter.i]
27471}
27472
27473// Creates a new instance of the PrivateEndpointListResultIterator type.
27474func NewPrivateEndpointListResultIterator(page PrivateEndpointListResultPage) PrivateEndpointListResultIterator {
27475	return PrivateEndpointListResultIterator{page: page}
27476}
27477
27478// IsEmpty returns true if the ListResult contains no values.
27479func (pelr PrivateEndpointListResult) IsEmpty() bool {
27480	return pelr.Value == nil || len(*pelr.Value) == 0
27481}
27482
27483// hasNextLink returns true if the NextLink is not empty.
27484func (pelr PrivateEndpointListResult) hasNextLink() bool {
27485	return pelr.NextLink != nil && len(*pelr.NextLink) != 0
27486}
27487
27488// privateEndpointListResultPreparer prepares a request to retrieve the next set of results.
27489// It returns nil if no more results exist.
27490func (pelr PrivateEndpointListResult) privateEndpointListResultPreparer(ctx context.Context) (*http.Request, error) {
27491	if !pelr.hasNextLink() {
27492		return nil, nil
27493	}
27494	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27495		autorest.AsJSON(),
27496		autorest.AsGet(),
27497		autorest.WithBaseURL(to.String(pelr.NextLink)))
27498}
27499
27500// PrivateEndpointListResultPage contains a page of PrivateEndpoint values.
27501type PrivateEndpointListResultPage struct {
27502	fn   func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)
27503	pelr PrivateEndpointListResult
27504}
27505
27506// NextWithContext advances to the next page of values.  If there was an error making
27507// the request the page does not advance and the error is returned.
27508func (page *PrivateEndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
27509	if tracing.IsEnabled() {
27510		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultPage.NextWithContext")
27511		defer func() {
27512			sc := -1
27513			if page.Response().Response.Response != nil {
27514				sc = page.Response().Response.Response.StatusCode
27515			}
27516			tracing.EndSpan(ctx, sc, err)
27517		}()
27518	}
27519	for {
27520		next, err := page.fn(ctx, page.pelr)
27521		if err != nil {
27522			return err
27523		}
27524		page.pelr = next
27525		if !next.hasNextLink() || !next.IsEmpty() {
27526			break
27527		}
27528	}
27529	return nil
27530}
27531
27532// Next advances to the next page of values.  If there was an error making
27533// the request the page does not advance and the error is returned.
27534// Deprecated: Use NextWithContext() instead.
27535func (page *PrivateEndpointListResultPage) Next() error {
27536	return page.NextWithContext(context.Background())
27537}
27538
27539// NotDone returns true if the page enumeration should be started or is not yet complete.
27540func (page PrivateEndpointListResultPage) NotDone() bool {
27541	return !page.pelr.IsEmpty()
27542}
27543
27544// Response returns the raw server response from the last page request.
27545func (page PrivateEndpointListResultPage) Response() PrivateEndpointListResult {
27546	return page.pelr
27547}
27548
27549// Values returns the slice of values for the current page or nil if there are no values.
27550func (page PrivateEndpointListResultPage) Values() []PrivateEndpoint {
27551	if page.pelr.IsEmpty() {
27552		return nil
27553	}
27554	return *page.pelr.Value
27555}
27556
27557// Creates a new instance of the PrivateEndpointListResultPage type.
27558func NewPrivateEndpointListResultPage(cur PrivateEndpointListResult, getNextPage func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)) PrivateEndpointListResultPage {
27559	return PrivateEndpointListResultPage{
27560		fn:   getNextPage,
27561		pelr: cur,
27562	}
27563}
27564
27565// PrivateEndpointProperties properties of the private endpoint.
27566type PrivateEndpointProperties struct {
27567	// Subnet - The ID of the subnet from which the private IP will be allocated.
27568	Subnet *Subnet `json:"subnet,omitempty"`
27569	// NetworkInterfaces - READ-ONLY; An array of references to the network interfaces created for this private endpoint.
27570	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
27571	// ProvisioningState - READ-ONLY; The provisioning state of the private endpoint resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
27572	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27573	// PrivateLinkServiceConnections - A grouping of information about the connection to the remote resource.
27574	PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"`
27575	// 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.
27576	ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"`
27577	// CustomDNSConfigs - An array of custom dns configurations.
27578	CustomDNSConfigs *[]CustomDNSConfigPropertiesFormat `json:"customDnsConfigs,omitempty"`
27579}
27580
27581// MarshalJSON is the custom marshaler for PrivateEndpointProperties.
27582func (pep PrivateEndpointProperties) MarshalJSON() ([]byte, error) {
27583	objectMap := make(map[string]interface{})
27584	if pep.Subnet != nil {
27585		objectMap["subnet"] = pep.Subnet
27586	}
27587	if pep.PrivateLinkServiceConnections != nil {
27588		objectMap["privateLinkServiceConnections"] = pep.PrivateLinkServiceConnections
27589	}
27590	if pep.ManualPrivateLinkServiceConnections != nil {
27591		objectMap["manualPrivateLinkServiceConnections"] = pep.ManualPrivateLinkServiceConnections
27592	}
27593	if pep.CustomDNSConfigs != nil {
27594		objectMap["customDnsConfigs"] = pep.CustomDNSConfigs
27595	}
27596	return json.Marshal(objectMap)
27597}
27598
27599// PrivateEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
27600// long-running operation.
27601type PrivateEndpointsCreateOrUpdateFuture struct {
27602	azure.FutureAPI
27603	// Result returns the result of the asynchronous operation.
27604	// If the operation has not completed it will return an error.
27605	Result func(PrivateEndpointsClient) (PrivateEndpoint, error)
27606}
27607
27608// PrivateEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
27609// operation.
27610type PrivateEndpointsDeleteFuture struct {
27611	azure.FutureAPI
27612	// Result returns the result of the asynchronous operation.
27613	// If the operation has not completed it will return an error.
27614	Result func(PrivateEndpointsClient) (autorest.Response, error)
27615}
27616
27617// PrivateLinkService private link service resource.
27618type PrivateLinkService struct {
27619	autorest.Response `json:"-"`
27620	// ExtendedLocation - The extended location of the load balancer.
27621	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
27622	// PrivateLinkServiceProperties - Properties of the private link service.
27623	*PrivateLinkServiceProperties `json:"properties,omitempty"`
27624	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
27625	Etag *string `json:"etag,omitempty"`
27626	// ID - Resource ID.
27627	ID *string `json:"id,omitempty"`
27628	// Name - READ-ONLY; Resource name.
27629	Name *string `json:"name,omitempty"`
27630	// Type - READ-ONLY; Resource type.
27631	Type *string `json:"type,omitempty"`
27632	// Location - Resource location.
27633	Location *string `json:"location,omitempty"`
27634	// Tags - Resource tags.
27635	Tags map[string]*string `json:"tags"`
27636}
27637
27638// MarshalJSON is the custom marshaler for PrivateLinkService.
27639func (pls PrivateLinkService) MarshalJSON() ([]byte, error) {
27640	objectMap := make(map[string]interface{})
27641	if pls.ExtendedLocation != nil {
27642		objectMap["extendedLocation"] = pls.ExtendedLocation
27643	}
27644	if pls.PrivateLinkServiceProperties != nil {
27645		objectMap["properties"] = pls.PrivateLinkServiceProperties
27646	}
27647	if pls.ID != nil {
27648		objectMap["id"] = pls.ID
27649	}
27650	if pls.Location != nil {
27651		objectMap["location"] = pls.Location
27652	}
27653	if pls.Tags != nil {
27654		objectMap["tags"] = pls.Tags
27655	}
27656	return json.Marshal(objectMap)
27657}
27658
27659// UnmarshalJSON is the custom unmarshaler for PrivateLinkService struct.
27660func (pls *PrivateLinkService) UnmarshalJSON(body []byte) error {
27661	var m map[string]*json.RawMessage
27662	err := json.Unmarshal(body, &m)
27663	if err != nil {
27664		return err
27665	}
27666	for k, v := range m {
27667		switch k {
27668		case "extendedLocation":
27669			if v != nil {
27670				var extendedLocation ExtendedLocation
27671				err = json.Unmarshal(*v, &extendedLocation)
27672				if err != nil {
27673					return err
27674				}
27675				pls.ExtendedLocation = &extendedLocation
27676			}
27677		case "properties":
27678			if v != nil {
27679				var privateLinkServiceProperties PrivateLinkServiceProperties
27680				err = json.Unmarshal(*v, &privateLinkServiceProperties)
27681				if err != nil {
27682					return err
27683				}
27684				pls.PrivateLinkServiceProperties = &privateLinkServiceProperties
27685			}
27686		case "etag":
27687			if v != nil {
27688				var etag string
27689				err = json.Unmarshal(*v, &etag)
27690				if err != nil {
27691					return err
27692				}
27693				pls.Etag = &etag
27694			}
27695		case "id":
27696			if v != nil {
27697				var ID string
27698				err = json.Unmarshal(*v, &ID)
27699				if err != nil {
27700					return err
27701				}
27702				pls.ID = &ID
27703			}
27704		case "name":
27705			if v != nil {
27706				var name string
27707				err = json.Unmarshal(*v, &name)
27708				if err != nil {
27709					return err
27710				}
27711				pls.Name = &name
27712			}
27713		case "type":
27714			if v != nil {
27715				var typeVar string
27716				err = json.Unmarshal(*v, &typeVar)
27717				if err != nil {
27718					return err
27719				}
27720				pls.Type = &typeVar
27721			}
27722		case "location":
27723			if v != nil {
27724				var location string
27725				err = json.Unmarshal(*v, &location)
27726				if err != nil {
27727					return err
27728				}
27729				pls.Location = &location
27730			}
27731		case "tags":
27732			if v != nil {
27733				var tags map[string]*string
27734				err = json.Unmarshal(*v, &tags)
27735				if err != nil {
27736					return err
27737				}
27738				pls.Tags = tags
27739			}
27740		}
27741	}
27742
27743	return nil
27744}
27745
27746// PrivateLinkServiceConnection privateLinkServiceConnection resource.
27747type PrivateLinkServiceConnection struct {
27748	// PrivateLinkServiceConnectionProperties - Properties of the private link service connection.
27749	*PrivateLinkServiceConnectionProperties `json:"properties,omitempty"`
27750	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
27751	Name *string `json:"name,omitempty"`
27752	// Type - READ-ONLY; The resource type.
27753	Type *string `json:"type,omitempty"`
27754	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
27755	Etag *string `json:"etag,omitempty"`
27756	// ID - Resource ID.
27757	ID *string `json:"id,omitempty"`
27758}
27759
27760// MarshalJSON is the custom marshaler for PrivateLinkServiceConnection.
27761func (plsc PrivateLinkServiceConnection) MarshalJSON() ([]byte, error) {
27762	objectMap := make(map[string]interface{})
27763	if plsc.PrivateLinkServiceConnectionProperties != nil {
27764		objectMap["properties"] = plsc.PrivateLinkServiceConnectionProperties
27765	}
27766	if plsc.Name != nil {
27767		objectMap["name"] = plsc.Name
27768	}
27769	if plsc.ID != nil {
27770		objectMap["id"] = plsc.ID
27771	}
27772	return json.Marshal(objectMap)
27773}
27774
27775// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceConnection struct.
27776func (plsc *PrivateLinkServiceConnection) UnmarshalJSON(body []byte) error {
27777	var m map[string]*json.RawMessage
27778	err := json.Unmarshal(body, &m)
27779	if err != nil {
27780		return err
27781	}
27782	for k, v := range m {
27783		switch k {
27784		case "properties":
27785			if v != nil {
27786				var privateLinkServiceConnectionProperties PrivateLinkServiceConnectionProperties
27787				err = json.Unmarshal(*v, &privateLinkServiceConnectionProperties)
27788				if err != nil {
27789					return err
27790				}
27791				plsc.PrivateLinkServiceConnectionProperties = &privateLinkServiceConnectionProperties
27792			}
27793		case "name":
27794			if v != nil {
27795				var name string
27796				err = json.Unmarshal(*v, &name)
27797				if err != nil {
27798					return err
27799				}
27800				plsc.Name = &name
27801			}
27802		case "type":
27803			if v != nil {
27804				var typeVar string
27805				err = json.Unmarshal(*v, &typeVar)
27806				if err != nil {
27807					return err
27808				}
27809				plsc.Type = &typeVar
27810			}
27811		case "etag":
27812			if v != nil {
27813				var etag string
27814				err = json.Unmarshal(*v, &etag)
27815				if err != nil {
27816					return err
27817				}
27818				plsc.Etag = &etag
27819			}
27820		case "id":
27821			if v != nil {
27822				var ID string
27823				err = json.Unmarshal(*v, &ID)
27824				if err != nil {
27825					return err
27826				}
27827				plsc.ID = &ID
27828			}
27829		}
27830	}
27831
27832	return nil
27833}
27834
27835// PrivateLinkServiceConnectionProperties properties of the PrivateLinkServiceConnection.
27836type PrivateLinkServiceConnectionProperties struct {
27837	// ProvisioningState - READ-ONLY; The provisioning state of the private link service connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
27838	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27839	// PrivateLinkServiceID - The resource id of private link service.
27840	PrivateLinkServiceID *string `json:"privateLinkServiceId,omitempty"`
27841	// GroupIds - The ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to.
27842	GroupIds *[]string `json:"groupIds,omitempty"`
27843	// RequestMessage - A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars.
27844	RequestMessage *string `json:"requestMessage,omitempty"`
27845	// PrivateLinkServiceConnectionState - A collection of read-only information about the state of the connection to the remote resource.
27846	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
27847}
27848
27849// MarshalJSON is the custom marshaler for PrivateLinkServiceConnectionProperties.
27850func (plscp PrivateLinkServiceConnectionProperties) MarshalJSON() ([]byte, error) {
27851	objectMap := make(map[string]interface{})
27852	if plscp.PrivateLinkServiceID != nil {
27853		objectMap["privateLinkServiceId"] = plscp.PrivateLinkServiceID
27854	}
27855	if plscp.GroupIds != nil {
27856		objectMap["groupIds"] = plscp.GroupIds
27857	}
27858	if plscp.RequestMessage != nil {
27859		objectMap["requestMessage"] = plscp.RequestMessage
27860	}
27861	if plscp.PrivateLinkServiceConnectionState != nil {
27862		objectMap["privateLinkServiceConnectionState"] = plscp.PrivateLinkServiceConnectionState
27863	}
27864	return json.Marshal(objectMap)
27865}
27866
27867// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
27868// service consumer and provider.
27869type PrivateLinkServiceConnectionState struct {
27870	// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
27871	Status *string `json:"status,omitempty"`
27872	// Description - The reason for approval/rejection of the connection.
27873	Description *string `json:"description,omitempty"`
27874	// ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
27875	ActionsRequired *string `json:"actionsRequired,omitempty"`
27876}
27877
27878// PrivateLinkServiceIPConfiguration the private link service ip configuration.
27879type PrivateLinkServiceIPConfiguration struct {
27880	// PrivateLinkServiceIPConfigurationProperties - Properties of the private link service ip configuration.
27881	*PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"`
27882	// Name - The name of private link service ip configuration.
27883	Name *string `json:"name,omitempty"`
27884	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
27885	Etag *string `json:"etag,omitempty"`
27886	// Type - READ-ONLY; The resource type.
27887	Type *string `json:"type,omitempty"`
27888	// ID - Resource ID.
27889	ID *string `json:"id,omitempty"`
27890}
27891
27892// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfiguration.
27893func (plsic PrivateLinkServiceIPConfiguration) MarshalJSON() ([]byte, error) {
27894	objectMap := make(map[string]interface{})
27895	if plsic.PrivateLinkServiceIPConfigurationProperties != nil {
27896		objectMap["properties"] = plsic.PrivateLinkServiceIPConfigurationProperties
27897	}
27898	if plsic.Name != nil {
27899		objectMap["name"] = plsic.Name
27900	}
27901	if plsic.ID != nil {
27902		objectMap["id"] = plsic.ID
27903	}
27904	return json.Marshal(objectMap)
27905}
27906
27907// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceIPConfiguration struct.
27908func (plsic *PrivateLinkServiceIPConfiguration) UnmarshalJSON(body []byte) error {
27909	var m map[string]*json.RawMessage
27910	err := json.Unmarshal(body, &m)
27911	if err != nil {
27912		return err
27913	}
27914	for k, v := range m {
27915		switch k {
27916		case "properties":
27917			if v != nil {
27918				var privateLinkServiceIPConfigurationProperties PrivateLinkServiceIPConfigurationProperties
27919				err = json.Unmarshal(*v, &privateLinkServiceIPConfigurationProperties)
27920				if err != nil {
27921					return err
27922				}
27923				plsic.PrivateLinkServiceIPConfigurationProperties = &privateLinkServiceIPConfigurationProperties
27924			}
27925		case "name":
27926			if v != nil {
27927				var name string
27928				err = json.Unmarshal(*v, &name)
27929				if err != nil {
27930					return err
27931				}
27932				plsic.Name = &name
27933			}
27934		case "etag":
27935			if v != nil {
27936				var etag string
27937				err = json.Unmarshal(*v, &etag)
27938				if err != nil {
27939					return err
27940				}
27941				plsic.Etag = &etag
27942			}
27943		case "type":
27944			if v != nil {
27945				var typeVar string
27946				err = json.Unmarshal(*v, &typeVar)
27947				if err != nil {
27948					return err
27949				}
27950				plsic.Type = &typeVar
27951			}
27952		case "id":
27953			if v != nil {
27954				var ID string
27955				err = json.Unmarshal(*v, &ID)
27956				if err != nil {
27957					return err
27958				}
27959				plsic.ID = &ID
27960			}
27961		}
27962	}
27963
27964	return nil
27965}
27966
27967// PrivateLinkServiceIPConfigurationProperties properties of private link service IP configuration.
27968type PrivateLinkServiceIPConfigurationProperties struct {
27969	// PrivateIPAddress - The private IP address of the IP configuration.
27970	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
27971	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
27972	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
27973	// Subnet - The reference to the subnet resource.
27974	Subnet *Subnet `json:"subnet,omitempty"`
27975	// Primary - Whether the ip configuration is primary or not.
27976	Primary *bool `json:"primary,omitempty"`
27977	// ProvisioningState - READ-ONLY; The provisioning state of the private link service IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
27978	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27979	// PrivateIPAddressVersion - Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPv4', 'IPv6'
27980	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
27981}
27982
27983// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfigurationProperties.
27984func (plsicp PrivateLinkServiceIPConfigurationProperties) MarshalJSON() ([]byte, error) {
27985	objectMap := make(map[string]interface{})
27986	if plsicp.PrivateIPAddress != nil {
27987		objectMap["privateIPAddress"] = plsicp.PrivateIPAddress
27988	}
27989	if plsicp.PrivateIPAllocationMethod != "" {
27990		objectMap["privateIPAllocationMethod"] = plsicp.PrivateIPAllocationMethod
27991	}
27992	if plsicp.Subnet != nil {
27993		objectMap["subnet"] = plsicp.Subnet
27994	}
27995	if plsicp.Primary != nil {
27996		objectMap["primary"] = plsicp.Primary
27997	}
27998	if plsicp.PrivateIPAddressVersion != "" {
27999		objectMap["privateIPAddressVersion"] = plsicp.PrivateIPAddressVersion
28000	}
28001	return json.Marshal(objectMap)
28002}
28003
28004// PrivateLinkServiceListResult response for the ListPrivateLinkService API service call.
28005type PrivateLinkServiceListResult struct {
28006	autorest.Response `json:"-"`
28007	// Value - A list of PrivateLinkService resources in a resource group.
28008	Value *[]PrivateLinkService `json:"value,omitempty"`
28009	// NextLink - READ-ONLY; The URL to get the next set of results.
28010	NextLink *string `json:"nextLink,omitempty"`
28011}
28012
28013// MarshalJSON is the custom marshaler for PrivateLinkServiceListResult.
28014func (plslr PrivateLinkServiceListResult) MarshalJSON() ([]byte, error) {
28015	objectMap := make(map[string]interface{})
28016	if plslr.Value != nil {
28017		objectMap["value"] = plslr.Value
28018	}
28019	return json.Marshal(objectMap)
28020}
28021
28022// PrivateLinkServiceListResultIterator provides access to a complete listing of PrivateLinkService values.
28023type PrivateLinkServiceListResultIterator struct {
28024	i    int
28025	page PrivateLinkServiceListResultPage
28026}
28027
28028// NextWithContext advances to the next value.  If there was an error making
28029// the request the iterator does not advance and the error is returned.
28030func (iter *PrivateLinkServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
28031	if tracing.IsEnabled() {
28032		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultIterator.NextWithContext")
28033		defer func() {
28034			sc := -1
28035			if iter.Response().Response.Response != nil {
28036				sc = iter.Response().Response.Response.StatusCode
28037			}
28038			tracing.EndSpan(ctx, sc, err)
28039		}()
28040	}
28041	iter.i++
28042	if iter.i < len(iter.page.Values()) {
28043		return nil
28044	}
28045	err = iter.page.NextWithContext(ctx)
28046	if err != nil {
28047		iter.i--
28048		return err
28049	}
28050	iter.i = 0
28051	return nil
28052}
28053
28054// Next advances to the next value.  If there was an error making
28055// the request the iterator does not advance and the error is returned.
28056// Deprecated: Use NextWithContext() instead.
28057func (iter *PrivateLinkServiceListResultIterator) Next() error {
28058	return iter.NextWithContext(context.Background())
28059}
28060
28061// NotDone returns true if the enumeration should be started or is not yet complete.
28062func (iter PrivateLinkServiceListResultIterator) NotDone() bool {
28063	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28064}
28065
28066// Response returns the raw server response from the last page request.
28067func (iter PrivateLinkServiceListResultIterator) Response() PrivateLinkServiceListResult {
28068	return iter.page.Response()
28069}
28070
28071// Value returns the current value or a zero-initialized value if the
28072// iterator has advanced beyond the end of the collection.
28073func (iter PrivateLinkServiceListResultIterator) Value() PrivateLinkService {
28074	if !iter.page.NotDone() {
28075		return PrivateLinkService{}
28076	}
28077	return iter.page.Values()[iter.i]
28078}
28079
28080// Creates a new instance of the PrivateLinkServiceListResultIterator type.
28081func NewPrivateLinkServiceListResultIterator(page PrivateLinkServiceListResultPage) PrivateLinkServiceListResultIterator {
28082	return PrivateLinkServiceListResultIterator{page: page}
28083}
28084
28085// IsEmpty returns true if the ListResult contains no values.
28086func (plslr PrivateLinkServiceListResult) IsEmpty() bool {
28087	return plslr.Value == nil || len(*plslr.Value) == 0
28088}
28089
28090// hasNextLink returns true if the NextLink is not empty.
28091func (plslr PrivateLinkServiceListResult) hasNextLink() bool {
28092	return plslr.NextLink != nil && len(*plslr.NextLink) != 0
28093}
28094
28095// privateLinkServiceListResultPreparer prepares a request to retrieve the next set of results.
28096// It returns nil if no more results exist.
28097func (plslr PrivateLinkServiceListResult) privateLinkServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
28098	if !plslr.hasNextLink() {
28099		return nil, nil
28100	}
28101	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28102		autorest.AsJSON(),
28103		autorest.AsGet(),
28104		autorest.WithBaseURL(to.String(plslr.NextLink)))
28105}
28106
28107// PrivateLinkServiceListResultPage contains a page of PrivateLinkService values.
28108type PrivateLinkServiceListResultPage struct {
28109	fn    func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)
28110	plslr PrivateLinkServiceListResult
28111}
28112
28113// NextWithContext advances to the next page of values.  If there was an error making
28114// the request the page does not advance and the error is returned.
28115func (page *PrivateLinkServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
28116	if tracing.IsEnabled() {
28117		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultPage.NextWithContext")
28118		defer func() {
28119			sc := -1
28120			if page.Response().Response.Response != nil {
28121				sc = page.Response().Response.Response.StatusCode
28122			}
28123			tracing.EndSpan(ctx, sc, err)
28124		}()
28125	}
28126	for {
28127		next, err := page.fn(ctx, page.plslr)
28128		if err != nil {
28129			return err
28130		}
28131		page.plslr = next
28132		if !next.hasNextLink() || !next.IsEmpty() {
28133			break
28134		}
28135	}
28136	return nil
28137}
28138
28139// Next advances to the next page of values.  If there was an error making
28140// the request the page does not advance and the error is returned.
28141// Deprecated: Use NextWithContext() instead.
28142func (page *PrivateLinkServiceListResultPage) Next() error {
28143	return page.NextWithContext(context.Background())
28144}
28145
28146// NotDone returns true if the page enumeration should be started or is not yet complete.
28147func (page PrivateLinkServiceListResultPage) NotDone() bool {
28148	return !page.plslr.IsEmpty()
28149}
28150
28151// Response returns the raw server response from the last page request.
28152func (page PrivateLinkServiceListResultPage) Response() PrivateLinkServiceListResult {
28153	return page.plslr
28154}
28155
28156// Values returns the slice of values for the current page or nil if there are no values.
28157func (page PrivateLinkServiceListResultPage) Values() []PrivateLinkService {
28158	if page.plslr.IsEmpty() {
28159		return nil
28160	}
28161	return *page.plslr.Value
28162}
28163
28164// Creates a new instance of the PrivateLinkServiceListResultPage type.
28165func NewPrivateLinkServiceListResultPage(cur PrivateLinkServiceListResult, getNextPage func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)) PrivateLinkServiceListResultPage {
28166	return PrivateLinkServiceListResultPage{
28167		fn:    getNextPage,
28168		plslr: cur,
28169	}
28170}
28171
28172// PrivateLinkServiceProperties properties of the private link service.
28173type PrivateLinkServiceProperties struct {
28174	// LoadBalancerFrontendIPConfigurations - An array of references to the load balancer IP configurations.
28175	LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"`
28176	// IPConfigurations - An array of private link service IP configurations.
28177	IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"`
28178	// NetworkInterfaces - READ-ONLY; An array of references to the network interfaces created for this private link service.
28179	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
28180	// ProvisioningState - READ-ONLY; The provisioning state of the private link service resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
28181	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28182	// PrivateEndpointConnections - READ-ONLY; An array of list about connections to the private endpoint.
28183	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
28184	// Visibility - The visibility list of the private link service.
28185	Visibility *PrivateLinkServicePropertiesVisibility `json:"visibility,omitempty"`
28186	// AutoApproval - The auto-approval list of the private link service.
28187	AutoApproval *PrivateLinkServicePropertiesAutoApproval `json:"autoApproval,omitempty"`
28188	// Fqdns - The list of Fqdn.
28189	Fqdns *[]string `json:"fqdns,omitempty"`
28190	// Alias - READ-ONLY; The alias of the private link service.
28191	Alias *string `json:"alias,omitempty"`
28192	// EnableProxyProtocol - Whether the private link service is enabled for proxy protocol or not.
28193	EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"`
28194}
28195
28196// MarshalJSON is the custom marshaler for PrivateLinkServiceProperties.
28197func (plsp PrivateLinkServiceProperties) MarshalJSON() ([]byte, error) {
28198	objectMap := make(map[string]interface{})
28199	if plsp.LoadBalancerFrontendIPConfigurations != nil {
28200		objectMap["loadBalancerFrontendIpConfigurations"] = plsp.LoadBalancerFrontendIPConfigurations
28201	}
28202	if plsp.IPConfigurations != nil {
28203		objectMap["ipConfigurations"] = plsp.IPConfigurations
28204	}
28205	if plsp.Visibility != nil {
28206		objectMap["visibility"] = plsp.Visibility
28207	}
28208	if plsp.AutoApproval != nil {
28209		objectMap["autoApproval"] = plsp.AutoApproval
28210	}
28211	if plsp.Fqdns != nil {
28212		objectMap["fqdns"] = plsp.Fqdns
28213	}
28214	if plsp.EnableProxyProtocol != nil {
28215		objectMap["enableProxyProtocol"] = plsp.EnableProxyProtocol
28216	}
28217	return json.Marshal(objectMap)
28218}
28219
28220// PrivateLinkServicePropertiesAutoApproval the auto-approval list of the private link service.
28221type PrivateLinkServicePropertiesAutoApproval struct {
28222	// Subscriptions - The list of subscriptions.
28223	Subscriptions *[]string `json:"subscriptions,omitempty"`
28224}
28225
28226// PrivateLinkServicePropertiesVisibility the visibility list of the private link service.
28227type PrivateLinkServicePropertiesVisibility struct {
28228	// Subscriptions - The list of subscriptions.
28229	Subscriptions *[]string `json:"subscriptions,omitempty"`
28230}
28231
28232// PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture an abstraction for monitoring
28233// and retrieving the results of a long-running operation.
28234type PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture struct {
28235	azure.FutureAPI
28236	// Result returns the result of the asynchronous operation.
28237	// If the operation has not completed it will return an error.
28238	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
28239}
28240
28241// PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture an abstraction for monitoring and retrieving
28242// the results of a long-running operation.
28243type PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture struct {
28244	azure.FutureAPI
28245	// Result returns the result of the asynchronous operation.
28246	// If the operation has not completed it will return an error.
28247	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
28248}
28249
28250// PrivateLinkServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28251// long-running operation.
28252type PrivateLinkServicesCreateOrUpdateFuture struct {
28253	azure.FutureAPI
28254	// Result returns the result of the asynchronous operation.
28255	// If the operation has not completed it will return an error.
28256	Result func(PrivateLinkServicesClient) (PrivateLinkService, error)
28257}
28258
28259// PrivateLinkServicesDeleteFuture an abstraction for monitoring and retrieving the results of a
28260// long-running operation.
28261type PrivateLinkServicesDeleteFuture struct {
28262	azure.FutureAPI
28263	// Result returns the result of the asynchronous operation.
28264	// If the operation has not completed it will return an error.
28265	Result func(PrivateLinkServicesClient) (autorest.Response, error)
28266}
28267
28268// PrivateLinkServicesDeletePrivateEndpointConnectionFuture an abstraction for monitoring and retrieving
28269// the results of a long-running operation.
28270type PrivateLinkServicesDeletePrivateEndpointConnectionFuture struct {
28271	azure.FutureAPI
28272	// Result returns the result of the asynchronous operation.
28273	// If the operation has not completed it will return an error.
28274	Result func(PrivateLinkServicesClient) (autorest.Response, error)
28275}
28276
28277// PrivateLinkServiceVisibility response for the CheckPrivateLinkServiceVisibility API service call.
28278type PrivateLinkServiceVisibility struct {
28279	autorest.Response `json:"-"`
28280	// Visible - Private Link Service Visibility (True/False).
28281	Visible *bool `json:"visible,omitempty"`
28282}
28283
28284// Probe a load balancer probe.
28285type Probe struct {
28286	autorest.Response `json:"-"`
28287	// ProbePropertiesFormat - Properties of load balancer probe.
28288	*ProbePropertiesFormat `json:"properties,omitempty"`
28289	// 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.
28290	Name *string `json:"name,omitempty"`
28291	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
28292	Etag *string `json:"etag,omitempty"`
28293	// Type - READ-ONLY; Type of the resource.
28294	Type *string `json:"type,omitempty"`
28295	// ID - Resource ID.
28296	ID *string `json:"id,omitempty"`
28297}
28298
28299// MarshalJSON is the custom marshaler for Probe.
28300func (p Probe) MarshalJSON() ([]byte, error) {
28301	objectMap := make(map[string]interface{})
28302	if p.ProbePropertiesFormat != nil {
28303		objectMap["properties"] = p.ProbePropertiesFormat
28304	}
28305	if p.Name != nil {
28306		objectMap["name"] = p.Name
28307	}
28308	if p.ID != nil {
28309		objectMap["id"] = p.ID
28310	}
28311	return json.Marshal(objectMap)
28312}
28313
28314// UnmarshalJSON is the custom unmarshaler for Probe struct.
28315func (p *Probe) UnmarshalJSON(body []byte) error {
28316	var m map[string]*json.RawMessage
28317	err := json.Unmarshal(body, &m)
28318	if err != nil {
28319		return err
28320	}
28321	for k, v := range m {
28322		switch k {
28323		case "properties":
28324			if v != nil {
28325				var probePropertiesFormat ProbePropertiesFormat
28326				err = json.Unmarshal(*v, &probePropertiesFormat)
28327				if err != nil {
28328					return err
28329				}
28330				p.ProbePropertiesFormat = &probePropertiesFormat
28331			}
28332		case "name":
28333			if v != nil {
28334				var name string
28335				err = json.Unmarshal(*v, &name)
28336				if err != nil {
28337					return err
28338				}
28339				p.Name = &name
28340			}
28341		case "etag":
28342			if v != nil {
28343				var etag string
28344				err = json.Unmarshal(*v, &etag)
28345				if err != nil {
28346					return err
28347				}
28348				p.Etag = &etag
28349			}
28350		case "type":
28351			if v != nil {
28352				var typeVar string
28353				err = json.Unmarshal(*v, &typeVar)
28354				if err != nil {
28355					return err
28356				}
28357				p.Type = &typeVar
28358			}
28359		case "id":
28360			if v != nil {
28361				var ID string
28362				err = json.Unmarshal(*v, &ID)
28363				if err != nil {
28364					return err
28365				}
28366				p.ID = &ID
28367			}
28368		}
28369	}
28370
28371	return nil
28372}
28373
28374// ProbePropertiesFormat load balancer probe resource.
28375type ProbePropertiesFormat struct {
28376	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
28377	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
28378	// 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'
28379	Protocol ProbeProtocol `json:"protocol,omitempty"`
28380	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
28381	Port *int32 `json:"port,omitempty"`
28382	// 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.
28383	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
28384	// 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.
28385	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
28386	// 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.
28387	RequestPath *string `json:"requestPath,omitempty"`
28388	// ProvisioningState - READ-ONLY; The provisioning state of the probe resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
28389	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28390}
28391
28392// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
28393func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
28394	objectMap := make(map[string]interface{})
28395	if ppf.Protocol != "" {
28396		objectMap["protocol"] = ppf.Protocol
28397	}
28398	if ppf.Port != nil {
28399		objectMap["port"] = ppf.Port
28400	}
28401	if ppf.IntervalInSeconds != nil {
28402		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
28403	}
28404	if ppf.NumberOfProbes != nil {
28405		objectMap["numberOfProbes"] = ppf.NumberOfProbes
28406	}
28407	if ppf.RequestPath != nil {
28408		objectMap["requestPath"] = ppf.RequestPath
28409	}
28410	return json.Marshal(objectMap)
28411}
28412
28413// Profile network profile resource.
28414type Profile struct {
28415	autorest.Response `json:"-"`
28416	// ProfilePropertiesFormat - Network profile properties.
28417	*ProfilePropertiesFormat `json:"properties,omitempty"`
28418	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
28419	Etag *string `json:"etag,omitempty"`
28420	// ID - Resource ID.
28421	ID *string `json:"id,omitempty"`
28422	// Name - READ-ONLY; Resource name.
28423	Name *string `json:"name,omitempty"`
28424	// Type - READ-ONLY; Resource type.
28425	Type *string `json:"type,omitempty"`
28426	// Location - Resource location.
28427	Location *string `json:"location,omitempty"`
28428	// Tags - Resource tags.
28429	Tags map[string]*string `json:"tags"`
28430}
28431
28432// MarshalJSON is the custom marshaler for Profile.
28433func (p Profile) MarshalJSON() ([]byte, error) {
28434	objectMap := make(map[string]interface{})
28435	if p.ProfilePropertiesFormat != nil {
28436		objectMap["properties"] = p.ProfilePropertiesFormat
28437	}
28438	if p.ID != nil {
28439		objectMap["id"] = p.ID
28440	}
28441	if p.Location != nil {
28442		objectMap["location"] = p.Location
28443	}
28444	if p.Tags != nil {
28445		objectMap["tags"] = p.Tags
28446	}
28447	return json.Marshal(objectMap)
28448}
28449
28450// UnmarshalJSON is the custom unmarshaler for Profile struct.
28451func (p *Profile) UnmarshalJSON(body []byte) error {
28452	var m map[string]*json.RawMessage
28453	err := json.Unmarshal(body, &m)
28454	if err != nil {
28455		return err
28456	}
28457	for k, v := range m {
28458		switch k {
28459		case "properties":
28460			if v != nil {
28461				var profilePropertiesFormat ProfilePropertiesFormat
28462				err = json.Unmarshal(*v, &profilePropertiesFormat)
28463				if err != nil {
28464					return err
28465				}
28466				p.ProfilePropertiesFormat = &profilePropertiesFormat
28467			}
28468		case "etag":
28469			if v != nil {
28470				var etag string
28471				err = json.Unmarshal(*v, &etag)
28472				if err != nil {
28473					return err
28474				}
28475				p.Etag = &etag
28476			}
28477		case "id":
28478			if v != nil {
28479				var ID string
28480				err = json.Unmarshal(*v, &ID)
28481				if err != nil {
28482					return err
28483				}
28484				p.ID = &ID
28485			}
28486		case "name":
28487			if v != nil {
28488				var name string
28489				err = json.Unmarshal(*v, &name)
28490				if err != nil {
28491					return err
28492				}
28493				p.Name = &name
28494			}
28495		case "type":
28496			if v != nil {
28497				var typeVar string
28498				err = json.Unmarshal(*v, &typeVar)
28499				if err != nil {
28500					return err
28501				}
28502				p.Type = &typeVar
28503			}
28504		case "location":
28505			if v != nil {
28506				var location string
28507				err = json.Unmarshal(*v, &location)
28508				if err != nil {
28509					return err
28510				}
28511				p.Location = &location
28512			}
28513		case "tags":
28514			if v != nil {
28515				var tags map[string]*string
28516				err = json.Unmarshal(*v, &tags)
28517				if err != nil {
28518					return err
28519				}
28520				p.Tags = tags
28521			}
28522		}
28523	}
28524
28525	return nil
28526}
28527
28528// ProfileListResult response for ListNetworkProfiles API service call.
28529type ProfileListResult struct {
28530	autorest.Response `json:"-"`
28531	// Value - A list of network profiles that exist in a resource group.
28532	Value *[]Profile `json:"value,omitempty"`
28533	// NextLink - The URL to get the next set of results.
28534	NextLink *string `json:"nextLink,omitempty"`
28535}
28536
28537// ProfileListResultIterator provides access to a complete listing of Profile values.
28538type ProfileListResultIterator struct {
28539	i    int
28540	page ProfileListResultPage
28541}
28542
28543// NextWithContext advances to the next value.  If there was an error making
28544// the request the iterator does not advance and the error is returned.
28545func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
28546	if tracing.IsEnabled() {
28547		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
28548		defer func() {
28549			sc := -1
28550			if iter.Response().Response.Response != nil {
28551				sc = iter.Response().Response.Response.StatusCode
28552			}
28553			tracing.EndSpan(ctx, sc, err)
28554		}()
28555	}
28556	iter.i++
28557	if iter.i < len(iter.page.Values()) {
28558		return nil
28559	}
28560	err = iter.page.NextWithContext(ctx)
28561	if err != nil {
28562		iter.i--
28563		return err
28564	}
28565	iter.i = 0
28566	return nil
28567}
28568
28569// Next advances to the next value.  If there was an error making
28570// the request the iterator does not advance and the error is returned.
28571// Deprecated: Use NextWithContext() instead.
28572func (iter *ProfileListResultIterator) Next() error {
28573	return iter.NextWithContext(context.Background())
28574}
28575
28576// NotDone returns true if the enumeration should be started or is not yet complete.
28577func (iter ProfileListResultIterator) NotDone() bool {
28578	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28579}
28580
28581// Response returns the raw server response from the last page request.
28582func (iter ProfileListResultIterator) Response() ProfileListResult {
28583	return iter.page.Response()
28584}
28585
28586// Value returns the current value or a zero-initialized value if the
28587// iterator has advanced beyond the end of the collection.
28588func (iter ProfileListResultIterator) Value() Profile {
28589	if !iter.page.NotDone() {
28590		return Profile{}
28591	}
28592	return iter.page.Values()[iter.i]
28593}
28594
28595// Creates a new instance of the ProfileListResultIterator type.
28596func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
28597	return ProfileListResultIterator{page: page}
28598}
28599
28600// IsEmpty returns true if the ListResult contains no values.
28601func (plr ProfileListResult) IsEmpty() bool {
28602	return plr.Value == nil || len(*plr.Value) == 0
28603}
28604
28605// hasNextLink returns true if the NextLink is not empty.
28606func (plr ProfileListResult) hasNextLink() bool {
28607	return plr.NextLink != nil && len(*plr.NextLink) != 0
28608}
28609
28610// profileListResultPreparer prepares a request to retrieve the next set of results.
28611// It returns nil if no more results exist.
28612func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
28613	if !plr.hasNextLink() {
28614		return nil, nil
28615	}
28616	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28617		autorest.AsJSON(),
28618		autorest.AsGet(),
28619		autorest.WithBaseURL(to.String(plr.NextLink)))
28620}
28621
28622// ProfileListResultPage contains a page of Profile values.
28623type ProfileListResultPage struct {
28624	fn  func(context.Context, ProfileListResult) (ProfileListResult, error)
28625	plr ProfileListResult
28626}
28627
28628// NextWithContext advances to the next page of values.  If there was an error making
28629// the request the page does not advance and the error is returned.
28630func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
28631	if tracing.IsEnabled() {
28632		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
28633		defer func() {
28634			sc := -1
28635			if page.Response().Response.Response != nil {
28636				sc = page.Response().Response.Response.StatusCode
28637			}
28638			tracing.EndSpan(ctx, sc, err)
28639		}()
28640	}
28641	for {
28642		next, err := page.fn(ctx, page.plr)
28643		if err != nil {
28644			return err
28645		}
28646		page.plr = next
28647		if !next.hasNextLink() || !next.IsEmpty() {
28648			break
28649		}
28650	}
28651	return nil
28652}
28653
28654// Next advances to the next page of values.  If there was an error making
28655// the request the page does not advance and the error is returned.
28656// Deprecated: Use NextWithContext() instead.
28657func (page *ProfileListResultPage) Next() error {
28658	return page.NextWithContext(context.Background())
28659}
28660
28661// NotDone returns true if the page enumeration should be started or is not yet complete.
28662func (page ProfileListResultPage) NotDone() bool {
28663	return !page.plr.IsEmpty()
28664}
28665
28666// Response returns the raw server response from the last page request.
28667func (page ProfileListResultPage) Response() ProfileListResult {
28668	return page.plr
28669}
28670
28671// Values returns the slice of values for the current page or nil if there are no values.
28672func (page ProfileListResultPage) Values() []Profile {
28673	if page.plr.IsEmpty() {
28674		return nil
28675	}
28676	return *page.plr.Value
28677}
28678
28679// Creates a new instance of the ProfileListResultPage type.
28680func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
28681	return ProfileListResultPage{
28682		fn:  getNextPage,
28683		plr: cur,
28684	}
28685}
28686
28687// ProfilePropertiesFormat network profile properties.
28688type ProfilePropertiesFormat struct {
28689	// ContainerNetworkInterfaces - READ-ONLY; List of child container network interfaces.
28690	ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"`
28691	// ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations.
28692	ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"`
28693	// ResourceGUID - READ-ONLY; The resource GUID property of the network profile resource.
28694	ResourceGUID *string `json:"resourceGuid,omitempty"`
28695	// ProvisioningState - READ-ONLY; The provisioning state of the network profile resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
28696	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28697}
28698
28699// MarshalJSON is the custom marshaler for ProfilePropertiesFormat.
28700func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
28701	objectMap := make(map[string]interface{})
28702	if ppf.ContainerNetworkInterfaceConfigurations != nil {
28703		objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations
28704	}
28705	return json.Marshal(objectMap)
28706}
28707
28708// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
28709// operation.
28710type ProfilesDeleteFuture struct {
28711	azure.FutureAPI
28712	// Result returns the result of the asynchronous operation.
28713	// If the operation has not completed it will return an error.
28714	Result func(ProfilesClient) (autorest.Response, error)
28715}
28716
28717// PropagatedRouteTable the list of RouteTables to advertise the routes to.
28718type PropagatedRouteTable struct {
28719	// Labels - The list of labels.
28720	Labels *[]string `json:"labels,omitempty"`
28721	// Ids - The list of resource ids of all the RouteTables.
28722	Ids *[]SubResource `json:"ids,omitempty"`
28723}
28724
28725// ProtocolConfiguration configuration of the protocol.
28726type ProtocolConfiguration struct {
28727	// HTTPConfiguration - HTTP configuration of the connectivity check.
28728	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
28729}
28730
28731// ProtocolCustomSettingsFormat dDoS custom policy properties.
28732type ProtocolCustomSettingsFormat struct {
28733	// Protocol - The protocol for which the DDoS protection policy is being customized. Possible values include: 'DdosCustomPolicyProtocolTCP', 'DdosCustomPolicyProtocolUDP', 'DdosCustomPolicyProtocolSyn'
28734	Protocol DdosCustomPolicyProtocol `json:"protocol,omitempty"`
28735	// TriggerRateOverride - The customized DDoS protection trigger rate.
28736	TriggerRateOverride *string `json:"triggerRateOverride,omitempty"`
28737	// SourceRateOverride - The customized DDoS protection source rate.
28738	SourceRateOverride *string `json:"sourceRateOverride,omitempty"`
28739	// TriggerSensitivityOverride - The customized DDoS protection trigger rate sensitivity degrees. High: Trigger rate set with most sensitivity w.r.t. normal traffic. Default: Trigger rate set with moderate sensitivity w.r.t. normal traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity w.r.t. normal traffic. Possible values include: 'DdosCustomPolicyTriggerSensitivityOverrideRelaxed', 'DdosCustomPolicyTriggerSensitivityOverrideLow', 'DdosCustomPolicyTriggerSensitivityOverrideDefault', 'DdosCustomPolicyTriggerSensitivityOverrideHigh'
28740	TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"`
28741}
28742
28743// PublicIPAddress public IP address resource.
28744type PublicIPAddress struct {
28745	autorest.Response `json:"-"`
28746	// ExtendedLocation - The extended location of the public ip address.
28747	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
28748	// Sku - The public IP address SKU.
28749	Sku *PublicIPAddressSku `json:"sku,omitempty"`
28750	// PublicIPAddressPropertiesFormat - Public IP address properties.
28751	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
28752	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
28753	Etag *string `json:"etag,omitempty"`
28754	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
28755	Zones *[]string `json:"zones,omitempty"`
28756	// ID - Resource ID.
28757	ID *string `json:"id,omitempty"`
28758	// Name - READ-ONLY; Resource name.
28759	Name *string `json:"name,omitempty"`
28760	// Type - READ-ONLY; Resource type.
28761	Type *string `json:"type,omitempty"`
28762	// Location - Resource location.
28763	Location *string `json:"location,omitempty"`
28764	// Tags - Resource tags.
28765	Tags map[string]*string `json:"tags"`
28766}
28767
28768// MarshalJSON is the custom marshaler for PublicIPAddress.
28769func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
28770	objectMap := make(map[string]interface{})
28771	if pia.ExtendedLocation != nil {
28772		objectMap["extendedLocation"] = pia.ExtendedLocation
28773	}
28774	if pia.Sku != nil {
28775		objectMap["sku"] = pia.Sku
28776	}
28777	if pia.PublicIPAddressPropertiesFormat != nil {
28778		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
28779	}
28780	if pia.Zones != nil {
28781		objectMap["zones"] = pia.Zones
28782	}
28783	if pia.ID != nil {
28784		objectMap["id"] = pia.ID
28785	}
28786	if pia.Location != nil {
28787		objectMap["location"] = pia.Location
28788	}
28789	if pia.Tags != nil {
28790		objectMap["tags"] = pia.Tags
28791	}
28792	return json.Marshal(objectMap)
28793}
28794
28795// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
28796func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
28797	var m map[string]*json.RawMessage
28798	err := json.Unmarshal(body, &m)
28799	if err != nil {
28800		return err
28801	}
28802	for k, v := range m {
28803		switch k {
28804		case "extendedLocation":
28805			if v != nil {
28806				var extendedLocation ExtendedLocation
28807				err = json.Unmarshal(*v, &extendedLocation)
28808				if err != nil {
28809					return err
28810				}
28811				pia.ExtendedLocation = &extendedLocation
28812			}
28813		case "sku":
28814			if v != nil {
28815				var sku PublicIPAddressSku
28816				err = json.Unmarshal(*v, &sku)
28817				if err != nil {
28818					return err
28819				}
28820				pia.Sku = &sku
28821			}
28822		case "properties":
28823			if v != nil {
28824				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
28825				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
28826				if err != nil {
28827					return err
28828				}
28829				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
28830			}
28831		case "etag":
28832			if v != nil {
28833				var etag string
28834				err = json.Unmarshal(*v, &etag)
28835				if err != nil {
28836					return err
28837				}
28838				pia.Etag = &etag
28839			}
28840		case "zones":
28841			if v != nil {
28842				var zones []string
28843				err = json.Unmarshal(*v, &zones)
28844				if err != nil {
28845					return err
28846				}
28847				pia.Zones = &zones
28848			}
28849		case "id":
28850			if v != nil {
28851				var ID string
28852				err = json.Unmarshal(*v, &ID)
28853				if err != nil {
28854					return err
28855				}
28856				pia.ID = &ID
28857			}
28858		case "name":
28859			if v != nil {
28860				var name string
28861				err = json.Unmarshal(*v, &name)
28862				if err != nil {
28863					return err
28864				}
28865				pia.Name = &name
28866			}
28867		case "type":
28868			if v != nil {
28869				var typeVar string
28870				err = json.Unmarshal(*v, &typeVar)
28871				if err != nil {
28872					return err
28873				}
28874				pia.Type = &typeVar
28875			}
28876		case "location":
28877			if v != nil {
28878				var location string
28879				err = json.Unmarshal(*v, &location)
28880				if err != nil {
28881					return err
28882				}
28883				pia.Location = &location
28884			}
28885		case "tags":
28886			if v != nil {
28887				var tags map[string]*string
28888				err = json.Unmarshal(*v, &tags)
28889				if err != nil {
28890					return err
28891				}
28892				pia.Tags = tags
28893			}
28894		}
28895	}
28896
28897	return nil
28898}
28899
28900// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address.
28901type PublicIPAddressDNSSettings struct {
28902	// 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.
28903	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
28904	// 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.
28905	Fqdn *string `json:"fqdn,omitempty"`
28906	// 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.
28907	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
28908}
28909
28910// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28911// long-running operation.
28912type PublicIPAddressesCreateOrUpdateFuture struct {
28913	azure.FutureAPI
28914	// Result returns the result of the asynchronous operation.
28915	// If the operation has not completed it will return an error.
28916	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
28917}
28918
28919// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
28920// operation.
28921type PublicIPAddressesDeleteFuture struct {
28922	azure.FutureAPI
28923	// Result returns the result of the asynchronous operation.
28924	// If the operation has not completed it will return an error.
28925	Result func(PublicIPAddressesClient) (autorest.Response, error)
28926}
28927
28928// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
28929type PublicIPAddressListResult struct {
28930	autorest.Response `json:"-"`
28931	// Value - A list of public IP addresses that exists in a resource group.
28932	Value *[]PublicIPAddress `json:"value,omitempty"`
28933	// NextLink - The URL to get the next set of results.
28934	NextLink *string `json:"nextLink,omitempty"`
28935}
28936
28937// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
28938type PublicIPAddressListResultIterator struct {
28939	i    int
28940	page PublicIPAddressListResultPage
28941}
28942
28943// NextWithContext advances to the next value.  If there was an error making
28944// the request the iterator does not advance and the error is returned.
28945func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
28946	if tracing.IsEnabled() {
28947		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
28948		defer func() {
28949			sc := -1
28950			if iter.Response().Response.Response != nil {
28951				sc = iter.Response().Response.Response.StatusCode
28952			}
28953			tracing.EndSpan(ctx, sc, err)
28954		}()
28955	}
28956	iter.i++
28957	if iter.i < len(iter.page.Values()) {
28958		return nil
28959	}
28960	err = iter.page.NextWithContext(ctx)
28961	if err != nil {
28962		iter.i--
28963		return err
28964	}
28965	iter.i = 0
28966	return nil
28967}
28968
28969// Next advances to the next value.  If there was an error making
28970// the request the iterator does not advance and the error is returned.
28971// Deprecated: Use NextWithContext() instead.
28972func (iter *PublicIPAddressListResultIterator) Next() error {
28973	return iter.NextWithContext(context.Background())
28974}
28975
28976// NotDone returns true if the enumeration should be started or is not yet complete.
28977func (iter PublicIPAddressListResultIterator) NotDone() bool {
28978	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28979}
28980
28981// Response returns the raw server response from the last page request.
28982func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
28983	return iter.page.Response()
28984}
28985
28986// Value returns the current value or a zero-initialized value if the
28987// iterator has advanced beyond the end of the collection.
28988func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
28989	if !iter.page.NotDone() {
28990		return PublicIPAddress{}
28991	}
28992	return iter.page.Values()[iter.i]
28993}
28994
28995// Creates a new instance of the PublicIPAddressListResultIterator type.
28996func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
28997	return PublicIPAddressListResultIterator{page: page}
28998}
28999
29000// IsEmpty returns true if the ListResult contains no values.
29001func (pialr PublicIPAddressListResult) IsEmpty() bool {
29002	return pialr.Value == nil || len(*pialr.Value) == 0
29003}
29004
29005// hasNextLink returns true if the NextLink is not empty.
29006func (pialr PublicIPAddressListResult) hasNextLink() bool {
29007	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
29008}
29009
29010// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
29011// It returns nil if no more results exist.
29012func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
29013	if !pialr.hasNextLink() {
29014		return nil, nil
29015	}
29016	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29017		autorest.AsJSON(),
29018		autorest.AsGet(),
29019		autorest.WithBaseURL(to.String(pialr.NextLink)))
29020}
29021
29022// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
29023type PublicIPAddressListResultPage struct {
29024	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
29025	pialr PublicIPAddressListResult
29026}
29027
29028// NextWithContext advances to the next page of values.  If there was an error making
29029// the request the page does not advance and the error is returned.
29030func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
29031	if tracing.IsEnabled() {
29032		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
29033		defer func() {
29034			sc := -1
29035			if page.Response().Response.Response != nil {
29036				sc = page.Response().Response.Response.StatusCode
29037			}
29038			tracing.EndSpan(ctx, sc, err)
29039		}()
29040	}
29041	for {
29042		next, err := page.fn(ctx, page.pialr)
29043		if err != nil {
29044			return err
29045		}
29046		page.pialr = next
29047		if !next.hasNextLink() || !next.IsEmpty() {
29048			break
29049		}
29050	}
29051	return nil
29052}
29053
29054// Next advances to the next page of values.  If there was an error making
29055// the request the page does not advance and the error is returned.
29056// Deprecated: Use NextWithContext() instead.
29057func (page *PublicIPAddressListResultPage) Next() error {
29058	return page.NextWithContext(context.Background())
29059}
29060
29061// NotDone returns true if the page enumeration should be started or is not yet complete.
29062func (page PublicIPAddressListResultPage) NotDone() bool {
29063	return !page.pialr.IsEmpty()
29064}
29065
29066// Response returns the raw server response from the last page request.
29067func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
29068	return page.pialr
29069}
29070
29071// Values returns the slice of values for the current page or nil if there are no values.
29072func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
29073	if page.pialr.IsEmpty() {
29074		return nil
29075	}
29076	return *page.pialr.Value
29077}
29078
29079// Creates a new instance of the PublicIPAddressListResultPage type.
29080func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
29081	return PublicIPAddressListResultPage{
29082		fn:    getNextPage,
29083		pialr: cur,
29084	}
29085}
29086
29087// PublicIPAddressPropertiesFormat public IP address properties.
29088type PublicIPAddressPropertiesFormat struct {
29089	// PublicIPAllocationMethod - The public IP address allocation method. Possible values include: 'Static', 'Dynamic'
29090	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
29091	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
29092	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
29093	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
29094	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
29095	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
29096	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
29097	// DdosSettings - The DDoS protection custom policy associated with the public IP address.
29098	DdosSettings *DdosSettings `json:"ddosSettings,omitempty"`
29099	// IPTags - The list of tags associated with the public IP address.
29100	IPTags *[]IPTag `json:"ipTags,omitempty"`
29101	// IPAddress - The IP address associated with the public IP address resource.
29102	IPAddress *string `json:"ipAddress,omitempty"`
29103	// PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from.
29104	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
29105	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
29106	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
29107	// ResourceGUID - READ-ONLY; The resource GUID property of the public IP address resource.
29108	ResourceGUID *string `json:"resourceGuid,omitempty"`
29109	// ProvisioningState - READ-ONLY; The provisioning state of the public IP address resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29110	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29111}
29112
29113// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
29114func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
29115	objectMap := make(map[string]interface{})
29116	if piapf.PublicIPAllocationMethod != "" {
29117		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
29118	}
29119	if piapf.PublicIPAddressVersion != "" {
29120		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
29121	}
29122	if piapf.DNSSettings != nil {
29123		objectMap["dnsSettings"] = piapf.DNSSettings
29124	}
29125	if piapf.DdosSettings != nil {
29126		objectMap["ddosSettings"] = piapf.DdosSettings
29127	}
29128	if piapf.IPTags != nil {
29129		objectMap["ipTags"] = piapf.IPTags
29130	}
29131	if piapf.IPAddress != nil {
29132		objectMap["ipAddress"] = piapf.IPAddress
29133	}
29134	if piapf.PublicIPPrefix != nil {
29135		objectMap["publicIPPrefix"] = piapf.PublicIPPrefix
29136	}
29137	if piapf.IdleTimeoutInMinutes != nil {
29138		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
29139	}
29140	return json.Marshal(objectMap)
29141}
29142
29143// PublicIPAddressSku SKU of a public IP address.
29144type PublicIPAddressSku struct {
29145	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
29146	Name PublicIPAddressSkuName `json:"name,omitempty"`
29147	// Tier - Tier of a public IP address SKU. Possible values include: 'PublicIPAddressSkuTierRegional', 'PublicIPAddressSkuTierGlobal'
29148	Tier PublicIPAddressSkuTier `json:"tier,omitempty"`
29149}
29150
29151// PublicIPPrefix public IP prefix resource.
29152type PublicIPPrefix struct {
29153	autorest.Response `json:"-"`
29154	// ExtendedLocation - The extended location of the public ip address.
29155	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
29156	// Sku - The public IP prefix SKU.
29157	Sku *PublicIPPrefixSku `json:"sku,omitempty"`
29158	// PublicIPPrefixPropertiesFormat - Public IP prefix properties.
29159	*PublicIPPrefixPropertiesFormat `json:"properties,omitempty"`
29160	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29161	Etag *string `json:"etag,omitempty"`
29162	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
29163	Zones *[]string `json:"zones,omitempty"`
29164	// ID - Resource ID.
29165	ID *string `json:"id,omitempty"`
29166	// Name - READ-ONLY; Resource name.
29167	Name *string `json:"name,omitempty"`
29168	// Type - READ-ONLY; Resource type.
29169	Type *string `json:"type,omitempty"`
29170	// Location - Resource location.
29171	Location *string `json:"location,omitempty"`
29172	// Tags - Resource tags.
29173	Tags map[string]*string `json:"tags"`
29174}
29175
29176// MarshalJSON is the custom marshaler for PublicIPPrefix.
29177func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) {
29178	objectMap := make(map[string]interface{})
29179	if pip.ExtendedLocation != nil {
29180		objectMap["extendedLocation"] = pip.ExtendedLocation
29181	}
29182	if pip.Sku != nil {
29183		objectMap["sku"] = pip.Sku
29184	}
29185	if pip.PublicIPPrefixPropertiesFormat != nil {
29186		objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat
29187	}
29188	if pip.Zones != nil {
29189		objectMap["zones"] = pip.Zones
29190	}
29191	if pip.ID != nil {
29192		objectMap["id"] = pip.ID
29193	}
29194	if pip.Location != nil {
29195		objectMap["location"] = pip.Location
29196	}
29197	if pip.Tags != nil {
29198		objectMap["tags"] = pip.Tags
29199	}
29200	return json.Marshal(objectMap)
29201}
29202
29203// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct.
29204func (pip *PublicIPPrefix) UnmarshalJSON(body []byte) error {
29205	var m map[string]*json.RawMessage
29206	err := json.Unmarshal(body, &m)
29207	if err != nil {
29208		return err
29209	}
29210	for k, v := range m {
29211		switch k {
29212		case "extendedLocation":
29213			if v != nil {
29214				var extendedLocation ExtendedLocation
29215				err = json.Unmarshal(*v, &extendedLocation)
29216				if err != nil {
29217					return err
29218				}
29219				pip.ExtendedLocation = &extendedLocation
29220			}
29221		case "sku":
29222			if v != nil {
29223				var sku PublicIPPrefixSku
29224				err = json.Unmarshal(*v, &sku)
29225				if err != nil {
29226					return err
29227				}
29228				pip.Sku = &sku
29229			}
29230		case "properties":
29231			if v != nil {
29232				var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat
29233				err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat)
29234				if err != nil {
29235					return err
29236				}
29237				pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat
29238			}
29239		case "etag":
29240			if v != nil {
29241				var etag string
29242				err = json.Unmarshal(*v, &etag)
29243				if err != nil {
29244					return err
29245				}
29246				pip.Etag = &etag
29247			}
29248		case "zones":
29249			if v != nil {
29250				var zones []string
29251				err = json.Unmarshal(*v, &zones)
29252				if err != nil {
29253					return err
29254				}
29255				pip.Zones = &zones
29256			}
29257		case "id":
29258			if v != nil {
29259				var ID string
29260				err = json.Unmarshal(*v, &ID)
29261				if err != nil {
29262					return err
29263				}
29264				pip.ID = &ID
29265			}
29266		case "name":
29267			if v != nil {
29268				var name string
29269				err = json.Unmarshal(*v, &name)
29270				if err != nil {
29271					return err
29272				}
29273				pip.Name = &name
29274			}
29275		case "type":
29276			if v != nil {
29277				var typeVar string
29278				err = json.Unmarshal(*v, &typeVar)
29279				if err != nil {
29280					return err
29281				}
29282				pip.Type = &typeVar
29283			}
29284		case "location":
29285			if v != nil {
29286				var location string
29287				err = json.Unmarshal(*v, &location)
29288				if err != nil {
29289					return err
29290				}
29291				pip.Location = &location
29292			}
29293		case "tags":
29294			if v != nil {
29295				var tags map[string]*string
29296				err = json.Unmarshal(*v, &tags)
29297				if err != nil {
29298					return err
29299				}
29300				pip.Tags = tags
29301			}
29302		}
29303	}
29304
29305	return nil
29306}
29307
29308// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29309// long-running operation.
29310type PublicIPPrefixesCreateOrUpdateFuture struct {
29311	azure.FutureAPI
29312	// Result returns the result of the asynchronous operation.
29313	// If the operation has not completed it will return an error.
29314	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
29315}
29316
29317// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29318// operation.
29319type PublicIPPrefixesDeleteFuture struct {
29320	azure.FutureAPI
29321	// Result returns the result of the asynchronous operation.
29322	// If the operation has not completed it will return an error.
29323	Result func(PublicIPPrefixesClient) (autorest.Response, error)
29324}
29325
29326// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
29327type PublicIPPrefixListResult struct {
29328	autorest.Response `json:"-"`
29329	// Value - A list of public IP prefixes that exists in a resource group.
29330	Value *[]PublicIPPrefix `json:"value,omitempty"`
29331	// NextLink - The URL to get the next set of results.
29332	NextLink *string `json:"nextLink,omitempty"`
29333}
29334
29335// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values.
29336type PublicIPPrefixListResultIterator struct {
29337	i    int
29338	page PublicIPPrefixListResultPage
29339}
29340
29341// NextWithContext advances to the next value.  If there was an error making
29342// the request the iterator does not advance and the error is returned.
29343func (iter *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
29344	if tracing.IsEnabled() {
29345		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.NextWithContext")
29346		defer func() {
29347			sc := -1
29348			if iter.Response().Response.Response != nil {
29349				sc = iter.Response().Response.Response.StatusCode
29350			}
29351			tracing.EndSpan(ctx, sc, err)
29352		}()
29353	}
29354	iter.i++
29355	if iter.i < len(iter.page.Values()) {
29356		return nil
29357	}
29358	err = iter.page.NextWithContext(ctx)
29359	if err != nil {
29360		iter.i--
29361		return err
29362	}
29363	iter.i = 0
29364	return nil
29365}
29366
29367// Next advances to the next value.  If there was an error making
29368// the request the iterator does not advance and the error is returned.
29369// Deprecated: Use NextWithContext() instead.
29370func (iter *PublicIPPrefixListResultIterator) Next() error {
29371	return iter.NextWithContext(context.Background())
29372}
29373
29374// NotDone returns true if the enumeration should be started or is not yet complete.
29375func (iter PublicIPPrefixListResultIterator) NotDone() bool {
29376	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29377}
29378
29379// Response returns the raw server response from the last page request.
29380func (iter PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult {
29381	return iter.page.Response()
29382}
29383
29384// Value returns the current value or a zero-initialized value if the
29385// iterator has advanced beyond the end of the collection.
29386func (iter PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
29387	if !iter.page.NotDone() {
29388		return PublicIPPrefix{}
29389	}
29390	return iter.page.Values()[iter.i]
29391}
29392
29393// Creates a new instance of the PublicIPPrefixListResultIterator type.
29394func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
29395	return PublicIPPrefixListResultIterator{page: page}
29396}
29397
29398// IsEmpty returns true if the ListResult contains no values.
29399func (piplr PublicIPPrefixListResult) IsEmpty() bool {
29400	return piplr.Value == nil || len(*piplr.Value) == 0
29401}
29402
29403// hasNextLink returns true if the NextLink is not empty.
29404func (piplr PublicIPPrefixListResult) hasNextLink() bool {
29405	return piplr.NextLink != nil && len(*piplr.NextLink) != 0
29406}
29407
29408// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
29409// It returns nil if no more results exist.
29410func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
29411	if !piplr.hasNextLink() {
29412		return nil, nil
29413	}
29414	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29415		autorest.AsJSON(),
29416		autorest.AsGet(),
29417		autorest.WithBaseURL(to.String(piplr.NextLink)))
29418}
29419
29420// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
29421type PublicIPPrefixListResultPage struct {
29422	fn    func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
29423	piplr PublicIPPrefixListResult
29424}
29425
29426// NextWithContext advances to the next page of values.  If there was an error making
29427// the request the page does not advance and the error is returned.
29428func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
29429	if tracing.IsEnabled() {
29430		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext")
29431		defer func() {
29432			sc := -1
29433			if page.Response().Response.Response != nil {
29434				sc = page.Response().Response.Response.StatusCode
29435			}
29436			tracing.EndSpan(ctx, sc, err)
29437		}()
29438	}
29439	for {
29440		next, err := page.fn(ctx, page.piplr)
29441		if err != nil {
29442			return err
29443		}
29444		page.piplr = next
29445		if !next.hasNextLink() || !next.IsEmpty() {
29446			break
29447		}
29448	}
29449	return nil
29450}
29451
29452// Next advances to the next page of values.  If there was an error making
29453// the request the page does not advance and the error is returned.
29454// Deprecated: Use NextWithContext() instead.
29455func (page *PublicIPPrefixListResultPage) Next() error {
29456	return page.NextWithContext(context.Background())
29457}
29458
29459// NotDone returns true if the page enumeration should be started or is not yet complete.
29460func (page PublicIPPrefixListResultPage) NotDone() bool {
29461	return !page.piplr.IsEmpty()
29462}
29463
29464// Response returns the raw server response from the last page request.
29465func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult {
29466	return page.piplr
29467}
29468
29469// Values returns the slice of values for the current page or nil if there are no values.
29470func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
29471	if page.piplr.IsEmpty() {
29472		return nil
29473	}
29474	return *page.piplr.Value
29475}
29476
29477// Creates a new instance of the PublicIPPrefixListResultPage type.
29478func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
29479	return PublicIPPrefixListResultPage{
29480		fn:    getNextPage,
29481		piplr: cur,
29482	}
29483}
29484
29485// PublicIPPrefixPropertiesFormat public IP prefix properties.
29486type PublicIPPrefixPropertiesFormat struct {
29487	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
29488	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
29489	// IPTags - The list of tags associated with the public IP prefix.
29490	IPTags *[]IPTag `json:"ipTags,omitempty"`
29491	// PrefixLength - The Length of the Public IP Prefix.
29492	PrefixLength *int32 `json:"prefixLength,omitempty"`
29493	// IPPrefix - READ-ONLY; The allocated Prefix.
29494	IPPrefix *string `json:"ipPrefix,omitempty"`
29495	// PublicIPAddresses - READ-ONLY; The list of all referenced PublicIPAddresses.
29496	PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"`
29497	// LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix.
29498	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"`
29499	// CustomIPPrefix - The customIpPrefix that this prefix is associated with.
29500	CustomIPPrefix *SubResource `json:"customIPPrefix,omitempty"`
29501	// ResourceGUID - READ-ONLY; The resource GUID property of the public IP prefix resource.
29502	ResourceGUID *string `json:"resourceGuid,omitempty"`
29503	// ProvisioningState - READ-ONLY; The provisioning state of the public IP prefix resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29504	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29505}
29506
29507// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat.
29508func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
29509	objectMap := make(map[string]interface{})
29510	if pippf.PublicIPAddressVersion != "" {
29511		objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion
29512	}
29513	if pippf.IPTags != nil {
29514		objectMap["ipTags"] = pippf.IPTags
29515	}
29516	if pippf.PrefixLength != nil {
29517		objectMap["prefixLength"] = pippf.PrefixLength
29518	}
29519	if pippf.CustomIPPrefix != nil {
29520		objectMap["customIPPrefix"] = pippf.CustomIPPrefix
29521	}
29522	return json.Marshal(objectMap)
29523}
29524
29525// PublicIPPrefixSku SKU of a public IP prefix.
29526type PublicIPPrefixSku struct {
29527	// Name - Name of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuNameStandard'
29528	Name PublicIPPrefixSkuName `json:"name,omitempty"`
29529	// Tier - Tier of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuTierRegional', 'PublicIPPrefixSkuTierGlobal'
29530	Tier PublicIPPrefixSkuTier `json:"tier,omitempty"`
29531}
29532
29533// PutBastionShareableLinkAllFuture an abstraction for monitoring and retrieving the results of a
29534// long-running operation.
29535type PutBastionShareableLinkAllFuture struct {
29536	azure.FutureAPI
29537	// Result returns the result of the asynchronous operation.
29538	// If the operation has not completed it will return an error.
29539	Result func(BaseClient) (BastionShareableLinkListResultPage, error)
29540}
29541
29542// PutBastionShareableLinkFuture an abstraction for monitoring and retrieving the results of a long-running
29543// operation.
29544type PutBastionShareableLinkFuture struct {
29545	azure.FutureAPI
29546	// Result returns the result of the asynchronous operation.
29547	// If the operation has not completed it will return an error.
29548	Result func(BaseClient) (BastionShareableLinkListResultPage, error)
29549}
29550
29551// QosIPRange qos Traffic Profiler IP Range properties.
29552type QosIPRange struct {
29553	// StartIP - Start IP Address.
29554	StartIP *string `json:"startIP,omitempty"`
29555	// EndIP - End IP Address.
29556	EndIP *string `json:"endIP,omitempty"`
29557}
29558
29559// QosPortRange qos Traffic Profiler Port range properties.
29560type QosPortRange struct {
29561	// Start - Qos Port Range start.
29562	Start *int32 `json:"start,omitempty"`
29563	// End - Qos Port Range end.
29564	End *int32 `json:"end,omitempty"`
29565}
29566
29567// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
29568type QueryTroubleshootingParameters struct {
29569	// TargetResourceID - The target resource ID to query the troubleshooting result.
29570	TargetResourceID *string `json:"targetResourceId,omitempty"`
29571}
29572
29573// RadiusServer radius Server Settings.
29574type RadiusServer struct {
29575	// RadiusServerAddress - The address of this radius server.
29576	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
29577	// RadiusServerScore - The initial score assigned to this radius server.
29578	RadiusServerScore *int64 `json:"radiusServerScore,omitempty"`
29579	// RadiusServerSecret - The secret used for this radius server.
29580	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
29581}
29582
29583// RecordSet a collective group of information about the record set information.
29584type RecordSet struct {
29585	// RecordType - Resource record type.
29586	RecordType *string `json:"recordType,omitempty"`
29587	// RecordSetName - Recordset name.
29588	RecordSetName *string `json:"recordSetName,omitempty"`
29589	// Fqdn - Fqdn that resolves to private endpoint ip address.
29590	Fqdn *string `json:"fqdn,omitempty"`
29591	// ProvisioningState - READ-ONLY; The provisioning state of the recordset. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29592	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29593	// TTL - Recordset time to live.
29594	TTL *int32 `json:"ttl,omitempty"`
29595	// IPAddresses - The private ip address of the private endpoint.
29596	IPAddresses *[]string `json:"ipAddresses,omitempty"`
29597}
29598
29599// MarshalJSON is the custom marshaler for RecordSet.
29600func (rs RecordSet) MarshalJSON() ([]byte, error) {
29601	objectMap := make(map[string]interface{})
29602	if rs.RecordType != nil {
29603		objectMap["recordType"] = rs.RecordType
29604	}
29605	if rs.RecordSetName != nil {
29606		objectMap["recordSetName"] = rs.RecordSetName
29607	}
29608	if rs.Fqdn != nil {
29609		objectMap["fqdn"] = rs.Fqdn
29610	}
29611	if rs.TTL != nil {
29612		objectMap["ttl"] = rs.TTL
29613	}
29614	if rs.IPAddresses != nil {
29615		objectMap["ipAddresses"] = rs.IPAddresses
29616	}
29617	return json.Marshal(objectMap)
29618}
29619
29620// ReferencedPublicIPAddress reference to a public IP address.
29621type ReferencedPublicIPAddress struct {
29622	// ID - The PublicIPAddress Reference.
29623	ID *string `json:"id,omitempty"`
29624}
29625
29626// Resource common resource representation.
29627type Resource struct {
29628	// ID - Resource ID.
29629	ID *string `json:"id,omitempty"`
29630	// Name - READ-ONLY; Resource name.
29631	Name *string `json:"name,omitempty"`
29632	// Type - READ-ONLY; Resource type.
29633	Type *string `json:"type,omitempty"`
29634	// Location - Resource location.
29635	Location *string `json:"location,omitempty"`
29636	// Tags - Resource tags.
29637	Tags map[string]*string `json:"tags"`
29638}
29639
29640// MarshalJSON is the custom marshaler for Resource.
29641func (r Resource) MarshalJSON() ([]byte, error) {
29642	objectMap := make(map[string]interface{})
29643	if r.ID != nil {
29644		objectMap["id"] = r.ID
29645	}
29646	if r.Location != nil {
29647		objectMap["location"] = r.Location
29648	}
29649	if r.Tags != nil {
29650		objectMap["tags"] = r.Tags
29651	}
29652	return json.Marshal(objectMap)
29653}
29654
29655// ResourceNavigationLink resourceNavigationLink resource.
29656type ResourceNavigationLink struct {
29657	// ResourceNavigationLinkFormat - Resource navigation link properties format.
29658	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
29659	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
29660	Name *string `json:"name,omitempty"`
29661	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29662	Etag *string `json:"etag,omitempty"`
29663	// Type - READ-ONLY; Resource type.
29664	Type *string `json:"type,omitempty"`
29665	// ID - Resource ID.
29666	ID *string `json:"id,omitempty"`
29667}
29668
29669// MarshalJSON is the custom marshaler for ResourceNavigationLink.
29670func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
29671	objectMap := make(map[string]interface{})
29672	if rnl.ResourceNavigationLinkFormat != nil {
29673		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
29674	}
29675	if rnl.Name != nil {
29676		objectMap["name"] = rnl.Name
29677	}
29678	if rnl.ID != nil {
29679		objectMap["id"] = rnl.ID
29680	}
29681	return json.Marshal(objectMap)
29682}
29683
29684// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
29685func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
29686	var m map[string]*json.RawMessage
29687	err := json.Unmarshal(body, &m)
29688	if err != nil {
29689		return err
29690	}
29691	for k, v := range m {
29692		switch k {
29693		case "properties":
29694			if v != nil {
29695				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
29696				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
29697				if err != nil {
29698					return err
29699				}
29700				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
29701			}
29702		case "name":
29703			if v != nil {
29704				var name string
29705				err = json.Unmarshal(*v, &name)
29706				if err != nil {
29707					return err
29708				}
29709				rnl.Name = &name
29710			}
29711		case "etag":
29712			if v != nil {
29713				var etag string
29714				err = json.Unmarshal(*v, &etag)
29715				if err != nil {
29716					return err
29717				}
29718				rnl.Etag = &etag
29719			}
29720		case "type":
29721			if v != nil {
29722				var typeVar string
29723				err = json.Unmarshal(*v, &typeVar)
29724				if err != nil {
29725					return err
29726				}
29727				rnl.Type = &typeVar
29728			}
29729		case "id":
29730			if v != nil {
29731				var ID string
29732				err = json.Unmarshal(*v, &ID)
29733				if err != nil {
29734					return err
29735				}
29736				rnl.ID = &ID
29737			}
29738		}
29739	}
29740
29741	return nil
29742}
29743
29744// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
29745type ResourceNavigationLinkFormat struct {
29746	// LinkedResourceType - Resource type of the linked resource.
29747	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
29748	// Link - Link to the external resource.
29749	Link *string `json:"link,omitempty"`
29750	// ProvisioningState - READ-ONLY; The provisioning state of the resource navigation link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29751	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29752}
29753
29754// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
29755func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
29756	objectMap := make(map[string]interface{})
29757	if rnlf.LinkedResourceType != nil {
29758		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
29759	}
29760	if rnlf.Link != nil {
29761		objectMap["link"] = rnlf.Link
29762	}
29763	return json.Marshal(objectMap)
29764}
29765
29766// ResourceNavigationLinksListResult response for ResourceNavigationLinks_List operation.
29767type ResourceNavigationLinksListResult struct {
29768	autorest.Response `json:"-"`
29769	// Value - The resource navigation links in a subnet.
29770	Value *[]ResourceNavigationLink `json:"value,omitempty"`
29771	// NextLink - READ-ONLY; The URL to get the next set of results.
29772	NextLink *string `json:"nextLink,omitempty"`
29773}
29774
29775// MarshalJSON is the custom marshaler for ResourceNavigationLinksListResult.
29776func (rnllr ResourceNavigationLinksListResult) MarshalJSON() ([]byte, error) {
29777	objectMap := make(map[string]interface{})
29778	if rnllr.Value != nil {
29779		objectMap["value"] = rnllr.Value
29780	}
29781	return json.Marshal(objectMap)
29782}
29783
29784// ResourceSet the base resource set for visibility and auto-approval.
29785type ResourceSet struct {
29786	// Subscriptions - The list of subscriptions.
29787	Subscriptions *[]string `json:"subscriptions,omitempty"`
29788}
29789
29790// RetentionPolicyParameters parameters that define the retention policy for flow log.
29791type RetentionPolicyParameters struct {
29792	// Days - Number of days to retain flow log records.
29793	Days *int32 `json:"days,omitempty"`
29794	// Enabled - Flag to enable/disable retention.
29795	Enabled *bool `json:"enabled,omitempty"`
29796}
29797
29798// Route route resource.
29799type Route struct {
29800	autorest.Response `json:"-"`
29801	// RoutePropertiesFormat - Properties of the route.
29802	*RoutePropertiesFormat `json:"properties,omitempty"`
29803	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29804	Name *string `json:"name,omitempty"`
29805	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29806	Etag *string `json:"etag,omitempty"`
29807	// Type - The type of the resource.
29808	Type *string `json:"type,omitempty"`
29809	// ID - Resource ID.
29810	ID *string `json:"id,omitempty"`
29811}
29812
29813// MarshalJSON is the custom marshaler for Route.
29814func (r Route) MarshalJSON() ([]byte, error) {
29815	objectMap := make(map[string]interface{})
29816	if r.RoutePropertiesFormat != nil {
29817		objectMap["properties"] = r.RoutePropertiesFormat
29818	}
29819	if r.Name != nil {
29820		objectMap["name"] = r.Name
29821	}
29822	if r.Type != nil {
29823		objectMap["type"] = r.Type
29824	}
29825	if r.ID != nil {
29826		objectMap["id"] = r.ID
29827	}
29828	return json.Marshal(objectMap)
29829}
29830
29831// UnmarshalJSON is the custom unmarshaler for Route struct.
29832func (r *Route) UnmarshalJSON(body []byte) error {
29833	var m map[string]*json.RawMessage
29834	err := json.Unmarshal(body, &m)
29835	if err != nil {
29836		return err
29837	}
29838	for k, v := range m {
29839		switch k {
29840		case "properties":
29841			if v != nil {
29842				var routePropertiesFormat RoutePropertiesFormat
29843				err = json.Unmarshal(*v, &routePropertiesFormat)
29844				if err != nil {
29845					return err
29846				}
29847				r.RoutePropertiesFormat = &routePropertiesFormat
29848			}
29849		case "name":
29850			if v != nil {
29851				var name string
29852				err = json.Unmarshal(*v, &name)
29853				if err != nil {
29854					return err
29855				}
29856				r.Name = &name
29857			}
29858		case "etag":
29859			if v != nil {
29860				var etag string
29861				err = json.Unmarshal(*v, &etag)
29862				if err != nil {
29863					return err
29864				}
29865				r.Etag = &etag
29866			}
29867		case "type":
29868			if v != nil {
29869				var typeVar string
29870				err = json.Unmarshal(*v, &typeVar)
29871				if err != nil {
29872					return err
29873				}
29874				r.Type = &typeVar
29875			}
29876		case "id":
29877			if v != nil {
29878				var ID string
29879				err = json.Unmarshal(*v, &ID)
29880				if err != nil {
29881					return err
29882				}
29883				r.ID = &ID
29884			}
29885		}
29886	}
29887
29888	return nil
29889}
29890
29891// RouteFilter route Filter Resource.
29892type RouteFilter struct {
29893	autorest.Response `json:"-"`
29894	// RouteFilterPropertiesFormat - Properties of the route filter.
29895	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
29896	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
29897	Etag *string `json:"etag,omitempty"`
29898	// ID - Resource ID.
29899	ID *string `json:"id,omitempty"`
29900	// Name - READ-ONLY; Resource name.
29901	Name *string `json:"name,omitempty"`
29902	// Type - READ-ONLY; Resource type.
29903	Type *string `json:"type,omitempty"`
29904	// Location - Resource location.
29905	Location *string `json:"location,omitempty"`
29906	// Tags - Resource tags.
29907	Tags map[string]*string `json:"tags"`
29908}
29909
29910// MarshalJSON is the custom marshaler for RouteFilter.
29911func (rf RouteFilter) MarshalJSON() ([]byte, error) {
29912	objectMap := make(map[string]interface{})
29913	if rf.RouteFilterPropertiesFormat != nil {
29914		objectMap["properties"] = rf.RouteFilterPropertiesFormat
29915	}
29916	if rf.ID != nil {
29917		objectMap["id"] = rf.ID
29918	}
29919	if rf.Location != nil {
29920		objectMap["location"] = rf.Location
29921	}
29922	if rf.Tags != nil {
29923		objectMap["tags"] = rf.Tags
29924	}
29925	return json.Marshal(objectMap)
29926}
29927
29928// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
29929func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
29930	var m map[string]*json.RawMessage
29931	err := json.Unmarshal(body, &m)
29932	if err != nil {
29933		return err
29934	}
29935	for k, v := range m {
29936		switch k {
29937		case "properties":
29938			if v != nil {
29939				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
29940				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
29941				if err != nil {
29942					return err
29943				}
29944				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
29945			}
29946		case "etag":
29947			if v != nil {
29948				var etag string
29949				err = json.Unmarshal(*v, &etag)
29950				if err != nil {
29951					return err
29952				}
29953				rf.Etag = &etag
29954			}
29955		case "id":
29956			if v != nil {
29957				var ID string
29958				err = json.Unmarshal(*v, &ID)
29959				if err != nil {
29960					return err
29961				}
29962				rf.ID = &ID
29963			}
29964		case "name":
29965			if v != nil {
29966				var name string
29967				err = json.Unmarshal(*v, &name)
29968				if err != nil {
29969					return err
29970				}
29971				rf.Name = &name
29972			}
29973		case "type":
29974			if v != nil {
29975				var typeVar string
29976				err = json.Unmarshal(*v, &typeVar)
29977				if err != nil {
29978					return err
29979				}
29980				rf.Type = &typeVar
29981			}
29982		case "location":
29983			if v != nil {
29984				var location string
29985				err = json.Unmarshal(*v, &location)
29986				if err != nil {
29987					return err
29988				}
29989				rf.Location = &location
29990			}
29991		case "tags":
29992			if v != nil {
29993				var tags map[string]*string
29994				err = json.Unmarshal(*v, &tags)
29995				if err != nil {
29996					return err
29997				}
29998				rf.Tags = tags
29999			}
30000		}
30001	}
30002
30003	return nil
30004}
30005
30006// RouteFilterListResult response for the ListRouteFilters API service call.
30007type RouteFilterListResult struct {
30008	autorest.Response `json:"-"`
30009	// Value - A list of route filters in a resource group.
30010	Value *[]RouteFilter `json:"value,omitempty"`
30011	// NextLink - The URL to get the next set of results.
30012	NextLink *string `json:"nextLink,omitempty"`
30013}
30014
30015// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
30016type RouteFilterListResultIterator struct {
30017	i    int
30018	page RouteFilterListResultPage
30019}
30020
30021// NextWithContext advances to the next value.  If there was an error making
30022// the request the iterator does not advance and the error is returned.
30023func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
30024	if tracing.IsEnabled() {
30025		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
30026		defer func() {
30027			sc := -1
30028			if iter.Response().Response.Response != nil {
30029				sc = iter.Response().Response.Response.StatusCode
30030			}
30031			tracing.EndSpan(ctx, sc, err)
30032		}()
30033	}
30034	iter.i++
30035	if iter.i < len(iter.page.Values()) {
30036		return nil
30037	}
30038	err = iter.page.NextWithContext(ctx)
30039	if err != nil {
30040		iter.i--
30041		return err
30042	}
30043	iter.i = 0
30044	return nil
30045}
30046
30047// Next advances to the next value.  If there was an error making
30048// the request the iterator does not advance and the error is returned.
30049// Deprecated: Use NextWithContext() instead.
30050func (iter *RouteFilterListResultIterator) Next() error {
30051	return iter.NextWithContext(context.Background())
30052}
30053
30054// NotDone returns true if the enumeration should be started or is not yet complete.
30055func (iter RouteFilterListResultIterator) NotDone() bool {
30056	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30057}
30058
30059// Response returns the raw server response from the last page request.
30060func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
30061	return iter.page.Response()
30062}
30063
30064// Value returns the current value or a zero-initialized value if the
30065// iterator has advanced beyond the end of the collection.
30066func (iter RouteFilterListResultIterator) Value() RouteFilter {
30067	if !iter.page.NotDone() {
30068		return RouteFilter{}
30069	}
30070	return iter.page.Values()[iter.i]
30071}
30072
30073// Creates a new instance of the RouteFilterListResultIterator type.
30074func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
30075	return RouteFilterListResultIterator{page: page}
30076}
30077
30078// IsEmpty returns true if the ListResult contains no values.
30079func (rflr RouteFilterListResult) IsEmpty() bool {
30080	return rflr.Value == nil || len(*rflr.Value) == 0
30081}
30082
30083// hasNextLink returns true if the NextLink is not empty.
30084func (rflr RouteFilterListResult) hasNextLink() bool {
30085	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
30086}
30087
30088// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
30089// It returns nil if no more results exist.
30090func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
30091	if !rflr.hasNextLink() {
30092		return nil, nil
30093	}
30094	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30095		autorest.AsJSON(),
30096		autorest.AsGet(),
30097		autorest.WithBaseURL(to.String(rflr.NextLink)))
30098}
30099
30100// RouteFilterListResultPage contains a page of RouteFilter values.
30101type RouteFilterListResultPage struct {
30102	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
30103	rflr RouteFilterListResult
30104}
30105
30106// NextWithContext advances to the next page of values.  If there was an error making
30107// the request the page does not advance and the error is returned.
30108func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
30109	if tracing.IsEnabled() {
30110		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
30111		defer func() {
30112			sc := -1
30113			if page.Response().Response.Response != nil {
30114				sc = page.Response().Response.Response.StatusCode
30115			}
30116			tracing.EndSpan(ctx, sc, err)
30117		}()
30118	}
30119	for {
30120		next, err := page.fn(ctx, page.rflr)
30121		if err != nil {
30122			return err
30123		}
30124		page.rflr = next
30125		if !next.hasNextLink() || !next.IsEmpty() {
30126			break
30127		}
30128	}
30129	return nil
30130}
30131
30132// Next advances to the next page of values.  If there was an error making
30133// the request the page does not advance and the error is returned.
30134// Deprecated: Use NextWithContext() instead.
30135func (page *RouteFilterListResultPage) Next() error {
30136	return page.NextWithContext(context.Background())
30137}
30138
30139// NotDone returns true if the page enumeration should be started or is not yet complete.
30140func (page RouteFilterListResultPage) NotDone() bool {
30141	return !page.rflr.IsEmpty()
30142}
30143
30144// Response returns the raw server response from the last page request.
30145func (page RouteFilterListResultPage) Response() RouteFilterListResult {
30146	return page.rflr
30147}
30148
30149// Values returns the slice of values for the current page or nil if there are no values.
30150func (page RouteFilterListResultPage) Values() []RouteFilter {
30151	if page.rflr.IsEmpty() {
30152		return nil
30153	}
30154	return *page.rflr.Value
30155}
30156
30157// Creates a new instance of the RouteFilterListResultPage type.
30158func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
30159	return RouteFilterListResultPage{
30160		fn:   getNextPage,
30161		rflr: cur,
30162	}
30163}
30164
30165// RouteFilterPropertiesFormat route Filter Resource.
30166type RouteFilterPropertiesFormat struct {
30167	// Rules - Collection of RouteFilterRules contained within a route filter.
30168	Rules *[]RouteFilterRule `json:"rules,omitempty"`
30169	// Peerings - READ-ONLY; A collection of references to express route circuit peerings.
30170	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
30171	// Ipv6Peerings - READ-ONLY; A collection of references to express route circuit ipv6 peerings.
30172	Ipv6Peerings *[]ExpressRouteCircuitPeering `json:"ipv6Peerings,omitempty"`
30173	// ProvisioningState - READ-ONLY; The provisioning state of the route filter resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30174	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30175}
30176
30177// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
30178func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
30179	objectMap := make(map[string]interface{})
30180	if rfpf.Rules != nil {
30181		objectMap["rules"] = rfpf.Rules
30182	}
30183	return json.Marshal(objectMap)
30184}
30185
30186// RouteFilterRule route Filter Rule Resource.
30187type RouteFilterRule struct {
30188	autorest.Response `json:"-"`
30189	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
30190	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
30191	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
30192	Name *string `json:"name,omitempty"`
30193	// Location - Resource location.
30194	Location *string `json:"location,omitempty"`
30195	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
30196	Etag *string `json:"etag,omitempty"`
30197	// ID - Resource ID.
30198	ID *string `json:"id,omitempty"`
30199}
30200
30201// MarshalJSON is the custom marshaler for RouteFilterRule.
30202func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
30203	objectMap := make(map[string]interface{})
30204	if rfr.RouteFilterRulePropertiesFormat != nil {
30205		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
30206	}
30207	if rfr.Name != nil {
30208		objectMap["name"] = rfr.Name
30209	}
30210	if rfr.Location != nil {
30211		objectMap["location"] = rfr.Location
30212	}
30213	if rfr.ID != nil {
30214		objectMap["id"] = rfr.ID
30215	}
30216	return json.Marshal(objectMap)
30217}
30218
30219// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
30220func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
30221	var m map[string]*json.RawMessage
30222	err := json.Unmarshal(body, &m)
30223	if err != nil {
30224		return err
30225	}
30226	for k, v := range m {
30227		switch k {
30228		case "properties":
30229			if v != nil {
30230				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
30231				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
30232				if err != nil {
30233					return err
30234				}
30235				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
30236			}
30237		case "name":
30238			if v != nil {
30239				var name string
30240				err = json.Unmarshal(*v, &name)
30241				if err != nil {
30242					return err
30243				}
30244				rfr.Name = &name
30245			}
30246		case "location":
30247			if v != nil {
30248				var location string
30249				err = json.Unmarshal(*v, &location)
30250				if err != nil {
30251					return err
30252				}
30253				rfr.Location = &location
30254			}
30255		case "etag":
30256			if v != nil {
30257				var etag string
30258				err = json.Unmarshal(*v, &etag)
30259				if err != nil {
30260					return err
30261				}
30262				rfr.Etag = &etag
30263			}
30264		case "id":
30265			if v != nil {
30266				var ID string
30267				err = json.Unmarshal(*v, &ID)
30268				if err != nil {
30269					return err
30270				}
30271				rfr.ID = &ID
30272			}
30273		}
30274	}
30275
30276	return nil
30277}
30278
30279// RouteFilterRuleListResult response for the ListRouteFilterRules API service call.
30280type RouteFilterRuleListResult struct {
30281	autorest.Response `json:"-"`
30282	// Value - A list of RouteFilterRules in a resource group.
30283	Value *[]RouteFilterRule `json:"value,omitempty"`
30284	// NextLink - The URL to get the next set of results.
30285	NextLink *string `json:"nextLink,omitempty"`
30286}
30287
30288// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
30289type RouteFilterRuleListResultIterator struct {
30290	i    int
30291	page RouteFilterRuleListResultPage
30292}
30293
30294// NextWithContext advances to the next value.  If there was an error making
30295// the request the iterator does not advance and the error is returned.
30296func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
30297	if tracing.IsEnabled() {
30298		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
30299		defer func() {
30300			sc := -1
30301			if iter.Response().Response.Response != nil {
30302				sc = iter.Response().Response.Response.StatusCode
30303			}
30304			tracing.EndSpan(ctx, sc, err)
30305		}()
30306	}
30307	iter.i++
30308	if iter.i < len(iter.page.Values()) {
30309		return nil
30310	}
30311	err = iter.page.NextWithContext(ctx)
30312	if err != nil {
30313		iter.i--
30314		return err
30315	}
30316	iter.i = 0
30317	return nil
30318}
30319
30320// Next advances to the next value.  If there was an error making
30321// the request the iterator does not advance and the error is returned.
30322// Deprecated: Use NextWithContext() instead.
30323func (iter *RouteFilterRuleListResultIterator) Next() error {
30324	return iter.NextWithContext(context.Background())
30325}
30326
30327// NotDone returns true if the enumeration should be started or is not yet complete.
30328func (iter RouteFilterRuleListResultIterator) NotDone() bool {
30329	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30330}
30331
30332// Response returns the raw server response from the last page request.
30333func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
30334	return iter.page.Response()
30335}
30336
30337// Value returns the current value or a zero-initialized value if the
30338// iterator has advanced beyond the end of the collection.
30339func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
30340	if !iter.page.NotDone() {
30341		return RouteFilterRule{}
30342	}
30343	return iter.page.Values()[iter.i]
30344}
30345
30346// Creates a new instance of the RouteFilterRuleListResultIterator type.
30347func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
30348	return RouteFilterRuleListResultIterator{page: page}
30349}
30350
30351// IsEmpty returns true if the ListResult contains no values.
30352func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
30353	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
30354}
30355
30356// hasNextLink returns true if the NextLink is not empty.
30357func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
30358	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
30359}
30360
30361// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
30362// It returns nil if no more results exist.
30363func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
30364	if !rfrlr.hasNextLink() {
30365		return nil, nil
30366	}
30367	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30368		autorest.AsJSON(),
30369		autorest.AsGet(),
30370		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
30371}
30372
30373// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
30374type RouteFilterRuleListResultPage struct {
30375	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
30376	rfrlr RouteFilterRuleListResult
30377}
30378
30379// NextWithContext advances to the next page of values.  If there was an error making
30380// the request the page does not advance and the error is returned.
30381func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
30382	if tracing.IsEnabled() {
30383		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
30384		defer func() {
30385			sc := -1
30386			if page.Response().Response.Response != nil {
30387				sc = page.Response().Response.Response.StatusCode
30388			}
30389			tracing.EndSpan(ctx, sc, err)
30390		}()
30391	}
30392	for {
30393		next, err := page.fn(ctx, page.rfrlr)
30394		if err != nil {
30395			return err
30396		}
30397		page.rfrlr = next
30398		if !next.hasNextLink() || !next.IsEmpty() {
30399			break
30400		}
30401	}
30402	return nil
30403}
30404
30405// Next advances to the next page of values.  If there was an error making
30406// the request the page does not advance and the error is returned.
30407// Deprecated: Use NextWithContext() instead.
30408func (page *RouteFilterRuleListResultPage) Next() error {
30409	return page.NextWithContext(context.Background())
30410}
30411
30412// NotDone returns true if the page enumeration should be started or is not yet complete.
30413func (page RouteFilterRuleListResultPage) NotDone() bool {
30414	return !page.rfrlr.IsEmpty()
30415}
30416
30417// Response returns the raw server response from the last page request.
30418func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
30419	return page.rfrlr
30420}
30421
30422// Values returns the slice of values for the current page or nil if there are no values.
30423func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
30424	if page.rfrlr.IsEmpty() {
30425		return nil
30426	}
30427	return *page.rfrlr.Value
30428}
30429
30430// Creates a new instance of the RouteFilterRuleListResultPage type.
30431func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
30432	return RouteFilterRuleListResultPage{
30433		fn:    getNextPage,
30434		rfrlr: cur,
30435	}
30436}
30437
30438// RouteFilterRulePropertiesFormat route Filter Rule Resource.
30439type RouteFilterRulePropertiesFormat struct {
30440	// Access - The access type of the rule. Possible values include: 'Allow', 'Deny'
30441	Access Access `json:"access,omitempty"`
30442	// RouteFilterRuleType - The rule type of the rule.
30443	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
30444	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
30445	Communities *[]string `json:"communities,omitempty"`
30446	// ProvisioningState - READ-ONLY; The provisioning state of the route filter rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30447	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30448}
30449
30450// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
30451func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
30452	objectMap := make(map[string]interface{})
30453	if rfrpf.Access != "" {
30454		objectMap["access"] = rfrpf.Access
30455	}
30456	if rfrpf.RouteFilterRuleType != nil {
30457		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
30458	}
30459	if rfrpf.Communities != nil {
30460		objectMap["communities"] = rfrpf.Communities
30461	}
30462	return json.Marshal(objectMap)
30463}
30464
30465// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30466// long-running operation.
30467type RouteFilterRulesCreateOrUpdateFuture struct {
30468	azure.FutureAPI
30469	// Result returns the result of the asynchronous operation.
30470	// If the operation has not completed it will return an error.
30471	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
30472}
30473
30474// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30475// operation.
30476type RouteFilterRulesDeleteFuture struct {
30477	azure.FutureAPI
30478	// Result returns the result of the asynchronous operation.
30479	// If the operation has not completed it will return an error.
30480	Result func(RouteFilterRulesClient) (autorest.Response, error)
30481}
30482
30483// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30484// long-running operation.
30485type RouteFiltersCreateOrUpdateFuture struct {
30486	azure.FutureAPI
30487	// Result returns the result of the asynchronous operation.
30488	// If the operation has not completed it will return an error.
30489	Result func(RouteFiltersClient) (RouteFilter, error)
30490}
30491
30492// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30493// operation.
30494type RouteFiltersDeleteFuture struct {
30495	azure.FutureAPI
30496	// Result returns the result of the asynchronous operation.
30497	// If the operation has not completed it will return an error.
30498	Result func(RouteFiltersClient) (autorest.Response, error)
30499}
30500
30501// RouteListResult response for the ListRoute API service call.
30502type RouteListResult struct {
30503	autorest.Response `json:"-"`
30504	// Value - A list of routes in a resource group.
30505	Value *[]Route `json:"value,omitempty"`
30506	// NextLink - The URL to get the next set of results.
30507	NextLink *string `json:"nextLink,omitempty"`
30508}
30509
30510// RouteListResultIterator provides access to a complete listing of Route values.
30511type RouteListResultIterator struct {
30512	i    int
30513	page RouteListResultPage
30514}
30515
30516// NextWithContext advances to the next value.  If there was an error making
30517// the request the iterator does not advance and the error is returned.
30518func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
30519	if tracing.IsEnabled() {
30520		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
30521		defer func() {
30522			sc := -1
30523			if iter.Response().Response.Response != nil {
30524				sc = iter.Response().Response.Response.StatusCode
30525			}
30526			tracing.EndSpan(ctx, sc, err)
30527		}()
30528	}
30529	iter.i++
30530	if iter.i < len(iter.page.Values()) {
30531		return nil
30532	}
30533	err = iter.page.NextWithContext(ctx)
30534	if err != nil {
30535		iter.i--
30536		return err
30537	}
30538	iter.i = 0
30539	return nil
30540}
30541
30542// Next advances to the next value.  If there was an error making
30543// the request the iterator does not advance and the error is returned.
30544// Deprecated: Use NextWithContext() instead.
30545func (iter *RouteListResultIterator) Next() error {
30546	return iter.NextWithContext(context.Background())
30547}
30548
30549// NotDone returns true if the enumeration should be started or is not yet complete.
30550func (iter RouteListResultIterator) NotDone() bool {
30551	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30552}
30553
30554// Response returns the raw server response from the last page request.
30555func (iter RouteListResultIterator) Response() RouteListResult {
30556	return iter.page.Response()
30557}
30558
30559// Value returns the current value or a zero-initialized value if the
30560// iterator has advanced beyond the end of the collection.
30561func (iter RouteListResultIterator) Value() Route {
30562	if !iter.page.NotDone() {
30563		return Route{}
30564	}
30565	return iter.page.Values()[iter.i]
30566}
30567
30568// Creates a new instance of the RouteListResultIterator type.
30569func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
30570	return RouteListResultIterator{page: page}
30571}
30572
30573// IsEmpty returns true if the ListResult contains no values.
30574func (rlr RouteListResult) IsEmpty() bool {
30575	return rlr.Value == nil || len(*rlr.Value) == 0
30576}
30577
30578// hasNextLink returns true if the NextLink is not empty.
30579func (rlr RouteListResult) hasNextLink() bool {
30580	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
30581}
30582
30583// routeListResultPreparer prepares a request to retrieve the next set of results.
30584// It returns nil if no more results exist.
30585func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
30586	if !rlr.hasNextLink() {
30587		return nil, nil
30588	}
30589	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30590		autorest.AsJSON(),
30591		autorest.AsGet(),
30592		autorest.WithBaseURL(to.String(rlr.NextLink)))
30593}
30594
30595// RouteListResultPage contains a page of Route values.
30596type RouteListResultPage struct {
30597	fn  func(context.Context, RouteListResult) (RouteListResult, error)
30598	rlr RouteListResult
30599}
30600
30601// NextWithContext advances to the next page of values.  If there was an error making
30602// the request the page does not advance and the error is returned.
30603func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
30604	if tracing.IsEnabled() {
30605		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
30606		defer func() {
30607			sc := -1
30608			if page.Response().Response.Response != nil {
30609				sc = page.Response().Response.Response.StatusCode
30610			}
30611			tracing.EndSpan(ctx, sc, err)
30612		}()
30613	}
30614	for {
30615		next, err := page.fn(ctx, page.rlr)
30616		if err != nil {
30617			return err
30618		}
30619		page.rlr = next
30620		if !next.hasNextLink() || !next.IsEmpty() {
30621			break
30622		}
30623	}
30624	return nil
30625}
30626
30627// Next advances to the next page of values.  If there was an error making
30628// the request the page does not advance and the error is returned.
30629// Deprecated: Use NextWithContext() instead.
30630func (page *RouteListResultPage) Next() error {
30631	return page.NextWithContext(context.Background())
30632}
30633
30634// NotDone returns true if the page enumeration should be started or is not yet complete.
30635func (page RouteListResultPage) NotDone() bool {
30636	return !page.rlr.IsEmpty()
30637}
30638
30639// Response returns the raw server response from the last page request.
30640func (page RouteListResultPage) Response() RouteListResult {
30641	return page.rlr
30642}
30643
30644// Values returns the slice of values for the current page or nil if there are no values.
30645func (page RouteListResultPage) Values() []Route {
30646	if page.rlr.IsEmpty() {
30647		return nil
30648	}
30649	return *page.rlr.Value
30650}
30651
30652// Creates a new instance of the RouteListResultPage type.
30653func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
30654	return RouteListResultPage{
30655		fn:  getNextPage,
30656		rlr: cur,
30657	}
30658}
30659
30660// RoutePropertiesFormat route resource.
30661type RoutePropertiesFormat struct {
30662	// AddressPrefix - The destination CIDR to which the route applies.
30663	AddressPrefix *string `json:"addressPrefix,omitempty"`
30664	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
30665	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
30666	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
30667	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
30668	// ProvisioningState - READ-ONLY; The provisioning state of the route resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30669	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30670	// HasBgpOverride - A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
30671	HasBgpOverride *bool `json:"hasBgpOverride,omitempty"`
30672}
30673
30674// MarshalJSON is the custom marshaler for RoutePropertiesFormat.
30675func (rpf RoutePropertiesFormat) MarshalJSON() ([]byte, error) {
30676	objectMap := make(map[string]interface{})
30677	if rpf.AddressPrefix != nil {
30678		objectMap["addressPrefix"] = rpf.AddressPrefix
30679	}
30680	if rpf.NextHopType != "" {
30681		objectMap["nextHopType"] = rpf.NextHopType
30682	}
30683	if rpf.NextHopIPAddress != nil {
30684		objectMap["nextHopIpAddress"] = rpf.NextHopIPAddress
30685	}
30686	if rpf.HasBgpOverride != nil {
30687		objectMap["hasBgpOverride"] = rpf.HasBgpOverride
30688	}
30689	return json.Marshal(objectMap)
30690}
30691
30692// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
30693// operation.
30694type RoutesCreateOrUpdateFuture struct {
30695	azure.FutureAPI
30696	// Result returns the result of the asynchronous operation.
30697	// If the operation has not completed it will return an error.
30698	Result func(RoutesClient) (Route, error)
30699}
30700
30701// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
30702type RoutesDeleteFuture struct {
30703	azure.FutureAPI
30704	// Result returns the result of the asynchronous operation.
30705	// If the operation has not completed it will return an error.
30706	Result func(RoutesClient) (autorest.Response, error)
30707}
30708
30709// RouteTable route table resource.
30710type RouteTable struct {
30711	autorest.Response `json:"-"`
30712	// RouteTablePropertiesFormat - Properties of the route table.
30713	*RouteTablePropertiesFormat `json:"properties,omitempty"`
30714	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
30715	Etag *string `json:"etag,omitempty"`
30716	// ID - Resource ID.
30717	ID *string `json:"id,omitempty"`
30718	// Name - READ-ONLY; Resource name.
30719	Name *string `json:"name,omitempty"`
30720	// Type - READ-ONLY; Resource type.
30721	Type *string `json:"type,omitempty"`
30722	// Location - Resource location.
30723	Location *string `json:"location,omitempty"`
30724	// Tags - Resource tags.
30725	Tags map[string]*string `json:"tags"`
30726}
30727
30728// MarshalJSON is the custom marshaler for RouteTable.
30729func (rt RouteTable) MarshalJSON() ([]byte, error) {
30730	objectMap := make(map[string]interface{})
30731	if rt.RouteTablePropertiesFormat != nil {
30732		objectMap["properties"] = rt.RouteTablePropertiesFormat
30733	}
30734	if rt.ID != nil {
30735		objectMap["id"] = rt.ID
30736	}
30737	if rt.Location != nil {
30738		objectMap["location"] = rt.Location
30739	}
30740	if rt.Tags != nil {
30741		objectMap["tags"] = rt.Tags
30742	}
30743	return json.Marshal(objectMap)
30744}
30745
30746// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
30747func (rt *RouteTable) UnmarshalJSON(body []byte) error {
30748	var m map[string]*json.RawMessage
30749	err := json.Unmarshal(body, &m)
30750	if err != nil {
30751		return err
30752	}
30753	for k, v := range m {
30754		switch k {
30755		case "properties":
30756			if v != nil {
30757				var routeTablePropertiesFormat RouteTablePropertiesFormat
30758				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
30759				if err != nil {
30760					return err
30761				}
30762				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
30763			}
30764		case "etag":
30765			if v != nil {
30766				var etag string
30767				err = json.Unmarshal(*v, &etag)
30768				if err != nil {
30769					return err
30770				}
30771				rt.Etag = &etag
30772			}
30773		case "id":
30774			if v != nil {
30775				var ID string
30776				err = json.Unmarshal(*v, &ID)
30777				if err != nil {
30778					return err
30779				}
30780				rt.ID = &ID
30781			}
30782		case "name":
30783			if v != nil {
30784				var name string
30785				err = json.Unmarshal(*v, &name)
30786				if err != nil {
30787					return err
30788				}
30789				rt.Name = &name
30790			}
30791		case "type":
30792			if v != nil {
30793				var typeVar string
30794				err = json.Unmarshal(*v, &typeVar)
30795				if err != nil {
30796					return err
30797				}
30798				rt.Type = &typeVar
30799			}
30800		case "location":
30801			if v != nil {
30802				var location string
30803				err = json.Unmarshal(*v, &location)
30804				if err != nil {
30805					return err
30806				}
30807				rt.Location = &location
30808			}
30809		case "tags":
30810			if v != nil {
30811				var tags map[string]*string
30812				err = json.Unmarshal(*v, &tags)
30813				if err != nil {
30814					return err
30815				}
30816				rt.Tags = tags
30817			}
30818		}
30819	}
30820
30821	return nil
30822}
30823
30824// RouteTableListResult response for the ListRouteTable API service call.
30825type RouteTableListResult struct {
30826	autorest.Response `json:"-"`
30827	// Value - A list of route tables in a resource group.
30828	Value *[]RouteTable `json:"value,omitempty"`
30829	// NextLink - The URL to get the next set of results.
30830	NextLink *string `json:"nextLink,omitempty"`
30831}
30832
30833// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
30834type RouteTableListResultIterator struct {
30835	i    int
30836	page RouteTableListResultPage
30837}
30838
30839// NextWithContext advances to the next value.  If there was an error making
30840// the request the iterator does not advance and the error is returned.
30841func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
30842	if tracing.IsEnabled() {
30843		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
30844		defer func() {
30845			sc := -1
30846			if iter.Response().Response.Response != nil {
30847				sc = iter.Response().Response.Response.StatusCode
30848			}
30849			tracing.EndSpan(ctx, sc, err)
30850		}()
30851	}
30852	iter.i++
30853	if iter.i < len(iter.page.Values()) {
30854		return nil
30855	}
30856	err = iter.page.NextWithContext(ctx)
30857	if err != nil {
30858		iter.i--
30859		return err
30860	}
30861	iter.i = 0
30862	return nil
30863}
30864
30865// Next advances to the next value.  If there was an error making
30866// the request the iterator does not advance and the error is returned.
30867// Deprecated: Use NextWithContext() instead.
30868func (iter *RouteTableListResultIterator) Next() error {
30869	return iter.NextWithContext(context.Background())
30870}
30871
30872// NotDone returns true if the enumeration should be started or is not yet complete.
30873func (iter RouteTableListResultIterator) NotDone() bool {
30874	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30875}
30876
30877// Response returns the raw server response from the last page request.
30878func (iter RouteTableListResultIterator) Response() RouteTableListResult {
30879	return iter.page.Response()
30880}
30881
30882// Value returns the current value or a zero-initialized value if the
30883// iterator has advanced beyond the end of the collection.
30884func (iter RouteTableListResultIterator) Value() RouteTable {
30885	if !iter.page.NotDone() {
30886		return RouteTable{}
30887	}
30888	return iter.page.Values()[iter.i]
30889}
30890
30891// Creates a new instance of the RouteTableListResultIterator type.
30892func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
30893	return RouteTableListResultIterator{page: page}
30894}
30895
30896// IsEmpty returns true if the ListResult contains no values.
30897func (rtlr RouteTableListResult) IsEmpty() bool {
30898	return rtlr.Value == nil || len(*rtlr.Value) == 0
30899}
30900
30901// hasNextLink returns true if the NextLink is not empty.
30902func (rtlr RouteTableListResult) hasNextLink() bool {
30903	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
30904}
30905
30906// routeTableListResultPreparer prepares a request to retrieve the next set of results.
30907// It returns nil if no more results exist.
30908func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
30909	if !rtlr.hasNextLink() {
30910		return nil, nil
30911	}
30912	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30913		autorest.AsJSON(),
30914		autorest.AsGet(),
30915		autorest.WithBaseURL(to.String(rtlr.NextLink)))
30916}
30917
30918// RouteTableListResultPage contains a page of RouteTable values.
30919type RouteTableListResultPage struct {
30920	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
30921	rtlr RouteTableListResult
30922}
30923
30924// NextWithContext advances to the next page of values.  If there was an error making
30925// the request the page does not advance and the error is returned.
30926func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
30927	if tracing.IsEnabled() {
30928		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
30929		defer func() {
30930			sc := -1
30931			if page.Response().Response.Response != nil {
30932				sc = page.Response().Response.Response.StatusCode
30933			}
30934			tracing.EndSpan(ctx, sc, err)
30935		}()
30936	}
30937	for {
30938		next, err := page.fn(ctx, page.rtlr)
30939		if err != nil {
30940			return err
30941		}
30942		page.rtlr = next
30943		if !next.hasNextLink() || !next.IsEmpty() {
30944			break
30945		}
30946	}
30947	return nil
30948}
30949
30950// Next advances to the next page of values.  If there was an error making
30951// the request the page does not advance and the error is returned.
30952// Deprecated: Use NextWithContext() instead.
30953func (page *RouteTableListResultPage) Next() error {
30954	return page.NextWithContext(context.Background())
30955}
30956
30957// NotDone returns true if the page enumeration should be started or is not yet complete.
30958func (page RouteTableListResultPage) NotDone() bool {
30959	return !page.rtlr.IsEmpty()
30960}
30961
30962// Response returns the raw server response from the last page request.
30963func (page RouteTableListResultPage) Response() RouteTableListResult {
30964	return page.rtlr
30965}
30966
30967// Values returns the slice of values for the current page or nil if there are no values.
30968func (page RouteTableListResultPage) Values() []RouteTable {
30969	if page.rtlr.IsEmpty() {
30970		return nil
30971	}
30972	return *page.rtlr.Value
30973}
30974
30975// Creates a new instance of the RouteTableListResultPage type.
30976func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
30977	return RouteTableListResultPage{
30978		fn:   getNextPage,
30979		rtlr: cur,
30980	}
30981}
30982
30983// RouteTablePropertiesFormat route Table resource.
30984type RouteTablePropertiesFormat struct {
30985	// Routes - Collection of routes contained within a route table.
30986	Routes *[]Route `json:"routes,omitempty"`
30987	// Subnets - READ-ONLY; A collection of references to subnets.
30988	Subnets *[]Subnet `json:"subnets,omitempty"`
30989	// DisableBgpRoutePropagation - Whether to disable the routes learned by BGP on that route table. True means disable.
30990	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
30991	// ProvisioningState - READ-ONLY; The provisioning state of the route table resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30992	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30993	// ResourceGUID - READ-ONLY; The resource GUID property of the route table.
30994	ResourceGUID *string `json:"resourceGuid,omitempty"`
30995}
30996
30997// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
30998func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
30999	objectMap := make(map[string]interface{})
31000	if rtpf.Routes != nil {
31001		objectMap["routes"] = rtpf.Routes
31002	}
31003	if rtpf.DisableBgpRoutePropagation != nil {
31004		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
31005	}
31006	return json.Marshal(objectMap)
31007}
31008
31009// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
31010// long-running operation.
31011type RouteTablesCreateOrUpdateFuture struct {
31012	azure.FutureAPI
31013	// Result returns the result of the asynchronous operation.
31014	// If the operation has not completed it will return an error.
31015	Result func(RouteTablesClient) (RouteTable, error)
31016}
31017
31018// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
31019// operation.
31020type RouteTablesDeleteFuture struct {
31021	azure.FutureAPI
31022	// Result returns the result of the asynchronous operation.
31023	// If the operation has not completed it will return an error.
31024	Result func(RouteTablesClient) (autorest.Response, error)
31025}
31026
31027// RoutingConfiguration routing Configuration indicating the associated and propagated route tables for
31028// this connection.
31029type RoutingConfiguration struct {
31030	// AssociatedRouteTable - The resource id RouteTable associated with this RoutingConfiguration.
31031	AssociatedRouteTable *SubResource `json:"associatedRouteTable,omitempty"`
31032	// PropagatedRouteTables - The list of RouteTables to advertise the routes to.
31033	PropagatedRouteTables *PropagatedRouteTable `json:"propagatedRouteTables,omitempty"`
31034	// VnetRoutes - List of routes that control routing from VirtualHub into a virtual network connection.
31035	VnetRoutes *VnetRoute `json:"vnetRoutes,omitempty"`
31036}
31037
31038// Rule rule of type network.
31039type Rule struct {
31040	// IPProtocols - Array of FirewallPolicyRuleNetworkProtocols.
31041	IPProtocols *[]FirewallPolicyRuleNetworkProtocol `json:"ipProtocols,omitempty"`
31042	// SourceAddresses - List of source IP addresses for this rule.
31043	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
31044	// DestinationAddresses - List of destination IP addresses or Service Tags.
31045	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
31046	// DestinationPorts - List of destination ports.
31047	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
31048	// SourceIPGroups - List of source IpGroups for this rule.
31049	SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"`
31050	// DestinationIPGroups - List of destination IpGroups for this rule.
31051	DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"`
31052	// DestinationFqdns - List of destination FQDNs.
31053	DestinationFqdns *[]string `json:"destinationFqdns,omitempty"`
31054	// Name - Name of the rule.
31055	Name *string `json:"name,omitempty"`
31056	// Description - Description of the rule.
31057	Description *string `json:"description,omitempty"`
31058	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeApplicationRule', 'RuleTypeNatRule', 'RuleTypeNetworkRule'
31059	RuleType RuleType `json:"ruleType,omitempty"`
31060}
31061
31062// MarshalJSON is the custom marshaler for Rule.
31063func (r Rule) MarshalJSON() ([]byte, error) {
31064	r.RuleType = RuleTypeNetworkRule
31065	objectMap := make(map[string]interface{})
31066	if r.IPProtocols != nil {
31067		objectMap["ipProtocols"] = r.IPProtocols
31068	}
31069	if r.SourceAddresses != nil {
31070		objectMap["sourceAddresses"] = r.SourceAddresses
31071	}
31072	if r.DestinationAddresses != nil {
31073		objectMap["destinationAddresses"] = r.DestinationAddresses
31074	}
31075	if r.DestinationPorts != nil {
31076		objectMap["destinationPorts"] = r.DestinationPorts
31077	}
31078	if r.SourceIPGroups != nil {
31079		objectMap["sourceIpGroups"] = r.SourceIPGroups
31080	}
31081	if r.DestinationIPGroups != nil {
31082		objectMap["destinationIpGroups"] = r.DestinationIPGroups
31083	}
31084	if r.DestinationFqdns != nil {
31085		objectMap["destinationFqdns"] = r.DestinationFqdns
31086	}
31087	if r.Name != nil {
31088		objectMap["name"] = r.Name
31089	}
31090	if r.Description != nil {
31091		objectMap["description"] = r.Description
31092	}
31093	if r.RuleType != "" {
31094		objectMap["ruleType"] = r.RuleType
31095	}
31096	return json.Marshal(objectMap)
31097}
31098
31099// AsApplicationRule is the BasicFirewallPolicyRule implementation for Rule.
31100func (r Rule) AsApplicationRule() (*ApplicationRule, bool) {
31101	return nil, false
31102}
31103
31104// AsNatRule is the BasicFirewallPolicyRule implementation for Rule.
31105func (r Rule) AsNatRule() (*NatRule, bool) {
31106	return nil, false
31107}
31108
31109// AsRule is the BasicFirewallPolicyRule implementation for Rule.
31110func (r Rule) AsRule() (*Rule, bool) {
31111	return &r, true
31112}
31113
31114// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for Rule.
31115func (r Rule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
31116	return nil, false
31117}
31118
31119// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for Rule.
31120func (r Rule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
31121	return &r, true
31122}
31123
31124// SecurityGroup networkSecurityGroup resource.
31125type SecurityGroup struct {
31126	autorest.Response `json:"-"`
31127	// SecurityGroupPropertiesFormat - Properties of the network security group.
31128	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
31129	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
31130	Etag *string `json:"etag,omitempty"`
31131	// ID - Resource ID.
31132	ID *string `json:"id,omitempty"`
31133	// Name - READ-ONLY; Resource name.
31134	Name *string `json:"name,omitempty"`
31135	// Type - READ-ONLY; Resource type.
31136	Type *string `json:"type,omitempty"`
31137	// Location - Resource location.
31138	Location *string `json:"location,omitempty"`
31139	// Tags - Resource tags.
31140	Tags map[string]*string `json:"tags"`
31141}
31142
31143// MarshalJSON is the custom marshaler for SecurityGroup.
31144func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
31145	objectMap := make(map[string]interface{})
31146	if sg.SecurityGroupPropertiesFormat != nil {
31147		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
31148	}
31149	if sg.ID != nil {
31150		objectMap["id"] = sg.ID
31151	}
31152	if sg.Location != nil {
31153		objectMap["location"] = sg.Location
31154	}
31155	if sg.Tags != nil {
31156		objectMap["tags"] = sg.Tags
31157	}
31158	return json.Marshal(objectMap)
31159}
31160
31161// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
31162func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
31163	var m map[string]*json.RawMessage
31164	err := json.Unmarshal(body, &m)
31165	if err != nil {
31166		return err
31167	}
31168	for k, v := range m {
31169		switch k {
31170		case "properties":
31171			if v != nil {
31172				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
31173				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
31174				if err != nil {
31175					return err
31176				}
31177				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
31178			}
31179		case "etag":
31180			if v != nil {
31181				var etag string
31182				err = json.Unmarshal(*v, &etag)
31183				if err != nil {
31184					return err
31185				}
31186				sg.Etag = &etag
31187			}
31188		case "id":
31189			if v != nil {
31190				var ID string
31191				err = json.Unmarshal(*v, &ID)
31192				if err != nil {
31193					return err
31194				}
31195				sg.ID = &ID
31196			}
31197		case "name":
31198			if v != nil {
31199				var name string
31200				err = json.Unmarshal(*v, &name)
31201				if err != nil {
31202					return err
31203				}
31204				sg.Name = &name
31205			}
31206		case "type":
31207			if v != nil {
31208				var typeVar string
31209				err = json.Unmarshal(*v, &typeVar)
31210				if err != nil {
31211					return err
31212				}
31213				sg.Type = &typeVar
31214			}
31215		case "location":
31216			if v != nil {
31217				var location string
31218				err = json.Unmarshal(*v, &location)
31219				if err != nil {
31220					return err
31221				}
31222				sg.Location = &location
31223			}
31224		case "tags":
31225			if v != nil {
31226				var tags map[string]*string
31227				err = json.Unmarshal(*v, &tags)
31228				if err != nil {
31229					return err
31230				}
31231				sg.Tags = tags
31232			}
31233		}
31234	}
31235
31236	return nil
31237}
31238
31239// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
31240type SecurityGroupListResult struct {
31241	autorest.Response `json:"-"`
31242	// Value - A list of NetworkSecurityGroup resources.
31243	Value *[]SecurityGroup `json:"value,omitempty"`
31244	// NextLink - The URL to get the next set of results.
31245	NextLink *string `json:"nextLink,omitempty"`
31246}
31247
31248// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
31249type SecurityGroupListResultIterator struct {
31250	i    int
31251	page SecurityGroupListResultPage
31252}
31253
31254// NextWithContext advances to the next value.  If there was an error making
31255// the request the iterator does not advance and the error is returned.
31256func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
31257	if tracing.IsEnabled() {
31258		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
31259		defer func() {
31260			sc := -1
31261			if iter.Response().Response.Response != nil {
31262				sc = iter.Response().Response.Response.StatusCode
31263			}
31264			tracing.EndSpan(ctx, sc, err)
31265		}()
31266	}
31267	iter.i++
31268	if iter.i < len(iter.page.Values()) {
31269		return nil
31270	}
31271	err = iter.page.NextWithContext(ctx)
31272	if err != nil {
31273		iter.i--
31274		return err
31275	}
31276	iter.i = 0
31277	return nil
31278}
31279
31280// Next advances to the next value.  If there was an error making
31281// the request the iterator does not advance and the error is returned.
31282// Deprecated: Use NextWithContext() instead.
31283func (iter *SecurityGroupListResultIterator) Next() error {
31284	return iter.NextWithContext(context.Background())
31285}
31286
31287// NotDone returns true if the enumeration should be started or is not yet complete.
31288func (iter SecurityGroupListResultIterator) NotDone() bool {
31289	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31290}
31291
31292// Response returns the raw server response from the last page request.
31293func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
31294	return iter.page.Response()
31295}
31296
31297// Value returns the current value or a zero-initialized value if the
31298// iterator has advanced beyond the end of the collection.
31299func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
31300	if !iter.page.NotDone() {
31301		return SecurityGroup{}
31302	}
31303	return iter.page.Values()[iter.i]
31304}
31305
31306// Creates a new instance of the SecurityGroupListResultIterator type.
31307func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
31308	return SecurityGroupListResultIterator{page: page}
31309}
31310
31311// IsEmpty returns true if the ListResult contains no values.
31312func (sglr SecurityGroupListResult) IsEmpty() bool {
31313	return sglr.Value == nil || len(*sglr.Value) == 0
31314}
31315
31316// hasNextLink returns true if the NextLink is not empty.
31317func (sglr SecurityGroupListResult) hasNextLink() bool {
31318	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
31319}
31320
31321// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
31322// It returns nil if no more results exist.
31323func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
31324	if !sglr.hasNextLink() {
31325		return nil, nil
31326	}
31327	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31328		autorest.AsJSON(),
31329		autorest.AsGet(),
31330		autorest.WithBaseURL(to.String(sglr.NextLink)))
31331}
31332
31333// SecurityGroupListResultPage contains a page of SecurityGroup values.
31334type SecurityGroupListResultPage struct {
31335	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
31336	sglr SecurityGroupListResult
31337}
31338
31339// NextWithContext advances to the next page of values.  If there was an error making
31340// the request the page does not advance and the error is returned.
31341func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
31342	if tracing.IsEnabled() {
31343		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
31344		defer func() {
31345			sc := -1
31346			if page.Response().Response.Response != nil {
31347				sc = page.Response().Response.Response.StatusCode
31348			}
31349			tracing.EndSpan(ctx, sc, err)
31350		}()
31351	}
31352	for {
31353		next, err := page.fn(ctx, page.sglr)
31354		if err != nil {
31355			return err
31356		}
31357		page.sglr = next
31358		if !next.hasNextLink() || !next.IsEmpty() {
31359			break
31360		}
31361	}
31362	return nil
31363}
31364
31365// Next advances to the next page of values.  If there was an error making
31366// the request the page does not advance and the error is returned.
31367// Deprecated: Use NextWithContext() instead.
31368func (page *SecurityGroupListResultPage) Next() error {
31369	return page.NextWithContext(context.Background())
31370}
31371
31372// NotDone returns true if the page enumeration should be started or is not yet complete.
31373func (page SecurityGroupListResultPage) NotDone() bool {
31374	return !page.sglr.IsEmpty()
31375}
31376
31377// Response returns the raw server response from the last page request.
31378func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
31379	return page.sglr
31380}
31381
31382// Values returns the slice of values for the current page or nil if there are no values.
31383func (page SecurityGroupListResultPage) Values() []SecurityGroup {
31384	if page.sglr.IsEmpty() {
31385		return nil
31386	}
31387	return *page.sglr.Value
31388}
31389
31390// Creates a new instance of the SecurityGroupListResultPage type.
31391func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
31392	return SecurityGroupListResultPage{
31393		fn:   getNextPage,
31394		sglr: cur,
31395	}
31396}
31397
31398// SecurityGroupNetworkInterface network interface and all its associated security rules.
31399type SecurityGroupNetworkInterface struct {
31400	// ID - ID of the network interface.
31401	ID *string `json:"id,omitempty"`
31402	// SecurityRuleAssociations - All security rules associated with the network interface.
31403	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
31404}
31405
31406// SecurityGroupPropertiesFormat network Security Group resource.
31407type SecurityGroupPropertiesFormat struct {
31408	// SecurityRules - A collection of security rules of the network security group.
31409	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
31410	// DefaultSecurityRules - READ-ONLY; The default security rules of network security group.
31411	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
31412	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
31413	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
31414	// Subnets - READ-ONLY; A collection of references to subnets.
31415	Subnets *[]Subnet `json:"subnets,omitempty"`
31416	// FlowLogs - READ-ONLY; A collection of references to flow log resources.
31417	FlowLogs *[]FlowLog `json:"flowLogs,omitempty"`
31418	// ResourceGUID - READ-ONLY; The resource GUID property of the network security group resource.
31419	ResourceGUID *string `json:"resourceGuid,omitempty"`
31420	// ProvisioningState - READ-ONLY; The provisioning state of the network security group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
31421	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31422}
31423
31424// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
31425func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
31426	objectMap := make(map[string]interface{})
31427	if sgpf.SecurityRules != nil {
31428		objectMap["securityRules"] = sgpf.SecurityRules
31429	}
31430	return json.Marshal(objectMap)
31431}
31432
31433// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
31434type SecurityGroupResult struct {
31435	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
31436	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
31437	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
31438	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
31439}
31440
31441// MarshalJSON is the custom marshaler for SecurityGroupResult.
31442func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
31443	objectMap := make(map[string]interface{})
31444	if sgr.SecurityRuleAccessResult != "" {
31445		objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
31446	}
31447	return json.Marshal(objectMap)
31448}
31449
31450// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
31451// long-running operation.
31452type SecurityGroupsCreateOrUpdateFuture struct {
31453	azure.FutureAPI
31454	// Result returns the result of the asynchronous operation.
31455	// If the operation has not completed it will return an error.
31456	Result func(SecurityGroupsClient) (SecurityGroup, error)
31457}
31458
31459// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
31460// operation.
31461type SecurityGroupsDeleteFuture struct {
31462	azure.FutureAPI
31463	// Result returns the result of the asynchronous operation.
31464	// If the operation has not completed it will return an error.
31465	Result func(SecurityGroupsClient) (autorest.Response, error)
31466}
31467
31468// SecurityGroupViewParameters parameters that define the VM to check security groups for.
31469type SecurityGroupViewParameters struct {
31470	// TargetResourceID - ID of the target VM.
31471	TargetResourceID *string `json:"targetResourceId,omitempty"`
31472}
31473
31474// SecurityGroupViewResult the information about security rules applied to the specified VM.
31475type SecurityGroupViewResult struct {
31476	autorest.Response `json:"-"`
31477	// NetworkInterfaces - List of network interfaces on the specified VM.
31478	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
31479}
31480
31481// SecurityPartnerProvider security Partner Provider resource.
31482type SecurityPartnerProvider struct {
31483	autorest.Response `json:"-"`
31484	// SecurityPartnerProviderPropertiesFormat - Properties of the Security Partner Provider.
31485	*SecurityPartnerProviderPropertiesFormat `json:"properties,omitempty"`
31486	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
31487	Etag *string `json:"etag,omitempty"`
31488	// ID - Resource ID.
31489	ID *string `json:"id,omitempty"`
31490	// Name - READ-ONLY; Resource name.
31491	Name *string `json:"name,omitempty"`
31492	// Type - READ-ONLY; Resource type.
31493	Type *string `json:"type,omitempty"`
31494	// Location - Resource location.
31495	Location *string `json:"location,omitempty"`
31496	// Tags - Resource tags.
31497	Tags map[string]*string `json:"tags"`
31498}
31499
31500// MarshalJSON is the custom marshaler for SecurityPartnerProvider.
31501func (spp SecurityPartnerProvider) MarshalJSON() ([]byte, error) {
31502	objectMap := make(map[string]interface{})
31503	if spp.SecurityPartnerProviderPropertiesFormat != nil {
31504		objectMap["properties"] = spp.SecurityPartnerProviderPropertiesFormat
31505	}
31506	if spp.ID != nil {
31507		objectMap["id"] = spp.ID
31508	}
31509	if spp.Location != nil {
31510		objectMap["location"] = spp.Location
31511	}
31512	if spp.Tags != nil {
31513		objectMap["tags"] = spp.Tags
31514	}
31515	return json.Marshal(objectMap)
31516}
31517
31518// UnmarshalJSON is the custom unmarshaler for SecurityPartnerProvider struct.
31519func (spp *SecurityPartnerProvider) UnmarshalJSON(body []byte) error {
31520	var m map[string]*json.RawMessage
31521	err := json.Unmarshal(body, &m)
31522	if err != nil {
31523		return err
31524	}
31525	for k, v := range m {
31526		switch k {
31527		case "properties":
31528			if v != nil {
31529				var securityPartnerProviderPropertiesFormat SecurityPartnerProviderPropertiesFormat
31530				err = json.Unmarshal(*v, &securityPartnerProviderPropertiesFormat)
31531				if err != nil {
31532					return err
31533				}
31534				spp.SecurityPartnerProviderPropertiesFormat = &securityPartnerProviderPropertiesFormat
31535			}
31536		case "etag":
31537			if v != nil {
31538				var etag string
31539				err = json.Unmarshal(*v, &etag)
31540				if err != nil {
31541					return err
31542				}
31543				spp.Etag = &etag
31544			}
31545		case "id":
31546			if v != nil {
31547				var ID string
31548				err = json.Unmarshal(*v, &ID)
31549				if err != nil {
31550					return err
31551				}
31552				spp.ID = &ID
31553			}
31554		case "name":
31555			if v != nil {
31556				var name string
31557				err = json.Unmarshal(*v, &name)
31558				if err != nil {
31559					return err
31560				}
31561				spp.Name = &name
31562			}
31563		case "type":
31564			if v != nil {
31565				var typeVar string
31566				err = json.Unmarshal(*v, &typeVar)
31567				if err != nil {
31568					return err
31569				}
31570				spp.Type = &typeVar
31571			}
31572		case "location":
31573			if v != nil {
31574				var location string
31575				err = json.Unmarshal(*v, &location)
31576				if err != nil {
31577					return err
31578				}
31579				spp.Location = &location
31580			}
31581		case "tags":
31582			if v != nil {
31583				var tags map[string]*string
31584				err = json.Unmarshal(*v, &tags)
31585				if err != nil {
31586					return err
31587				}
31588				spp.Tags = tags
31589			}
31590		}
31591	}
31592
31593	return nil
31594}
31595
31596// SecurityPartnerProviderListResult response for ListSecurityPartnerProviders API service call.
31597type SecurityPartnerProviderListResult struct {
31598	autorest.Response `json:"-"`
31599	// Value - List of Security Partner Providers in a resource group.
31600	Value *[]SecurityPartnerProvider `json:"value,omitempty"`
31601	// NextLink - URL to get the next set of results.
31602	NextLink *string `json:"nextLink,omitempty"`
31603}
31604
31605// SecurityPartnerProviderListResultIterator provides access to a complete listing of
31606// SecurityPartnerProvider values.
31607type SecurityPartnerProviderListResultIterator struct {
31608	i    int
31609	page SecurityPartnerProviderListResultPage
31610}
31611
31612// NextWithContext advances to the next value.  If there was an error making
31613// the request the iterator does not advance and the error is returned.
31614func (iter *SecurityPartnerProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
31615	if tracing.IsEnabled() {
31616		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProviderListResultIterator.NextWithContext")
31617		defer func() {
31618			sc := -1
31619			if iter.Response().Response.Response != nil {
31620				sc = iter.Response().Response.Response.StatusCode
31621			}
31622			tracing.EndSpan(ctx, sc, err)
31623		}()
31624	}
31625	iter.i++
31626	if iter.i < len(iter.page.Values()) {
31627		return nil
31628	}
31629	err = iter.page.NextWithContext(ctx)
31630	if err != nil {
31631		iter.i--
31632		return err
31633	}
31634	iter.i = 0
31635	return nil
31636}
31637
31638// Next advances to the next value.  If there was an error making
31639// the request the iterator does not advance and the error is returned.
31640// Deprecated: Use NextWithContext() instead.
31641func (iter *SecurityPartnerProviderListResultIterator) Next() error {
31642	return iter.NextWithContext(context.Background())
31643}
31644
31645// NotDone returns true if the enumeration should be started or is not yet complete.
31646func (iter SecurityPartnerProviderListResultIterator) NotDone() bool {
31647	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31648}
31649
31650// Response returns the raw server response from the last page request.
31651func (iter SecurityPartnerProviderListResultIterator) Response() SecurityPartnerProviderListResult {
31652	return iter.page.Response()
31653}
31654
31655// Value returns the current value or a zero-initialized value if the
31656// iterator has advanced beyond the end of the collection.
31657func (iter SecurityPartnerProviderListResultIterator) Value() SecurityPartnerProvider {
31658	if !iter.page.NotDone() {
31659		return SecurityPartnerProvider{}
31660	}
31661	return iter.page.Values()[iter.i]
31662}
31663
31664// Creates a new instance of the SecurityPartnerProviderListResultIterator type.
31665func NewSecurityPartnerProviderListResultIterator(page SecurityPartnerProviderListResultPage) SecurityPartnerProviderListResultIterator {
31666	return SecurityPartnerProviderListResultIterator{page: page}
31667}
31668
31669// IsEmpty returns true if the ListResult contains no values.
31670func (spplr SecurityPartnerProviderListResult) IsEmpty() bool {
31671	return spplr.Value == nil || len(*spplr.Value) == 0
31672}
31673
31674// hasNextLink returns true if the NextLink is not empty.
31675func (spplr SecurityPartnerProviderListResult) hasNextLink() bool {
31676	return spplr.NextLink != nil && len(*spplr.NextLink) != 0
31677}
31678
31679// securityPartnerProviderListResultPreparer prepares a request to retrieve the next set of results.
31680// It returns nil if no more results exist.
31681func (spplr SecurityPartnerProviderListResult) securityPartnerProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
31682	if !spplr.hasNextLink() {
31683		return nil, nil
31684	}
31685	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31686		autorest.AsJSON(),
31687		autorest.AsGet(),
31688		autorest.WithBaseURL(to.String(spplr.NextLink)))
31689}
31690
31691// SecurityPartnerProviderListResultPage contains a page of SecurityPartnerProvider values.
31692type SecurityPartnerProviderListResultPage struct {
31693	fn    func(context.Context, SecurityPartnerProviderListResult) (SecurityPartnerProviderListResult, error)
31694	spplr SecurityPartnerProviderListResult
31695}
31696
31697// NextWithContext advances to the next page of values.  If there was an error making
31698// the request the page does not advance and the error is returned.
31699func (page *SecurityPartnerProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
31700	if tracing.IsEnabled() {
31701		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPartnerProviderListResultPage.NextWithContext")
31702		defer func() {
31703			sc := -1
31704			if page.Response().Response.Response != nil {
31705				sc = page.Response().Response.Response.StatusCode
31706			}
31707			tracing.EndSpan(ctx, sc, err)
31708		}()
31709	}
31710	for {
31711		next, err := page.fn(ctx, page.spplr)
31712		if err != nil {
31713			return err
31714		}
31715		page.spplr = next
31716		if !next.hasNextLink() || !next.IsEmpty() {
31717			break
31718		}
31719	}
31720	return nil
31721}
31722
31723// Next advances to the next page of values.  If there was an error making
31724// the request the page does not advance and the error is returned.
31725// Deprecated: Use NextWithContext() instead.
31726func (page *SecurityPartnerProviderListResultPage) Next() error {
31727	return page.NextWithContext(context.Background())
31728}
31729
31730// NotDone returns true if the page enumeration should be started or is not yet complete.
31731func (page SecurityPartnerProviderListResultPage) NotDone() bool {
31732	return !page.spplr.IsEmpty()
31733}
31734
31735// Response returns the raw server response from the last page request.
31736func (page SecurityPartnerProviderListResultPage) Response() SecurityPartnerProviderListResult {
31737	return page.spplr
31738}
31739
31740// Values returns the slice of values for the current page or nil if there are no values.
31741func (page SecurityPartnerProviderListResultPage) Values() []SecurityPartnerProvider {
31742	if page.spplr.IsEmpty() {
31743		return nil
31744	}
31745	return *page.spplr.Value
31746}
31747
31748// Creates a new instance of the SecurityPartnerProviderListResultPage type.
31749func NewSecurityPartnerProviderListResultPage(cur SecurityPartnerProviderListResult, getNextPage func(context.Context, SecurityPartnerProviderListResult) (SecurityPartnerProviderListResult, error)) SecurityPartnerProviderListResultPage {
31750	return SecurityPartnerProviderListResultPage{
31751		fn:    getNextPage,
31752		spplr: cur,
31753	}
31754}
31755
31756// SecurityPartnerProviderPropertiesFormat properties of the Security Partner Provider.
31757type SecurityPartnerProviderPropertiesFormat struct {
31758	// ProvisioningState - READ-ONLY; The provisioning state of the Security Partner Provider resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
31759	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
31760	// SecurityProviderName - The security provider name. Possible values include: 'ZScaler', 'IBoss', 'Checkpoint'
31761	SecurityProviderName SecurityProviderName `json:"securityProviderName,omitempty"`
31762	// ConnectionStatus - READ-ONLY; The connection status with the Security Partner Provider. Possible values include: 'SecurityPartnerProviderConnectionStatusUnknown', 'SecurityPartnerProviderConnectionStatusPartiallyConnected', 'SecurityPartnerProviderConnectionStatusConnected', 'SecurityPartnerProviderConnectionStatusNotConnected'
31763	ConnectionStatus SecurityPartnerProviderConnectionStatus `json:"connectionStatus,omitempty"`
31764	// VirtualHub - The virtualHub to which the Security Partner Provider belongs.
31765	VirtualHub *SubResource `json:"virtualHub,omitempty"`
31766}
31767
31768// MarshalJSON is the custom marshaler for SecurityPartnerProviderPropertiesFormat.
31769func (spppf SecurityPartnerProviderPropertiesFormat) MarshalJSON() ([]byte, error) {
31770	objectMap := make(map[string]interface{})
31771	if spppf.SecurityProviderName != "" {
31772		objectMap["securityProviderName"] = spppf.SecurityProviderName
31773	}
31774	if spppf.VirtualHub != nil {
31775		objectMap["virtualHub"] = spppf.VirtualHub
31776	}
31777	return json.Marshal(objectMap)
31778}
31779
31780// SecurityPartnerProvidersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
31781// a long-running operation.
31782type SecurityPartnerProvidersCreateOrUpdateFuture struct {
31783	azure.FutureAPI
31784	// Result returns the result of the asynchronous operation.
31785	// If the operation has not completed it will return an error.
31786	Result func(SecurityPartnerProvidersClient) (SecurityPartnerProvider, error)
31787}
31788
31789// SecurityPartnerProvidersDeleteFuture an abstraction for monitoring and retrieving the results of a
31790// long-running operation.
31791type SecurityPartnerProvidersDeleteFuture struct {
31792	azure.FutureAPI
31793	// Result returns the result of the asynchronous operation.
31794	// If the operation has not completed it will return an error.
31795	Result func(SecurityPartnerProvidersClient) (autorest.Response, error)
31796}
31797
31798// SecurityRule network security rule.
31799type SecurityRule struct {
31800	autorest.Response `json:"-"`
31801	// SecurityRulePropertiesFormat - Properties of the security rule.
31802	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
31803	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
31804	Name *string `json:"name,omitempty"`
31805	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
31806	Etag *string `json:"etag,omitempty"`
31807	// Type - The type of the resource.
31808	Type *string `json:"type,omitempty"`
31809	// ID - Resource ID.
31810	ID *string `json:"id,omitempty"`
31811}
31812
31813// MarshalJSON is the custom marshaler for SecurityRule.
31814func (sr SecurityRule) MarshalJSON() ([]byte, error) {
31815	objectMap := make(map[string]interface{})
31816	if sr.SecurityRulePropertiesFormat != nil {
31817		objectMap["properties"] = sr.SecurityRulePropertiesFormat
31818	}
31819	if sr.Name != nil {
31820		objectMap["name"] = sr.Name
31821	}
31822	if sr.Type != nil {
31823		objectMap["type"] = sr.Type
31824	}
31825	if sr.ID != nil {
31826		objectMap["id"] = sr.ID
31827	}
31828	return json.Marshal(objectMap)
31829}
31830
31831// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
31832func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
31833	var m map[string]*json.RawMessage
31834	err := json.Unmarshal(body, &m)
31835	if err != nil {
31836		return err
31837	}
31838	for k, v := range m {
31839		switch k {
31840		case "properties":
31841			if v != nil {
31842				var securityRulePropertiesFormat SecurityRulePropertiesFormat
31843				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
31844				if err != nil {
31845					return err
31846				}
31847				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
31848			}
31849		case "name":
31850			if v != nil {
31851				var name string
31852				err = json.Unmarshal(*v, &name)
31853				if err != nil {
31854					return err
31855				}
31856				sr.Name = &name
31857			}
31858		case "etag":
31859			if v != nil {
31860				var etag string
31861				err = json.Unmarshal(*v, &etag)
31862				if err != nil {
31863					return err
31864				}
31865				sr.Etag = &etag
31866			}
31867		case "type":
31868			if v != nil {
31869				var typeVar string
31870				err = json.Unmarshal(*v, &typeVar)
31871				if err != nil {
31872					return err
31873				}
31874				sr.Type = &typeVar
31875			}
31876		case "id":
31877			if v != nil {
31878				var ID string
31879				err = json.Unmarshal(*v, &ID)
31880				if err != nil {
31881					return err
31882				}
31883				sr.ID = &ID
31884			}
31885		}
31886	}
31887
31888	return nil
31889}
31890
31891// SecurityRuleAssociations all security rules associated with the network interface.
31892type SecurityRuleAssociations struct {
31893	// NetworkInterfaceAssociation - Network interface and it's custom security rules.
31894	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
31895	// SubnetAssociation - Subnet and it's custom security rules.
31896	SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"`
31897	// DefaultSecurityRules - Collection of default security rules of the network security group.
31898	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
31899	// EffectiveSecurityRules - Collection of effective security rules.
31900	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
31901}
31902
31903// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
31904// belongs to a network security group.
31905type SecurityRuleListResult struct {
31906	autorest.Response `json:"-"`
31907	// Value - The security rules in a network security group.
31908	Value *[]SecurityRule `json:"value,omitempty"`
31909	// NextLink - The URL to get the next set of results.
31910	NextLink *string `json:"nextLink,omitempty"`
31911}
31912
31913// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
31914type SecurityRuleListResultIterator struct {
31915	i    int
31916	page SecurityRuleListResultPage
31917}
31918
31919// NextWithContext advances to the next value.  If there was an error making
31920// the request the iterator does not advance and the error is returned.
31921func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
31922	if tracing.IsEnabled() {
31923		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
31924		defer func() {
31925			sc := -1
31926			if iter.Response().Response.Response != nil {
31927				sc = iter.Response().Response.Response.StatusCode
31928			}
31929			tracing.EndSpan(ctx, sc, err)
31930		}()
31931	}
31932	iter.i++
31933	if iter.i < len(iter.page.Values()) {
31934		return nil
31935	}
31936	err = iter.page.NextWithContext(ctx)
31937	if err != nil {
31938		iter.i--
31939		return err
31940	}
31941	iter.i = 0
31942	return nil
31943}
31944
31945// Next advances to the next value.  If there was an error making
31946// the request the iterator does not advance and the error is returned.
31947// Deprecated: Use NextWithContext() instead.
31948func (iter *SecurityRuleListResultIterator) Next() error {
31949	return iter.NextWithContext(context.Background())
31950}
31951
31952// NotDone returns true if the enumeration should be started or is not yet complete.
31953func (iter SecurityRuleListResultIterator) NotDone() bool {
31954	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31955}
31956
31957// Response returns the raw server response from the last page request.
31958func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
31959	return iter.page.Response()
31960}
31961
31962// Value returns the current value or a zero-initialized value if the
31963// iterator has advanced beyond the end of the collection.
31964func (iter SecurityRuleListResultIterator) Value() SecurityRule {
31965	if !iter.page.NotDone() {
31966		return SecurityRule{}
31967	}
31968	return iter.page.Values()[iter.i]
31969}
31970
31971// Creates a new instance of the SecurityRuleListResultIterator type.
31972func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
31973	return SecurityRuleListResultIterator{page: page}
31974}
31975
31976// IsEmpty returns true if the ListResult contains no values.
31977func (srlr SecurityRuleListResult) IsEmpty() bool {
31978	return srlr.Value == nil || len(*srlr.Value) == 0
31979}
31980
31981// hasNextLink returns true if the NextLink is not empty.
31982func (srlr SecurityRuleListResult) hasNextLink() bool {
31983	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
31984}
31985
31986// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
31987// It returns nil if no more results exist.
31988func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
31989	if !srlr.hasNextLink() {
31990		return nil, nil
31991	}
31992	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31993		autorest.AsJSON(),
31994		autorest.AsGet(),
31995		autorest.WithBaseURL(to.String(srlr.NextLink)))
31996}
31997
31998// SecurityRuleListResultPage contains a page of SecurityRule values.
31999type SecurityRuleListResultPage struct {
32000	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
32001	srlr SecurityRuleListResult
32002}
32003
32004// NextWithContext advances to the next page of values.  If there was an error making
32005// the request the page does not advance and the error is returned.
32006func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
32007	if tracing.IsEnabled() {
32008		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
32009		defer func() {
32010			sc := -1
32011			if page.Response().Response.Response != nil {
32012				sc = page.Response().Response.Response.StatusCode
32013			}
32014			tracing.EndSpan(ctx, sc, err)
32015		}()
32016	}
32017	for {
32018		next, err := page.fn(ctx, page.srlr)
32019		if err != nil {
32020			return err
32021		}
32022		page.srlr = next
32023		if !next.hasNextLink() || !next.IsEmpty() {
32024			break
32025		}
32026	}
32027	return nil
32028}
32029
32030// Next advances to the next page of values.  If there was an error making
32031// the request the page does not advance and the error is returned.
32032// Deprecated: Use NextWithContext() instead.
32033func (page *SecurityRuleListResultPage) Next() error {
32034	return page.NextWithContext(context.Background())
32035}
32036
32037// NotDone returns true if the page enumeration should be started or is not yet complete.
32038func (page SecurityRuleListResultPage) NotDone() bool {
32039	return !page.srlr.IsEmpty()
32040}
32041
32042// Response returns the raw server response from the last page request.
32043func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
32044	return page.srlr
32045}
32046
32047// Values returns the slice of values for the current page or nil if there are no values.
32048func (page SecurityRuleListResultPage) Values() []SecurityRule {
32049	if page.srlr.IsEmpty() {
32050		return nil
32051	}
32052	return *page.srlr.Value
32053}
32054
32055// Creates a new instance of the SecurityRuleListResultPage type.
32056func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
32057	return SecurityRuleListResultPage{
32058		fn:   getNextPage,
32059		srlr: cur,
32060	}
32061}
32062
32063// SecurityRulePropertiesFormat security rule resource.
32064type SecurityRulePropertiesFormat struct {
32065	// Description - A description for this rule. Restricted to 140 chars.
32066	Description *string `json:"description,omitempty"`
32067	// Protocol - Network protocol this rule applies to. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolIcmp', 'SecurityRuleProtocolEsp', 'SecurityRuleProtocolAsterisk', 'SecurityRuleProtocolAh'
32068	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
32069	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
32070	SourcePortRange *string `json:"sourcePortRange,omitempty"`
32071	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
32072	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
32073	// 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.
32074	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
32075	// SourceAddressPrefixes - The CIDR or source IP ranges.
32076	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
32077	// SourceApplicationSecurityGroups - The application security group specified as source.
32078	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
32079	// 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.
32080	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
32081	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
32082	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
32083	// DestinationApplicationSecurityGroups - The application security group specified as destination.
32084	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
32085	// SourcePortRanges - The source port ranges.
32086	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
32087	// DestinationPortRanges - The destination port ranges.
32088	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
32089	// Access - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
32090	Access SecurityRuleAccess `json:"access,omitempty"`
32091	// 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.
32092	Priority *int32 `json:"priority,omitempty"`
32093	// Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
32094	Direction SecurityRuleDirection `json:"direction,omitempty"`
32095	// ProvisioningState - READ-ONLY; The provisioning state of the security rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
32096	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32097}
32098
32099// MarshalJSON is the custom marshaler for SecurityRulePropertiesFormat.
32100func (srpf SecurityRulePropertiesFormat) MarshalJSON() ([]byte, error) {
32101	objectMap := make(map[string]interface{})
32102	if srpf.Description != nil {
32103		objectMap["description"] = srpf.Description
32104	}
32105	if srpf.Protocol != "" {
32106		objectMap["protocol"] = srpf.Protocol
32107	}
32108	if srpf.SourcePortRange != nil {
32109		objectMap["sourcePortRange"] = srpf.SourcePortRange
32110	}
32111	if srpf.DestinationPortRange != nil {
32112		objectMap["destinationPortRange"] = srpf.DestinationPortRange
32113	}
32114	if srpf.SourceAddressPrefix != nil {
32115		objectMap["sourceAddressPrefix"] = srpf.SourceAddressPrefix
32116	}
32117	if srpf.SourceAddressPrefixes != nil {
32118		objectMap["sourceAddressPrefixes"] = srpf.SourceAddressPrefixes
32119	}
32120	if srpf.SourceApplicationSecurityGroups != nil {
32121		objectMap["sourceApplicationSecurityGroups"] = srpf.SourceApplicationSecurityGroups
32122	}
32123	if srpf.DestinationAddressPrefix != nil {
32124		objectMap["destinationAddressPrefix"] = srpf.DestinationAddressPrefix
32125	}
32126	if srpf.DestinationAddressPrefixes != nil {
32127		objectMap["destinationAddressPrefixes"] = srpf.DestinationAddressPrefixes
32128	}
32129	if srpf.DestinationApplicationSecurityGroups != nil {
32130		objectMap["destinationApplicationSecurityGroups"] = srpf.DestinationApplicationSecurityGroups
32131	}
32132	if srpf.SourcePortRanges != nil {
32133		objectMap["sourcePortRanges"] = srpf.SourcePortRanges
32134	}
32135	if srpf.DestinationPortRanges != nil {
32136		objectMap["destinationPortRanges"] = srpf.DestinationPortRanges
32137	}
32138	if srpf.Access != "" {
32139		objectMap["access"] = srpf.Access
32140	}
32141	if srpf.Priority != nil {
32142		objectMap["priority"] = srpf.Priority
32143	}
32144	if srpf.Direction != "" {
32145		objectMap["direction"] = srpf.Direction
32146	}
32147	return json.Marshal(objectMap)
32148}
32149
32150// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
32151// long-running operation.
32152type SecurityRulesCreateOrUpdateFuture struct {
32153	azure.FutureAPI
32154	// Result returns the result of the asynchronous operation.
32155	// If the operation has not completed it will return an error.
32156	Result func(SecurityRulesClient) (SecurityRule, error)
32157}
32158
32159// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
32160// operation.
32161type SecurityRulesDeleteFuture struct {
32162	azure.FutureAPI
32163	// Result returns the result of the asynchronous operation.
32164	// If the operation has not completed it will return an error.
32165	Result func(SecurityRulesClient) (autorest.Response, error)
32166}
32167
32168// SecurityRulesEvaluationResult network security rules evaluation result.
32169type SecurityRulesEvaluationResult struct {
32170	// Name - Name of the network security rule.
32171	Name *string `json:"name,omitempty"`
32172	// ProtocolMatched - Value indicating whether protocol is matched.
32173	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
32174	// SourceMatched - Value indicating whether source is matched.
32175	SourceMatched *bool `json:"sourceMatched,omitempty"`
32176	// SourcePortMatched - Value indicating whether source port is matched.
32177	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
32178	// DestinationMatched - Value indicating whether destination is matched.
32179	DestinationMatched *bool `json:"destinationMatched,omitempty"`
32180	// DestinationPortMatched - Value indicating whether destination port is matched.
32181	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
32182}
32183
32184// ServiceAssociationLink serviceAssociationLink resource.
32185type ServiceAssociationLink struct {
32186	// ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format.
32187	*ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"`
32188	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
32189	Name *string `json:"name,omitempty"`
32190	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
32191	Etag *string `json:"etag,omitempty"`
32192	// Type - READ-ONLY; Resource type.
32193	Type *string `json:"type,omitempty"`
32194	// ID - Resource ID.
32195	ID *string `json:"id,omitempty"`
32196}
32197
32198// MarshalJSON is the custom marshaler for ServiceAssociationLink.
32199func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) {
32200	objectMap := make(map[string]interface{})
32201	if sal.ServiceAssociationLinkPropertiesFormat != nil {
32202		objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat
32203	}
32204	if sal.Name != nil {
32205		objectMap["name"] = sal.Name
32206	}
32207	if sal.ID != nil {
32208		objectMap["id"] = sal.ID
32209	}
32210	return json.Marshal(objectMap)
32211}
32212
32213// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct.
32214func (sal *ServiceAssociationLink) UnmarshalJSON(body []byte) error {
32215	var m map[string]*json.RawMessage
32216	err := json.Unmarshal(body, &m)
32217	if err != nil {
32218		return err
32219	}
32220	for k, v := range m {
32221		switch k {
32222		case "properties":
32223			if v != nil {
32224				var serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat
32225				err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat)
32226				if err != nil {
32227					return err
32228				}
32229				sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat
32230			}
32231		case "name":
32232			if v != nil {
32233				var name string
32234				err = json.Unmarshal(*v, &name)
32235				if err != nil {
32236					return err
32237				}
32238				sal.Name = &name
32239			}
32240		case "etag":
32241			if v != nil {
32242				var etag string
32243				err = json.Unmarshal(*v, &etag)
32244				if err != nil {
32245					return err
32246				}
32247				sal.Etag = &etag
32248			}
32249		case "type":
32250			if v != nil {
32251				var typeVar string
32252				err = json.Unmarshal(*v, &typeVar)
32253				if err != nil {
32254					return err
32255				}
32256				sal.Type = &typeVar
32257			}
32258		case "id":
32259			if v != nil {
32260				var ID string
32261				err = json.Unmarshal(*v, &ID)
32262				if err != nil {
32263					return err
32264				}
32265				sal.ID = &ID
32266			}
32267		}
32268	}
32269
32270	return nil
32271}
32272
32273// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink.
32274type ServiceAssociationLinkPropertiesFormat struct {
32275	// LinkedResourceType - Resource type of the linked resource.
32276	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
32277	// Link - Link to the external resource.
32278	Link *string `json:"link,omitempty"`
32279	// ProvisioningState - READ-ONLY; The provisioning state of the service association link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
32280	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32281	// AllowDelete - If true, the resource can be deleted.
32282	AllowDelete *bool `json:"allowDelete,omitempty"`
32283	// Locations - A list of locations.
32284	Locations *[]string `json:"locations,omitempty"`
32285}
32286
32287// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat.
32288func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
32289	objectMap := make(map[string]interface{})
32290	if salpf.LinkedResourceType != nil {
32291		objectMap["linkedResourceType"] = salpf.LinkedResourceType
32292	}
32293	if salpf.Link != nil {
32294		objectMap["link"] = salpf.Link
32295	}
32296	if salpf.AllowDelete != nil {
32297		objectMap["allowDelete"] = salpf.AllowDelete
32298	}
32299	if salpf.Locations != nil {
32300		objectMap["locations"] = salpf.Locations
32301	}
32302	return json.Marshal(objectMap)
32303}
32304
32305// ServiceAssociationLinksListResult response for ServiceAssociationLinks_List operation.
32306type ServiceAssociationLinksListResult struct {
32307	autorest.Response `json:"-"`
32308	// Value - The service association links in a subnet.
32309	Value *[]ServiceAssociationLink `json:"value,omitempty"`
32310	// NextLink - READ-ONLY; The URL to get the next set of results.
32311	NextLink *string `json:"nextLink,omitempty"`
32312}
32313
32314// MarshalJSON is the custom marshaler for ServiceAssociationLinksListResult.
32315func (sallr ServiceAssociationLinksListResult) MarshalJSON() ([]byte, error) {
32316	objectMap := make(map[string]interface{})
32317	if sallr.Value != nil {
32318		objectMap["value"] = sallr.Value
32319	}
32320	return json.Marshal(objectMap)
32321}
32322
32323// ServiceDelegationPropertiesFormat properties of a service delegation.
32324type ServiceDelegationPropertiesFormat struct {
32325	// ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers).
32326	ServiceName *string `json:"serviceName,omitempty"`
32327	// Actions - READ-ONLY; The actions permitted to the service upon delegation.
32328	Actions *[]string `json:"actions,omitempty"`
32329	// ProvisioningState - READ-ONLY; The provisioning state of the service delegation resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
32330	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32331}
32332
32333// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat.
32334func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) {
32335	objectMap := make(map[string]interface{})
32336	if sdpf.ServiceName != nil {
32337		objectMap["serviceName"] = sdpf.ServiceName
32338	}
32339	return json.Marshal(objectMap)
32340}
32341
32342// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
32343// a long-running operation.
32344type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
32345	azure.FutureAPI
32346	// Result returns the result of the asynchronous operation.
32347	// If the operation has not completed it will return an error.
32348	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
32349}
32350
32351// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
32352// long-running operation.
32353type ServiceEndpointPoliciesDeleteFuture struct {
32354	azure.FutureAPI
32355	// Result returns the result of the asynchronous operation.
32356	// If the operation has not completed it will return an error.
32357	Result func(ServiceEndpointPoliciesClient) (autorest.Response, error)
32358}
32359
32360// ServiceEndpointPolicy service End point policy resource.
32361type ServiceEndpointPolicy struct {
32362	autorest.Response `json:"-"`
32363	// ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy.
32364	*ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"`
32365	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
32366	Etag *string `json:"etag,omitempty"`
32367	// Kind - READ-ONLY; Kind of service endpoint policy. This is metadata used for the Azure portal experience.
32368	Kind *string `json:"kind,omitempty"`
32369	// ID - Resource ID.
32370	ID *string `json:"id,omitempty"`
32371	// Name - READ-ONLY; Resource name.
32372	Name *string `json:"name,omitempty"`
32373	// Type - READ-ONLY; Resource type.
32374	Type *string `json:"type,omitempty"`
32375	// Location - Resource location.
32376	Location *string `json:"location,omitempty"`
32377	// Tags - Resource tags.
32378	Tags map[string]*string `json:"tags"`
32379}
32380
32381// MarshalJSON is the custom marshaler for ServiceEndpointPolicy.
32382func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) {
32383	objectMap := make(map[string]interface{})
32384	if sep.ServiceEndpointPolicyPropertiesFormat != nil {
32385		objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat
32386	}
32387	if sep.ID != nil {
32388		objectMap["id"] = sep.ID
32389	}
32390	if sep.Location != nil {
32391		objectMap["location"] = sep.Location
32392	}
32393	if sep.Tags != nil {
32394		objectMap["tags"] = sep.Tags
32395	}
32396	return json.Marshal(objectMap)
32397}
32398
32399// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct.
32400func (sep *ServiceEndpointPolicy) UnmarshalJSON(body []byte) error {
32401	var m map[string]*json.RawMessage
32402	err := json.Unmarshal(body, &m)
32403	if err != nil {
32404		return err
32405	}
32406	for k, v := range m {
32407		switch k {
32408		case "properties":
32409			if v != nil {
32410				var serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat
32411				err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat)
32412				if err != nil {
32413					return err
32414				}
32415				sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat
32416			}
32417		case "etag":
32418			if v != nil {
32419				var etag string
32420				err = json.Unmarshal(*v, &etag)
32421				if err != nil {
32422					return err
32423				}
32424				sep.Etag = &etag
32425			}
32426		case "kind":
32427			if v != nil {
32428				var kind string
32429				err = json.Unmarshal(*v, &kind)
32430				if err != nil {
32431					return err
32432				}
32433				sep.Kind = &kind
32434			}
32435		case "id":
32436			if v != nil {
32437				var ID string
32438				err = json.Unmarshal(*v, &ID)
32439				if err != nil {
32440					return err
32441				}
32442				sep.ID = &ID
32443			}
32444		case "name":
32445			if v != nil {
32446				var name string
32447				err = json.Unmarshal(*v, &name)
32448				if err != nil {
32449					return err
32450				}
32451				sep.Name = &name
32452			}
32453		case "type":
32454			if v != nil {
32455				var typeVar string
32456				err = json.Unmarshal(*v, &typeVar)
32457				if err != nil {
32458					return err
32459				}
32460				sep.Type = &typeVar
32461			}
32462		case "location":
32463			if v != nil {
32464				var location string
32465				err = json.Unmarshal(*v, &location)
32466				if err != nil {
32467					return err
32468				}
32469				sep.Location = &location
32470			}
32471		case "tags":
32472			if v != nil {
32473				var tags map[string]*string
32474				err = json.Unmarshal(*v, &tags)
32475				if err != nil {
32476					return err
32477				}
32478				sep.Tags = tags
32479			}
32480		}
32481	}
32482
32483	return nil
32484}
32485
32486// ServiceEndpointPolicyDefinition service Endpoint policy definitions.
32487type ServiceEndpointPolicyDefinition struct {
32488	autorest.Response `json:"-"`
32489	// ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition.
32490	*ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"`
32491	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
32492	Name *string `json:"name,omitempty"`
32493	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
32494	Etag *string `json:"etag,omitempty"`
32495	// ID - Resource ID.
32496	ID *string `json:"id,omitempty"`
32497}
32498
32499// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition.
32500func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) {
32501	objectMap := make(map[string]interface{})
32502	if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil {
32503		objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat
32504	}
32505	if sepd.Name != nil {
32506		objectMap["name"] = sepd.Name
32507	}
32508	if sepd.ID != nil {
32509		objectMap["id"] = sepd.ID
32510	}
32511	return json.Marshal(objectMap)
32512}
32513
32514// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct.
32515func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error {
32516	var m map[string]*json.RawMessage
32517	err := json.Unmarshal(body, &m)
32518	if err != nil {
32519		return err
32520	}
32521	for k, v := range m {
32522		switch k {
32523		case "properties":
32524			if v != nil {
32525				var serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat
32526				err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat)
32527				if err != nil {
32528					return err
32529				}
32530				sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat
32531			}
32532		case "name":
32533			if v != nil {
32534				var name string
32535				err = json.Unmarshal(*v, &name)
32536				if err != nil {
32537					return err
32538				}
32539				sepd.Name = &name
32540			}
32541		case "etag":
32542			if v != nil {
32543				var etag string
32544				err = json.Unmarshal(*v, &etag)
32545				if err != nil {
32546					return err
32547				}
32548				sepd.Etag = &etag
32549			}
32550		case "id":
32551			if v != nil {
32552				var ID string
32553				err = json.Unmarshal(*v, &ID)
32554				if err != nil {
32555					return err
32556				}
32557				sepd.ID = &ID
32558			}
32559		}
32560	}
32561
32562	return nil
32563}
32564
32565// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service
32566// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
32567type ServiceEndpointPolicyDefinitionListResult struct {
32568	autorest.Response `json:"-"`
32569	// Value - The service endpoint policy definition in a service endpoint policy.
32570	Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"`
32571	// NextLink - The URL to get the next set of results.
32572	NextLink *string `json:"nextLink,omitempty"`
32573}
32574
32575// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of
32576// ServiceEndpointPolicyDefinition values.
32577type ServiceEndpointPolicyDefinitionListResultIterator struct {
32578	i    int
32579	page ServiceEndpointPolicyDefinitionListResultPage
32580}
32581
32582// NextWithContext advances to the next value.  If there was an error making
32583// the request the iterator does not advance and the error is returned.
32584func (iter *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
32585	if tracing.IsEnabled() {
32586		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.NextWithContext")
32587		defer func() {
32588			sc := -1
32589			if iter.Response().Response.Response != nil {
32590				sc = iter.Response().Response.Response.StatusCode
32591			}
32592			tracing.EndSpan(ctx, sc, err)
32593		}()
32594	}
32595	iter.i++
32596	if iter.i < len(iter.page.Values()) {
32597		return nil
32598	}
32599	err = iter.page.NextWithContext(ctx)
32600	if err != nil {
32601		iter.i--
32602		return err
32603	}
32604	iter.i = 0
32605	return nil
32606}
32607
32608// Next advances to the next value.  If there was an error making
32609// the request the iterator does not advance and the error is returned.
32610// Deprecated: Use NextWithContext() instead.
32611func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
32612	return iter.NextWithContext(context.Background())
32613}
32614
32615// NotDone returns true if the enumeration should be started or is not yet complete.
32616func (iter ServiceEndpointPolicyDefinitionListResultIterator) NotDone() bool {
32617	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32618}
32619
32620// Response returns the raw server response from the last page request.
32621func (iter ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult {
32622	return iter.page.Response()
32623}
32624
32625// Value returns the current value or a zero-initialized value if the
32626// iterator has advanced beyond the end of the collection.
32627func (iter ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition {
32628	if !iter.page.NotDone() {
32629		return ServiceEndpointPolicyDefinition{}
32630	}
32631	return iter.page.Values()[iter.i]
32632}
32633
32634// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
32635func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
32636	return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
32637}
32638
32639// IsEmpty returns true if the ListResult contains no values.
32640func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
32641	return sepdlr.Value == nil || len(*sepdlr.Value) == 0
32642}
32643
32644// hasNextLink returns true if the NextLink is not empty.
32645func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool {
32646	return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0
32647}
32648
32649// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
32650// It returns nil if no more results exist.
32651func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
32652	if !sepdlr.hasNextLink() {
32653		return nil, nil
32654	}
32655	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32656		autorest.AsJSON(),
32657		autorest.AsGet(),
32658		autorest.WithBaseURL(to.String(sepdlr.NextLink)))
32659}
32660
32661// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
32662type ServiceEndpointPolicyDefinitionListResultPage struct {
32663	fn     func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
32664	sepdlr ServiceEndpointPolicyDefinitionListResult
32665}
32666
32667// NextWithContext advances to the next page of values.  If there was an error making
32668// the request the page does not advance and the error is returned.
32669func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
32670	if tracing.IsEnabled() {
32671		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext")
32672		defer func() {
32673			sc := -1
32674			if page.Response().Response.Response != nil {
32675				sc = page.Response().Response.Response.StatusCode
32676			}
32677			tracing.EndSpan(ctx, sc, err)
32678		}()
32679	}
32680	for {
32681		next, err := page.fn(ctx, page.sepdlr)
32682		if err != nil {
32683			return err
32684		}
32685		page.sepdlr = next
32686		if !next.hasNextLink() || !next.IsEmpty() {
32687			break
32688		}
32689	}
32690	return nil
32691}
32692
32693// Next advances to the next page of values.  If there was an error making
32694// the request the page does not advance and the error is returned.
32695// Deprecated: Use NextWithContext() instead.
32696func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
32697	return page.NextWithContext(context.Background())
32698}
32699
32700// NotDone returns true if the page enumeration should be started or is not yet complete.
32701func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
32702	return !page.sepdlr.IsEmpty()
32703}
32704
32705// Response returns the raw server response from the last page request.
32706func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult {
32707	return page.sepdlr
32708}
32709
32710// Values returns the slice of values for the current page or nil if there are no values.
32711func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition {
32712	if page.sepdlr.IsEmpty() {
32713		return nil
32714	}
32715	return *page.sepdlr.Value
32716}
32717
32718// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
32719func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
32720	return ServiceEndpointPolicyDefinitionListResultPage{
32721		fn:     getNextPage,
32722		sepdlr: cur,
32723	}
32724}
32725
32726// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
32727type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
32728	// Description - A description for this rule. Restricted to 140 chars.
32729	Description *string `json:"description,omitempty"`
32730	// Service - Service endpoint name.
32731	Service *string `json:"service,omitempty"`
32732	// ServiceResources - A list of service resources.
32733	ServiceResources *[]string `json:"serviceResources,omitempty"`
32734	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy definition resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
32735	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32736}
32737
32738// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat.
32739func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) {
32740	objectMap := make(map[string]interface{})
32741	if sepdpf.Description != nil {
32742		objectMap["description"] = sepdpf.Description
32743	}
32744	if sepdpf.Service != nil {
32745		objectMap["service"] = sepdpf.Service
32746	}
32747	if sepdpf.ServiceResources != nil {
32748		objectMap["serviceResources"] = sepdpf.ServiceResources
32749	}
32750	return json.Marshal(objectMap)
32751}
32752
32753// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
32754// results of a long-running operation.
32755type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
32756	azure.FutureAPI
32757	// Result returns the result of the asynchronous operation.
32758	// If the operation has not completed it will return an error.
32759	Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error)
32760}
32761
32762// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
32763// a long-running operation.
32764type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
32765	azure.FutureAPI
32766	// Result returns the result of the asynchronous operation.
32767	// If the operation has not completed it will return an error.
32768	Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error)
32769}
32770
32771// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
32772type ServiceEndpointPolicyListResult struct {
32773	autorest.Response `json:"-"`
32774	// Value - A list of ServiceEndpointPolicy resources.
32775	Value *[]ServiceEndpointPolicy `json:"value,omitempty"`
32776	// NextLink - READ-ONLY; The URL to get the next set of results.
32777	NextLink *string `json:"nextLink,omitempty"`
32778}
32779
32780// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult.
32781func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) {
32782	objectMap := make(map[string]interface{})
32783	if seplr.Value != nil {
32784		objectMap["value"] = seplr.Value
32785	}
32786	return json.Marshal(objectMap)
32787}
32788
32789// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
32790// values.
32791type ServiceEndpointPolicyListResultIterator struct {
32792	i    int
32793	page ServiceEndpointPolicyListResultPage
32794}
32795
32796// NextWithContext advances to the next value.  If there was an error making
32797// the request the iterator does not advance and the error is returned.
32798func (iter *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
32799	if tracing.IsEnabled() {
32800		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.NextWithContext")
32801		defer func() {
32802			sc := -1
32803			if iter.Response().Response.Response != nil {
32804				sc = iter.Response().Response.Response.StatusCode
32805			}
32806			tracing.EndSpan(ctx, sc, err)
32807		}()
32808	}
32809	iter.i++
32810	if iter.i < len(iter.page.Values()) {
32811		return nil
32812	}
32813	err = iter.page.NextWithContext(ctx)
32814	if err != nil {
32815		iter.i--
32816		return err
32817	}
32818	iter.i = 0
32819	return nil
32820}
32821
32822// Next advances to the next value.  If there was an error making
32823// the request the iterator does not advance and the error is returned.
32824// Deprecated: Use NextWithContext() instead.
32825func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
32826	return iter.NextWithContext(context.Background())
32827}
32828
32829// NotDone returns true if the enumeration should be started or is not yet complete.
32830func (iter ServiceEndpointPolicyListResultIterator) NotDone() bool {
32831	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32832}
32833
32834// Response returns the raw server response from the last page request.
32835func (iter ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult {
32836	return iter.page.Response()
32837}
32838
32839// Value returns the current value or a zero-initialized value if the
32840// iterator has advanced beyond the end of the collection.
32841func (iter ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy {
32842	if !iter.page.NotDone() {
32843		return ServiceEndpointPolicy{}
32844	}
32845	return iter.page.Values()[iter.i]
32846}
32847
32848// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
32849func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
32850	return ServiceEndpointPolicyListResultIterator{page: page}
32851}
32852
32853// IsEmpty returns true if the ListResult contains no values.
32854func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
32855	return seplr.Value == nil || len(*seplr.Value) == 0
32856}
32857
32858// hasNextLink returns true if the NextLink is not empty.
32859func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool {
32860	return seplr.NextLink != nil && len(*seplr.NextLink) != 0
32861}
32862
32863// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
32864// It returns nil if no more results exist.
32865func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
32866	if !seplr.hasNextLink() {
32867		return nil, nil
32868	}
32869	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32870		autorest.AsJSON(),
32871		autorest.AsGet(),
32872		autorest.WithBaseURL(to.String(seplr.NextLink)))
32873}
32874
32875// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
32876type ServiceEndpointPolicyListResultPage struct {
32877	fn    func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
32878	seplr ServiceEndpointPolicyListResult
32879}
32880
32881// NextWithContext advances to the next page of values.  If there was an error making
32882// the request the page does not advance and the error is returned.
32883func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
32884	if tracing.IsEnabled() {
32885		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext")
32886		defer func() {
32887			sc := -1
32888			if page.Response().Response.Response != nil {
32889				sc = page.Response().Response.Response.StatusCode
32890			}
32891			tracing.EndSpan(ctx, sc, err)
32892		}()
32893	}
32894	for {
32895		next, err := page.fn(ctx, page.seplr)
32896		if err != nil {
32897			return err
32898		}
32899		page.seplr = next
32900		if !next.hasNextLink() || !next.IsEmpty() {
32901			break
32902		}
32903	}
32904	return nil
32905}
32906
32907// Next advances to the next page of values.  If there was an error making
32908// the request the page does not advance and the error is returned.
32909// Deprecated: Use NextWithContext() instead.
32910func (page *ServiceEndpointPolicyListResultPage) Next() error {
32911	return page.NextWithContext(context.Background())
32912}
32913
32914// NotDone returns true if the page enumeration should be started or is not yet complete.
32915func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
32916	return !page.seplr.IsEmpty()
32917}
32918
32919// Response returns the raw server response from the last page request.
32920func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult {
32921	return page.seplr
32922}
32923
32924// Values returns the slice of values for the current page or nil if there are no values.
32925func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy {
32926	if page.seplr.IsEmpty() {
32927		return nil
32928	}
32929	return *page.seplr.Value
32930}
32931
32932// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
32933func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
32934	return ServiceEndpointPolicyListResultPage{
32935		fn:    getNextPage,
32936		seplr: cur,
32937	}
32938}
32939
32940// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
32941type ServiceEndpointPolicyPropertiesFormat struct {
32942	// ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
32943	ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"`
32944	// Subnets - READ-ONLY; A collection of references to subnets.
32945	Subnets *[]Subnet `json:"subnets,omitempty"`
32946	// ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource.
32947	ResourceGUID *string `json:"resourceGuid,omitempty"`
32948	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
32949	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32950}
32951
32952// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat.
32953func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
32954	objectMap := make(map[string]interface{})
32955	if seppf.ServiceEndpointPolicyDefinitions != nil {
32956		objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions
32957	}
32958	return json.Marshal(objectMap)
32959}
32960
32961// ServiceEndpointPropertiesFormat the service endpoint properties.
32962type ServiceEndpointPropertiesFormat struct {
32963	// Service - The type of the endpoint service.
32964	Service *string `json:"service,omitempty"`
32965	// Locations - A list of locations.
32966	Locations *[]string `json:"locations,omitempty"`
32967	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
32968	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32969}
32970
32971// MarshalJSON is the custom marshaler for ServiceEndpointPropertiesFormat.
32972func (sepf ServiceEndpointPropertiesFormat) MarshalJSON() ([]byte, error) {
32973	objectMap := make(map[string]interface{})
32974	if sepf.Service != nil {
32975		objectMap["service"] = sepf.Service
32976	}
32977	if sepf.Locations != nil {
32978		objectMap["locations"] = sepf.Locations
32979	}
32980	return json.Marshal(objectMap)
32981}
32982
32983// ServiceTagInformation the service tag information.
32984type ServiceTagInformation struct {
32985	// Properties - READ-ONLY; Properties of the service tag information.
32986	Properties *ServiceTagInformationPropertiesFormat `json:"properties,omitempty"`
32987	// Name - READ-ONLY; The name of service tag.
32988	Name *string `json:"name,omitempty"`
32989	// ID - READ-ONLY; The ID of service tag.
32990	ID *string `json:"id,omitempty"`
32991}
32992
32993// ServiceTagInformationPropertiesFormat properties of the service tag information.
32994type ServiceTagInformationPropertiesFormat struct {
32995	// ChangeNumber - READ-ONLY; The iteration number of service tag.
32996	ChangeNumber *string `json:"changeNumber,omitempty"`
32997	// Region - READ-ONLY; The region of service tag.
32998	Region *string `json:"region,omitempty"`
32999	// SystemService - READ-ONLY; The name of system service.
33000	SystemService *string `json:"systemService,omitempty"`
33001	// AddressPrefixes - READ-ONLY; The list of IP address prefixes.
33002	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
33003}
33004
33005// ServiceTagsListResult response for the ListServiceTags API service call.
33006type ServiceTagsListResult struct {
33007	autorest.Response `json:"-"`
33008	// Name - READ-ONLY; The name of the cloud.
33009	Name *string `json:"name,omitempty"`
33010	// ID - READ-ONLY; The ID of the cloud.
33011	ID *string `json:"id,omitempty"`
33012	// Type - READ-ONLY; The azure resource type.
33013	Type *string `json:"type,omitempty"`
33014	// ChangeNumber - READ-ONLY; The iteration number.
33015	ChangeNumber *string `json:"changeNumber,omitempty"`
33016	// Cloud - READ-ONLY; The name of the cloud.
33017	Cloud *string `json:"cloud,omitempty"`
33018	// Values - READ-ONLY; The list of service tag information resources.
33019	Values *[]ServiceTagInformation `json:"values,omitempty"`
33020	// NextLink - READ-ONLY; The URL to get next page of service tag information resources.
33021	NextLink *string `json:"nextLink,omitempty"`
33022}
33023
33024// SessionIds list of session IDs.
33025type SessionIds struct {
33026	// SessionIds - List of session IDs.
33027	SessionIds *[]string `json:"sessionIds,omitempty"`
33028}
33029
33030// StaticRoute list of all Static Routes.
33031type StaticRoute struct {
33032	// Name - The name of the StaticRoute that is unique within a VnetRoute.
33033	Name *string `json:"name,omitempty"`
33034	// AddressPrefixes - List of all address prefixes.
33035	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
33036	// NextHopIPAddress - The ip address of the next hop.
33037	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
33038}
33039
33040// String ...
33041type String struct {
33042	autorest.Response `json:"-"`
33043	Value             *string `json:"value,omitempty"`
33044}
33045
33046// Subnet subnet in a virtual network resource.
33047type Subnet struct {
33048	autorest.Response `json:"-"`
33049	// SubnetPropertiesFormat - Properties of the subnet.
33050	*SubnetPropertiesFormat `json:"properties,omitempty"`
33051	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
33052	Name *string `json:"name,omitempty"`
33053	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
33054	Etag *string `json:"etag,omitempty"`
33055	// ID - Resource ID.
33056	ID *string `json:"id,omitempty"`
33057}
33058
33059// MarshalJSON is the custom marshaler for Subnet.
33060func (s Subnet) MarshalJSON() ([]byte, error) {
33061	objectMap := make(map[string]interface{})
33062	if s.SubnetPropertiesFormat != nil {
33063		objectMap["properties"] = s.SubnetPropertiesFormat
33064	}
33065	if s.Name != nil {
33066		objectMap["name"] = s.Name
33067	}
33068	if s.ID != nil {
33069		objectMap["id"] = s.ID
33070	}
33071	return json.Marshal(objectMap)
33072}
33073
33074// UnmarshalJSON is the custom unmarshaler for Subnet struct.
33075func (s *Subnet) UnmarshalJSON(body []byte) error {
33076	var m map[string]*json.RawMessage
33077	err := json.Unmarshal(body, &m)
33078	if err != nil {
33079		return err
33080	}
33081	for k, v := range m {
33082		switch k {
33083		case "properties":
33084			if v != nil {
33085				var subnetPropertiesFormat SubnetPropertiesFormat
33086				err = json.Unmarshal(*v, &subnetPropertiesFormat)
33087				if err != nil {
33088					return err
33089				}
33090				s.SubnetPropertiesFormat = &subnetPropertiesFormat
33091			}
33092		case "name":
33093			if v != nil {
33094				var name string
33095				err = json.Unmarshal(*v, &name)
33096				if err != nil {
33097					return err
33098				}
33099				s.Name = &name
33100			}
33101		case "etag":
33102			if v != nil {
33103				var etag string
33104				err = json.Unmarshal(*v, &etag)
33105				if err != nil {
33106					return err
33107				}
33108				s.Etag = &etag
33109			}
33110		case "id":
33111			if v != nil {
33112				var ID string
33113				err = json.Unmarshal(*v, &ID)
33114				if err != nil {
33115					return err
33116				}
33117				s.ID = &ID
33118			}
33119		}
33120	}
33121
33122	return nil
33123}
33124
33125// SubnetAssociation subnet and it's custom security rules.
33126type SubnetAssociation struct {
33127	// ID - READ-ONLY; Subnet ID.
33128	ID *string `json:"id,omitempty"`
33129	// SecurityRules - Collection of custom security rules.
33130	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
33131}
33132
33133// MarshalJSON is the custom marshaler for SubnetAssociation.
33134func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
33135	objectMap := make(map[string]interface{})
33136	if sa.SecurityRules != nil {
33137		objectMap["securityRules"] = sa.SecurityRules
33138	}
33139	return json.Marshal(objectMap)
33140}
33141
33142// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
33143// network.
33144type SubnetListResult struct {
33145	autorest.Response `json:"-"`
33146	// Value - The subnets in a virtual network.
33147	Value *[]Subnet `json:"value,omitempty"`
33148	// NextLink - The URL to get the next set of results.
33149	NextLink *string `json:"nextLink,omitempty"`
33150}
33151
33152// SubnetListResultIterator provides access to a complete listing of Subnet values.
33153type SubnetListResultIterator struct {
33154	i    int
33155	page SubnetListResultPage
33156}
33157
33158// NextWithContext advances to the next value.  If there was an error making
33159// the request the iterator does not advance and the error is returned.
33160func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
33161	if tracing.IsEnabled() {
33162		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
33163		defer func() {
33164			sc := -1
33165			if iter.Response().Response.Response != nil {
33166				sc = iter.Response().Response.Response.StatusCode
33167			}
33168			tracing.EndSpan(ctx, sc, err)
33169		}()
33170	}
33171	iter.i++
33172	if iter.i < len(iter.page.Values()) {
33173		return nil
33174	}
33175	err = iter.page.NextWithContext(ctx)
33176	if err != nil {
33177		iter.i--
33178		return err
33179	}
33180	iter.i = 0
33181	return nil
33182}
33183
33184// Next advances to the next value.  If there was an error making
33185// the request the iterator does not advance and the error is returned.
33186// Deprecated: Use NextWithContext() instead.
33187func (iter *SubnetListResultIterator) Next() error {
33188	return iter.NextWithContext(context.Background())
33189}
33190
33191// NotDone returns true if the enumeration should be started or is not yet complete.
33192func (iter SubnetListResultIterator) NotDone() bool {
33193	return iter.page.NotDone() && iter.i < len(iter.page.Values())
33194}
33195
33196// Response returns the raw server response from the last page request.
33197func (iter SubnetListResultIterator) Response() SubnetListResult {
33198	return iter.page.Response()
33199}
33200
33201// Value returns the current value or a zero-initialized value if the
33202// iterator has advanced beyond the end of the collection.
33203func (iter SubnetListResultIterator) Value() Subnet {
33204	if !iter.page.NotDone() {
33205		return Subnet{}
33206	}
33207	return iter.page.Values()[iter.i]
33208}
33209
33210// Creates a new instance of the SubnetListResultIterator type.
33211func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
33212	return SubnetListResultIterator{page: page}
33213}
33214
33215// IsEmpty returns true if the ListResult contains no values.
33216func (slr SubnetListResult) IsEmpty() bool {
33217	return slr.Value == nil || len(*slr.Value) == 0
33218}
33219
33220// hasNextLink returns true if the NextLink is not empty.
33221func (slr SubnetListResult) hasNextLink() bool {
33222	return slr.NextLink != nil && len(*slr.NextLink) != 0
33223}
33224
33225// subnetListResultPreparer prepares a request to retrieve the next set of results.
33226// It returns nil if no more results exist.
33227func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
33228	if !slr.hasNextLink() {
33229		return nil, nil
33230	}
33231	return autorest.Prepare((&http.Request{}).WithContext(ctx),
33232		autorest.AsJSON(),
33233		autorest.AsGet(),
33234		autorest.WithBaseURL(to.String(slr.NextLink)))
33235}
33236
33237// SubnetListResultPage contains a page of Subnet values.
33238type SubnetListResultPage struct {
33239	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
33240	slr SubnetListResult
33241}
33242
33243// NextWithContext advances to the next page of values.  If there was an error making
33244// the request the page does not advance and the error is returned.
33245func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
33246	if tracing.IsEnabled() {
33247		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
33248		defer func() {
33249			sc := -1
33250			if page.Response().Response.Response != nil {
33251				sc = page.Response().Response.Response.StatusCode
33252			}
33253			tracing.EndSpan(ctx, sc, err)
33254		}()
33255	}
33256	for {
33257		next, err := page.fn(ctx, page.slr)
33258		if err != nil {
33259			return err
33260		}
33261		page.slr = next
33262		if !next.hasNextLink() || !next.IsEmpty() {
33263			break
33264		}
33265	}
33266	return nil
33267}
33268
33269// Next advances to the next page of values.  If there was an error making
33270// the request the page does not advance and the error is returned.
33271// Deprecated: Use NextWithContext() instead.
33272func (page *SubnetListResultPage) Next() error {
33273	return page.NextWithContext(context.Background())
33274}
33275
33276// NotDone returns true if the page enumeration should be started or is not yet complete.
33277func (page SubnetListResultPage) NotDone() bool {
33278	return !page.slr.IsEmpty()
33279}
33280
33281// Response returns the raw server response from the last page request.
33282func (page SubnetListResultPage) Response() SubnetListResult {
33283	return page.slr
33284}
33285
33286// Values returns the slice of values for the current page or nil if there are no values.
33287func (page SubnetListResultPage) Values() []Subnet {
33288	if page.slr.IsEmpty() {
33289		return nil
33290	}
33291	return *page.slr.Value
33292}
33293
33294// Creates a new instance of the SubnetListResultPage type.
33295func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
33296	return SubnetListResultPage{
33297		fn:  getNextPage,
33298		slr: cur,
33299	}
33300}
33301
33302// SubnetPropertiesFormat properties of the subnet.
33303type SubnetPropertiesFormat struct {
33304	// AddressPrefix - The address prefix for the subnet.
33305	AddressPrefix *string `json:"addressPrefix,omitempty"`
33306	// AddressPrefixes - List of address prefixes for the subnet.
33307	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
33308	// NetworkSecurityGroup - The reference to the NetworkSecurityGroup resource.
33309	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
33310	// RouteTable - The reference to the RouteTable resource.
33311	RouteTable *RouteTable `json:"routeTable,omitempty"`
33312	// NatGateway - Nat gateway associated with this subnet.
33313	NatGateway *SubResource `json:"natGateway,omitempty"`
33314	// ServiceEndpoints - An array of service endpoints.
33315	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
33316	// ServiceEndpointPolicies - An array of service endpoint policies.
33317	ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"`
33318	// PrivateEndpoints - READ-ONLY; An array of references to private endpoints.
33319	PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"`
33320	// IPConfigurations - READ-ONLY; An array of references to the network interface IP configurations using subnet.
33321	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
33322	// IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet.
33323	IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"`
33324	// IPAllocations - Array of IpAllocation which reference this subnet.
33325	IPAllocations *[]SubResource `json:"ipAllocations,omitempty"`
33326	// ResourceNavigationLinks - READ-ONLY; An array of references to the external resources using subnet.
33327	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
33328	// ServiceAssociationLinks - READ-ONLY; An array of references to services injecting into this subnet.
33329	ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"`
33330	// Delegations - An array of references to the delegations on the subnet.
33331	Delegations *[]Delegation `json:"delegations,omitempty"`
33332	// Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.
33333	Purpose *string `json:"purpose,omitempty"`
33334	// ProvisioningState - READ-ONLY; The provisioning state of the subnet resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
33335	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
33336	// PrivateEndpointNetworkPolicies - Enable or Disable apply network policies on private end point in the subnet.
33337	PrivateEndpointNetworkPolicies *string `json:"privateEndpointNetworkPolicies,omitempty"`
33338	// PrivateLinkServiceNetworkPolicies - Enable or Disable apply network policies on private link service in the subnet.
33339	PrivateLinkServiceNetworkPolicies *string `json:"privateLinkServiceNetworkPolicies,omitempty"`
33340}
33341
33342// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
33343func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
33344	objectMap := make(map[string]interface{})
33345	if spf.AddressPrefix != nil {
33346		objectMap["addressPrefix"] = spf.AddressPrefix
33347	}
33348	if spf.AddressPrefixes != nil {
33349		objectMap["addressPrefixes"] = spf.AddressPrefixes
33350	}
33351	if spf.NetworkSecurityGroup != nil {
33352		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
33353	}
33354	if spf.RouteTable != nil {
33355		objectMap["routeTable"] = spf.RouteTable
33356	}
33357	if spf.NatGateway != nil {
33358		objectMap["natGateway"] = spf.NatGateway
33359	}
33360	if spf.ServiceEndpoints != nil {
33361		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
33362	}
33363	if spf.ServiceEndpointPolicies != nil {
33364		objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies
33365	}
33366	if spf.IPAllocations != nil {
33367		objectMap["ipAllocations"] = spf.IPAllocations
33368	}
33369	if spf.Delegations != nil {
33370		objectMap["delegations"] = spf.Delegations
33371	}
33372	if spf.PrivateEndpointNetworkPolicies != nil {
33373		objectMap["privateEndpointNetworkPolicies"] = spf.PrivateEndpointNetworkPolicies
33374	}
33375	if spf.PrivateLinkServiceNetworkPolicies != nil {
33376		objectMap["privateLinkServiceNetworkPolicies"] = spf.PrivateLinkServiceNetworkPolicies
33377	}
33378	return json.Marshal(objectMap)
33379}
33380
33381// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
33382// operation.
33383type SubnetsCreateOrUpdateFuture struct {
33384	azure.FutureAPI
33385	// Result returns the result of the asynchronous operation.
33386	// If the operation has not completed it will return an error.
33387	Result func(SubnetsClient) (Subnet, error)
33388}
33389
33390// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
33391// operation.
33392type SubnetsDeleteFuture struct {
33393	azure.FutureAPI
33394	// Result returns the result of the asynchronous operation.
33395	// If the operation has not completed it will return an error.
33396	Result func(SubnetsClient) (autorest.Response, error)
33397}
33398
33399// SubnetsPrepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
33400// long-running operation.
33401type SubnetsPrepareNetworkPoliciesFuture struct {
33402	azure.FutureAPI
33403	// Result returns the result of the asynchronous operation.
33404	// If the operation has not completed it will return an error.
33405	Result func(SubnetsClient) (autorest.Response, error)
33406}
33407
33408// SubnetsUnprepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
33409// long-running operation.
33410type SubnetsUnprepareNetworkPoliciesFuture struct {
33411	azure.FutureAPI
33412	// Result returns the result of the asynchronous operation.
33413	// If the operation has not completed it will return an error.
33414	Result func(SubnetsClient) (autorest.Response, error)
33415}
33416
33417// SubResource reference to another subresource.
33418type SubResource struct {
33419	// ID - Resource ID.
33420	ID *string `json:"id,omitempty"`
33421}
33422
33423// TagsObject tags object for patch operations.
33424type TagsObject struct {
33425	// Tags - Resource tags.
33426	Tags map[string]*string `json:"tags"`
33427}
33428
33429// MarshalJSON is the custom marshaler for TagsObject.
33430func (toVar TagsObject) MarshalJSON() ([]byte, error) {
33431	objectMap := make(map[string]interface{})
33432	if toVar.Tags != nil {
33433		objectMap["tags"] = toVar.Tags
33434	}
33435	return json.Marshal(objectMap)
33436}
33437
33438// Topology topology of the specified resource group.
33439type Topology struct {
33440	autorest.Response `json:"-"`
33441	// ID - READ-ONLY; GUID representing the operation id.
33442	ID *string `json:"id,omitempty"`
33443	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
33444	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
33445	// LastModified - READ-ONLY; The datetime when the topology was last modified.
33446	LastModified *date.Time `json:"lastModified,omitempty"`
33447	// Resources - A list of topology resources.
33448	Resources *[]TopologyResource `json:"resources,omitempty"`
33449}
33450
33451// MarshalJSON is the custom marshaler for Topology.
33452func (t Topology) MarshalJSON() ([]byte, error) {
33453	objectMap := make(map[string]interface{})
33454	if t.Resources != nil {
33455		objectMap["resources"] = t.Resources
33456	}
33457	return json.Marshal(objectMap)
33458}
33459
33460// TopologyAssociation resources that have an association with the parent resource.
33461type TopologyAssociation struct {
33462	// Name - The name of the resource that is associated with the parent resource.
33463	Name *string `json:"name,omitempty"`
33464	// ResourceID - The ID of the resource that is associated with the parent resource.
33465	ResourceID *string `json:"resourceId,omitempty"`
33466	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
33467	AssociationType AssociationType `json:"associationType,omitempty"`
33468}
33469
33470// TopologyParameters parameters that define the representation of topology.
33471type TopologyParameters struct {
33472	// TargetResourceGroupName - The name of the target resource group to perform topology on.
33473	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
33474	// TargetVirtualNetwork - The reference to the Virtual Network resource.
33475	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
33476	// TargetSubnet - The reference to the Subnet resource.
33477	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
33478}
33479
33480// TopologyResource the network resource topology information for the given resource group.
33481type TopologyResource struct {
33482	// Name - Name of the resource.
33483	Name *string `json:"name,omitempty"`
33484	// ID - ID of the resource.
33485	ID *string `json:"id,omitempty"`
33486	// Location - Resource location.
33487	Location *string `json:"location,omitempty"`
33488	// Associations - Holds the associations the resource has with other resources in the resource group.
33489	Associations *[]TopologyAssociation `json:"associations,omitempty"`
33490}
33491
33492// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
33493type TrafficAnalyticsConfigurationProperties struct {
33494	// Enabled - Flag to enable/disable traffic analytics.
33495	Enabled *bool `json:"enabled,omitempty"`
33496	// WorkspaceID - The resource guid of the attached workspace.
33497	WorkspaceID *string `json:"workspaceId,omitempty"`
33498	// WorkspaceRegion - The location of the attached workspace.
33499	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
33500	// WorkspaceResourceID - Resource Id of the attached workspace.
33501	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
33502	// TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics.
33503	TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"`
33504}
33505
33506// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
33507type TrafficAnalyticsProperties struct {
33508	// NetworkWatcherFlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
33509	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
33510}
33511
33512// TrafficSelectorPolicy an traffic selector policy for a virtual network gateway connection.
33513type TrafficSelectorPolicy struct {
33514	// LocalAddressRanges - A collection of local address spaces in CIDR format.
33515	LocalAddressRanges *[]string `json:"localAddressRanges,omitempty"`
33516	// RemoteAddressRanges - A collection of remote address spaces in CIDR format.
33517	RemoteAddressRanges *[]string `json:"remoteAddressRanges,omitempty"`
33518}
33519
33520// TroubleshootingDetails information gained from troubleshooting of specified resource.
33521type TroubleshootingDetails struct {
33522	// ID - The id of the get troubleshoot operation.
33523	ID *string `json:"id,omitempty"`
33524	// ReasonType - Reason type of failure.
33525	ReasonType *string `json:"reasonType,omitempty"`
33526	// Summary - A summary of troubleshooting.
33527	Summary *string `json:"summary,omitempty"`
33528	// Detail - Details on troubleshooting results.
33529	Detail *string `json:"detail,omitempty"`
33530	// RecommendedActions - List of recommended actions.
33531	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
33532}
33533
33534// TroubleshootingParameters parameters that define the resource to troubleshoot.
33535type TroubleshootingParameters struct {
33536	// TargetResourceID - The target resource to troubleshoot.
33537	TargetResourceID *string `json:"targetResourceId,omitempty"`
33538	// TroubleshootingProperties - Properties of the troubleshooting resource.
33539	*TroubleshootingProperties `json:"properties,omitempty"`
33540}
33541
33542// MarshalJSON is the custom marshaler for TroubleshootingParameters.
33543func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
33544	objectMap := make(map[string]interface{})
33545	if tp.TargetResourceID != nil {
33546		objectMap["targetResourceId"] = tp.TargetResourceID
33547	}
33548	if tp.TroubleshootingProperties != nil {
33549		objectMap["properties"] = tp.TroubleshootingProperties
33550	}
33551	return json.Marshal(objectMap)
33552}
33553
33554// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
33555func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
33556	var m map[string]*json.RawMessage
33557	err := json.Unmarshal(body, &m)
33558	if err != nil {
33559		return err
33560	}
33561	for k, v := range m {
33562		switch k {
33563		case "targetResourceId":
33564			if v != nil {
33565				var targetResourceID string
33566				err = json.Unmarshal(*v, &targetResourceID)
33567				if err != nil {
33568					return err
33569				}
33570				tp.TargetResourceID = &targetResourceID
33571			}
33572		case "properties":
33573			if v != nil {
33574				var troubleshootingProperties TroubleshootingProperties
33575				err = json.Unmarshal(*v, &troubleshootingProperties)
33576				if err != nil {
33577					return err
33578				}
33579				tp.TroubleshootingProperties = &troubleshootingProperties
33580			}
33581		}
33582	}
33583
33584	return nil
33585}
33586
33587// TroubleshootingProperties storage location provided for troubleshoot.
33588type TroubleshootingProperties struct {
33589	// StorageID - The ID for the storage account to save the troubleshoot result.
33590	StorageID *string `json:"storageId,omitempty"`
33591	// StoragePath - The path to the blob to save the troubleshoot result in.
33592	StoragePath *string `json:"storagePath,omitempty"`
33593}
33594
33595// TroubleshootingRecommendedActions recommended actions based on discovered issues.
33596type TroubleshootingRecommendedActions struct {
33597	// ActionID - ID of the recommended action.
33598	ActionID *string `json:"actionId,omitempty"`
33599	// ActionText - Description of recommended actions.
33600	ActionText *string `json:"actionText,omitempty"`
33601	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
33602	ActionURI *string `json:"actionUri,omitempty"`
33603	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
33604	ActionURIText *string `json:"actionUriText,omitempty"`
33605}
33606
33607// TroubleshootingResult troubleshooting information gained from specified resource.
33608type TroubleshootingResult struct {
33609	autorest.Response `json:"-"`
33610	// StartTime - The start time of the troubleshooting.
33611	StartTime *date.Time `json:"startTime,omitempty"`
33612	// EndTime - The end time of the troubleshooting.
33613	EndTime *date.Time `json:"endTime,omitempty"`
33614	// Code - The result code of the troubleshooting.
33615	Code *string `json:"code,omitempty"`
33616	// Results - Information from troubleshooting.
33617	Results *[]TroubleshootingDetails `json:"results,omitempty"`
33618}
33619
33620// TunnelConnectionHealth virtualNetworkGatewayConnection properties.
33621type TunnelConnectionHealth struct {
33622	// Tunnel - READ-ONLY; Tunnel name.
33623	Tunnel *string `json:"tunnel,omitempty"`
33624	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
33625	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
33626	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection.
33627	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
33628	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection.
33629	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
33630	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
33631	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
33632}
33633
33634// UnprepareNetworkPoliciesRequest details of UnprepareNetworkPolicies for Subnet.
33635type UnprepareNetworkPoliciesRequest struct {
33636	// ServiceName - The name of the service for which subnet is being unprepared for.
33637	ServiceName *string `json:"serviceName,omitempty"`
33638}
33639
33640// Usage the network resource usage.
33641type Usage struct {
33642	// ID - READ-ONLY; Resource identifier.
33643	ID *string `json:"id,omitempty"`
33644	// Unit - An enum describing the unit of measurement.
33645	Unit *string `json:"unit,omitempty"`
33646	// CurrentValue - The current value of the usage.
33647	CurrentValue *int64 `json:"currentValue,omitempty"`
33648	// Limit - The limit of usage.
33649	Limit *int64 `json:"limit,omitempty"`
33650	// Name - The name of the type of usage.
33651	Name *UsageName `json:"name,omitempty"`
33652}
33653
33654// MarshalJSON is the custom marshaler for Usage.
33655func (u Usage) MarshalJSON() ([]byte, error) {
33656	objectMap := make(map[string]interface{})
33657	if u.Unit != nil {
33658		objectMap["unit"] = u.Unit
33659	}
33660	if u.CurrentValue != nil {
33661		objectMap["currentValue"] = u.CurrentValue
33662	}
33663	if u.Limit != nil {
33664		objectMap["limit"] = u.Limit
33665	}
33666	if u.Name != nil {
33667		objectMap["name"] = u.Name
33668	}
33669	return json.Marshal(objectMap)
33670}
33671
33672// UsageName the usage names.
33673type UsageName struct {
33674	// Value - A string describing the resource name.
33675	Value *string `json:"value,omitempty"`
33676	// LocalizedValue - A localized string describing the resource name.
33677	LocalizedValue *string `json:"localizedValue,omitempty"`
33678}
33679
33680// UsagesListResult the list usages operation response.
33681type UsagesListResult struct {
33682	autorest.Response `json:"-"`
33683	// Value - The list network resource usages.
33684	Value *[]Usage `json:"value,omitempty"`
33685	// NextLink - URL to get the next set of results.
33686	NextLink *string `json:"nextLink,omitempty"`
33687}
33688
33689// UsagesListResultIterator provides access to a complete listing of Usage values.
33690type UsagesListResultIterator struct {
33691	i    int
33692	page UsagesListResultPage
33693}
33694
33695// NextWithContext advances to the next value.  If there was an error making
33696// the request the iterator does not advance and the error is returned.
33697func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
33698	if tracing.IsEnabled() {
33699		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
33700		defer func() {
33701			sc := -1
33702			if iter.Response().Response.Response != nil {
33703				sc = iter.Response().Response.Response.StatusCode
33704			}
33705			tracing.EndSpan(ctx, sc, err)
33706		}()
33707	}
33708	iter.i++
33709	if iter.i < len(iter.page.Values()) {
33710		return nil
33711	}
33712	err = iter.page.NextWithContext(ctx)
33713	if err != nil {
33714		iter.i--
33715		return err
33716	}
33717	iter.i = 0
33718	return nil
33719}
33720
33721// Next advances to the next value.  If there was an error making
33722// the request the iterator does not advance and the error is returned.
33723// Deprecated: Use NextWithContext() instead.
33724func (iter *UsagesListResultIterator) Next() error {
33725	return iter.NextWithContext(context.Background())
33726}
33727
33728// NotDone returns true if the enumeration should be started or is not yet complete.
33729func (iter UsagesListResultIterator) NotDone() bool {
33730	return iter.page.NotDone() && iter.i < len(iter.page.Values())
33731}
33732
33733// Response returns the raw server response from the last page request.
33734func (iter UsagesListResultIterator) Response() UsagesListResult {
33735	return iter.page.Response()
33736}
33737
33738// Value returns the current value or a zero-initialized value if the
33739// iterator has advanced beyond the end of the collection.
33740func (iter UsagesListResultIterator) Value() Usage {
33741	if !iter.page.NotDone() {
33742		return Usage{}
33743	}
33744	return iter.page.Values()[iter.i]
33745}
33746
33747// Creates a new instance of the UsagesListResultIterator type.
33748func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
33749	return UsagesListResultIterator{page: page}
33750}
33751
33752// IsEmpty returns true if the ListResult contains no values.
33753func (ulr UsagesListResult) IsEmpty() bool {
33754	return ulr.Value == nil || len(*ulr.Value) == 0
33755}
33756
33757// hasNextLink returns true if the NextLink is not empty.
33758func (ulr UsagesListResult) hasNextLink() bool {
33759	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
33760}
33761
33762// usagesListResultPreparer prepares a request to retrieve the next set of results.
33763// It returns nil if no more results exist.
33764func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
33765	if !ulr.hasNextLink() {
33766		return nil, nil
33767	}
33768	return autorest.Prepare((&http.Request{}).WithContext(ctx),
33769		autorest.AsJSON(),
33770		autorest.AsGet(),
33771		autorest.WithBaseURL(to.String(ulr.NextLink)))
33772}
33773
33774// UsagesListResultPage contains a page of Usage values.
33775type UsagesListResultPage struct {
33776	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
33777	ulr UsagesListResult
33778}
33779
33780// NextWithContext advances to the next page of values.  If there was an error making
33781// the request the page does not advance and the error is returned.
33782func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
33783	if tracing.IsEnabled() {
33784		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
33785		defer func() {
33786			sc := -1
33787			if page.Response().Response.Response != nil {
33788				sc = page.Response().Response.Response.StatusCode
33789			}
33790			tracing.EndSpan(ctx, sc, err)
33791		}()
33792	}
33793	for {
33794		next, err := page.fn(ctx, page.ulr)
33795		if err != nil {
33796			return err
33797		}
33798		page.ulr = next
33799		if !next.hasNextLink() || !next.IsEmpty() {
33800			break
33801		}
33802	}
33803	return nil
33804}
33805
33806// Next advances to the next page of values.  If there was an error making
33807// the request the page does not advance and the error is returned.
33808// Deprecated: Use NextWithContext() instead.
33809func (page *UsagesListResultPage) Next() error {
33810	return page.NextWithContext(context.Background())
33811}
33812
33813// NotDone returns true if the page enumeration should be started or is not yet complete.
33814func (page UsagesListResultPage) NotDone() bool {
33815	return !page.ulr.IsEmpty()
33816}
33817
33818// Response returns the raw server response from the last page request.
33819func (page UsagesListResultPage) Response() UsagesListResult {
33820	return page.ulr
33821}
33822
33823// Values returns the slice of values for the current page or nil if there are no values.
33824func (page UsagesListResultPage) Values() []Usage {
33825	if page.ulr.IsEmpty() {
33826		return nil
33827	}
33828	return *page.ulr.Value
33829}
33830
33831// Creates a new instance of the UsagesListResultPage type.
33832func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
33833	return UsagesListResultPage{
33834		fn:  getNextPage,
33835		ulr: cur,
33836	}
33837}
33838
33839// VerificationIPFlowParameters parameters that define the IP flow to be verified.
33840type VerificationIPFlowParameters struct {
33841	// TargetResourceID - The ID of the target resource to perform next-hop on.
33842	TargetResourceID *string `json:"targetResourceId,omitempty"`
33843	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
33844	Direction Direction `json:"direction,omitempty"`
33845	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
33846	Protocol IPFlowProtocol `json:"protocol,omitempty"`
33847	// 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.
33848	LocalPort *string `json:"localPort,omitempty"`
33849	// 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.
33850	RemotePort *string `json:"remotePort,omitempty"`
33851	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
33852	LocalIPAddress *string `json:"localIPAddress,omitempty"`
33853	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
33854	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
33855	// 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).
33856	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
33857}
33858
33859// VerificationIPFlowResult results of IP flow verification on the target resource.
33860type VerificationIPFlowResult struct {
33861	autorest.Response `json:"-"`
33862	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
33863	Access Access `json:"access,omitempty"`
33864	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
33865	RuleName *string `json:"ruleName,omitempty"`
33866}
33867
33868// VirtualAppliance networkVirtualAppliance Resource.
33869type VirtualAppliance struct {
33870	autorest.Response `json:"-"`
33871	// VirtualAppliancePropertiesFormat - Properties of the Network Virtual Appliance.
33872	*VirtualAppliancePropertiesFormat `json:"properties,omitempty"`
33873	// Identity - The service principal that has read access to cloud-init and config blob.
33874	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
33875	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
33876	Etag *string `json:"etag,omitempty"`
33877	// ID - Resource ID.
33878	ID *string `json:"id,omitempty"`
33879	// Name - READ-ONLY; Resource name.
33880	Name *string `json:"name,omitempty"`
33881	// Type - READ-ONLY; Resource type.
33882	Type *string `json:"type,omitempty"`
33883	// Location - Resource location.
33884	Location *string `json:"location,omitempty"`
33885	// Tags - Resource tags.
33886	Tags map[string]*string `json:"tags"`
33887}
33888
33889// MarshalJSON is the custom marshaler for VirtualAppliance.
33890func (va VirtualAppliance) MarshalJSON() ([]byte, error) {
33891	objectMap := make(map[string]interface{})
33892	if va.VirtualAppliancePropertiesFormat != nil {
33893		objectMap["properties"] = va.VirtualAppliancePropertiesFormat
33894	}
33895	if va.Identity != nil {
33896		objectMap["identity"] = va.Identity
33897	}
33898	if va.ID != nil {
33899		objectMap["id"] = va.ID
33900	}
33901	if va.Location != nil {
33902		objectMap["location"] = va.Location
33903	}
33904	if va.Tags != nil {
33905		objectMap["tags"] = va.Tags
33906	}
33907	return json.Marshal(objectMap)
33908}
33909
33910// UnmarshalJSON is the custom unmarshaler for VirtualAppliance struct.
33911func (va *VirtualAppliance) UnmarshalJSON(body []byte) error {
33912	var m map[string]*json.RawMessage
33913	err := json.Unmarshal(body, &m)
33914	if err != nil {
33915		return err
33916	}
33917	for k, v := range m {
33918		switch k {
33919		case "properties":
33920			if v != nil {
33921				var virtualAppliancePropertiesFormat VirtualAppliancePropertiesFormat
33922				err = json.Unmarshal(*v, &virtualAppliancePropertiesFormat)
33923				if err != nil {
33924					return err
33925				}
33926				va.VirtualAppliancePropertiesFormat = &virtualAppliancePropertiesFormat
33927			}
33928		case "identity":
33929			if v != nil {
33930				var identity ManagedServiceIdentity
33931				err = json.Unmarshal(*v, &identity)
33932				if err != nil {
33933					return err
33934				}
33935				va.Identity = &identity
33936			}
33937		case "etag":
33938			if v != nil {
33939				var etag string
33940				err = json.Unmarshal(*v, &etag)
33941				if err != nil {
33942					return err
33943				}
33944				va.Etag = &etag
33945			}
33946		case "id":
33947			if v != nil {
33948				var ID string
33949				err = json.Unmarshal(*v, &ID)
33950				if err != nil {
33951					return err
33952				}
33953				va.ID = &ID
33954			}
33955		case "name":
33956			if v != nil {
33957				var name string
33958				err = json.Unmarshal(*v, &name)
33959				if err != nil {
33960					return err
33961				}
33962				va.Name = &name
33963			}
33964		case "type":
33965			if v != nil {
33966				var typeVar string
33967				err = json.Unmarshal(*v, &typeVar)
33968				if err != nil {
33969					return err
33970				}
33971				va.Type = &typeVar
33972			}
33973		case "location":
33974			if v != nil {
33975				var location string
33976				err = json.Unmarshal(*v, &location)
33977				if err != nil {
33978					return err
33979				}
33980				va.Location = &location
33981			}
33982		case "tags":
33983			if v != nil {
33984				var tags map[string]*string
33985				err = json.Unmarshal(*v, &tags)
33986				if err != nil {
33987					return err
33988				}
33989				va.Tags = tags
33990			}
33991		}
33992	}
33993
33994	return nil
33995}
33996
33997// VirtualApplianceListResult response for ListNetworkVirtualAppliances API service call.
33998type VirtualApplianceListResult struct {
33999	autorest.Response `json:"-"`
34000	// Value - List of Network Virtual Appliances.
34001	Value *[]VirtualAppliance `json:"value,omitempty"`
34002	// NextLink - URL to get the next set of results.
34003	NextLink *string `json:"nextLink,omitempty"`
34004}
34005
34006// VirtualApplianceListResultIterator provides access to a complete listing of VirtualAppliance values.
34007type VirtualApplianceListResultIterator struct {
34008	i    int
34009	page VirtualApplianceListResultPage
34010}
34011
34012// NextWithContext advances to the next value.  If there was an error making
34013// the request the iterator does not advance and the error is returned.
34014func (iter *VirtualApplianceListResultIterator) NextWithContext(ctx context.Context) (err error) {
34015	if tracing.IsEnabled() {
34016		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceListResultIterator.NextWithContext")
34017		defer func() {
34018			sc := -1
34019			if iter.Response().Response.Response != nil {
34020				sc = iter.Response().Response.Response.StatusCode
34021			}
34022			tracing.EndSpan(ctx, sc, err)
34023		}()
34024	}
34025	iter.i++
34026	if iter.i < len(iter.page.Values()) {
34027		return nil
34028	}
34029	err = iter.page.NextWithContext(ctx)
34030	if err != nil {
34031		iter.i--
34032		return err
34033	}
34034	iter.i = 0
34035	return nil
34036}
34037
34038// Next advances to the next value.  If there was an error making
34039// the request the iterator does not advance and the error is returned.
34040// Deprecated: Use NextWithContext() instead.
34041func (iter *VirtualApplianceListResultIterator) Next() error {
34042	return iter.NextWithContext(context.Background())
34043}
34044
34045// NotDone returns true if the enumeration should be started or is not yet complete.
34046func (iter VirtualApplianceListResultIterator) NotDone() bool {
34047	return iter.page.NotDone() && iter.i < len(iter.page.Values())
34048}
34049
34050// Response returns the raw server response from the last page request.
34051func (iter VirtualApplianceListResultIterator) Response() VirtualApplianceListResult {
34052	return iter.page.Response()
34053}
34054
34055// Value returns the current value or a zero-initialized value if the
34056// iterator has advanced beyond the end of the collection.
34057func (iter VirtualApplianceListResultIterator) Value() VirtualAppliance {
34058	if !iter.page.NotDone() {
34059		return VirtualAppliance{}
34060	}
34061	return iter.page.Values()[iter.i]
34062}
34063
34064// Creates a new instance of the VirtualApplianceListResultIterator type.
34065func NewVirtualApplianceListResultIterator(page VirtualApplianceListResultPage) VirtualApplianceListResultIterator {
34066	return VirtualApplianceListResultIterator{page: page}
34067}
34068
34069// IsEmpty returns true if the ListResult contains no values.
34070func (valr VirtualApplianceListResult) IsEmpty() bool {
34071	return valr.Value == nil || len(*valr.Value) == 0
34072}
34073
34074// hasNextLink returns true if the NextLink is not empty.
34075func (valr VirtualApplianceListResult) hasNextLink() bool {
34076	return valr.NextLink != nil && len(*valr.NextLink) != 0
34077}
34078
34079// virtualApplianceListResultPreparer prepares a request to retrieve the next set of results.
34080// It returns nil if no more results exist.
34081func (valr VirtualApplianceListResult) virtualApplianceListResultPreparer(ctx context.Context) (*http.Request, error) {
34082	if !valr.hasNextLink() {
34083		return nil, nil
34084	}
34085	return autorest.Prepare((&http.Request{}).WithContext(ctx),
34086		autorest.AsJSON(),
34087		autorest.AsGet(),
34088		autorest.WithBaseURL(to.String(valr.NextLink)))
34089}
34090
34091// VirtualApplianceListResultPage contains a page of VirtualAppliance values.
34092type VirtualApplianceListResultPage struct {
34093	fn   func(context.Context, VirtualApplianceListResult) (VirtualApplianceListResult, error)
34094	valr VirtualApplianceListResult
34095}
34096
34097// NextWithContext advances to the next page of values.  If there was an error making
34098// the request the page does not advance and the error is returned.
34099func (page *VirtualApplianceListResultPage) NextWithContext(ctx context.Context) (err error) {
34100	if tracing.IsEnabled() {
34101		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceListResultPage.NextWithContext")
34102		defer func() {
34103			sc := -1
34104			if page.Response().Response.Response != nil {
34105				sc = page.Response().Response.Response.StatusCode
34106			}
34107			tracing.EndSpan(ctx, sc, err)
34108		}()
34109	}
34110	for {
34111		next, err := page.fn(ctx, page.valr)
34112		if err != nil {
34113			return err
34114		}
34115		page.valr = next
34116		if !next.hasNextLink() || !next.IsEmpty() {
34117			break
34118		}
34119	}
34120	return nil
34121}
34122
34123// Next advances to the next page of values.  If there was an error making
34124// the request the page does not advance and the error is returned.
34125// Deprecated: Use NextWithContext() instead.
34126func (page *VirtualApplianceListResultPage) Next() error {
34127	return page.NextWithContext(context.Background())
34128}
34129
34130// NotDone returns true if the page enumeration should be started or is not yet complete.
34131func (page VirtualApplianceListResultPage) NotDone() bool {
34132	return !page.valr.IsEmpty()
34133}
34134
34135// Response returns the raw server response from the last page request.
34136func (page VirtualApplianceListResultPage) Response() VirtualApplianceListResult {
34137	return page.valr
34138}
34139
34140// Values returns the slice of values for the current page or nil if there are no values.
34141func (page VirtualApplianceListResultPage) Values() []VirtualAppliance {
34142	if page.valr.IsEmpty() {
34143		return nil
34144	}
34145	return *page.valr.Value
34146}
34147
34148// Creates a new instance of the VirtualApplianceListResultPage type.
34149func NewVirtualApplianceListResultPage(cur VirtualApplianceListResult, getNextPage func(context.Context, VirtualApplianceListResult) (VirtualApplianceListResult, error)) VirtualApplianceListResultPage {
34150	return VirtualApplianceListResultPage{
34151		fn:   getNextPage,
34152		valr: cur,
34153	}
34154}
34155
34156// VirtualApplianceNicProperties network Virtual Appliance NIC properties.
34157type VirtualApplianceNicProperties struct {
34158	// Name - READ-ONLY; NIC name.
34159	Name *string `json:"name,omitempty"`
34160	// PublicIPAddress - READ-ONLY; Public IP address.
34161	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
34162	// PrivateIPAddress - READ-ONLY; Private IP address.
34163	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
34164}
34165
34166// VirtualAppliancePropertiesFormat network Virtual Appliance definition.
34167type VirtualAppliancePropertiesFormat struct {
34168	// NvaSku - Network Virtual Appliance SKU.
34169	NvaSku *VirtualApplianceSkuProperties `json:"nvaSku,omitempty"`
34170	// AddressPrefix - READ-ONLY; Address Prefix.
34171	AddressPrefix *string `json:"addressPrefix,omitempty"`
34172	// BootStrapConfigurationBlobs - BootStrapConfigurationBlobs storage URLs.
34173	BootStrapConfigurationBlobs *[]string `json:"bootStrapConfigurationBlobs,omitempty"`
34174	// VirtualHub - The Virtual Hub where Network Virtual Appliance is being deployed.
34175	VirtualHub *SubResource `json:"virtualHub,omitempty"`
34176	// CloudInitConfigurationBlobs - CloudInitConfigurationBlob storage URLs.
34177	CloudInitConfigurationBlobs *[]string `json:"cloudInitConfigurationBlobs,omitempty"`
34178	// CloudInitConfiguration - CloudInitConfiguration string in plain text.
34179	CloudInitConfiguration *string `json:"cloudInitConfiguration,omitempty"`
34180	// VirtualApplianceAsn - VirtualAppliance ASN.
34181	VirtualApplianceAsn *int64 `json:"virtualApplianceAsn,omitempty"`
34182	// VirtualApplianceNics - READ-ONLY; List of Virtual Appliance Network Interfaces.
34183	VirtualApplianceNics *[]VirtualApplianceNicProperties `json:"virtualApplianceNics,omitempty"`
34184	// VirtualApplianceSites - READ-ONLY; List of references to VirtualApplianceSite.
34185	VirtualApplianceSites *[]SubResource `json:"virtualApplianceSites,omitempty"`
34186	// InboundSecurityRules - READ-ONLY; List of references to InboundSecurityRules.
34187	InboundSecurityRules *[]SubResource `json:"inboundSecurityRules,omitempty"`
34188	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
34189	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34190}
34191
34192// MarshalJSON is the custom marshaler for VirtualAppliancePropertiesFormat.
34193func (vapf VirtualAppliancePropertiesFormat) MarshalJSON() ([]byte, error) {
34194	objectMap := make(map[string]interface{})
34195	if vapf.NvaSku != nil {
34196		objectMap["nvaSku"] = vapf.NvaSku
34197	}
34198	if vapf.BootStrapConfigurationBlobs != nil {
34199		objectMap["bootStrapConfigurationBlobs"] = vapf.BootStrapConfigurationBlobs
34200	}
34201	if vapf.VirtualHub != nil {
34202		objectMap["virtualHub"] = vapf.VirtualHub
34203	}
34204	if vapf.CloudInitConfigurationBlobs != nil {
34205		objectMap["cloudInitConfigurationBlobs"] = vapf.CloudInitConfigurationBlobs
34206	}
34207	if vapf.CloudInitConfiguration != nil {
34208		objectMap["cloudInitConfiguration"] = vapf.CloudInitConfiguration
34209	}
34210	if vapf.VirtualApplianceAsn != nil {
34211		objectMap["virtualApplianceAsn"] = vapf.VirtualApplianceAsn
34212	}
34213	return json.Marshal(objectMap)
34214}
34215
34216// VirtualAppliancesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
34217// long-running operation.
34218type VirtualAppliancesCreateOrUpdateFuture struct {
34219	azure.FutureAPI
34220	// Result returns the result of the asynchronous operation.
34221	// If the operation has not completed it will return an error.
34222	Result func(VirtualAppliancesClient) (VirtualAppliance, error)
34223}
34224
34225// VirtualAppliancesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
34226// operation.
34227type VirtualAppliancesDeleteFuture struct {
34228	azure.FutureAPI
34229	// Result returns the result of the asynchronous operation.
34230	// If the operation has not completed it will return an error.
34231	Result func(VirtualAppliancesClient) (autorest.Response, error)
34232}
34233
34234// VirtualApplianceSite virtual Appliance Site resource.
34235type VirtualApplianceSite struct {
34236	autorest.Response `json:"-"`
34237	// VirtualApplianceSiteProperties - The properties of the Virtual Appliance Sites.
34238	*VirtualApplianceSiteProperties `json:"properties,omitempty"`
34239	// Name - Name of the virtual appliance site.
34240	Name *string `json:"name,omitempty"`
34241	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
34242	Etag *string `json:"etag,omitempty"`
34243	// Type - READ-ONLY; Site type.
34244	Type *string `json:"type,omitempty"`
34245	// ID - Resource ID.
34246	ID *string `json:"id,omitempty"`
34247}
34248
34249// MarshalJSON is the custom marshaler for VirtualApplianceSite.
34250func (vas VirtualApplianceSite) MarshalJSON() ([]byte, error) {
34251	objectMap := make(map[string]interface{})
34252	if vas.VirtualApplianceSiteProperties != nil {
34253		objectMap["properties"] = vas.VirtualApplianceSiteProperties
34254	}
34255	if vas.Name != nil {
34256		objectMap["name"] = vas.Name
34257	}
34258	if vas.ID != nil {
34259		objectMap["id"] = vas.ID
34260	}
34261	return json.Marshal(objectMap)
34262}
34263
34264// UnmarshalJSON is the custom unmarshaler for VirtualApplianceSite struct.
34265func (vas *VirtualApplianceSite) UnmarshalJSON(body []byte) error {
34266	var m map[string]*json.RawMessage
34267	err := json.Unmarshal(body, &m)
34268	if err != nil {
34269		return err
34270	}
34271	for k, v := range m {
34272		switch k {
34273		case "properties":
34274			if v != nil {
34275				var virtualApplianceSiteProperties VirtualApplianceSiteProperties
34276				err = json.Unmarshal(*v, &virtualApplianceSiteProperties)
34277				if err != nil {
34278					return err
34279				}
34280				vas.VirtualApplianceSiteProperties = &virtualApplianceSiteProperties
34281			}
34282		case "name":
34283			if v != nil {
34284				var name string
34285				err = json.Unmarshal(*v, &name)
34286				if err != nil {
34287					return err
34288				}
34289				vas.Name = &name
34290			}
34291		case "etag":
34292			if v != nil {
34293				var etag string
34294				err = json.Unmarshal(*v, &etag)
34295				if err != nil {
34296					return err
34297				}
34298				vas.Etag = &etag
34299			}
34300		case "type":
34301			if v != nil {
34302				var typeVar string
34303				err = json.Unmarshal(*v, &typeVar)
34304				if err != nil {
34305					return err
34306				}
34307				vas.Type = &typeVar
34308			}
34309		case "id":
34310			if v != nil {
34311				var ID string
34312				err = json.Unmarshal(*v, &ID)
34313				if err != nil {
34314					return err
34315				}
34316				vas.ID = &ID
34317			}
34318		}
34319	}
34320
34321	return nil
34322}
34323
34324// VirtualApplianceSiteListResult response for ListNetworkVirtualApplianceSites API service call.
34325type VirtualApplianceSiteListResult struct {
34326	autorest.Response `json:"-"`
34327	// Value - List of Network Virtual Appliance sites.
34328	Value *[]VirtualApplianceSite `json:"value,omitempty"`
34329	// NextLink - URL to get the next set of results.
34330	NextLink *string `json:"nextLink,omitempty"`
34331}
34332
34333// VirtualApplianceSiteListResultIterator provides access to a complete listing of VirtualApplianceSite
34334// values.
34335type VirtualApplianceSiteListResultIterator struct {
34336	i    int
34337	page VirtualApplianceSiteListResultPage
34338}
34339
34340// NextWithContext advances to the next value.  If there was an error making
34341// the request the iterator does not advance and the error is returned.
34342func (iter *VirtualApplianceSiteListResultIterator) NextWithContext(ctx context.Context) (err error) {
34343	if tracing.IsEnabled() {
34344		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSiteListResultIterator.NextWithContext")
34345		defer func() {
34346			sc := -1
34347			if iter.Response().Response.Response != nil {
34348				sc = iter.Response().Response.Response.StatusCode
34349			}
34350			tracing.EndSpan(ctx, sc, err)
34351		}()
34352	}
34353	iter.i++
34354	if iter.i < len(iter.page.Values()) {
34355		return nil
34356	}
34357	err = iter.page.NextWithContext(ctx)
34358	if err != nil {
34359		iter.i--
34360		return err
34361	}
34362	iter.i = 0
34363	return nil
34364}
34365
34366// Next advances to the next value.  If there was an error making
34367// the request the iterator does not advance and the error is returned.
34368// Deprecated: Use NextWithContext() instead.
34369func (iter *VirtualApplianceSiteListResultIterator) Next() error {
34370	return iter.NextWithContext(context.Background())
34371}
34372
34373// NotDone returns true if the enumeration should be started or is not yet complete.
34374func (iter VirtualApplianceSiteListResultIterator) NotDone() bool {
34375	return iter.page.NotDone() && iter.i < len(iter.page.Values())
34376}
34377
34378// Response returns the raw server response from the last page request.
34379func (iter VirtualApplianceSiteListResultIterator) Response() VirtualApplianceSiteListResult {
34380	return iter.page.Response()
34381}
34382
34383// Value returns the current value or a zero-initialized value if the
34384// iterator has advanced beyond the end of the collection.
34385func (iter VirtualApplianceSiteListResultIterator) Value() VirtualApplianceSite {
34386	if !iter.page.NotDone() {
34387		return VirtualApplianceSite{}
34388	}
34389	return iter.page.Values()[iter.i]
34390}
34391
34392// Creates a new instance of the VirtualApplianceSiteListResultIterator type.
34393func NewVirtualApplianceSiteListResultIterator(page VirtualApplianceSiteListResultPage) VirtualApplianceSiteListResultIterator {
34394	return VirtualApplianceSiteListResultIterator{page: page}
34395}
34396
34397// IsEmpty returns true if the ListResult contains no values.
34398func (vaslr VirtualApplianceSiteListResult) IsEmpty() bool {
34399	return vaslr.Value == nil || len(*vaslr.Value) == 0
34400}
34401
34402// hasNextLink returns true if the NextLink is not empty.
34403func (vaslr VirtualApplianceSiteListResult) hasNextLink() bool {
34404	return vaslr.NextLink != nil && len(*vaslr.NextLink) != 0
34405}
34406
34407// virtualApplianceSiteListResultPreparer prepares a request to retrieve the next set of results.
34408// It returns nil if no more results exist.
34409func (vaslr VirtualApplianceSiteListResult) virtualApplianceSiteListResultPreparer(ctx context.Context) (*http.Request, error) {
34410	if !vaslr.hasNextLink() {
34411		return nil, nil
34412	}
34413	return autorest.Prepare((&http.Request{}).WithContext(ctx),
34414		autorest.AsJSON(),
34415		autorest.AsGet(),
34416		autorest.WithBaseURL(to.String(vaslr.NextLink)))
34417}
34418
34419// VirtualApplianceSiteListResultPage contains a page of VirtualApplianceSite values.
34420type VirtualApplianceSiteListResultPage struct {
34421	fn    func(context.Context, VirtualApplianceSiteListResult) (VirtualApplianceSiteListResult, error)
34422	vaslr VirtualApplianceSiteListResult
34423}
34424
34425// NextWithContext advances to the next page of values.  If there was an error making
34426// the request the page does not advance and the error is returned.
34427func (page *VirtualApplianceSiteListResultPage) NextWithContext(ctx context.Context) (err error) {
34428	if tracing.IsEnabled() {
34429		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSiteListResultPage.NextWithContext")
34430		defer func() {
34431			sc := -1
34432			if page.Response().Response.Response != nil {
34433				sc = page.Response().Response.Response.StatusCode
34434			}
34435			tracing.EndSpan(ctx, sc, err)
34436		}()
34437	}
34438	for {
34439		next, err := page.fn(ctx, page.vaslr)
34440		if err != nil {
34441			return err
34442		}
34443		page.vaslr = next
34444		if !next.hasNextLink() || !next.IsEmpty() {
34445			break
34446		}
34447	}
34448	return nil
34449}
34450
34451// Next advances to the next page of values.  If there was an error making
34452// the request the page does not advance and the error is returned.
34453// Deprecated: Use NextWithContext() instead.
34454func (page *VirtualApplianceSiteListResultPage) Next() error {
34455	return page.NextWithContext(context.Background())
34456}
34457
34458// NotDone returns true if the page enumeration should be started or is not yet complete.
34459func (page VirtualApplianceSiteListResultPage) NotDone() bool {
34460	return !page.vaslr.IsEmpty()
34461}
34462
34463// Response returns the raw server response from the last page request.
34464func (page VirtualApplianceSiteListResultPage) Response() VirtualApplianceSiteListResult {
34465	return page.vaslr
34466}
34467
34468// Values returns the slice of values for the current page or nil if there are no values.
34469func (page VirtualApplianceSiteListResultPage) Values() []VirtualApplianceSite {
34470	if page.vaslr.IsEmpty() {
34471		return nil
34472	}
34473	return *page.vaslr.Value
34474}
34475
34476// Creates a new instance of the VirtualApplianceSiteListResultPage type.
34477func NewVirtualApplianceSiteListResultPage(cur VirtualApplianceSiteListResult, getNextPage func(context.Context, VirtualApplianceSiteListResult) (VirtualApplianceSiteListResult, error)) VirtualApplianceSiteListResultPage {
34478	return VirtualApplianceSiteListResultPage{
34479		fn:    getNextPage,
34480		vaslr: cur,
34481	}
34482}
34483
34484// VirtualApplianceSiteProperties properties of the rule group.
34485type VirtualApplianceSiteProperties struct {
34486	// AddressPrefix - Address Prefix.
34487	AddressPrefix *string `json:"addressPrefix,omitempty"`
34488	// O365Policy - Office 365 Policy.
34489	O365Policy *Office365PolicyProperties `json:"o365Policy,omitempty"`
34490	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
34491	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34492}
34493
34494// MarshalJSON is the custom marshaler for VirtualApplianceSiteProperties.
34495func (vasp VirtualApplianceSiteProperties) MarshalJSON() ([]byte, error) {
34496	objectMap := make(map[string]interface{})
34497	if vasp.AddressPrefix != nil {
34498		objectMap["addressPrefix"] = vasp.AddressPrefix
34499	}
34500	if vasp.O365Policy != nil {
34501		objectMap["o365Policy"] = vasp.O365Policy
34502	}
34503	return json.Marshal(objectMap)
34504}
34505
34506// VirtualApplianceSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
34507// long-running operation.
34508type VirtualApplianceSitesCreateOrUpdateFuture struct {
34509	azure.FutureAPI
34510	// Result returns the result of the asynchronous operation.
34511	// If the operation has not completed it will return an error.
34512	Result func(VirtualApplianceSitesClient) (VirtualApplianceSite, error)
34513}
34514
34515// VirtualApplianceSitesDeleteFuture an abstraction for monitoring and retrieving the results of a
34516// long-running operation.
34517type VirtualApplianceSitesDeleteFuture struct {
34518	azure.FutureAPI
34519	// Result returns the result of the asynchronous operation.
34520	// If the operation has not completed it will return an error.
34521	Result func(VirtualApplianceSitesClient) (autorest.Response, error)
34522}
34523
34524// VirtualApplianceSku definition of the NetworkVirtualApplianceSkus resource.
34525type VirtualApplianceSku struct {
34526	autorest.Response `json:"-"`
34527	// VirtualApplianceSkuPropertiesFormat - NetworkVirtualApplianceSku properties.
34528	*VirtualApplianceSkuPropertiesFormat `json:"properties,omitempty"`
34529	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
34530	Etag *string `json:"etag,omitempty"`
34531	// ID - Resource ID.
34532	ID *string `json:"id,omitempty"`
34533	// Name - READ-ONLY; Resource name.
34534	Name *string `json:"name,omitempty"`
34535	// Type - READ-ONLY; Resource type.
34536	Type *string `json:"type,omitempty"`
34537	// Location - Resource location.
34538	Location *string `json:"location,omitempty"`
34539	// Tags - Resource tags.
34540	Tags map[string]*string `json:"tags"`
34541}
34542
34543// MarshalJSON is the custom marshaler for VirtualApplianceSku.
34544func (vas VirtualApplianceSku) MarshalJSON() ([]byte, error) {
34545	objectMap := make(map[string]interface{})
34546	if vas.VirtualApplianceSkuPropertiesFormat != nil {
34547		objectMap["properties"] = vas.VirtualApplianceSkuPropertiesFormat
34548	}
34549	if vas.ID != nil {
34550		objectMap["id"] = vas.ID
34551	}
34552	if vas.Location != nil {
34553		objectMap["location"] = vas.Location
34554	}
34555	if vas.Tags != nil {
34556		objectMap["tags"] = vas.Tags
34557	}
34558	return json.Marshal(objectMap)
34559}
34560
34561// UnmarshalJSON is the custom unmarshaler for VirtualApplianceSku struct.
34562func (vas *VirtualApplianceSku) UnmarshalJSON(body []byte) error {
34563	var m map[string]*json.RawMessage
34564	err := json.Unmarshal(body, &m)
34565	if err != nil {
34566		return err
34567	}
34568	for k, v := range m {
34569		switch k {
34570		case "properties":
34571			if v != nil {
34572				var virtualApplianceSkuPropertiesFormat VirtualApplianceSkuPropertiesFormat
34573				err = json.Unmarshal(*v, &virtualApplianceSkuPropertiesFormat)
34574				if err != nil {
34575					return err
34576				}
34577				vas.VirtualApplianceSkuPropertiesFormat = &virtualApplianceSkuPropertiesFormat
34578			}
34579		case "etag":
34580			if v != nil {
34581				var etag string
34582				err = json.Unmarshal(*v, &etag)
34583				if err != nil {
34584					return err
34585				}
34586				vas.Etag = &etag
34587			}
34588		case "id":
34589			if v != nil {
34590				var ID string
34591				err = json.Unmarshal(*v, &ID)
34592				if err != nil {
34593					return err
34594				}
34595				vas.ID = &ID
34596			}
34597		case "name":
34598			if v != nil {
34599				var name string
34600				err = json.Unmarshal(*v, &name)
34601				if err != nil {
34602					return err
34603				}
34604				vas.Name = &name
34605			}
34606		case "type":
34607			if v != nil {
34608				var typeVar string
34609				err = json.Unmarshal(*v, &typeVar)
34610				if err != nil {
34611					return err
34612				}
34613				vas.Type = &typeVar
34614			}
34615		case "location":
34616			if v != nil {
34617				var location string
34618				err = json.Unmarshal(*v, &location)
34619				if err != nil {
34620					return err
34621				}
34622				vas.Location = &location
34623			}
34624		case "tags":
34625			if v != nil {
34626				var tags map[string]*string
34627				err = json.Unmarshal(*v, &tags)
34628				if err != nil {
34629					return err
34630				}
34631				vas.Tags = tags
34632			}
34633		}
34634	}
34635
34636	return nil
34637}
34638
34639// VirtualApplianceSkuInstances list of available Sku and instances.
34640type VirtualApplianceSkuInstances struct {
34641	// ScaleUnit - READ-ONLY; Scale Unit.
34642	ScaleUnit *string `json:"scaleUnit,omitempty"`
34643	// InstanceCount - READ-ONLY; Instance Count.
34644	InstanceCount *int32 `json:"instanceCount,omitempty"`
34645}
34646
34647// VirtualApplianceSkuListResult response for ListNetworkVirtualApplianceSkus API service call.
34648type VirtualApplianceSkuListResult struct {
34649	autorest.Response `json:"-"`
34650	// Value - List of Network Virtual Appliance Skus that are available.
34651	Value *[]VirtualApplianceSku `json:"value,omitempty"`
34652	// NextLink - URL to get the next set of results.
34653	NextLink *string `json:"nextLink,omitempty"`
34654}
34655
34656// VirtualApplianceSkuListResultIterator provides access to a complete listing of VirtualApplianceSku
34657// values.
34658type VirtualApplianceSkuListResultIterator struct {
34659	i    int
34660	page VirtualApplianceSkuListResultPage
34661}
34662
34663// NextWithContext advances to the next value.  If there was an error making
34664// the request the iterator does not advance and the error is returned.
34665func (iter *VirtualApplianceSkuListResultIterator) NextWithContext(ctx context.Context) (err error) {
34666	if tracing.IsEnabled() {
34667		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSkuListResultIterator.NextWithContext")
34668		defer func() {
34669			sc := -1
34670			if iter.Response().Response.Response != nil {
34671				sc = iter.Response().Response.Response.StatusCode
34672			}
34673			tracing.EndSpan(ctx, sc, err)
34674		}()
34675	}
34676	iter.i++
34677	if iter.i < len(iter.page.Values()) {
34678		return nil
34679	}
34680	err = iter.page.NextWithContext(ctx)
34681	if err != nil {
34682		iter.i--
34683		return err
34684	}
34685	iter.i = 0
34686	return nil
34687}
34688
34689// Next advances to the next value.  If there was an error making
34690// the request the iterator does not advance and the error is returned.
34691// Deprecated: Use NextWithContext() instead.
34692func (iter *VirtualApplianceSkuListResultIterator) Next() error {
34693	return iter.NextWithContext(context.Background())
34694}
34695
34696// NotDone returns true if the enumeration should be started or is not yet complete.
34697func (iter VirtualApplianceSkuListResultIterator) NotDone() bool {
34698	return iter.page.NotDone() && iter.i < len(iter.page.Values())
34699}
34700
34701// Response returns the raw server response from the last page request.
34702func (iter VirtualApplianceSkuListResultIterator) Response() VirtualApplianceSkuListResult {
34703	return iter.page.Response()
34704}
34705
34706// Value returns the current value or a zero-initialized value if the
34707// iterator has advanced beyond the end of the collection.
34708func (iter VirtualApplianceSkuListResultIterator) Value() VirtualApplianceSku {
34709	if !iter.page.NotDone() {
34710		return VirtualApplianceSku{}
34711	}
34712	return iter.page.Values()[iter.i]
34713}
34714
34715// Creates a new instance of the VirtualApplianceSkuListResultIterator type.
34716func NewVirtualApplianceSkuListResultIterator(page VirtualApplianceSkuListResultPage) VirtualApplianceSkuListResultIterator {
34717	return VirtualApplianceSkuListResultIterator{page: page}
34718}
34719
34720// IsEmpty returns true if the ListResult contains no values.
34721func (vaslr VirtualApplianceSkuListResult) IsEmpty() bool {
34722	return vaslr.Value == nil || len(*vaslr.Value) == 0
34723}
34724
34725// hasNextLink returns true if the NextLink is not empty.
34726func (vaslr VirtualApplianceSkuListResult) hasNextLink() bool {
34727	return vaslr.NextLink != nil && len(*vaslr.NextLink) != 0
34728}
34729
34730// virtualApplianceSkuListResultPreparer prepares a request to retrieve the next set of results.
34731// It returns nil if no more results exist.
34732func (vaslr VirtualApplianceSkuListResult) virtualApplianceSkuListResultPreparer(ctx context.Context) (*http.Request, error) {
34733	if !vaslr.hasNextLink() {
34734		return nil, nil
34735	}
34736	return autorest.Prepare((&http.Request{}).WithContext(ctx),
34737		autorest.AsJSON(),
34738		autorest.AsGet(),
34739		autorest.WithBaseURL(to.String(vaslr.NextLink)))
34740}
34741
34742// VirtualApplianceSkuListResultPage contains a page of VirtualApplianceSku values.
34743type VirtualApplianceSkuListResultPage struct {
34744	fn    func(context.Context, VirtualApplianceSkuListResult) (VirtualApplianceSkuListResult, error)
34745	vaslr VirtualApplianceSkuListResult
34746}
34747
34748// NextWithContext advances to the next page of values.  If there was an error making
34749// the request the page does not advance and the error is returned.
34750func (page *VirtualApplianceSkuListResultPage) NextWithContext(ctx context.Context) (err error) {
34751	if tracing.IsEnabled() {
34752		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualApplianceSkuListResultPage.NextWithContext")
34753		defer func() {
34754			sc := -1
34755			if page.Response().Response.Response != nil {
34756				sc = page.Response().Response.Response.StatusCode
34757			}
34758			tracing.EndSpan(ctx, sc, err)
34759		}()
34760	}
34761	for {
34762		next, err := page.fn(ctx, page.vaslr)
34763		if err != nil {
34764			return err
34765		}
34766		page.vaslr = next
34767		if !next.hasNextLink() || !next.IsEmpty() {
34768			break
34769		}
34770	}
34771	return nil
34772}
34773
34774// Next advances to the next page of values.  If there was an error making
34775// the request the page does not advance and the error is returned.
34776// Deprecated: Use NextWithContext() instead.
34777func (page *VirtualApplianceSkuListResultPage) Next() error {
34778	return page.NextWithContext(context.Background())
34779}
34780
34781// NotDone returns true if the page enumeration should be started or is not yet complete.
34782func (page VirtualApplianceSkuListResultPage) NotDone() bool {
34783	return !page.vaslr.IsEmpty()
34784}
34785
34786// Response returns the raw server response from the last page request.
34787func (page VirtualApplianceSkuListResultPage) Response() VirtualApplianceSkuListResult {
34788	return page.vaslr
34789}
34790
34791// Values returns the slice of values for the current page or nil if there are no values.
34792func (page VirtualApplianceSkuListResultPage) Values() []VirtualApplianceSku {
34793	if page.vaslr.IsEmpty() {
34794		return nil
34795	}
34796	return *page.vaslr.Value
34797}
34798
34799// Creates a new instance of the VirtualApplianceSkuListResultPage type.
34800func NewVirtualApplianceSkuListResultPage(cur VirtualApplianceSkuListResult, getNextPage func(context.Context, VirtualApplianceSkuListResult) (VirtualApplianceSkuListResult, error)) VirtualApplianceSkuListResultPage {
34801	return VirtualApplianceSkuListResultPage{
34802		fn:    getNextPage,
34803		vaslr: cur,
34804	}
34805}
34806
34807// VirtualApplianceSkuProperties network Virtual Appliance Sku Properties.
34808type VirtualApplianceSkuProperties struct {
34809	// Vendor - Virtual Appliance Vendor.
34810	Vendor *string `json:"vendor,omitempty"`
34811	// BundledScaleUnit - Virtual Appliance Scale Unit.
34812	BundledScaleUnit *string `json:"bundledScaleUnit,omitempty"`
34813	// MarketPlaceVersion - Virtual Appliance Version.
34814	MarketPlaceVersion *string `json:"marketPlaceVersion,omitempty"`
34815}
34816
34817// VirtualApplianceSkuPropertiesFormat properties specific to NetworkVirtualApplianceSkus.
34818type VirtualApplianceSkuPropertiesFormat struct {
34819	// Vendor - READ-ONLY; Network Virtual Appliance Sku vendor.
34820	Vendor *string `json:"vendor,omitempty"`
34821	// AvailableVersions - READ-ONLY; Available Network Virtual Appliance versions.
34822	AvailableVersions *[]string `json:"availableVersions,omitempty"`
34823	// AvailableScaleUnits - The list of scale units available.
34824	AvailableScaleUnits *[]VirtualApplianceSkuInstances `json:"availableScaleUnits,omitempty"`
34825}
34826
34827// MarshalJSON is the custom marshaler for VirtualApplianceSkuPropertiesFormat.
34828func (vaspf VirtualApplianceSkuPropertiesFormat) MarshalJSON() ([]byte, error) {
34829	objectMap := make(map[string]interface{})
34830	if vaspf.AvailableScaleUnits != nil {
34831		objectMap["availableScaleUnits"] = vaspf.AvailableScaleUnits
34832	}
34833	return json.Marshal(objectMap)
34834}
34835
34836// VirtualHub virtualHub Resource.
34837type VirtualHub struct {
34838	autorest.Response `json:"-"`
34839	// VirtualHubProperties - Properties of the virtual hub.
34840	*VirtualHubProperties `json:"properties,omitempty"`
34841	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
34842	Etag *string `json:"etag,omitempty"`
34843	// ID - Resource ID.
34844	ID *string `json:"id,omitempty"`
34845	// Name - READ-ONLY; Resource name.
34846	Name *string `json:"name,omitempty"`
34847	// Type - READ-ONLY; Resource type.
34848	Type *string `json:"type,omitempty"`
34849	// Location - Resource location.
34850	Location *string `json:"location,omitempty"`
34851	// Tags - Resource tags.
34852	Tags map[string]*string `json:"tags"`
34853}
34854
34855// MarshalJSON is the custom marshaler for VirtualHub.
34856func (vh VirtualHub) MarshalJSON() ([]byte, error) {
34857	objectMap := make(map[string]interface{})
34858	if vh.VirtualHubProperties != nil {
34859		objectMap["properties"] = vh.VirtualHubProperties
34860	}
34861	if vh.ID != nil {
34862		objectMap["id"] = vh.ID
34863	}
34864	if vh.Location != nil {
34865		objectMap["location"] = vh.Location
34866	}
34867	if vh.Tags != nil {
34868		objectMap["tags"] = vh.Tags
34869	}
34870	return json.Marshal(objectMap)
34871}
34872
34873// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
34874func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
34875	var m map[string]*json.RawMessage
34876	err := json.Unmarshal(body, &m)
34877	if err != nil {
34878		return err
34879	}
34880	for k, v := range m {
34881		switch k {
34882		case "properties":
34883			if v != nil {
34884				var virtualHubProperties VirtualHubProperties
34885				err = json.Unmarshal(*v, &virtualHubProperties)
34886				if err != nil {
34887					return err
34888				}
34889				vh.VirtualHubProperties = &virtualHubProperties
34890			}
34891		case "etag":
34892			if v != nil {
34893				var etag string
34894				err = json.Unmarshal(*v, &etag)
34895				if err != nil {
34896					return err
34897				}
34898				vh.Etag = &etag
34899			}
34900		case "id":
34901			if v != nil {
34902				var ID string
34903				err = json.Unmarshal(*v, &ID)
34904				if err != nil {
34905					return err
34906				}
34907				vh.ID = &ID
34908			}
34909		case "name":
34910			if v != nil {
34911				var name string
34912				err = json.Unmarshal(*v, &name)
34913				if err != nil {
34914					return err
34915				}
34916				vh.Name = &name
34917			}
34918		case "type":
34919			if v != nil {
34920				var typeVar string
34921				err = json.Unmarshal(*v, &typeVar)
34922				if err != nil {
34923					return err
34924				}
34925				vh.Type = &typeVar
34926			}
34927		case "location":
34928			if v != nil {
34929				var location string
34930				err = json.Unmarshal(*v, &location)
34931				if err != nil {
34932					return err
34933				}
34934				vh.Location = &location
34935			}
34936		case "tags":
34937			if v != nil {
34938				var tags map[string]*string
34939				err = json.Unmarshal(*v, &tags)
34940				if err != nil {
34941					return err
34942				}
34943				vh.Tags = tags
34944			}
34945		}
34946	}
34947
34948	return nil
34949}
34950
34951// VirtualHubBgpConnectionCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
34952// a long-running operation.
34953type VirtualHubBgpConnectionCreateOrUpdateFuture struct {
34954	azure.FutureAPI
34955	// Result returns the result of the asynchronous operation.
34956	// If the operation has not completed it will return an error.
34957	Result func(VirtualHubBgpConnectionClient) (BgpConnection, error)
34958}
34959
34960// VirtualHubBgpConnectionDeleteFuture an abstraction for monitoring and retrieving the results of a
34961// long-running operation.
34962type VirtualHubBgpConnectionDeleteFuture struct {
34963	azure.FutureAPI
34964	// Result returns the result of the asynchronous operation.
34965	// If the operation has not completed it will return an error.
34966	Result func(VirtualHubBgpConnectionClient) (autorest.Response, error)
34967}
34968
34969// VirtualHubBgpConnectionsListAdvertisedRoutesFuture an abstraction for monitoring and retrieving the
34970// results of a long-running operation.
34971type VirtualHubBgpConnectionsListAdvertisedRoutesFuture struct {
34972	azure.FutureAPI
34973	// Result returns the result of the asynchronous operation.
34974	// If the operation has not completed it will return an error.
34975	Result func(VirtualHubBgpConnectionsClient) (PeerRouteList, error)
34976}
34977
34978// VirtualHubBgpConnectionsListLearnedRoutesFuture an abstraction for monitoring and retrieving the results
34979// of a long-running operation.
34980type VirtualHubBgpConnectionsListLearnedRoutesFuture struct {
34981	azure.FutureAPI
34982	// Result returns the result of the asynchronous operation.
34983	// If the operation has not completed it will return an error.
34984	Result func(VirtualHubBgpConnectionsClient) (PeerRouteList, error)
34985}
34986
34987// VirtualHubEffectiveRoute the effective route configured on the virtual hub or specified resource.
34988type VirtualHubEffectiveRoute struct {
34989	// AddressPrefixes - The list of address prefixes.
34990	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
34991	// NextHops - The list of next hops.
34992	NextHops *[]string `json:"nextHops,omitempty"`
34993	// NextHopType - The type of the next hop.
34994	NextHopType *string `json:"nextHopType,omitempty"`
34995	// AsPath - The ASPath of this route.
34996	AsPath *string `json:"asPath,omitempty"`
34997	// RouteOrigin - The origin of this route.
34998	RouteOrigin *string `json:"routeOrigin,omitempty"`
34999}
35000
35001// VirtualHubEffectiveRouteList effectiveRoutes List.
35002type VirtualHubEffectiveRouteList struct {
35003	// Value - The list of effective routes configured on the virtual hub or the specified resource.
35004	Value *[]VirtualHubEffectiveRoute `json:"value,omitempty"`
35005}
35006
35007// VirtualHubID virtual Hub identifier.
35008type VirtualHubID struct {
35009	// 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.
35010	ID *string `json:"id,omitempty"`
35011}
35012
35013// VirtualHubIPConfigurationCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
35014// of a long-running operation.
35015type VirtualHubIPConfigurationCreateOrUpdateFuture struct {
35016	azure.FutureAPI
35017	// Result returns the result of the asynchronous operation.
35018	// If the operation has not completed it will return an error.
35019	Result func(VirtualHubIPConfigurationClient) (HubIPConfiguration, error)
35020}
35021
35022// VirtualHubIPConfigurationDeleteFuture an abstraction for monitoring and retrieving the results of a
35023// long-running operation.
35024type VirtualHubIPConfigurationDeleteFuture struct {
35025	azure.FutureAPI
35026	// Result returns the result of the asynchronous operation.
35027	// If the operation has not completed it will return an error.
35028	Result func(VirtualHubIPConfigurationClient) (autorest.Response, error)
35029}
35030
35031// VirtualHubProperties parameters for VirtualHub.
35032type VirtualHubProperties struct {
35033	// VirtualWan - The VirtualWAN to which the VirtualHub belongs.
35034	VirtualWan *SubResource `json:"virtualWan,omitempty"`
35035	// VpnGateway - The VpnGateway associated with this VirtualHub.
35036	VpnGateway *SubResource `json:"vpnGateway,omitempty"`
35037	// P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub.
35038	P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"`
35039	// ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub.
35040	ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"`
35041	// AzureFirewall - The azureFirewall associated with this VirtualHub.
35042	AzureFirewall *SubResource `json:"azureFirewall,omitempty"`
35043	// SecurityPartnerProvider - The securityPartnerProvider associated with this VirtualHub.
35044	SecurityPartnerProvider *SubResource `json:"securityPartnerProvider,omitempty"`
35045	// AddressPrefix - Address-prefix for this VirtualHub.
35046	AddressPrefix *string `json:"addressPrefix,omitempty"`
35047	// RouteTable - The routeTable associated with this virtual hub.
35048	RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"`
35049	// ProvisioningState - READ-ONLY; The provisioning state of the virtual hub resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35050	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35051	// SecurityProviderName - The Security Provider name.
35052	SecurityProviderName *string `json:"securityProviderName,omitempty"`
35053	// VirtualHubRouteTableV2s - List of all virtual hub route table v2s associated with this VirtualHub.
35054	VirtualHubRouteTableV2s *[]VirtualHubRouteTableV2 `json:"virtualHubRouteTableV2s,omitempty"`
35055	// Sku - The sku of this VirtualHub.
35056	Sku *string `json:"sku,omitempty"`
35057	// RoutingState - The routing state. Possible values include: 'RoutingStateNone', 'RoutingStateProvisioned', 'RoutingStateProvisioning', 'RoutingStateFailed'
35058	RoutingState RoutingState `json:"routingState,omitempty"`
35059	// BgpConnections - READ-ONLY; List of references to Bgp Connections.
35060	BgpConnections *[]SubResource `json:"bgpConnections,omitempty"`
35061	// IPConfigurations - READ-ONLY; List of references to IpConfigurations.
35062	IPConfigurations *[]SubResource `json:"ipConfigurations,omitempty"`
35063	// VirtualRouterAsn - VirtualRouter ASN.
35064	VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"`
35065	// VirtualRouterIps - VirtualRouter IPs.
35066	VirtualRouterIps *[]string `json:"virtualRouterIps,omitempty"`
35067	// AllowBranchToBranchTraffic - Flag to control transit for VirtualRouter hub.
35068	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
35069}
35070
35071// MarshalJSON is the custom marshaler for VirtualHubProperties.
35072func (vhp VirtualHubProperties) MarshalJSON() ([]byte, error) {
35073	objectMap := make(map[string]interface{})
35074	if vhp.VirtualWan != nil {
35075		objectMap["virtualWan"] = vhp.VirtualWan
35076	}
35077	if vhp.VpnGateway != nil {
35078		objectMap["vpnGateway"] = vhp.VpnGateway
35079	}
35080	if vhp.P2SVpnGateway != nil {
35081		objectMap["p2SVpnGateway"] = vhp.P2SVpnGateway
35082	}
35083	if vhp.ExpressRouteGateway != nil {
35084		objectMap["expressRouteGateway"] = vhp.ExpressRouteGateway
35085	}
35086	if vhp.AzureFirewall != nil {
35087		objectMap["azureFirewall"] = vhp.AzureFirewall
35088	}
35089	if vhp.SecurityPartnerProvider != nil {
35090		objectMap["securityPartnerProvider"] = vhp.SecurityPartnerProvider
35091	}
35092	if vhp.AddressPrefix != nil {
35093		objectMap["addressPrefix"] = vhp.AddressPrefix
35094	}
35095	if vhp.RouteTable != nil {
35096		objectMap["routeTable"] = vhp.RouteTable
35097	}
35098	if vhp.SecurityProviderName != nil {
35099		objectMap["securityProviderName"] = vhp.SecurityProviderName
35100	}
35101	if vhp.VirtualHubRouteTableV2s != nil {
35102		objectMap["virtualHubRouteTableV2s"] = vhp.VirtualHubRouteTableV2s
35103	}
35104	if vhp.Sku != nil {
35105		objectMap["sku"] = vhp.Sku
35106	}
35107	if vhp.RoutingState != "" {
35108		objectMap["routingState"] = vhp.RoutingState
35109	}
35110	if vhp.VirtualRouterAsn != nil {
35111		objectMap["virtualRouterAsn"] = vhp.VirtualRouterAsn
35112	}
35113	if vhp.VirtualRouterIps != nil {
35114		objectMap["virtualRouterIps"] = vhp.VirtualRouterIps
35115	}
35116	if vhp.AllowBranchToBranchTraffic != nil {
35117		objectMap["allowBranchToBranchTraffic"] = vhp.AllowBranchToBranchTraffic
35118	}
35119	return json.Marshal(objectMap)
35120}
35121
35122// VirtualHubRoute virtualHub route.
35123type VirtualHubRoute struct {
35124	// AddressPrefixes - List of all addressPrefixes.
35125	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
35126	// NextHopIPAddress - NextHop ip address.
35127	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
35128}
35129
35130// VirtualHubRouteTable virtualHub route table.
35131type VirtualHubRouteTable struct {
35132	// Routes - List of all routes.
35133	Routes *[]VirtualHubRoute `json:"routes,omitempty"`
35134}
35135
35136// VirtualHubRouteTableV2 virtualHubRouteTableV2 Resource.
35137type VirtualHubRouteTableV2 struct {
35138	autorest.Response `json:"-"`
35139	// VirtualHubRouteTableV2Properties - Properties of the virtual hub route table v2.
35140	*VirtualHubRouteTableV2Properties `json:"properties,omitempty"`
35141	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
35142	Name *string `json:"name,omitempty"`
35143	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35144	Etag *string `json:"etag,omitempty"`
35145	// ID - Resource ID.
35146	ID *string `json:"id,omitempty"`
35147}
35148
35149// MarshalJSON is the custom marshaler for VirtualHubRouteTableV2.
35150func (vhrtv VirtualHubRouteTableV2) MarshalJSON() ([]byte, error) {
35151	objectMap := make(map[string]interface{})
35152	if vhrtv.VirtualHubRouteTableV2Properties != nil {
35153		objectMap["properties"] = vhrtv.VirtualHubRouteTableV2Properties
35154	}
35155	if vhrtv.Name != nil {
35156		objectMap["name"] = vhrtv.Name
35157	}
35158	if vhrtv.ID != nil {
35159		objectMap["id"] = vhrtv.ID
35160	}
35161	return json.Marshal(objectMap)
35162}
35163
35164// UnmarshalJSON is the custom unmarshaler for VirtualHubRouteTableV2 struct.
35165func (vhrtv *VirtualHubRouteTableV2) UnmarshalJSON(body []byte) error {
35166	var m map[string]*json.RawMessage
35167	err := json.Unmarshal(body, &m)
35168	if err != nil {
35169		return err
35170	}
35171	for k, v := range m {
35172		switch k {
35173		case "properties":
35174			if v != nil {
35175				var virtualHubRouteTableV2Properties VirtualHubRouteTableV2Properties
35176				err = json.Unmarshal(*v, &virtualHubRouteTableV2Properties)
35177				if err != nil {
35178					return err
35179				}
35180				vhrtv.VirtualHubRouteTableV2Properties = &virtualHubRouteTableV2Properties
35181			}
35182		case "name":
35183			if v != nil {
35184				var name string
35185				err = json.Unmarshal(*v, &name)
35186				if err != nil {
35187					return err
35188				}
35189				vhrtv.Name = &name
35190			}
35191		case "etag":
35192			if v != nil {
35193				var etag string
35194				err = json.Unmarshal(*v, &etag)
35195				if err != nil {
35196					return err
35197				}
35198				vhrtv.Etag = &etag
35199			}
35200		case "id":
35201			if v != nil {
35202				var ID string
35203				err = json.Unmarshal(*v, &ID)
35204				if err != nil {
35205					return err
35206				}
35207				vhrtv.ID = &ID
35208			}
35209		}
35210	}
35211
35212	return nil
35213}
35214
35215// VirtualHubRouteTableV2Properties parameters for VirtualHubRouteTableV2.
35216type VirtualHubRouteTableV2Properties struct {
35217	// Routes - List of all routes.
35218	Routes *[]VirtualHubRouteV2 `json:"routes,omitempty"`
35219	// AttachedConnections - List of all connections attached to this route table v2.
35220	AttachedConnections *[]string `json:"attachedConnections,omitempty"`
35221	// ProvisioningState - READ-ONLY; The provisioning state of the virtual hub route table v2 resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35222	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35223}
35224
35225// MarshalJSON is the custom marshaler for VirtualHubRouteTableV2Properties.
35226func (vhrtvp VirtualHubRouteTableV2Properties) MarshalJSON() ([]byte, error) {
35227	objectMap := make(map[string]interface{})
35228	if vhrtvp.Routes != nil {
35229		objectMap["routes"] = vhrtvp.Routes
35230	}
35231	if vhrtvp.AttachedConnections != nil {
35232		objectMap["attachedConnections"] = vhrtvp.AttachedConnections
35233	}
35234	return json.Marshal(objectMap)
35235}
35236
35237// VirtualHubRouteTableV2sCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
35238// a long-running operation.
35239type VirtualHubRouteTableV2sCreateOrUpdateFuture struct {
35240	azure.FutureAPI
35241	// Result returns the result of the asynchronous operation.
35242	// If the operation has not completed it will return an error.
35243	Result func(VirtualHubRouteTableV2sClient) (VirtualHubRouteTableV2, error)
35244}
35245
35246// VirtualHubRouteTableV2sDeleteFuture an abstraction for monitoring and retrieving the results of a
35247// long-running operation.
35248type VirtualHubRouteTableV2sDeleteFuture struct {
35249	azure.FutureAPI
35250	// Result returns the result of the asynchronous operation.
35251	// If the operation has not completed it will return an error.
35252	Result func(VirtualHubRouteTableV2sClient) (autorest.Response, error)
35253}
35254
35255// VirtualHubRouteV2 virtualHubRouteTableV2 route.
35256type VirtualHubRouteV2 struct {
35257	// DestinationType - The type of destinations.
35258	DestinationType *string `json:"destinationType,omitempty"`
35259	// Destinations - List of all destinations.
35260	Destinations *[]string `json:"destinations,omitempty"`
35261	// NextHopType - The type of next hops.
35262	NextHopType *string `json:"nextHopType,omitempty"`
35263	// NextHops - NextHops ip address.
35264	NextHops *[]string `json:"nextHops,omitempty"`
35265}
35266
35267// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
35268// long-running operation.
35269type VirtualHubsCreateOrUpdateFuture struct {
35270	azure.FutureAPI
35271	// Result returns the result of the asynchronous operation.
35272	// If the operation has not completed it will return an error.
35273	Result func(VirtualHubsClient) (VirtualHub, error)
35274}
35275
35276// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
35277// operation.
35278type VirtualHubsDeleteFuture struct {
35279	azure.FutureAPI
35280	// Result returns the result of the asynchronous operation.
35281	// If the operation has not completed it will return an error.
35282	Result func(VirtualHubsClient) (autorest.Response, error)
35283}
35284
35285// VirtualHubsGetEffectiveVirtualHubRoutesFuture an abstraction for monitoring and retrieving the results
35286// of a long-running operation.
35287type VirtualHubsGetEffectiveVirtualHubRoutesFuture struct {
35288	azure.FutureAPI
35289	// Result returns the result of the asynchronous operation.
35290	// If the operation has not completed it will return an error.
35291	Result func(VirtualHubsClient) (autorest.Response, error)
35292}
35293
35294// VirtualNetwork virtual Network resource.
35295type VirtualNetwork struct {
35296	autorest.Response `json:"-"`
35297	// ExtendedLocation - The extended location of the virtual network.
35298	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
35299	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
35300	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
35301	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35302	Etag *string `json:"etag,omitempty"`
35303	// ID - Resource ID.
35304	ID *string `json:"id,omitempty"`
35305	// Name - READ-ONLY; Resource name.
35306	Name *string `json:"name,omitempty"`
35307	// Type - READ-ONLY; Resource type.
35308	Type *string `json:"type,omitempty"`
35309	// Location - Resource location.
35310	Location *string `json:"location,omitempty"`
35311	// Tags - Resource tags.
35312	Tags map[string]*string `json:"tags"`
35313}
35314
35315// MarshalJSON is the custom marshaler for VirtualNetwork.
35316func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
35317	objectMap := make(map[string]interface{})
35318	if vn.ExtendedLocation != nil {
35319		objectMap["extendedLocation"] = vn.ExtendedLocation
35320	}
35321	if vn.VirtualNetworkPropertiesFormat != nil {
35322		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
35323	}
35324	if vn.ID != nil {
35325		objectMap["id"] = vn.ID
35326	}
35327	if vn.Location != nil {
35328		objectMap["location"] = vn.Location
35329	}
35330	if vn.Tags != nil {
35331		objectMap["tags"] = vn.Tags
35332	}
35333	return json.Marshal(objectMap)
35334}
35335
35336// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
35337func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
35338	var m map[string]*json.RawMessage
35339	err := json.Unmarshal(body, &m)
35340	if err != nil {
35341		return err
35342	}
35343	for k, v := range m {
35344		switch k {
35345		case "extendedLocation":
35346			if v != nil {
35347				var extendedLocation ExtendedLocation
35348				err = json.Unmarshal(*v, &extendedLocation)
35349				if err != nil {
35350					return err
35351				}
35352				vn.ExtendedLocation = &extendedLocation
35353			}
35354		case "properties":
35355			if v != nil {
35356				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
35357				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
35358				if err != nil {
35359					return err
35360				}
35361				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
35362			}
35363		case "etag":
35364			if v != nil {
35365				var etag string
35366				err = json.Unmarshal(*v, &etag)
35367				if err != nil {
35368					return err
35369				}
35370				vn.Etag = &etag
35371			}
35372		case "id":
35373			if v != nil {
35374				var ID string
35375				err = json.Unmarshal(*v, &ID)
35376				if err != nil {
35377					return err
35378				}
35379				vn.ID = &ID
35380			}
35381		case "name":
35382			if v != nil {
35383				var name string
35384				err = json.Unmarshal(*v, &name)
35385				if err != nil {
35386					return err
35387				}
35388				vn.Name = &name
35389			}
35390		case "type":
35391			if v != nil {
35392				var typeVar string
35393				err = json.Unmarshal(*v, &typeVar)
35394				if err != nil {
35395					return err
35396				}
35397				vn.Type = &typeVar
35398			}
35399		case "location":
35400			if v != nil {
35401				var location string
35402				err = json.Unmarshal(*v, &location)
35403				if err != nil {
35404					return err
35405				}
35406				vn.Location = &location
35407			}
35408		case "tags":
35409			if v != nil {
35410				var tags map[string]*string
35411				err = json.Unmarshal(*v, &tags)
35412				if err != nil {
35413					return err
35414				}
35415				vn.Tags = tags
35416			}
35417		}
35418	}
35419
35420	return nil
35421}
35422
35423// VirtualNetworkBgpCommunities bgp Communities sent over ExpressRoute with each route corresponding to a
35424// prefix in this VNET.
35425type VirtualNetworkBgpCommunities struct {
35426	// VirtualNetworkCommunity - The BGP community associated with the virtual network.
35427	VirtualNetworkCommunity *string `json:"virtualNetworkCommunity,omitempty"`
35428	// RegionalCommunity - READ-ONLY; The BGP community associated with the region of the virtual network.
35429	RegionalCommunity *string `json:"regionalCommunity,omitempty"`
35430}
35431
35432// MarshalJSON is the custom marshaler for VirtualNetworkBgpCommunities.
35433func (vnbc VirtualNetworkBgpCommunities) MarshalJSON() ([]byte, error) {
35434	objectMap := make(map[string]interface{})
35435	if vnbc.VirtualNetworkCommunity != nil {
35436		objectMap["virtualNetworkCommunity"] = vnbc.VirtualNetworkCommunity
35437	}
35438	return json.Marshal(objectMap)
35439}
35440
35441// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
35442// resource.
35443type VirtualNetworkConnectionGatewayReference struct {
35444	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
35445	ID *string `json:"id,omitempty"`
35446}
35447
35448// VirtualNetworkGateway a common class for general resource information.
35449type VirtualNetworkGateway struct {
35450	autorest.Response `json:"-"`
35451	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
35452	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
35453	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35454	Etag *string `json:"etag,omitempty"`
35455	// ID - Resource ID.
35456	ID *string `json:"id,omitempty"`
35457	// Name - READ-ONLY; Resource name.
35458	Name *string `json:"name,omitempty"`
35459	// Type - READ-ONLY; Resource type.
35460	Type *string `json:"type,omitempty"`
35461	// Location - Resource location.
35462	Location *string `json:"location,omitempty"`
35463	// Tags - Resource tags.
35464	Tags map[string]*string `json:"tags"`
35465}
35466
35467// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
35468func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
35469	objectMap := make(map[string]interface{})
35470	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
35471		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
35472	}
35473	if vng.ID != nil {
35474		objectMap["id"] = vng.ID
35475	}
35476	if vng.Location != nil {
35477		objectMap["location"] = vng.Location
35478	}
35479	if vng.Tags != nil {
35480		objectMap["tags"] = vng.Tags
35481	}
35482	return json.Marshal(objectMap)
35483}
35484
35485// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
35486func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
35487	var m map[string]*json.RawMessage
35488	err := json.Unmarshal(body, &m)
35489	if err != nil {
35490		return err
35491	}
35492	for k, v := range m {
35493		switch k {
35494		case "properties":
35495			if v != nil {
35496				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
35497				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
35498				if err != nil {
35499					return err
35500				}
35501				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
35502			}
35503		case "etag":
35504			if v != nil {
35505				var etag string
35506				err = json.Unmarshal(*v, &etag)
35507				if err != nil {
35508					return err
35509				}
35510				vng.Etag = &etag
35511			}
35512		case "id":
35513			if v != nil {
35514				var ID string
35515				err = json.Unmarshal(*v, &ID)
35516				if err != nil {
35517					return err
35518				}
35519				vng.ID = &ID
35520			}
35521		case "name":
35522			if v != nil {
35523				var name string
35524				err = json.Unmarshal(*v, &name)
35525				if err != nil {
35526					return err
35527				}
35528				vng.Name = &name
35529			}
35530		case "type":
35531			if v != nil {
35532				var typeVar string
35533				err = json.Unmarshal(*v, &typeVar)
35534				if err != nil {
35535					return err
35536				}
35537				vng.Type = &typeVar
35538			}
35539		case "location":
35540			if v != nil {
35541				var location string
35542				err = json.Unmarshal(*v, &location)
35543				if err != nil {
35544					return err
35545				}
35546				vng.Location = &location
35547			}
35548		case "tags":
35549			if v != nil {
35550				var tags map[string]*string
35551				err = json.Unmarshal(*v, &tags)
35552				if err != nil {
35553					return err
35554				}
35555				vng.Tags = tags
35556			}
35557		}
35558	}
35559
35560	return nil
35561}
35562
35563// VirtualNetworkGatewayConnection a common class for general resource information.
35564type VirtualNetworkGatewayConnection struct {
35565	autorest.Response `json:"-"`
35566	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
35567	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
35568	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35569	Etag *string `json:"etag,omitempty"`
35570	// ID - Resource ID.
35571	ID *string `json:"id,omitempty"`
35572	// Name - READ-ONLY; Resource name.
35573	Name *string `json:"name,omitempty"`
35574	// Type - READ-ONLY; Resource type.
35575	Type *string `json:"type,omitempty"`
35576	// Location - Resource location.
35577	Location *string `json:"location,omitempty"`
35578	// Tags - Resource tags.
35579	Tags map[string]*string `json:"tags"`
35580}
35581
35582// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
35583func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
35584	objectMap := make(map[string]interface{})
35585	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
35586		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
35587	}
35588	if vngc.ID != nil {
35589		objectMap["id"] = vngc.ID
35590	}
35591	if vngc.Location != nil {
35592		objectMap["location"] = vngc.Location
35593	}
35594	if vngc.Tags != nil {
35595		objectMap["tags"] = vngc.Tags
35596	}
35597	return json.Marshal(objectMap)
35598}
35599
35600// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
35601func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
35602	var m map[string]*json.RawMessage
35603	err := json.Unmarshal(body, &m)
35604	if err != nil {
35605		return err
35606	}
35607	for k, v := range m {
35608		switch k {
35609		case "properties":
35610			if v != nil {
35611				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
35612				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
35613				if err != nil {
35614					return err
35615				}
35616				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
35617			}
35618		case "etag":
35619			if v != nil {
35620				var etag string
35621				err = json.Unmarshal(*v, &etag)
35622				if err != nil {
35623					return err
35624				}
35625				vngc.Etag = &etag
35626			}
35627		case "id":
35628			if v != nil {
35629				var ID string
35630				err = json.Unmarshal(*v, &ID)
35631				if err != nil {
35632					return err
35633				}
35634				vngc.ID = &ID
35635			}
35636		case "name":
35637			if v != nil {
35638				var name string
35639				err = json.Unmarshal(*v, &name)
35640				if err != nil {
35641					return err
35642				}
35643				vngc.Name = &name
35644			}
35645		case "type":
35646			if v != nil {
35647				var typeVar string
35648				err = json.Unmarshal(*v, &typeVar)
35649				if err != nil {
35650					return err
35651				}
35652				vngc.Type = &typeVar
35653			}
35654		case "location":
35655			if v != nil {
35656				var location string
35657				err = json.Unmarshal(*v, &location)
35658				if err != nil {
35659					return err
35660				}
35661				vngc.Location = &location
35662			}
35663		case "tags":
35664			if v != nil {
35665				var tags map[string]*string
35666				err = json.Unmarshal(*v, &tags)
35667				if err != nil {
35668					return err
35669				}
35670				vngc.Tags = tags
35671			}
35672		}
35673	}
35674
35675	return nil
35676}
35677
35678// VirtualNetworkGatewayConnectionListEntity a common class for general resource information.
35679type VirtualNetworkGatewayConnectionListEntity struct {
35680	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
35681	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
35682	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
35683	Etag *string `json:"etag,omitempty"`
35684	// ID - Resource ID.
35685	ID *string `json:"id,omitempty"`
35686	// Name - READ-ONLY; Resource name.
35687	Name *string `json:"name,omitempty"`
35688	// Type - READ-ONLY; Resource type.
35689	Type *string `json:"type,omitempty"`
35690	// Location - Resource location.
35691	Location *string `json:"location,omitempty"`
35692	// Tags - Resource tags.
35693	Tags map[string]*string `json:"tags"`
35694}
35695
35696// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
35697func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
35698	objectMap := make(map[string]interface{})
35699	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
35700		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
35701	}
35702	if vngcle.ID != nil {
35703		objectMap["id"] = vngcle.ID
35704	}
35705	if vngcle.Location != nil {
35706		objectMap["location"] = vngcle.Location
35707	}
35708	if vngcle.Tags != nil {
35709		objectMap["tags"] = vngcle.Tags
35710	}
35711	return json.Marshal(objectMap)
35712}
35713
35714// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
35715func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
35716	var m map[string]*json.RawMessage
35717	err := json.Unmarshal(body, &m)
35718	if err != nil {
35719		return err
35720	}
35721	for k, v := range m {
35722		switch k {
35723		case "properties":
35724			if v != nil {
35725				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
35726				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
35727				if err != nil {
35728					return err
35729				}
35730				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
35731			}
35732		case "etag":
35733			if v != nil {
35734				var etag string
35735				err = json.Unmarshal(*v, &etag)
35736				if err != nil {
35737					return err
35738				}
35739				vngcle.Etag = &etag
35740			}
35741		case "id":
35742			if v != nil {
35743				var ID string
35744				err = json.Unmarshal(*v, &ID)
35745				if err != nil {
35746					return err
35747				}
35748				vngcle.ID = &ID
35749			}
35750		case "name":
35751			if v != nil {
35752				var name string
35753				err = json.Unmarshal(*v, &name)
35754				if err != nil {
35755					return err
35756				}
35757				vngcle.Name = &name
35758			}
35759		case "type":
35760			if v != nil {
35761				var typeVar string
35762				err = json.Unmarshal(*v, &typeVar)
35763				if err != nil {
35764					return err
35765				}
35766				vngcle.Type = &typeVar
35767			}
35768		case "location":
35769			if v != nil {
35770				var location string
35771				err = json.Unmarshal(*v, &location)
35772				if err != nil {
35773					return err
35774				}
35775				vngcle.Location = &location
35776			}
35777		case "tags":
35778			if v != nil {
35779				var tags map[string]*string
35780				err = json.Unmarshal(*v, &tags)
35781				if err != nil {
35782					return err
35783				}
35784				vngcle.Tags = tags
35785			}
35786		}
35787	}
35788
35789	return nil
35790}
35791
35792// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties.
35793type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
35794	// AuthorizationKey - The authorizationKey.
35795	AuthorizationKey *string `json:"authorizationKey,omitempty"`
35796	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
35797	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
35798	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
35799	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
35800	// LocalNetworkGateway2 - The reference to local network gateway resource.
35801	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
35802	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
35803	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
35804	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
35805	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
35806	// RoutingWeight - The routing weight.
35807	RoutingWeight *int32 `json:"routingWeight,omitempty"`
35808	// ConnectionMode - The connection mode for this connection. Possible values include: 'VirtualNetworkGatewayConnectionModeDefault', 'VirtualNetworkGatewayConnectionModeResponderOnly', 'VirtualNetworkGatewayConnectionModeInitiatorOnly'
35809	ConnectionMode VirtualNetworkGatewayConnectionMode `json:"connectionMode,omitempty"`
35810	// SharedKey - The IPSec shared key.
35811	SharedKey *string `json:"sharedKey,omitempty"`
35812	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
35813	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
35814	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
35815	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
35816	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
35817	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
35818	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
35819	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
35820	// Peer - The reference to peerings resource.
35821	Peer *SubResource `json:"peer,omitempty"`
35822	// EnableBgp - EnableBgp flag.
35823	EnableBgp *bool `json:"enableBgp,omitempty"`
35824	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
35825	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
35826	// IpsecPolicies - The IPSec Policies to be considered by this connection.
35827	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
35828	// TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection.
35829	TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"`
35830	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway connection resource.
35831	ResourceGUID *string `json:"resourceGuid,omitempty"`
35832	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
35833	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
35834	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
35835	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
35836}
35837
35838// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
35839func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
35840	objectMap := make(map[string]interface{})
35841	if vngclepf.AuthorizationKey != nil {
35842		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
35843	}
35844	if vngclepf.VirtualNetworkGateway1 != nil {
35845		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
35846	}
35847	if vngclepf.VirtualNetworkGateway2 != nil {
35848		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
35849	}
35850	if vngclepf.LocalNetworkGateway2 != nil {
35851		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
35852	}
35853	if vngclepf.ConnectionType != "" {
35854		objectMap["connectionType"] = vngclepf.ConnectionType
35855	}
35856	if vngclepf.ConnectionProtocol != "" {
35857		objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol
35858	}
35859	if vngclepf.RoutingWeight != nil {
35860		objectMap["routingWeight"] = vngclepf.RoutingWeight
35861	}
35862	if vngclepf.ConnectionMode != "" {
35863		objectMap["connectionMode"] = vngclepf.ConnectionMode
35864	}
35865	if vngclepf.SharedKey != nil {
35866		objectMap["sharedKey"] = vngclepf.SharedKey
35867	}
35868	if vngclepf.Peer != nil {
35869		objectMap["peer"] = vngclepf.Peer
35870	}
35871	if vngclepf.EnableBgp != nil {
35872		objectMap["enableBgp"] = vngclepf.EnableBgp
35873	}
35874	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
35875		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
35876	}
35877	if vngclepf.IpsecPolicies != nil {
35878		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
35879	}
35880	if vngclepf.TrafficSelectorPolicies != nil {
35881		objectMap["trafficSelectorPolicies"] = vngclepf.TrafficSelectorPolicies
35882	}
35883	if vngclepf.ExpressRouteGatewayBypass != nil {
35884		objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass
35885	}
35886	return json.Marshal(objectMap)
35887}
35888
35889// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
35890// service call.
35891type VirtualNetworkGatewayConnectionListResult struct {
35892	autorest.Response `json:"-"`
35893	// Value - A list of VirtualNetworkGatewayConnection resources that exists in a resource group.
35894	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
35895	// NextLink - READ-ONLY; The URL to get the next set of results.
35896	NextLink *string `json:"nextLink,omitempty"`
35897}
35898
35899// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
35900func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
35901	objectMap := make(map[string]interface{})
35902	if vngclr.Value != nil {
35903		objectMap["value"] = vngclr.Value
35904	}
35905	return json.Marshal(objectMap)
35906}
35907
35908// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
35909// VirtualNetworkGatewayConnection values.
35910type VirtualNetworkGatewayConnectionListResultIterator struct {
35911	i    int
35912	page VirtualNetworkGatewayConnectionListResultPage
35913}
35914
35915// NextWithContext advances to the next value.  If there was an error making
35916// the request the iterator does not advance and the error is returned.
35917func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
35918	if tracing.IsEnabled() {
35919		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
35920		defer func() {
35921			sc := -1
35922			if iter.Response().Response.Response != nil {
35923				sc = iter.Response().Response.Response.StatusCode
35924			}
35925			tracing.EndSpan(ctx, sc, err)
35926		}()
35927	}
35928	iter.i++
35929	if iter.i < len(iter.page.Values()) {
35930		return nil
35931	}
35932	err = iter.page.NextWithContext(ctx)
35933	if err != nil {
35934		iter.i--
35935		return err
35936	}
35937	iter.i = 0
35938	return nil
35939}
35940
35941// Next advances to the next value.  If there was an error making
35942// the request the iterator does not advance and the error is returned.
35943// Deprecated: Use NextWithContext() instead.
35944func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
35945	return iter.NextWithContext(context.Background())
35946}
35947
35948// NotDone returns true if the enumeration should be started or is not yet complete.
35949func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
35950	return iter.page.NotDone() && iter.i < len(iter.page.Values())
35951}
35952
35953// Response returns the raw server response from the last page request.
35954func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
35955	return iter.page.Response()
35956}
35957
35958// Value returns the current value or a zero-initialized value if the
35959// iterator has advanced beyond the end of the collection.
35960func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
35961	if !iter.page.NotDone() {
35962		return VirtualNetworkGatewayConnection{}
35963	}
35964	return iter.page.Values()[iter.i]
35965}
35966
35967// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
35968func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
35969	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
35970}
35971
35972// IsEmpty returns true if the ListResult contains no values.
35973func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
35974	return vngclr.Value == nil || len(*vngclr.Value) == 0
35975}
35976
35977// hasNextLink returns true if the NextLink is not empty.
35978func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
35979	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
35980}
35981
35982// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
35983// It returns nil if no more results exist.
35984func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
35985	if !vngclr.hasNextLink() {
35986		return nil, nil
35987	}
35988	return autorest.Prepare((&http.Request{}).WithContext(ctx),
35989		autorest.AsJSON(),
35990		autorest.AsGet(),
35991		autorest.WithBaseURL(to.String(vngclr.NextLink)))
35992}
35993
35994// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
35995type VirtualNetworkGatewayConnectionListResultPage struct {
35996	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
35997	vngclr VirtualNetworkGatewayConnectionListResult
35998}
35999
36000// NextWithContext advances to the next page of values.  If there was an error making
36001// the request the page does not advance and the error is returned.
36002func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
36003	if tracing.IsEnabled() {
36004		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
36005		defer func() {
36006			sc := -1
36007			if page.Response().Response.Response != nil {
36008				sc = page.Response().Response.Response.StatusCode
36009			}
36010			tracing.EndSpan(ctx, sc, err)
36011		}()
36012	}
36013	for {
36014		next, err := page.fn(ctx, page.vngclr)
36015		if err != nil {
36016			return err
36017		}
36018		page.vngclr = next
36019		if !next.hasNextLink() || !next.IsEmpty() {
36020			break
36021		}
36022	}
36023	return nil
36024}
36025
36026// Next advances to the next page of values.  If there was an error making
36027// the request the page does not advance and the error is returned.
36028// Deprecated: Use NextWithContext() instead.
36029func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
36030	return page.NextWithContext(context.Background())
36031}
36032
36033// NotDone returns true if the page enumeration should be started or is not yet complete.
36034func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
36035	return !page.vngclr.IsEmpty()
36036}
36037
36038// Response returns the raw server response from the last page request.
36039func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
36040	return page.vngclr
36041}
36042
36043// Values returns the slice of values for the current page or nil if there are no values.
36044func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
36045	if page.vngclr.IsEmpty() {
36046		return nil
36047	}
36048	return *page.vngclr.Value
36049}
36050
36051// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
36052func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
36053	return VirtualNetworkGatewayConnectionListResultPage{
36054		fn:     getNextPage,
36055		vngclr: cur,
36056	}
36057}
36058
36059// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties.
36060type VirtualNetworkGatewayConnectionPropertiesFormat struct {
36061	// AuthorizationKey - The authorizationKey.
36062	AuthorizationKey *string `json:"authorizationKey,omitempty"`
36063	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
36064	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
36065	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
36066	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
36067	// LocalNetworkGateway2 - The reference to local network gateway resource.
36068	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
36069	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
36070	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
36071	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
36072	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
36073	// RoutingWeight - The routing weight.
36074	RoutingWeight *int32 `json:"routingWeight,omitempty"`
36075	// DpdTimeoutSeconds - The dead peer detection timeout of this connection in seconds.
36076	DpdTimeoutSeconds *int32 `json:"dpdTimeoutSeconds,omitempty"`
36077	// ConnectionMode - The connection mode for this connection. Possible values include: 'VirtualNetworkGatewayConnectionModeDefault', 'VirtualNetworkGatewayConnectionModeResponderOnly', 'VirtualNetworkGatewayConnectionModeInitiatorOnly'
36078	ConnectionMode VirtualNetworkGatewayConnectionMode `json:"connectionMode,omitempty"`
36079	// SharedKey - The IPSec shared key.
36080	SharedKey *string `json:"sharedKey,omitempty"`
36081	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
36082	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
36083	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
36084	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
36085	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
36086	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
36087	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
36088	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
36089	// Peer - The reference to peerings resource.
36090	Peer *SubResource `json:"peer,omitempty"`
36091	// EnableBgp - EnableBgp flag.
36092	EnableBgp *bool `json:"enableBgp,omitempty"`
36093	// UseLocalAzureIPAddress - Use private local Azure IP for the connection.
36094	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
36095	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
36096	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
36097	// IpsecPolicies - The IPSec Policies to be considered by this connection.
36098	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
36099	// TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection.
36100	TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"`
36101	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway connection resource.
36102	ResourceGUID *string `json:"resourceGuid,omitempty"`
36103	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
36104	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36105	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
36106	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
36107}
36108
36109// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
36110func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
36111	objectMap := make(map[string]interface{})
36112	if vngcpf.AuthorizationKey != nil {
36113		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
36114	}
36115	if vngcpf.VirtualNetworkGateway1 != nil {
36116		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
36117	}
36118	if vngcpf.VirtualNetworkGateway2 != nil {
36119		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
36120	}
36121	if vngcpf.LocalNetworkGateway2 != nil {
36122		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
36123	}
36124	if vngcpf.ConnectionType != "" {
36125		objectMap["connectionType"] = vngcpf.ConnectionType
36126	}
36127	if vngcpf.ConnectionProtocol != "" {
36128		objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol
36129	}
36130	if vngcpf.RoutingWeight != nil {
36131		objectMap["routingWeight"] = vngcpf.RoutingWeight
36132	}
36133	if vngcpf.DpdTimeoutSeconds != nil {
36134		objectMap["dpdTimeoutSeconds"] = vngcpf.DpdTimeoutSeconds
36135	}
36136	if vngcpf.ConnectionMode != "" {
36137		objectMap["connectionMode"] = vngcpf.ConnectionMode
36138	}
36139	if vngcpf.SharedKey != nil {
36140		objectMap["sharedKey"] = vngcpf.SharedKey
36141	}
36142	if vngcpf.Peer != nil {
36143		objectMap["peer"] = vngcpf.Peer
36144	}
36145	if vngcpf.EnableBgp != nil {
36146		objectMap["enableBgp"] = vngcpf.EnableBgp
36147	}
36148	if vngcpf.UseLocalAzureIPAddress != nil {
36149		objectMap["useLocalAzureIpAddress"] = vngcpf.UseLocalAzureIPAddress
36150	}
36151	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
36152		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
36153	}
36154	if vngcpf.IpsecPolicies != nil {
36155		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
36156	}
36157	if vngcpf.TrafficSelectorPolicies != nil {
36158		objectMap["trafficSelectorPolicies"] = vngcpf.TrafficSelectorPolicies
36159	}
36160	if vngcpf.ExpressRouteGatewayBypass != nil {
36161		objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass
36162	}
36163	return json.Marshal(objectMap)
36164}
36165
36166// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
36167// results of a long-running operation.
36168type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
36169	azure.FutureAPI
36170	// Result returns the result of the asynchronous operation.
36171	// If the operation has not completed it will return an error.
36172	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
36173}
36174
36175// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
36176// a long-running operation.
36177type VirtualNetworkGatewayConnectionsDeleteFuture struct {
36178	azure.FutureAPI
36179	// Result returns the result of the asynchronous operation.
36180	// If the operation has not completed it will return an error.
36181	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
36182}
36183
36184// VirtualNetworkGatewayConnectionsGetIkeSasFuture an abstraction for monitoring and retrieving the results
36185// of a long-running operation.
36186type VirtualNetworkGatewayConnectionsGetIkeSasFuture struct {
36187	azure.FutureAPI
36188	// Result returns the result of the asynchronous operation.
36189	// If the operation has not completed it will return an error.
36190	Result func(VirtualNetworkGatewayConnectionsClient) (String, error)
36191}
36192
36193// VirtualNetworkGatewayConnectionsResetConnectionFuture an abstraction for monitoring and retrieving the
36194// results of a long-running operation.
36195type VirtualNetworkGatewayConnectionsResetConnectionFuture struct {
36196	azure.FutureAPI
36197	// Result returns the result of the asynchronous operation.
36198	// If the operation has not completed it will return an error.
36199	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
36200}
36201
36202// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
36203// results of a long-running operation.
36204type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
36205	azure.FutureAPI
36206	// Result returns the result of the asynchronous operation.
36207	// If the operation has not completed it will return an error.
36208	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
36209}
36210
36211// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
36212// results of a long-running operation.
36213type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
36214	azure.FutureAPI
36215	// Result returns the result of the asynchronous operation.
36216	// If the operation has not completed it will return an error.
36217	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
36218}
36219
36220// VirtualNetworkGatewayConnectionsStartPacketCaptureFuture an abstraction for monitoring and retrieving
36221// the results of a long-running operation.
36222type VirtualNetworkGatewayConnectionsStartPacketCaptureFuture struct {
36223	azure.FutureAPI
36224	// Result returns the result of the asynchronous operation.
36225	// If the operation has not completed it will return an error.
36226	Result func(VirtualNetworkGatewayConnectionsClient) (String, error)
36227}
36228
36229// VirtualNetworkGatewayConnectionsStopPacketCaptureFuture an abstraction for monitoring and retrieving the
36230// results of a long-running operation.
36231type VirtualNetworkGatewayConnectionsStopPacketCaptureFuture struct {
36232	azure.FutureAPI
36233	// Result returns the result of the asynchronous operation.
36234	// If the operation has not completed it will return an error.
36235	Result func(VirtualNetworkGatewayConnectionsClient) (String, error)
36236}
36237
36238// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
36239// results of a long-running operation.
36240type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
36241	azure.FutureAPI
36242	// Result returns the result of the asynchronous operation.
36243	// If the operation has not completed it will return an error.
36244	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
36245}
36246
36247// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway.
36248type VirtualNetworkGatewayIPConfiguration struct {
36249	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
36250	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
36251	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
36252	Name *string `json:"name,omitempty"`
36253	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
36254	Etag *string `json:"etag,omitempty"`
36255	// ID - Resource ID.
36256	ID *string `json:"id,omitempty"`
36257}
36258
36259// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
36260func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
36261	objectMap := make(map[string]interface{})
36262	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
36263		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
36264	}
36265	if vngic.Name != nil {
36266		objectMap["name"] = vngic.Name
36267	}
36268	if vngic.ID != nil {
36269		objectMap["id"] = vngic.ID
36270	}
36271	return json.Marshal(objectMap)
36272}
36273
36274// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
36275func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
36276	var m map[string]*json.RawMessage
36277	err := json.Unmarshal(body, &m)
36278	if err != nil {
36279		return err
36280	}
36281	for k, v := range m {
36282		switch k {
36283		case "properties":
36284			if v != nil {
36285				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
36286				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
36287				if err != nil {
36288					return err
36289				}
36290				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
36291			}
36292		case "name":
36293			if v != nil {
36294				var name string
36295				err = json.Unmarshal(*v, &name)
36296				if err != nil {
36297					return err
36298				}
36299				vngic.Name = &name
36300			}
36301		case "etag":
36302			if v != nil {
36303				var etag string
36304				err = json.Unmarshal(*v, &etag)
36305				if err != nil {
36306					return err
36307				}
36308				vngic.Etag = &etag
36309			}
36310		case "id":
36311			if v != nil {
36312				var ID string
36313				err = json.Unmarshal(*v, &ID)
36314				if err != nil {
36315					return err
36316				}
36317				vngic.ID = &ID
36318			}
36319		}
36320	}
36321
36322	return nil
36323}
36324
36325// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration.
36326type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
36327	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
36328	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
36329	// Subnet - The reference to the subnet resource.
36330	Subnet *SubResource `json:"subnet,omitempty"`
36331	// PublicIPAddress - The reference to the public IP resource.
36332	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
36333	// PrivateIPAddress - READ-ONLY; Private IP Address for this gateway.
36334	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
36335	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
36336	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36337}
36338
36339// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
36340func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
36341	objectMap := make(map[string]interface{})
36342	if vngicpf.PrivateIPAllocationMethod != "" {
36343		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
36344	}
36345	if vngicpf.Subnet != nil {
36346		objectMap["subnet"] = vngicpf.Subnet
36347	}
36348	if vngicpf.PublicIPAddress != nil {
36349		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
36350	}
36351	return json.Marshal(objectMap)
36352}
36353
36354// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
36355// service call.
36356type VirtualNetworkGatewayListConnectionsResult struct {
36357	autorest.Response `json:"-"`
36358	// Value - A list of VirtualNetworkGatewayConnection resources that exists in a resource group.
36359	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
36360	// NextLink - READ-ONLY; The URL to get the next set of results.
36361	NextLink *string `json:"nextLink,omitempty"`
36362}
36363
36364// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
36365func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
36366	objectMap := make(map[string]interface{})
36367	if vnglcr.Value != nil {
36368		objectMap["value"] = vnglcr.Value
36369	}
36370	return json.Marshal(objectMap)
36371}
36372
36373// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
36374// VirtualNetworkGatewayConnectionListEntity values.
36375type VirtualNetworkGatewayListConnectionsResultIterator struct {
36376	i    int
36377	page VirtualNetworkGatewayListConnectionsResultPage
36378}
36379
36380// NextWithContext advances to the next value.  If there was an error making
36381// the request the iterator does not advance and the error is returned.
36382func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
36383	if tracing.IsEnabled() {
36384		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
36385		defer func() {
36386			sc := -1
36387			if iter.Response().Response.Response != nil {
36388				sc = iter.Response().Response.Response.StatusCode
36389			}
36390			tracing.EndSpan(ctx, sc, err)
36391		}()
36392	}
36393	iter.i++
36394	if iter.i < len(iter.page.Values()) {
36395		return nil
36396	}
36397	err = iter.page.NextWithContext(ctx)
36398	if err != nil {
36399		iter.i--
36400		return err
36401	}
36402	iter.i = 0
36403	return nil
36404}
36405
36406// Next advances to the next value.  If there was an error making
36407// the request the iterator does not advance and the error is returned.
36408// Deprecated: Use NextWithContext() instead.
36409func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
36410	return iter.NextWithContext(context.Background())
36411}
36412
36413// NotDone returns true if the enumeration should be started or is not yet complete.
36414func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
36415	return iter.page.NotDone() && iter.i < len(iter.page.Values())
36416}
36417
36418// Response returns the raw server response from the last page request.
36419func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
36420	return iter.page.Response()
36421}
36422
36423// Value returns the current value or a zero-initialized value if the
36424// iterator has advanced beyond the end of the collection.
36425func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
36426	if !iter.page.NotDone() {
36427		return VirtualNetworkGatewayConnectionListEntity{}
36428	}
36429	return iter.page.Values()[iter.i]
36430}
36431
36432// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
36433func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
36434	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
36435}
36436
36437// IsEmpty returns true if the ListResult contains no values.
36438func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
36439	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
36440}
36441
36442// hasNextLink returns true if the NextLink is not empty.
36443func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
36444	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
36445}
36446
36447// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
36448// It returns nil if no more results exist.
36449func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
36450	if !vnglcr.hasNextLink() {
36451		return nil, nil
36452	}
36453	return autorest.Prepare((&http.Request{}).WithContext(ctx),
36454		autorest.AsJSON(),
36455		autorest.AsGet(),
36456		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
36457}
36458
36459// VirtualNetworkGatewayListConnectionsResultPage contains a page of
36460// VirtualNetworkGatewayConnectionListEntity values.
36461type VirtualNetworkGatewayListConnectionsResultPage struct {
36462	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
36463	vnglcr VirtualNetworkGatewayListConnectionsResult
36464}
36465
36466// NextWithContext advances to the next page of values.  If there was an error making
36467// the request the page does not advance and the error is returned.
36468func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
36469	if tracing.IsEnabled() {
36470		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
36471		defer func() {
36472			sc := -1
36473			if page.Response().Response.Response != nil {
36474				sc = page.Response().Response.Response.StatusCode
36475			}
36476			tracing.EndSpan(ctx, sc, err)
36477		}()
36478	}
36479	for {
36480		next, err := page.fn(ctx, page.vnglcr)
36481		if err != nil {
36482			return err
36483		}
36484		page.vnglcr = next
36485		if !next.hasNextLink() || !next.IsEmpty() {
36486			break
36487		}
36488	}
36489	return nil
36490}
36491
36492// Next advances to the next page of values.  If there was an error making
36493// the request the page does not advance and the error is returned.
36494// Deprecated: Use NextWithContext() instead.
36495func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
36496	return page.NextWithContext(context.Background())
36497}
36498
36499// NotDone returns true if the page enumeration should be started or is not yet complete.
36500func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
36501	return !page.vnglcr.IsEmpty()
36502}
36503
36504// Response returns the raw server response from the last page request.
36505func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
36506	return page.vnglcr
36507}
36508
36509// Values returns the slice of values for the current page or nil if there are no values.
36510func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
36511	if page.vnglcr.IsEmpty() {
36512		return nil
36513	}
36514	return *page.vnglcr.Value
36515}
36516
36517// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
36518func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
36519	return VirtualNetworkGatewayListConnectionsResultPage{
36520		fn:     getNextPage,
36521		vnglcr: cur,
36522	}
36523}
36524
36525// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
36526type VirtualNetworkGatewayListResult struct {
36527	autorest.Response `json:"-"`
36528	// Value - A list of VirtualNetworkGateway resources that exists in a resource group.
36529	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
36530	// NextLink - READ-ONLY; The URL to get the next set of results.
36531	NextLink *string `json:"nextLink,omitempty"`
36532}
36533
36534// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
36535func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
36536	objectMap := make(map[string]interface{})
36537	if vnglr.Value != nil {
36538		objectMap["value"] = vnglr.Value
36539	}
36540	return json.Marshal(objectMap)
36541}
36542
36543// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
36544// values.
36545type VirtualNetworkGatewayListResultIterator struct {
36546	i    int
36547	page VirtualNetworkGatewayListResultPage
36548}
36549
36550// NextWithContext advances to the next value.  If there was an error making
36551// the request the iterator does not advance and the error is returned.
36552func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
36553	if tracing.IsEnabled() {
36554		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
36555		defer func() {
36556			sc := -1
36557			if iter.Response().Response.Response != nil {
36558				sc = iter.Response().Response.Response.StatusCode
36559			}
36560			tracing.EndSpan(ctx, sc, err)
36561		}()
36562	}
36563	iter.i++
36564	if iter.i < len(iter.page.Values()) {
36565		return nil
36566	}
36567	err = iter.page.NextWithContext(ctx)
36568	if err != nil {
36569		iter.i--
36570		return err
36571	}
36572	iter.i = 0
36573	return nil
36574}
36575
36576// Next advances to the next value.  If there was an error making
36577// the request the iterator does not advance and the error is returned.
36578// Deprecated: Use NextWithContext() instead.
36579func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
36580	return iter.NextWithContext(context.Background())
36581}
36582
36583// NotDone returns true if the enumeration should be started or is not yet complete.
36584func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
36585	return iter.page.NotDone() && iter.i < len(iter.page.Values())
36586}
36587
36588// Response returns the raw server response from the last page request.
36589func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
36590	return iter.page.Response()
36591}
36592
36593// Value returns the current value or a zero-initialized value if the
36594// iterator has advanced beyond the end of the collection.
36595func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
36596	if !iter.page.NotDone() {
36597		return VirtualNetworkGateway{}
36598	}
36599	return iter.page.Values()[iter.i]
36600}
36601
36602// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
36603func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
36604	return VirtualNetworkGatewayListResultIterator{page: page}
36605}
36606
36607// IsEmpty returns true if the ListResult contains no values.
36608func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
36609	return vnglr.Value == nil || len(*vnglr.Value) == 0
36610}
36611
36612// hasNextLink returns true if the NextLink is not empty.
36613func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
36614	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
36615}
36616
36617// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
36618// It returns nil if no more results exist.
36619func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
36620	if !vnglr.hasNextLink() {
36621		return nil, nil
36622	}
36623	return autorest.Prepare((&http.Request{}).WithContext(ctx),
36624		autorest.AsJSON(),
36625		autorest.AsGet(),
36626		autorest.WithBaseURL(to.String(vnglr.NextLink)))
36627}
36628
36629// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
36630type VirtualNetworkGatewayListResultPage struct {
36631	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
36632	vnglr VirtualNetworkGatewayListResult
36633}
36634
36635// NextWithContext advances to the next page of values.  If there was an error making
36636// the request the page does not advance and the error is returned.
36637func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
36638	if tracing.IsEnabled() {
36639		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
36640		defer func() {
36641			sc := -1
36642			if page.Response().Response.Response != nil {
36643				sc = page.Response().Response.Response.StatusCode
36644			}
36645			tracing.EndSpan(ctx, sc, err)
36646		}()
36647	}
36648	for {
36649		next, err := page.fn(ctx, page.vnglr)
36650		if err != nil {
36651			return err
36652		}
36653		page.vnglr = next
36654		if !next.hasNextLink() || !next.IsEmpty() {
36655			break
36656		}
36657	}
36658	return nil
36659}
36660
36661// Next advances to the next page of values.  If there was an error making
36662// the request the page does not advance and the error is returned.
36663// Deprecated: Use NextWithContext() instead.
36664func (page *VirtualNetworkGatewayListResultPage) Next() error {
36665	return page.NextWithContext(context.Background())
36666}
36667
36668// NotDone returns true if the page enumeration should be started or is not yet complete.
36669func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
36670	return !page.vnglr.IsEmpty()
36671}
36672
36673// Response returns the raw server response from the last page request.
36674func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
36675	return page.vnglr
36676}
36677
36678// Values returns the slice of values for the current page or nil if there are no values.
36679func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
36680	if page.vnglr.IsEmpty() {
36681		return nil
36682	}
36683	return *page.vnglr.Value
36684}
36685
36686// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
36687func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
36688	return VirtualNetworkGatewayListResultPage{
36689		fn:    getNextPage,
36690		vnglr: cur,
36691	}
36692}
36693
36694// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties.
36695type VirtualNetworkGatewayPropertiesFormat struct {
36696	// IPConfigurations - IP configurations for virtual network gateway.
36697	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
36698	// GatewayType - The type of this virtual network gateway. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute', 'VirtualNetworkGatewayTypeLocalGateway'
36699	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
36700	// VpnType - The type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased'
36701	VpnType VpnType `json:"vpnType,omitempty"`
36702	// VpnGatewayGeneration - The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. Possible values include: 'VpnGatewayGenerationNone', 'VpnGatewayGenerationGeneration1', 'VpnGatewayGenerationGeneration2'
36703	VpnGatewayGeneration VpnGatewayGeneration `json:"vpnGatewayGeneration,omitempty"`
36704	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
36705	EnableBgp *bool `json:"enableBgp,omitempty"`
36706	// EnablePrivateIPAddress - Whether private IP needs to be enabled on this gateway for connections or not.
36707	EnablePrivateIPAddress *bool `json:"enablePrivateIpAddress,omitempty"`
36708	// ActiveActive - ActiveActive flag.
36709	ActiveActive *bool `json:"activeActive,omitempty"`
36710	// 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.
36711	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
36712	// Sku - The reference to the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
36713	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
36714	// VpnClientConfiguration - The reference to the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
36715	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
36716	// BgpSettings - Virtual network gateway's BGP speaker settings.
36717	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
36718	// 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.
36719	CustomRoutes *AddressSpace `json:"customRoutes,omitempty"`
36720	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway resource.
36721	ResourceGUID *string `json:"resourceGuid,omitempty"`
36722	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
36723	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
36724	// EnableDNSForwarding - Whether dns forwarding is enabled or not.
36725	EnableDNSForwarding *bool `json:"enableDnsForwarding,omitempty"`
36726	// InboundDNSForwardingEndpoint - READ-ONLY; The IP address allocated by the gateway to which dns requests can be sent.
36727	InboundDNSForwardingEndpoint *string `json:"inboundDnsForwardingEndpoint,omitempty"`
36728	// VNetExtendedLocationResourceID - MAS FIJI customer vnet resource id. VirtualNetworkGateway of type local gateway is associated with the customer vnet.
36729	VNetExtendedLocationResourceID *string `json:"vNetExtendedLocationResourceId,omitempty"`
36730	// VirtualNetworkExtendedLocation - The extended location of type local virtual network gateway.
36731	VirtualNetworkExtendedLocation *ExtendedLocation `json:"virtualNetworkExtendedLocation,omitempty"`
36732}
36733
36734// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
36735func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
36736	objectMap := make(map[string]interface{})
36737	if vngpf.IPConfigurations != nil {
36738		objectMap["ipConfigurations"] = vngpf.IPConfigurations
36739	}
36740	if vngpf.GatewayType != "" {
36741		objectMap["gatewayType"] = vngpf.GatewayType
36742	}
36743	if vngpf.VpnType != "" {
36744		objectMap["vpnType"] = vngpf.VpnType
36745	}
36746	if vngpf.VpnGatewayGeneration != "" {
36747		objectMap["vpnGatewayGeneration"] = vngpf.VpnGatewayGeneration
36748	}
36749	if vngpf.EnableBgp != nil {
36750		objectMap["enableBgp"] = vngpf.EnableBgp
36751	}
36752	if vngpf.EnablePrivateIPAddress != nil {
36753		objectMap["enablePrivateIpAddress"] = vngpf.EnablePrivateIPAddress
36754	}
36755	if vngpf.ActiveActive != nil {
36756		objectMap["activeActive"] = vngpf.ActiveActive
36757	}
36758	if vngpf.GatewayDefaultSite != nil {
36759		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
36760	}
36761	if vngpf.Sku != nil {
36762		objectMap["sku"] = vngpf.Sku
36763	}
36764	if vngpf.VpnClientConfiguration != nil {
36765		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
36766	}
36767	if vngpf.BgpSettings != nil {
36768		objectMap["bgpSettings"] = vngpf.BgpSettings
36769	}
36770	if vngpf.CustomRoutes != nil {
36771		objectMap["customRoutes"] = vngpf.CustomRoutes
36772	}
36773	if vngpf.EnableDNSForwarding != nil {
36774		objectMap["enableDnsForwarding"] = vngpf.EnableDNSForwarding
36775	}
36776	if vngpf.VNetExtendedLocationResourceID != nil {
36777		objectMap["vNetExtendedLocationResourceId"] = vngpf.VNetExtendedLocationResourceID
36778	}
36779	if vngpf.VirtualNetworkExtendedLocation != nil {
36780		objectMap["virtualNetworkExtendedLocation"] = vngpf.VirtualNetworkExtendedLocation
36781	}
36782	return json.Marshal(objectMap)
36783}
36784
36785// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
36786// long-running operation.
36787type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
36788	azure.FutureAPI
36789	// Result returns the result of the asynchronous operation.
36790	// If the operation has not completed it will return an error.
36791	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
36792}
36793
36794// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
36795// long-running operation.
36796type VirtualNetworkGatewaysDeleteFuture struct {
36797	azure.FutureAPI
36798	// Result returns the result of the asynchronous operation.
36799	// If the operation has not completed it will return an error.
36800	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
36801}
36802
36803// VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture an abstraction for monitoring
36804// and retrieving the results of a long-running operation.
36805type VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture struct {
36806	azure.FutureAPI
36807	// Result returns the result of the asynchronous operation.
36808	// If the operation has not completed it will return an error.
36809	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
36810}
36811
36812// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
36813// results of a long-running operation.
36814type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
36815	azure.FutureAPI
36816	// Result returns the result of the asynchronous operation.
36817	// If the operation has not completed it will return an error.
36818	Result func(VirtualNetworkGatewaysClient) (String, error)
36819}
36820
36821// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
36822// of a long-running operation.
36823type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
36824	azure.FutureAPI
36825	// Result returns the result of the asynchronous operation.
36826	// If the operation has not completed it will return an error.
36827	Result func(VirtualNetworkGatewaysClient) (String, error)
36828}
36829
36830// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
36831// of a long-running operation.
36832type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
36833	azure.FutureAPI
36834	// Result returns the result of the asynchronous operation.
36835	// If the operation has not completed it will return an error.
36836	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
36837}
36838
36839// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
36840// a long-running operation.
36841type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
36842	azure.FutureAPI
36843	// Result returns the result of the asynchronous operation.
36844	// If the operation has not completed it will return an error.
36845	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
36846}
36847
36848// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
36849// a long-running operation.
36850type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
36851	azure.FutureAPI
36852	// Result returns the result of the asynchronous operation.
36853	// If the operation has not completed it will return an error.
36854	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
36855}
36856
36857// VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture an abstraction for monitoring and retrieving
36858// the results of a long-running operation.
36859type VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture struct {
36860	azure.FutureAPI
36861	// Result returns the result of the asynchronous operation.
36862	// If the operation has not completed it will return an error.
36863	Result func(VirtualNetworkGatewaysClient) (VpnClientConnectionHealthDetailListResult, error)
36864}
36865
36866// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
36867// results of a long-running operation.
36868type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
36869	azure.FutureAPI
36870	// Result returns the result of the asynchronous operation.
36871	// If the operation has not completed it will return an error.
36872	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
36873}
36874
36875// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
36876// results of a long-running operation.
36877type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
36878	azure.FutureAPI
36879	// Result returns the result of the asynchronous operation.
36880	// If the operation has not completed it will return an error.
36881	Result func(VirtualNetworkGatewaysClient) (String, error)
36882}
36883
36884// VirtualNetworkGatewaySku virtualNetworkGatewaySku details.
36885type VirtualNetworkGatewaySku struct {
36886	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw4', 'VirtualNetworkGatewaySkuNameVpnGw5', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameVpnGw4AZ', 'VirtualNetworkGatewaySkuNameVpnGw5AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
36887	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
36888	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw4', 'VirtualNetworkGatewaySkuTierVpnGw5', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierVpnGw4AZ', 'VirtualNetworkGatewaySkuTierVpnGw5AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
36889	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
36890	// Capacity - READ-ONLY; The capacity.
36891	Capacity *int32 `json:"capacity,omitempty"`
36892}
36893
36894// MarshalJSON is the custom marshaler for VirtualNetworkGatewaySku.
36895func (vngs VirtualNetworkGatewaySku) MarshalJSON() ([]byte, error) {
36896	objectMap := make(map[string]interface{})
36897	if vngs.Name != "" {
36898		objectMap["name"] = vngs.Name
36899	}
36900	if vngs.Tier != "" {
36901		objectMap["tier"] = vngs.Tier
36902	}
36903	return json.Marshal(objectMap)
36904}
36905
36906// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
36907// long-running operation.
36908type VirtualNetworkGatewaysResetFuture struct {
36909	azure.FutureAPI
36910	// Result returns the result of the asynchronous operation.
36911	// If the operation has not completed it will return an error.
36912	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
36913}
36914
36915// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
36916// results of a long-running operation.
36917type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
36918	azure.FutureAPI
36919	// Result returns the result of the asynchronous operation.
36920	// If the operation has not completed it will return an error.
36921	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
36922}
36923
36924// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
36925// results of a long-running operation.
36926type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
36927	azure.FutureAPI
36928	// Result returns the result of the asynchronous operation.
36929	// If the operation has not completed it will return an error.
36930	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
36931}
36932
36933// VirtualNetworkGatewaysStartPacketCaptureFuture an abstraction for monitoring and retrieving the results
36934// of a long-running operation.
36935type VirtualNetworkGatewaysStartPacketCaptureFuture struct {
36936	azure.FutureAPI
36937	// Result returns the result of the asynchronous operation.
36938	// If the operation has not completed it will return an error.
36939	Result func(VirtualNetworkGatewaysClient) (String, error)
36940}
36941
36942// VirtualNetworkGatewaysStopPacketCaptureFuture an abstraction for monitoring and retrieving the results
36943// of a long-running operation.
36944type VirtualNetworkGatewaysStopPacketCaptureFuture struct {
36945	azure.FutureAPI
36946	// Result returns the result of the asynchronous operation.
36947	// If the operation has not completed it will return an error.
36948	Result func(VirtualNetworkGatewaysClient) (String, error)
36949}
36950
36951// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
36952// long-running operation.
36953type VirtualNetworkGatewaysUpdateTagsFuture struct {
36954	azure.FutureAPI
36955	// Result returns the result of the asynchronous operation.
36956	// If the operation has not completed it will return an error.
36957	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
36958}
36959
36960// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
36961type VirtualNetworkListResult struct {
36962	autorest.Response `json:"-"`
36963	// Value - A list of VirtualNetwork resources in a resource group.
36964	Value *[]VirtualNetwork `json:"value,omitempty"`
36965	// NextLink - The URL to get the next set of results.
36966	NextLink *string `json:"nextLink,omitempty"`
36967}
36968
36969// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
36970type VirtualNetworkListResultIterator struct {
36971	i    int
36972	page VirtualNetworkListResultPage
36973}
36974
36975// NextWithContext advances to the next value.  If there was an error making
36976// the request the iterator does not advance and the error is returned.
36977func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
36978	if tracing.IsEnabled() {
36979		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
36980		defer func() {
36981			sc := -1
36982			if iter.Response().Response.Response != nil {
36983				sc = iter.Response().Response.Response.StatusCode
36984			}
36985			tracing.EndSpan(ctx, sc, err)
36986		}()
36987	}
36988	iter.i++
36989	if iter.i < len(iter.page.Values()) {
36990		return nil
36991	}
36992	err = iter.page.NextWithContext(ctx)
36993	if err != nil {
36994		iter.i--
36995		return err
36996	}
36997	iter.i = 0
36998	return nil
36999}
37000
37001// Next advances to the next value.  If there was an error making
37002// the request the iterator does not advance and the error is returned.
37003// Deprecated: Use NextWithContext() instead.
37004func (iter *VirtualNetworkListResultIterator) Next() error {
37005	return iter.NextWithContext(context.Background())
37006}
37007
37008// NotDone returns true if the enumeration should be started or is not yet complete.
37009func (iter VirtualNetworkListResultIterator) NotDone() bool {
37010	return iter.page.NotDone() && iter.i < len(iter.page.Values())
37011}
37012
37013// Response returns the raw server response from the last page request.
37014func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
37015	return iter.page.Response()
37016}
37017
37018// Value returns the current value or a zero-initialized value if the
37019// iterator has advanced beyond the end of the collection.
37020func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
37021	if !iter.page.NotDone() {
37022		return VirtualNetwork{}
37023	}
37024	return iter.page.Values()[iter.i]
37025}
37026
37027// Creates a new instance of the VirtualNetworkListResultIterator type.
37028func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
37029	return VirtualNetworkListResultIterator{page: page}
37030}
37031
37032// IsEmpty returns true if the ListResult contains no values.
37033func (vnlr VirtualNetworkListResult) IsEmpty() bool {
37034	return vnlr.Value == nil || len(*vnlr.Value) == 0
37035}
37036
37037// hasNextLink returns true if the NextLink is not empty.
37038func (vnlr VirtualNetworkListResult) hasNextLink() bool {
37039	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
37040}
37041
37042// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
37043// It returns nil if no more results exist.
37044func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
37045	if !vnlr.hasNextLink() {
37046		return nil, nil
37047	}
37048	return autorest.Prepare((&http.Request{}).WithContext(ctx),
37049		autorest.AsJSON(),
37050		autorest.AsGet(),
37051		autorest.WithBaseURL(to.String(vnlr.NextLink)))
37052}
37053
37054// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
37055type VirtualNetworkListResultPage struct {
37056	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
37057	vnlr VirtualNetworkListResult
37058}
37059
37060// NextWithContext advances to the next page of values.  If there was an error making
37061// the request the page does not advance and the error is returned.
37062func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
37063	if tracing.IsEnabled() {
37064		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
37065		defer func() {
37066			sc := -1
37067			if page.Response().Response.Response != nil {
37068				sc = page.Response().Response.Response.StatusCode
37069			}
37070			tracing.EndSpan(ctx, sc, err)
37071		}()
37072	}
37073	for {
37074		next, err := page.fn(ctx, page.vnlr)
37075		if err != nil {
37076			return err
37077		}
37078		page.vnlr = next
37079		if !next.hasNextLink() || !next.IsEmpty() {
37080			break
37081		}
37082	}
37083	return nil
37084}
37085
37086// Next advances to the next page of values.  If there was an error making
37087// the request the page does not advance and the error is returned.
37088// Deprecated: Use NextWithContext() instead.
37089func (page *VirtualNetworkListResultPage) Next() error {
37090	return page.NextWithContext(context.Background())
37091}
37092
37093// NotDone returns true if the page enumeration should be started or is not yet complete.
37094func (page VirtualNetworkListResultPage) NotDone() bool {
37095	return !page.vnlr.IsEmpty()
37096}
37097
37098// Response returns the raw server response from the last page request.
37099func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
37100	return page.vnlr
37101}
37102
37103// Values returns the slice of values for the current page or nil if there are no values.
37104func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
37105	if page.vnlr.IsEmpty() {
37106		return nil
37107	}
37108	return *page.vnlr.Value
37109}
37110
37111// Creates a new instance of the VirtualNetworkListResultPage type.
37112func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
37113	return VirtualNetworkListResultPage{
37114		fn:   getNextPage,
37115		vnlr: cur,
37116	}
37117}
37118
37119// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
37120type VirtualNetworkListUsageResult struct {
37121	autorest.Response `json:"-"`
37122	// Value - READ-ONLY; VirtualNetwork usage stats.
37123	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
37124	// NextLink - The URL to get the next set of results.
37125	NextLink *string `json:"nextLink,omitempty"`
37126}
37127
37128// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
37129func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
37130	objectMap := make(map[string]interface{})
37131	if vnlur.NextLink != nil {
37132		objectMap["nextLink"] = vnlur.NextLink
37133	}
37134	return json.Marshal(objectMap)
37135}
37136
37137// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
37138// values.
37139type VirtualNetworkListUsageResultIterator struct {
37140	i    int
37141	page VirtualNetworkListUsageResultPage
37142}
37143
37144// NextWithContext advances to the next value.  If there was an error making
37145// the request the iterator does not advance and the error is returned.
37146func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
37147	if tracing.IsEnabled() {
37148		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
37149		defer func() {
37150			sc := -1
37151			if iter.Response().Response.Response != nil {
37152				sc = iter.Response().Response.Response.StatusCode
37153			}
37154			tracing.EndSpan(ctx, sc, err)
37155		}()
37156	}
37157	iter.i++
37158	if iter.i < len(iter.page.Values()) {
37159		return nil
37160	}
37161	err = iter.page.NextWithContext(ctx)
37162	if err != nil {
37163		iter.i--
37164		return err
37165	}
37166	iter.i = 0
37167	return nil
37168}
37169
37170// Next advances to the next value.  If there was an error making
37171// the request the iterator does not advance and the error is returned.
37172// Deprecated: Use NextWithContext() instead.
37173func (iter *VirtualNetworkListUsageResultIterator) Next() error {
37174	return iter.NextWithContext(context.Background())
37175}
37176
37177// NotDone returns true if the enumeration should be started or is not yet complete.
37178func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
37179	return iter.page.NotDone() && iter.i < len(iter.page.Values())
37180}
37181
37182// Response returns the raw server response from the last page request.
37183func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
37184	return iter.page.Response()
37185}
37186
37187// Value returns the current value or a zero-initialized value if the
37188// iterator has advanced beyond the end of the collection.
37189func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
37190	if !iter.page.NotDone() {
37191		return VirtualNetworkUsage{}
37192	}
37193	return iter.page.Values()[iter.i]
37194}
37195
37196// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
37197func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
37198	return VirtualNetworkListUsageResultIterator{page: page}
37199}
37200
37201// IsEmpty returns true if the ListResult contains no values.
37202func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
37203	return vnlur.Value == nil || len(*vnlur.Value) == 0
37204}
37205
37206// hasNextLink returns true if the NextLink is not empty.
37207func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
37208	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
37209}
37210
37211// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
37212// It returns nil if no more results exist.
37213func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
37214	if !vnlur.hasNextLink() {
37215		return nil, nil
37216	}
37217	return autorest.Prepare((&http.Request{}).WithContext(ctx),
37218		autorest.AsJSON(),
37219		autorest.AsGet(),
37220		autorest.WithBaseURL(to.String(vnlur.NextLink)))
37221}
37222
37223// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
37224type VirtualNetworkListUsageResultPage struct {
37225	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
37226	vnlur VirtualNetworkListUsageResult
37227}
37228
37229// NextWithContext advances to the next page of values.  If there was an error making
37230// the request the page does not advance and the error is returned.
37231func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
37232	if tracing.IsEnabled() {
37233		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
37234		defer func() {
37235			sc := -1
37236			if page.Response().Response.Response != nil {
37237				sc = page.Response().Response.Response.StatusCode
37238			}
37239			tracing.EndSpan(ctx, sc, err)
37240		}()
37241	}
37242	for {
37243		next, err := page.fn(ctx, page.vnlur)
37244		if err != nil {
37245			return err
37246		}
37247		page.vnlur = next
37248		if !next.hasNextLink() || !next.IsEmpty() {
37249			break
37250		}
37251	}
37252	return nil
37253}
37254
37255// Next advances to the next page of values.  If there was an error making
37256// the request the page does not advance and the error is returned.
37257// Deprecated: Use NextWithContext() instead.
37258func (page *VirtualNetworkListUsageResultPage) Next() error {
37259	return page.NextWithContext(context.Background())
37260}
37261
37262// NotDone returns true if the page enumeration should be started or is not yet complete.
37263func (page VirtualNetworkListUsageResultPage) NotDone() bool {
37264	return !page.vnlur.IsEmpty()
37265}
37266
37267// Response returns the raw server response from the last page request.
37268func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
37269	return page.vnlur
37270}
37271
37272// Values returns the slice of values for the current page or nil if there are no values.
37273func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
37274	if page.vnlur.IsEmpty() {
37275		return nil
37276	}
37277	return *page.vnlur.Value
37278}
37279
37280// Creates a new instance of the VirtualNetworkListUsageResultPage type.
37281func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
37282	return VirtualNetworkListUsageResultPage{
37283		fn:    getNextPage,
37284		vnlur: cur,
37285	}
37286}
37287
37288// VirtualNetworkPeering peerings in a virtual network resource.
37289type VirtualNetworkPeering struct {
37290	autorest.Response `json:"-"`
37291	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
37292	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
37293	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
37294	Name *string `json:"name,omitempty"`
37295	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
37296	Etag *string `json:"etag,omitempty"`
37297	// ID - Resource ID.
37298	ID *string `json:"id,omitempty"`
37299}
37300
37301// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
37302func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
37303	objectMap := make(map[string]interface{})
37304	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
37305		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
37306	}
37307	if vnp.Name != nil {
37308		objectMap["name"] = vnp.Name
37309	}
37310	if vnp.ID != nil {
37311		objectMap["id"] = vnp.ID
37312	}
37313	return json.Marshal(objectMap)
37314}
37315
37316// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
37317func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
37318	var m map[string]*json.RawMessage
37319	err := json.Unmarshal(body, &m)
37320	if err != nil {
37321		return err
37322	}
37323	for k, v := range m {
37324		switch k {
37325		case "properties":
37326			if v != nil {
37327				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
37328				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
37329				if err != nil {
37330					return err
37331				}
37332				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
37333			}
37334		case "name":
37335			if v != nil {
37336				var name string
37337				err = json.Unmarshal(*v, &name)
37338				if err != nil {
37339					return err
37340				}
37341				vnp.Name = &name
37342			}
37343		case "etag":
37344			if v != nil {
37345				var etag string
37346				err = json.Unmarshal(*v, &etag)
37347				if err != nil {
37348					return err
37349				}
37350				vnp.Etag = &etag
37351			}
37352		case "id":
37353			if v != nil {
37354				var ID string
37355				err = json.Unmarshal(*v, &ID)
37356				if err != nil {
37357					return err
37358				}
37359				vnp.ID = &ID
37360			}
37361		}
37362	}
37363
37364	return nil
37365}
37366
37367// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
37368// belong to a virtual network.
37369type VirtualNetworkPeeringListResult struct {
37370	autorest.Response `json:"-"`
37371	// Value - The peerings in a virtual network.
37372	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
37373	// NextLink - The URL to get the next set of results.
37374	NextLink *string `json:"nextLink,omitempty"`
37375}
37376
37377// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
37378// values.
37379type VirtualNetworkPeeringListResultIterator struct {
37380	i    int
37381	page VirtualNetworkPeeringListResultPage
37382}
37383
37384// NextWithContext advances to the next value.  If there was an error making
37385// the request the iterator does not advance and the error is returned.
37386func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
37387	if tracing.IsEnabled() {
37388		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
37389		defer func() {
37390			sc := -1
37391			if iter.Response().Response.Response != nil {
37392				sc = iter.Response().Response.Response.StatusCode
37393			}
37394			tracing.EndSpan(ctx, sc, err)
37395		}()
37396	}
37397	iter.i++
37398	if iter.i < len(iter.page.Values()) {
37399		return nil
37400	}
37401	err = iter.page.NextWithContext(ctx)
37402	if err != nil {
37403		iter.i--
37404		return err
37405	}
37406	iter.i = 0
37407	return nil
37408}
37409
37410// Next advances to the next value.  If there was an error making
37411// the request the iterator does not advance and the error is returned.
37412// Deprecated: Use NextWithContext() instead.
37413func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
37414	return iter.NextWithContext(context.Background())
37415}
37416
37417// NotDone returns true if the enumeration should be started or is not yet complete.
37418func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
37419	return iter.page.NotDone() && iter.i < len(iter.page.Values())
37420}
37421
37422// Response returns the raw server response from the last page request.
37423func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
37424	return iter.page.Response()
37425}
37426
37427// Value returns the current value or a zero-initialized value if the
37428// iterator has advanced beyond the end of the collection.
37429func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
37430	if !iter.page.NotDone() {
37431		return VirtualNetworkPeering{}
37432	}
37433	return iter.page.Values()[iter.i]
37434}
37435
37436// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
37437func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
37438	return VirtualNetworkPeeringListResultIterator{page: page}
37439}
37440
37441// IsEmpty returns true if the ListResult contains no values.
37442func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
37443	return vnplr.Value == nil || len(*vnplr.Value) == 0
37444}
37445
37446// hasNextLink returns true if the NextLink is not empty.
37447func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
37448	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
37449}
37450
37451// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
37452// It returns nil if no more results exist.
37453func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
37454	if !vnplr.hasNextLink() {
37455		return nil, nil
37456	}
37457	return autorest.Prepare((&http.Request{}).WithContext(ctx),
37458		autorest.AsJSON(),
37459		autorest.AsGet(),
37460		autorest.WithBaseURL(to.String(vnplr.NextLink)))
37461}
37462
37463// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
37464type VirtualNetworkPeeringListResultPage struct {
37465	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
37466	vnplr VirtualNetworkPeeringListResult
37467}
37468
37469// NextWithContext advances to the next page of values.  If there was an error making
37470// the request the page does not advance and the error is returned.
37471func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
37472	if tracing.IsEnabled() {
37473		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
37474		defer func() {
37475			sc := -1
37476			if page.Response().Response.Response != nil {
37477				sc = page.Response().Response.Response.StatusCode
37478			}
37479			tracing.EndSpan(ctx, sc, err)
37480		}()
37481	}
37482	for {
37483		next, err := page.fn(ctx, page.vnplr)
37484		if err != nil {
37485			return err
37486		}
37487		page.vnplr = next
37488		if !next.hasNextLink() || !next.IsEmpty() {
37489			break
37490		}
37491	}
37492	return nil
37493}
37494
37495// Next advances to the next page of values.  If there was an error making
37496// the request the page does not advance and the error is returned.
37497// Deprecated: Use NextWithContext() instead.
37498func (page *VirtualNetworkPeeringListResultPage) Next() error {
37499	return page.NextWithContext(context.Background())
37500}
37501
37502// NotDone returns true if the page enumeration should be started or is not yet complete.
37503func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
37504	return !page.vnplr.IsEmpty()
37505}
37506
37507// Response returns the raw server response from the last page request.
37508func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
37509	return page.vnplr
37510}
37511
37512// Values returns the slice of values for the current page or nil if there are no values.
37513func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
37514	if page.vnplr.IsEmpty() {
37515		return nil
37516	}
37517	return *page.vnplr.Value
37518}
37519
37520// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
37521func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
37522	return VirtualNetworkPeeringListResultPage{
37523		fn:    getNextPage,
37524		vnplr: cur,
37525	}
37526}
37527
37528// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
37529type VirtualNetworkPeeringPropertiesFormat struct {
37530	// AllowVirtualNetworkAccess - Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
37531	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
37532	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
37533	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
37534	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
37535	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
37536	// 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.
37537	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
37538	// 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).
37539	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
37540	// RemoteAddressSpace - The reference to the remote virtual network address space.
37541	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
37542	// RemoteBgpCommunities - The reference to the remote virtual network's Bgp Communities.
37543	RemoteBgpCommunities *VirtualNetworkBgpCommunities `json:"remoteBgpCommunities,omitempty"`
37544	// PeeringState - The status of the virtual network peering. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
37545	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
37546	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
37547	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
37548}
37549
37550// MarshalJSON is the custom marshaler for VirtualNetworkPeeringPropertiesFormat.
37551func (vnppf VirtualNetworkPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
37552	objectMap := make(map[string]interface{})
37553	if vnppf.AllowVirtualNetworkAccess != nil {
37554		objectMap["allowVirtualNetworkAccess"] = vnppf.AllowVirtualNetworkAccess
37555	}
37556	if vnppf.AllowForwardedTraffic != nil {
37557		objectMap["allowForwardedTraffic"] = vnppf.AllowForwardedTraffic
37558	}
37559	if vnppf.AllowGatewayTransit != nil {
37560		objectMap["allowGatewayTransit"] = vnppf.AllowGatewayTransit
37561	}
37562	if vnppf.UseRemoteGateways != nil {
37563		objectMap["useRemoteGateways"] = vnppf.UseRemoteGateways
37564	}
37565	if vnppf.RemoteVirtualNetwork != nil {
37566		objectMap["remoteVirtualNetwork"] = vnppf.RemoteVirtualNetwork
37567	}
37568	if vnppf.RemoteAddressSpace != nil {
37569		objectMap["remoteAddressSpace"] = vnppf.RemoteAddressSpace
37570	}
37571	if vnppf.RemoteBgpCommunities != nil {
37572		objectMap["remoteBgpCommunities"] = vnppf.RemoteBgpCommunities
37573	}
37574	if vnppf.PeeringState != "" {
37575		objectMap["peeringState"] = vnppf.PeeringState
37576	}
37577	return json.Marshal(objectMap)
37578}
37579
37580// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
37581// long-running operation.
37582type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
37583	azure.FutureAPI
37584	// Result returns the result of the asynchronous operation.
37585	// If the operation has not completed it will return an error.
37586	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
37587}
37588
37589// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
37590// long-running operation.
37591type VirtualNetworkPeeringsDeleteFuture struct {
37592	azure.FutureAPI
37593	// Result returns the result of the asynchronous operation.
37594	// If the operation has not completed it will return an error.
37595	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
37596}
37597
37598// VirtualNetworkPropertiesFormat properties of the virtual network.
37599type VirtualNetworkPropertiesFormat struct {
37600	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
37601	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
37602	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
37603	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
37604	// Subnets - A list of subnets in a Virtual Network.
37605	Subnets *[]Subnet `json:"subnets,omitempty"`
37606	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
37607	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
37608	// ResourceGUID - READ-ONLY; The resourceGuid property of the Virtual Network resource.
37609	ResourceGUID *string `json:"resourceGuid,omitempty"`
37610	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
37611	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
37612	// 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.
37613	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
37614	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
37615	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
37616	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
37617	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
37618	// BgpCommunities - Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET.
37619	BgpCommunities *VirtualNetworkBgpCommunities `json:"bgpCommunities,omitempty"`
37620	// IPAllocations - Array of IpAllocation which reference this VNET.
37621	IPAllocations *[]SubResource `json:"ipAllocations,omitempty"`
37622}
37623
37624// MarshalJSON is the custom marshaler for VirtualNetworkPropertiesFormat.
37625func (vnpf VirtualNetworkPropertiesFormat) MarshalJSON() ([]byte, error) {
37626	objectMap := make(map[string]interface{})
37627	if vnpf.AddressSpace != nil {
37628		objectMap["addressSpace"] = vnpf.AddressSpace
37629	}
37630	if vnpf.DhcpOptions != nil {
37631		objectMap["dhcpOptions"] = vnpf.DhcpOptions
37632	}
37633	if vnpf.Subnets != nil {
37634		objectMap["subnets"] = vnpf.Subnets
37635	}
37636	if vnpf.VirtualNetworkPeerings != nil {
37637		objectMap["virtualNetworkPeerings"] = vnpf.VirtualNetworkPeerings
37638	}
37639	if vnpf.EnableDdosProtection != nil {
37640		objectMap["enableDdosProtection"] = vnpf.EnableDdosProtection
37641	}
37642	if vnpf.EnableVMProtection != nil {
37643		objectMap["enableVmProtection"] = vnpf.EnableVMProtection
37644	}
37645	if vnpf.DdosProtectionPlan != nil {
37646		objectMap["ddosProtectionPlan"] = vnpf.DdosProtectionPlan
37647	}
37648	if vnpf.BgpCommunities != nil {
37649		objectMap["bgpCommunities"] = vnpf.BgpCommunities
37650	}
37651	if vnpf.IPAllocations != nil {
37652		objectMap["ipAllocations"] = vnpf.IPAllocations
37653	}
37654	return json.Marshal(objectMap)
37655}
37656
37657// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
37658// long-running operation.
37659type VirtualNetworksCreateOrUpdateFuture struct {
37660	azure.FutureAPI
37661	// Result returns the result of the asynchronous operation.
37662	// If the operation has not completed it will return an error.
37663	Result func(VirtualNetworksClient) (VirtualNetwork, error)
37664}
37665
37666// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
37667// operation.
37668type VirtualNetworksDeleteFuture struct {
37669	azure.FutureAPI
37670	// Result returns the result of the asynchronous operation.
37671	// If the operation has not completed it will return an error.
37672	Result func(VirtualNetworksClient) (autorest.Response, error)
37673}
37674
37675// VirtualNetworkTap virtual Network Tap resource.
37676type VirtualNetworkTap struct {
37677	autorest.Response `json:"-"`
37678	// VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties.
37679	*VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"`
37680	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
37681	Etag *string `json:"etag,omitempty"`
37682	// ID - Resource ID.
37683	ID *string `json:"id,omitempty"`
37684	// Name - READ-ONLY; Resource name.
37685	Name *string `json:"name,omitempty"`
37686	// Type - READ-ONLY; Resource type.
37687	Type *string `json:"type,omitempty"`
37688	// Location - Resource location.
37689	Location *string `json:"location,omitempty"`
37690	// Tags - Resource tags.
37691	Tags map[string]*string `json:"tags"`
37692}
37693
37694// MarshalJSON is the custom marshaler for VirtualNetworkTap.
37695func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) {
37696	objectMap := make(map[string]interface{})
37697	if vnt.VirtualNetworkTapPropertiesFormat != nil {
37698		objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat
37699	}
37700	if vnt.ID != nil {
37701		objectMap["id"] = vnt.ID
37702	}
37703	if vnt.Location != nil {
37704		objectMap["location"] = vnt.Location
37705	}
37706	if vnt.Tags != nil {
37707		objectMap["tags"] = vnt.Tags
37708	}
37709	return json.Marshal(objectMap)
37710}
37711
37712// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct.
37713func (vnt *VirtualNetworkTap) UnmarshalJSON(body []byte) error {
37714	var m map[string]*json.RawMessage
37715	err := json.Unmarshal(body, &m)
37716	if err != nil {
37717		return err
37718	}
37719	for k, v := range m {
37720		switch k {
37721		case "properties":
37722			if v != nil {
37723				var virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat
37724				err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat)
37725				if err != nil {
37726					return err
37727				}
37728				vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat
37729			}
37730		case "etag":
37731			if v != nil {
37732				var etag string
37733				err = json.Unmarshal(*v, &etag)
37734				if err != nil {
37735					return err
37736				}
37737				vnt.Etag = &etag
37738			}
37739		case "id":
37740			if v != nil {
37741				var ID string
37742				err = json.Unmarshal(*v, &ID)
37743				if err != nil {
37744					return err
37745				}
37746				vnt.ID = &ID
37747			}
37748		case "name":
37749			if v != nil {
37750				var name string
37751				err = json.Unmarshal(*v, &name)
37752				if err != nil {
37753					return err
37754				}
37755				vnt.Name = &name
37756			}
37757		case "type":
37758			if v != nil {
37759				var typeVar string
37760				err = json.Unmarshal(*v, &typeVar)
37761				if err != nil {
37762					return err
37763				}
37764				vnt.Type = &typeVar
37765			}
37766		case "location":
37767			if v != nil {
37768				var location string
37769				err = json.Unmarshal(*v, &location)
37770				if err != nil {
37771					return err
37772				}
37773				vnt.Location = &location
37774			}
37775		case "tags":
37776			if v != nil {
37777				var tags map[string]*string
37778				err = json.Unmarshal(*v, &tags)
37779				if err != nil {
37780					return err
37781				}
37782				vnt.Tags = tags
37783			}
37784		}
37785	}
37786
37787	return nil
37788}
37789
37790// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call.
37791type VirtualNetworkTapListResult struct {
37792	autorest.Response `json:"-"`
37793	// Value - A list of VirtualNetworkTaps in a resource group.
37794	Value *[]VirtualNetworkTap `json:"value,omitempty"`
37795	// NextLink - The URL to get the next set of results.
37796	NextLink *string `json:"nextLink,omitempty"`
37797}
37798
37799// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values.
37800type VirtualNetworkTapListResultIterator struct {
37801	i    int
37802	page VirtualNetworkTapListResultPage
37803}
37804
37805// NextWithContext advances to the next value.  If there was an error making
37806// the request the iterator does not advance and the error is returned.
37807func (iter *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) {
37808	if tracing.IsEnabled() {
37809		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.NextWithContext")
37810		defer func() {
37811			sc := -1
37812			if iter.Response().Response.Response != nil {
37813				sc = iter.Response().Response.Response.StatusCode
37814			}
37815			tracing.EndSpan(ctx, sc, err)
37816		}()
37817	}
37818	iter.i++
37819	if iter.i < len(iter.page.Values()) {
37820		return nil
37821	}
37822	err = iter.page.NextWithContext(ctx)
37823	if err != nil {
37824		iter.i--
37825		return err
37826	}
37827	iter.i = 0
37828	return nil
37829}
37830
37831// Next advances to the next value.  If there was an error making
37832// the request the iterator does not advance and the error is returned.
37833// Deprecated: Use NextWithContext() instead.
37834func (iter *VirtualNetworkTapListResultIterator) Next() error {
37835	return iter.NextWithContext(context.Background())
37836}
37837
37838// NotDone returns true if the enumeration should be started or is not yet complete.
37839func (iter VirtualNetworkTapListResultIterator) NotDone() bool {
37840	return iter.page.NotDone() && iter.i < len(iter.page.Values())
37841}
37842
37843// Response returns the raw server response from the last page request.
37844func (iter VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult {
37845	return iter.page.Response()
37846}
37847
37848// Value returns the current value or a zero-initialized value if the
37849// iterator has advanced beyond the end of the collection.
37850func (iter VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap {
37851	if !iter.page.NotDone() {
37852		return VirtualNetworkTap{}
37853	}
37854	return iter.page.Values()[iter.i]
37855}
37856
37857// Creates a new instance of the VirtualNetworkTapListResultIterator type.
37858func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator {
37859	return VirtualNetworkTapListResultIterator{page: page}
37860}
37861
37862// IsEmpty returns true if the ListResult contains no values.
37863func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
37864	return vntlr.Value == nil || len(*vntlr.Value) == 0
37865}
37866
37867// hasNextLink returns true if the NextLink is not empty.
37868func (vntlr VirtualNetworkTapListResult) hasNextLink() bool {
37869	return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0
37870}
37871
37872// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results.
37873// It returns nil if no more results exist.
37874func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) {
37875	if !vntlr.hasNextLink() {
37876		return nil, nil
37877	}
37878	return autorest.Prepare((&http.Request{}).WithContext(ctx),
37879		autorest.AsJSON(),
37880		autorest.AsGet(),
37881		autorest.WithBaseURL(to.String(vntlr.NextLink)))
37882}
37883
37884// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values.
37885type VirtualNetworkTapListResultPage struct {
37886	fn    func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
37887	vntlr VirtualNetworkTapListResult
37888}
37889
37890// NextWithContext advances to the next page of values.  If there was an error making
37891// the request the page does not advance and the error is returned.
37892func (page *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) {
37893	if tracing.IsEnabled() {
37894		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.NextWithContext")
37895		defer func() {
37896			sc := -1
37897			if page.Response().Response.Response != nil {
37898				sc = page.Response().Response.Response.StatusCode
37899			}
37900			tracing.EndSpan(ctx, sc, err)
37901		}()
37902	}
37903	for {
37904		next, err := page.fn(ctx, page.vntlr)
37905		if err != nil {
37906			return err
37907		}
37908		page.vntlr = next
37909		if !next.hasNextLink() || !next.IsEmpty() {
37910			break
37911		}
37912	}
37913	return nil
37914}
37915
37916// Next advances to the next page of values.  If there was an error making
37917// the request the page does not advance and the error is returned.
37918// Deprecated: Use NextWithContext() instead.
37919func (page *VirtualNetworkTapListResultPage) Next() error {
37920	return page.NextWithContext(context.Background())
37921}
37922
37923// NotDone returns true if the page enumeration should be started or is not yet complete.
37924func (page VirtualNetworkTapListResultPage) NotDone() bool {
37925	return !page.vntlr.IsEmpty()
37926}
37927
37928// Response returns the raw server response from the last page request.
37929func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult {
37930	return page.vntlr
37931}
37932
37933// Values returns the slice of values for the current page or nil if there are no values.
37934func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap {
37935	if page.vntlr.IsEmpty() {
37936		return nil
37937	}
37938	return *page.vntlr.Value
37939}
37940
37941// Creates a new instance of the VirtualNetworkTapListResultPage type.
37942func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage {
37943	return VirtualNetworkTapListResultPage{
37944		fn:    getNextPage,
37945		vntlr: cur,
37946	}
37947}
37948
37949// VirtualNetworkTapPropertiesFormat virtual Network Tap properties.
37950type VirtualNetworkTapPropertiesFormat struct {
37951	// NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
37952	NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"`
37953	// ResourceGUID - READ-ONLY; The resource GUID property of the virtual network tap resource.
37954	ResourceGUID *string `json:"resourceGuid,omitempty"`
37955	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
37956	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
37957	// DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap.
37958	DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"`
37959	// DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap.
37960	DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"`
37961	// DestinationPort - The VXLAN destination port that will receive the tapped traffic.
37962	DestinationPort *int32 `json:"destinationPort,omitempty"`
37963}
37964
37965// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat.
37966func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) {
37967	objectMap := make(map[string]interface{})
37968	if vntpf.DestinationNetworkInterfaceIPConfiguration != nil {
37969		objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration
37970	}
37971	if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil {
37972		objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration
37973	}
37974	if vntpf.DestinationPort != nil {
37975		objectMap["destinationPort"] = vntpf.DestinationPort
37976	}
37977	return json.Marshal(objectMap)
37978}
37979
37980// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
37981// long-running operation.
37982type VirtualNetworkTapsCreateOrUpdateFuture struct {
37983	azure.FutureAPI
37984	// Result returns the result of the asynchronous operation.
37985	// If the operation has not completed it will return an error.
37986	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
37987}
37988
37989// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a
37990// long-running operation.
37991type VirtualNetworkTapsDeleteFuture struct {
37992	azure.FutureAPI
37993	// Result returns the result of the asynchronous operation.
37994	// If the operation has not completed it will return an error.
37995	Result func(VirtualNetworkTapsClient) (autorest.Response, error)
37996}
37997
37998// VirtualNetworkUsage usage details for subnet.
37999type VirtualNetworkUsage struct {
38000	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
38001	CurrentValue *float64 `json:"currentValue,omitempty"`
38002	// ID - READ-ONLY; Subnet identifier.
38003	ID *string `json:"id,omitempty"`
38004	// Limit - READ-ONLY; Indicates the size of the subnet.
38005	Limit *float64 `json:"limit,omitempty"`
38006	// Name - READ-ONLY; The name containing common and localized value for usage.
38007	Name *VirtualNetworkUsageName `json:"name,omitempty"`
38008	// Unit - READ-ONLY; Usage units. Returns 'Count'.
38009	Unit *string `json:"unit,omitempty"`
38010}
38011
38012// VirtualNetworkUsageName usage strings container.
38013type VirtualNetworkUsageName struct {
38014	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
38015	LocalizedValue *string `json:"localizedValue,omitempty"`
38016	// Value - READ-ONLY; Subnet size and usage string.
38017	Value *string `json:"value,omitempty"`
38018}
38019
38020// VirtualRouter virtualRouter Resource.
38021type VirtualRouter struct {
38022	autorest.Response `json:"-"`
38023	// VirtualRouterPropertiesFormat - Properties of the Virtual Router.
38024	*VirtualRouterPropertiesFormat `json:"properties,omitempty"`
38025	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
38026	Etag *string `json:"etag,omitempty"`
38027	// ID - Resource ID.
38028	ID *string `json:"id,omitempty"`
38029	// Name - READ-ONLY; Resource name.
38030	Name *string `json:"name,omitempty"`
38031	// Type - READ-ONLY; Resource type.
38032	Type *string `json:"type,omitempty"`
38033	// Location - Resource location.
38034	Location *string `json:"location,omitempty"`
38035	// Tags - Resource tags.
38036	Tags map[string]*string `json:"tags"`
38037}
38038
38039// MarshalJSON is the custom marshaler for VirtualRouter.
38040func (vr VirtualRouter) MarshalJSON() ([]byte, error) {
38041	objectMap := make(map[string]interface{})
38042	if vr.VirtualRouterPropertiesFormat != nil {
38043		objectMap["properties"] = vr.VirtualRouterPropertiesFormat
38044	}
38045	if vr.ID != nil {
38046		objectMap["id"] = vr.ID
38047	}
38048	if vr.Location != nil {
38049		objectMap["location"] = vr.Location
38050	}
38051	if vr.Tags != nil {
38052		objectMap["tags"] = vr.Tags
38053	}
38054	return json.Marshal(objectMap)
38055}
38056
38057// UnmarshalJSON is the custom unmarshaler for VirtualRouter struct.
38058func (vr *VirtualRouter) UnmarshalJSON(body []byte) error {
38059	var m map[string]*json.RawMessage
38060	err := json.Unmarshal(body, &m)
38061	if err != nil {
38062		return err
38063	}
38064	for k, v := range m {
38065		switch k {
38066		case "properties":
38067			if v != nil {
38068				var virtualRouterPropertiesFormat VirtualRouterPropertiesFormat
38069				err = json.Unmarshal(*v, &virtualRouterPropertiesFormat)
38070				if err != nil {
38071					return err
38072				}
38073				vr.VirtualRouterPropertiesFormat = &virtualRouterPropertiesFormat
38074			}
38075		case "etag":
38076			if v != nil {
38077				var etag string
38078				err = json.Unmarshal(*v, &etag)
38079				if err != nil {
38080					return err
38081				}
38082				vr.Etag = &etag
38083			}
38084		case "id":
38085			if v != nil {
38086				var ID string
38087				err = json.Unmarshal(*v, &ID)
38088				if err != nil {
38089					return err
38090				}
38091				vr.ID = &ID
38092			}
38093		case "name":
38094			if v != nil {
38095				var name string
38096				err = json.Unmarshal(*v, &name)
38097				if err != nil {
38098					return err
38099				}
38100				vr.Name = &name
38101			}
38102		case "type":
38103			if v != nil {
38104				var typeVar string
38105				err = json.Unmarshal(*v, &typeVar)
38106				if err != nil {
38107					return err
38108				}
38109				vr.Type = &typeVar
38110			}
38111		case "location":
38112			if v != nil {
38113				var location string
38114				err = json.Unmarshal(*v, &location)
38115				if err != nil {
38116					return err
38117				}
38118				vr.Location = &location
38119			}
38120		case "tags":
38121			if v != nil {
38122				var tags map[string]*string
38123				err = json.Unmarshal(*v, &tags)
38124				if err != nil {
38125					return err
38126				}
38127				vr.Tags = tags
38128			}
38129		}
38130	}
38131
38132	return nil
38133}
38134
38135// VirtualRouterListResult response for ListVirtualRouters API service call.
38136type VirtualRouterListResult struct {
38137	autorest.Response `json:"-"`
38138	// Value - List of Virtual Routers.
38139	Value *[]VirtualRouter `json:"value,omitempty"`
38140	// NextLink - URL to get the next set of results.
38141	NextLink *string `json:"nextLink,omitempty"`
38142}
38143
38144// VirtualRouterListResultIterator provides access to a complete listing of VirtualRouter values.
38145type VirtualRouterListResultIterator struct {
38146	i    int
38147	page VirtualRouterListResultPage
38148}
38149
38150// NextWithContext advances to the next value.  If there was an error making
38151// the request the iterator does not advance and the error is returned.
38152func (iter *VirtualRouterListResultIterator) NextWithContext(ctx context.Context) (err error) {
38153	if tracing.IsEnabled() {
38154		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterListResultIterator.NextWithContext")
38155		defer func() {
38156			sc := -1
38157			if iter.Response().Response.Response != nil {
38158				sc = iter.Response().Response.Response.StatusCode
38159			}
38160			tracing.EndSpan(ctx, sc, err)
38161		}()
38162	}
38163	iter.i++
38164	if iter.i < len(iter.page.Values()) {
38165		return nil
38166	}
38167	err = iter.page.NextWithContext(ctx)
38168	if err != nil {
38169		iter.i--
38170		return err
38171	}
38172	iter.i = 0
38173	return nil
38174}
38175
38176// Next advances to the next value.  If there was an error making
38177// the request the iterator does not advance and the error is returned.
38178// Deprecated: Use NextWithContext() instead.
38179func (iter *VirtualRouterListResultIterator) Next() error {
38180	return iter.NextWithContext(context.Background())
38181}
38182
38183// NotDone returns true if the enumeration should be started or is not yet complete.
38184func (iter VirtualRouterListResultIterator) NotDone() bool {
38185	return iter.page.NotDone() && iter.i < len(iter.page.Values())
38186}
38187
38188// Response returns the raw server response from the last page request.
38189func (iter VirtualRouterListResultIterator) Response() VirtualRouterListResult {
38190	return iter.page.Response()
38191}
38192
38193// Value returns the current value or a zero-initialized value if the
38194// iterator has advanced beyond the end of the collection.
38195func (iter VirtualRouterListResultIterator) Value() VirtualRouter {
38196	if !iter.page.NotDone() {
38197		return VirtualRouter{}
38198	}
38199	return iter.page.Values()[iter.i]
38200}
38201
38202// Creates a new instance of the VirtualRouterListResultIterator type.
38203func NewVirtualRouterListResultIterator(page VirtualRouterListResultPage) VirtualRouterListResultIterator {
38204	return VirtualRouterListResultIterator{page: page}
38205}
38206
38207// IsEmpty returns true if the ListResult contains no values.
38208func (vrlr VirtualRouterListResult) IsEmpty() bool {
38209	return vrlr.Value == nil || len(*vrlr.Value) == 0
38210}
38211
38212// hasNextLink returns true if the NextLink is not empty.
38213func (vrlr VirtualRouterListResult) hasNextLink() bool {
38214	return vrlr.NextLink != nil && len(*vrlr.NextLink) != 0
38215}
38216
38217// virtualRouterListResultPreparer prepares a request to retrieve the next set of results.
38218// It returns nil if no more results exist.
38219func (vrlr VirtualRouterListResult) virtualRouterListResultPreparer(ctx context.Context) (*http.Request, error) {
38220	if !vrlr.hasNextLink() {
38221		return nil, nil
38222	}
38223	return autorest.Prepare((&http.Request{}).WithContext(ctx),
38224		autorest.AsJSON(),
38225		autorest.AsGet(),
38226		autorest.WithBaseURL(to.String(vrlr.NextLink)))
38227}
38228
38229// VirtualRouterListResultPage contains a page of VirtualRouter values.
38230type VirtualRouterListResultPage struct {
38231	fn   func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error)
38232	vrlr VirtualRouterListResult
38233}
38234
38235// NextWithContext advances to the next page of values.  If there was an error making
38236// the request the page does not advance and the error is returned.
38237func (page *VirtualRouterListResultPage) NextWithContext(ctx context.Context) (err error) {
38238	if tracing.IsEnabled() {
38239		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterListResultPage.NextWithContext")
38240		defer func() {
38241			sc := -1
38242			if page.Response().Response.Response != nil {
38243				sc = page.Response().Response.Response.StatusCode
38244			}
38245			tracing.EndSpan(ctx, sc, err)
38246		}()
38247	}
38248	for {
38249		next, err := page.fn(ctx, page.vrlr)
38250		if err != nil {
38251			return err
38252		}
38253		page.vrlr = next
38254		if !next.hasNextLink() || !next.IsEmpty() {
38255			break
38256		}
38257	}
38258	return nil
38259}
38260
38261// Next advances to the next page of values.  If there was an error making
38262// the request the page does not advance and the error is returned.
38263// Deprecated: Use NextWithContext() instead.
38264func (page *VirtualRouterListResultPage) Next() error {
38265	return page.NextWithContext(context.Background())
38266}
38267
38268// NotDone returns true if the page enumeration should be started or is not yet complete.
38269func (page VirtualRouterListResultPage) NotDone() bool {
38270	return !page.vrlr.IsEmpty()
38271}
38272
38273// Response returns the raw server response from the last page request.
38274func (page VirtualRouterListResultPage) Response() VirtualRouterListResult {
38275	return page.vrlr
38276}
38277
38278// Values returns the slice of values for the current page or nil if there are no values.
38279func (page VirtualRouterListResultPage) Values() []VirtualRouter {
38280	if page.vrlr.IsEmpty() {
38281		return nil
38282	}
38283	return *page.vrlr.Value
38284}
38285
38286// Creates a new instance of the VirtualRouterListResultPage type.
38287func NewVirtualRouterListResultPage(cur VirtualRouterListResult, getNextPage func(context.Context, VirtualRouterListResult) (VirtualRouterListResult, error)) VirtualRouterListResultPage {
38288	return VirtualRouterListResultPage{
38289		fn:   getNextPage,
38290		vrlr: cur,
38291	}
38292}
38293
38294// VirtualRouterPeering virtual Router Peering resource.
38295type VirtualRouterPeering struct {
38296	autorest.Response `json:"-"`
38297	// VirtualRouterPeeringProperties - The properties of the Virtual Router Peering.
38298	*VirtualRouterPeeringProperties `json:"properties,omitempty"`
38299	// Name - Name of the virtual router peering that is unique within a virtual router.
38300	Name *string `json:"name,omitempty"`
38301	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
38302	Etag *string `json:"etag,omitempty"`
38303	// Type - READ-ONLY; Peering type.
38304	Type *string `json:"type,omitempty"`
38305	// ID - Resource ID.
38306	ID *string `json:"id,omitempty"`
38307}
38308
38309// MarshalJSON is the custom marshaler for VirtualRouterPeering.
38310func (vrp VirtualRouterPeering) MarshalJSON() ([]byte, error) {
38311	objectMap := make(map[string]interface{})
38312	if vrp.VirtualRouterPeeringProperties != nil {
38313		objectMap["properties"] = vrp.VirtualRouterPeeringProperties
38314	}
38315	if vrp.Name != nil {
38316		objectMap["name"] = vrp.Name
38317	}
38318	if vrp.ID != nil {
38319		objectMap["id"] = vrp.ID
38320	}
38321	return json.Marshal(objectMap)
38322}
38323
38324// UnmarshalJSON is the custom unmarshaler for VirtualRouterPeering struct.
38325func (vrp *VirtualRouterPeering) UnmarshalJSON(body []byte) error {
38326	var m map[string]*json.RawMessage
38327	err := json.Unmarshal(body, &m)
38328	if err != nil {
38329		return err
38330	}
38331	for k, v := range m {
38332		switch k {
38333		case "properties":
38334			if v != nil {
38335				var virtualRouterPeeringProperties VirtualRouterPeeringProperties
38336				err = json.Unmarshal(*v, &virtualRouterPeeringProperties)
38337				if err != nil {
38338					return err
38339				}
38340				vrp.VirtualRouterPeeringProperties = &virtualRouterPeeringProperties
38341			}
38342		case "name":
38343			if v != nil {
38344				var name string
38345				err = json.Unmarshal(*v, &name)
38346				if err != nil {
38347					return err
38348				}
38349				vrp.Name = &name
38350			}
38351		case "etag":
38352			if v != nil {
38353				var etag string
38354				err = json.Unmarshal(*v, &etag)
38355				if err != nil {
38356					return err
38357				}
38358				vrp.Etag = &etag
38359			}
38360		case "type":
38361			if v != nil {
38362				var typeVar string
38363				err = json.Unmarshal(*v, &typeVar)
38364				if err != nil {
38365					return err
38366				}
38367				vrp.Type = &typeVar
38368			}
38369		case "id":
38370			if v != nil {
38371				var ID string
38372				err = json.Unmarshal(*v, &ID)
38373				if err != nil {
38374					return err
38375				}
38376				vrp.ID = &ID
38377			}
38378		}
38379	}
38380
38381	return nil
38382}
38383
38384// VirtualRouterPeeringListResult response for ListVirtualRouterPeerings API service call.
38385type VirtualRouterPeeringListResult struct {
38386	autorest.Response `json:"-"`
38387	// Value - List of VirtualRouterPeerings in a VirtualRouter.
38388	Value *[]VirtualRouterPeering `json:"value,omitempty"`
38389	// NextLink - URL to get the next set of results.
38390	NextLink *string `json:"nextLink,omitempty"`
38391}
38392
38393// VirtualRouterPeeringListResultIterator provides access to a complete listing of VirtualRouterPeering
38394// values.
38395type VirtualRouterPeeringListResultIterator struct {
38396	i    int
38397	page VirtualRouterPeeringListResultPage
38398}
38399
38400// NextWithContext advances to the next value.  If there was an error making
38401// the request the iterator does not advance and the error is returned.
38402func (iter *VirtualRouterPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
38403	if tracing.IsEnabled() {
38404		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringListResultIterator.NextWithContext")
38405		defer func() {
38406			sc := -1
38407			if iter.Response().Response.Response != nil {
38408				sc = iter.Response().Response.Response.StatusCode
38409			}
38410			tracing.EndSpan(ctx, sc, err)
38411		}()
38412	}
38413	iter.i++
38414	if iter.i < len(iter.page.Values()) {
38415		return nil
38416	}
38417	err = iter.page.NextWithContext(ctx)
38418	if err != nil {
38419		iter.i--
38420		return err
38421	}
38422	iter.i = 0
38423	return nil
38424}
38425
38426// Next advances to the next value.  If there was an error making
38427// the request the iterator does not advance and the error is returned.
38428// Deprecated: Use NextWithContext() instead.
38429func (iter *VirtualRouterPeeringListResultIterator) Next() error {
38430	return iter.NextWithContext(context.Background())
38431}
38432
38433// NotDone returns true if the enumeration should be started or is not yet complete.
38434func (iter VirtualRouterPeeringListResultIterator) NotDone() bool {
38435	return iter.page.NotDone() && iter.i < len(iter.page.Values())
38436}
38437
38438// Response returns the raw server response from the last page request.
38439func (iter VirtualRouterPeeringListResultIterator) Response() VirtualRouterPeeringListResult {
38440	return iter.page.Response()
38441}
38442
38443// Value returns the current value or a zero-initialized value if the
38444// iterator has advanced beyond the end of the collection.
38445func (iter VirtualRouterPeeringListResultIterator) Value() VirtualRouterPeering {
38446	if !iter.page.NotDone() {
38447		return VirtualRouterPeering{}
38448	}
38449	return iter.page.Values()[iter.i]
38450}
38451
38452// Creates a new instance of the VirtualRouterPeeringListResultIterator type.
38453func NewVirtualRouterPeeringListResultIterator(page VirtualRouterPeeringListResultPage) VirtualRouterPeeringListResultIterator {
38454	return VirtualRouterPeeringListResultIterator{page: page}
38455}
38456
38457// IsEmpty returns true if the ListResult contains no values.
38458func (vrplr VirtualRouterPeeringListResult) IsEmpty() bool {
38459	return vrplr.Value == nil || len(*vrplr.Value) == 0
38460}
38461
38462// hasNextLink returns true if the NextLink is not empty.
38463func (vrplr VirtualRouterPeeringListResult) hasNextLink() bool {
38464	return vrplr.NextLink != nil && len(*vrplr.NextLink) != 0
38465}
38466
38467// virtualRouterPeeringListResultPreparer prepares a request to retrieve the next set of results.
38468// It returns nil if no more results exist.
38469func (vrplr VirtualRouterPeeringListResult) virtualRouterPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
38470	if !vrplr.hasNextLink() {
38471		return nil, nil
38472	}
38473	return autorest.Prepare((&http.Request{}).WithContext(ctx),
38474		autorest.AsJSON(),
38475		autorest.AsGet(),
38476		autorest.WithBaseURL(to.String(vrplr.NextLink)))
38477}
38478
38479// VirtualRouterPeeringListResultPage contains a page of VirtualRouterPeering values.
38480type VirtualRouterPeeringListResultPage struct {
38481	fn    func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error)
38482	vrplr VirtualRouterPeeringListResult
38483}
38484
38485// NextWithContext advances to the next page of values.  If there was an error making
38486// the request the page does not advance and the error is returned.
38487func (page *VirtualRouterPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
38488	if tracing.IsEnabled() {
38489		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringListResultPage.NextWithContext")
38490		defer func() {
38491			sc := -1
38492			if page.Response().Response.Response != nil {
38493				sc = page.Response().Response.Response.StatusCode
38494			}
38495			tracing.EndSpan(ctx, sc, err)
38496		}()
38497	}
38498	for {
38499		next, err := page.fn(ctx, page.vrplr)
38500		if err != nil {
38501			return err
38502		}
38503		page.vrplr = next
38504		if !next.hasNextLink() || !next.IsEmpty() {
38505			break
38506		}
38507	}
38508	return nil
38509}
38510
38511// Next advances to the next page of values.  If there was an error making
38512// the request the page does not advance and the error is returned.
38513// Deprecated: Use NextWithContext() instead.
38514func (page *VirtualRouterPeeringListResultPage) Next() error {
38515	return page.NextWithContext(context.Background())
38516}
38517
38518// NotDone returns true if the page enumeration should be started or is not yet complete.
38519func (page VirtualRouterPeeringListResultPage) NotDone() bool {
38520	return !page.vrplr.IsEmpty()
38521}
38522
38523// Response returns the raw server response from the last page request.
38524func (page VirtualRouterPeeringListResultPage) Response() VirtualRouterPeeringListResult {
38525	return page.vrplr
38526}
38527
38528// Values returns the slice of values for the current page or nil if there are no values.
38529func (page VirtualRouterPeeringListResultPage) Values() []VirtualRouterPeering {
38530	if page.vrplr.IsEmpty() {
38531		return nil
38532	}
38533	return *page.vrplr.Value
38534}
38535
38536// Creates a new instance of the VirtualRouterPeeringListResultPage type.
38537func NewVirtualRouterPeeringListResultPage(cur VirtualRouterPeeringListResult, getNextPage func(context.Context, VirtualRouterPeeringListResult) (VirtualRouterPeeringListResult, error)) VirtualRouterPeeringListResultPage {
38538	return VirtualRouterPeeringListResultPage{
38539		fn:    getNextPage,
38540		vrplr: cur,
38541	}
38542}
38543
38544// VirtualRouterPeeringProperties properties of the rule group.
38545type VirtualRouterPeeringProperties struct {
38546	// PeerAsn - Peer ASN.
38547	PeerAsn *int64 `json:"peerAsn,omitempty"`
38548	// PeerIP - Peer IP.
38549	PeerIP *string `json:"peerIp,omitempty"`
38550	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
38551	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
38552}
38553
38554// MarshalJSON is the custom marshaler for VirtualRouterPeeringProperties.
38555func (vrpp VirtualRouterPeeringProperties) MarshalJSON() ([]byte, error) {
38556	objectMap := make(map[string]interface{})
38557	if vrpp.PeerAsn != nil {
38558		objectMap["peerAsn"] = vrpp.PeerAsn
38559	}
38560	if vrpp.PeerIP != nil {
38561		objectMap["peerIp"] = vrpp.PeerIP
38562	}
38563	return json.Marshal(objectMap)
38564}
38565
38566// VirtualRouterPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
38567// long-running operation.
38568type VirtualRouterPeeringsCreateOrUpdateFuture struct {
38569	azure.FutureAPI
38570	// Result returns the result of the asynchronous operation.
38571	// If the operation has not completed it will return an error.
38572	Result func(VirtualRouterPeeringsClient) (VirtualRouterPeering, error)
38573}
38574
38575// VirtualRouterPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
38576// long-running operation.
38577type VirtualRouterPeeringsDeleteFuture struct {
38578	azure.FutureAPI
38579	// Result returns the result of the asynchronous operation.
38580	// If the operation has not completed it will return an error.
38581	Result func(VirtualRouterPeeringsClient) (autorest.Response, error)
38582}
38583
38584// VirtualRouterPropertiesFormat virtual Router definition.
38585type VirtualRouterPropertiesFormat struct {
38586	// VirtualRouterAsn - VirtualRouter ASN.
38587	VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"`
38588	// VirtualRouterIps - VirtualRouter IPs.
38589	VirtualRouterIps *[]string `json:"virtualRouterIps,omitempty"`
38590	// HostedSubnet - The Subnet on which VirtualRouter is hosted.
38591	HostedSubnet *SubResource `json:"hostedSubnet,omitempty"`
38592	// HostedGateway - The Gateway on which VirtualRouter is hosted.
38593	HostedGateway *SubResource `json:"hostedGateway,omitempty"`
38594	// Peerings - READ-ONLY; List of references to VirtualRouterPeerings.
38595	Peerings *[]SubResource `json:"peerings,omitempty"`
38596	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
38597	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
38598}
38599
38600// MarshalJSON is the custom marshaler for VirtualRouterPropertiesFormat.
38601func (vrpf VirtualRouterPropertiesFormat) MarshalJSON() ([]byte, error) {
38602	objectMap := make(map[string]interface{})
38603	if vrpf.VirtualRouterAsn != nil {
38604		objectMap["virtualRouterAsn"] = vrpf.VirtualRouterAsn
38605	}
38606	if vrpf.VirtualRouterIps != nil {
38607		objectMap["virtualRouterIps"] = vrpf.VirtualRouterIps
38608	}
38609	if vrpf.HostedSubnet != nil {
38610		objectMap["hostedSubnet"] = vrpf.HostedSubnet
38611	}
38612	if vrpf.HostedGateway != nil {
38613		objectMap["hostedGateway"] = vrpf.HostedGateway
38614	}
38615	return json.Marshal(objectMap)
38616}
38617
38618// VirtualRoutersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
38619// long-running operation.
38620type VirtualRoutersCreateOrUpdateFuture struct {
38621	azure.FutureAPI
38622	// Result returns the result of the asynchronous operation.
38623	// If the operation has not completed it will return an error.
38624	Result func(VirtualRoutersClient) (VirtualRouter, error)
38625}
38626
38627// VirtualRoutersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
38628// operation.
38629type VirtualRoutersDeleteFuture struct {
38630	azure.FutureAPI
38631	// Result returns the result of the asynchronous operation.
38632	// If the operation has not completed it will return an error.
38633	Result func(VirtualRoutersClient) (autorest.Response, error)
38634}
38635
38636// VirtualWAN virtualWAN Resource.
38637type VirtualWAN struct {
38638	autorest.Response `json:"-"`
38639	// VirtualWanProperties - Properties of the virtual WAN.
38640	*VirtualWanProperties `json:"properties,omitempty"`
38641	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
38642	Etag *string `json:"etag,omitempty"`
38643	// ID - Resource ID.
38644	ID *string `json:"id,omitempty"`
38645	// Name - READ-ONLY; Resource name.
38646	Name *string `json:"name,omitempty"`
38647	// Type - READ-ONLY; Resource type.
38648	Type *string `json:"type,omitempty"`
38649	// Location - Resource location.
38650	Location *string `json:"location,omitempty"`
38651	// Tags - Resource tags.
38652	Tags map[string]*string `json:"tags"`
38653}
38654
38655// MarshalJSON is the custom marshaler for VirtualWAN.
38656func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
38657	objectMap := make(map[string]interface{})
38658	if vw.VirtualWanProperties != nil {
38659		objectMap["properties"] = vw.VirtualWanProperties
38660	}
38661	if vw.ID != nil {
38662		objectMap["id"] = vw.ID
38663	}
38664	if vw.Location != nil {
38665		objectMap["location"] = vw.Location
38666	}
38667	if vw.Tags != nil {
38668		objectMap["tags"] = vw.Tags
38669	}
38670	return json.Marshal(objectMap)
38671}
38672
38673// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
38674func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
38675	var m map[string]*json.RawMessage
38676	err := json.Unmarshal(body, &m)
38677	if err != nil {
38678		return err
38679	}
38680	for k, v := range m {
38681		switch k {
38682		case "properties":
38683			if v != nil {
38684				var virtualWanProperties VirtualWanProperties
38685				err = json.Unmarshal(*v, &virtualWanProperties)
38686				if err != nil {
38687					return err
38688				}
38689				vw.VirtualWanProperties = &virtualWanProperties
38690			}
38691		case "etag":
38692			if v != nil {
38693				var etag string
38694				err = json.Unmarshal(*v, &etag)
38695				if err != nil {
38696					return err
38697				}
38698				vw.Etag = &etag
38699			}
38700		case "id":
38701			if v != nil {
38702				var ID string
38703				err = json.Unmarshal(*v, &ID)
38704				if err != nil {
38705					return err
38706				}
38707				vw.ID = &ID
38708			}
38709		case "name":
38710			if v != nil {
38711				var name string
38712				err = json.Unmarshal(*v, &name)
38713				if err != nil {
38714					return err
38715				}
38716				vw.Name = &name
38717			}
38718		case "type":
38719			if v != nil {
38720				var typeVar string
38721				err = json.Unmarshal(*v, &typeVar)
38722				if err != nil {
38723					return err
38724				}
38725				vw.Type = &typeVar
38726			}
38727		case "location":
38728			if v != nil {
38729				var location string
38730				err = json.Unmarshal(*v, &location)
38731				if err != nil {
38732					return err
38733				}
38734				vw.Location = &location
38735			}
38736		case "tags":
38737			if v != nil {
38738				var tags map[string]*string
38739				err = json.Unmarshal(*v, &tags)
38740				if err != nil {
38741					return err
38742				}
38743				vw.Tags = tags
38744			}
38745		}
38746	}
38747
38748	return nil
38749}
38750
38751// VirtualWanProperties parameters for VirtualWAN.
38752type VirtualWanProperties struct {
38753	// DisableVpnEncryption - Vpn encryption to be disabled or not.
38754	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
38755	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
38756	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
38757	// VpnSites - READ-ONLY; List of VpnSites in the VirtualWAN.
38758	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
38759	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
38760	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
38761	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
38762	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
38763	// Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone'
38764	Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"`
38765	// ProvisioningState - READ-ONLY; The provisioning state of the virtual WAN resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
38766	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
38767	// Type - The type of the VirtualWAN.
38768	Type *string `json:"type,omitempty"`
38769}
38770
38771// MarshalJSON is the custom marshaler for VirtualWanProperties.
38772func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
38773	objectMap := make(map[string]interface{})
38774	if vwp.DisableVpnEncryption != nil {
38775		objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
38776	}
38777	if vwp.AllowBranchToBranchTraffic != nil {
38778		objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic
38779	}
38780	if vwp.AllowVnetToVnetTraffic != nil {
38781		objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic
38782	}
38783	if vwp.Office365LocalBreakoutCategory != "" {
38784		objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory
38785	}
38786	if vwp.Type != nil {
38787		objectMap["type"] = vwp.Type
38788	}
38789	return json.Marshal(objectMap)
38790}
38791
38792// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
38793// long-running operation.
38794type VirtualWansCreateOrUpdateFuture struct {
38795	azure.FutureAPI
38796	// Result returns the result of the asynchronous operation.
38797	// If the operation has not completed it will return an error.
38798	Result func(VirtualWansClient) (VirtualWAN, error)
38799}
38800
38801// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
38802// operation.
38803type VirtualWansDeleteFuture struct {
38804	azure.FutureAPI
38805	// Result returns the result of the asynchronous operation.
38806	// If the operation has not completed it will return an error.
38807	Result func(VirtualWansClient) (autorest.Response, error)
38808}
38809
38810// VirtualWanSecurityProvider collection of SecurityProviders.
38811type VirtualWanSecurityProvider struct {
38812	// Name - Name of the security provider.
38813	Name *string `json:"name,omitempty"`
38814	// URL - Url of the security provider.
38815	URL *string `json:"url,omitempty"`
38816	// Type - Name of the security provider. Possible values include: 'External', 'Native'
38817	Type VirtualWanSecurityProviderType `json:"type,omitempty"`
38818}
38819
38820// VirtualWanSecurityProviders collection of SecurityProviders.
38821type VirtualWanSecurityProviders struct {
38822	autorest.Response `json:"-"`
38823	// SupportedProviders - List of VirtualWAN security providers.
38824	SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"`
38825}
38826
38827// VirtualWanVpnProfileParameters virtual Wan Vpn profile parameters Vpn profile generation.
38828type VirtualWanVpnProfileParameters struct {
38829	// VpnServerConfigurationResourceID - VpnServerConfiguration partial resource uri with which VirtualWan is associated to.
38830	VpnServerConfigurationResourceID *string `json:"vpnServerConfigurationResourceId,omitempty"`
38831	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
38832	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
38833}
38834
38835// VM describes a Virtual Machine.
38836type VM struct {
38837	// ID - Resource ID.
38838	ID *string `json:"id,omitempty"`
38839	// Name - READ-ONLY; Resource name.
38840	Name *string `json:"name,omitempty"`
38841	// Type - READ-ONLY; Resource type.
38842	Type *string `json:"type,omitempty"`
38843	// Location - Resource location.
38844	Location *string `json:"location,omitempty"`
38845	// Tags - Resource tags.
38846	Tags map[string]*string `json:"tags"`
38847}
38848
38849// MarshalJSON is the custom marshaler for VM.
38850func (vVar VM) MarshalJSON() ([]byte, error) {
38851	objectMap := make(map[string]interface{})
38852	if vVar.ID != nil {
38853		objectMap["id"] = vVar.ID
38854	}
38855	if vVar.Location != nil {
38856		objectMap["location"] = vVar.Location
38857	}
38858	if vVar.Tags != nil {
38859		objectMap["tags"] = vVar.Tags
38860	}
38861	return json.Marshal(objectMap)
38862}
38863
38864// VnetRoute list of routes that control routing from VirtualHub into a virtual network connection.
38865type VnetRoute struct {
38866	// StaticRoutes - List of all Static Routes.
38867	StaticRoutes *[]StaticRoute `json:"staticRoutes,omitempty"`
38868}
38869
38870// VpnClientConfiguration vpnClientConfiguration for P2S client.
38871type VpnClientConfiguration struct {
38872	// VpnClientAddressPool - The reference to the address space resource which represents Address space for P2S VpnClient.
38873	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
38874	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
38875	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
38876	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
38877	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
38878	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
38879	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
38880	// VpnAuthenticationTypes - VPN authentication types for the virtual network gateway..
38881	VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"`
38882	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
38883	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
38884	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
38885	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
38886	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
38887	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
38888	// RadiusServers - The radiusServers property for multiple radius server configuration.
38889	RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"`
38890	// AadTenant - The AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
38891	AadTenant *string `json:"aadTenant,omitempty"`
38892	// AadAudience - The AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
38893	AadAudience *string `json:"aadAudience,omitempty"`
38894	// AadIssuer - The AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
38895	AadIssuer *string `json:"aadIssuer,omitempty"`
38896}
38897
38898// VpnClientConnectionHealth vpnClientConnectionHealth properties.
38899type VpnClientConnectionHealth struct {
38900	// TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection.
38901	TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"`
38902	// TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection.
38903	TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"`
38904	// VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway.
38905	VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"`
38906	// AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients.
38907	AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"`
38908}
38909
38910// MarshalJSON is the custom marshaler for VpnClientConnectionHealth.
38911func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) {
38912	objectMap := make(map[string]interface{})
38913	if vcch.VpnClientConnectionsCount != nil {
38914		objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount
38915	}
38916	if vcch.AllocatedIPAddresses != nil {
38917		objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses
38918	}
38919	return json.Marshal(objectMap)
38920}
38921
38922// VpnClientConnectionHealthDetail VPN client connection health detail.
38923type VpnClientConnectionHealthDetail struct {
38924	// VpnConnectionID - READ-ONLY; The vpn client Id.
38925	VpnConnectionID *string `json:"vpnConnectionId,omitempty"`
38926	// VpnConnectionDuration - READ-ONLY; The duration time of a connected vpn client.
38927	VpnConnectionDuration *int64 `json:"vpnConnectionDuration,omitempty"`
38928	// VpnConnectionTime - READ-ONLY; The start time of a connected vpn client.
38929	VpnConnectionTime *string `json:"vpnConnectionTime,omitempty"`
38930	// PublicIPAddress - READ-ONLY; The public Ip of a connected vpn client.
38931	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
38932	// PrivateIPAddress - READ-ONLY; The assigned private Ip of a connected vpn client.
38933	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
38934	// VpnUserName - READ-ONLY; The user name of a connected vpn client.
38935	VpnUserName *string `json:"vpnUserName,omitempty"`
38936	// MaxBandwidth - READ-ONLY; The max band width.
38937	MaxBandwidth *int64 `json:"maxBandwidth,omitempty"`
38938	// EgressPacketsTransferred - READ-ONLY; The egress packets per second.
38939	EgressPacketsTransferred *int64 `json:"egressPacketsTransferred,omitempty"`
38940	// EgressBytesTransferred - READ-ONLY; The egress bytes per second.
38941	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
38942	// IngressPacketsTransferred - READ-ONLY; The ingress packets per second.
38943	IngressPacketsTransferred *int64 `json:"ingressPacketsTransferred,omitempty"`
38944	// IngressBytesTransferred - READ-ONLY; The ingress bytes per second.
38945	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
38946	// MaxPacketsPerSecond - READ-ONLY; The max packets transferred per second.
38947	MaxPacketsPerSecond *int64 `json:"maxPacketsPerSecond,omitempty"`
38948}
38949
38950// VpnClientConnectionHealthDetailListResult list of virtual network gateway vpn client connection health.
38951type VpnClientConnectionHealthDetailListResult struct {
38952	autorest.Response `json:"-"`
38953	// Value - List of vpn client connection health.
38954	Value *[]VpnClientConnectionHealthDetail `json:"value,omitempty"`
38955}
38956
38957// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
38958type VpnClientIPsecParameters struct {
38959	autorest.Response `json:"-"`
38960	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
38961	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
38962	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
38963	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
38964	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
38965	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
38966	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
38967	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
38968	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
38969	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
38970	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
38971	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
38972	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'DhGroupNone', 'DhGroupDHGroup1', 'DhGroupDHGroup2', 'DhGroupDHGroup14', 'DhGroupDHGroup2048', 'DhGroupECP256', 'DhGroupECP384', 'DhGroupDHGroup24'
38973	DhGroup DhGroup `json:"dhGroup,omitempty"`
38974	// 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'
38975	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
38976}
38977
38978// VpnClientParameters vpn Client Parameters for package generation.
38979type VpnClientParameters struct {
38980	// ProcessorArchitecture - VPN client Processor Architecture. Possible values include: 'Amd64', 'X86'
38981	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
38982	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
38983	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
38984	// 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.
38985	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
38986	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
38987	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
38988}
38989
38990// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
38991type VpnClientRevokedCertificate struct {
38992	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
38993	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
38994	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
38995	Name *string `json:"name,omitempty"`
38996	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
38997	Etag *string `json:"etag,omitempty"`
38998	// ID - Resource ID.
38999	ID *string `json:"id,omitempty"`
39000}
39001
39002// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
39003func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
39004	objectMap := make(map[string]interface{})
39005	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
39006		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
39007	}
39008	if vcrc.Name != nil {
39009		objectMap["name"] = vcrc.Name
39010	}
39011	if vcrc.ID != nil {
39012		objectMap["id"] = vcrc.ID
39013	}
39014	return json.Marshal(objectMap)
39015}
39016
39017// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
39018func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
39019	var m map[string]*json.RawMessage
39020	err := json.Unmarshal(body, &m)
39021	if err != nil {
39022		return err
39023	}
39024	for k, v := range m {
39025		switch k {
39026		case "properties":
39027			if v != nil {
39028				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
39029				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
39030				if err != nil {
39031					return err
39032				}
39033				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
39034			}
39035		case "name":
39036			if v != nil {
39037				var name string
39038				err = json.Unmarshal(*v, &name)
39039				if err != nil {
39040					return err
39041				}
39042				vcrc.Name = &name
39043			}
39044		case "etag":
39045			if v != nil {
39046				var etag string
39047				err = json.Unmarshal(*v, &etag)
39048				if err != nil {
39049					return err
39050				}
39051				vcrc.Etag = &etag
39052			}
39053		case "id":
39054			if v != nil {
39055				var ID string
39056				err = json.Unmarshal(*v, &ID)
39057				if err != nil {
39058					return err
39059				}
39060				vcrc.ID = &ID
39061			}
39062		}
39063	}
39064
39065	return nil
39066}
39067
39068// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
39069// network gateway.
39070type VpnClientRevokedCertificatePropertiesFormat struct {
39071	// Thumbprint - The revoked VPN client certificate thumbprint.
39072	Thumbprint *string `json:"thumbprint,omitempty"`
39073	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
39074	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
39075}
39076
39077// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
39078func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
39079	objectMap := make(map[string]interface{})
39080	if vcrcpf.Thumbprint != nil {
39081		objectMap["thumbprint"] = vcrcpf.Thumbprint
39082	}
39083	return json.Marshal(objectMap)
39084}
39085
39086// VpnClientRootCertificate VPN client root certificate of virtual network gateway.
39087type VpnClientRootCertificate struct {
39088	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
39089	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
39090	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
39091	Name *string `json:"name,omitempty"`
39092	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
39093	Etag *string `json:"etag,omitempty"`
39094	// ID - Resource ID.
39095	ID *string `json:"id,omitempty"`
39096}
39097
39098// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
39099func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
39100	objectMap := make(map[string]interface{})
39101	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
39102		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
39103	}
39104	if vcrc.Name != nil {
39105		objectMap["name"] = vcrc.Name
39106	}
39107	if vcrc.ID != nil {
39108		objectMap["id"] = vcrc.ID
39109	}
39110	return json.Marshal(objectMap)
39111}
39112
39113// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
39114func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
39115	var m map[string]*json.RawMessage
39116	err := json.Unmarshal(body, &m)
39117	if err != nil {
39118		return err
39119	}
39120	for k, v := range m {
39121		switch k {
39122		case "properties":
39123			if v != nil {
39124				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
39125				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
39126				if err != nil {
39127					return err
39128				}
39129				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
39130			}
39131		case "name":
39132			if v != nil {
39133				var name string
39134				err = json.Unmarshal(*v, &name)
39135				if err != nil {
39136					return err
39137				}
39138				vcrc.Name = &name
39139			}
39140		case "etag":
39141			if v != nil {
39142				var etag string
39143				err = json.Unmarshal(*v, &etag)
39144				if err != nil {
39145					return err
39146				}
39147				vcrc.Etag = &etag
39148			}
39149		case "id":
39150			if v != nil {
39151				var ID string
39152				err = json.Unmarshal(*v, &ID)
39153				if err != nil {
39154					return err
39155				}
39156				vcrc.ID = &ID
39157			}
39158		}
39159	}
39160
39161	return nil
39162}
39163
39164// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway.
39165type VpnClientRootCertificatePropertiesFormat struct {
39166	// PublicCertData - The certificate public data.
39167	PublicCertData *string `json:"publicCertData,omitempty"`
39168	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
39169	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
39170}
39171
39172// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
39173func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
39174	objectMap := make(map[string]interface{})
39175	if vcrcpf.PublicCertData != nil {
39176		objectMap["publicCertData"] = vcrcpf.PublicCertData
39177	}
39178	return json.Marshal(objectMap)
39179}
39180
39181// VpnConnection vpnConnection Resource.
39182type VpnConnection struct {
39183	autorest.Response `json:"-"`
39184	// VpnConnectionProperties - Properties of the VPN connection.
39185	*VpnConnectionProperties `json:"properties,omitempty"`
39186	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
39187	Name *string `json:"name,omitempty"`
39188	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
39189	Etag *string `json:"etag,omitempty"`
39190	// ID - Resource ID.
39191	ID *string `json:"id,omitempty"`
39192}
39193
39194// MarshalJSON is the custom marshaler for VpnConnection.
39195func (vc VpnConnection) MarshalJSON() ([]byte, error) {
39196	objectMap := make(map[string]interface{})
39197	if vc.VpnConnectionProperties != nil {
39198		objectMap["properties"] = vc.VpnConnectionProperties
39199	}
39200	if vc.Name != nil {
39201		objectMap["name"] = vc.Name
39202	}
39203	if vc.ID != nil {
39204		objectMap["id"] = vc.ID
39205	}
39206	return json.Marshal(objectMap)
39207}
39208
39209// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
39210func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
39211	var m map[string]*json.RawMessage
39212	err := json.Unmarshal(body, &m)
39213	if err != nil {
39214		return err
39215	}
39216	for k, v := range m {
39217		switch k {
39218		case "properties":
39219			if v != nil {
39220				var vpnConnectionProperties VpnConnectionProperties
39221				err = json.Unmarshal(*v, &vpnConnectionProperties)
39222				if err != nil {
39223					return err
39224				}
39225				vc.VpnConnectionProperties = &vpnConnectionProperties
39226			}
39227		case "name":
39228			if v != nil {
39229				var name string
39230				err = json.Unmarshal(*v, &name)
39231				if err != nil {
39232					return err
39233				}
39234				vc.Name = &name
39235			}
39236		case "etag":
39237			if v != nil {
39238				var etag string
39239				err = json.Unmarshal(*v, &etag)
39240				if err != nil {
39241					return err
39242				}
39243				vc.Etag = &etag
39244			}
39245		case "id":
39246			if v != nil {
39247				var ID string
39248				err = json.Unmarshal(*v, &ID)
39249				if err != nil {
39250					return err
39251				}
39252				vc.ID = &ID
39253			}
39254		}
39255	}
39256
39257	return nil
39258}
39259
39260// VpnConnectionPacketCaptureStartParameters vpn Connection packet capture parameters supplied to start
39261// packet capture on gateway connection.
39262type VpnConnectionPacketCaptureStartParameters struct {
39263	// FilterData - Start Packet capture parameters on vpn connection.
39264	FilterData *string `json:"filterData,omitempty"`
39265	// LinkConnectionNames - List of site link connection names.
39266	LinkConnectionNames *[]string `json:"linkConnectionNames,omitempty"`
39267}
39268
39269// VpnConnectionPacketCaptureStopParameters vpn Connection packet capture parameters supplied to stop
39270// packet capture on gateway connection.
39271type VpnConnectionPacketCaptureStopParameters struct {
39272	// SasURL - SAS url for packet capture on vpn connection.
39273	SasURL *string `json:"sasUrl,omitempty"`
39274	// LinkConnectionNames - List of site link connection names.
39275	LinkConnectionNames *[]string `json:"linkConnectionNames,omitempty"`
39276}
39277
39278// VpnConnectionProperties parameters for VpnConnection.
39279type VpnConnectionProperties struct {
39280	// RemoteVpnSite - Id of the connected vpn site.
39281	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
39282	// RoutingWeight - Routing weight for vpn connection.
39283	RoutingWeight *int32 `json:"routingWeight,omitempty"`
39284	// DpdTimeoutSeconds - DPD timeout in seconds for vpn connection.
39285	DpdTimeoutSeconds *int32 `json:"dpdTimeoutSeconds,omitempty"`
39286	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
39287	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
39288	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
39289	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
39290	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
39291	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
39292	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
39293	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
39294	// ConnectionBandwidth - Expected bandwidth in MBPS.
39295	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
39296	// SharedKey - SharedKey for the vpn connection.
39297	SharedKey *string `json:"sharedKey,omitempty"`
39298	// EnableBgp - EnableBgp flag.
39299	EnableBgp *bool `json:"enableBgp,omitempty"`
39300	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
39301	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
39302	// IpsecPolicies - The IPSec Policies to be considered by this connection.
39303	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
39304	// TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection.
39305	TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"`
39306	// EnableRateLimiting - EnableBgp flag.
39307	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
39308	// EnableInternetSecurity - Enable internet security.
39309	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
39310	// UseLocalAzureIPAddress - Use local azure ip to initiate connection.
39311	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
39312	// ProvisioningState - READ-ONLY; The provisioning state of the VPN connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
39313	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
39314	// VpnLinkConnections - List of all vpn site link connections to the gateway.
39315	VpnLinkConnections *[]VpnSiteLinkConnection `json:"vpnLinkConnections,omitempty"`
39316	// RoutingConfiguration - The Routing Configuration indicating the associated and propagated route tables on this connection.
39317	RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"`
39318}
39319
39320// MarshalJSON is the custom marshaler for VpnConnectionProperties.
39321func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
39322	objectMap := make(map[string]interface{})
39323	if vcp.RemoteVpnSite != nil {
39324		objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
39325	}
39326	if vcp.RoutingWeight != nil {
39327		objectMap["routingWeight"] = vcp.RoutingWeight
39328	}
39329	if vcp.DpdTimeoutSeconds != nil {
39330		objectMap["dpdTimeoutSeconds"] = vcp.DpdTimeoutSeconds
39331	}
39332	if vcp.ConnectionStatus != "" {
39333		objectMap["connectionStatus"] = vcp.ConnectionStatus
39334	}
39335	if vcp.VpnConnectionProtocolType != "" {
39336		objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType
39337	}
39338	if vcp.ConnectionBandwidth != nil {
39339		objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth
39340	}
39341	if vcp.SharedKey != nil {
39342		objectMap["sharedKey"] = vcp.SharedKey
39343	}
39344	if vcp.EnableBgp != nil {
39345		objectMap["enableBgp"] = vcp.EnableBgp
39346	}
39347	if vcp.UsePolicyBasedTrafficSelectors != nil {
39348		objectMap["usePolicyBasedTrafficSelectors"] = vcp.UsePolicyBasedTrafficSelectors
39349	}
39350	if vcp.IpsecPolicies != nil {
39351		objectMap["ipsecPolicies"] = vcp.IpsecPolicies
39352	}
39353	if vcp.TrafficSelectorPolicies != nil {
39354		objectMap["trafficSelectorPolicies"] = vcp.TrafficSelectorPolicies
39355	}
39356	if vcp.EnableRateLimiting != nil {
39357		objectMap["enableRateLimiting"] = vcp.EnableRateLimiting
39358	}
39359	if vcp.EnableInternetSecurity != nil {
39360		objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity
39361	}
39362	if vcp.UseLocalAzureIPAddress != nil {
39363		objectMap["useLocalAzureIpAddress"] = vcp.UseLocalAzureIPAddress
39364	}
39365	if vcp.VpnLinkConnections != nil {
39366		objectMap["vpnLinkConnections"] = vcp.VpnLinkConnections
39367	}
39368	if vcp.RoutingConfiguration != nil {
39369		objectMap["routingConfiguration"] = vcp.RoutingConfiguration
39370	}
39371	return json.Marshal(objectMap)
39372}
39373
39374// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
39375// long-running operation.
39376type VpnConnectionsCreateOrUpdateFuture struct {
39377	azure.FutureAPI
39378	// Result returns the result of the asynchronous operation.
39379	// If the operation has not completed it will return an error.
39380	Result func(VpnConnectionsClient) (VpnConnection, error)
39381}
39382
39383// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
39384// operation.
39385type VpnConnectionsDeleteFuture struct {
39386	azure.FutureAPI
39387	// Result returns the result of the asynchronous operation.
39388	// If the operation has not completed it will return an error.
39389	Result func(VpnConnectionsClient) (autorest.Response, error)
39390}
39391
39392// VpnConnectionsStartPacketCaptureFuture an abstraction for monitoring and retrieving the results of a
39393// long-running operation.
39394type VpnConnectionsStartPacketCaptureFuture struct {
39395	azure.FutureAPI
39396	// Result returns the result of the asynchronous operation.
39397	// If the operation has not completed it will return an error.
39398	Result func(VpnConnectionsClient) (String, error)
39399}
39400
39401// VpnConnectionsStopPacketCaptureFuture an abstraction for monitoring and retrieving the results of a
39402// long-running operation.
39403type VpnConnectionsStopPacketCaptureFuture struct {
39404	azure.FutureAPI
39405	// Result returns the result of the asynchronous operation.
39406	// If the operation has not completed it will return an error.
39407	Result func(VpnConnectionsClient) (String, error)
39408}
39409
39410// VpnDeviceScriptParameters vpn device configuration script generation parameters.
39411type VpnDeviceScriptParameters struct {
39412	// Vendor - The vendor for the vpn device.
39413	Vendor *string `json:"vendor,omitempty"`
39414	// DeviceFamily - The device family for the vpn device.
39415	DeviceFamily *string `json:"deviceFamily,omitempty"`
39416	// FirmwareVersion - The firmware version for the vpn device.
39417	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
39418}
39419
39420// VpnGateway vpnGateway Resource.
39421type VpnGateway struct {
39422	autorest.Response `json:"-"`
39423	// VpnGatewayProperties - Properties of the VPN gateway.
39424	*VpnGatewayProperties `json:"properties,omitempty"`
39425	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
39426	Etag *string `json:"etag,omitempty"`
39427	// ID - Resource ID.
39428	ID *string `json:"id,omitempty"`
39429	// Name - READ-ONLY; Resource name.
39430	Name *string `json:"name,omitempty"`
39431	// Type - READ-ONLY; Resource type.
39432	Type *string `json:"type,omitempty"`
39433	// Location - Resource location.
39434	Location *string `json:"location,omitempty"`
39435	// Tags - Resource tags.
39436	Tags map[string]*string `json:"tags"`
39437}
39438
39439// MarshalJSON is the custom marshaler for VpnGateway.
39440func (vg VpnGateway) MarshalJSON() ([]byte, error) {
39441	objectMap := make(map[string]interface{})
39442	if vg.VpnGatewayProperties != nil {
39443		objectMap["properties"] = vg.VpnGatewayProperties
39444	}
39445	if vg.ID != nil {
39446		objectMap["id"] = vg.ID
39447	}
39448	if vg.Location != nil {
39449		objectMap["location"] = vg.Location
39450	}
39451	if vg.Tags != nil {
39452		objectMap["tags"] = vg.Tags
39453	}
39454	return json.Marshal(objectMap)
39455}
39456
39457// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
39458func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
39459	var m map[string]*json.RawMessage
39460	err := json.Unmarshal(body, &m)
39461	if err != nil {
39462		return err
39463	}
39464	for k, v := range m {
39465		switch k {
39466		case "properties":
39467			if v != nil {
39468				var vpnGatewayProperties VpnGatewayProperties
39469				err = json.Unmarshal(*v, &vpnGatewayProperties)
39470				if err != nil {
39471					return err
39472				}
39473				vg.VpnGatewayProperties = &vpnGatewayProperties
39474			}
39475		case "etag":
39476			if v != nil {
39477				var etag string
39478				err = json.Unmarshal(*v, &etag)
39479				if err != nil {
39480					return err
39481				}
39482				vg.Etag = &etag
39483			}
39484		case "id":
39485			if v != nil {
39486				var ID string
39487				err = json.Unmarshal(*v, &ID)
39488				if err != nil {
39489					return err
39490				}
39491				vg.ID = &ID
39492			}
39493		case "name":
39494			if v != nil {
39495				var name string
39496				err = json.Unmarshal(*v, &name)
39497				if err != nil {
39498					return err
39499				}
39500				vg.Name = &name
39501			}
39502		case "type":
39503			if v != nil {
39504				var typeVar string
39505				err = json.Unmarshal(*v, &typeVar)
39506				if err != nil {
39507					return err
39508				}
39509				vg.Type = &typeVar
39510			}
39511		case "location":
39512			if v != nil {
39513				var location string
39514				err = json.Unmarshal(*v, &location)
39515				if err != nil {
39516					return err
39517				}
39518				vg.Location = &location
39519			}
39520		case "tags":
39521			if v != nil {
39522				var tags map[string]*string
39523				err = json.Unmarshal(*v, &tags)
39524				if err != nil {
39525					return err
39526				}
39527				vg.Tags = tags
39528			}
39529		}
39530	}
39531
39532	return nil
39533}
39534
39535// VpnGatewayIPConfiguration IP Configuration of a VPN Gateway Resource.
39536type VpnGatewayIPConfiguration struct {
39537	// ID - The identifier of the IP configuration for a VPN Gateway.
39538	ID *string `json:"id,omitempty"`
39539	// PublicIPAddress - The public IP address of this IP configuration.
39540	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
39541	// PrivateIPAddress - The private IP address of this IP configuration.
39542	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
39543}
39544
39545// VpnGatewayNatRule vpnGatewayNatRule Resource.
39546type VpnGatewayNatRule struct {
39547	autorest.Response `json:"-"`
39548	// VpnGatewayNatRuleProperties - Properties of the VpnGateway NAT rule.
39549	*VpnGatewayNatRuleProperties `json:"properties,omitempty"`
39550	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
39551	Name *string `json:"name,omitempty"`
39552	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
39553	Etag *string `json:"etag,omitempty"`
39554	// Type - READ-ONLY; Resource type.
39555	Type *string `json:"type,omitempty"`
39556	// ID - Resource ID.
39557	ID *string `json:"id,omitempty"`
39558}
39559
39560// MarshalJSON is the custom marshaler for VpnGatewayNatRule.
39561func (vgnr VpnGatewayNatRule) MarshalJSON() ([]byte, error) {
39562	objectMap := make(map[string]interface{})
39563	if vgnr.VpnGatewayNatRuleProperties != nil {
39564		objectMap["properties"] = vgnr.VpnGatewayNatRuleProperties
39565	}
39566	if vgnr.Name != nil {
39567		objectMap["name"] = vgnr.Name
39568	}
39569	if vgnr.ID != nil {
39570		objectMap["id"] = vgnr.ID
39571	}
39572	return json.Marshal(objectMap)
39573}
39574
39575// UnmarshalJSON is the custom unmarshaler for VpnGatewayNatRule struct.
39576func (vgnr *VpnGatewayNatRule) UnmarshalJSON(body []byte) error {
39577	var m map[string]*json.RawMessage
39578	err := json.Unmarshal(body, &m)
39579	if err != nil {
39580		return err
39581	}
39582	for k, v := range m {
39583		switch k {
39584		case "properties":
39585			if v != nil {
39586				var vpnGatewayNatRuleProperties VpnGatewayNatRuleProperties
39587				err = json.Unmarshal(*v, &vpnGatewayNatRuleProperties)
39588				if err != nil {
39589					return err
39590				}
39591				vgnr.VpnGatewayNatRuleProperties = &vpnGatewayNatRuleProperties
39592			}
39593		case "name":
39594			if v != nil {
39595				var name string
39596				err = json.Unmarshal(*v, &name)
39597				if err != nil {
39598					return err
39599				}
39600				vgnr.Name = &name
39601			}
39602		case "etag":
39603			if v != nil {
39604				var etag string
39605				err = json.Unmarshal(*v, &etag)
39606				if err != nil {
39607					return err
39608				}
39609				vgnr.Etag = &etag
39610			}
39611		case "type":
39612			if v != nil {
39613				var typeVar string
39614				err = json.Unmarshal(*v, &typeVar)
39615				if err != nil {
39616					return err
39617				}
39618				vgnr.Type = &typeVar
39619			}
39620		case "id":
39621			if v != nil {
39622				var ID string
39623				err = json.Unmarshal(*v, &ID)
39624				if err != nil {
39625					return err
39626				}
39627				vgnr.ID = &ID
39628			}
39629		}
39630	}
39631
39632	return nil
39633}
39634
39635// VpnGatewayNatRuleProperties parameters for VpnGatewayNatRule.
39636type VpnGatewayNatRuleProperties struct {
39637	// ProvisioningState - READ-ONLY; The provisioning state of the NAT Rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
39638	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
39639	// Type - The type of NAT rule for VPN NAT. Possible values include: 'VpnNatRuleTypeStatic', 'VpnNatRuleTypeDynamic'
39640	Type VpnNatRuleType `json:"type,omitempty"`
39641	// Mode - The Source NAT direction of a VPN NAT. Possible values include: 'EgressSnat', 'IngressSnat'
39642	Mode VpnNatRuleMode `json:"mode,omitempty"`
39643	// InternalMappings - The private IP address internal mapping for NAT.
39644	InternalMappings *[]VpnNatRuleMapping `json:"internalMappings,omitempty"`
39645	// ExternalMappings - The private IP address external mapping for NAT.
39646	ExternalMappings *[]VpnNatRuleMapping `json:"externalMappings,omitempty"`
39647	// IPConfigurationID - The IP Configuration ID this NAT rule applies to.
39648	IPConfigurationID *string `json:"ipConfigurationId,omitempty"`
39649	// EgressVpnSiteLinkConnections - READ-ONLY; List of egress VpnSiteLinkConnections.
39650	EgressVpnSiteLinkConnections *[]SubResource `json:"egressVpnSiteLinkConnections,omitempty"`
39651	// IngressVpnSiteLinkConnections - READ-ONLY; List of ingress VpnSiteLinkConnections.
39652	IngressVpnSiteLinkConnections *[]SubResource `json:"ingressVpnSiteLinkConnections,omitempty"`
39653}
39654
39655// MarshalJSON is the custom marshaler for VpnGatewayNatRuleProperties.
39656func (vgnrp VpnGatewayNatRuleProperties) MarshalJSON() ([]byte, error) {
39657	objectMap := make(map[string]interface{})
39658	if vgnrp.Type != "" {
39659		objectMap["type"] = vgnrp.Type
39660	}
39661	if vgnrp.Mode != "" {
39662		objectMap["mode"] = vgnrp.Mode
39663	}
39664	if vgnrp.InternalMappings != nil {
39665		objectMap["internalMappings"] = vgnrp.InternalMappings
39666	}
39667	if vgnrp.ExternalMappings != nil {
39668		objectMap["externalMappings"] = vgnrp.ExternalMappings
39669	}
39670	if vgnrp.IPConfigurationID != nil {
39671		objectMap["ipConfigurationId"] = vgnrp.IPConfigurationID
39672	}
39673	return json.Marshal(objectMap)
39674}
39675
39676// VpnGatewayPacketCaptureStartParameters start packet capture parameters.
39677type VpnGatewayPacketCaptureStartParameters struct {
39678	// FilterData - Start Packet capture parameters on vpn gateway.
39679	FilterData *string `json:"filterData,omitempty"`
39680}
39681
39682// VpnGatewayPacketCaptureStopParameters stop packet capture parameters.
39683type VpnGatewayPacketCaptureStopParameters struct {
39684	// SasURL - SAS url for packet capture on vpn gateway.
39685	SasURL *string `json:"sasUrl,omitempty"`
39686}
39687
39688// VpnGatewayProperties parameters for VpnGateway.
39689type VpnGatewayProperties struct {
39690	// VirtualHub - The VirtualHub to which the gateway belongs.
39691	VirtualHub *SubResource `json:"virtualHub,omitempty"`
39692	// Connections - List of all vpn connections to the gateway.
39693	Connections *[]VpnConnection `json:"connections,omitempty"`
39694	// BgpSettings - Local network gateway's BGP speaker settings.
39695	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
39696	// ProvisioningState - READ-ONLY; The provisioning state of the VPN gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
39697	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
39698	// VpnGatewayScaleUnit - The scale unit for this vpn gateway.
39699	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
39700	// IPConfigurations - READ-ONLY; List of all IPs configured on the gateway.
39701	IPConfigurations *[]VpnGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
39702	// IsRoutingPreferenceInternet - Enable Routing Preference property for the Public IP Interface of the VpnGateway.
39703	IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"`
39704	// NatRules - List of all the nat Rules associated with the gateway.
39705	NatRules *[]VpnGatewayNatRule `json:"natRules,omitempty"`
39706}
39707
39708// MarshalJSON is the custom marshaler for VpnGatewayProperties.
39709func (vgp VpnGatewayProperties) MarshalJSON() ([]byte, error) {
39710	objectMap := make(map[string]interface{})
39711	if vgp.VirtualHub != nil {
39712		objectMap["virtualHub"] = vgp.VirtualHub
39713	}
39714	if vgp.Connections != nil {
39715		objectMap["connections"] = vgp.Connections
39716	}
39717	if vgp.BgpSettings != nil {
39718		objectMap["bgpSettings"] = vgp.BgpSettings
39719	}
39720	if vgp.VpnGatewayScaleUnit != nil {
39721		objectMap["vpnGatewayScaleUnit"] = vgp.VpnGatewayScaleUnit
39722	}
39723	if vgp.IsRoutingPreferenceInternet != nil {
39724		objectMap["isRoutingPreferenceInternet"] = vgp.IsRoutingPreferenceInternet
39725	}
39726	if vgp.NatRules != nil {
39727		objectMap["natRules"] = vgp.NatRules
39728	}
39729	return json.Marshal(objectMap)
39730}
39731
39732// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
39733// long-running operation.
39734type VpnGatewaysCreateOrUpdateFuture struct {
39735	azure.FutureAPI
39736	// Result returns the result of the asynchronous operation.
39737	// If the operation has not completed it will return an error.
39738	Result func(VpnGatewaysClient) (VpnGateway, error)
39739}
39740
39741// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
39742// operation.
39743type VpnGatewaysDeleteFuture struct {
39744	azure.FutureAPI
39745	// Result returns the result of the asynchronous operation.
39746	// If the operation has not completed it will return an error.
39747	Result func(VpnGatewaysClient) (autorest.Response, error)
39748}
39749
39750// VpnGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running
39751// operation.
39752type VpnGatewaysResetFuture struct {
39753	azure.FutureAPI
39754	// Result returns the result of the asynchronous operation.
39755	// If the operation has not completed it will return an error.
39756	Result func(VpnGatewaysClient) (VpnGateway, error)
39757}
39758
39759// VpnGatewaysStartPacketCaptureFuture an abstraction for monitoring and retrieving the results of a
39760// long-running operation.
39761type VpnGatewaysStartPacketCaptureFuture struct {
39762	azure.FutureAPI
39763	// Result returns the result of the asynchronous operation.
39764	// If the operation has not completed it will return an error.
39765	Result func(VpnGatewaysClient) (String, error)
39766}
39767
39768// VpnGatewaysStopPacketCaptureFuture an abstraction for monitoring and retrieving the results of a
39769// long-running operation.
39770type VpnGatewaysStopPacketCaptureFuture struct {
39771	azure.FutureAPI
39772	// Result returns the result of the asynchronous operation.
39773	// If the operation has not completed it will return an error.
39774	Result func(VpnGatewaysClient) (String, error)
39775}
39776
39777// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
39778// operation.
39779type VpnGatewaysUpdateTagsFuture struct {
39780	azure.FutureAPI
39781	// Result returns the result of the asynchronous operation.
39782	// If the operation has not completed it will return an error.
39783	Result func(VpnGatewaysClient) (VpnGateway, error)
39784}
39785
39786// VpnLinkBgpSettings BGP settings details for a link.
39787type VpnLinkBgpSettings struct {
39788	// Asn - The BGP speaker's ASN.
39789	Asn *int64 `json:"asn,omitempty"`
39790	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
39791	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
39792}
39793
39794// VpnLinkConnectionsGetIkeSasFuture an abstraction for monitoring and retrieving the results of a
39795// long-running operation.
39796type VpnLinkConnectionsGetIkeSasFuture struct {
39797	azure.FutureAPI
39798	// Result returns the result of the asynchronous operation.
39799	// If the operation has not completed it will return an error.
39800	Result func(VpnLinkConnectionsClient) (String, error)
39801}
39802
39803// VpnLinkConnectionsResetConnectionFuture an abstraction for monitoring and retrieving the results of a
39804// long-running operation.
39805type VpnLinkConnectionsResetConnectionFuture struct {
39806	azure.FutureAPI
39807	// Result returns the result of the asynchronous operation.
39808	// If the operation has not completed it will return an error.
39809	Result func(VpnLinkConnectionsClient) (autorest.Response, error)
39810}
39811
39812// VpnLinkProviderProperties list of properties of a link provider.
39813type VpnLinkProviderProperties struct {
39814	// LinkProviderName - Name of the link provider.
39815	LinkProviderName *string `json:"linkProviderName,omitempty"`
39816	// LinkSpeedInMbps - Link speed.
39817	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
39818}
39819
39820// VpnNatRuleMapping vpn NatRule mapping.
39821type VpnNatRuleMapping struct {
39822	// AddressSpace - Address space for Vpn NatRule mapping.
39823	AddressSpace *string `json:"addressSpace,omitempty"`
39824}
39825
39826// VpnPacketCaptureStartParameters start packet capture parameters on virtual network gateway.
39827type VpnPacketCaptureStartParameters struct {
39828	// FilterData - Start Packet capture parameters.
39829	FilterData *string `json:"filterData,omitempty"`
39830}
39831
39832// VpnPacketCaptureStopParameters stop packet capture parameters.
39833type VpnPacketCaptureStopParameters struct {
39834	// SasURL - SAS url for packet capture on virtual network gateway.
39835	SasURL *string `json:"sasUrl,omitempty"`
39836}
39837
39838// VpnProfileResponse vpn Profile Response for package generation.
39839type VpnProfileResponse struct {
39840	autorest.Response `json:"-"`
39841	// ProfileURL - URL to the VPN profile.
39842	ProfileURL *string `json:"profileUrl,omitempty"`
39843}
39844
39845// VpnServerConfigRadiusClientRootCertificate properties of the Radius client root certificate of
39846// VpnServerConfiguration.
39847type VpnServerConfigRadiusClientRootCertificate struct {
39848	// Name - The certificate name.
39849	Name *string `json:"name,omitempty"`
39850	// Thumbprint - The Radius client root certificate thumbprint.
39851	Thumbprint *string `json:"thumbprint,omitempty"`
39852}
39853
39854// VpnServerConfigRadiusServerRootCertificate properties of Radius Server root certificate of
39855// VpnServerConfiguration.
39856type VpnServerConfigRadiusServerRootCertificate struct {
39857	// Name - The certificate name.
39858	Name *string `json:"name,omitempty"`
39859	// PublicCertData - The certificate public data.
39860	PublicCertData *string `json:"publicCertData,omitempty"`
39861}
39862
39863// VpnServerConfiguration vpnServerConfiguration Resource.
39864type VpnServerConfiguration struct {
39865	autorest.Response `json:"-"`
39866	// VpnServerConfigurationProperties - Properties of the P2SVpnServer configuration.
39867	*VpnServerConfigurationProperties `json:"properties,omitempty"`
39868	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
39869	Etag *string `json:"etag,omitempty"`
39870	// ID - Resource ID.
39871	ID *string `json:"id,omitempty"`
39872	// Name - READ-ONLY; Resource name.
39873	Name *string `json:"name,omitempty"`
39874	// Type - READ-ONLY; Resource type.
39875	Type *string `json:"type,omitempty"`
39876	// Location - Resource location.
39877	Location *string `json:"location,omitempty"`
39878	// Tags - Resource tags.
39879	Tags map[string]*string `json:"tags"`
39880}
39881
39882// MarshalJSON is the custom marshaler for VpnServerConfiguration.
39883func (vsc VpnServerConfiguration) MarshalJSON() ([]byte, error) {
39884	objectMap := make(map[string]interface{})
39885	if vsc.VpnServerConfigurationProperties != nil {
39886		objectMap["properties"] = vsc.VpnServerConfigurationProperties
39887	}
39888	if vsc.ID != nil {
39889		objectMap["id"] = vsc.ID
39890	}
39891	if vsc.Location != nil {
39892		objectMap["location"] = vsc.Location
39893	}
39894	if vsc.Tags != nil {
39895		objectMap["tags"] = vsc.Tags
39896	}
39897	return json.Marshal(objectMap)
39898}
39899
39900// UnmarshalJSON is the custom unmarshaler for VpnServerConfiguration struct.
39901func (vsc *VpnServerConfiguration) UnmarshalJSON(body []byte) error {
39902	var m map[string]*json.RawMessage
39903	err := json.Unmarshal(body, &m)
39904	if err != nil {
39905		return err
39906	}
39907	for k, v := range m {
39908		switch k {
39909		case "properties":
39910			if v != nil {
39911				var vpnServerConfigurationProperties VpnServerConfigurationProperties
39912				err = json.Unmarshal(*v, &vpnServerConfigurationProperties)
39913				if err != nil {
39914					return err
39915				}
39916				vsc.VpnServerConfigurationProperties = &vpnServerConfigurationProperties
39917			}
39918		case "etag":
39919			if v != nil {
39920				var etag string
39921				err = json.Unmarshal(*v, &etag)
39922				if err != nil {
39923					return err
39924				}
39925				vsc.Etag = &etag
39926			}
39927		case "id":
39928			if v != nil {
39929				var ID string
39930				err = json.Unmarshal(*v, &ID)
39931				if err != nil {
39932					return err
39933				}
39934				vsc.ID = &ID
39935			}
39936		case "name":
39937			if v != nil {
39938				var name string
39939				err = json.Unmarshal(*v, &name)
39940				if err != nil {
39941					return err
39942				}
39943				vsc.Name = &name
39944			}
39945		case "type":
39946			if v != nil {
39947				var typeVar string
39948				err = json.Unmarshal(*v, &typeVar)
39949				if err != nil {
39950					return err
39951				}
39952				vsc.Type = &typeVar
39953			}
39954		case "location":
39955			if v != nil {
39956				var location string
39957				err = json.Unmarshal(*v, &location)
39958				if err != nil {
39959					return err
39960				}
39961				vsc.Location = &location
39962			}
39963		case "tags":
39964			if v != nil {
39965				var tags map[string]*string
39966				err = json.Unmarshal(*v, &tags)
39967				if err != nil {
39968					return err
39969				}
39970				vsc.Tags = tags
39971			}
39972		}
39973	}
39974
39975	return nil
39976}
39977
39978// VpnServerConfigurationProperties parameters for VpnServerConfiguration.
39979type VpnServerConfigurationProperties struct {
39980	// Name - The name of the VpnServerConfiguration that is unique within a resource group.
39981	Name *string `json:"name,omitempty"`
39982	// VpnProtocols - VPN protocols for the VpnServerConfiguration.
39983	VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"`
39984	// VpnAuthenticationTypes - VPN authentication types for the VpnServerConfiguration.
39985	VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"`
39986	// VpnClientRootCertificates - VPN client root certificate of VpnServerConfiguration.
39987	VpnClientRootCertificates *[]VpnServerConfigVpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
39988	// VpnClientRevokedCertificates - VPN client revoked certificate of VpnServerConfiguration.
39989	VpnClientRevokedCertificates *[]VpnServerConfigVpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
39990	// RadiusServerRootCertificates - Radius Server root certificate of VpnServerConfiguration.
39991	RadiusServerRootCertificates *[]VpnServerConfigRadiusServerRootCertificate `json:"radiusServerRootCertificates,omitempty"`
39992	// RadiusClientRootCertificates - Radius client root certificate of VpnServerConfiguration.
39993	RadiusClientRootCertificates *[]VpnServerConfigRadiusClientRootCertificate `json:"radiusClientRootCertificates,omitempty"`
39994	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for VpnServerConfiguration.
39995	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
39996	// RadiusServerAddress - The radius server address property of the VpnServerConfiguration resource for point to site client connection.
39997	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
39998	// RadiusServerSecret - The radius secret property of the VpnServerConfiguration resource for point to site client connection.
39999	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
40000	// RadiusServers - Multiple Radius Server configuration for VpnServerConfiguration.
40001	RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"`
40002	// AadAuthenticationParameters - The set of aad vpn authentication parameters.
40003	AadAuthenticationParameters *AadAuthenticationParameters `json:"aadAuthenticationParameters,omitempty"`
40004	// ProvisioningState - READ-ONLY; The provisioning state of the VpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
40005	ProvisioningState *string `json:"provisioningState,omitempty"`
40006	// P2SVpnGateways - READ-ONLY; List of references to P2SVpnGateways.
40007	P2SVpnGateways *[]P2SVpnGateway `json:"p2SVpnGateways,omitempty"`
40008	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40009	Etag *string `json:"etag,omitempty"`
40010}
40011
40012// MarshalJSON is the custom marshaler for VpnServerConfigurationProperties.
40013func (vscp VpnServerConfigurationProperties) MarshalJSON() ([]byte, error) {
40014	objectMap := make(map[string]interface{})
40015	if vscp.Name != nil {
40016		objectMap["name"] = vscp.Name
40017	}
40018	if vscp.VpnProtocols != nil {
40019		objectMap["vpnProtocols"] = vscp.VpnProtocols
40020	}
40021	if vscp.VpnAuthenticationTypes != nil {
40022		objectMap["vpnAuthenticationTypes"] = vscp.VpnAuthenticationTypes
40023	}
40024	if vscp.VpnClientRootCertificates != nil {
40025		objectMap["vpnClientRootCertificates"] = vscp.VpnClientRootCertificates
40026	}
40027	if vscp.VpnClientRevokedCertificates != nil {
40028		objectMap["vpnClientRevokedCertificates"] = vscp.VpnClientRevokedCertificates
40029	}
40030	if vscp.RadiusServerRootCertificates != nil {
40031		objectMap["radiusServerRootCertificates"] = vscp.RadiusServerRootCertificates
40032	}
40033	if vscp.RadiusClientRootCertificates != nil {
40034		objectMap["radiusClientRootCertificates"] = vscp.RadiusClientRootCertificates
40035	}
40036	if vscp.VpnClientIpsecPolicies != nil {
40037		objectMap["vpnClientIpsecPolicies"] = vscp.VpnClientIpsecPolicies
40038	}
40039	if vscp.RadiusServerAddress != nil {
40040		objectMap["radiusServerAddress"] = vscp.RadiusServerAddress
40041	}
40042	if vscp.RadiusServerSecret != nil {
40043		objectMap["radiusServerSecret"] = vscp.RadiusServerSecret
40044	}
40045	if vscp.RadiusServers != nil {
40046		objectMap["radiusServers"] = vscp.RadiusServers
40047	}
40048	if vscp.AadAuthenticationParameters != nil {
40049		objectMap["aadAuthenticationParameters"] = vscp.AadAuthenticationParameters
40050	}
40051	return json.Marshal(objectMap)
40052}
40053
40054// VpnServerConfigurationsAssociatedWithVirtualWanListFuture an abstraction for monitoring and retrieving
40055// the results of a long-running operation.
40056type VpnServerConfigurationsAssociatedWithVirtualWanListFuture struct {
40057	azure.FutureAPI
40058	// Result returns the result of the asynchronous operation.
40059	// If the operation has not completed it will return an error.
40060	Result func(VpnServerConfigurationsAssociatedWithVirtualWanClient) (VpnServerConfigurationsResponse, error)
40061}
40062
40063// VpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
40064// a long-running operation.
40065type VpnServerConfigurationsCreateOrUpdateFuture struct {
40066	azure.FutureAPI
40067	// Result returns the result of the asynchronous operation.
40068	// If the operation has not completed it will return an error.
40069	Result func(VpnServerConfigurationsClient) (VpnServerConfiguration, error)
40070}
40071
40072// VpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
40073// long-running operation.
40074type VpnServerConfigurationsDeleteFuture struct {
40075	azure.FutureAPI
40076	// Result returns the result of the asynchronous operation.
40077	// If the operation has not completed it will return an error.
40078	Result func(VpnServerConfigurationsClient) (autorest.Response, error)
40079}
40080
40081// VpnServerConfigurationsResponse vpnServerConfigurations list associated with VirtualWan Response.
40082type VpnServerConfigurationsResponse struct {
40083	autorest.Response `json:"-"`
40084	// VpnServerConfigurationResourceIds - List of VpnServerConfigurations associated with VirtualWan.
40085	VpnServerConfigurationResourceIds *[]string `json:"vpnServerConfigurationResourceIds,omitempty"`
40086}
40087
40088// VpnServerConfigVpnClientRevokedCertificate properties of the revoked VPN client certificate of
40089// VpnServerConfiguration.
40090type VpnServerConfigVpnClientRevokedCertificate struct {
40091	// Name - The certificate name.
40092	Name *string `json:"name,omitempty"`
40093	// Thumbprint - The revoked VPN client certificate thumbprint.
40094	Thumbprint *string `json:"thumbprint,omitempty"`
40095}
40096
40097// VpnServerConfigVpnClientRootCertificate properties of VPN client root certificate of
40098// VpnServerConfiguration.
40099type VpnServerConfigVpnClientRootCertificate struct {
40100	// Name - The certificate name.
40101	Name *string `json:"name,omitempty"`
40102	// PublicCertData - The certificate public data.
40103	PublicCertData *string `json:"publicCertData,omitempty"`
40104}
40105
40106// VpnSite vpnSite Resource.
40107type VpnSite struct {
40108	autorest.Response `json:"-"`
40109	// VpnSiteProperties - Properties of the VPN site.
40110	*VpnSiteProperties `json:"properties,omitempty"`
40111	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40112	Etag *string `json:"etag,omitempty"`
40113	// ID - Resource ID.
40114	ID *string `json:"id,omitempty"`
40115	// Name - READ-ONLY; Resource name.
40116	Name *string `json:"name,omitempty"`
40117	// Type - READ-ONLY; Resource type.
40118	Type *string `json:"type,omitempty"`
40119	// Location - Resource location.
40120	Location *string `json:"location,omitempty"`
40121	// Tags - Resource tags.
40122	Tags map[string]*string `json:"tags"`
40123}
40124
40125// MarshalJSON is the custom marshaler for VpnSite.
40126func (vs VpnSite) MarshalJSON() ([]byte, error) {
40127	objectMap := make(map[string]interface{})
40128	if vs.VpnSiteProperties != nil {
40129		objectMap["properties"] = vs.VpnSiteProperties
40130	}
40131	if vs.ID != nil {
40132		objectMap["id"] = vs.ID
40133	}
40134	if vs.Location != nil {
40135		objectMap["location"] = vs.Location
40136	}
40137	if vs.Tags != nil {
40138		objectMap["tags"] = vs.Tags
40139	}
40140	return json.Marshal(objectMap)
40141}
40142
40143// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
40144func (vs *VpnSite) UnmarshalJSON(body []byte) error {
40145	var m map[string]*json.RawMessage
40146	err := json.Unmarshal(body, &m)
40147	if err != nil {
40148		return err
40149	}
40150	for k, v := range m {
40151		switch k {
40152		case "properties":
40153			if v != nil {
40154				var vpnSiteProperties VpnSiteProperties
40155				err = json.Unmarshal(*v, &vpnSiteProperties)
40156				if err != nil {
40157					return err
40158				}
40159				vs.VpnSiteProperties = &vpnSiteProperties
40160			}
40161		case "etag":
40162			if v != nil {
40163				var etag string
40164				err = json.Unmarshal(*v, &etag)
40165				if err != nil {
40166					return err
40167				}
40168				vs.Etag = &etag
40169			}
40170		case "id":
40171			if v != nil {
40172				var ID string
40173				err = json.Unmarshal(*v, &ID)
40174				if err != nil {
40175					return err
40176				}
40177				vs.ID = &ID
40178			}
40179		case "name":
40180			if v != nil {
40181				var name string
40182				err = json.Unmarshal(*v, &name)
40183				if err != nil {
40184					return err
40185				}
40186				vs.Name = &name
40187			}
40188		case "type":
40189			if v != nil {
40190				var typeVar string
40191				err = json.Unmarshal(*v, &typeVar)
40192				if err != nil {
40193					return err
40194				}
40195				vs.Type = &typeVar
40196			}
40197		case "location":
40198			if v != nil {
40199				var location string
40200				err = json.Unmarshal(*v, &location)
40201				if err != nil {
40202					return err
40203				}
40204				vs.Location = &location
40205			}
40206		case "tags":
40207			if v != nil {
40208				var tags map[string]*string
40209				err = json.Unmarshal(*v, &tags)
40210				if err != nil {
40211					return err
40212				}
40213				vs.Tags = tags
40214			}
40215		}
40216	}
40217
40218	return nil
40219}
40220
40221// VpnSiteID vpnSite Resource.
40222type VpnSiteID struct {
40223	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
40224	VpnSite *string `json:"vpnSite,omitempty"`
40225}
40226
40227// VpnSiteLink vpnSiteLink Resource.
40228type VpnSiteLink struct {
40229	autorest.Response `json:"-"`
40230	// VpnSiteLinkProperties - Properties of the VPN site link.
40231	*VpnSiteLinkProperties `json:"properties,omitempty"`
40232	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40233	Etag *string `json:"etag,omitempty"`
40234	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
40235	Name *string `json:"name,omitempty"`
40236	// Type - READ-ONLY; Resource type.
40237	Type *string `json:"type,omitempty"`
40238	// ID - Resource ID.
40239	ID *string `json:"id,omitempty"`
40240}
40241
40242// MarshalJSON is the custom marshaler for VpnSiteLink.
40243func (vsl VpnSiteLink) MarshalJSON() ([]byte, error) {
40244	objectMap := make(map[string]interface{})
40245	if vsl.VpnSiteLinkProperties != nil {
40246		objectMap["properties"] = vsl.VpnSiteLinkProperties
40247	}
40248	if vsl.Name != nil {
40249		objectMap["name"] = vsl.Name
40250	}
40251	if vsl.ID != nil {
40252		objectMap["id"] = vsl.ID
40253	}
40254	return json.Marshal(objectMap)
40255}
40256
40257// UnmarshalJSON is the custom unmarshaler for VpnSiteLink struct.
40258func (vsl *VpnSiteLink) UnmarshalJSON(body []byte) error {
40259	var m map[string]*json.RawMessage
40260	err := json.Unmarshal(body, &m)
40261	if err != nil {
40262		return err
40263	}
40264	for k, v := range m {
40265		switch k {
40266		case "properties":
40267			if v != nil {
40268				var vpnSiteLinkProperties VpnSiteLinkProperties
40269				err = json.Unmarshal(*v, &vpnSiteLinkProperties)
40270				if err != nil {
40271					return err
40272				}
40273				vsl.VpnSiteLinkProperties = &vpnSiteLinkProperties
40274			}
40275		case "etag":
40276			if v != nil {
40277				var etag string
40278				err = json.Unmarshal(*v, &etag)
40279				if err != nil {
40280					return err
40281				}
40282				vsl.Etag = &etag
40283			}
40284		case "name":
40285			if v != nil {
40286				var name string
40287				err = json.Unmarshal(*v, &name)
40288				if err != nil {
40289					return err
40290				}
40291				vsl.Name = &name
40292			}
40293		case "type":
40294			if v != nil {
40295				var typeVar string
40296				err = json.Unmarshal(*v, &typeVar)
40297				if err != nil {
40298					return err
40299				}
40300				vsl.Type = &typeVar
40301			}
40302		case "id":
40303			if v != nil {
40304				var ID string
40305				err = json.Unmarshal(*v, &ID)
40306				if err != nil {
40307					return err
40308				}
40309				vsl.ID = &ID
40310			}
40311		}
40312	}
40313
40314	return nil
40315}
40316
40317// VpnSiteLinkConnection vpnSiteLinkConnection Resource.
40318type VpnSiteLinkConnection struct {
40319	autorest.Response `json:"-"`
40320	// VpnSiteLinkConnectionProperties - Properties of the VPN site link connection.
40321	*VpnSiteLinkConnectionProperties `json:"properties,omitempty"`
40322	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
40323	Name *string `json:"name,omitempty"`
40324	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40325	Etag *string `json:"etag,omitempty"`
40326	// Type - READ-ONLY; Resource type.
40327	Type *string `json:"type,omitempty"`
40328	// ID - Resource ID.
40329	ID *string `json:"id,omitempty"`
40330}
40331
40332// MarshalJSON is the custom marshaler for VpnSiteLinkConnection.
40333func (vslc VpnSiteLinkConnection) MarshalJSON() ([]byte, error) {
40334	objectMap := make(map[string]interface{})
40335	if vslc.VpnSiteLinkConnectionProperties != nil {
40336		objectMap["properties"] = vslc.VpnSiteLinkConnectionProperties
40337	}
40338	if vslc.Name != nil {
40339		objectMap["name"] = vslc.Name
40340	}
40341	if vslc.ID != nil {
40342		objectMap["id"] = vslc.ID
40343	}
40344	return json.Marshal(objectMap)
40345}
40346
40347// UnmarshalJSON is the custom unmarshaler for VpnSiteLinkConnection struct.
40348func (vslc *VpnSiteLinkConnection) UnmarshalJSON(body []byte) error {
40349	var m map[string]*json.RawMessage
40350	err := json.Unmarshal(body, &m)
40351	if err != nil {
40352		return err
40353	}
40354	for k, v := range m {
40355		switch k {
40356		case "properties":
40357			if v != nil {
40358				var vpnSiteLinkConnectionProperties VpnSiteLinkConnectionProperties
40359				err = json.Unmarshal(*v, &vpnSiteLinkConnectionProperties)
40360				if err != nil {
40361					return err
40362				}
40363				vslc.VpnSiteLinkConnectionProperties = &vpnSiteLinkConnectionProperties
40364			}
40365		case "name":
40366			if v != nil {
40367				var name string
40368				err = json.Unmarshal(*v, &name)
40369				if err != nil {
40370					return err
40371				}
40372				vslc.Name = &name
40373			}
40374		case "etag":
40375			if v != nil {
40376				var etag string
40377				err = json.Unmarshal(*v, &etag)
40378				if err != nil {
40379					return err
40380				}
40381				vslc.Etag = &etag
40382			}
40383		case "type":
40384			if v != nil {
40385				var typeVar string
40386				err = json.Unmarshal(*v, &typeVar)
40387				if err != nil {
40388					return err
40389				}
40390				vslc.Type = &typeVar
40391			}
40392		case "id":
40393			if v != nil {
40394				var ID string
40395				err = json.Unmarshal(*v, &ID)
40396				if err != nil {
40397					return err
40398				}
40399				vslc.ID = &ID
40400			}
40401		}
40402	}
40403
40404	return nil
40405}
40406
40407// VpnSiteLinkConnectionProperties parameters for VpnConnection.
40408type VpnSiteLinkConnectionProperties struct {
40409	// VpnSiteLink - Id of the connected vpn site link.
40410	VpnSiteLink *SubResource `json:"vpnSiteLink,omitempty"`
40411	// RoutingWeight - Routing weight for vpn connection.
40412	RoutingWeight *int32 `json:"routingWeight,omitempty"`
40413	// VpnLinkConnectionMode - Vpn link connection mode. Possible values include: 'VpnLinkConnectionModeDefault', 'VpnLinkConnectionModeResponderOnly', 'VpnLinkConnectionModeInitiatorOnly'
40414	VpnLinkConnectionMode VpnLinkConnectionMode `json:"vpnLinkConnectionMode,omitempty"`
40415	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
40416	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
40417	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
40418	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
40419	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
40420	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
40421	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
40422	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
40423	// ConnectionBandwidth - Expected bandwidth in MBPS.
40424	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
40425	// SharedKey - SharedKey for the vpn connection.
40426	SharedKey *string `json:"sharedKey,omitempty"`
40427	// EnableBgp - EnableBgp flag.
40428	EnableBgp *bool `json:"enableBgp,omitempty"`
40429	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
40430	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
40431	// IpsecPolicies - The IPSec Policies to be considered by this connection.
40432	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
40433	// EnableRateLimiting - EnableBgp flag.
40434	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
40435	// UseLocalAzureIPAddress - Use local azure ip to initiate connection.
40436	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
40437	// ProvisioningState - READ-ONLY; The provisioning state of the VPN site link connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
40438	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
40439	// IngressNatRules - List of ingress NatRules.
40440	IngressNatRules *[]SubResource `json:"ingressNatRules,omitempty"`
40441	// EgressNatRules - List of egress NatRules.
40442	EgressNatRules *[]SubResource `json:"egressNatRules,omitempty"`
40443}
40444
40445// MarshalJSON is the custom marshaler for VpnSiteLinkConnectionProperties.
40446func (vslcp VpnSiteLinkConnectionProperties) MarshalJSON() ([]byte, error) {
40447	objectMap := make(map[string]interface{})
40448	if vslcp.VpnSiteLink != nil {
40449		objectMap["vpnSiteLink"] = vslcp.VpnSiteLink
40450	}
40451	if vslcp.RoutingWeight != nil {
40452		objectMap["routingWeight"] = vslcp.RoutingWeight
40453	}
40454	if vslcp.VpnLinkConnectionMode != "" {
40455		objectMap["vpnLinkConnectionMode"] = vslcp.VpnLinkConnectionMode
40456	}
40457	if vslcp.ConnectionStatus != "" {
40458		objectMap["connectionStatus"] = vslcp.ConnectionStatus
40459	}
40460	if vslcp.VpnConnectionProtocolType != "" {
40461		objectMap["vpnConnectionProtocolType"] = vslcp.VpnConnectionProtocolType
40462	}
40463	if vslcp.ConnectionBandwidth != nil {
40464		objectMap["connectionBandwidth"] = vslcp.ConnectionBandwidth
40465	}
40466	if vslcp.SharedKey != nil {
40467		objectMap["sharedKey"] = vslcp.SharedKey
40468	}
40469	if vslcp.EnableBgp != nil {
40470		objectMap["enableBgp"] = vslcp.EnableBgp
40471	}
40472	if vslcp.UsePolicyBasedTrafficSelectors != nil {
40473		objectMap["usePolicyBasedTrafficSelectors"] = vslcp.UsePolicyBasedTrafficSelectors
40474	}
40475	if vslcp.IpsecPolicies != nil {
40476		objectMap["ipsecPolicies"] = vslcp.IpsecPolicies
40477	}
40478	if vslcp.EnableRateLimiting != nil {
40479		objectMap["enableRateLimiting"] = vslcp.EnableRateLimiting
40480	}
40481	if vslcp.UseLocalAzureIPAddress != nil {
40482		objectMap["useLocalAzureIpAddress"] = vslcp.UseLocalAzureIPAddress
40483	}
40484	if vslcp.IngressNatRules != nil {
40485		objectMap["ingressNatRules"] = vslcp.IngressNatRules
40486	}
40487	if vslcp.EgressNatRules != nil {
40488		objectMap["egressNatRules"] = vslcp.EgressNatRules
40489	}
40490	return json.Marshal(objectMap)
40491}
40492
40493// VpnSiteLinkProperties parameters for VpnSite.
40494type VpnSiteLinkProperties struct {
40495	// LinkProperties - The link provider properties.
40496	LinkProperties *VpnLinkProviderProperties `json:"linkProperties,omitempty"`
40497	// IPAddress - The ip-address for the vpn-site-link.
40498	IPAddress *string `json:"ipAddress,omitempty"`
40499	// Fqdn - FQDN of vpn-site-link.
40500	Fqdn *string `json:"fqdn,omitempty"`
40501	// BgpProperties - The set of bgp properties.
40502	BgpProperties *VpnLinkBgpSettings `json:"bgpProperties,omitempty"`
40503	// ProvisioningState - READ-ONLY; The provisioning state of the VPN site link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
40504	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
40505}
40506
40507// MarshalJSON is the custom marshaler for VpnSiteLinkProperties.
40508func (vslp VpnSiteLinkProperties) MarshalJSON() ([]byte, error) {
40509	objectMap := make(map[string]interface{})
40510	if vslp.LinkProperties != nil {
40511		objectMap["linkProperties"] = vslp.LinkProperties
40512	}
40513	if vslp.IPAddress != nil {
40514		objectMap["ipAddress"] = vslp.IPAddress
40515	}
40516	if vslp.Fqdn != nil {
40517		objectMap["fqdn"] = vslp.Fqdn
40518	}
40519	if vslp.BgpProperties != nil {
40520		objectMap["bgpProperties"] = vslp.BgpProperties
40521	}
40522	return json.Marshal(objectMap)
40523}
40524
40525// VpnSiteProperties parameters for VpnSite.
40526type VpnSiteProperties struct {
40527	// VirtualWan - The VirtualWAN to which the vpnSite belongs.
40528	VirtualWan *SubResource `json:"virtualWan,omitempty"`
40529	// DeviceProperties - The device properties.
40530	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
40531	// IPAddress - The ip-address for the vpn-site.
40532	IPAddress *string `json:"ipAddress,omitempty"`
40533	// SiteKey - The key for vpn-site that can be used for connections.
40534	SiteKey *string `json:"siteKey,omitempty"`
40535	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
40536	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
40537	// BgpProperties - The set of bgp properties.
40538	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
40539	// ProvisioningState - READ-ONLY; The provisioning state of the VPN site resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
40540	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
40541	// IsSecuritySite - IsSecuritySite flag.
40542	IsSecuritySite *bool `json:"isSecuritySite,omitempty"`
40543	// VpnSiteLinks - List of all vpn site links.
40544	VpnSiteLinks *[]VpnSiteLink `json:"vpnSiteLinks,omitempty"`
40545	// O365Policy - Office365 Policy.
40546	O365Policy *O365PolicyProperties `json:"o365Policy,omitempty"`
40547}
40548
40549// MarshalJSON is the custom marshaler for VpnSiteProperties.
40550func (vsp VpnSiteProperties) MarshalJSON() ([]byte, error) {
40551	objectMap := make(map[string]interface{})
40552	if vsp.VirtualWan != nil {
40553		objectMap["virtualWan"] = vsp.VirtualWan
40554	}
40555	if vsp.DeviceProperties != nil {
40556		objectMap["deviceProperties"] = vsp.DeviceProperties
40557	}
40558	if vsp.IPAddress != nil {
40559		objectMap["ipAddress"] = vsp.IPAddress
40560	}
40561	if vsp.SiteKey != nil {
40562		objectMap["siteKey"] = vsp.SiteKey
40563	}
40564	if vsp.AddressSpace != nil {
40565		objectMap["addressSpace"] = vsp.AddressSpace
40566	}
40567	if vsp.BgpProperties != nil {
40568		objectMap["bgpProperties"] = vsp.BgpProperties
40569	}
40570	if vsp.IsSecuritySite != nil {
40571		objectMap["isSecuritySite"] = vsp.IsSecuritySite
40572	}
40573	if vsp.VpnSiteLinks != nil {
40574		objectMap["vpnSiteLinks"] = vsp.VpnSiteLinks
40575	}
40576	if vsp.O365Policy != nil {
40577		objectMap["o365Policy"] = vsp.O365Policy
40578	}
40579	return json.Marshal(objectMap)
40580}
40581
40582// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
40583// long-running operation.
40584type VpnSitesConfigurationDownloadFuture struct {
40585	azure.FutureAPI
40586	// Result returns the result of the asynchronous operation.
40587	// If the operation has not completed it will return an error.
40588	Result func(VpnSitesConfigurationClient) (autorest.Response, error)
40589}
40590
40591// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
40592// operation.
40593type VpnSitesCreateOrUpdateFuture struct {
40594	azure.FutureAPI
40595	// Result returns the result of the asynchronous operation.
40596	// If the operation has not completed it will return an error.
40597	Result func(VpnSitesClient) (VpnSite, error)
40598}
40599
40600// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
40601// operation.
40602type VpnSitesDeleteFuture struct {
40603	azure.FutureAPI
40604	// Result returns the result of the asynchronous operation.
40605	// If the operation has not completed it will return an error.
40606	Result func(VpnSitesClient) (autorest.Response, error)
40607}
40608
40609// Watcher network watcher in a resource group.
40610type Watcher struct {
40611	autorest.Response `json:"-"`
40612	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40613	Etag *string `json:"etag,omitempty"`
40614	// WatcherPropertiesFormat - Properties of the network watcher.
40615	*WatcherPropertiesFormat `json:"properties,omitempty"`
40616	// ID - Resource ID.
40617	ID *string `json:"id,omitempty"`
40618	// Name - READ-ONLY; Resource name.
40619	Name *string `json:"name,omitempty"`
40620	// Type - READ-ONLY; Resource type.
40621	Type *string `json:"type,omitempty"`
40622	// Location - Resource location.
40623	Location *string `json:"location,omitempty"`
40624	// Tags - Resource tags.
40625	Tags map[string]*string `json:"tags"`
40626}
40627
40628// MarshalJSON is the custom marshaler for Watcher.
40629func (w Watcher) MarshalJSON() ([]byte, error) {
40630	objectMap := make(map[string]interface{})
40631	if w.WatcherPropertiesFormat != nil {
40632		objectMap["properties"] = w.WatcherPropertiesFormat
40633	}
40634	if w.ID != nil {
40635		objectMap["id"] = w.ID
40636	}
40637	if w.Location != nil {
40638		objectMap["location"] = w.Location
40639	}
40640	if w.Tags != nil {
40641		objectMap["tags"] = w.Tags
40642	}
40643	return json.Marshal(objectMap)
40644}
40645
40646// UnmarshalJSON is the custom unmarshaler for Watcher struct.
40647func (w *Watcher) UnmarshalJSON(body []byte) error {
40648	var m map[string]*json.RawMessage
40649	err := json.Unmarshal(body, &m)
40650	if err != nil {
40651		return err
40652	}
40653	for k, v := range m {
40654		switch k {
40655		case "etag":
40656			if v != nil {
40657				var etag string
40658				err = json.Unmarshal(*v, &etag)
40659				if err != nil {
40660					return err
40661				}
40662				w.Etag = &etag
40663			}
40664		case "properties":
40665			if v != nil {
40666				var watcherPropertiesFormat WatcherPropertiesFormat
40667				err = json.Unmarshal(*v, &watcherPropertiesFormat)
40668				if err != nil {
40669					return err
40670				}
40671				w.WatcherPropertiesFormat = &watcherPropertiesFormat
40672			}
40673		case "id":
40674			if v != nil {
40675				var ID string
40676				err = json.Unmarshal(*v, &ID)
40677				if err != nil {
40678					return err
40679				}
40680				w.ID = &ID
40681			}
40682		case "name":
40683			if v != nil {
40684				var name string
40685				err = json.Unmarshal(*v, &name)
40686				if err != nil {
40687					return err
40688				}
40689				w.Name = &name
40690			}
40691		case "type":
40692			if v != nil {
40693				var typeVar string
40694				err = json.Unmarshal(*v, &typeVar)
40695				if err != nil {
40696					return err
40697				}
40698				w.Type = &typeVar
40699			}
40700		case "location":
40701			if v != nil {
40702				var location string
40703				err = json.Unmarshal(*v, &location)
40704				if err != nil {
40705					return err
40706				}
40707				w.Location = &location
40708			}
40709		case "tags":
40710			if v != nil {
40711				var tags map[string]*string
40712				err = json.Unmarshal(*v, &tags)
40713				if err != nil {
40714					return err
40715				}
40716				w.Tags = tags
40717			}
40718		}
40719	}
40720
40721	return nil
40722}
40723
40724// WatcherListResult response for ListNetworkWatchers API service call.
40725type WatcherListResult struct {
40726	autorest.Response `json:"-"`
40727	// Value - List of network watcher resources.
40728	Value *[]Watcher `json:"value,omitempty"`
40729}
40730
40731// WatcherPropertiesFormat the network watcher properties.
40732type WatcherPropertiesFormat struct {
40733	// ProvisioningState - READ-ONLY; The provisioning state of the network watcher resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
40734	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
40735}
40736
40737// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
40738// long-running operation.
40739type WatchersCheckConnectivityFuture struct {
40740	azure.FutureAPI
40741	// Result returns the result of the asynchronous operation.
40742	// If the operation has not completed it will return an error.
40743	Result func(WatchersClient) (ConnectivityInformation, error)
40744}
40745
40746// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
40747// operation.
40748type WatchersDeleteFuture struct {
40749	azure.FutureAPI
40750	// Result returns the result of the asynchronous operation.
40751	// If the operation has not completed it will return an error.
40752	Result func(WatchersClient) (autorest.Response, error)
40753}
40754
40755// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
40756// long-running operation.
40757type WatchersGetAzureReachabilityReportFuture struct {
40758	azure.FutureAPI
40759	// Result returns the result of the asynchronous operation.
40760	// If the operation has not completed it will return an error.
40761	Result func(WatchersClient) (AzureReachabilityReport, error)
40762}
40763
40764// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
40765// long-running operation.
40766type WatchersGetFlowLogStatusFuture struct {
40767	azure.FutureAPI
40768	// Result returns the result of the asynchronous operation.
40769	// If the operation has not completed it will return an error.
40770	Result func(WatchersClient) (FlowLogInformation, error)
40771}
40772
40773// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
40774// of a long-running operation.
40775type WatchersGetNetworkConfigurationDiagnosticFuture struct {
40776	azure.FutureAPI
40777	// Result returns the result of the asynchronous operation.
40778	// If the operation has not completed it will return an error.
40779	Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
40780}
40781
40782// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
40783// operation.
40784type WatchersGetNextHopFuture struct {
40785	azure.FutureAPI
40786	// Result returns the result of the asynchronous operation.
40787	// If the operation has not completed it will return an error.
40788	Result func(WatchersClient) (NextHopResult, error)
40789}
40790
40791// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
40792// long-running operation.
40793type WatchersGetTroubleshootingFuture struct {
40794	azure.FutureAPI
40795	// Result returns the result of the asynchronous operation.
40796	// If the operation has not completed it will return an error.
40797	Result func(WatchersClient) (TroubleshootingResult, error)
40798}
40799
40800// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
40801// long-running operation.
40802type WatchersGetTroubleshootingResultFuture struct {
40803	azure.FutureAPI
40804	// Result returns the result of the asynchronous operation.
40805	// If the operation has not completed it will return an error.
40806	Result func(WatchersClient) (TroubleshootingResult, error)
40807}
40808
40809// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
40810// long-running operation.
40811type WatchersGetVMSecurityRulesFuture struct {
40812	azure.FutureAPI
40813	// Result returns the result of the asynchronous operation.
40814	// If the operation has not completed it will return an error.
40815	Result func(WatchersClient) (SecurityGroupViewResult, error)
40816}
40817
40818// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
40819// long-running operation.
40820type WatchersListAvailableProvidersFuture struct {
40821	azure.FutureAPI
40822	// Result returns the result of the asynchronous operation.
40823	// If the operation has not completed it will return an error.
40824	Result func(WatchersClient) (AvailableProvidersList, error)
40825}
40826
40827// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
40828// long-running operation.
40829type WatchersSetFlowLogConfigurationFuture struct {
40830	azure.FutureAPI
40831	// Result returns the result of the asynchronous operation.
40832	// If the operation has not completed it will return an error.
40833	Result func(WatchersClient) (FlowLogInformation, error)
40834}
40835
40836// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
40837// operation.
40838type WatchersVerifyIPFlowFuture struct {
40839	azure.FutureAPI
40840	// Result returns the result of the asynchronous operation.
40841	// If the operation has not completed it will return an error.
40842	Result func(WatchersClient) (VerificationIPFlowResult, error)
40843}
40844
40845// WebApplicationFirewallCustomRule defines contents of a web application rule.
40846type WebApplicationFirewallCustomRule struct {
40847	// Name - The name of the resource that is unique within a policy. This name can be used to access the resource.
40848	Name *string `json:"name,omitempty"`
40849	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40850	Etag *string `json:"etag,omitempty"`
40851	// Priority - Priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
40852	Priority *int32 `json:"priority,omitempty"`
40853	// RuleType - The rule type. Possible values include: 'WebApplicationFirewallRuleTypeMatchRule', 'WebApplicationFirewallRuleTypeInvalid'
40854	RuleType WebApplicationFirewallRuleType `json:"ruleType,omitempty"`
40855	// MatchConditions - List of match conditions.
40856	MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"`
40857	// Action - Type of Actions. Possible values include: 'WebApplicationFirewallActionAllow', 'WebApplicationFirewallActionBlock', 'WebApplicationFirewallActionLog'
40858	Action WebApplicationFirewallAction `json:"action,omitempty"`
40859}
40860
40861// MarshalJSON is the custom marshaler for WebApplicationFirewallCustomRule.
40862func (wafcr WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) {
40863	objectMap := make(map[string]interface{})
40864	if wafcr.Name != nil {
40865		objectMap["name"] = wafcr.Name
40866	}
40867	if wafcr.Priority != nil {
40868		objectMap["priority"] = wafcr.Priority
40869	}
40870	if wafcr.RuleType != "" {
40871		objectMap["ruleType"] = wafcr.RuleType
40872	}
40873	if wafcr.MatchConditions != nil {
40874		objectMap["matchConditions"] = wafcr.MatchConditions
40875	}
40876	if wafcr.Action != "" {
40877		objectMap["action"] = wafcr.Action
40878	}
40879	return json.Marshal(objectMap)
40880}
40881
40882// WebApplicationFirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
40883// long-running operation.
40884type WebApplicationFirewallPoliciesDeleteFuture struct {
40885	azure.FutureAPI
40886	// Result returns the result of the asynchronous operation.
40887	// If the operation has not completed it will return an error.
40888	Result func(WebApplicationFirewallPoliciesClient) (autorest.Response, error)
40889}
40890
40891// WebApplicationFirewallPolicy defines web application firewall policy.
40892type WebApplicationFirewallPolicy struct {
40893	autorest.Response `json:"-"`
40894	// WebApplicationFirewallPolicyPropertiesFormat - Properties of the web application firewall policy.
40895	*WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"`
40896	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
40897	Etag *string `json:"etag,omitempty"`
40898	// ID - Resource ID.
40899	ID *string `json:"id,omitempty"`
40900	// Name - READ-ONLY; Resource name.
40901	Name *string `json:"name,omitempty"`
40902	// Type - READ-ONLY; Resource type.
40903	Type *string `json:"type,omitempty"`
40904	// Location - Resource location.
40905	Location *string `json:"location,omitempty"`
40906	// Tags - Resource tags.
40907	Tags map[string]*string `json:"tags"`
40908}
40909
40910// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicy.
40911func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) {
40912	objectMap := make(map[string]interface{})
40913	if wafp.WebApplicationFirewallPolicyPropertiesFormat != nil {
40914		objectMap["properties"] = wafp.WebApplicationFirewallPolicyPropertiesFormat
40915	}
40916	if wafp.ID != nil {
40917		objectMap["id"] = wafp.ID
40918	}
40919	if wafp.Location != nil {
40920		objectMap["location"] = wafp.Location
40921	}
40922	if wafp.Tags != nil {
40923		objectMap["tags"] = wafp.Tags
40924	}
40925	return json.Marshal(objectMap)
40926}
40927
40928// UnmarshalJSON is the custom unmarshaler for WebApplicationFirewallPolicy struct.
40929func (wafp *WebApplicationFirewallPolicy) UnmarshalJSON(body []byte) error {
40930	var m map[string]*json.RawMessage
40931	err := json.Unmarshal(body, &m)
40932	if err != nil {
40933		return err
40934	}
40935	for k, v := range m {
40936		switch k {
40937		case "properties":
40938			if v != nil {
40939				var webApplicationFirewallPolicyPropertiesFormat WebApplicationFirewallPolicyPropertiesFormat
40940				err = json.Unmarshal(*v, &webApplicationFirewallPolicyPropertiesFormat)
40941				if err != nil {
40942					return err
40943				}
40944				wafp.WebApplicationFirewallPolicyPropertiesFormat = &webApplicationFirewallPolicyPropertiesFormat
40945			}
40946		case "etag":
40947			if v != nil {
40948				var etag string
40949				err = json.Unmarshal(*v, &etag)
40950				if err != nil {
40951					return err
40952				}
40953				wafp.Etag = &etag
40954			}
40955		case "id":
40956			if v != nil {
40957				var ID string
40958				err = json.Unmarshal(*v, &ID)
40959				if err != nil {
40960					return err
40961				}
40962				wafp.ID = &ID
40963			}
40964		case "name":
40965			if v != nil {
40966				var name string
40967				err = json.Unmarshal(*v, &name)
40968				if err != nil {
40969					return err
40970				}
40971				wafp.Name = &name
40972			}
40973		case "type":
40974			if v != nil {
40975				var typeVar string
40976				err = json.Unmarshal(*v, &typeVar)
40977				if err != nil {
40978					return err
40979				}
40980				wafp.Type = &typeVar
40981			}
40982		case "location":
40983			if v != nil {
40984				var location string
40985				err = json.Unmarshal(*v, &location)
40986				if err != nil {
40987					return err
40988				}
40989				wafp.Location = &location
40990			}
40991		case "tags":
40992			if v != nil {
40993				var tags map[string]*string
40994				err = json.Unmarshal(*v, &tags)
40995				if err != nil {
40996					return err
40997				}
40998				wafp.Tags = tags
40999			}
41000		}
41001	}
41002
41003	return nil
41004}
41005
41006// WebApplicationFirewallPolicyListResult result of the request to list WebApplicationFirewallPolicies. It
41007// contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results.
41008type WebApplicationFirewallPolicyListResult struct {
41009	autorest.Response `json:"-"`
41010	// Value - READ-ONLY; List of WebApplicationFirewallPolicies within a resource group.
41011	Value *[]WebApplicationFirewallPolicy `json:"value,omitempty"`
41012	// NextLink - READ-ONLY; URL to get the next set of WebApplicationFirewallPolicy objects if there are any.
41013	NextLink *string `json:"nextLink,omitempty"`
41014}
41015
41016// WebApplicationFirewallPolicyListResultIterator provides access to a complete listing of
41017// WebApplicationFirewallPolicy values.
41018type WebApplicationFirewallPolicyListResultIterator struct {
41019	i    int
41020	page WebApplicationFirewallPolicyListResultPage
41021}
41022
41023// NextWithContext advances to the next value.  If there was an error making
41024// the request the iterator does not advance and the error is returned.
41025func (iter *WebApplicationFirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
41026	if tracing.IsEnabled() {
41027		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultIterator.NextWithContext")
41028		defer func() {
41029			sc := -1
41030			if iter.Response().Response.Response != nil {
41031				sc = iter.Response().Response.Response.StatusCode
41032			}
41033			tracing.EndSpan(ctx, sc, err)
41034		}()
41035	}
41036	iter.i++
41037	if iter.i < len(iter.page.Values()) {
41038		return nil
41039	}
41040	err = iter.page.NextWithContext(ctx)
41041	if err != nil {
41042		iter.i--
41043		return err
41044	}
41045	iter.i = 0
41046	return nil
41047}
41048
41049// Next advances to the next value.  If there was an error making
41050// the request the iterator does not advance and the error is returned.
41051// Deprecated: Use NextWithContext() instead.
41052func (iter *WebApplicationFirewallPolicyListResultIterator) Next() error {
41053	return iter.NextWithContext(context.Background())
41054}
41055
41056// NotDone returns true if the enumeration should be started or is not yet complete.
41057func (iter WebApplicationFirewallPolicyListResultIterator) NotDone() bool {
41058	return iter.page.NotDone() && iter.i < len(iter.page.Values())
41059}
41060
41061// Response returns the raw server response from the last page request.
41062func (iter WebApplicationFirewallPolicyListResultIterator) Response() WebApplicationFirewallPolicyListResult {
41063	return iter.page.Response()
41064}
41065
41066// Value returns the current value or a zero-initialized value if the
41067// iterator has advanced beyond the end of the collection.
41068func (iter WebApplicationFirewallPolicyListResultIterator) Value() WebApplicationFirewallPolicy {
41069	if !iter.page.NotDone() {
41070		return WebApplicationFirewallPolicy{}
41071	}
41072	return iter.page.Values()[iter.i]
41073}
41074
41075// Creates a new instance of the WebApplicationFirewallPolicyListResultIterator type.
41076func NewWebApplicationFirewallPolicyListResultIterator(page WebApplicationFirewallPolicyListResultPage) WebApplicationFirewallPolicyListResultIterator {
41077	return WebApplicationFirewallPolicyListResultIterator{page: page}
41078}
41079
41080// IsEmpty returns true if the ListResult contains no values.
41081func (wafplr WebApplicationFirewallPolicyListResult) IsEmpty() bool {
41082	return wafplr.Value == nil || len(*wafplr.Value) == 0
41083}
41084
41085// hasNextLink returns true if the NextLink is not empty.
41086func (wafplr WebApplicationFirewallPolicyListResult) hasNextLink() bool {
41087	return wafplr.NextLink != nil && len(*wafplr.NextLink) != 0
41088}
41089
41090// webApplicationFirewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
41091// It returns nil if no more results exist.
41092func (wafplr WebApplicationFirewallPolicyListResult) webApplicationFirewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
41093	if !wafplr.hasNextLink() {
41094		return nil, nil
41095	}
41096	return autorest.Prepare((&http.Request{}).WithContext(ctx),
41097		autorest.AsJSON(),
41098		autorest.AsGet(),
41099		autorest.WithBaseURL(to.String(wafplr.NextLink)))
41100}
41101
41102// WebApplicationFirewallPolicyListResultPage contains a page of WebApplicationFirewallPolicy values.
41103type WebApplicationFirewallPolicyListResultPage struct {
41104	fn     func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)
41105	wafplr WebApplicationFirewallPolicyListResult
41106}
41107
41108// NextWithContext advances to the next page of values.  If there was an error making
41109// the request the page does not advance and the error is returned.
41110func (page *WebApplicationFirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
41111	if tracing.IsEnabled() {
41112		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultPage.NextWithContext")
41113		defer func() {
41114			sc := -1
41115			if page.Response().Response.Response != nil {
41116				sc = page.Response().Response.Response.StatusCode
41117			}
41118			tracing.EndSpan(ctx, sc, err)
41119		}()
41120	}
41121	for {
41122		next, err := page.fn(ctx, page.wafplr)
41123		if err != nil {
41124			return err
41125		}
41126		page.wafplr = next
41127		if !next.hasNextLink() || !next.IsEmpty() {
41128			break
41129		}
41130	}
41131	return nil
41132}
41133
41134// Next advances to the next page of values.  If there was an error making
41135// the request the page does not advance and the error is returned.
41136// Deprecated: Use NextWithContext() instead.
41137func (page *WebApplicationFirewallPolicyListResultPage) Next() error {
41138	return page.NextWithContext(context.Background())
41139}
41140
41141// NotDone returns true if the page enumeration should be started or is not yet complete.
41142func (page WebApplicationFirewallPolicyListResultPage) NotDone() bool {
41143	return !page.wafplr.IsEmpty()
41144}
41145
41146// Response returns the raw server response from the last page request.
41147func (page WebApplicationFirewallPolicyListResultPage) Response() WebApplicationFirewallPolicyListResult {
41148	return page.wafplr
41149}
41150
41151// Values returns the slice of values for the current page or nil if there are no values.
41152func (page WebApplicationFirewallPolicyListResultPage) Values() []WebApplicationFirewallPolicy {
41153	if page.wafplr.IsEmpty() {
41154		return nil
41155	}
41156	return *page.wafplr.Value
41157}
41158
41159// Creates a new instance of the WebApplicationFirewallPolicyListResultPage type.
41160func NewWebApplicationFirewallPolicyListResultPage(cur WebApplicationFirewallPolicyListResult, getNextPage func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)) WebApplicationFirewallPolicyListResultPage {
41161	return WebApplicationFirewallPolicyListResultPage{
41162		fn:     getNextPage,
41163		wafplr: cur,
41164	}
41165}
41166
41167// WebApplicationFirewallPolicyPropertiesFormat defines web application firewall policy properties.
41168type WebApplicationFirewallPolicyPropertiesFormat struct {
41169	// PolicySettings - The PolicySettings for policy.
41170	PolicySettings *PolicySettings `json:"policySettings,omitempty"`
41171	// CustomRules - The custom rules inside the policy.
41172	CustomRules *[]WebApplicationFirewallCustomRule `json:"customRules,omitempty"`
41173	// ApplicationGateways - READ-ONLY; A collection of references to application gateways.
41174	ApplicationGateways *[]ApplicationGateway `json:"applicationGateways,omitempty"`
41175	// ProvisioningState - READ-ONLY; The provisioning state of the web application firewall policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
41176	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
41177	// ResourceState - READ-ONLY; Resource status of the policy. Possible values include: 'WebApplicationFirewallPolicyResourceStateCreating', 'WebApplicationFirewallPolicyResourceStateEnabling', 'WebApplicationFirewallPolicyResourceStateEnabled', 'WebApplicationFirewallPolicyResourceStateDisabling', 'WebApplicationFirewallPolicyResourceStateDisabled', 'WebApplicationFirewallPolicyResourceStateDeleting'
41178	ResourceState WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"`
41179	// ManagedRules - Describes the managedRules structure.
41180	ManagedRules *ManagedRulesDefinition `json:"managedRules,omitempty"`
41181	// HTTPListeners - READ-ONLY; A collection of references to application gateway http listeners.
41182	HTTPListeners *[]SubResource `json:"httpListeners,omitempty"`
41183	// PathBasedRules - READ-ONLY; A collection of references to application gateway path rules.
41184	PathBasedRules *[]SubResource `json:"pathBasedRules,omitempty"`
41185}
41186
41187// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyPropertiesFormat.
41188func (wafppf WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
41189	objectMap := make(map[string]interface{})
41190	if wafppf.PolicySettings != nil {
41191		objectMap["policySettings"] = wafppf.PolicySettings
41192	}
41193	if wafppf.CustomRules != nil {
41194		objectMap["customRules"] = wafppf.CustomRules
41195	}
41196	if wafppf.ManagedRules != nil {
41197		objectMap["managedRules"] = wafppf.ManagedRules
41198	}
41199	return json.Marshal(objectMap)
41200}
41201